libpff-20120802/0000775000175000017500000000000012006536212010214 500000000000000libpff-20120802/libfcache/0000775000175000017500000000000012006536213012115 500000000000000libpff-20120802/libfcache/libfcache_extern.h0000644000175000017500000000242611765042502015501 00000000000000/* * The internal extern definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_EXTERN_H ) #define _LIBFCACHE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if !defined( HAVE_LOCAL_LIBFCACHE ) /* If libtool DLL support is enabled set LIBFCACHE_DLL_EXPORT * before including libfcache/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFCACHE_DLL_EXPORT #endif #include #else #define LIBFCACHE_EXTERN extern #endif #endif libpff-20120802/libfcache/libfcache_types.h0000644000175000017500000000260311765042502015335 00000000000000/* * The internal type definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_TYPES_H ) #define _LIBFCACHE_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache * The definitions in are copied here * for local use of libfcache */ #if defined( HAVE_LOCAL_LIBFCACHE ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfcache_cache {} libfcache_cache_t; #else typedef intptr_t libfcache_cache_t; #endif #endif /* defined( HAVE_LOCAL_LIBFCACHE ) */ #endif libpff-20120802/libfcache/libfcache_cache.h0000644000175000017500000000535411765042502015242 00000000000000/* * The cache functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_CACHE_H ) #define _LIBFCACHE_INTERNAL_CACHE_H #include #include #include "libfcache_array_type.h" #include "libfcache_cache_value.h" #include "libfcache_date_time.h" #include "libfcache_extern.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfcache_internal_cache libfcache_internal_cache_t; struct libfcache_internal_cache { /* The cache entries (array) */ libfcache_array_t *entries; /* The number of cache values */ int number_of_cache_values; }; LIBFCACHE_EXTERN \ int libfcache_cache_initialize( libfcache_cache_t **cache, int maximum_cache_entries, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_free( libfcache_cache_t **cache, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_clone( libfcache_cache_t **destination_cache, libfcache_cache_t *source_cache, libcerror_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_cache_clear( libfcache_cache_t *cache, libcerror_error_t **error ); int libfcache_cache_get_number_of_entries( libfcache_cache_t *cache, int *number_of_entries, libcerror_error_t **error ); int libfcache_cache_get_number_of_cache_values( libfcache_cache_t *cache, int *number_of_values, libcerror_error_t **error ); /* Cache value functions */ int libfcache_cache_get_value_by_index( libfcache_cache_t *cache, int cache_entry_index, libfcache_cache_value_t **cache_value, libcerror_error_t **error ); int libfcache_cache_set_value_by_index( libfcache_cache_t *cache, int cache_entry_index, off64_t offset, time_t timestamp, intptr_t *value, int (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfcache/libfcache_support.h0000644000175000017500000000226111765042502015705 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_SUPPORT_H ) #define _LIBFCACHE_SUPPORT_H #include #include #include "libfcache_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFCACHE ) LIBFCACHE_EXTERN \ const char *libfcache_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfcache/libfcache_support.c0000644000175000017500000000223411765042502015700 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_definitions.h" #include "libfcache_support.h" #if !defined( HAVE_LOCAL_LIBFCACHE ) /* Returns the library version as a string */ const char *libfcache_get_version( void ) { return( (const char *) LIBFCACHE_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ libpff-20120802/libfcache/Makefile.am0000644000175000017500000000147211765042502014077 00000000000000if HAVE_LOCAL_LIBFCACHE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfcache.la libfcache_la_SOURCES = \ libfcache_array_type.c libfcache_array_type.h \ libfcache_cache.c libfcache_cache.h \ libfcache_cache_value.c libfcache_cache_value.h \ libfcache_date_time.h \ libfcache_definitions.h \ libfcache_error.c libfcache_error.h \ libfcache_extern.h \ libfcache_libcerror.h \ libfcache_support.c libfcache_support.h \ libfcache_types.h \ libfcache_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) libpff-20120802/libfcache/libfcache_array_type.c0000644000175000017500000005345211765042502016353 00000000000000/* * Array type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_array_type.h" #include "libfcache_libcerror.h" /* Creates an array * Make sure the value array is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfcache_array_initialize( libfcache_array_t **array, int number_of_entries, libcerror_error_t **error ) { static char *function = "libfcache_array_initialize"; size_t entries_size = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid array value already set.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *array = memory_allocate_structure( libfcache_array_t ); if( *array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array.", function ); goto on_error; } if( memory_set( *array, 0, sizeof( libfcache_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array.", function ); goto on_error; } if( number_of_entries > 0 ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); goto on_error; } ( *array )->entries = (intptr_t **) memory_allocate( entries_size ); if( ( *array )->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array entries.", function ); goto on_error; } if( memory_set( ( *array )->entries, 0, entries_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); goto on_error; } ( *array )->number_of_allocated_entries = number_of_entries; ( *array )->number_of_entries = number_of_entries; } return( 1 ); on_error: if( *array != NULL ) { if( ( *array )->entries != NULL ) { memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( -1 ); } /* Frees an array * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfcache_array_free( libfcache_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfcache_array_free"; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { if( ( *array )->entries != NULL ) { if( libfcache_array_clear( *array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); result = -1; } memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( result ); } /* Empties an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfcache_array_empty( libfcache_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfcache_array_empty"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( libfcache_array_clear( array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); return( -1 ); } array->number_of_entries = 0; return( 1 ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfcache_array_clear( libfcache_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfcache_array_clear"; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } } return( result ); } /* Clones the array and its entries * * The entries are cloned using the entry_clone_function * On error the entries are freed using the entry_free_function * * Returns 1 if successful or -1 on error */ int libfcache_array_clone( libfcache_array_t **destination_array, libfcache_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfcache_array_clone"; int entry_iterator = 0; if( destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination array.", function ); return( -1 ); } if( *destination_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination array already set.", function ); return( -1 ); } if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } if( entry_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry clone function.", function ); return( -1 ); } if( source_array == NULL ) { *destination_array = NULL; return( 1 ); } if( libfcache_array_initialize( destination_array, source_array->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination array.", function ); goto on_error; } if( *destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination array.", function ); goto on_error; } if( source_array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < source_array->number_of_entries; entry_iterator++ ) { if( source_array->entries[ entry_iterator ] != NULL ) { if( entry_clone_function( &( ( *destination_array )->entries[ entry_iterator ] ), source_array->entries[ entry_iterator ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone array entry: %d.", function, entry_iterator ); goto on_error; } } } } return( 1 ); on_error: if( *destination_array != NULL ) { libfcache_array_free( destination_array, entry_free_function, NULL ); } return( -1 ); } /* Resizes an array * Returns 1 if successful or -1 on error */ int libfcache_array_resize( libfcache_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { void *reallocation = NULL; static char *function = "libfcache_array_resize"; size_t entries_size = 0; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } if( number_of_entries > array->number_of_allocated_entries ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( array->entries, entries_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize array entries.", function ); return( -1 ); } array->entries = (intptr_t **) reallocation; if( memory_set( &( array->entries[ array->number_of_allocated_entries ] ), 0, sizeof( intptr_t * ) * ( number_of_entries - array->number_of_allocated_entries ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); result = -1; } array->number_of_allocated_entries = number_of_entries; array->number_of_entries = number_of_entries; } else if( number_of_entries > array->number_of_entries ) { array->number_of_entries = number_of_entries; } else if( array->entries != NULL ) { if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } for( entry_iterator = number_of_entries; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } array->number_of_entries = number_of_entries; } return( result ); } /* Retrieves the number of entries in the array * Returns 1 if successful or -1 on error */ int libfcache_array_get_number_of_entries( libfcache_array_t *array, int *number_of_entries, libcerror_error_t **error ) { static char *function = "libfcache_array_get_number_of_entries"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *number_of_entries = array->number_of_entries; return( 1 ); } /* Retrieves a specific entry from the array * Returns 1 if successful or -1 on error */ int libfcache_array_get_entry_by_index( libfcache_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ) { static char *function = "libfcache_array_get_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } if( entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry.", function ); return( -1 ); } *entry = array->entries[ entry_index ]; return( 1 ); } /* Sets a specific entry in the array * Returns 1 if successful or -1 on error */ int libfcache_array_set_entry_by_index( libfcache_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libfcache_array_set_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } array->entries[ entry_index ] = entry; return( 1 ); } /* Appends an entry * Sets the entry index to the newly appended entry * Returns 1 if successful or -1 on error */ int libfcache_array_append_entry( libfcache_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libfcache_array_append_entry"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } *entry_index = array->number_of_entries; if( libfcache_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; return( 1 ); } /* Inserts an entry in the array * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBFCACHE_ARRAY_COMPARE_LESS, * LIBFCACHE_ARRAY_COMPARE_EQUAL, LIBFCACHE_ARRAY_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBFCACHE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libfcache_array_insert_entry( libfcache_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { static char *function = "libfcache_tree_node_insert_node"; int entry_iterator = 0; int result = -1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } if( entry_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBFCACHE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { result = entry_compare_function( entry, array->entries[ entry_iterator ], error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare entry: %d.", function, entry_iterator ); return( -1 ); } else if( result == LIBFCACHE_ARRAY_COMPARE_EQUAL ) { if( ( insert_flags & LIBFCACHE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBFCACHE_ARRAY_COMPARE_LESS ) { break; } else if( result != LIBFCACHE_ARRAY_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry compare function return value: %d.", function, result ); return( -1 ); } } } if( ( array->entries != NULL ) && ( result == LIBFCACHE_ARRAY_COMPARE_LESS ) ) { *entry_index = entry_iterator; if( libfcache_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } for( entry_iterator = array->number_of_entries - 1; entry_iterator > *entry_index; entry_iterator-- ) { array->entries[ entry_iterator ] = array->entries[ entry_iterator - 1 ]; } array->entries[ *entry_index ] = entry; } else { *entry_index = array->number_of_entries; if( libfcache_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; } return( 1 ); } libpff-20120802/libfcache/libfcache_unused.h0000644000175000017500000000247711765042502015505 00000000000000/* * The internal unused definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_UNUSED_H ) #define _LIBFCACHE_INTERNAL_UNUSED_H #include #if !defined( LIBFCACHE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFCACHE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFCACHE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFCACHE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFCACHE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libfcache/libfcache_libcerror.h0000644000175000017500000000252511765042502016157 00000000000000/* * The internal libcerror header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_LIBCERROR_H ) #define _LIBFCACHE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfcache/libfcache_array_type.h0000644000175000017500000001013111765042502016343 00000000000000/* * Array type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_ARRAY_TYPE_H ) #define _LIBFCACHE_ARRAY_TYPE_H #include #include #include "libfcache_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The array comparison definitions */ enum LIBFCACHE_ARRAY_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBFCACHE_ARRAY_COMPARE_LESS, /* The first and second values are equal */ LIBFCACHE_ARRAY_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBFCACHE_ARRAY_COMPARE_GREATER }; /* The array insert flag definitions */ enum LIBFCACHE_ARRAY_INSERT_FLAGS { /* Allow duplicate entries */ LIBFCACHE_ARRAY_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBFCACHE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libfcache_array libfcache_array_t; struct libfcache_array { /* The number of allocated entries */ int number_of_allocated_entries; /* The number of entries */ int number_of_entries; /* The entries */ intptr_t **entries; }; int libfcache_array_initialize( libfcache_array_t **array, int number_of_entries, libcerror_error_t **error ); int libfcache_array_free( libfcache_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfcache_array_empty( libfcache_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfcache_array_clear( libfcache_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfcache_array_clone( libfcache_array_t **destination_array, libfcache_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libfcache_array_resize( libfcache_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfcache_array_get_number_of_entries( libfcache_array_t *array, int *number_of_entries, libcerror_error_t **error ); int libfcache_array_get_entry_by_index( libfcache_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ); int libfcache_array_set_entry_by_index( libfcache_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ); int libfcache_array_append_entry( libfcache_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ); int libfcache_array_insert_entry( libfcache_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfcache/libfcache_definitions.h0000644000175000017500000000306711765042502016511 00000000000000/* * The internal definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_DEFINITIONS_H ) #define _LIBFCACHE_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if !defined( HAVE_LOCAL_LIBFCACHE ) #include /* The definitions in are copied here * for local use of libfcache */ #else #define LIBFCACHE_VERSION 20120501 /* The libfcache version string */ #define LIBFCACHE_VERSION_STRING "20120501" /* The cache value flags definitions */ enum LIBFCACHE_CACHE_VALUE_FLAGS { /* The cache value is not managed by the library */ LIBFCACHE_CACHE_VALUE_FLAG_NON_MANAGED = 0x00, /* The cache value is managed by the library */ LIBFCACHE_CACHE_VALUE_FLAG_MANAGED = 0x01 }; #endif #endif libpff-20120802/libfcache/libfcache_cache_value.h0000644000175000017500000000455011765042503016434 00000000000000/* * Cache value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_CACHE_VALUE_H ) #define _LIBFCACHE_CACHE_VALUE_H #include #include #include "libfcache_date_time.h" #include "libfcache_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfcache_cache_value libfcache_cache_value_t; struct libfcache_cache_value { /* The offset */ off64_t offset; /* The time stamp */ time_t timestamp; /* The value */ intptr_t *value; /* The free value function */ int (*free_value)( intptr_t **value, libcerror_error_t **error ); /* The flags */ uint8_t flags; }; int libfcache_cache_value_initialize( libfcache_cache_value_t **cache_value, libcerror_error_t **error ); int libfcache_cache_value_free( libfcache_cache_value_t **cache_value, libcerror_error_t **error ); int libfcache_cache_value_get_identifier( libfcache_cache_value_t *cache_value, off64_t *offset, time_t *timestamp, libcerror_error_t **error ); int libfcache_cache_value_set_identifier( libfcache_cache_value_t *cache_value, off64_t offset, time_t timestamp, libcerror_error_t **error ); int libfcache_cache_value_get_value( libfcache_cache_value_t *cache_value, intptr_t **value, libcerror_error_t **error ); int libfcache_cache_value_set_value( libfcache_cache_value_t *cache_value, intptr_t *value, int (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfcache/libfcache_cache_value.c0000644000175000017500000001720511765042503016430 00000000000000/* * Cache value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_cache_value.h" #include "libfcache_date_time.h" #include "libfcache_definitions.h" #include "libfcache_libcerror.h" /* Creates a cache value * Returns 1 if successful or -1 on error */ int libfcache_cache_value_initialize( libfcache_cache_value_t **cache_value, libcerror_error_t **error ) { static char *function = "libfcache_cache_value_initialize"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } if( *cache_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid cache value value already set.", function ); return( -1 ); } *cache_value = memory_allocate_structure( libfcache_cache_value_t ); if( *cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create cache value.", function ); goto on_error; } if( memory_set( *cache_value, 0, sizeof( libfcache_cache_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear cache value.", function ); goto on_error; } ( *cache_value )->offset = (off64_t) -1; return( 1 ); on_error: if( *cache_value != NULL ) { memory_free( *cache_value ); *cache_value = NULL; } return( -1 ); } /* Frees the cache value * Returns 1 if successful or -1 on error */ int libfcache_cache_value_free( libfcache_cache_value_t **cache_value, libcerror_error_t **error ) { static char *function = "libfcache_cache_value_free"; int result = 1; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } if( *cache_value != NULL ) { if( ( ( *cache_value )->flags & LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ) != 0 ) { if( ( *cache_value )->value != NULL ) { if( ( *cache_value )->free_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid cache value - missing free value function.", function ); result = -1; } else if( ( *cache_value )->free_value( &( ( *cache_value )->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); result = -1; } } } memory_free( *cache_value ); *cache_value = NULL; } return( result ); } /* Retrieves the cache value identifier * Returns 1 if successful or -1 on error */ int libfcache_cache_value_get_identifier( libfcache_cache_value_t *cache_value, off64_t *offset, time_t *timestamp, libcerror_error_t **error ) { static char *function = "libfcache_cache_value_get_identifier"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid timestamp.", function ); return( -1 ); } *offset = cache_value->offset; *timestamp = cache_value->timestamp; return( 1 ); } /* Sets the cache value identifier * Returns 1 if successful or -1 on error */ int libfcache_cache_value_set_identifier( libfcache_cache_value_t *cache_value, off64_t offset, time_t timestamp, libcerror_error_t **error ) { static char *function = "libfcache_cache_value_set_identifier"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } cache_value->offset = offset; cache_value->timestamp = timestamp; return( 1 ); } /* Retrieves the cache value * Returns 1 if successful or -1 on error */ int libfcache_cache_value_get_value( libfcache_cache_value_t *cache_value, intptr_t **value, libcerror_error_t **error ) { static char *function = "libfcache_cache_value_get_value"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } *value = cache_value->value; return( 1 ); } /* Sets the cache value * Returns 1 if successful or -1 on error */ int libfcache_cache_value_set_value( libfcache_cache_value_t *cache_value, intptr_t *value, int (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { static char *function = "libfcache_cache_value_set_value"; if( cache_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache value.", function ); return( -1 ); } if( free_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid free value function.", function ); return( -1 ); } if( ( cache_value->flags & LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ) != 0 ) { if( cache_value->value != NULL ) { if( cache_value->free_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid cache value - missing free value function.", function ); return( -1 ); } if( cache_value->free_value( &( cache_value->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); return( -1 ); } } cache_value->flags &= ~( LIBFCACHE_CACHE_VALUE_FLAG_MANAGED ); } cache_value->value = value; cache_value->free_value = free_value; cache_value->flags |= flags; return( 1 ); } libpff-20120802/libfcache/Makefile.in0000664000175000017500000006330312006536016014110 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfcache DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfcache_la_LIBADD = am__libfcache_la_SOURCES_DIST = libfcache_array_type.c \ libfcache_array_type.h libfcache_cache.c libfcache_cache.h \ libfcache_cache_value.c libfcache_cache_value.h \ libfcache_date_time.h libfcache_definitions.h \ libfcache_error.c libfcache_error.h libfcache_extern.h \ libfcache_libcerror.h libfcache_support.c libfcache_support.h \ libfcache_types.h libfcache_unused.h @HAVE_LOCAL_LIBFCACHE_TRUE@am_libfcache_la_OBJECTS = \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_array_type.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_cache.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_cache_value.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_error.lo \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_support.lo libfcache_la_OBJECTS = $(am_libfcache_la_OBJECTS) @HAVE_LOCAL_LIBFCACHE_TRUE@am_libfcache_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfcache_la_SOURCES) DIST_SOURCES = $(am__libfcache_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFCACHE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFCACHE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFCACHE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFCACHE_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFCACHE_TRUE@noinst_LTLIBRARIES = libfcache.la @HAVE_LOCAL_LIBFCACHE_TRUE@libfcache_la_SOURCES = \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_array_type.c libfcache_array_type.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_cache.c libfcache_cache.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_cache_value.c libfcache_cache_value.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_date_time.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_definitions.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_error.c libfcache_error.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_extern.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_libcerror.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_support.c libfcache_support.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_types.h \ @HAVE_LOCAL_LIBFCACHE_TRUE@ libfcache_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfcache/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfcache/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfcache.la: $(libfcache_la_OBJECTS) $(libfcache_la_DEPENDENCIES) $(LINK) $(am_libfcache_la_rpath) $(libfcache_la_OBJECTS) $(libfcache_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_array_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_cache_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfcache_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfcache ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfcache_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfcache/libfcache_error.c0000644000175000017500000000472711765042503015327 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_error.h" #include "libfcache_libcerror.h" #if !defined( HAVE_LOCAL_LIBFCACHE ) /* Free an error and its elements */ void libfcache_error_free( libfcache_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfcache_error_fprint( libfcache_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfcache_error_sprint( libfcache_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfcache_error_backtrace_fprint( libfcache_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfcache_error_backtrace_sprint( libfcache_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ libpff-20120802/libfcache/libfcache_cache.c0000644000175000017500000003040311765042503015227 00000000000000/* * The cache functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfcache_cache.h" #include "libfcache_cache_value.h" #include "libfcache_date_time.h" #include "libfcache_definitions.h" #include "libfcache_libcerror.h" #include "libfcache_types.h" /* Initializes the cache * Returns 1 if successful or -1 on error */ int libfcache_cache_initialize( libfcache_cache_t **cache, int maximum_cache_entries, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_initialize"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } if( *cache != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid cache value already set.", function ); return( -1 ); } if( maximum_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid maximum cache entries value zero or less.", function ); return( -1 ); } internal_cache = memory_allocate_structure( libfcache_internal_cache_t ); if( internal_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create cache.", function ); goto on_error; } if( memory_set( internal_cache, 0, sizeof( libfcache_internal_cache_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear cache.", function ); goto on_error; } if( libfcache_array_initialize( &( internal_cache->entries ), maximum_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create entries array.", function ); goto on_error; } *cache = (libfcache_cache_t *) internal_cache; return( 1 ); on_error: if( internal_cache != NULL ) { memory_free( internal_cache ); } return( -1 ); } /* Frees the cache * Returns 1 if successful or -1 on error */ int libfcache_cache_free( libfcache_cache_t **cache, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_free"; int result = 1; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } if( *cache != NULL ) { internal_cache = (libfcache_internal_cache_t *) *cache; *cache = NULL; if( libfcache_array_free( &( internal_cache->entries ), (int (*)(intptr_t **, libcerror_error_t **)) &libfcache_cache_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the entries array.", function ); result = -1; } memory_free( internal_cache ); } return( result ); } /* Clones (duplicates) the cache, not the cache values * Returns 1 if successful or -1 on error */ int libfcache_cache_clone( libfcache_cache_t **destination_cache, libfcache_cache_t *source_cache, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_source_cache = NULL; static char *function = "libfcache_cache_clone"; int number_of_cache_entries = 0; if( destination_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination cache.", function ); return( -1 ); } if( *destination_cache != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination cache already set.", function ); return( -1 ); } if( source_cache == NULL ) { *destination_cache = NULL; return( 1 ); } internal_source_cache = (libfcache_internal_cache_t *) source_cache; if( libfcache_array_get_number_of_entries( internal_source_cache->entries, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries from source entries array.", function ); return( -1 ); } if( libfcache_cache_initialize( destination_cache, number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination cache.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of entries of the cache * Returns 1 if successful or -1 on error */ int libfcache_cache_get_number_of_entries( libfcache_cache_t *cache, int *number_of_entries, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_get_number_of_entries"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( libfcache_array_get_number_of_entries( internal_cache->entries, number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from entries array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of cache values * Returns 1 if successful or -1 on error */ int libfcache_cache_get_number_of_cache_values( libfcache_cache_t *cache, int *number_of_cache_values, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_get_number_of_cache_values"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( number_of_cache_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of cache values.", function ); return( -1 ); } *number_of_cache_values = internal_cache->number_of_cache_values; return( 1 ); } /* Clears the cache of the cache * Returns 1 if successful or -1 on error */ int libfcache_cache_clear( libfcache_cache_t *cache, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_clear"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( libfcache_array_clear( internal_cache->entries, (int (*)(intptr_t **, libcerror_error_t **)) &libfcache_cache_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear entries array.", function ); return( -1 ); } internal_cache->number_of_cache_values = 0; return( 1 ); } /* Retrieves the cache value for the specific index * Returns 1 if successful or -1 on error */ int libfcache_cache_get_value_by_index( libfcache_cache_t *cache, int cache_entry_index, libfcache_cache_value_t **cache_value, libcerror_error_t **error ) { libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_get_value_by_index"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( libfcache_array_get_entry_by_index( internal_cache->entries, cache_entry_index, (intptr_t **) cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d from entries array.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Sets the cache value for the specific index * Returns 1 if successful or -1 on error */ int libfcache_cache_set_value_by_index( libfcache_cache_t *cache, int cache_entry_index, off64_t offset, time_t timestamp, intptr_t *value, int (*free_value)( intptr_t **value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfcache_internal_cache_t *internal_cache = NULL; static char *function = "libfcache_cache_set_value_by_index"; if( cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid cache.", function ); return( -1 ); } internal_cache = (libfcache_internal_cache_t *) cache; if( libfcache_array_get_entry_by_index( internal_cache->entries, cache_entry_index, (intptr_t **) &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: %d from entries array.", function, cache_entry_index ); return( -1 ); } if( cache_value == NULL ) { if( libfcache_cache_value_initialize( &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create cache value.", function ); return( -1 ); } if( libfcache_array_set_entry_by_index( internal_cache->entries, cache_entry_index, (intptr_t *) cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set cache value: %d in entries array.", function, cache_entry_index ); libfcache_cache_value_free( &cache_value, NULL ); return( -1 ); } internal_cache->number_of_cache_values++; } if( libfcache_cache_value_set_value( cache_value, value, free_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache value.", function ); return( -1 ); } if( libfcache_cache_value_set_identifier( cache_value, offset, timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set identifier in cache value.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libfcache/libfcache_error.h0000644000175000017500000000335111765042503015324 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_INTERNAL_ERROR_H ) #define _LIBFCACHE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFCACHE ) #include #endif #include "libfcache_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFCACHE ) LIBFCACHE_EXTERN \ void libfcache_error_free( libfcache_error_t **error ); LIBFCACHE_EXTERN \ int libfcache_error_fprint( libfcache_error_t *error, FILE *stream ); LIBFCACHE_EXTERN \ int libfcache_error_sprint( libfcache_error_t *error, char *string, size_t size ); LIBFCACHE_EXTERN \ int libfcache_error_backtrace_fprint( libfcache_error_t *error, FILE *stream ); LIBFCACHE_EXTERN \ int libfcache_error_backtrace_sprint( libfcache_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfcache/libfcache_date_time.h0000644000175000017500000000231011765042503016120 00000000000000/* * Date and time functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFCACHE_DATE_TIME_H ) #define _LIBFCACHE_DATE_TIME_H #include #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #if defined( __cplusplus ) extern "C" { #endif #define libfcache_date_time_get_timestamp() \ time( NULL ) #if defined( __cplusplus ) } #endif #endif libpff-20120802/common/0000775000175000017500000000000012006536212011504 500000000000000libpff-20120802/common/config_msc.h0000644000175000017500000000310712005152701013677 00000000000000/* * Configuration file for Microsoft Visual Studio C++ compiler * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _CONFIG_MSC_H ) #define _CONFIG_MSC_H /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "joachim.metz@gmail.com" /* Define the size of the wide character for WINAPI */ #if !defined( SIZEOF_WCHAR_T ) #define SIZEOF_WCHAR_T 2 #endif /* Use the C Runtime (CRT) functions instead of the WINAPI functions #define USE_CRT_FUNCTIONS 1 */ /* Enable verbose output #define HAVE_VERBOSE_OUTPUT 1 */ /* Enable debug output #define HAVE_DEBUG_OUTPUT 1 */ /* Disable warning C4127: conditional expression is constant */ #pragma warning( disable : 4127 ) /* Disable warning C4201: nonstandard extension used : nameless struct/union */ #pragma warning( disable : 4201 ) #endif libpff-20120802/common/byte_stream.h0000644000175000017500000002424612005152701014115 00000000000000/* * Byte stream functions * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _BYTE_STREAM_H ) #define _BYTE_STREAM_H #include "common.h" #include "types.h" #if defined( __cplusplus ) extern "C" { #endif #define _BYTE_STREAM_HOST_IS_ENDIAN_BIG ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x01020304 ) #define _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x04030201 ) #define _BYTE_STREAM_HOST_IS_ENDIAN_MIDDLE ( *((uint32_t *) "\x01\x02\x03\x04" ) == 0x02010403 ) #define _BYTE_STREAM_ENDIAN_BIG (uint8_t) 'b' #define _BYTE_STREAM_ENDIAN_LITTLE (uint8_t) 'l' #define _BYTE_STREAM_ENDIAN_MIDDLE (uint8_t) 'm' typedef union byte_stream_float32 { float floating_point; uint32_t integer; } byte_stream_float32_t; typedef union byte_stream_float64 { double floating_point; uint64_t integer; } byte_stream_float64_t; #define byte_stream_copy_to_uint16_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; #define byte_stream_copy_to_uint16_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint24_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; #define byte_stream_copy_to_uint24_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint32_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; #define byte_stream_copy_to_uint32_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint48_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 5 ]; #define byte_stream_copy_to_uint48_little_endian( byte_stream, value ) \ ( value ) |= ( byte_stream )[ 5 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_to_uint64_big_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 0 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 5 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 6 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 7 ]; #define byte_stream_copy_to_uint64_little_endian( byte_stream, value ) \ ( value ) = ( byte_stream )[ 7 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 6 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 5 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 4 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 3 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 2 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 1 ]; \ ( value ) <<= 8; \ ( value ) |= ( byte_stream )[ 0 ]; #define byte_stream_copy_from_uint16_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint16_little_endian( byte_stream, value ) \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint24_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint24_little_endian( byte_stream, value ) \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint32_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint32_little_endian( byte_stream, value ) \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint48_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 5 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint48_little_endian( byte_stream, value ) \ ( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint64_big_endian( byte_stream, value ) \ ( byte_stream )[ 0 ] = (uint8_t) ( ( ( value ) >> 56 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 48 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 6 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 7 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_copy_from_uint64_little_endian( byte_stream, value ) \ ( byte_stream )[ 7 ] = (uint8_t) ( ( ( value ) >> 56 ) & 0x0ff ); \ ( byte_stream )[ 6 ] = (uint8_t) ( ( ( value ) >> 48 ) & 0x0ff ); \ ( byte_stream )[ 5 ] = (uint8_t) ( ( ( value ) >> 40 ) & 0x0ff ); \ ( byte_stream )[ 4 ] = (uint8_t) ( ( ( value ) >> 32 ) & 0x0ff ); \ ( byte_stream )[ 3 ] = (uint8_t) ( ( ( value ) >> 24 ) & 0x0ff ); \ ( byte_stream )[ 2 ] = (uint8_t) ( ( ( value ) >> 16 ) & 0x0ff ); \ ( byte_stream )[ 1 ] = (uint8_t) ( ( ( value ) >> 8 ) & 0x0ff ); \ ( byte_stream )[ 0 ] = (uint8_t) ( ( value ) & 0x0ff ) #define byte_stream_bit_rotate_left_8bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 8 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_8bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 8 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left_16bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 16 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_16bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 16 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left_32bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 32 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_32bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 32 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left_64bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) << ( number_of_bits ) ) | ( ( byte_stream ) >> ( 64 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right_64bit( byte_stream, number_of_bits ) \ ( ( ( byte_stream ) >> ( number_of_bits ) ) | ( ( byte_stream ) << ( 64 - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_left( value, number_of_bits ) \ ( ( ( value ) << ( number_of_bits ) ) | ( ( value ) >> ( ( sizeof( value ) << 3 ) - ( number_of_bits ) ) ) ) #define byte_stream_bit_rotate_right( value, number_of_bits ) \ ( ( ( value ) >> ( number_of_bits ) ) | ( ( value ) << ( ( sizeof( value ) << 3 ) - ( number_of_bits ) ) ) ) #if defined( __cplusplus ) } #endif #endif libpff-20120802/common/common.h0000644000175000017500000000303612005152701013061 00000000000000/* * Common include file * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _COMMON_H ) #define _COMMON_H #if defined( HAVE_CONFIG_H ) #include #endif /* Check to see if the Microsoft Visual Studio C++ compiler is used */ #if defined( _MSC_VER ) #include #endif /* Check to see if the Borland/CodeGear C++ Builder compiler is used */ #if defined( __BORLANDC__ ) #include #endif /* Make sure WINAPI is defined */ #if defined( _MSC_VER ) || defined( __BORLANDC__ ) || defined( HAVE_WINDOWS_H ) /* #define WIN32_LEAN_AND_MEAN */ #include #endif /* Make sure the WINAPI version is build with both the narrow and wide character functions */ #if defined( WINAPI ) && !defined( HAVE_WIDE_CHARACTER_TYPE ) #define HAVE_WIDE_CHARACTER_TYPE 1 #endif #endif libpff-20120802/common/Makefile.am0000644000175000017500000000066312005152701013457 00000000000000AM_CPPFLAGS = -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ common.h \ config.h \ config_borlandc.h \ config_msc.h \ file_stream.h \ gettext.h \ memory.h \ types.h \ types.h.in if HAVE_MEMWATCH noinst_LTLIBRARIES = libmemwatch.la libmemwatch_la_SOURCES = \ memwatch.c memwatch.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f config.h /bin/rm -f types.h /bin/rm -f Makefile libpff-20120802/common/types.h0000664000175000017500000001171212006536127012750 00000000000000/* * Type and type-support defintions * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _TYPES_H ) #define _TYPES_H #include "common.h" #if defined( HAVE_LIMITS_H ) || defined( WINAPI ) #include #endif /* Make sure to include inttypes.h or stdint.h before * PRI definitions are defined */ #include /* Fix for systems without PRI definitions */ #if !defined( PRId8 ) #define PRId8 "d" #endif #if !defined( PRId16 ) #define PRId16 "d" #endif #if !defined( PRId32 ) #if defined( WINAPI ) #define PRId32 "I32d" #else #define PRId32 "d" #endif #endif #if !defined( PRId64 ) #if defined( WINAPI ) #define PRId64 "I64d" #elif __WORDSIZE == 64 #define PRId64 "ld" #else #define PRId64 "lld" #endif #endif #if !defined( PRIi8 ) #define PRIi8 "i" #endif #if !defined( PRIi16 ) #define PRIi16 "i" #endif #if !defined( PRIi32 ) #if defined( WINAPI ) #define PRIi32 "I32i" #else #define PRIi32 "i" #endif #endif #if !defined( PRIi64 ) #if defined( WINAPI ) #define PRIi64 "I64i" #elif __WORDSIZE == 64 #define PRIi64 "li" #else #define PRIi64 "lli" #endif #endif #if !defined( PRIu8 ) #define PRIu8 "u" #endif #if !defined( PRIu16 ) #define PRIu16 "u" #endif #if !defined( PRIu32 ) #if defined( WINAPI ) #define PRIu32 "I32u" #else #define PRIu32 "u" #endif #endif #if !defined( PRIu64 ) #if defined( WINAPI ) #define PRIu64 "I64u" #elif __WORDSIZE == 64 #define PRIu64 "lu" #else #define PRIu64 "llu" #endif #endif #if !defined( PRIx8 ) #define PRIx8 "x" #endif #if !defined( PRIx16 ) #define PRIx16 "x" #endif #if !defined( PRIx32 ) #if defined( WINAPI ) #define PRIx32 "I32x" #else #define PRIx32 "x" #endif #endif #if !defined( PRIx64 ) #if defined( WINAPI ) #define PRIx64 "I64x" #elif __WORDSIZE == 64 #define PRIx64 "lx" #else #define PRIx64 "llx" #endif #endif /* Fix for systems without printf %jd definition */ #if defined( HAVE_PRINTF_JD ) #define PRIjd "jd" #define PRIji "ji" #define PRIju "ju" #define PRIjx "jx" #elif SIZEOF_OFF_T == 8 #define PRIjd PRId64 #define PRIji PRIi64 #define PRIju PRIu64 #define PRIjx PRIx64 #else #define PRIjd PRId32 #define PRIji PRIi32 #define PRIju PRIu32 #define PRIjx PRIx32 #endif /* Fix for systems without printf %zd definition */ #if defined( HAVE_PRINTF_ZD ) #define PRIzd "zd" #define PRIzi "zi" #define PRIzu "zu" #define PRIzx "zx" #elif defined( WINAPI ) #define PRIzd "Id" #define PRIzi "Ii" #define PRIzu "Iu" #define PRIzx "Ix" #elif SIZEOF_SIZE_T == 8 #define PRIzd PRId64 #define PRIzi PRIi64 #define PRIzu PRIu64 #define PRIzx PRIx64 #else #define PRIzd PRId32 #define PRIzi PRIi32 #define PRIzu PRIu32 #define PRIzx PRIx32 #endif /* Fix for systems without (U)INTx_MAX definitions */ /* The maximum signed 8-bit integer is 127 (0x7f) */ #if !defined( INT8_MAX ) #define INT8_MAX (0x7f) #endif /* The maximum unsigned 8-bit integer is 256 (0xff) */ #if !defined( UINT8_MAX ) #define UINT8_MAX (0xff) #endif /* The maximum signed 16-bit integer is 32767 (0xr7ffff) */ #if !defined( INT16_MAX ) #define INT16_MAX (0x7fff) #endif /* The maximum unsigned 16-bit integer is 65535 (0xffff) */ #if !defined( UINT16_MAX ) #define UINT16_MAX (0xffff) #endif /* The maximum signed 32-bit integer is 2147483647 (0x7fffffff) */ #if !defined( INT32_MAX ) #define INT32_MAX (0x7fffffffL) #endif /* The maximum unsigned 32-bit integer is 4294967295 (0xffffffff) */ #if !defined( UINT32_MAX ) #define UINT32_MAX (0xffffffffUL) #endif /* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff) */ #if !defined( INT64_MAX ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define INT64_MAX (0x7fffffffffffffffUL) #else #define INT64_MAX (0x7fffffffffffffffULL) #endif #endif /* The maximum signed integer */ #if !defined( INT_MAX ) #define INT_MAX INT32_MAX #endif /* The maximum unsigned integer */ #if !defined( UINT_MAX ) #define UINT_MAX UINT32_MAX #endif /* The maximum signed size type is platform dependent */ #if !defined( SSIZE_MAX ) #if defined( WINAPI ) #if defined( _WIN64 ) #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* _WIN64 */ #else #if __WORDSIZE == 64 #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* __WORDSIZE == 64 */ #endif /* WINAPI */ #endif /* SSIZE_MAX */ #endif libpff-20120802/common/types.h.in0000644000175000017500000001171512005152701013345 00000000000000/* * Type and type-support defintions * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _TYPES_H ) #define _TYPES_H #include "common.h" #if defined( HAVE_LIMITS_H ) || defined( WINAPI ) #include #endif /* Make sure to include inttypes.h or stdint.h before * PRI definitions are defined */ #include <@PACKAGE@/types.h> /* Fix for systems without PRI definitions */ #if !defined( PRId8 ) #define PRId8 "d" #endif #if !defined( PRId16 ) #define PRId16 "d" #endif #if !defined( PRId32 ) #if defined( WINAPI ) #define PRId32 "I32d" #else #define PRId32 "d" #endif #endif #if !defined( PRId64 ) #if defined( WINAPI ) #define PRId64 "I64d" #elif __WORDSIZE == 64 #define PRId64 "ld" #else #define PRId64 "lld" #endif #endif #if !defined( PRIi8 ) #define PRIi8 "i" #endif #if !defined( PRIi16 ) #define PRIi16 "i" #endif #if !defined( PRIi32 ) #if defined( WINAPI ) #define PRIi32 "I32i" #else #define PRIi32 "i" #endif #endif #if !defined( PRIi64 ) #if defined( WINAPI ) #define PRIi64 "I64i" #elif __WORDSIZE == 64 #define PRIi64 "li" #else #define PRIi64 "lli" #endif #endif #if !defined( PRIu8 ) #define PRIu8 "u" #endif #if !defined( PRIu16 ) #define PRIu16 "u" #endif #if !defined( PRIu32 ) #if defined( WINAPI ) #define PRIu32 "I32u" #else #define PRIu32 "u" #endif #endif #if !defined( PRIu64 ) #if defined( WINAPI ) #define PRIu64 "I64u" #elif __WORDSIZE == 64 #define PRIu64 "lu" #else #define PRIu64 "llu" #endif #endif #if !defined( PRIx8 ) #define PRIx8 "x" #endif #if !defined( PRIx16 ) #define PRIx16 "x" #endif #if !defined( PRIx32 ) #if defined( WINAPI ) #define PRIx32 "I32x" #else #define PRIx32 "x" #endif #endif #if !defined( PRIx64 ) #if defined( WINAPI ) #define PRIx64 "I64x" #elif __WORDSIZE == 64 #define PRIx64 "lx" #else #define PRIx64 "llx" #endif #endif /* Fix for systems without printf %jd definition */ #if defined( HAVE_PRINTF_JD ) #define PRIjd "jd" #define PRIji "ji" #define PRIju "ju" #define PRIjx "jx" #elif SIZEOF_OFF_T == 8 #define PRIjd PRId64 #define PRIji PRIi64 #define PRIju PRIu64 #define PRIjx PRIx64 #else #define PRIjd PRId32 #define PRIji PRIi32 #define PRIju PRIu32 #define PRIjx PRIx32 #endif /* Fix for systems without printf %zd definition */ #if defined( HAVE_PRINTF_ZD ) #define PRIzd "zd" #define PRIzi "zi" #define PRIzu "zu" #define PRIzx "zx" #elif defined( WINAPI ) #define PRIzd "Id" #define PRIzi "Ii" #define PRIzu "Iu" #define PRIzx "Ix" #elif SIZEOF_SIZE_T == 8 #define PRIzd PRId64 #define PRIzi PRIi64 #define PRIzu PRIu64 #define PRIzx PRIx64 #else #define PRIzd PRId32 #define PRIzi PRIi32 #define PRIzu PRIu32 #define PRIzx PRIx32 #endif /* Fix for systems without (U)INTx_MAX definitions */ /* The maximum signed 8-bit integer is 127 (0x7f) */ #if !defined( INT8_MAX ) #define INT8_MAX (0x7f) #endif /* The maximum unsigned 8-bit integer is 256 (0xff) */ #if !defined( UINT8_MAX ) #define UINT8_MAX (0xff) #endif /* The maximum signed 16-bit integer is 32767 (0xr7ffff) */ #if !defined( INT16_MAX ) #define INT16_MAX (0x7fff) #endif /* The maximum unsigned 16-bit integer is 65535 (0xffff) */ #if !defined( UINT16_MAX ) #define UINT16_MAX (0xffff) #endif /* The maximum signed 32-bit integer is 2147483647 (0x7fffffff) */ #if !defined( INT32_MAX ) #define INT32_MAX (0x7fffffffL) #endif /* The maximum unsigned 32-bit integer is 4294967295 (0xffffffff) */ #if !defined( UINT32_MAX ) #define UINT32_MAX (0xffffffffUL) #endif /* The maximum signed 64-bit integer is 9223372036854775807 (0x7fffffffffffffff) */ #if !defined( INT64_MAX ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define INT64_MAX (0x7fffffffffffffffUL) #else #define INT64_MAX (0x7fffffffffffffffULL) #endif #endif /* The maximum signed integer */ #if !defined( INT_MAX ) #define INT_MAX INT32_MAX #endif /* The maximum unsigned integer */ #if !defined( UINT_MAX ) #define UINT_MAX UINT32_MAX #endif /* The maximum signed size type is platform dependent */ #if !defined( SSIZE_MAX ) #if defined( WINAPI ) #if defined( _WIN64 ) #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* _WIN64 */ #else #if __WORDSIZE == 64 #define SSIZE_MAX INT64_MAX #else #define SSIZE_MAX INT32_MAX #endif /* __WORDSIZE == 64 */ #endif /* WINAPI */ #endif /* SSIZE_MAX */ #endif libpff-20120802/common/gettext.h0000644000175000017500000002242112005152701013254 00000000000000/* Convenience header for conditional use of GNU . Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #endif /* _LIBGETTEXT_H */ libpff-20120802/common/memory.h0000644000175000017500000000634212005152701013104 00000000000000/* * Memory functions * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _MEMORY_H ) #define _MEMORY_H #include "common.h" #if defined( MEMWATCH ) #include "memwatch.h" #endif #if defined( HAVE_GLIB_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STRING_H ) || defined( WINAPI ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* Memory allocation */ #if defined( HAVE_GLIB_H ) #define memory_allocate( size ) \ g_malloc( (gsize) size ) #elif defined( HAVE_MALLOC ) || ( defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) ) #define memory_allocate( size ) \ malloc( size ) #elif defined( WINAPI ) #define memory_allocate( size ) \ HeapAlloc( GetProcessHeap(), 0, (SIZE_T) size ) #endif #define memory_allocate_structure( type ) \ (type *) memory_allocate( sizeof( type ) ) #define memory_allocate_structure_as_value( type ) \ (intptr_t *) memory_allocate( sizeof( type ) ) /* Memory reallocation */ #if defined( HAVE_GLIB_H ) #define memory_reallocate( buffer, size ) \ g_realloc( (gpointer) buffer, (gsize) size ) #elif defined( HAVE_REALLOC ) || ( defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) ) #define memory_reallocate( buffer, size ) \ realloc( (void *) buffer, size ) #elif defined( WINAPI ) /* HeapReAlloc does not allocate empty (NULL) buffers as realloc does */ #define memory_reallocate( buffer, size ) \ ( buffer == NULL ) ? \ HeapAlloc( GetProcessHeap(), 0, (SIZE_T) size ) : \ HeapReAlloc( GetProcessHeap(), 0, (LPVOID) buffer, (SIZE_T) size ) #endif /* Memory free */ #if defined( HAVE_GLIB_H ) #define memory_free( buffer ) \ g_free( (gpointer) buffer ) #elif defined( HAVE_FREE ) || ( defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) ) #define memory_free( buffer ) \ free( (void *) buffer ) #elif defined( WINAPI ) #define memory_free( buffer ) \ HeapFree( GetProcessHeap(), 0, (LPVOID) buffer ) #endif /* Memory compare */ #if defined( HAVE_MEMCMP ) || defined( WINAPI ) #define memory_compare( buffer1, buffer2, size ) \ memcmp( (const void *) buffer1, (const void *) buffer2, size ) #endif /* Memory copy */ #if defined( HAVE_MEMCPY ) || defined( WINAPI ) #define memory_copy( destination, source, count ) \ memcpy( (void *) destination, (void *) source, count ) #endif /* Memory set */ #if defined( HAVE_MEMSET ) || defined( WINAPI ) #define memory_set( buffer, value, count ) \ memset( (void *) buffer, (int) value, count ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/common/config.h0000664000175000017500000004063612006536127013060 00000000000000/* common/config.h. Generated from config.h.in by configure. */ /* common/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #define ENABLE_NLS 1 /* Define to 1 if you have the `bindtextdomain' function. */ #define HAVE_BINDTEXTDOMAIN 1 /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ /* #undef HAVE_CFLOCALECOPYCURRENT */ /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ /* Define to 1 if you have the `chdir' function. */ #define HAVE_CHDIR 1 /* Define to 1 if you have the `close' function. */ #define HAVE_CLOSE 1 /* Define to 1 if you have the `ctime' function. */ /* #undef HAVE_CTIME */ /* Define to 1 if you have the ctime_r function. */ #define HAVE_CTIME_R 1 /* Define to 1 if you have the ctime_r function with a third size argument. */ /* #undef HAVE_CTIME_R_SIZE */ /* Define if the GNU dcgettext() function is already present or preinstalled. */ #define HAVE_DCGETTEXT 1 /* Define to 1 if debug output should be used. */ #define HAVE_DEBUG_OUTPUT 1 /* Define to 1 if you have the declaration of `memrchr', and to 0 if you don't. */ #define HAVE_DECL_MEMRCHR 0 /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #define HAVE_DECL_STRERROR_R 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to 1 if you have the `fclose' function. */ #define HAVE_FCLOSE 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `feof' function. */ #define HAVE_FEOF 1 /* Define to 1 if you have the `fgets' function. */ #define HAVE_FGETS 1 /* Define to 1 if you have the `fgetws' function. */ /* #undef HAVE_FGETWS */ /* Define to 1 if you have the `fopen' function. */ #define HAVE_FOPEN 1 /* Define to 1 if you have the `fread' function. */ #define HAVE_FREAD 1 /* Define to 1 if you have the `free' function. */ #define HAVE_FREE 1 /* Define to 1 if you have the `fseeko' function. */ #define HAVE_FSEEKO 1 /* Define to 1 if you have the `fseeko64' function. */ #define HAVE_FSEEKO64 1 /* Define to 1 if you have the `fstat' function. */ #define HAVE_FSTAT 1 /* Define to 1 if you have the `ftello' function. */ #define HAVE_FTELLO 1 /* Define to 1 if you have the `ftello64' function. */ #define HAVE_FTELLO64 1 /* Define to 1 if you have the `ftruncate' function. */ #define HAVE_FTRUNCATE 1 /* Define to 1 if you have the `fwrite' function. */ #define HAVE_FWRITE 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the `getenv' function. */ #define HAVE_GETENV 1 /* Define to 1 if you have the `getopt' function. */ #define HAVE_GETOPT 1 /* Define if the GNU gettext() function is already present or preinstalled. */ #define HAVE_GETTEXT 1 /* Define to 1 if you have the header file. */ #define HAVE_GLOB_H 1 /* Define to 1 if you have the `gmtime' function. */ #define HAVE_GMTIME 1 /* Define to 1 if you have the `gmtime_r' function. */ #define HAVE_GMTIME_R 1 /* Define if you have the iconv() function and it works. */ /* #undef HAVE_ICONV */ /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_IO_H */ /* Define to 1 if Java bindings should be used. */ /* #undef HAVE_JAVA */ /* Define if nl_langinfo has CODESET support. */ #define HAVE_LANGINFO_CODESET 1 /* Define to 1 if you have the header file. */ #define HAVE_LANGINFO_H 1 /* Define to 1 if you have the `bfio' library (-lbfio). */ /* #undef HAVE_LIBBFIO */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBBFIO_H */ /* Define to 1 if you have the `cerror' library (-lcerror). */ /* #undef HAVE_LIBCERROR */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCERROR_H */ /* Define to 1 if you have the `cfile' library (-lcfile). */ /* #undef HAVE_LIBCFILE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCFILE_H */ /* Define to 1 if you have the `clocale' library (-lclocale). */ /* #undef HAVE_LIBCLOCALE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCLOCALE_H */ /* Define to 1 if you have the `cnotify' library (-lcnotify). */ /* #undef HAVE_LIBCNOTIFY */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCNOTIFY_H */ /* Define to 1 if you have the `cpath' library (-lcpath). */ /* #undef HAVE_LIBCPATH */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCPATH_H */ /* Define to 1 if you have the `csplit' library (-lcsplit). */ /* #undef HAVE_LIBCSPLIT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCSPLIT_H */ /* Define to 1 if you have the `cstring' library (-lcstring). */ /* #undef HAVE_LIBCSTRING */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCSTRING_H */ /* Define to 1 if you have the `csystem' library (-lcsystem). */ /* #undef HAVE_LIBCSYSTEM */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBCSYSTEM_H */ /* Define to 1 if you have the `fcache' library (-lfcache). */ /* #undef HAVE_LIBFCACHE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFCACHE_H */ /* Define to 1 if you have the `fdata' library (-lfdata). */ /* #undef HAVE_LIBFDATA */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFDATA_H */ /* Define to 1 if you have the `fdatetime' library (-lfdatetime). */ /* #undef HAVE_LIBFDATETIME */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFDATETIME_H */ /* Define to 1 if you have the `fguid' library (-lfguid). */ /* #undef HAVE_LIBFGUID */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFGUID_H */ /* Define to 1 if you have the `fmapi' library (-lfmapi). */ /* #undef HAVE_LIBFMAPI */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFMAPI_H */ /* Define to 1 if you have the `fvalue' library (-lfvalue). */ /* #undef HAVE_LIBFVALUE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFVALUE_H */ /* Define to 1 if you have the `fwnt' library (-lfwnt). */ /* #undef HAVE_LIBFWNT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBFWNT_H */ /* Define to 1 if you have the header file. */ #define HAVE_LIBINTL_H 1 /* Define to 1 if you have the `una' library (-luna). */ /* #undef HAVE_LIBUNA */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBUNA_H */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the `localeconv' function. */ #define HAVE_LOCALECONV 1 /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 /* Define to 1 if you have the `localtime' function. */ #define HAVE_LOCALTIME 1 /* Define to 1 if you have the `localtime_r' function. */ #define HAVE_LOCALTIME_R 1 /* Define to 1 if the local version of libbfio is used. */ #define HAVE_LOCAL_LIBBFIO 1 /* Define to 1 if the local version of libcerror is used. */ #define HAVE_LOCAL_LIBCERROR 1 /* Define to 1 if the local version of libcfile is used. */ #define HAVE_LOCAL_LIBCFILE 1 /* Define to 1 if the local version of libclocale is used. */ #define HAVE_LOCAL_LIBCLOCALE 1 /* Define to 1 if the local version of libcnotify is used. */ #define HAVE_LOCAL_LIBCNOTIFY 1 /* Define to 1 if the local version of libcpath is used. */ #define HAVE_LOCAL_LIBCPATH 1 /* Define to 1 if the local version of libcsplit is used. */ #define HAVE_LOCAL_LIBCSPLIT 1 /* Define to 1 if the local version of libcstring is used. */ #define HAVE_LOCAL_LIBCSTRING 1 /* Define to 1 if the local version of libcsystem is used. */ #define HAVE_LOCAL_LIBCSYSTEM 1 /* Define to 1 if the local version of libfcache is used. */ #define HAVE_LOCAL_LIBFCACHE 1 /* Define to 1 if the local version of libfdata is used. */ #define HAVE_LOCAL_LIBFDATA 1 /* Define to 1 if the local version of libfdatetime is used. */ #define HAVE_LOCAL_LIBFDATETIME 1 /* Define to 1 if the local version of libfguid is used. */ #define HAVE_LOCAL_LIBFGUID 1 /* Define to 1 if the local version of libfmapi is used. */ #define HAVE_LOCAL_LIBFMAPI 1 /* Define to 1 if the local version of libfvalue is used. */ #define HAVE_LOCAL_LIBFVALUE 1 /* Define to 1 if the local version of libfwnt is used. */ #define HAVE_LOCAL_LIBFWNT 1 /* Define to 1 if the local version of libuna is used. */ #define HAVE_LOCAL_LIBUNA 1 /* Define to 1 if you have the `lseek' function. */ #define HAVE_LSEEK 1 /* Define to 1 if you have the `malloc' function. */ #define HAVE_MALLOC 1 /* Define to 1 if you have the `memchr' function. */ #define HAVE_MEMCHR 1 /* Define to 1 if you have the `memcmp' function. */ #define HAVE_MEMCMP 1 /* Define to 1 if you have the `memcpy' function. */ #define HAVE_MEMCPY 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memrchr' function. */ #define HAVE_MEMRCHR 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the mkdir function. */ #define HAVE_MKDIR 1 /* Define to 1 if you have the mkdir function with a second mode argument. */ #define HAVE_MKDIR_MODE 1 /* Define to 1 if you have the `mktime' function. */ #define HAVE_MKTIME 1 /* Define to 1 if you have the `nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 /* Define to 1 if you have the `open' function. */ #define HAVE_OPEN 1 /* Define to 1 whether printf supports the conversion specifier "%jd". */ #define HAVE_PRINTF_JD 1 /* Define to 1 whether printf supports the conversion specifier "%zd". */ #define HAVE_PRINTF_ZD 1 /* Define to 1 if you have Python */ /* #undef HAVE_PYTHON */ /* Define to 1 if you have the `read' function. */ #define HAVE_READ 1 /* Define to 1 if you have the `realloc' function. */ #define HAVE_REALLOC 1 /* Define to 1 if you have the `setlocale' function. */ #define HAVE_SETLOCALE 1 /* Define to 1 if you have the `setvbuf' function. */ #define HAVE_SETVBUF 1 /* Define to 1 if you have the header file. */ #define HAVE_SIGNAL_H 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `sscanf' function. */ #define HAVE_SSCANF 1 /* Define to 1 if you have the `stat' function. */ #define HAVE_STAT 1 /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strerror' function. */ /* #undef HAVE_STRERROR */ /* Define to 1 if you have the `strerror_r' function. */ #define HAVE_STRERROR_R 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlen' function. */ #define HAVE_STRLEN 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strncmp' function. */ #define HAVE_STRNCMP 1 /* Define to 1 if you have the `strncpy' function. */ #define HAVE_STRNCPY 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `swprintf' function. */ /* #undef HAVE_SWPRINTF */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_SIGNAL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SYSLIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `textdomain' function. */ #define HAVE_TEXTDOMAIN 1 /* Define to 1 if you have the `time' function. */ #define HAVE_TIME 1 /* Define to 1 if you have the `towlower' function. */ /* #undef HAVE_TOWLOWER */ /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_VARARGS_H */ /* Define to 1 if verbose output should be used. */ #define HAVE_VERBOSE_OUTPUT 1 /* Define to 1 if you have the `vfprintf' function. */ #define HAVE_VFPRINTF 1 /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if you have the header file. */ #define HAVE_WCHAR_H 1 /* Define to 1 if you have the `wcscasecmp' function. */ /* #undef HAVE_WCSCASECMP */ /* Define to 1 if you have the `wcschr' function. */ /* #undef HAVE_WCSCHR */ /* Define to 1 if you have the `wcslen' function. */ /* #undef HAVE_WCSLEN */ /* Define to 1 if you have the `wcsncasecmp' function. */ /* #undef HAVE_WCSNCASECMP */ /* Define to 1 if you have the `wcsncmp' function. */ /* #undef HAVE_WCSNCMP */ /* Define to 1 if you have the `wcsncpy' function. */ /* #undef HAVE_WCSNCPY */ /* Define to 1 if you have the `wcsrchr' function. */ /* #undef HAVE_WCSRCHR */ /* Define to 1 if you have the `wcsstr' function. */ /* #undef HAVE_WCSSTR */ /* Define to 1 if you have the `wcstombs' function. */ /* #undef HAVE_WCSTOMBS */ /* Define to 1 if you have the header file. */ #define HAVE_WCTYPE_H 1 /* Define to 1 if wide character type should be used. */ /* #undef HAVE_WIDE_CHARACTER_TYPE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ /* Define to 1 if you have the `wmemchr' function. */ /* #undef HAVE_WMEMCHR */ /* Define to 1 if you have the `wmemcmp' function. */ /* #undef HAVE_WMEMCMP */ /* Define to 1 if you have the `wmemcpy' function. */ /* #undef HAVE_WMEMCPY */ /* Define to 1 if you have the `wmemrchr' function. */ /* #undef HAVE_WMEMRCHR */ /* Define to 1 if you have the `write' function. */ #define HAVE_WRITE 1 /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "libpff" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "joachim.metz@gmail.com" /* Define to the full name of this package. */ #define PACKAGE_NAME "libpff" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "libpff 20120802" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libpff" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "20120802" /* The size of `off_t', as computed by sizeof. */ #define SIZEOF_OFF_T 8 /* The size of `size_t', as computed by sizeof. */ #define SIZEOF_SIZE_T 8 /* The size of `wchar_t', as computed by sizeof. */ /* #undef SIZEOF_WCHAR_T */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ /* #undef STRERROR_R_CHAR_P */ /* Define to 1 if you can safely include both and . */ #define TIME_WITH_SYS_TIME 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "20120802" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `int' if does not define. */ /* #undef mode_t */ /* Define to `long int' if does not define. */ /* #undef off_t */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ /* #undef volatile */ libpff-20120802/common/memwatch.h0000644000175000017500000007620612005152701013407 00000000000000/* ** MEMWATCH.H ** Nonintrusive ANSI C memory leak / overwrite detection ** Copyright (C) 1992-2002 Johan Lindh ** All rights reserved. ** Version 2.71 ** ************************************************************************ ** ** PURPOSE: ** ** MEMWATCH has been written to allow guys and gals that like to ** program in C a public-domain memory error control product. ** I hope you'll find it's as advanced as most commercial packages. ** The idea is that you use it during the development phase and ** then remove the MEMWATCH define to produce your final product. ** MEMWATCH is distributed in source code form in order to allow ** you to compile it for your platform with your own compiler. ** It's aim is to be 100% ANSI C, but some compilers are more stingy ** than others. If it doesn't compile without warnings, please mail ** me the configuration of operating system and compiler you are using ** along with a description of how to modify the source, and the version ** number of MEMWATCH that you are using. ** ************************************************************************ This file is part of MEMWATCH. MEMWATCH is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. MEMWATCH is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with MEMWATCH; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ************************************************************************ ** ** REVISION HISTORY: ** ** 920810 JLI [1.00] ** 920830 JLI [1.10 double-free detection] ** 920912 JLI [1.15 mwPuts, mwGrab/Drop, mwLimit] ** 921022 JLI [1.20 ASSERT and VERIFY] ** 921105 JLI [1.30 C++ support and TRACE] ** 921116 JLI [1.40 mwSetOutFunc] ** 930215 JLI [1.50 modified ASSERT/VERIFY] ** 930327 JLI [1.51 better auto-init & PC-lint support] ** 930506 JLI [1.55 MemWatch class, improved C++ support] ** 930507 JLI [1.60 mwTest & CHECK()] ** 930809 JLI [1.65 Abort/Retry/Ignore] ** 930820 JLI [1.70 data dump when unfreed] ** 931016 JLI [1.72 modified C++ new/delete handling] ** 931108 JLI [1.77 mwSetAssertAction() & some small changes] ** 940110 JLI [1.80 no-mans-land alloc/checking] ** 940328 JLI [2.00 version 2.0 rewrite] ** Improved NML (no-mans-land) support. ** Improved performance (especially for free()ing!). ** Support for 'read-only' buffers (checksums) ** ^^ NOTE: I never did this... maybe I should? ** FBI (free'd block info) tagged before freed blocks ** Exporting of the mwCounter variable ** mwBreakOut() localizes debugger support ** Allocation statistics (global, per-module, per-line) ** Self-repair ability with relinking ** 950913 JLI [2.10 improved garbage handling] ** 951201 JLI [2.11 improved auto-free in emergencies] ** 960125 JLI [X.01 implemented auto-checking using mwAutoCheck()] ** 960514 JLI [2.12 undefining of existing macros] ** 960515 JLI [2.13 possibility to use default new() & delete()] ** 960516 JLI [2.20 suppression of file flushing on unfreed msgs] ** 960516 JLI [2.21 better support for using MEMWATCH with DLL's] ** 960710 JLI [X.02 multiple logs and mwFlushNow()] ** 960801 JLI [2.22 merged X.01 version with current] ** 960805 JLI [2.30 mwIsXXXXAddr() to avoid unneeded GP's] ** 960805 JLI [2.31 merged X.02 version with current] ** 961002 JLI [2.32 support for realloc() + fixed STDERR bug] ** 961222 JLI [2.40 added mwMark() & mwUnmark()] ** 970101 JLI [2.41 added over/underflow checking after failed ASSERT/VERIFY] ** 970113 JLI [2.42 added support for PC-Lint 7.00g] ** 970207 JLI [2.43 added support for strdup()] ** 970209 JLI [2.44 changed default filename to lowercase] ** 970405 JLI [2.45 fixed bug related with atexit() and some C++ compilers] ** 970723 JLI [2.46 added MW_ARI_NULLREAD flag] ** 970813 JLI [2.47 stabilized marker handling] ** 980317 JLI [2.48 ripped out C++ support; wasn't working good anyway] ** 980318 JLI [2.50 improved self-repair facilities & SIGSEGV support] ** 980417 JLI [2.51 more checks for invalid addresses] ** 980512 JLI [2.52 moved MW_ARI_NULLREAD to occur before aborting] ** 990112 JLI [2.53 added check for empty heap to mwIsOwned] ** 990217 JLI [2.55 improved the emergency repairs diagnostics and NML] ** 990224 JLI [2.56 changed ordering of members in structures] ** 990303 JLI [2.57 first maybe-fixit-for-hpux test] ** 990516 JLI [2.58 added 'static' to the definition of mwAutoInit] ** 990517 JLI [2.59 fixed some high-sensitivity warnings] ** 990610 JLI [2.60 fixed some more high-sensitivity warnings] ** 990715 JLI [2.61 changed TRACE/ASSERT/VERIFY macro names] ** 991001 JLI [2.62 added CHECK_BUFFER() and mwTestBuffer()] ** 991007 JLI [2.63 first shot at a 64-bit compatible version] ** 991009 JLI [2.64 undef's strdup() if defined, mwStrdup made const] ** 000704 JLI [2.65 added some more detection for 64-bits] ** 010502 JLI [2.66 incorporated some user fixes] ** [mwRelink() could print out garbage pointer (thanks mac@phobos.ca)] ** [added array destructor for C++ (thanks rdasilva@connecttel.com)] ** [added mutex support (thanks rdasilva@connecttel.com)] ** 010531 JLI [2.67 fix: mwMutexXXX() was declared even if MW_HAVE_MUTEX was not defined] ** 010619 JLI [2.68 fix: mwRealloc() could leave the mutex locked] ** 020918 JLI [2.69 changed to GPL, added C++ array allocation by Howard Cohen] ** 030212 JLI [2.70 mwMalloc() bug for very large allocations (4GB on 32bits)] ** 030520 JLI [2.71 added ULONG_LONG_MAX as a 64-bit detector (thanks Sami Salonen)] ** ** To use, simply include 'MEMWATCH.H' as a header file, ** and add MEMWATCH.C to your list of files, and define the macro ** 'MEMWATCH'. If this is not defined, MEMWATCH will disable itself. ** ** To call the standard C malloc / realloc / calloc / free; use mwMalloc_(), ** mwCalloc_() and mwFree_(). Note that mwFree_() will correctly ** free both malloc()'d memory as well as mwMalloc()'d. ** ** 980317: C++ support has been disabled. ** The code remains, but is not compiled. ** ** For use with C++, which allows use of inlining in header files ** and class specific new/delete, you must also define 'new' as ** 'mwNew' and 'delete' as 'mwDelete'. Do this *after* you include ** C++ header files from libraries, otherwise you can mess up their ** class definitions. If you don't define these, the C++ allocations ** will not have source file and line number information. Also note, ** most C++ class libraries implement their own C++ memory management, ** and don't allow anyone to override them. MFC belongs to this crew. ** In these cases, the only thing to do is to use MEMWATCH_NOCPP. ** ** You can capture output from MEMWATCH using mwSetOutFunc(). ** Just give it the adress of a "void myOutFunc(int c)" function, ** and all characters to be output will be redirected there. ** ** A failing ASSERT() or VERIFY() will normally always abort your ** program. This can be changed using mwSetAriFunc(). Give it a ** pointer to a "int myAriFunc(const char *)" function. Your function ** must ask the user whether to Abort, Retry or Ignore the trap. ** Return 2 to Abort, 1 to Retry or 0 to Ignore. Beware retry; it ** causes the expression to be evaluated again! MEMWATCH has a ** default ARI handler. It's disabled by default, but you can enable ** it by calling 'mwDefaultAri()'. Note that this will STILL abort ** your program unless you define MEMWATCH_STDIO to allow MEMWATCH ** to use the standard C I/O streams. Also, setting the ARI function ** will cause MEMWATCH *NOT* to write the ARI error to stderr. The ** error string is passed to the ARI function instead, as the ** 'const char *' parameter. ** ** You can disable MEMWATCH's ASSERT/VERIFY and/or TRACE implementations. ** This can be useful if you're using a debug terminal or smart debugger. ** Disable them by defining MW_NOASSERT, MW_NOVERIFY or MW_NOTRACE. ** ** MEMWATCH fills all allocated memory with the byte 0xFE, so if ** you're looking at erroneous data which are all 0xFE:s, the ** data probably was not initialized by you. The exception is ** calloc(), which will fill with zero's. All freed buffers are ** zapped with 0xFD. If this is what you look at, you're using ** data that has been freed. If this is the case, be aware that ** MEMWATCH places a 'free'd block info' structure immediately ** before the freed data. This block contains info about where ** the block was freed. The information is in readable text, ** in the format "FBIfilename(line)", for example: ** "FBI<267>test.c(12)". Using FBI's slows down free(), so it's ** disabled by default. Use mwFreeBufferInfo(1) to enable it. ** ** To aid in tracking down wild pointer writes, MEMWATCH can perform ** no-mans-land allocations. No-mans-land will contain the byte 0xFC. ** MEMWATCH will, when this is enabled, convert recently free'd memory ** into NML allocations. ** ** MEMWATCH protects it's own data buffers with checksums. If you ** get an internal error, it means you're overwriting wildly, ** or using an uninitialized pointer. ** ************************************************************************ ** ** Note when compiling with Microsoft C: ** - MSC ignores fflush() by default. This is overridden, so that ** the disk log will always be current. ** ** This utility has been tested with: ** PC-lint 7.0k, passed as 100% ANSI C compatible ** Microsoft Visual C++ on Win16 and Win32 ** Microsoft C on DOS ** SAS C on an Amiga 500 ** Gnu C on a PC running Red Hat Linux ** ...and using an (to me) unknown compiler on an Atari machine. ** ************************************************************************ ** ** Format of error messages in MEMWATCH.LOG: ** message: filename(linenumber), information ** ** Errors caught by MemWatch, when they are detected, and any ** actions taken besides writing to the log file MEMWATCH.LOG: ** ** Double-freeing: ** A pointer that was recently freed and has not since been ** reused was freed again. The place where the previous free() ** was executed is displayed. ** Detect: delete or free() using the offending pointer. ** Action: The delete or free() is cancelled, execution continues. ** Underflow: ** You have written just ahead of the allocated memory. ** The size and place of the allocation is displayed. ** Detect: delete or free() of the damaged buffer. ** Action: The buffer is freed, but there may be secondary damage. ** Overflow: ** Like underflow, but you've written after the end of the buffer. ** Detect: see Underflow. ** Action: see Underflow. ** WILD free: ** An unrecognized pointer was passed to delete or free(). ** The pointer may have been returned from a library function; ** in that case, use mwFree_() to force free() of it. ** Also, this may be a double-free, but the previous free was ** too long ago, causing MEMWATCH to 'forget' it. ** Detect: delete or free() of the offending pointer. ** Action: The delete or free() is cancelled, execution continues. ** NULL free: ** It's unclear to me whether or not freeing of NULL pointers ** is legal in ANSI C, therefore a warning is written to the log file, ** but the error counter remains the same. This is legal using C++, ** so the warning does not appear with delete. ** Detect: When you free(NULL). ** Action: The free() is cancelled. ** Failed: ** A request to allocate memory failed. If the allocation is ** small, this may be due to memory depletion, but is more likely ** to be memory fragmentation problems. The amount of memory ** allocated so far is displayed also. ** Detect: When you new, malloc(), realloc() or calloc() memory. ** Action: NULL is returned. ** Realloc: ** A request to re-allocate a memory buffer failed for reasons ** other than out-of-memory. The specific reason is shown. ** Detect: When you realloc() ** Action: realloc() is cancelled, NULL is returned ** Limit fail: ** A request to allocate memory failed since it would violate ** the limit set using mwLimit(). mwLimit() is used to stress-test ** your code under simulated low memory conditions. ** Detect: At new, malloc(), realloc() or calloc(). ** Action: NULL is returned. ** Assert trap: ** An ASSERT() failed. The ASSERT() macro works like C's assert() ** macro/function, except that it's interactive. See your C manual. ** Detect: On the ASSERT(). ** Action: Program ends with an advisory message to stderr, OR ** Program writes the ASSERT to the log and continues, OR ** Program asks Abort/Retry/Ignore? and takes that action. ** Verify trap: ** A VERIFY() failed. The VERIFY() macro works like ASSERT(), ** but if MEMWATCH is not defined, it still evaluates the ** expression, but it does not act upon the result. ** Detect: On the VERIFY(). ** Action: Program ends with an advisory message to stderr, OR ** Program writes the VERIFY to the log and continues, OR ** Program asks Abort/Retry/Ignore? and takes that action. ** Wild pointer: ** A no-mans-land buffer has been written into. MEMWATCH can ** allocate and distribute chunks of memory solely for the ** purpose of trying to catch random writes into memory. ** Detect: Always on CHECK(), but can be detected in several places. ** Action: The error is logged, and if an ARI handler is installed, ** it is executed, otherwise, execution continues. ** Unfreed: ** A memory buffer you allocated has not been freed. ** You are informed where it was allocated, and whether any ** over or underflow has occured. MemWatch also displays up to ** 16 bytes of the data, as much as it can, in hex and text. ** Detect: When MemWatch terminates. ** Action: The buffer is freed. ** Check: ** An error was detected during a CHECK() operation. ** The associated pointer is displayed along with ** the file and line where the CHECK() was executed. ** Followed immediately by a normal error message. ** Detect: When you CHECK() ** Action: Depends on the error ** Relink: ** After a MEMWATCH internal control block has been trashed, ** MEMWATCH tries to repair the damage. If successful, program ** execution will continue instead of aborting. Some information ** about the block may be gone permanently, though. ** Detect: N/A ** Action: Relink successful: program continues. ** Relink fails: program aborts. ** Internal: ** An internal error is flagged by MEMWATCH when it's control ** structures have been damaged. You are likely using an uninitialized ** pointer somewhere in your program, or are zapping memory all over. ** The message may give you additional diagnostic information. ** If possible, MEMWATCH will recover and continue execution. ** Detect: Various actions. ** Action: Whatever is needed ** Mark: ** The program terminated without umarking all marked pointers. Marking ** can be used to track resources other than memory. mwMark(pointer,text,...) ** when the resource is allocated, and mwUnmark(pointer) when it's freed. ** The 'text' is displayed for still marked pointers when the program ** ends. ** Detect: When MemWatch terminates. ** Action: The error is logged. ** ** ************************************************************************ ** ** The author may be reached by e-mail at the address below. If you ** mail me about source code changes in MEMWATCH, remember to include ** MW's version number. ** ** Johan Lindh ** johan@linkdata.se ** ** The latest version of MEMWATCH may be downloaded from ** http://www.linkdata.se/ */ #ifndef __MEMWATCH_H #define __MEMWATCH_H /* Make sure that malloc(), realloc(), calloc() and free() are declared. */ /*lint -save -e537 */ #include /*lint -restore */ #ifdef __cplusplus extern "C" { #endif /* ** Constants used ** All MEMWATCH constants start with the prefix MW_, followed by ** a short mnemonic which indicates where the constant is used, ** followed by a descriptive text about it. */ #define MW_ARI_NULLREAD 0x10 /* Null read (to start debugger) */ #define MW_ARI_ABORT 0x04 /* ARI handler says: abort program! */ #define MW_ARI_RETRY 0x02 /* ARI handler says: retry action! */ #define MW_ARI_IGNORE 0x01 /* ARI handler says: ignore error! */ #define MW_VAL_NEW 0xFE /* value in newly allocated memory */ #define MW_VAL_DEL 0xFD /* value in newly deleted memory */ #define MW_VAL_NML 0xFC /* value in no-mans-land */ #define MW_VAL_GRB 0xFB /* value in grabbed memory */ #define MW_TEST_ALL 0xFFFF /* perform all tests */ #define MW_TEST_CHAIN 0x0001 /* walk the heap chain */ #define MW_TEST_ALLOC 0x0002 /* test allocations & NML guards */ #define MW_TEST_NML 0x0004 /* test all-NML areas for modifications */ #define MW_NML_NONE 0 /* no NML */ #define MW_NML_FREE 1 /* turn FREE'd memory into NML */ #define MW_NML_ALL 2 /* all unused memory is NML */ #define MW_NML_DEFAULT 0 /* the default NML setting */ #define MW_STAT_GLOBAL 0 /* only global statistics collected */ #define MW_STAT_MODULE 1 /* collect statistics on a module basis */ #define MW_STAT_LINE 2 /* collect statistics on a line basis */ #define MW_STAT_DEFAULT 0 /* the default statistics setting */ /* ** MemWatch internal constants ** You may change these and recompile MemWatch to change the limits ** of some parameters. Respect the recommended minimums! */ #define MW_TRACE_BUFFER 2048 /* (min 160) size of TRACE()'s output buffer */ #define MW_FREE_LIST 64 /* (min 4) number of free()'s to track */ /* ** Exported variables ** In case you have to remove the 'const' keyword because your compiler ** doesn't support it, be aware that changing the values may cause ** unpredictable behaviour. ** - mwCounter contains the current action count. You can use this to ** place breakpoints using a debugger, if you want. */ #ifndef __MEMWATCH_C extern const unsigned long mwCounter; #endif /* ** System functions ** Normally, it is not nessecary to call any of these. MEMWATCH will ** automatically initialize itself on the first MEMWATCH function call, ** and set up a call to mwAbort() using atexit(). Some C++ implementations ** run the atexit() chain before the program has terminated, so you ** may have to use mwInit() or the MemWatch C++ class to get good ** behaviour. ** - mwInit() can be called to disable the atexit() usage. If mwInit() ** is called directly, you must call mwTerm() to end MemWatch, or ** mwAbort(). ** - mwTerm() is usually not nessecary to call; but if called, it will ** call mwAbort() if it finds that it is cancelling the 'topmost' ** mwInit() call. ** - mwAbort() cleans up after MEMWATCH, reports unfreed buffers, etc. */ void mwInit( void ); void mwTerm( void ); void mwAbort( void ); /* ** Setup functions ** These functions control the operation of MEMWATCH's protective features. ** - mwFlushNow() causes MEMWATCH to flush it's buffers. ** - mwDoFlush() controls whether MEMWATCH flushes the disk buffers after ** writes. The default is smart flushing: MEMWATCH will not flush buffers ** explicitly until memory errors are detected. Then, all writes are ** flushed until program end or mwDoFlush(0) is called. ** - mwLimit() sets the allocation limit, an arbitrary limit on how much ** memory your program may allocate in bytes. Used to stress-test app. ** Also, in virtual-memory or multitasking environs, puts a limit on ** how much MW_NML_ALL can eat up. ** - mwGrab() grabs up X kilobytes of memory. Allocates actual memory, ** can be used to stress test app & OS both. ** - mwDrop() drops X kilobytes of grabbed memory. ** - mwNoMansLand() sets the behaviour of the NML logic. See the ** MW_NML_xxx for more information. The default is MW_NML_DEFAULT. ** - mwStatistics() sets the behaviour of the statistics collector. See ** the MW_STAT_xxx defines for more information. Default MW_STAT_DEFAULT. ** - mwFreeBufferInfo() enables or disables the tagging of free'd buffers ** with freeing information. This information is written in text form, ** using sprintf(), so it's pretty slow. Disabled by default. ** - mwAutoCheck() performs a CHECK() operation whenever a MemWatch function ** is used. Slows down performance, of course. ** - mwCalcCheck() calculates checksums for all data buffers. Slow! ** - mwDumpCheck() logs buffers where stored & calc'd checksums differ. Slow!! ** - mwMark() sets a generic marker. Returns the pointer given. ** - mwUnmark() removes a generic marker. If, at the end of execution, some ** markers are still in existence, these will be reported as leakage. ** returns the pointer given. */ void mwFlushNow( void ); void mwDoFlush( int onoff ); void mwLimit( long bytes ); unsigned mwGrab( unsigned kilobytes ); unsigned mwDrop( unsigned kilobytes ); void mwNoMansLand( int mw_nml_level ); void mwStatistics( int level ); void mwFreeBufferInfo( int onoff ); void mwAutoCheck( int onoff ); void mwCalcCheck( void ); void mwDumpCheck( void ); void * mwMark( void *p, const char *description, const char *file, unsigned line ); void * mwUnmark( void *p, const char *file, unsigned line ); /* ** Testing/verification/tracing ** All of these macros except VERIFY() evaluates to a null statement ** if MEMWATCH is not defined during compilation. ** - mwIsReadAddr() checks a memory area for read privilige. ** - mwIsSafeAddr() checks a memory area for both read & write privilige. ** This function and mwIsReadAddr() is highly system-specific and ** may not be implemented. If this is the case, they will default ** to returning nonzero for any non-NULL pointer. ** - CHECK() does a complete memory integrity test. Slow! ** - CHECK_THIS() checks only selected components. ** - CHECK_BUFFER() checks the indicated buffer for errors. ** - mwASSERT() or ASSERT() If the expression evaluates to nonzero, execution continues. ** Otherwise, the ARI handler is called, if present. If not present, ** the default ARI action is taken (set with mwSetAriAction()). ** ASSERT() can be disabled by defining MW_NOASSERT. ** - mwVERIFY() or VERIFY() works just like ASSERT(), but when compiling without ** MEMWATCH the macro evaluates to the expression. ** VERIFY() can be disabled by defining MW_NOVERIFY. ** - mwTRACE() or TRACE() writes some text and data to the log. Use like printf(). ** TRACE() can be disabled by defining MW_NOTRACE. */ int mwIsReadAddr( const void *p, unsigned len ); int mwIsSafeAddr( void *p, unsigned len ); int mwTest( const char *file, int line, int mw_test_flags ); int mwTestBuffer( const char *file, int line, void *p ); int mwAssert( int, const char*, const char*, int ); int mwVerify( int, const char*, const char*, int ); /* ** User I/O functions ** - mwTrace() works like printf(), but dumps output either to the ** function specified with mwSetOutFunc(), or the log file. ** - mwPuts() works like puts(), dumps output like mwTrace(). ** - mwSetOutFunc() allows you to give the adress of a function ** where all user output will go. (exeption: see mwSetAriFunc) ** Specifying NULL will direct output to the log file. ** - mwSetAriFunc() gives MEMWATCH the adress of a function to call ** when an 'Abort, Retry, Ignore' question is called for. The ** actual error message is NOT printed when you've set this adress, ** but instead it is passed as an argument. If you call with NULL ** for an argument, the ARI handler is disabled again. When the ** handler is disabled, MEMWATCH will automatically take the ** action specified by mwSetAriAction(). ** - mwSetAriAction() sets the default ARI return value MEMWATCH should ** use if no ARI handler is specified. Defaults to MW_ARI_ABORT. ** - mwAriHandler() is an ANSI ARI handler you can use if you like. It ** dumps output to stderr, and expects input from stdin. ** - mwBreakOut() is called in certain cases when MEMWATCH feels it would ** be nice to break into a debugger. If you feel like MEMWATCH, place ** an execution breakpoint on this function. */ void mwTrace( const char* format_string, ... ); void mwPuts( const char* text ); void mwSetOutFunc( void (*func)(int) ); void mwSetAriFunc( int (*func)(const char*) ); void mwSetAriAction( int mw_ari_value ); int mwAriHandler( const char* cause ); void mwBreakOut( const char* cause ); /* ** Allocation/deallocation functions ** These functions are the ones actually to perform allocations ** when running MEMWATCH, for both C and C++ calls. ** - mwMalloc() debugging allocator ** - mwMalloc_() always resolves to a clean call of malloc() ** - mwRealloc() debugging re-allocator ** - mwRealloc_() always resolves to a clean call of realloc() ** - mwCalloc() debugging allocator, fills with zeros ** - mwCalloc_() always resolves to a clean call of calloc() ** - mwFree() debugging free. Can only free memory which has ** been allocated by MEMWATCH. ** - mwFree_() resolves to a) normal free() or b) debugging free. ** Can free memory allocated by MEMWATCH and malloc() both. ** Does not generate any runtime errors. */ void* mwMalloc( size_t, const char*, int ); void* mwMalloc_( size_t ); void* mwRealloc( void *, size_t, const char*, int ); void* mwRealloc_( void *, size_t ); void* mwCalloc( size_t, size_t, const char*, int ); void* mwCalloc_( size_t, size_t ); void mwFree( void*, const char*, int ); void mwFree_( void* ); #ifdef MWSTRDUP char* mwStrdup( const char *, const char*, int ); #endif /* ** Enable/disable precompiler block ** This block of defines and if(n)defs make sure that references ** to MEMWATCH is completely removed from the code if the MEMWATCH ** manifest constant is not defined. */ #ifndef __MEMWATCH_C #ifdef MEMWATCH #define mwASSERT(exp) while(mwAssert((int)(exp),#exp,__FILE__,__LINE__)) #ifndef MW_NOASSERT #ifndef ASSERT #define ASSERT mwASSERT #endif /* !ASSERT */ #endif /* !MW_NOASSERT */ #define mwVERIFY(exp) while(mwVerify((int)(exp),#exp,__FILE__,__LINE__)) #ifndef MW_NOVERIFY #ifndef VERIFY #define VERIFY mwVERIFY #endif /* !VERIFY */ #endif /* !MW_NOVERIFY */ #define mwTRACE mwTrace #ifndef MW_NOTRACE #ifndef TRACE #define TRACE mwTRACE #endif /* !TRACE */ #endif /* !MW_NOTRACE */ /* some compilers use a define and not a function */ /* for strdup(). */ #ifdef strdup #undef strdup #endif #define malloc(n) mwMalloc(n,__FILE__,__LINE__) #ifdef MWSTRDUP #define strdup(p) mwStrdup(p,__FILE__,__LINE__) #endif #define realloc(p,n) mwRealloc(p,n,__FILE__,__LINE__) #define calloc(n,m) mwCalloc(n,m,__FILE__,__LINE__) #define free(p) mwFree(p,__FILE__,__LINE__) #define CHECK() mwTest(__FILE__,__LINE__,MW_TEST_ALL) #define CHECK_THIS(n) mwTest(__FILE__,__LINE__,n) #define CHECK_BUFFER(b) mwTestBuffer(__FILE__,__LINE__,b) #define MARK(p) mwMark(p,#p,__FILE__,__LINE__) #define UNMARK(p) mwUnmark(p,__FILE__,__LINE__) #else /* MEMWATCH */ #define mwASSERT(exp) #ifndef MW_NOASSERT #ifndef ASSERT #define ASSERT mwASSERT #endif /* !ASSERT */ #endif /* !MW_NOASSERT */ #define mwVERIFY(exp) exp #ifndef MW_NOVERIFY #ifndef VERIFY #define VERIFY mwVERIFY #endif /* !VERIFY */ #endif /* !MW_NOVERIFY */ /*lint -esym(773,mwTRACE) */ #define mwTRACE /*lint -save -e506 */ 1?(void)0:mwDummyTraceFunction /*lint -restore */ #ifndef MW_NOTRACE #ifndef TRACE /*lint -esym(773,TRACE) */ #define TRACE mwTRACE #endif /* !TRACE */ #endif /* !MW_NOTRACE */ extern void mwDummyTraceFunction(const char *,...); /*lint -save -e652 */ #define mwDoFlush(n) #define mwPuts(s) #define mwInit() #define mwGrab(n) #define mwDrop(n) #define mwLimit(n) #define mwTest(f,l) #define mwSetOutFunc(f) #define mwSetAriFunc(f) #define mwDefaultAri() #define mwNomansland() #define mwStatistics(f) #define mwMark(p,t,f,n) (p) #define mwUnmark(p,f,n) (p) #define mwMalloc(n,f,l) malloc(n) #ifdef MWSTRDUP #define mwStrdup(p,f,l) strdup(p) #endif #define mwRealloc(p,n,f,l) realloc(p,n) #define mwCalloc(n,m,f,l) calloc(n,m) #define mwFree(p) free(p) #define mwMalloc_(n) malloc(n) #define mwRealloc_(p,n) realloc(p,n) #define mwCalloc_(n,m) calloc(n,m) #define mwFree_(p) free(p) #define mwAssert(e,es,f,l) #define mwVerify(e,es,f,l) (e) #define mwTrace mwDummyTrace #define mwTestBuffer(f,l,b) (0) #define CHECK() #define CHECK_THIS(n) #define CHECK_BUFFER(b) #define MARK(p) (p) #define UNMARK(p) (p) /*lint -restore */ #endif /* MEMWATCH */ #endif /* !__MEMWATCH_C */ #ifdef __cplusplus } #endif #if 0 /* 980317: disabled C++ */ /* ** C++ support section ** Implements the C++ support. Please note that in order to avoid ** messing up library classes, C++ support is disabled by default. ** You must NOT enable it until AFTER the inclusion of all header ** files belonging to code that are not compiled with MEMWATCH, and ** possibly for some that are! The reason for this is that a C++ ** class may implement it's own new() function, and the preprocessor ** would substitute this crucial declaration for MEMWATCH new(). ** You can forcibly deny C++ support by defining MEMWATCH_NOCPP. ** To enble C++ support, you must be compiling C++, MEMWATCH must ** be defined, MEMWATCH_NOCPP must not be defined, and finally, ** you must define 'new' to be 'mwNew', and 'delete' to be 'mwDelete'. ** Unlike C, C++ code can begin executing *way* before main(), for ** example if a global variable is created. For this reason, you can ** declare a global variable of the class 'MemWatch'. If this is ** is the first variable created, it will then check ALL C++ allocations ** and deallocations. Unfortunately, this evaluation order is not ** guaranteed by C++, though the compilers I've tried evaluates them ** in the order encountered. */ #ifdef __cplusplus #ifndef __MEMWATCH_C #ifdef MEMWATCH #ifndef MEMWATCH_NOCPP extern int mwNCur; extern const char *mwNFile; extern int mwNLine; class MemWatch { public: MemWatch(); ~MemWatch(); }; void * operator new(size_t); void * operator new(size_t,const char *,int); void * operator new[] (size_t,const char *,int); // hjc 07/16/02 void operator delete(void *); #define mwNew new(__FILE__,__LINE__) #define mwDelete (mwNCur=1,mwNFile=__FILE__,mwNLine=__LINE__),delete #endif /* MEMWATCH_NOCPP */ #endif /* MEMWATCH */ #endif /* !__MEMWATCH_C */ #endif /* __cplusplus */ #endif /* 980317: disabled C++ */ #endif /* __MEMWATCH_H */ /* EOF MEMWATCH.H */ libpff-20120802/common/Makefile.in0000664000175000017500000006121712006536015013501 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(srcdir)/types.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = types.h CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmemwatch_la_LIBADD = am__libmemwatch_la_SOURCES_DIST = memwatch.c memwatch.h @HAVE_MEMWATCH_TRUE@am_libmemwatch_la_OBJECTS = memwatch.lo libmemwatch_la_OBJECTS = $(am_libmemwatch_la_OBJECTS) @HAVE_MEMWATCH_TRUE@am_libmemwatch_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libmemwatch_la_SOURCES) DIST_SOURCES = $(am__libmemwatch_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/include EXTRA_DIST = \ byte_stream.h \ common.h \ config.h \ config_borlandc.h \ config_msc.h \ file_stream.h \ gettext.h \ memory.h \ types.h \ types.h.in @HAVE_MEMWATCH_TRUE@noinst_LTLIBRARIES = libmemwatch.la @HAVE_MEMWATCH_TRUE@libmemwatch_la_SOURCES = \ @HAVE_MEMWATCH_TRUE@ memwatch.c memwatch.h MAINTAINERCLEANFILES = \ Makefile.in all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status common/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 types.h: $(top_builddir)/config.status $(srcdir)/types.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmemwatch.la: $(libmemwatch_la_OBJECTS) $(libmemwatch_la_DEPENDENCIES) $(LINK) $(am_libmemwatch_la_rpath) $(libmemwatch_la_OBJECTS) $(libmemwatch_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memwatch.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) config.h installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am distclean: clean /bin/rm -f config.h /bin/rm -f types.h /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/common/file_stream.h0000644000175000017500000000725712005152701014074 00000000000000/* * FILE stream functions * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _FILE_STREAM_H ) #define _FILE_STREAM_H #include "common.h" #if defined( HAVE_GLIB_H ) #include #include #endif #include #if defined( __cplusplus ) extern "C" { #endif #define FILE_STREAM_OPEN_APPEND "a" #define FILE_STREAM_OPEN_READ "r" #define FILE_STREAM_OPEN_WRITE "w" #if defined( WINAPI ) #define FILE_STREAM_BINARY_OPEN_APPEND "ab" #define FILE_STREAM_BINARY_OPEN_READ "rb" #define FILE_STREAM_BINARY_OPEN_WRITE "wb" #else #define FILE_STREAM_BINARY_OPEN_APPEND "a" #define FILE_STREAM_BINARY_OPEN_READ "r" #define FILE_STREAM_BINARY_OPEN_WRITE "w" #endif /* narrow character FILE stream open */ #if defined( HAVE_GLIB_H ) #define file_stream_open( filename, mode ) \ g_fopen( filename, mode ) #elif defined( HAVE_FOPEN ) || defined( WINAPI ) #define file_stream_open( filename, mode ) \ fopen( filename, mode ) #endif /* wide character FILE stream open */ #if defined( WINAPI ) #define file_stream_open_wide( filename, mode ) \ _wfopen( filename, mode ) #endif /* FILE stream close */ #if defined( HAVE_FCLOSE ) || defined( WINAPI ) #define file_stream_close( stream ) \ fclose( stream ) #endif /* FILE stream read */ #if defined( HAVE_FREAD ) || defined( WINAPI ) #define file_stream_read( stream, data, size ) \ fread( data, 1, size, stream ) #endif /* FILE stream write */ #if defined( HAVE_FWRITE ) || defined( WINAPI ) #define file_stream_write( stream, data, size ) \ fwrite( data, 1, size, stream ) #endif /* FILE stream seek */ #if defined( WINAPI ) #define file_stream_seek_offset( stream, offset, whence ) \ fseek( stream, offset, whence ) #elif defined( HAVE_FSEEKO ) #define file_stream_seek_offset( stream, offset, whence ) \ fseeko( stream, offset, whence ) #elif defined( HAVE_FSEEKO64 ) #define file_stream_seek_offset( stream, offset, whence ) \ fseeko64( stream, offset, whence ) #endif /* End of FILE stream */ #if defined( HAVE_FEOF ) || defined( WINAPI ) #define file_stream_at_end( stream ) \ feof( stream ) #endif /* Get narrow character string from FILE stream */ #if defined( HAVE_FGETS ) || defined( WINAPI ) #define file_stream_get_string( stream, string, size ) \ fgets( string, size, stream ) #endif /* Get wide characters string from FILE stream */ #if defined( HAVE_FGETWS ) || defined( WINAPI ) #define file_stream_get_string_wide( stream, string, size ) \ fgetws( string, size, stream ) #endif /* Variable arguments formatted print to stream function */ #if defined( HAVE_GLIB_H ) #define file_stream_vfprintf( stream, format, ... ) \ g_vfprintf( stream, format, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define file_stream_vfprintf \ vfprintf #elif defined( HAVE_VFPRINTF ) || defined( WINAPI ) #define file_stream_vfprintf( stream, format, ... ) \ vfprintf( stream, format, __VA_ARGS__ ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/common/config_borlandc.h0000644000175000017500000000260412005152701014702 00000000000000/* * Configuration file for Borland/CodeGear C++ Builder compiler * * Copyright (c) 2006-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _CONFIG_BORLANDC_H ) #define _CONFIG_BORLANDC_H /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "joachim.metz@gmail.com" /* Define the size of the wide character for WINAPI */ #if !defined( SIZEOF_WCHAR_T ) #define SIZEOF_WCHAR_T 2 #endif /* Use the C Runtime (CRT) functions instead of the WINAPI functions #define USE_CRT_FUNCTIONS 1 */ /* Enable verbose output #define HAVE_VERBOSE_OUTPUT 1 */ /* Enable debug output #define HAVE_DEBUG_OUTPUT 1 */ #endif libpff-20120802/common/memwatch.c0000644000175000017500000022433312005152701013376 00000000000000/* ** MEMWATCH.C ** Nonintrusive ANSI C memory leak / overwrite detection ** Copyright (C) 1992-2003 Johan Lindh ** All rights reserved. ** Version 2.71 This file is part of MEMWATCH. MEMWATCH is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. MEMWATCH is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with MEMWATCH; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** ** 920810 JLI [1.00] ** 920830 JLI [1.10 double-free detection] ** 920912 JLI [1.15 mwPuts, mwGrab/Drop, mwLimit] ** 921022 JLI [1.20 ASSERT and VERIFY] ** 921105 JLI [1.30 C++ support and TRACE] ** 921116 JLI [1.40 mwSetOutFunc] ** 930215 JLI [1.50 modified ASSERT/VERIFY] ** 930327 JLI [1.51 better auto-init & PC-lint support] ** 930506 JLI [1.55 MemWatch class, improved C++ support] ** 930507 JLI [1.60 mwTest & CHECK()] ** 930809 JLI [1.65 Abort/Retry/Ignore] ** 930820 JLI [1.70 data dump when unfreed] ** 931016 JLI [1.72 modified C++ new/delete handling] ** 931108 JLI [1.77 mwSetAssertAction() & some small changes] ** 940110 JLI [1.80 no-mans-land alloc/checking] ** 940328 JLI [2.00 version 2.0 rewrite] ** Improved NML (no-mans-land) support. ** Improved performance (especially for free()ing!). ** Support for 'read-only' buffers (checksums) ** ^^ NOTE: I never did this... maybe I should? ** FBI (free'd block info) tagged before freed blocks ** Exporting of the mwCounter variable ** mwBreakOut() localizes debugger support ** Allocation statistics (global, per-module, per-line) ** Self-repair ability with relinking ** 950913 JLI [2.10 improved garbage handling] ** 951201 JLI [2.11 improved auto-free in emergencies] ** 960125 JLI [X.01 implemented auto-checking using mwAutoCheck()] ** 960514 JLI [2.12 undefining of existing macros] ** 960515 JLI [2.13 possibility to use default new() & delete()] ** 960516 JLI [2.20 suppression of file flushing on unfreed msgs] ** 960516 JLI [2.21 better support for using MEMWATCH with DLL's] ** 960710 JLI [X.02 multiple logs and mwFlushNow()] ** 960801 JLI [2.22 merged X.01 version with current] ** 960805 JLI [2.30 mwIsXXXXAddr() to avoid unneeded GP's] ** 960805 JLI [2.31 merged X.02 version with current] ** 961002 JLI [2.32 support for realloc() + fixed STDERR bug] ** 961222 JLI [2.40 added mwMark() & mwUnmark()] ** 970101 JLI [2.41 added over/underflow checking after failed ASSERT/VERIFY] ** 970113 JLI [2.42 added support for PC-Lint 7.00g] ** 970207 JLI [2.43 added support for strdup()] ** 970209 JLI [2.44 changed default filename to lowercase] ** 970405 JLI [2.45 fixed bug related with atexit() and some C++ compilers] ** 970723 JLI [2.46 added MW_ARI_NULLREAD flag] ** 970813 JLI [2.47 stabilized marker handling] ** 980317 JLI [2.48 ripped out C++ support; wasn't working good anyway] ** 980318 JLI [2.50 improved self-repair facilities & SIGSEGV support] ** 980417 JLI [2.51 more checks for invalid addresses] ** 980512 JLI [2.52 moved MW_ARI_NULLREAD to occur before aborting] ** 990112 JLI [2.53 added check for empty heap to mwIsOwned] ** 990217 JLI [2.55 improved the emergency repairs diagnostics and NML] ** 990224 JLI [2.56 changed ordering of members in structures] ** 990303 JLI [2.57 first maybe-fixit-for-hpux test] ** 990516 JLI [2.58 added 'static' to the definition of mwAutoInit] ** 990517 JLI [2.59 fixed some high-sensitivity warnings] ** 990610 JLI [2.60 fixed some more high-sensitivity warnings] ** 990715 JLI [2.61 changed TRACE/ASSERT/VERIFY macro names] ** 991001 JLI [2.62 added CHECK_BUFFER() and mwTestBuffer()] ** 991007 JLI [2.63 first shot at a 64-bit compatible version] ** 991009 JLI [2.64 undef's strdup() if defined, mwStrdup made const] ** 000704 JLI [2.65 added some more detection for 64-bits] ** 010502 JLI [2.66 incorporated some user fixes] ** [mwRelink() could print out garbage pointer (thanks mac@phobos.ca)] ** [added array destructor for C++ (thanks rdasilva@connecttel.com)] ** [added mutex support (thanks rdasilva@connecttel.com)] ** 010531 JLI [2.67 fix: mwMutexXXX() was declared even if MW_HAVE_MUTEX was not defined] ** 010619 JLI [2.68 fix: mwRealloc() could leave the mutex locked] ** 020918 JLI [2.69 changed to GPL, added C++ array allocation by Howard Cohen] ** 030212 JLI [2.70 mwMalloc() bug for very large allocations (4GB on 32bits)] ** 030520 JLI [2.71 added ULONG_LONG_MAX as a 64-bit detector (thanks Sami Salonen)] */ #define __MEMWATCH_C 1 #ifdef MW_NOCPP #define MEMWATCH_NOCPP #endif #ifdef MW_STDIO #define MEMWATCH_STDIO #endif /*********************************************************************** ** Include files ***********************************************************************/ #include #include #include #include #include #include #include #include #include "memwatch.h" #ifndef toupper #include #endif #if defined(WIN32) || defined(__WIN32__) #define MW_HAVE_MUTEX 1 #include #endif #if defined(MW_PTHREADS) || defined(HAVE_PTHREAD_H) #define MW_HAVE_MUTEX 1 #include #endif /*********************************************************************** ** Defines & other weird stuff ***********************************************************************/ /*lint -save -e767 */ #define MWVERSION "2.71" /* the current version number */ #define CHKVAL(mw) (0xFE0180L^(long)mw->count^(long)mw->size^(long)mw->line) #define FLUSH() mwFlush() #define TESTS(f,l) if(mwTestAlways) (void)mwTestNow(f,l,1) #define PRECHK 0x01234567L #define POSTCHK 0x76543210L #define mwBUFFER_TO_MW(p) ( (mwData*) (void*) ( ((char*)p)-mwDataSize-mwOverflowZoneSize ) ) /*lint -restore */ #define MW_NML 0x0001 #ifdef _MSC_VER #define COMMIT "c" /* Microsoft C requires the 'c' to perform as desired */ #else #define COMMIT "" /* Normal ANSI */ #endif /* _MSC_VER */ #ifdef __cplusplus #define CPPTEXT "++" #else #define CPPTEXT "" #endif /* __cplusplus */ #ifdef MEMWATCH_STDIO #define mwSTDERR stderr #else #define mwSTDERR mwLog #endif #ifdef MW_HAVE_MUTEX #define MW_MUTEX_INIT() mwMutexInit() #define MW_MUTEX_TERM() mwMutexTerm() #define MW_MUTEX_LOCK() mwMutexLock() #define MW_MUTEX_UNLOCK() mwMutexUnlock() #else #define MW_MUTEX_INIT() #define MW_MUTEX_TERM() #define MW_MUTEX_LOCK() #define MW_MUTEX_UNLOCK() #endif /*********************************************************************** ** If you really, really know what you're doing, ** you can predefine these things yourself. ***********************************************************************/ #ifndef mwBYTE_DEFINED # if CHAR_BIT != 8 # error need CHAR_BIT to be 8! # else typedef unsigned char mwBYTE; # define mwBYTE_DEFINED 1 # endif #endif #if defined(ULONGLONG_MAX) || defined(ULLONG_MAX) || defined(_UI64_MAX) || defined(ULONG_LONG_MAX) # define mw64BIT 1 # define mwROUNDALLOC_DEFAULT 8 #else # if UINT_MAX <= 0xFFFFUL # define mw16BIT 1 # define mwROUNDALLOC_DEFAULT 2 # else # if ULONG_MAX > 0xFFFFFFFFUL # define mw64BIT 1 # define mwROUNDALLOC_DEFAULT 8 # else # define mw32BIT 1 # define mwROUNDALLOC_DEFAULT 4 # endif # endif #endif /* mwROUNDALLOC is the number of bytes to */ /* round up to, to ensure that the end of */ /* the buffer is suitable for storage of */ /* any kind of object */ #ifndef mwROUNDALLOC # define mwROUNDALLOC mwROUNDALLOC_DEFAULT #endif #ifndef mwDWORD_DEFINED #if ULONG_MAX == 0xFFFFFFFFUL typedef unsigned long mwDWORD; #define mwDWORD_DEFINED "unsigned long" #endif #endif #ifndef mwDWORD_DEFINED #if UINT_MAX == 0xFFFFFFFFUL typedef unsigned int mwDWORD; #define mwDWORD_DEFINED "unsigned int" #endif #endif #ifndef mwDWORD_DEFINED #if USHRT_MAX == 0xFFFFFFFFUL typedef unsigned short mwDWORD; #define mwDWORD_DEFINED "unsigned short" #endif #endif #ifndef mwBYTE_DEFINED #error "can't find out the correct type for a 8 bit scalar" #endif #ifndef mwDWORD_DEFINED #error "can't find out the correct type for a 32 bit scalar" #endif /*********************************************************************** ** Typedefs & structures ***********************************************************************/ /* main data holding area, precedes actual allocation */ typedef struct mwData_ mwData; struct mwData_ { mwData* prev; /* previous allocation in chain */ mwData* next; /* next allocation in chain */ const char* file; /* file name where allocated */ long count; /* action count */ long check; /* integrity check value */ #if 0 long crc; /* data crc value */ #endif size_t size; /* size of allocation */ int line; /* line number where allocated */ unsigned flag; /* flag word */ }; /* statistics structure */ typedef struct mwStat_ mwStat; struct mwStat_ { mwStat* next; /* next statistic buffer */ const char* file; long total; /* total bytes allocated */ long num; /* total number of allocations */ long max; /* max allocated at one time */ long curr; /* current allocations */ int line; }; /* grabbing structure, 1K in size */ typedef struct mwGrabData_ mwGrabData; struct mwGrabData_ { mwGrabData* next; int type; char blob[ 1024 - sizeof(mwGrabData*) - sizeof(int) ]; }; typedef struct mwMarker_ mwMarker; struct mwMarker_ { void *host; char *text; mwMarker *next; int level; }; #if defined(WIN32) || defined(__WIN32__) typedef HANDLE mwMutex; #endif #if defined(MW_PTHREADS) || defined(HAVE_PTHREAD_H) typedef pthread_mutex_t mwMutex; #endif /*********************************************************************** ** Static variables ***********************************************************************/ static int mwInited = 0; static int mwInfoWritten = 0; static int mwUseAtexit = 0; static FILE* mwLog = NULL; static int mwFlushing = 0; static int mwStatLevel = MW_STAT_DEFAULT; static int mwNML = MW_NML_DEFAULT; static int mwFBI = 0; static long mwAllocLimit = 0L; static int mwUseLimit = 0; static long mwNumCurAlloc = 0L; static mwData* mwHead = NULL; static mwData* mwTail = NULL; static int mwDataSize = 0; static unsigned char mwOverflowZoneTemplate[] = "mEmwAtch"; static int mwOverflowZoneSize = mwROUNDALLOC; static void (*mwOutFunction)(int) = NULL; static int (*mwAriFunction)(const char*) = NULL; static int mwAriAction = MW_ARI_ABORT; static char mwPrintBuf[MW_TRACE_BUFFER+8]; static unsigned long mwCounter = 0L; static long mwErrors = 0L; static int mwTestFlags = 0; static int mwTestAlways = 0; static FILE* mwLogB1 = NULL; static int mwFlushingB1 = 0; static mwStat* mwStatList = NULL; static long mwStatTotAlloc = 0L; static long mwStatMaxAlloc = 0L; static long mwStatNumAlloc = 0L; static long mwStatCurAlloc = 0L; static long mwNmlNumAlloc = 0L; static long mwNmlCurAlloc = 0L; static mwGrabData* mwGrabList = NULL; static long mwGrabSize = 0L; static void * mwLastFree[MW_FREE_LIST]; static const char *mwLFfile[MW_FREE_LIST]; static int mwLFline[MW_FREE_LIST]; static int mwLFcur = 0; static mwMarker* mwFirstMark = NULL; static FILE* mwLogB2 = NULL; static int mwFlushingB2 = 0; #ifdef MW_HAVE_MUTEX static mwMutex mwGlobalMutex; #endif /*********************************************************************** ** Static function declarations ***********************************************************************/ static void mwAutoInit( void ); static FILE* mwLogR( void ); static void mwLogW( FILE* ); static int mwFlushR( void ); static void mwFlushW( int ); static void mwFlush( void ); static void mwIncErr( void ); static void mwUnlink( mwData*, const char* file, int line ); static int mwRelink( mwData*, const char* file, int line ); static int mwIsHeapOK( mwData *mw ); static int mwIsOwned( mwData* mw, const char* file, int line ); static int mwTestBuf( mwData* mw, const char* file, int line ); static void mwDefaultOutFunc( int ); static void mwWrite( const char* format, ... ); static void mwLogFile( const char* name ); static size_t mwFreeUp( size_t, int ); static const void *mwTestMem( const void *, unsigned, int ); static int mwStrCmpI( const char *s1, const char *s2 ); static int mwTestNow( const char *file, int line, int always_invoked ); static void mwDropAll( void ); static const char *mwGrabType( int type ); static unsigned mwGrab_( unsigned kb, int type, int silent ); static unsigned mwDrop_( unsigned kb, int type, int silent ); static int mwARI( const char* text ); static void mwStatReport( void ); static mwStat* mwStatGet( const char*, int, int ); static void mwStatAlloc( size_t, const char*, int ); static void mwStatFree( size_t, const char*, int ); static int mwCheckOF( const void * p ); static void mwWriteOF( void * p ); static char mwDummy( char c ); #ifdef MW_HAVE_MUTEX static void mwMutexInit( void ); static void mwMutexTerm( void ); static void mwMutexLock( void ); static void mwMutexUnlock( void ); #endif /*********************************************************************** ** System functions ***********************************************************************/ void mwInit( void ) { time_t tid; if( mwInited++ > 0 ) return; MW_MUTEX_INIT(); /* start a log if none is running */ if( mwLogR() == NULL ) mwLogFile( "memwatch.log" ); if( mwLogR() == NULL ) { int i; char buf[32]; /* oops, could not open it! */ /* probably because it's already open */ /* so we try some other names */ for( i=1; i<100; i++ ) { sprintf( buf, "memwat%02d.log", i ); mwLogFile( buf ); if( mwLogR() != NULL ) break; } } /* initialize the statistics */ mwStatList = NULL; mwStatTotAlloc = 0L; mwStatCurAlloc = 0L; mwStatMaxAlloc = 0L; mwStatNumAlloc = 0L; mwNmlCurAlloc = 0L; mwNmlNumAlloc = 0L; /* calculate the buffer size to use for a mwData */ mwDataSize = sizeof(mwData); while( mwDataSize % mwROUNDALLOC ) mwDataSize ++; /* write informational header if needed */ if( !mwInfoWritten ) { mwInfoWritten = 1; (void) time( &tid ); mwWrite( "\n=============" " MEMWATCH " MWVERSION " Copyright (C) 1992-1999 Johan Lindh " "=============\n"); mwWrite( "\nStarted at %s\n", ctime( &tid ) ); /**************************************************************** Generic */ mwWrite( "Modes: " ); #ifdef mwNew mwWrite( "C++ " ); #endif /* mwNew */ #ifdef __STDC__ mwWrite( "__STDC__ " ); #endif /* __STDC__ */ #ifdef mw16BIT mwWrite( "16-bit " ); #endif #ifdef mw32BIT mwWrite( "32-bit " ); #endif #ifdef mw64BIT mwWrite( "64-bit " ); #endif mwWrite( "mwDWORD==(" mwDWORD_DEFINED ")\n" ); mwWrite( "mwROUNDALLOC==%d sizeof(mwData)==%d mwDataSize==%d\n", mwROUNDALLOC, sizeof(mwData), mwDataSize ); /**************************************************************** Generic */ /************************************************************ Microsoft C */ #ifdef _MSC_VER mwWrite( "Compiled using Microsoft C" CPPTEXT " %d.%02d\n", _MSC_VER / 100, _MSC_VER % 100 ); #endif /* _MSC_VER */ /************************************************************ Microsoft C */ /************************************************************** Borland C */ #ifdef __BORLANDC__ mwWrite( "Compiled using Borland C" #ifdef __cplusplus "++ %d.%01d\n", __BCPLUSPLUS__/0x100, (__BCPLUSPLUS__%0x100)/0x10 ); #else " %d.%01d\n", __BORLANDC__/0x100, (__BORLANDC__%0x100)/0x10 ); #endif /* __cplusplus */ #endif /* __BORLANDC__ */ /************************************************************** Borland C */ /************************************************************** Watcom C */ #ifdef __WATCOMC__ mwWrite( "Compiled using Watcom C %d.%02d ", __WATCOMC__/100, __WATCOMC__%100 ); #ifdef __FLAT__ mwWrite( "(32-bit flat model)" ); #endif /* __FLAT__ */ mwWrite( "\n" ); #endif /* __WATCOMC__ */ /************************************************************** Watcom C */ mwWrite( "\n" ); FLUSH(); } if( mwUseAtexit ) (void) atexit( mwAbort ); return; } void mwAbort( void ) { mwData *mw; mwMarker *mrk; char *data; time_t tid; int c, i, j; int errors; tid = time( NULL ); mwWrite( "\nStopped at %s\n", ctime( &tid) ); if( !mwInited ) mwWrite( "internal: mwAbort(): MEMWATCH not initialized!\n" ); /* release the grab list */ mwDropAll(); /* report mwMarked items */ while( mwFirstMark ) { mrk = mwFirstMark->next; mwWrite( "mark: %p: %s\n", mwFirstMark->host, mwFirstMark->text ); free( mwFirstMark->text ); free( mwFirstMark ); mwFirstMark = mrk; mwErrors ++; } /* release all still allocated memory */ errors = 0; while( mwHead != NULL && errors < 3 ) { if( !mwIsOwned(mwHead, __FILE__, __LINE__ ) ) { if( errors < 3 ) { errors ++; mwWrite( "internal: NML/unfreed scan restarting\n" ); FLUSH(); mwHead = mwHead; continue; } mwWrite( "internal: NML/unfreed scan aborted, heap too damaged\n" ); FLUSH(); break; } mwFlushW(0); if( !(mwHead->flag & MW_NML) ) { mwErrors++; data = ((char*)mwHead)+mwDataSize; mwWrite( "unfreed: <%ld> %s(%d), %ld bytes at %p ", mwHead->count, mwHead->file, mwHead->line, (long)mwHead->size, data+mwOverflowZoneSize ); if( mwCheckOF( data ) ) { mwWrite( "[underflowed] "); FLUSH(); } if( mwCheckOF( (data+mwOverflowZoneSize+mwHead->size) ) ) { mwWrite( "[overflowed] "); FLUSH(); } mwWrite( " \t{" ); j = 16; if( mwHead->size < 16 ) j = (int) mwHead->size; for( i=0;i<16;i++ ) { if( i 126 ) c = '.'; mwWrite( "%c", c ); } mwWrite( "}\n" ); mw = mwHead; mwUnlink( mw, __FILE__, __LINE__ ); free( mw ); } else { data = ((char*)mwHead) + mwDataSize + mwOverflowZoneSize; if( mwTestMem( data, mwHead->size, MW_VAL_NML ) ) { mwErrors++; mwWrite( "wild pointer: <%ld> NoMansLand %p alloc'd at %s(%d)\n", mwHead->count, data + mwOverflowZoneSize, mwHead->file, mwHead->line ); FLUSH(); } mwNmlNumAlloc --; mwNmlCurAlloc -= mwHead->size; mw = mwHead; mwUnlink( mw, __FILE__, __LINE__ ); free( mw ); } } if( mwNmlNumAlloc ) mwWrite("internal: NoMansLand block counter %ld, not zero\n", mwNmlNumAlloc ); if( mwNmlCurAlloc ) mwWrite("internal: NoMansLand byte counter %ld, not zero\n", mwNmlCurAlloc ); /* report statistics */ mwStatReport(); FLUSH(); mwInited = 0; mwHead = mwTail = NULL; if( mwErrors ) fprintf(mwSTDERR,"MEMWATCH detected %ld anomalies\n",mwErrors); mwLogFile( NULL ); mwErrors = 0; MW_MUTEX_TERM(); } void mwTerm( void ) { if( mwInited == 1 ) { mwAbort(); return; } if( !mwInited ) mwWrite("internal: mwTerm(): MEMWATCH has not been started!\n"); else mwInited --; } void mwStatistics( int level ) { mwAutoInit(); if( level<0 ) level=0; if( mwStatLevel != level ) { mwWrite( "statistics: now collecting on a %s basis\n", level<1?"global":(level<2?"module":"line") ); mwStatLevel = level; } } void mwAutoCheck( int onoff ) { mwAutoInit(); mwTestAlways = onoff; if( onoff ) mwTestFlags = MW_TEST_ALL; } void mwSetOutFunc( void (*func)(int) ) { mwAutoInit(); mwOutFunction = func; } static void mwWriteOF( void *p ) { int i; unsigned char *ptr; ptr = (unsigned char*) p; for( i=0; inext is not always set? */ void * mwMark( void *p, const char *desc, const char *file, unsigned line ) { mwMarker *mrk; unsigned n, isnew; char *buf; int tot, oflow = 0; char wherebuf[128]; mwAutoInit(); TESTS(NULL,0); if( desc == NULL ) desc = "unknown"; if( file == NULL ) file = "unknown"; tot = sprintf( wherebuf, "%.48s called from %s(%d)", desc, file, line ); if( tot >= (int)sizeof(wherebuf) ) { wherebuf[sizeof(wherebuf)-1] = 0; oflow = 1; } if( p == NULL ) { mwWrite("mark: %s(%d), no mark for NULL:'%s' may be set\n", file, line, desc ); return p; } if( mwFirstMark != NULL && !mwIsReadAddr( mwFirstMark, sizeof( mwMarker ) ) ) { mwWrite("mark: %s(%d), mwFirstMark (%p) is trashed, can't mark for %s\n", file, line, mwFirstMark, desc ); return p; } for( mrk=mwFirstMark; mrk; mrk=mrk->next ) { if( mrk->next != NULL && !mwIsReadAddr( mrk->next, sizeof( mwMarker ) ) ) { mwWrite("mark: %s(%d), mark(%p)->next(%p) is trashed, can't mark for %s\n", file, line, mrk, mrk->next, desc ); return p; } if( mrk->host == p ) break; } if( mrk == NULL ) { isnew = 1; mrk = (mwMarker*) malloc( sizeof( mwMarker ) ); if( mrk == NULL ) { mwWrite("mark: %s(%d), no mark for %p:'%s', out of memory\n", file, line, p, desc ); return p; } mrk->next = NULL; n = 0; } else { isnew = 0; n = strlen( mrk->text ); } n += strlen( wherebuf ); buf = (char*) malloc( n+3 ); if( buf == NULL ) { if( isnew ) free( mrk ); mwWrite("mark: %s(%d), no mark for %p:'%s', out of memory\n", file, line, p, desc ); return p; } if( isnew ) { memcpy( buf, wherebuf, n+1 ); mrk->next = mwFirstMark; mrk->host = p; mrk->text = buf; mrk->level = 1; mwFirstMark = mrk; } else { strcpy( buf, mrk->text ); strcat( buf, ", " ); strcat( buf, wherebuf ); free( mrk->text ); mrk->text = buf; mrk->level ++; } if( oflow ) { mwIncErr(); mwTrace( " [WARNING: OUTPUT BUFFER OVERFLOW - SYSTEM UNSTABLE]\n" ); } return p; } void* mwUnmark( void *p, const char *file, unsigned line ) { mwMarker *mrk, *prv; mrk = mwFirstMark; prv = NULL; while( mrk ) { if( mrk->host == p ) { if( mrk->level < 2 ) { if( prv ) prv->next = mrk->next; else mwFirstMark = mrk->next; free( mrk->text ); free( mrk ); return p; } mrk->level --; return p; } prv = mrk; mrk = mrk->next; } mwWrite("mark: %s(%d), no mark found for %p\n", file, line, p ); return p; } /*********************************************************************** ** Abort/Retry/Ignore handlers ***********************************************************************/ static int mwARI( const char *estr ) { char inbuf[81]; int c; fprintf(mwSTDERR, "\n%s\nMEMWATCH: Abort, Retry or Ignore? ", estr); (void) fgets(inbuf,sizeof(inbuf),stdin); for( c=0; inbuf[c] && inbuf[c] <= ' '; c++ ) ; c = inbuf[c]; if( c == 'R' || c == 'r' ) { mwBreakOut( estr ); return MW_ARI_RETRY; } if( c == 'I' || c == 'i' ) return MW_ARI_IGNORE; return MW_ARI_ABORT; } /* standard ARI handler (exported) */ int mwAriHandler( const char *estr ) { mwAutoInit(); return mwARI( estr ); } /* used to set the ARI function */ void mwSetAriFunc( int (*func)(const char *) ) { mwAutoInit(); mwAriFunction = func; } /*********************************************************************** ** Allocation handlers ***********************************************************************/ void* mwMalloc( size_t size, const char* file, int line) { size_t needed; mwData *mw; char *ptr; void *p; mwAutoInit(); MW_MUTEX_LOCK(); TESTS(file,line); mwCounter ++; needed = mwDataSize + mwOverflowZoneSize*2 + size; if( needed < size ) { /* theoretical case: req size + mw overhead exceeded size_t limits */ return NULL; } /* if this allocation would violate the limit, fail it */ if( mwUseLimit && ((long)size + mwStatCurAlloc > mwAllocLimit) ) { mwWrite( "limit fail: <%ld> %s(%d), %ld wanted %ld available\n", mwCounter, file, line, (long)size, mwAllocLimit - mwStatCurAlloc ); mwIncErr(); FLUSH(); MW_MUTEX_UNLOCK(); return NULL; } mw = (mwData*) malloc( needed ); if( mw == NULL ) { if( mwFreeUp(needed,0) >= needed ) { mw = (mwData*) malloc(needed); if( mw == NULL ) { mwWrite( "internal: mwFreeUp(%u) reported success, but malloc() fails\n", needed ); mwIncErr(); FLUSH(); } } if( mw == NULL ) { mwWrite( "fail: <%ld> %s(%d), %ld wanted %ld allocated\n", mwCounter, file, line, (long)size, mwStatCurAlloc ); mwIncErr(); FLUSH(); MW_MUTEX_UNLOCK(); return NULL; } } mw->count = mwCounter; mw->prev = NULL; mw->next = mwHead; mw->file = file; mw->size = size; mw->line = line; mw->flag = 0; mw->check = CHKVAL(mw); if( mwHead ) mwHead->prev = mw; mwHead = mw; if( mwTail == NULL ) mwTail = mw; ptr = ((char*)mw) + mwDataSize; mwWriteOF( ptr ); /* '*(long*)ptr = PRECHK;' */ ptr += mwOverflowZoneSize; p = ptr; memset( ptr, MW_VAL_NEW, size ); ptr += size; mwWriteOF( ptr ); /* '*(long*)ptr = POSTCHK;' */ mwNumCurAlloc ++; mwStatCurAlloc += (long) size; mwStatTotAlloc += (long) size; if( mwStatCurAlloc > mwStatMaxAlloc ) mwStatMaxAlloc = mwStatCurAlloc; mwStatNumAlloc ++; if( mwStatLevel ) mwStatAlloc( size, file, line ); MW_MUTEX_UNLOCK(); return p; } void* mwRealloc( void *p, size_t size, const char* file, int line) { int oldUseLimit, i; mwData *mw; char *ptr; mwAutoInit(); if( p == NULL ) return mwMalloc( size, file, line ); if( size == 0 ) { mwFree( p, file, line ); return NULL; } MW_MUTEX_LOCK(); /* do the quick ownership test */ mw = (mwData*) mwBUFFER_TO_MW( p ); if( mwIsOwned( mw, file, line ) ) { /* if the buffer is an NML, treat this as a double-free */ if( mw->flag & MW_NML ) { mwIncErr(); if( *((unsigned char*)(mw)+mwDataSize+mwOverflowZoneSize) != MW_VAL_NML ) { mwWrite( "internal: <%ld> %s(%d), no-mans-land MW-%p is corrupted\n", mwCounter, file, line, mw ); } goto check_dbl_free; } /* if this allocation would violate the limit, fail it */ if( mwUseLimit && ((long)size + mwStatCurAlloc - (long)mw->size > mwAllocLimit) ) { TESTS(file,line); mwCounter ++; mwWrite( "limit fail: <%ld> %s(%d), %ld wanted %ld available\n", mwCounter, file, line, (unsigned long)size - mw->size, mwAllocLimit - mwStatCurAlloc ); mwIncErr(); FLUSH(); MW_MUTEX_UNLOCK(); return NULL; } /* fake realloc operation */ oldUseLimit = mwUseLimit; mwUseLimit = 0; ptr = (char*) mwMalloc( size, file, line ); if( ptr != NULL ) { if( size < mw->size ) memcpy( ptr, p, size ); else memcpy( ptr, p, mw->size ); mwFree( p, file, line ); } mwUseLimit = oldUseLimit; MW_MUTEX_UNLOCK(); return (void*) ptr; } /* Unknown pointer! */ /* using free'd pointer? */ check_dbl_free: for(i=0;i %s(%d), %p was" " freed from %s(%d)\n", mwCounter, file, line, p, mwLFfile[i], mwLFline[i] ); FLUSH(); MW_MUTEX_UNLOCK(); return NULL; } } /* some weird pointer */ mwIncErr(); mwWrite( "realloc: <%ld> %s(%d), unknown pointer %p\n", mwCounter, file, line, p ); FLUSH(); MW_MUTEX_UNLOCK(); return NULL; } #ifdef MWSTRDUP char *mwStrdup( const char* str, const char* file, int line ) { size_t len; char *newstring; MW_MUTEX_LOCK(); if( str == NULL ) { mwIncErr(); mwWrite( "strdup: <%ld> %s(%d), strdup(NULL) called\n", mwCounter, file, line ); FLUSH(); MW_MUTEX_UNLOCK(); return NULL; } len = strlen( str ) + 1; newstring = (char*) mwMalloc( len, file, line ); if( newstring != NULL ) memcpy( newstring, str, len ); MW_MUTEX_UNLOCK(); return newstring; } #endif void mwFree( void* p, const char* file, int line ) { int i; mwData* mw; char buffer[ sizeof(mwData) + (mwROUNDALLOC*3) + 64 ]; /* this code is in support of C++ delete */ if( file == NULL ) { mwFree_( p ); MW_MUTEX_UNLOCK(); return; } mwAutoInit(); MW_MUTEX_LOCK(); TESTS(file,line); mwCounter ++; /* on NULL free, write a warning and return */ if( p == NULL ) { mwWrite( "NULL free: <%ld> %s(%d), NULL pointer free'd\n", mwCounter, file, line ); FLUSH(); MW_MUTEX_UNLOCK(); return; } /* do the quick ownership test */ mw = (mwData*) mwBUFFER_TO_MW( p ); if( mwIsOwned( mw, file, line ) ) { (void) mwTestBuf( mw, file, line ); /* if the buffer is an NML, treat this as a double-free */ if( mw->flag & MW_NML ) { if( *(((unsigned char*)mw)+mwDataSize+mwOverflowZoneSize) != MW_VAL_NML ) { mwWrite( "internal: <%ld> %s(%d), no-mans-land MW-%p is corrupted\n", mwCounter, file, line, mw ); } goto check_dbl_free; } /* update the statistics */ mwNumCurAlloc --; mwStatCurAlloc -= (long) mw->size; if( mwStatLevel ) mwStatFree( mw->size, mw->file, mw->line ); /* we should either free the allocation or keep it as NML */ if( mwNML ) { mw->flag |= MW_NML; mwNmlNumAlloc ++; mwNmlCurAlloc += (long) mw->size; memset( ((char*)mw)+mwDataSize+mwOverflowZoneSize, MW_VAL_NML, mw->size ); } else { /* unlink the allocation, and enter the post-free data */ mwUnlink( mw, file, line ); memset( mw, MW_VAL_DEL, mw->size + mwDataSize+mwOverflowZoneSize+mwOverflowZoneSize ); if( mwFBI ) { memset( mw, '.', mwDataSize + mwOverflowZoneSize ); sprintf( buffer, "FBI<%ld>%s(%d)", mwCounter, file, line ); strncpy( (char*)(void*)mw, buffer, mwDataSize + mwOverflowZoneSize ); } free( mw ); } /* add the pointer to the last-free track */ mwLFfile[ mwLFcur ] = file; mwLFline[ mwLFcur ] = line; mwLastFree[ mwLFcur++ ] = p; if( mwLFcur == MW_FREE_LIST ) mwLFcur = 0; MW_MUTEX_UNLOCK(); return; } /* check for double-freeing */ check_dbl_free: for(i=0;i %s(%d), %p was" " freed from %s(%d)\n", mwCounter, file, line, p, mwLFfile[i], mwLFline[i] ); FLUSH(); MW_MUTEX_UNLOCK(); return; } } /* some weird pointer... block the free */ mwIncErr(); mwWrite( "WILD free: <%ld> %s(%d), unknown pointer %p\n", mwCounter, file, line, p ); FLUSH(); MW_MUTEX_UNLOCK(); return; } void* mwCalloc( size_t a, size_t b, const char *file, int line ) { void *p; size_t size = a * b; p = mwMalloc( size, file, line ); if( p == NULL ) return NULL; memset( p, 0, size ); return p; } void mwFree_( void *p ) { MW_MUTEX_LOCK(); TESTS(NULL,0); MW_MUTEX_UNLOCK(); free(p); } void* mwMalloc_( size_t size ) { MW_MUTEX_LOCK(); TESTS(NULL,0); MW_MUTEX_UNLOCK(); return malloc( size ); } void* mwRealloc_( void *p, size_t size ) { MW_MUTEX_LOCK(); TESTS(NULL,0); MW_MUTEX_UNLOCK(); return realloc( p, size ); } void* mwCalloc_( size_t a, size_t b ) { MW_MUTEX_LOCK(); TESTS(NULL,0); MW_MUTEX_UNLOCK(); return calloc( a, b ); } void mwFlushNow( void ) { if( mwLogR() ) fflush( mwLogR() ); return; } void mwDoFlush( int onoff ) { mwFlushW( onoff<1?0:onoff ); if( onoff ) if( mwLogR() ) fflush( mwLogR() ); return; } void mwLimit( long lim ) { TESTS(NULL,0); mwWrite("limit: old limit = "); if( !mwAllocLimit ) mwWrite( "none" ); else mwWrite( "%ld bytes", mwAllocLimit ); mwWrite( ", new limit = "); if( !lim ) { mwWrite( "none\n" ); mwUseLimit = 0; } else { mwWrite( "%ld bytes\n", lim ); mwUseLimit = 1; } mwAllocLimit = lim; FLUSH(); } void mwSetAriAction( int action ) { MW_MUTEX_LOCK(); TESTS(NULL,0); mwAriAction = action; MW_MUTEX_UNLOCK(); return; } int mwAssert( int exp, const char *exps, const char *fn, int ln ) { int i; char buffer[MW_TRACE_BUFFER+8]; if( exp ) { return 0; } mwAutoInit(); MW_MUTEX_LOCK(); TESTS(fn,ln); mwIncErr(); mwCounter++; mwWrite( "assert trap: <%ld> %s(%d), %s\n", mwCounter, fn, ln, exps ); if( mwAriFunction != NULL ) { sprintf( buffer, "MEMWATCH: assert trap: %s(%d), %s", fn, ln, exps ); i = (*mwAriFunction)(buffer); switch( i ) { case MW_ARI_IGNORE: mwWrite( "assert trap: <%ld> IGNORED - execution continues\n", mwCounter ); MW_MUTEX_UNLOCK(); return 0; case MW_ARI_RETRY: mwWrite( "assert trap: <%ld> RETRY - executing again\n", mwCounter ); MW_MUTEX_UNLOCK(); return 1; } } else { if( mwAriAction & MW_ARI_IGNORE ) { mwWrite( "assert trap: <%ld> AUTO IGNORED - execution continues\n", mwCounter ); MW_MUTEX_UNLOCK(); return 0; } fprintf(mwSTDERR,"\nMEMWATCH: assert trap: %s(%d), %s\n", fn, ln, exps ); } FLUSH(); (void) mwTestNow( fn, ln, 1 ); FLUSH(); if( mwAriAction & MW_ARI_NULLREAD ) { /* This is made in an attempt to kick in */ /* any debuggers or OS stack traces */ FLUSH(); /*lint -save -e413 */ i = *((int*)NULL); mwDummy( (char)i ); /*lint -restore */ } MW_MUTEX_UNLOCK(); exit(255); /* NOT REACHED - the return statement is in to keep */ /* stupid compilers from squeaking about differing return modes. */ /* Smart compilers instead say 'code unreachable...' */ /*lint -save -e527 */ return 0; /*lint -restore */ } int mwVerify( int exp, const char *exps, const char *fn, int ln ) { int i; char buffer[MW_TRACE_BUFFER+8]; if( exp ) { return 0; } mwAutoInit(); MW_MUTEX_LOCK(); TESTS(fn,ln); mwIncErr(); mwCounter++; mwWrite( "verify trap: <%ld> %s(%d), %s\n", mwCounter, fn, ln, exps ); if( mwAriFunction != NULL ) { sprintf( buffer, "MEMWATCH: verify trap: %s(%d), %s", fn, ln, exps ); i = (*mwAriFunction)(buffer); if( i == 0 ) { mwWrite( "verify trap: <%ld> IGNORED - execution continues\n", mwCounter ); MW_MUTEX_UNLOCK(); return 0; } if( i == 1 ) { mwWrite( "verify trap: <%ld> RETRY - executing again\n", mwCounter ); MW_MUTEX_UNLOCK(); return 1; } } else { if( mwAriAction & MW_ARI_NULLREAD ) { /* This is made in an attempt to kick in */ /* any debuggers or OS stack traces */ FLUSH(); /*lint -save -e413 */ i = *((int*)NULL); mwDummy( (char)i ); /*lint -restore */ } if( mwAriAction & MW_ARI_IGNORE ) { mwWrite( "verify trap: <%ld> AUTO IGNORED - execution continues\n", mwCounter ); MW_MUTEX_UNLOCK(); return 0; } fprintf(mwSTDERR,"\nMEMWATCH: verify trap: %s(%d), %s\n", fn, ln, exps ); } FLUSH(); (void) mwTestNow( fn, ln, 1 ); FLUSH(); MW_MUTEX_UNLOCK(); exit(255); /* NOT REACHED - the return statement is in to keep */ /* stupid compilers from squeaking about differing return modes. */ /* Smart compilers instead say 'code unreachable...' */ /*lint -save -e527 */ return 0; /*lint -restore */ } void mwTrace( const char *format, ... ) { int tot, oflow = 0; va_list mark; mwAutoInit(); MW_MUTEX_LOCK(); TESTS(NULL,0); if( mwOutFunction == NULL ) mwOutFunction = mwDefaultOutFunc; va_start( mark, format ); tot = vsprintf( mwPrintBuf, format, mark ); va_end( mark ); if( tot >= MW_TRACE_BUFFER ) { mwPrintBuf[MW_TRACE_BUFFER] = 0; oflow = 1; } for(tot=0;mwPrintBuf[tot];tot++) (*mwOutFunction)( mwPrintBuf[tot] ); if( oflow ) { mwIncErr(); mwTrace( " [WARNING: OUTPUT BUFFER OVERFLOW - SYSTEM UNSTABLE]\n" ); } FLUSH(); MW_MUTEX_UNLOCK(); } /*********************************************************************** ** Grab & Drop ***********************************************************************/ unsigned mwGrab( unsigned kb ) { TESTS(NULL,0); return mwGrab_( kb, MW_VAL_GRB, 0 ); } unsigned mwDrop( unsigned kb ) { TESTS(NULL,0); return mwDrop_( kb, MW_VAL_GRB, 0 ); } static void mwDropAll() { TESTS(NULL,0); (void) mwDrop_( 0, MW_VAL_GRB, 0 ); (void) mwDrop_( 0, MW_VAL_NML, 0 ); if( mwGrabList != NULL ) mwWrite( "internal: the grab list is not empty after mwDropAll()\n"); } static const char *mwGrabType( int type ) { switch( type ) { case MW_VAL_GRB: return "grabbed"; case MW_VAL_NML: return "no-mans-land"; default: /* do nothing */ ; } return ""; } static unsigned mwGrab_( unsigned kb, int type, int silent ) { unsigned i = kb; mwGrabData *gd; if( !kb ) i = kb = 65000U; for(;kb;kb--) { if( mwUseLimit && (mwStatCurAlloc + mwGrabSize + (long)sizeof(mwGrabData) > mwAllocLimit) ) { if( !silent ) { mwWrite("grabbed: all allowed memory to %s (%u kb)\n", mwGrabType(type), i-kb); FLUSH(); } return i-kb; } gd = (mwGrabData*) malloc( sizeof(mwGrabData) ); if( gd == NULL ) { if( !silent ) { mwWrite("grabbed: all available memory to %s (%u kb)\n", mwGrabType(type), i-kb); FLUSH(); } return i-kb; } mwGrabSize += (long) sizeof(mwGrabData); gd->next = mwGrabList; memset( gd->blob, type, sizeof(gd->blob) ); gd->type = type; mwGrabList = gd; } if( !silent ) { mwWrite("grabbed: %u kilobytes of %s memory\n", i, mwGrabType(type) ); FLUSH(); } return i; } static unsigned mwDrop_( unsigned kb, int type, int silent ) { unsigned i = kb; mwGrabData *gd,*tmp,*pr; const void *p; if( mwGrabList == NULL && kb == 0 ) return 0; if( !kb ) i = kb = 60000U; pr = NULL; gd = mwGrabList; for(;kb;) { if( gd == NULL ) { if( i-kb > 0 && !silent ) { mwWrite("dropped: all %s memory (%u kb)\n", mwGrabType(type), i-kb); FLUSH(); } return i-kb; } if( gd->type == type ) { if( pr ) pr->next = gd->next; kb --; tmp = gd; if( mwGrabList == gd ) mwGrabList = gd->next; gd = gd->next; p = mwTestMem( tmp->blob, sizeof( tmp->blob ), type ); if( p != NULL ) { mwWrite( "wild pointer: <%ld> %s memory hit at %p\n", mwCounter, mwGrabType(type), p ); FLUSH(); } mwGrabSize -= (long) sizeof(mwGrabData); free( tmp ); } else { pr = gd; gd = gd->next; } } if( !silent ) { mwWrite("dropped: %u kilobytes of %s memory\n", i, mwGrabType(type) ); FLUSH(); } return i; } /*********************************************************************** ** No-Mans-Land ***********************************************************************/ void mwNoMansLand( int level ) { mwAutoInit(); TESTS(NULL,0); switch( level ) { case MW_NML_NONE: (void) mwDrop_( 0, MW_VAL_NML, 0 ); break; case MW_NML_FREE: break; case MW_NML_ALL: (void) mwGrab_( 0, MW_VAL_NML, 0 ); break; default: return; } mwNML = level; } /*********************************************************************** ** Static functions ***********************************************************************/ static void mwAutoInit( void ) { if( mwInited ) return; mwUseAtexit = 1; mwInit(); return; } static FILE *mwLogR() { if( (mwLog == mwLogB1) && (mwLog == mwLogB2) ) return mwLog; if( mwLog == mwLogB1 ) mwLogB2 = mwLog; if( mwLog == mwLogB2 ) mwLogB1 = mwLog; if( mwLogB1 == mwLogB2 ) mwLog = mwLogB1; if( (mwLog == mwLogB1) && (mwLog == mwLogB2) ) { mwWrite("internal: log file handle damaged and recovered\n"); FLUSH(); return mwLog; } fprintf(mwSTDERR,"\nMEMWATCH: log file handle destroyed, using mwSTDERR\n" ); mwLog = mwLogB1 = mwLogB2 = mwSTDERR; return mwSTDERR; } static void mwLogW( FILE *p ) { mwLog = mwLogB1 = mwLogB2 = p; } static int mwFlushR() { if( (mwFlushing == mwFlushingB1) && (mwFlushing == mwFlushingB2) ) return mwFlushing; if( mwFlushing == mwFlushingB1 ) mwFlushingB2 = mwFlushing; if( mwFlushing == mwFlushingB2 ) mwFlushingB1 = mwFlushing; if( mwFlushingB1 == mwFlushingB2 ) mwFlushing = mwFlushingB1; if( (mwFlushing == mwFlushingB1) && (mwFlushing == mwFlushingB2) ) { mwWrite("internal: flushing flag damaged and recovered\n"); FLUSH(); return mwFlushing; } mwWrite("internal: flushing flag destroyed, so set to true\n"); mwFlushing = mwFlushingB1 = mwFlushingB2 = 1; return 1; } static void mwFlushW( int n ) { mwFlushing = mwFlushingB1 = mwFlushingB2 = n; } static void mwIncErr() { mwErrors++; mwFlushW( mwFlushR()+1 ); FLUSH(); } static void mwFlush() { if( mwLogR() == NULL ) return; #ifdef MW_FLUSH fflush( mwLogR() ); #else if( mwFlushR() ) fflush( mwLogR() ); #endif return; } static void mwUnlink( mwData* mw, const char* file, int line ) { if( mw->prev == NULL ) { if( mwHead != mw ) mwWrite( "internal: <%ld> %s(%d), MW-%p: link1 NULL, but not head\n", mwCounter, file, line, mw ); mwHead = mw->next; } else { if( mw->prev->next != mw ) mwWrite( "internal: <%ld> %s(%d), MW-%p: link1 failure\n", mwCounter, file, line, mw ); else mw->prev->next = mw->next; } if( mw->next == NULL ) { if( mwTail != mw ) mwWrite( "internal: <%ld> %s(%d), MW-%p: link2 NULL, but not tail\n", mwCounter, file, line, mw ); mwTail = mw->prev; } else { if( mw->next->prev != mw ) mwWrite( "internal: <%ld> %s(%d), MW-%p: link2 failure\n", mwCounter, file, line, mw ); else mw->next->prev = mw->prev; } } /* ** Relinking tries to repair a damaged mw block. ** Returns nonzero if it thinks it successfully ** repaired the heap chain. */ static int mwRelink( mwData* mw, const char* file, int line ) { int fails; mwData *mw1, *mw2; long count, size; mwStat *ms; if( file == NULL ) file = "unknown"; if( mw == NULL ) { mwWrite("relink: cannot repair MW at NULL\n"); FLUSH(); goto emergency; } if( !mwIsSafeAddr(mw, mwDataSize) ) { mwWrite("relink: MW-%p is a garbage pointer\n", mw); FLUSH(); goto emergency; } mwWrite("relink: <%ld> %s(%d) attempting to repair MW-%p...\n", mwCounter, file, line, mw ); FLUSH(); fails = 0; /* Repair from head */ if( mwHead != mw ) { if( !mwIsSafeAddr( mwHead, mwDataSize ) ) { mwWrite("relink: failed for MW-%p; head pointer destroyed\n", mw ); FLUSH(); goto emergency; } for( mw1=mwHead; mw1; mw1=mw1->next ) { if( mw1->next == mw ) { mw->prev = mw1; break; } if( mw1->next && ( !mwIsSafeAddr(mw1->next, mwDataSize ) || mw1->next->prev != mw1) ) { mwWrite("relink: failed for MW-%p; forward chain fragmented at MW-%p: 'next' is %p\n", mw, mw1, mw1->next ); FLUSH(); goto emergency; } } if( mw1 == NULL ) { mwWrite("relink: MW-%p not found in forward chain search\n", mw ); FLUSH(); fails ++; } } else { mwWrite( "relink: MW-%p is the head (first) allocation\n", mw ); if( mw->prev != NULL ) { mwWrite( "relink: MW-%p prev pointer is non-NULL, you have a wild pointer\n", mw ); mw->prev = NULL; } } /* Repair from tail */ if( mwTail != mw ) { if( !mwIsSafeAddr( mwTail, mwDataSize ) ) { mwWrite("relink: failed for MW-%p; tail pointer destroyed\n", mw ); FLUSH(); goto emergency; } for( mw1=mwTail; mw1; mw1=mw1->prev ) { if( mw1->prev == mw ) { mw->next = mw1; break; } if( mw1->prev && (!mwIsSafeAddr(mw1->prev, mwDataSize ) || mw1->prev->next != mw1) ) { mwWrite("relink: failed for MW-%p; reverse chain fragmented at MW-%p, 'prev' is %p\n", mw, mw1, mw1->prev ); FLUSH(); goto emergency; } } if( mw1 == NULL ) { mwWrite("relink: MW-%p not found in reverse chain search\n", mw ); FLUSH(); fails ++; } } else { mwWrite( "relink: MW-%p is the tail (last) allocation\n", mw ); if( mw->next != NULL ) { mwWrite( "relink: MW-%p next pointer is non-NULL, you have a wild pointer\n", mw ); mw->next = NULL; } } if( fails > 1 ) { mwWrite("relink: heap appears intact, MW-%p probably garbage pointer\n", mw ); FLUSH(); goto verifyok; } /* restore MW info where possible */ if( mwIsReadAddr( mw->file, 1 ) ) { ms = mwStatGet( mw->file, -1, 0 ); if( ms == NULL ) mw->file = ""; } mw->check = CHKVAL(mw); goto verifyok; /* Emergency repair */ emergency: if( mwHead == NULL && mwTail == NULL ) { if( mwStatCurAlloc == 0 ) mwWrite("relink: <%ld> %s(%d) heap is empty, nothing to repair\n", mwCounter, file, line ); else mwWrite("relink: <%ld> %s(%d) heap damaged beyond repair\n", mwCounter, file, line ); FLUSH(); return 0; } mwWrite("relink: <%ld> %s(%d) attempting emergency repairs...\n", mwCounter, file, line ); FLUSH(); if( mwHead == NULL || mwTail == NULL ) { if( mwHead == NULL ) mwWrite("relink: mwHead is NULL, but mwTail is %p\n", mwTail ); else mwWrite("relink: mwTail is NULL, but mwHead is %p\n", mwHead ); } mw1=NULL; if( mwHead != NULL ) { if( !mwIsReadAddr( mwHead, mwDataSize ) || mwHead->check != CHKVAL(mwHead) ) { mwWrite("relink: mwHead (MW-%p) is damaged, skipping forward scan\n", mwHead ); mwHead = NULL; goto scan_reverse; } if( mwHead->prev != NULL ) { mwWrite("relink: the mwHead pointer's 'prev' member is %p, not NULL\n", mwHead->prev ); } for( mw1=mwHead; mw1; mw1=mw1->next ) { if( mw1->next ) { if( !mwIsReadAddr(mw1->next,mwDataSize) || !mw1->next->check != CHKVAL(mw1) || mw1->next->prev != mw1 ) { mwWrite("relink: forward chain's last intact MW is MW-%p, %ld %sbytes at %s(%d)\n", mw1, mw1->size, (mw->flag & MW_NML)?"NoMansLand ":"", mw1->file, mw1->line ); if( mwIsReadAddr(mw1->next,mwDataSize ) ) { mwWrite("relink: forward chain's first damaged MW is MW-%p, %ld %sbytes at %s(%d)\n", mw1->next, mw1->size, (mw->flag & MW_NML)?"NoMansLand ":"", mwIsReadAddr(mw1->file,16)?mw1->file:"", mw1->line ); } else { mwWrite("relink: the 'next' pointer of this MW points to %p, which is out-of-legal-access\n", mw1->next ); } break; } } } } scan_reverse: mw2=NULL; if( mwTail != NULL ) { if( !mwIsReadAddr(mwTail,mwDataSize) || mwTail->check != CHKVAL(mwTail) ) { mwWrite("relink: mwTail (%p) is damaged, skipping reverse scan\n", mwTail ); mwTail = NULL; goto analyze; } if( mwTail->next != NULL ) { mwWrite("relink: the mwTail pointer's 'next' member is %p, not NULL\n", mwTail->next ); } for( mw2=mwTail; mw2; mw2=mw2->prev ) { if( mw2->prev ) { if( !mwIsReadAddr(mw2->prev,mwDataSize) || !mw2->prev->check != CHKVAL(mw2) || mw2->prev->next != mw2 ) { mwWrite("relink: reverse chain's last intact MW is MW-%p, %ld %sbytes at %s(%d)\n", mw2, mw2->size, (mw->flag & MW_NML)?"NoMansLand ":"", mw2->file, mw2->line ); if( mwIsReadAddr(mw2->prev,mwDataSize ) ) { mwWrite("relink: reverse chain's first damaged MW is MW-%p, %ld %sbytes at %s(%d)\n", mw2->prev, mw2->size, (mw->flag & MW_NML)?"NoMansLand ":"", mwIsReadAddr(mw2->file,16)?mw2->file:"", mw2->line ); } else { mwWrite("relink: the 'prev' pointer of this MW points to %p, which is out-of-legal-access\n", mw2->prev ); } break; } } } } analyze: if( mwHead == NULL && mwTail == NULL ) { mwWrite("relink: both head and tail pointers damaged, aborting program\n"); mwFlushW(1); FLUSH(); abort(); } if( mwHead == NULL ) { mwHead = mw2; mwWrite("relink: heap truncated, MW-%p designated as new mwHead\n", mw2 ); mw2->prev = NULL; mw1 = mw2 = NULL; } if( mwTail == NULL ) { mwTail = mw1; mwWrite("relink: heap truncated, MW-%p designated as new mwTail\n", mw1 ); mw1->next = NULL; mw1 = mw2 = NULL; } if( mw1 == NULL && mw2 == NULL && mwHead->prev == NULL && mwTail->next == NULL ) { mwWrite("relink: verifying heap integrity...\n" ); FLUSH(); goto verifyok; } if( mw1 && mw2 && mw1 != mw2 ) { mw1->next = mw2; mw2->prev = mw1; mwWrite("relink: emergency repairs successful, assessing damage...\n"); FLUSH(); } else { mwWrite("relink: heap totally destroyed, aborting program\n"); mwFlushW(1); FLUSH(); abort(); } /* Verify by checking that the number of active allocations */ /* match the number of entries in the chain */ verifyok: if( !mwIsHeapOK( NULL ) ) { mwWrite("relink: heap verification FAILS - aborting program\n"); mwFlushW(1); FLUSH(); abort(); } for( size=count=0, mw1=mwHead; mw1; mw1=mw1->next ) { count ++; size += (long) mw1->size; } if( count == mwNumCurAlloc ) { mwWrite("relink: successful, "); if( size == mwStatCurAlloc ) { mwWrite("no allocations lost\n"); } else { if( mw != NULL ) { mwWrite("size information lost for MW-%p\n", mw); mw->size = 0; } } } else { mwWrite("relink: partial, %ld MW-blocks of %ld bytes lost\n", mwNmlNumAlloc+mwNumCurAlloc-count, mwNmlCurAlloc+mwStatCurAlloc-size ); return 0; } return 1; } /* ** If mwData* is NULL: ** Returns 0 if heap chain is broken. ** Returns 1 if heap chain is intact. ** If mwData* is not NULL: ** Returns 0 if mwData* is missing or if chain is broken. ** Returns 1 if chain is intact and mwData* is found. */ static int mwIsHeapOK( mwData *includes_mw ) { int found = 0; mwData *mw; for( mw = mwHead; mw; mw=mw->next ) { if( includes_mw == mw ) found++; if( !mwIsSafeAddr( mw, mwDataSize ) ) return 0; if( mw->prev ) { if( !mwIsSafeAddr( mw->prev, mwDataSize ) ) return 0; if( mw==mwHead || mw->prev->next != mw ) return 0; } if( mw->next ) { if( !mwIsSafeAddr( mw->next, mwDataSize ) ) return 0; if( mw==mwTail || mw->next->prev != mw ) return 0; } else if( mw!=mwTail ) return 0; } if( includes_mw != NULL && !found ) return 0; return 1; } static int mwIsOwned( mwData* mw, const char *file, int line ) { int retv; mwStat *ms; /* see if the address is legal according to OS */ if( !mwIsSafeAddr( mw, mwDataSize ) ) return 0; /* make sure we have _anything_ allocated */ if( mwHead == NULL && mwTail == NULL && mwStatCurAlloc == 0 ) return 0; /* calculate checksum */ if( mw->check != CHKVAL(mw) ) { /* may be damaged checksum, see if block is in heap */ if( mwIsHeapOK( mw ) ) { /* damaged checksum, repair it */ mwWrite( "internal: <%ld> %s(%d), checksum for MW-%p is incorrect\n", mwCounter, file, line, mw ); mwIncErr(); if( mwIsReadAddr( mw->file, 1 ) ) { ms = mwStatGet( mw->file, -1, 0 ); if( ms == NULL ) mw->file = ""; } else mw->file = ""; mw->size = 0; mw->check = CHKVAL(mw); return 1; } /* no, it's just some garbage data */ return 0; } /* check that the non-NULL pointers are safe */ if( mw->prev && !mwIsSafeAddr( mw->prev, mwDataSize ) ) mwRelink( mw, file, line ); if( mw->next && !mwIsSafeAddr( mw->next, mwDataSize ) ) mwRelink( mw, file, line ); /* safe address, checksum OK, proceed with heap checks */ /* see if the block is in the heap */ retv = 0; if( mw->prev ) { if( mw->prev->next == mw ) retv ++; } else { if( mwHead == mw ) retv++; } if( mw->next ) { if( mw->next->prev == mw ) retv ++; } else { if( mwTail == mw ) retv++; } if( mw->check == CHKVAL(mw) ) retv ++; if( retv > 2 ) return 1; /* block not in heap, check heap for corruption */ if( !mwIsHeapOK( mw ) ) { if( mwRelink( mw, file, line ) ) return 1; } /* unable to repair */ mwWrite( "internal: <%ld> %s(%d), mwIsOwned fails for MW-%p\n", mwCounter, file, line, mw ); mwIncErr(); return 0; } /* ** mwTestBuf: ** Checks a buffers links and pre/postfixes. ** Writes errors found to the log. ** Returns zero if no errors found. */ static int mwTestBuf( mwData* mw, const char* file, int line ) { int retv = 0; char *p; if( file == NULL ) file = "unknown"; if( !mwIsSafeAddr( mw, mwDataSize + mwOverflowZoneSize ) ) { mwWrite( "internal: <%ld> %s(%d): pointer MW-%p is invalid\n", mwCounter, file, line, mw ); mwIncErr(); return 2; } if( mw->check != CHKVAL(mw) ) { mwWrite( "internal: <%ld> %s(%d), info trashed; relinking\n", mwCounter, file, line ); mwIncErr(); if( !mwRelink( mw, file, line ) ) return 2; } if( mw->prev && mw->prev->next != mw ) { mwWrite( "internal: <%ld> %s(%d), buffer <%ld> %s(%d) link1 broken\n", mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line ); mwIncErr(); if( !mwRelink( mw, file, line ) ) retv = 2; } if( mw->next && mw->next->prev != mw ) { mwWrite( "internal: <%ld> %s(%d), buffer <%ld> %s(%d) link2 broken\n", mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line ); mwIncErr(); if( !mwRelink( mw, file, line ) ) retv = 2; } p = ((char*)mw) + mwDataSize; if( mwCheckOF( p ) ) { mwWrite( "underflow: <%ld> %s(%d), %ld bytes alloc'd at <%ld> %s(%d)\n", mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line ); mwIncErr(); retv = 1; } p += mwOverflowZoneSize + mw->size; if( mwIsReadAddr( p, mwOverflowZoneSize ) && mwCheckOF( p ) ) { mwWrite( "overflow: <%ld> %s(%d), %ld bytes alloc'd at <%ld> %s(%d)\n", mwCounter,file,line, (long)mw->size, mw->count, mw->file, mw->line ); mwIncErr(); retv = 1; } return retv; } static void mwDefaultOutFunc( int c ) { if( mwLogR() ) fputc( c, mwLogR() ); } static void mwWrite( const char *format, ... ) { int tot, oflow = 0; va_list mark; mwAutoInit(); if( mwOutFunction == NULL ) mwOutFunction = mwDefaultOutFunc; va_start( mark, format ); tot = vsprintf( mwPrintBuf, format, mark ); va_end( mark ); if( tot >= MW_TRACE_BUFFER ) { mwPrintBuf[MW_TRACE_BUFFER] = 0; oflow = 1; } for(tot=0;mwPrintBuf[tot];tot++) (*mwOutFunction)( mwPrintBuf[tot] ); if( oflow ) { mwWrite( "\ninternal: mwWrite(): WARNING! OUTPUT EXCEEDED %u CHARS: SYSTEM UNSTABLE\n", MW_TRACE_BUFFER-1 ); FLUSH(); } return; } static void mwLogFile( const char *name ) { time_t tid; (void) time( &tid ); if( mwLogR() != NULL ) { fclose( mwLogR() ); mwLogW( NULL ); } if( name == NULL ) return; mwLogW( fopen( name, "a" COMMIT ) ); if( mwLogR() == NULL ) mwWrite( "logfile: failed to open/create file '%s'\n", name ); } /* ** Try to free NML memory until a contiguous allocation of ** 'needed' bytes can be satisfied. If this is not enough ** and the 'urgent' parameter is nonzero, grabbed memory is ** also freed. */ static size_t mwFreeUp( size_t needed, int urgent ) { void *p; mwData *mw, *mw2; char *data; /* free grabbed NML memory */ for(;;) { if( mwDrop_( 1, MW_VAL_NML, 1 ) == 0 ) break; p = malloc( needed ); if( p == NULL ) continue; free( p ); return needed; } /* free normal NML memory */ mw = mwHead; while( mw != NULL ) { if( !(mw->flag & MW_NML) ) mw = mw->next; else { data = ((char*)mw)+mwDataSize+mwOverflowZoneSize; if( mwTestMem( data, mw->size, MW_VAL_NML ) ) { mwIncErr(); mwWrite( "wild pointer: <%ld> NoMansLand %p alloc'd at %s(%d)\n", mw->count, data + mwOverflowZoneSize, mw->file, mw->line ); } mw2 = mw->next; mwUnlink( mw, "mwFreeUp", 0 ); free( mw ); mw = mw2; p = malloc( needed ); if( p == NULL ) continue; free( p ); return needed; } } /* if not urgent (for internal purposes), fail */ if( !urgent ) return 0; /* free grabbed memory */ for(;;) { if( mwDrop_( 1, MW_VAL_GRB, 1 ) == 0 ) break; p = malloc( needed ); if( p == NULL ) continue; free( p ); return needed; } return 0; } static const void * mwTestMem( const void *p, unsigned len, int c ) { const unsigned char *ptr; ptr = (const unsigned char *) p; while( len-- ) { if( *ptr != (unsigned char)c ) return (const void*)ptr; ptr ++; } return NULL; } static int mwStrCmpI( const char *s1, const char *s2 ) { if( s1 == NULL || s2 == NULL ) return 0; while( *s1 ) { if( toupper(*s2) == toupper(*s1) ) { s1++; s2++; continue; } return 1; } return 0; } #define AIPH() if( always_invoked ) { mwWrite("autocheck: <%ld> %s(%d) ", mwCounter, file, line ); always_invoked = 0; } static int mwTestNow( const char *file, int line, int always_invoked ) { int retv = 0; mwData *mw; char *data; if( file && !always_invoked ) mwWrite("check: <%ld> %s(%d), checking %s%s%s\n", mwCounter, file, line, (mwTestFlags & MW_TEST_CHAIN) ? "chain ": "", (mwTestFlags & MW_TEST_ALLOC) ? "alloc ": "", (mwTestFlags & MW_TEST_NML) ? "nomansland ": "" ); if( mwTestFlags & MW_TEST_CHAIN ) { for( mw = mwHead; mw; mw=mw->next ) { if( !mwIsSafeAddr(mw, mwDataSize) ) { AIPH(); mwWrite("check: heap corruption detected\n"); mwIncErr(); return retv + 1; } if( mw->prev ) { if( !mwIsSafeAddr(mw->prev, mwDataSize) ) { AIPH(); mwWrite("check: heap corruption detected\n"); mwIncErr(); return retv + 1; } if( mw==mwHead || mw->prev->next != mw ) { AIPH(); mwWrite("check: heap chain broken, prev link incorrect\n"); mwIncErr(); retv ++; } } if( mw->next ) { if( !mwIsSafeAddr(mw->next, mwDataSize) ) { AIPH(); mwWrite("check: heap corruption detected\n"); mwIncErr(); return retv + 1; } if( mw==mwTail || mw->next->prev != mw ) { AIPH(); mwWrite("check: heap chain broken, next link incorrect\n"); mwIncErr(); retv ++; } } else if( mw!=mwTail ) { AIPH(); mwWrite("check: heap chain broken, tail incorrect\n"); mwIncErr(); retv ++; } } } if( mwTestFlags & MW_TEST_ALLOC ) { for( mw = mwHead; mw; mw=mw->next ) { if( mwTestBuf( mw, file, line ) ) retv ++; } } if( mwTestFlags & MW_TEST_NML ) { for( mw = mwHead; mw; mw=mw->next ) { if( (mw->flag & MW_NML) ) { data = ((char*)mw)+mwDataSize+mwOverflowZoneSize; if( mwTestMem( data, mw->size, MW_VAL_NML ) ) { mwIncErr(); mwWrite( "wild pointer: <%ld> NoMansLand %p alloc'd at %s(%d)\n", mw->count, data + mwOverflowZoneSize, mw->file, mw->line ); } } } } if( file && !always_invoked && !retv ) mwWrite("check: <%ld> %s(%d), complete; no errors\n", mwCounter, file, line ); return retv; } /********************************************************************** ** Statistics **********************************************************************/ static void mwStatReport() { mwStat* ms, *ms2; const char *modname; int modnamelen; /* global statistics report */ mwWrite( "\nMemory usage statistics (global):\n" ); mwWrite( " N)umber of allocations made: %ld\n", mwStatNumAlloc ); mwWrite( " L)argest memory usage : %ld\n", mwStatMaxAlloc ); mwWrite( " T)otal of all alloc() calls: %ld\n", mwStatTotAlloc ); mwWrite( " U)nfreed bytes totals : %ld\n", mwStatCurAlloc ); FLUSH(); if( mwStatLevel < 1 ) return; /* on a per-module basis */ mwWrite( "\nMemory usage statistics (detailed):\n"); mwWrite( " Module/Line Number Largest Total Unfreed \n"); for( ms=mwStatList; ms; ms=ms->next ) { if( ms->line == -1 ) { if( ms->file == NULL || !mwIsReadAddr(ms->file,22) ) modname = ""; else modname = ms->file; modnamelen = strlen(modname); if( modnamelen > 42 ) { modname = modname + modnamelen - 42; } mwWrite(" %-42s %-8ld %-8ld %-8ld %-8ld\n", modname, ms->num, ms->max, ms->total, ms->curr ); if( ms->file && mwStatLevel > 1 ) { for( ms2=mwStatList; ms2; ms2=ms2->next ) { if( ms2->line!=-1 && ms2->file!=NULL && !mwStrCmpI( ms2->file, ms->file ) ) { mwWrite( " %-8d %-8ld %-8ld %-8ld %-8ld\n", ms2->line, ms2->num, ms2->max, ms2->total, ms2->curr ); } } } } } } static mwStat* mwStatGet( const char *file, int line, int makenew ) { mwStat* ms; if( mwStatLevel < 2 ) line = -1; for( ms=mwStatList; ms!=NULL; ms=ms->next ) { if( line != ms->line ) continue; if( file==NULL ) { if( ms->file == NULL ) break; continue; } if( ms->file == NULL ) continue; if( !strcmp( ms->file, file ) ) break; } if( ms != NULL ) return ms; if( !makenew ) return NULL; ms = (mwStat*) malloc( sizeof(mwStat) ); if( ms == NULL ) { if( mwFreeUp( sizeof(mwStat), 0 ) < sizeof(mwStat) || (ms=(mwStat*)malloc(sizeof(mwStat))) == NULL ) { mwWrite("internal: memory low, statistics incomplete for '%s'\n", file ); return NULL; } } ms->file = file; ms->line = line; ms->total = 0L; ms->max = 0L; ms->num = 0L; ms->curr = 0L; ms->next = mwStatList; mwStatList = ms; return ms; } static void mwStatAlloc( size_t size, const char* file, int line ) { mwStat* ms; /* update the module statistics */ ms = mwStatGet( file, -1, 1 ); if( ms != NULL ) { ms->total += (long) size; ms->curr += (long) size; ms->num ++; if( ms->curr > ms->max ) ms->max = ms->curr; } /* update the line statistics */ if( mwStatLevel > 1 && line != -1 && file ) { ms = mwStatGet( file, line, 1 ); if( ms != NULL ) { ms->total += (long) size; ms->curr += (long) size; ms->num ++; if( ms->curr > ms->max ) ms->max = ms->curr; } } } static void mwStatFree( size_t size, const char* file, int line ) { mwStat* ms; /* update the module statistics */ ms = mwStatGet( file, -1, 1 ); if( ms != NULL ) ms->curr -= (long) size; /* update the line statistics */ if( mwStatLevel > 1 && line != -1 && file ) { ms = mwStatGet( file, line, 1 ); if( ms != NULL ) ms->curr -= (long) size; } } /*********************************************************************** ** Safe memory checkers ** ** Using ifdefs, implement the operating-system specific mechanism ** of identifying a piece of memory as legal to access with read ** and write priviliges. Default: return nonzero for non-NULL pointers. ***********************************************************************/ static char mwDummy( char c ) { return c; } #ifndef MW_SAFEADDR #ifdef WIN32 #define MW_SAFEADDR #define WIN32_LEAN_AND_MEAN #include int mwIsReadAddr( const void *p, unsigned len ) { if( p == NULL ) return 0; if( IsBadReadPtr(p,len) ) return 0; return 1; } int mwIsSafeAddr( void *p, unsigned len ) { /* NOTE: For some reason, under Win95 the IsBad... */ /* can return false for invalid pointers. */ if( p == NULL ) return 0; if( IsBadReadPtr(p,len) || IsBadWritePtr(p,len) ) return 0; return 1; } #endif /* WIN32 */ #endif /* MW_SAFEADDR */ #ifndef MW_SAFEADDR #ifdef SIGSEGV #define MW_SAFEADDR typedef void (*mwSignalHandlerPtr)( int ); mwSignalHandlerPtr mwOldSIGSEGV = (mwSignalHandlerPtr) 0; jmp_buf mwSIGSEGVjump; static void mwSIGSEGV( int n ); static void mwSIGSEGV( int n ) { n = n; longjmp( mwSIGSEGVjump, 1 ); } int mwIsReadAddr( const void *p, unsigned len ) { const char *ptr; if( p == NULL ) return 0; if( !len ) return 1; /* set up to catch the SIGSEGV signal */ mwOldSIGSEGV = signal( SIGSEGV, mwSIGSEGV ); if( setjmp( mwSIGSEGVjump ) ) { signal( SIGSEGV, mwOldSIGSEGV ); return 0; } /* read all the bytes in the range */ ptr = (const char *)p; ptr += len; /* the reason for this rather strange construct is that */ /* we want to keep the number of used parameters and locals */ /* to a minimum. if we use len for a counter gcc will complain */ /* it may get clobbered by longjmp() at high warning levels. */ /* it's a harmless warning, but this way we don't have to see it. */ do { ptr --; if( *ptr == 0x7C ) (void) mwDummy( (char)0 ); } while( (const void*) ptr != p ); /* remove the handler */ signal( SIGSEGV, mwOldSIGSEGV ); return 1; } int mwIsSafeAddr( void *p, unsigned len ) { char *ptr; if( p == NULL ) return 0; if( !len ) return 1; /* set up to catch the SIGSEGV signal */ mwOldSIGSEGV = signal( SIGSEGV, mwSIGSEGV ); if( setjmp( mwSIGSEGVjump ) ) { signal( SIGSEGV, mwOldSIGSEGV ); return 0; } /* read and write-back all the bytes in the range */ ptr = (char *)p; ptr += len; /* the reason for this rather strange construct is that */ /* we want to keep the number of used parameters and locals */ /* to a minimum. if we use len for a counter gcc will complain */ /* it may get clobbered by longjmp() at high warning levels. */ /* it's a harmless warning, but this way we don't have to see it. */ do { ptr --; *ptr = mwDummy( *ptr ); } while( (void*) ptr != p ); /* remove the handler */ signal( SIGSEGV, mwOldSIGSEGV ); return 1; } #endif /* SIGSEGV */ #endif /* MW_SAFEADDR */ #ifndef MW_SAFEADDR int mwIsReadAddr( const void *p, unsigned len ) { if( p == NULL ) return 0; if( len == 0 ) return 1; return 1; } int mwIsSafeAddr( void *p, unsigned len ) { if( p == NULL ) return 0; if( len == 0 ) return 1; return 1; } #endif /********************************************************************** ** Mutex handling **********************************************************************/ #if defined(WIN32) || defined(__WIN32__) static void mwMutexInit( void ) { mwGlobalMutex = CreateMutex( NULL, FALSE, NULL); return; } static void mwMutexTerm( void ) { CloseHandle( mwGlobalMutex ); return; } static void mwMutexLock( void ) { if( WaitForSingleObject(mwGlobalMutex, 1000 ) == WAIT_TIMEOUT ) { mwWrite( "mwMutexLock: timed out, possible deadlock\n" ); } return; } static void mwMutexUnlock( void ) { ReleaseMutex( mwGlobalMutex ); return; } #endif #if defined(MW_PTHREADS) || defined(HAVE_PTHREAD_H) static void mwMutexInit( void ) { pthread_mutex_init( &mwGlobalMutex, NULL ); return; } static void mwMutexTerm( void ) { pthread_mutex_destroy( &mwGlobalMutex ); return; } static void mwMutexLock( void ) { pthread_mutex_lock(&mwGlobalMutex); return; } static void mwMutexUnlock( void ) { pthread_mutex_unlock(&mwGlobalMutex); return; } #endif /********************************************************************** ** C++ new & delete **********************************************************************/ #if 0 /* 980317: disabled C++ */ #ifdef __cplusplus #ifndef MEMWATCH_NOCPP int mwNCur = 0; const char *mwNFile = NULL; int mwNLine = 0; class MemWatch { public: MemWatch(); ~MemWatch(); }; MemWatch::MemWatch() { if( mwInited ) return; mwUseAtexit = 0; mwInit(); } MemWatch::~MemWatch() { if( mwUseAtexit ) return; mwTerm(); } /* ** This global new will catch all 'new' calls where MEMWATCH is ** not active. */ void* operator new( unsigned size ) { mwNCur = 0; return mwMalloc( size, "", 0 ); } /* ** This is the new operator that's called when a module uses mwNew. */ void* operator new( unsigned size, const char *file, int line ) { mwNCur = 0; return mwMalloc( size, file, line ); } /* ** This is the new operator that's called when a module uses mwNew[]. ** -- hjc 07/16/02 */ void* operator new[] ( unsigned size, const char *file, int line ) { mwNCur = 0; return mwMalloc( size, file, line ); } /* ** Since this delete operator will recieve ALL delete's ** even those from within libraries, we must accept ** delete's before we've been initialized. Nor can we ** reliably check for wild free's if the mwNCur variable ** is not set. */ void operator delete( void *p ) { if( p == NULL ) return; if( !mwInited ) { free( p ); return; } if( mwNCur ) { mwFree( p, mwNFile, mwNLine ); mwNCur = 0; return; } mwFree_( p ); } void operator delete[]( void *p ) { if( p == NULL ) return; if( !mwInited ) { free( p ); return; } if( mwNCur ) { mwFree( p, mwNFile, mwNLine ); mwNCur = 0; return; } mwFree_( p ); } #endif /* MEMWATCH_NOCPP */ #endif /* __cplusplus */ #endif /* 980317: disabled C++ */ /* MEMWATCH.C */ libpff-20120802/common/config.h.in0000664000175000017500000003675012006536014013462 00000000000000/* common/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS /* Define to 1 if you have the `bindtextdomain' function. */ #undef HAVE_BINDTEXTDOMAIN /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework. */ #undef HAVE_CFLOCALECOPYCURRENT /* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ #undef HAVE_CFPREFERENCESCOPYAPPVALUE /* Define to 1 if you have the `chdir' function. */ #undef HAVE_CHDIR /* Define to 1 if you have the `close' function. */ #undef HAVE_CLOSE /* Define to 1 if you have the `ctime' function. */ #undef HAVE_CTIME /* Define to 1 if you have the ctime_r function. */ #undef HAVE_CTIME_R /* Define to 1 if you have the ctime_r function with a third size argument. */ #undef HAVE_CTIME_R_SIZE /* Define if the GNU dcgettext() function is already present or preinstalled. */ #undef HAVE_DCGETTEXT /* Define to 1 if debug output should be used. */ #undef HAVE_DEBUG_OUTPUT /* Define to 1 if you have the declaration of `memrchr', and to 0 if you don't. */ #undef HAVE_DECL_MEMRCHR /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #undef HAVE_DECL_STRERROR_R /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `fclose' function. */ #undef HAVE_FCLOSE /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `feof' function. */ #undef HAVE_FEOF /* Define to 1 if you have the `fgets' function. */ #undef HAVE_FGETS /* Define to 1 if you have the `fgetws' function. */ #undef HAVE_FGETWS /* Define to 1 if you have the `fopen' function. */ #undef HAVE_FOPEN /* Define to 1 if you have the `fread' function. */ #undef HAVE_FREAD /* Define to 1 if you have the `free' function. */ #undef HAVE_FREE /* Define to 1 if you have the `fseeko' function. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `fseeko64' function. */ #undef HAVE_FSEEKO64 /* Define to 1 if you have the `fstat' function. */ #undef HAVE_FSTAT /* Define to 1 if you have the `ftello' function. */ #undef HAVE_FTELLO /* Define to 1 if you have the `ftello64' function. */ #undef HAVE_FTELLO64 /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `fwrite' function. */ #undef HAVE_FWRITE /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `getenv' function. */ #undef HAVE_GETENV /* Define to 1 if you have the `getopt' function. */ #undef HAVE_GETOPT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_GLOB_H /* Define to 1 if you have the `gmtime' function. */ #undef HAVE_GMTIME /* Define to 1 if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_IO_H /* Define to 1 if Java bindings should be used. */ #undef HAVE_JAVA /* Define if nl_langinfo has CODESET support. */ #undef HAVE_LANGINFO_CODESET /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have the `bfio' library (-lbfio). */ #undef HAVE_LIBBFIO /* Define to 1 if you have the header file. */ #undef HAVE_LIBBFIO_H /* Define to 1 if you have the `cerror' library (-lcerror). */ #undef HAVE_LIBCERROR /* Define to 1 if you have the header file. */ #undef HAVE_LIBCERROR_H /* Define to 1 if you have the `cfile' library (-lcfile). */ #undef HAVE_LIBCFILE /* Define to 1 if you have the header file. */ #undef HAVE_LIBCFILE_H /* Define to 1 if you have the `clocale' library (-lclocale). */ #undef HAVE_LIBCLOCALE /* Define to 1 if you have the header file. */ #undef HAVE_LIBCLOCALE_H /* Define to 1 if you have the `cnotify' library (-lcnotify). */ #undef HAVE_LIBCNOTIFY /* Define to 1 if you have the header file. */ #undef HAVE_LIBCNOTIFY_H /* Define to 1 if you have the `cpath' library (-lcpath). */ #undef HAVE_LIBCPATH /* Define to 1 if you have the header file. */ #undef HAVE_LIBCPATH_H /* Define to 1 if you have the `csplit' library (-lcsplit). */ #undef HAVE_LIBCSPLIT /* Define to 1 if you have the header file. */ #undef HAVE_LIBCSPLIT_H /* Define to 1 if you have the `cstring' library (-lcstring). */ #undef HAVE_LIBCSTRING /* Define to 1 if you have the header file. */ #undef HAVE_LIBCSTRING_H /* Define to 1 if you have the `csystem' library (-lcsystem). */ #undef HAVE_LIBCSYSTEM /* Define to 1 if you have the header file. */ #undef HAVE_LIBCSYSTEM_H /* Define to 1 if you have the `fcache' library (-lfcache). */ #undef HAVE_LIBFCACHE /* Define to 1 if you have the header file. */ #undef HAVE_LIBFCACHE_H /* Define to 1 if you have the `fdata' library (-lfdata). */ #undef HAVE_LIBFDATA /* Define to 1 if you have the header file. */ #undef HAVE_LIBFDATA_H /* Define to 1 if you have the `fdatetime' library (-lfdatetime). */ #undef HAVE_LIBFDATETIME /* Define to 1 if you have the header file. */ #undef HAVE_LIBFDATETIME_H /* Define to 1 if you have the `fguid' library (-lfguid). */ #undef HAVE_LIBFGUID /* Define to 1 if you have the header file. */ #undef HAVE_LIBFGUID_H /* Define to 1 if you have the `fmapi' library (-lfmapi). */ #undef HAVE_LIBFMAPI /* Define to 1 if you have the header file. */ #undef HAVE_LIBFMAPI_H /* Define to 1 if you have the `fvalue' library (-lfvalue). */ #undef HAVE_LIBFVALUE /* Define to 1 if you have the header file. */ #undef HAVE_LIBFVALUE_H /* Define to 1 if you have the `fwnt' library (-lfwnt). */ #undef HAVE_LIBFWNT /* Define to 1 if you have the header file. */ #undef HAVE_LIBFWNT_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `una' library (-luna). */ #undef HAVE_LIBUNA /* Define to 1 if you have the header file. */ #undef HAVE_LIBUNA_H /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `localeconv' function. */ #undef HAVE_LOCALECONV /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `localtime' function. */ #undef HAVE_LOCALTIME /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if the local version of libbfio is used. */ #undef HAVE_LOCAL_LIBBFIO /* Define to 1 if the local version of libcerror is used. */ #undef HAVE_LOCAL_LIBCERROR /* Define to 1 if the local version of libcfile is used. */ #undef HAVE_LOCAL_LIBCFILE /* Define to 1 if the local version of libclocale is used. */ #undef HAVE_LOCAL_LIBCLOCALE /* Define to 1 if the local version of libcnotify is used. */ #undef HAVE_LOCAL_LIBCNOTIFY /* Define to 1 if the local version of libcpath is used. */ #undef HAVE_LOCAL_LIBCPATH /* Define to 1 if the local version of libcsplit is used. */ #undef HAVE_LOCAL_LIBCSPLIT /* Define to 1 if the local version of libcstring is used. */ #undef HAVE_LOCAL_LIBCSTRING /* Define to 1 if the local version of libcsystem is used. */ #undef HAVE_LOCAL_LIBCSYSTEM /* Define to 1 if the local version of libfcache is used. */ #undef HAVE_LOCAL_LIBFCACHE /* Define to 1 if the local version of libfdata is used. */ #undef HAVE_LOCAL_LIBFDATA /* Define to 1 if the local version of libfdatetime is used. */ #undef HAVE_LOCAL_LIBFDATETIME /* Define to 1 if the local version of libfguid is used. */ #undef HAVE_LOCAL_LIBFGUID /* Define to 1 if the local version of libfmapi is used. */ #undef HAVE_LOCAL_LIBFMAPI /* Define to 1 if the local version of libfvalue is used. */ #undef HAVE_LOCAL_LIBFVALUE /* Define to 1 if the local version of libfwnt is used. */ #undef HAVE_LOCAL_LIBFWNT /* Define to 1 if the local version of libuna is used. */ #undef HAVE_LOCAL_LIBUNA /* Define to 1 if you have the `lseek' function. */ #undef HAVE_LSEEK /* Define to 1 if you have the `malloc' function. */ #undef HAVE_MALLOC /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the `memcmp' function. */ #undef HAVE_MEMCMP /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memrchr' function. */ #undef HAVE_MEMRCHR /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the mkdir function. */ #undef HAVE_MKDIR /* Define to 1 if you have the mkdir function with a second mode argument. */ #undef HAVE_MKDIR_MODE /* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if you have the `open' function. */ #undef HAVE_OPEN /* Define to 1 whether printf supports the conversion specifier "%jd". */ #undef HAVE_PRINTF_JD /* Define to 1 whether printf supports the conversion specifier "%zd". */ #undef HAVE_PRINTF_ZD /* Define to 1 if you have Python */ #undef HAVE_PYTHON /* Define to 1 if you have the `read' function. */ #undef HAVE_READ /* Define to 1 if you have the `realloc' function. */ #undef HAVE_REALLOC /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `setvbuf' function. */ #undef HAVE_SETVBUF /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `sscanf' function. */ #undef HAVE_SSCANF /* Define to 1 if you have the `stat' function. */ #undef HAVE_STAT /* Define to 1 if you have the header file. */ #undef HAVE_STDARG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlen' function. */ #undef HAVE_STRLEN /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strncmp' function. */ #undef HAVE_STRNCMP /* Define to 1 if you have the `strncpy' function. */ #undef HAVE_STRNCPY /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `swprintf' function. */ #undef HAVE_SWPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIGNAL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `textdomain' function. */ #undef HAVE_TEXTDOMAIN /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME /* Define to 1 if you have the `towlower' function. */ #undef HAVE_TOWLOWER /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_VARARGS_H /* Define to 1 if verbose output should be used. */ #undef HAVE_VERBOSE_OUTPUT /* Define to 1 if you have the `vfprintf' function. */ #undef HAVE_VFPRINTF /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Define to 1 if you have the `wcscasecmp' function. */ #undef HAVE_WCSCASECMP /* Define to 1 if you have the `wcschr' function. */ #undef HAVE_WCSCHR /* Define to 1 if you have the `wcslen' function. */ #undef HAVE_WCSLEN /* Define to 1 if you have the `wcsncasecmp' function. */ #undef HAVE_WCSNCASECMP /* Define to 1 if you have the `wcsncmp' function. */ #undef HAVE_WCSNCMP /* Define to 1 if you have the `wcsncpy' function. */ #undef HAVE_WCSNCPY /* Define to 1 if you have the `wcsrchr' function. */ #undef HAVE_WCSRCHR /* Define to 1 if you have the `wcsstr' function. */ #undef HAVE_WCSSTR /* Define to 1 if you have the `wcstombs' function. */ #undef HAVE_WCSTOMBS /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H /* Define to 1 if wide character type should be used. */ #undef HAVE_WIDE_CHARACTER_TYPE /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define to 1 if you have the `wmemchr' function. */ #undef HAVE_WMEMCHR /* Define to 1 if you have the `wmemcmp' function. */ #undef HAVE_WMEMCMP /* Define to 1 if you have the `wmemcpy' function. */ #undef HAVE_WMEMCPY /* Define to 1 if you have the `wmemrchr' function. */ #undef HAVE_WMEMRCHR /* Define to 1 if you have the `write' function. */ #undef HAVE_WRITE /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T /* The size of `size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T /* The size of `wchar_t', as computed by sizeof. */ #undef SIZEOF_WCHAR_T /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile libpff-20120802/libfguid/0000775000175000017500000000000012006536213012002 500000000000000libpff-20120802/libfguid/libfguid_identifier.c0000644000175000017500000007213712005153140016056 00000000000000/* * GUID functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfguid_definitions.h" #include "libfguid_identifier.h" #include "libfguid_libcerror.h" #include "libfguid_types.h" /* Initialize an identifier * Returns 1 if successful or -1 on error */ int libfguid_identifier_initialize( libfguid_identifier_t **identifier, libcerror_error_t **error ) { libfguid_internal_identifier_t *internal_identifier = NULL; static char *function = "libfguid_identifier_initialize"; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( *identifier != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid identifier value already set.", function ); return( -1 ); } internal_identifier = memory_allocate_structure( libfguid_internal_identifier_t ); if( internal_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create identifier.", function ); goto on_error; } if( memory_set( internal_identifier, 0, sizeof( libfguid_internal_identifier_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear identifier.", function ); goto on_error; } *identifier = (libfguid_identifier_t *) internal_identifier; return( 1 ); on_error: if( internal_identifier != NULL ) { memory_free( internal_identifier ); } return( -1 ); } /* Frees an identifier * Returns 1 if successful or -1 on error */ int libfguid_identifier_free( libfguid_identifier_t **identifier, libcerror_error_t **error ) { libfguid_internal_identifier_t *internal_identifier = NULL; static char *function = "libfguid_identifier_free"; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( *identifier != NULL ) { internal_identifier = (libfguid_internal_identifier_t *) *identifier; *identifier = NULL; memory_free( internal_identifier ); } return( 1 ); } /* Copies the identifier from a byte stream * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_from_byte_stream( libfguid_identifier_t *identifier, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfguid_internal_identifier_t *internal_identifier = NULL; static char *function = "libfguid_identifier_copy_from_byte_stream"; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFGUID_ENDIAN_BIG ) && ( byte_order != LIBFGUID_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBFGUID_ENDIAN_LITTLE ) { byte_stream_copy_to_uint32_little_endian( byte_stream, internal_identifier->time.lower ); byte_stream += 4; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_identifier->time.middle ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_identifier->time.upper ); byte_stream += 2; } else if( byte_order == LIBFGUID_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, internal_identifier->time.lower ); byte_stream += 4; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_identifier->time.middle ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_identifier->time.upper ); byte_stream += 2; } internal_identifier->clock_sequence.upper = byte_stream[ 0 ]; internal_identifier->clock_sequence.lower = byte_stream[ 1 ]; internal_identifier->node[ 0 ] = byte_stream[ 2 ]; internal_identifier->node[ 1 ] = byte_stream[ 3 ]; internal_identifier->node[ 2 ] = byte_stream[ 4 ]; internal_identifier->node[ 3 ] = byte_stream[ 5 ]; internal_identifier->node[ 4 ] = byte_stream[ 6 ]; internal_identifier->node[ 5 ] = byte_stream[ 7 ]; return( 1 ); } /* Retrieves the size of an UTF-8 encoded string of the identifier * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_get_string_size( libfguid_identifier_t *identifier, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_get_string_size"; uint32_t supported_flags = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_USE_UPPER_CASE | LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } *string_size = 37; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { *string_size += 2; } return( 1 ); } /* Copies the identifier to an UTF-8 encoded string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_utf8_string( libfguid_identifier_t *identifier, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfguid_identifier_copy_to_utf8_string_with_index( identifier, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy identifier to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies the identifier to an UTF-8 encoded string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_utf8_string_with_index( libfguid_identifier_t *identifier, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfguid_internal_identifier_t *internal_identifier = NULL; static char *function = "libfguid_identifier_copy_to_utf8_string_with_index"; size_t string_index = 0; size_t string_size = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t node_index = 0; int8_t byte_shift = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-8 string size exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 index.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_USE_UPPER_CASE | LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_size = 37; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { string_size += 2; } string_index = *utf8_string_index; if( ( string_index + string_size ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) '{'; } byte_shift = 28; do { byte_value = ( internal_identifier->time.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'A' + byte_value - 10; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) '-'; byte_shift = 12; do { byte_value = ( internal_identifier->time.middle >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'A' + byte_value - 10; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) '-'; byte_shift = 12; do { byte_value = ( internal_identifier->time.upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'A' + byte_value - 10; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) '-'; byte_shift = 4; do { byte_value = ( internal_identifier->clock_sequence.upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'A' + byte_value - 10; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); byte_shift = 4; do { byte_value = ( internal_identifier->clock_sequence.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'A' + byte_value - 10; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) '-'; for( node_index = 0; node_index < 6; node_index++ ) { byte_shift = 4; do { byte_value = ( internal_identifier->node[ node_index ] >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'A' + byte_value - 10; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { utf8_string[ string_index++ ] = (uint8_t) '}'; } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Copies the identifier to an UTF-16 encoded string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_utf16_string( libfguid_identifier_t *identifier, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfguid_identifier_copy_to_utf16_string_with_index( identifier, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy identifier to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies the identifier to an UTF-16 encoded string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_utf16_string_with_index( libfguid_identifier_t *identifier, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfguid_internal_identifier_t *internal_identifier = NULL; static char *function = "libfguid_identifier_copy_to_utf16_string_with_index"; size_t string_index = 0; size_t string_size = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t node_index = 0; int8_t byte_shift = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-16 string size exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 index.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_USE_UPPER_CASE | LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_size = 37; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { string_size += 2; } string_index = *utf16_string_index; if( ( string_index + string_size ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '{'; } string_index = *utf16_string_index; byte_shift = 28; do { byte_value = ( internal_identifier->time.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'A' + byte_value - 10; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) '-'; byte_shift = 12; do { byte_value = ( internal_identifier->time.middle >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'A' + byte_value - 10; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) '-'; byte_shift = 12; do { byte_value = ( internal_identifier->time.upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'A' + byte_value - 10; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) '-'; byte_shift = 4; do { byte_value = ( internal_identifier->clock_sequence.upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'A' + byte_value - 10; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); byte_shift = 4; do { byte_value = ( internal_identifier->clock_sequence.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'A' + byte_value - 10; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) '-'; for( node_index = 0; node_index < 6; node_index++ ) { byte_shift = 4; do { byte_value = ( internal_identifier->node[ node_index ] >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'A' + byte_value - 10; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '}'; } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Copies the identifier to an UTF-32 encoded string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_utf32_string( libfguid_identifier_t *identifier, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfguid_identifier_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfguid_identifier_copy_to_utf32_string_with_index( identifier, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy identifier to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies the identifier to an UTF-32 encoded string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfguid_identifier_copy_to_utf32_string_with_index( libfguid_identifier_t *identifier, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfguid_internal_identifier_t *internal_identifier = NULL; static char *function = "libfguid_identifier_copy_to_utf32_string_with_index"; size_t string_index = 0; size_t string_size = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t node_index = 0; int8_t byte_shift = 0; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } internal_identifier = (libfguid_internal_identifier_t *) identifier; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-32 string size exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 index.", function ); return( -1 ); } supported_flags = LIBFGUID_STRING_FORMAT_USE_LOWER_CASE | LIBFGUID_STRING_FORMAT_USE_UPPER_CASE | LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_size = 37; if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { string_size += 2; } string_index = *utf32_string_index; if( ( string_index + string_size ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '{'; } string_index = *utf32_string_index; byte_shift = 28; do { byte_value = ( internal_identifier->time.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'A' + byte_value - 10; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) '-'; byte_shift = 12; do { byte_value = ( internal_identifier->time.middle >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'A' + byte_value - 10; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) '-'; byte_shift = 12; do { byte_value = ( internal_identifier->time.upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'A' + byte_value - 10; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) '-'; byte_shift = 4; do { byte_value = ( internal_identifier->clock_sequence.upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'A' + byte_value - 10; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); byte_shift = 4; do { byte_value = ( internal_identifier->clock_sequence.lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'A' + byte_value - 10; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) '-'; for( node_index = 0; node_index < 6; node_index++ ) { byte_shift = 4; do { byte_value = ( internal_identifier->node[ node_index ] >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_UPPER_CASE ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'A' + byte_value - 10; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); } if( ( string_format_flags & LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES ) != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '}'; } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } libpff-20120802/libfguid/libfguid_support.c0000644000175000017500000000216012005153140015435 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfguid_definitions.h" #include "libfguid_support.h" #if !defined( HAVE_LOCAL_LIBFGUID ) /* Returns the library version as a string */ const char *libfguid_get_version( void ) { return( (const char *) LIBFGUID_VERSION_STRING ); } #endif libpff-20120802/libfguid/Makefile.am0000644000175000017500000000132012005153140013741 00000000000000if HAVE_LOCAL_LIBFGUID AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfguid.la libfguid_la_SOURCES = \ libfguid_definitions.h \ libfguid_extern.h \ libfguid_error.c libfguid_error.h \ libfguid_identifier.c libfguid_identifier.h \ libfguid_libcerror.h \ libfguid_libcstring.h \ libfguid_support.c libfguid_support.h \ libfguid_types.h \ libfguid_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) libpff-20120802/libfguid/libfguid_support.h0000644000175000017500000000220412005153140015441 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_SUPPORT_H ) #define _LIBFGUID_SUPPORT_H #include #include #include "libfguid_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFGUID ) LIBFGUID_EXTERN \ const char *libfguid_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfguid/libfguid_definitions.h0000644000175000017500000000414012005153140016241 00000000000000/* * The internal definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFGUID_INTERNAL_DEFINITIONS_H ) #define LIBFGUID_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if !defined( HAVE_LOCAL_LIBFGUID ) #include /* The definitions in are copied here * for local use of libfguid */ #else #include #define LIBFGUID_VERSION 20120701 /* The version string */ #define LIBFGUID_VERSION_STRING "20120701" /* The byte order definitions */ #define LIBFGUID_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFGUID_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* The GUID identifier version definitions */ enum LIBFGUID_IDENTIFIER_VERSIONS { LIBFGUID_IDENTIFIER_VERSION_TIME_BASED = 1, LIBFGUID_IDENTIFIER_VERSION_DCE = 2, LIBFGUID_IDENTIFIER_VERSION_NAME_BASED = 3, LIBFGUID_IDENTIFIER_VERSION_RANDOM_BASED = 4 }; /* The string format definition flags */ enum LIBFGUID_STRING_FORMAT_FLAGS { /* Format the using lower case */ LIBFGUID_STRING_FORMAT_USE_LOWER_CASE = 0x00000001UL, /* Format the using upper case */ LIBFGUID_STRING_FORMAT_USE_UPPER_CASE = 0x00000002UL, /* Format the using surrounding braces { GUID } */ LIBFGUID_STRING_FORMAT_USE_SURROUNDING_BRACES = 0x00000004UL }; #endif #endif libpff-20120802/libfguid/libfguid_identifier.h0000644000175000017500000000737712005153140016067 00000000000000/* * Global (or Universal) Unique Identifier (GUID/UUID) functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_IDENTIFIER_H ) #define _LIBFGUID_INTERNAL_IDENTIFIER_H #include #include #include "libfguid_extern.h" #include "libfguid_libcerror.h" #include "libfguid_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfguid_internal_identifier libfguid_internal_identifier_t; /* The GUID is stored as: * uint32 - uint16 - uint16 - 8 byte array */ struct libfguid_internal_identifier { /* The 4 MSB of the time upper contain the version */ struct { uint32_t lower; uint16_t middle; uint16_t upper; } time; /* The clock sequence upper also contains the reserved */ struct { uint8_t upper; uint8_t lower; } clock_sequence; uint8_t node[ 6 ]; }; LIBFGUID_EXTERN \ int libfguid_identifier_initialize( libfguid_identifier_t **identifier, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_free( libfguid_identifier_t **identifier, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_from_byte_stream( libfguid_identifier_t *identifier, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_get_string_size( libfguid_identifier_t *identifier, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_to_utf8_string( libfguid_identifier_t *identifier, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_to_utf8_string_with_index( libfguid_identifier_t *identifier, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_to_utf16_string( libfguid_identifier_t *identifier, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_to_utf16_string_with_index( libfguid_identifier_t *identifier, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_to_utf32_string( libfguid_identifier_t *identifier, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFGUID_EXTERN \ int libfguid_identifier_copy_to_utf32_string_with_index( libfguid_identifier_t *identifier, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfguid/libfguid_unused.h0000644000175000017500000000247012005153140015235 00000000000000/* * The internal unused definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_UNUSED_H ) #define _LIBFGUID_INTERNAL_UNUSED_H #include #if !defined( LIBFGUID_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFGUID_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFGUID_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFGUID_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFGUID_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libfguid/libfguid_error.h0000644000175000017500000000325512005153140015065 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_ERROR_H ) #define _LIBFGUID_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFGUID ) #include #endif #include "libfguid_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFGUID ) LIBFGUID_EXTERN \ void libfguid_error_free( libfguid_error_t **error ); LIBFGUID_EXTERN \ int libfguid_error_fprint( libfguid_error_t *error, FILE *stream ); LIBFGUID_EXTERN \ int libfguid_error_sprint( libfguid_error_t *error, char *string, size_t size ); LIBFGUID_EXTERN \ int libfguid_error_backtrace_fprint( libfguid_error_t *error, FILE *stream ); LIBFGUID_EXTERN \ int libfguid_error_backtrace_sprint( libfguid_error_t *error, char *string, size_t size ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfguid/libfguid_libcerror.h0000644000175000017500000000252312005153140015714 00000000000000/* * The internal libcerror header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_LIBCERROR_H ) #define _LIBFGUID_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfguid/Makefile.in0000664000175000017500000006214612006536016014001 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfguid DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfguid_la_LIBADD = am__libfguid_la_SOURCES_DIST = libfguid_definitions.h \ libfguid_extern.h libfguid_error.c libfguid_error.h \ libfguid_identifier.c libfguid_identifier.h \ libfguid_libcerror.h libfguid_libcstring.h libfguid_support.c \ libfguid_support.h libfguid_types.h libfguid_unused.h @HAVE_LOCAL_LIBFGUID_TRUE@am_libfguid_la_OBJECTS = libfguid_error.lo \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_identifier.lo \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_support.lo libfguid_la_OBJECTS = $(am_libfguid_la_OBJECTS) @HAVE_LOCAL_LIBFGUID_TRUE@am_libfguid_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfguid_la_SOURCES) DIST_SOURCES = $(am__libfguid_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFGUID_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFGUID_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFGUID_TRUE@noinst_LTLIBRARIES = libfguid.la @HAVE_LOCAL_LIBFGUID_TRUE@libfguid_la_SOURCES = \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_definitions.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_extern.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_error.c libfguid_error.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_identifier.c libfguid_identifier.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_libcerror.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_libcstring.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_support.c libfguid_support.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_types.h \ @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfguid/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfguid/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfguid.la: $(libfguid_la_OBJECTS) $(libfguid_la_DEPENDENCIES) $(LINK) $(am_libfguid_la_rpath) $(libfguid_la_OBJECTS) $(libfguid_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfguid_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfguid ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfguid_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfguid/libfguid_error.c0000644000175000017500000000464312005153140015062 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfguid_error.h" #include "libfguid_libcerror.h" #if !defined( HAVE_LOCAL_LIBFGUID ) /* Free an error and its elements */ void libfguid_error_free( libfguid_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfguid_error_fprint( libfguid_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfguid_error_sprint( libfguid_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfguid_error_backtrace_fprint( libfguid_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfguid_error_backtrace_sprint( libfguid_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif libpff-20120802/libfguid/libfguid_libcstring.h0000644000175000017500000000272412005153140016074 00000000000000/* * The internal libcstring header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_LIBCSTRING_H ) #define _LIBFGUID_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfguid/libfguid_types.h0000644000175000017500000000254112005153140015075 00000000000000/* * The internal type definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_TYPES_H ) #define _LIBFGUID_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid * The definitions in are copied here * for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfguid_identifier {} libfguid_identifier_t; #else typedef intptr_t libfguid_identifier_t; #endif #endif #endif libpff-20120802/libfguid/libfguid_extern.h0000644000175000017500000000241412005153140015235 00000000000000/* * The internal extern definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFGUID_INTERNAL_EXTERN_H ) #define _LIBFGUID_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if !defined( HAVE_LOCAL_LIBFGUID ) /* If libtool DLL support is enabled set LIBFGUID_DLL_EXPORT * before including libfguid/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFGUID_DLL_EXPORT #endif #include #else #define LIBFGUID_EXTERN extern #endif #endif libpff-20120802/tests/0000775000175000017500000000000012006536214011360 500000000000000libpff-20120802/tests/Makefile.am0000644000175000017500000000064411434713174013344 00000000000000AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ -I$(top_srcdir)/libcstring \ -I$(top_srcdir)/liberror \ -I$(top_srcdir)/libsystem \ @MEMWATCH_CPPFLAGS@ TESTS = check_SCRIPTS = EXTRA_DIST = \ $(check_SCRIPTS) check_PROGRAMS = \ pff1 pff1_SOURCES = \ pff1.c pff1_LDADD = \ ../libpff/libpff.la MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/tests/pff1.c0000644000175000017500000001003211434772370012303 00000000000000#include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include #define TOUCH_ITEMS int touch_item( libpff_item_t *item ) { libpff_error_t *error = NULL; libpff_item_t *sub_item = NULL; size_t value_string_size = 0; int number_of_sub_items = 0; int sub_item_index = 0; if( item == NULL ) { fprintf( stderr, "Invalid item.\n" ); return( -1 ); } libpff_item_get_display_name_size( item, &value_string_size, NULL ); if( libpff_item_get_number_of_sub_items( item, &number_of_sub_items, &error ) != 1 ) { fprintf( stderr, "Unable to retrieve number of sub items.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( -1 ); } for( sub_item_index = 0; sub_item_index < number_of_sub_items; sub_item_index++ ) { if( libpff_item_get_sub_item( item, sub_item_index, &sub_item, &error ) != 1 ) { fprintf( stderr, "Unable to retrieve sub item: %d.\n", sub_item_index ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( -1 ); } if( touch_item( sub_item ) != 1 ) { fprintf( stderr, "Unable to touch sub item: %d.\n", sub_item_index ); return( -1 ); } if( libpff_item_free( &sub_item, &error ) != 1 ) { fprintf( stderr, "Unable to free sub item: %d.\n", sub_item_index ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( -1 ); } } return( 1 ); } int main( int argc, char * const argv[] ) { libpff_error_t *error = NULL; libpff_file_t *file = NULL; libpff_item_t *item = NULL; int number_of_recovered_items = 0; if( argc < 2 ) { fprintf( stderr, "Missing filename.\n" ); return( EXIT_FAILURE ); } if( libpff_file_initialize( &file, &error ) != 1 ) { fprintf( stderr, "Unable to create file.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } if( libpff_file_open( file, argv[ 1 ], LIBPFF_OPEN_READ, &error ) != 1 ) { fprintf( stderr, "Unable to open: %s.\n", argv[ 1 ] ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } if( libpff_file_get_root_folder( file, &item, &error ) != 1 ) { fprintf( stderr, "Unable to retrieve root folder item.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } #if defined( TOUCH_ITEMS ) if( touch_item( item ) != 1 ) { fprintf( stderr, "Unable to touch root folder item.\n" ); return( EXIT_FAILURE ); } #endif if( libpff_file_recover_items( file, 0, &error ) != 1 ) { fprintf( stderr, "Unable to recover items.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } if( libpff_file_get_number_of_recovered_items( file, &number_of_recovered_items, &error ) != 1 ) { fprintf( stderr, "Unable to retrieve number of recover items.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } fprintf( stdout, "Number of recovered items: %d\n", number_of_recovered_items ); if( libpff_file_close( file, &error ) != 0 ) { fprintf( stderr, "Unable to close file.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } if( libpff_file_free( &file, &error ) != 1 ) { fprintf( stderr, "Unable to free file.\n" ); libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } return( EXIT_SUCCESS ); } libpff-20120802/tests/Makefile.in0000664000175000017500000006474612006536016013366 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ TESTS = check_PROGRAMS = pff1$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am_pff1_OBJECTS = pff1.$(OBJEXT) pff1_OBJECTS = $(am_pff1_OBJECTS) pff1_DEPENDENCIES = ../libpff/libpff.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(pff1_SOURCES) DIST_SOURCES = $(pff1_SOURCES) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ -I$(top_srcdir)/libcstring \ -I$(top_srcdir)/liberror \ -I$(top_srcdir)/libsystem \ @MEMWATCH_CPPFLAGS@ check_SCRIPTS = EXTRA_DIST = \ $(check_SCRIPTS) pff1_SOURCES = \ pff1.c pff1_LDADD = \ ../libpff/libpff.la MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list pff1$(EXEEXT): $(pff1_OBJECTS) $(pff1_DEPENDENCIES) @rm -f pff1$(EXEEXT) $(LINK) $(pff1_OBJECTS) $(pff1_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pff1.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libclocale/0000775000175000017500000000000012006536212012305 500000000000000libpff-20120802/libclocale/libclocale_support.c0000644000175000017500000000564311765042346016277 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_LIBINTL_H ) #include #endif #include "libclocale_codepage.h" #include "libclocale_definitions.h" #include "libclocale_libcerror.h" #include "libclocale_locale.h" #include "libclocale_support.h" #if !defined( HAVE_LOCAL_LIBCLOCALE ) /* Returns the library version as a string */ const char *libclocale_get_version( void ) { return( (const char *) LIBCLOCALE_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ /* Initializes the locale values * Returns 1 if successful or -1 on error */ int libclocale_initialize( const char *domain_name, libcerror_error_t **error ) { static char *function = "libclocale_initialize"; #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int codepage = 0; #endif if( domain_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid domain name.", function ); return( -1 ); } #if defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) if( bindtextdomain( domain_name, LOCALEDIR ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to bind text domain.", function ); return( -1 ); } if( textdomain( domain_name ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set text domain.", function ); return( -1 ); } #endif #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_locale_get_codepage( &codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve codepage.", function ); return( -1 ); } if( libclocale_codepage_set( codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set codepage.", function ); return( -1 ); } #endif return( 1 ); } libpff-20120802/libclocale/libclocale_locale.h0000644000175000017500000000270711765042346016025 00000000000000/* * Locale functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_LOCALE_H ) #define _LIBCLOCALE_LOCALE_H #include #include #include "libclocale_extern.h" #include "libclocale_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER < 0x0500 ) int libclocale_GetLocaleInfo( LCID locale_identifier, LCTYPE locale_type, LPSTR buffer, int size ); #endif LIBCLOCALE_EXTERN \ int libclocale_locale_get_codepage( int *codepage, libcerror_error_t **error ); LIBCLOCALE_EXTERN \ int libclocale_locale_get_decimal_point( int *decimal_point, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libclocale/Makefile.am0000644000175000017500000000137711745432145014300 00000000000000if HAVE_LOCAL_LIBCLOCALE AM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libclocale.la libclocale_la_SOURCES = \ libclocale_codepage.c libclocale_codepage.h \ libclocale_definitions.h \ libclocale_extern.h \ libclocale_libcerror.h \ libclocale_libcstring.h \ libclocale_locale.c libclocale_locale.h \ libclocale_support.c libclocale_support.h \ libclocale_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) libpff-20120802/libclocale/libclocale_locale.c0000644000175000017500000002277311765042346016025 00000000000000/* * Locale functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #include #elif defined( HAVE_LOCALE_H ) #include #endif #if defined( HAVE_LANGINFO_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libclocale_definitions.h" #include "libclocale_codepage.h" #include "libclocale_libcstring.h" #include "libclocale_locale.h" #if defined( WINAPI ) && ( WINVER < 0x0500 ) /* Cross Windows safe version of GetLocaleInfoA * Returns the number of bytes read if successful or 0 on error */ int libclocale_GetLocaleInfoA( LCID locale_identifier, LCTYPE locale_type, LPSTR buffer, int size ) { FARPROC function = NULL; HMODULE library_handle = NULL; int result = 0; library_handle = LoadLibrary( _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( 0 ); } function = GetProcAddress( library_handle, (LPCSTR) "GetLocaleInfoA" ); if( function != NULL ) { result = function( locale_identifier, locale_type, buffer, size ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = 0; } return( result ); } #endif /* Retrieves the codepage for the locale character set * The codepage is set to 0 if the character set is UTF-8 * and wlll default to LIBCLOCALE_CODEPAGE_ASCII the codepage cannot be determined * Returns 1 if success, 0 if no codepage could be found or -1 on error */ int libclocale_locale_get_codepage( int *codepage, libcerror_error_t **error ) { char *locale = NULL; char *charset = NULL; static char *function = "libclocale_locale_get_codepage"; size_t charset_length = 0; size_t locale_length = 0; if( codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid codepage.", function ); return( -1 ); } #if defined( HAVE_LANGINFO_CODESET ) charset = nl_langinfo( CODESET ); #endif if( ( charset != NULL ) && ( charset[ 0 ] != 0 ) ) { charset_length = libcstring_narrow_string_length( charset ); } else { #if defined( HAVE_SETLOCALE ) || ( defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 ) locale = setlocale( LC_CTYPE, "" ); /* Check if the locale returned is not "C" */ if( ( locale != NULL ) && ( locale[ 0 ] != 0 ) ) { if( ( locale[ 0 ] == 'C' ) && ( locale[ 1 ] != 0 ) ) { locale = NULL; } } #endif #if defined( HAVE_GETENV ) || defined( WINAPI ) /* Check if the locale can be determined from the environment variables */ if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { locale = getenv( "LC_ALL" ); } if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { locale = getenv( "LC_TYPE" ); } if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { locale = getenv( "LANG" ); } #endif if( ( locale == NULL ) || ( locale[ 0 ] == 0 ) ) { return( LIBCLOCALE_CODEPAGE_ASCII ); } locale_length = libcstring_narrow_string_length( locale ); charset = libcstring_narrow_string_search_character( locale, '.', locale_length + 1 ); if( charset == NULL ) { return( LIBCLOCALE_CODEPAGE_ASCII ); } charset++; charset_length = locale_length - (size_t) ( charset - locale ); } /* Determine codepage */ *codepage = LIBCLOCALE_CODEPAGE_ASCII; if( *codepage == LIBCLOCALE_CODEPAGE_ASCII ) { if( charset_length == 5 ) { if( libcstring_narrow_string_compare( "UTF-8", charset, 5 ) == 0 ) { *codepage = 0; } } } if( *codepage == LIBCLOCALE_CODEPAGE_ASCII ) { if( charset_length >= 3 ) { if( libcstring_narrow_string_compare( "874", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_874; } else if( libcstring_narrow_string_compare( "932", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_932; } else if( libcstring_narrow_string_compare( "936", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_936; } else if( libcstring_narrow_string_compare( "949", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949; } else if( libcstring_narrow_string_compare( "950", charset, 3 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_950; } } } if( *codepage == LIBCLOCALE_CODEPAGE_ASCII ) { if( charset_length >= 4 ) { if( libcstring_narrow_string_compare( "1250", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1250; } else if( libcstring_narrow_string_compare( "1251", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1251; } else if( libcstring_narrow_string_compare( "1252", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1252; } else if( libcstring_narrow_string_compare( "1253", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1253; } else if( libcstring_narrow_string_compare( "1254", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1254; } else if( libcstring_narrow_string_compare( "1255", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1255; } else if( libcstring_narrow_string_compare( "1256", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1256; } else if( libcstring_narrow_string_compare( "1257", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1257; } else if( libcstring_narrow_string_compare( "1258", charset, 4 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1258; } else if( libcstring_narrow_string_compare( "utf8", charset, 4 ) == 0 ) { *codepage = 0; } } } return( 1 ); } /* Retrieves the decimal point * Returns 1 if successful or -1 on error */ int libclocale_locale_get_decimal_point( int *decimal_point, libcerror_error_t **error ) { static char *function = "libclocale_locale_get_decimal_point"; #if defined( WINAPI ) DWORD error_code = 0; DWORD locale_data = 0; #else struct lconv *locale_data = NULL; #endif if( decimal_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid decimal point.", function ); return( -1 ); } *decimal_point = -1; #if defined( WINAPI ) #if ( WINVER >= 0x0600 ) if( GetLocaleInfoEx( LOCALE_NAME_USER_DEFAULT, LOCALE_SDECIMAL, (LPWSTR) &locale_data, sizeof( DWORD ) / sizeof( wchar_t ) ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve locale information.", function ); return( -1 ); } #elif ( WINVER >= 0x0500 ) if( GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) &locale_data, sizeof( DWORD ) / sizeof( char ) ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve locale information.", function ); return( -1 ); } #else if( libclocale_GetLocaleInfoA( LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, (LPSTR) &locale_data, sizeof( DWORD ) / sizeof( char ) ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve locale information.", function ); return( -1 ); } #endif *decimal_point = (int) locale_data; #else locale_data = localeconv(); if( locale_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid locale data.", function ); return( -1 ); } if( locale_data->decimal_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid locale data - missing decimal point.", function ); return( -1 ); } *decimal_point = ( locale_data->decimal_point )[ 0 ]; #endif return( 1 ); } libpff-20120802/libclocale/libclocale_extern.h0000644000175000017500000000243711765042346016073 00000000000000/* * The internal extern definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_INTERNAL_EXTERN_H ) #define _LIBCLOCALE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if !defined( HAVE_LOCAL_LIBCLOCALE ) /* If libtool DLL support is enabled set LIBCLOCALE_DLL_EXPORT * before including libclocale/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCLOCALE_DLL_EXPORT #endif #include #else #define LIBCLOCALE_EXTERN extern #endif #endif libpff-20120802/libclocale/libclocale_unused.h0000644000175000017500000000250611765042346016066 00000000000000/* * The internal unused definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_INTERNAL_UNUSED_H ) #define _LIBCLOCALE_INTERNAL_UNUSED_H #include #if !defined( LIBCLOCALE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCLOCALE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCLOCALE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCLOCALE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCLOCALE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libclocale/libclocale_support.h0000644000175000017500000000253611765042346016302 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_SUPPORT_H ) #define _LIBCLOCALE_SUPPORT_H #include #include #include #include "libclocale_extern.h" #include "libclocale_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCLOCALE ) LIBCLOCALE_EXTERN \ const char *libclocale_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */ LIBCLOCALE_EXTERN \ int libclocale_initialize( const char *domain_name, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libclocale/libclocale_definitions.h0000644000175000017500000000244511765042346017100 00000000000000/* * The internal definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_INTERNAL_DEFINITIONS_H ) #define _LIBCLOCALE_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if !defined( HAVE_LOCAL_LIBCLOCALE ) #include /* The definitions in are copied here * for local use of libclocale */ #else #define LIBCLOCALE_VERSION 20120517 /* The libclocale version string */ #define LIBCLOCALE_VERSION_STRING "20120517" #endif #endif libpff-20120802/libclocale/libclocale_codepage.h0000644000175000017500000000736211765042346016337 00000000000000/* * Codepage functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_CODEPAGE_H ) #define _LIBCLOCALE_CODEPAGE_H #include #include #include "libclocale_extern.h" #include "libclocale_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The codepage feature flag definitions */ enum LIBCLOCALE_CODEPAGE_FEATURE_FLAGS { LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_ISO_8859 = 0x00000001UL, LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 = 0x00000002UL, LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS = 0x00000004UL, }; /* The codepage set definitions */ enum LIBCLOCALE_CODEPAGE_SETS { LIBCLOCALE_CODEPAGE_SET_GENERIC = 1, LIBCLOCALE_CODEPAGE_SET_ISO_8859 = (int) 'i', LIBCLOCALE_CODEPAGE_SET_KOI8 = (int) 'k', LIBCLOCALE_CODEPAGE_SET_WINDOWS = (int) 'w' }; /* The codepage definitions */ enum LIBCLOCALE_CODEPAGES { LIBCLOCALE_CODEPAGE_ASCII = 20127, LIBCLOCALE_CODEPAGE_ISO_8859_1 = 28591, LIBCLOCALE_CODEPAGE_ISO_8859_2 = 28592, LIBCLOCALE_CODEPAGE_ISO_8859_3 = 28593, LIBCLOCALE_CODEPAGE_ISO_8859_4 = 28594, LIBCLOCALE_CODEPAGE_ISO_8859_5 = 28595, LIBCLOCALE_CODEPAGE_ISO_8859_6 = 28596, LIBCLOCALE_CODEPAGE_ISO_8859_7 = 28597, LIBCLOCALE_CODEPAGE_ISO_8859_8 = 28598, LIBCLOCALE_CODEPAGE_ISO_8859_9 = 28599, LIBCLOCALE_CODEPAGE_ISO_8859_10 = 28600, LIBCLOCALE_CODEPAGE_ISO_8859_11 = 28601, LIBCLOCALE_CODEPAGE_ISO_8859_13 = 28603, LIBCLOCALE_CODEPAGE_ISO_8859_14 = 28604, LIBCLOCALE_CODEPAGE_ISO_8859_15 = 28605, LIBCLOCALE_CODEPAGE_ISO_8859_16 = 28606, LIBCLOCALE_CODEPAGE_KOI8_R = 20866, LIBCLOCALE_CODEPAGE_KOI8_U = 21866, LIBCLOCALE_CODEPAGE_WINDOWS_874 = 874, LIBCLOCALE_CODEPAGE_WINDOWS_932 = 932, LIBCLOCALE_CODEPAGE_WINDOWS_936 = 936, LIBCLOCALE_CODEPAGE_WINDOWS_949 = 949, LIBCLOCALE_CODEPAGE_WINDOWS_950 = 950, LIBCLOCALE_CODEPAGE_WINDOWS_1250 = 1250, LIBCLOCALE_CODEPAGE_WINDOWS_1251 = 1251, LIBCLOCALE_CODEPAGE_WINDOWS_1252 = 1252, LIBCLOCALE_CODEPAGE_WINDOWS_1253 = 1253, LIBCLOCALE_CODEPAGE_WINDOWS_1254 = 1254, LIBCLOCALE_CODEPAGE_WINDOWS_1255 = 1255, LIBCLOCALE_CODEPAGE_WINDOWS_1256 = 1256, LIBCLOCALE_CODEPAGE_WINDOWS_1257 = 1257, LIBCLOCALE_CODEPAGE_WINDOWS_1258 = 1258 }; LIBCLOCALE_EXTERN \ int libclocale_codepage; LIBCLOCALE_EXTERN \ int libclocale_codepage_get( int *codepage, libcerror_error_t **error ); LIBCLOCALE_EXTERN \ int libclocale_codepage_set( int codepage, libcerror_error_t **error ); LIBCLOCALE_EXTERN \ int libclocale_codepage_copy_from_string( int *codepage, const char *string, size_t string_length, uint32_t feature_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCLOCALE_EXTERN \ int libclocale_codepage_copy_from_string_wide( int *codepage, const wchar_t *string, size_t string_length, uint32_t feature_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libclocale/libclocale_codepage.c0000644000175000017500000005071111765042346016326 00000000000000/* * Codepage functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libclocale_codepage.h" #include "libclocale_libcerror.h" /* If the codepage is not set strings are formatted using UTF-8 */ #if defined( WINAPI ) int libclocale_codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1252; #else int libclocale_codepage = 0; #endif /* Retrieves the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ int libclocale_codepage_get( int *codepage, libcerror_error_t **error ) { static char *function = "libclocale_codepage_get"; if( codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid codepage.", function ); return( -1 ); } *codepage = libclocale_codepage; return( 1 ); } /* Sets the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ int libclocale_codepage_set( int codepage, libcerror_error_t **error ) { static char *function = "libclocale_codepage_set"; if( ( codepage != LIBCLOCALE_CODEPAGE_ASCII ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_1 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_2 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_3 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_4 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_5 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_6 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_7 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_8 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_9 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_10 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_11 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_13 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_14 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_15 ) && ( codepage != LIBCLOCALE_CODEPAGE_ISO_8859_16 ) && ( codepage != LIBCLOCALE_CODEPAGE_KOI8_R ) && ( codepage != LIBCLOCALE_CODEPAGE_KOI8_U ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_874 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_932 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_936 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1250 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1251 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1252 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1253 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1254 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1256 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1257 ) && ( codepage != LIBCLOCALE_CODEPAGE_WINDOWS_1258 ) && ( codepage != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage.", function ); return( -1 ); } libclocale_codepage = codepage; return( 1 ); } /* Copies the codepage from a string * Returns 1 if successful, 0 if unsupported value or -1 on error */ int libclocale_codepage_copy_from_string( int *codepage, const char *string, size_t string_length, uint32_t feature_flags, libcerror_error_t **error ) { static char *function = "libclocale_codepage_copy_from_string"; size_t string_index = 0; uint32_t supported_flags = 0; int codepage_set = 0; if( codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid codepage.", function ); return( -1 ); } if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string length value exceeds maximum.", function ); return( -1 ); } supported_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_ISO_8859 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS; if( ( feature_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported feature flags value: 0x%08" PRIx32 ".", function, feature_flags ); return( -1 ); } *codepage = -1; if( string_length == 5 ) { if( libcstring_narrow_string_compare_no_case( string, "ascii", 5 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_ASCII; string_index = 5; } } if( ( feature_flags & LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_ISO_8859 ) != 0 ) { /* Supported string formats: * iso8859-1, iso8859_1, iso-8859-1, iso-8859_1, iso_8859-1, iso_8859_1 */ if( string_length >= 8 ) { if( libcstring_narrow_string_compare_no_case( string, "iso", 3 ) == 0 ) { string_index = 3; if( ( string[ string_index ] == '-' ) || ( string[ string_index ] == '_' ) ) { string_index++; } if( ( string[ string_index ] == '8' ) && ( string[ string_index + 1 ] == '8' ) && ( string[ string_index + 2 ] == '5' ) && ( string[ string_index + 3 ] == '9' ) ) { string_index += 4; if( string_index < string_length ) { if( ( string[ string_index ] == '-' ) || ( string[ string_index ] == '_' ) ) { string_index++; codepage_set = LIBCLOCALE_CODEPAGE_SET_ISO_8859; } } } } } } if( ( feature_flags & LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 ) != 0 ) { /* Supported string formats: * koi8, koi8-r, koi8_r */ if( string_length >= 4 ) { if( libcstring_narrow_string_compare_no_case( string, "koi8", 4 ) == 0 ) { string_index = 4; codepage_set = LIBCLOCALE_CODEPAGE_SET_KOI8; if( string_index < string_length ) { if( ( string[ string_index ] == '-' ) || ( string[ string_index ] == '_' ) ) { string_index++; } } } } } if( ( feature_flags & LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS ) != 0 ) { /* Supported string formats: * cp1252, ms1252, windows1252, windows-1252, windows_1252 */ if( string_length >= 7 ) { if( libcstring_narrow_string_compare_no_case( string, "windows", 7 ) == 0 ) { string_index = 7; codepage_set = LIBCLOCALE_CODEPAGE_SET_WINDOWS; if( string_index < string_length ) { if( ( string[ string_index ] == '-' ) || ( string[ string_index ] == '_' ) ) { string_index++; } } } } else if( string_length >= 2 ) { if( libcstring_narrow_string_compare_no_case( string, "cp", 2 ) == 0 ) { string_index = 2; codepage_set = LIBCLOCALE_CODEPAGE_SET_GENERIC; } else if( libcstring_narrow_string_compare_no_case( string, "ms", 2 ) == 0 ) { string_index = 2; codepage_set = LIBCLOCALE_CODEPAGE_SET_WINDOWS; } } } if( codepage_set == LIBCLOCALE_CODEPAGE_SET_ISO_8859 ) { if( ( string_index + 1 ) == string_length ) { switch( string[ string_index ] ) { case '1': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_1; break; case '2': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_2; break; case '3': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_3; break; case '4': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_4; break; case '5': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_5; break; case '6': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_6; break; case '7': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_7; break; case '8': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_8; break; case '9': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_9; break; default: break; } } else if( ( string_index + 2 ) == string_length ) { if( string[ string_index ] == '1' ) { string_index++; switch( string[ string_index ] ) { case '0': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_10; break; case '1': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_11; break; case '3': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_13; break; case '4': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_14; break; case '5': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_15; break; case '6': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_16; break; default: break; } } } } if( codepage_set == LIBCLOCALE_CODEPAGE_SET_KOI8 ) { if( ( string_index + 1 ) == string_length ) { switch( string[ string_index ] ) { case 'r': case 'R': *codepage = LIBCLOCALE_CODEPAGE_KOI8_R; break; case 'u': case 'U': *codepage = LIBCLOCALE_CODEPAGE_KOI8_U; break; default: break; } } } if( ( codepage_set == LIBCLOCALE_CODEPAGE_SET_GENERIC ) || ( codepage_set == LIBCLOCALE_CODEPAGE_SET_WINDOWS ) ) { if( ( string_index + 3 ) == string_length ) { switch( string[ string_index ] ) { case '8': if( ( string[ string_index + 1 ] == '7' ) && ( string[ string_index + 2 ] == '4' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_874; } break; case '9': if( ( string[ string_index + 1 ] == '3' ) && ( string[ string_index + 2 ] == '2' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_932; } else if( ( string[ string_index + 1 ] == '3' ) && ( string[ string_index + 2 ] == '6' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_936; } else if( ( string[ string_index + 1 ] == '4' ) && ( string[ string_index + 2 ] == '9' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949; } else if( ( string[ string_index + 1 ] == '5' ) && ( string[ string_index + 2 ] == '0' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949; } break; default: break; } } else if( ( string_index + 4 ) == string_length ) { if( ( string[ string_index ] == '1' ) && ( string[ string_index + 1 ] == '2' ) && ( string[ string_index + 2 ] == '5' ) ) { switch( string[ string_index + 3 ] ) { case '0': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1250; break; case '1': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1251; break; case '2': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1252; break; case '3': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1253; break; case '4': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1254; break; case '5': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1255; break; case '6': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1256; break; case '7': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1257; break; case '8': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1258; break; default: break; } } } } if( *codepage != -1 ) { return( 1 ); } return( 0 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Copies the codepage from a string * Returns 1 if successful, 0 if unsupported value or -1 on error */ int libclocale_codepage_copy_from_string_wide( int *codepage, const wchar_t *string, size_t string_length, uint32_t feature_flags, libcerror_error_t **error ) { static char *function = "libclocale_codepage_copy_from_string_wide"; size_t string_index = 0; uint32_t supported_flags = 0; int codepage_set = 0; if( codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid codepage.", function ); return( -1 ); } if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string length value exceeds maximum.", function ); return( -1 ); } supported_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_ISO_8859 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS; if( ( feature_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported feature flags value: 0x%08" PRIx32 ".", function, feature_flags ); return( -1 ); } *codepage = -1; if( string_length == 5 ) { if( libcstring_wide_string_compare_no_case( string, L"ascii", 5 ) == 0 ) { *codepage = LIBCLOCALE_CODEPAGE_ASCII; string_index = 5; } } if( ( feature_flags & LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_ISO_8859 ) != 0 ) { /* Supported string formats: * iso8859-1, iso8859_1, iso-8859-1, iso-8859_1, iso_8859-1, iso_8859_1 */ if( string_length >= 8 ) { if( libcstring_wide_string_compare_no_case( string, L"iso", 3 ) == 0 ) { string_index = 3; if( ( string[ string_index ] == (wchar_t) '-' ) || ( string[ string_index ] == (wchar_t) '_' ) ) { string_index++; } if( ( string[ string_index ] == (wchar_t) '8' ) && ( string[ string_index + 1 ] == (wchar_t) '8' ) && ( string[ string_index + 2 ] == (wchar_t) '5' ) && ( string[ string_index + 3 ] == (wchar_t) '9' ) ) { string_index += 4; if( string_index < string_length ) { if( ( string[ string_index ] == (wchar_t) '-' ) || ( string[ string_index ] == (wchar_t) '_' ) ) { string_index++; codepage_set = LIBCLOCALE_CODEPAGE_SET_ISO_8859; } } } } } } if( ( feature_flags & LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 ) != 0 ) { /* Supported string formats: * koi8, koi8-r, koi8_r */ if( string_length >= 4 ) { if( libcstring_wide_string_compare_no_case( string, L"koi8", 4 ) == 0 ) { string_index = 4; codepage_set = LIBCLOCALE_CODEPAGE_SET_KOI8; if( string_index < string_length ) { if( ( string[ string_index ] == (wchar_t) '-' ) || ( string[ string_index ] == (wchar_t) '_' ) ) { string_index++; } } } } } if( ( feature_flags & LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS ) != 0 ) { /* Supported string formats: * cp1252, ms1252, windows1252, windows-1252, windows_1252 */ if( string_length >= 7 ) { if( libcstring_wide_string_compare_no_case( string, L"windows", 7 ) == 0 ) { string_index = 7; codepage_set = LIBCLOCALE_CODEPAGE_SET_WINDOWS; if( string_index < string_length ) { if( ( string[ string_index ] == (wchar_t) '-' ) || ( string[ string_index ] == (wchar_t) '_' ) ) { string_index++; } } } } else if( string_length >= 2 ) { if( libcstring_wide_string_compare_no_case( string, L"cp", 2 ) == 0 ) { string_index = 2; codepage_set = LIBCLOCALE_CODEPAGE_SET_GENERIC; } else if( libcstring_wide_string_compare_no_case( string, L"ms", 2 ) == 0 ) { string_index = 2; codepage_set = LIBCLOCALE_CODEPAGE_SET_WINDOWS; } } } if( codepage_set == LIBCLOCALE_CODEPAGE_SET_ISO_8859 ) { if( ( string_index + 1 ) == string_length ) { switch( string[ string_index ] ) { case '1': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_1; break; case '2': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_2; break; case '3': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_3; break; case '4': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_4; break; case '5': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_5; break; case '6': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_6; break; case '7': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_7; break; case '8': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_8; break; case '9': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_9; break; default: break; } } else if( ( string_index + 2 ) == string_length ) { if( string[ string_index ] == (wchar_t) '1' ) { string_index++; switch( string[ string_index ] ) { case '0': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_10; break; case '1': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_11; break; case '3': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_13; break; case '4': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_14; break; case '5': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_15; break; case '6': *codepage = LIBCLOCALE_CODEPAGE_ISO_8859_16; break; default: break; } } } } if( codepage_set == LIBCLOCALE_CODEPAGE_SET_KOI8 ) { if( ( string_index + 1 ) == string_length ) { switch( string[ string_index ] ) { case 'r': case 'R': *codepage = LIBCLOCALE_CODEPAGE_KOI8_R; break; case 'u': case 'U': *codepage = LIBCLOCALE_CODEPAGE_KOI8_U; break; default: break; } } } if( ( codepage_set == LIBCLOCALE_CODEPAGE_SET_GENERIC ) || ( codepage_set == LIBCLOCALE_CODEPAGE_SET_WINDOWS ) ) { if( ( string_index + 3 ) == string_length ) { switch( string[ string_index ] ) { case '8': if( ( string[ string_index + 1 ] == (wchar_t) '7' ) && ( string[ string_index + 2 ] == (wchar_t) '4' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_874; } break; case '9': if( ( string[ string_index + 1 ] == (wchar_t) '3' ) && ( string[ string_index + 2 ] == (wchar_t) '2' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_932; } else if( ( string[ string_index + 1 ] == (wchar_t) '3' ) && ( string[ string_index + 2 ] == (wchar_t) '6' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_936; } else if( ( string[ string_index + 1 ] == (wchar_t) '4' ) && ( string[ string_index + 2 ] == (wchar_t) '9' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949; } else if( ( string[ string_index + 1 ] == (wchar_t) '5' ) && ( string[ string_index + 2 ] == (wchar_t) '0' ) ) { *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949; } break; default: break; } } else if( ( string_index + 4 ) == string_length ) { if( ( string[ string_index ] == (wchar_t) '1' ) && ( string[ string_index + 1 ] == (wchar_t) '2' ) && ( string[ string_index + 2 ] == (wchar_t) '5' ) ) { switch( string[ string_index + 3 ] ) { case '0': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1250; break; case '1': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1251; break; case '2': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1252; break; case '3': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1253; break; case '4': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1254; break; case '5': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1255; break; case '6': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1256; break; case '7': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1257; break; case '8': *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1258; break; default: break; } } } } if( *codepage != -1 ) { return( 1 ); } return( 0 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/libclocale/Makefile.in0000664000175000017500000006241712006536015014305 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libclocale DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libclocale_la_LIBADD = am__libclocale_la_SOURCES_DIST = libclocale_codepage.c \ libclocale_codepage.h libclocale_definitions.h \ libclocale_extern.h libclocale_libcerror.h \ libclocale_libcstring.h libclocale_locale.c \ libclocale_locale.h libclocale_support.c libclocale_support.h \ libclocale_unused.h @HAVE_LOCAL_LIBCLOCALE_TRUE@am_libclocale_la_OBJECTS = \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_codepage.lo \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_locale.lo \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_support.lo libclocale_la_OBJECTS = $(am_libclocale_la_OBJECTS) @HAVE_LOCAL_LIBCLOCALE_TRUE@am_libclocale_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libclocale_la_SOURCES) DIST_SOURCES = $(am__libclocale_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCLOCALE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -DLOCALEDIR=\"$(datadir)/locale\" \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCLOCALE_TRUE@noinst_LTLIBRARIES = libclocale.la @HAVE_LOCAL_LIBCLOCALE_TRUE@libclocale_la_SOURCES = \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_codepage.c libclocale_codepage.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_definitions.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_extern.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_libcerror.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_libcstring.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_locale.c libclocale_locale.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_support.c libclocale_support.h \ @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libclocale/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libclocale/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libclocale.la: $(libclocale_la_OBJECTS) $(libclocale_la_DEPENDENCIES) $(LINK) $(am_libclocale_la_rpath) $(libclocale_la_OBJECTS) $(libclocale_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_codepage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_locale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libclocale ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libclocale_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libclocale/libclocale_libcstring.h0000644000175000017500000000263011765042346016721 00000000000000/* * The internal libcstring header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_LIBCSTRING_H ) #define _LIBCLOCALE_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libclocale/libclocale_libcerror.h0000644000175000017500000000252711765042346016551 00000000000000/* * The internal libcerror header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCLOCALE_LIBCERROR_H ) #define _LIBCLOCALE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/missing0000755000175000017500000002623312006536015011540 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpff-20120802/Makefile.am0000644000175000017500000000715712005153412012174 00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ include \ common \ libcstring \ libcerror \ libclocale \ libcnotify \ libcsplit \ libuna \ libcfile \ libcpath \ libbfio \ libfcache \ libfdata \ libfdatetime \ libfguid \ libfvalue \ libfwnt \ libfmapi \ libpff \ libcsystem \ pfftools \ jpff \ pypff \ po \ manuals \ tests \ examples \ macosx \ msvscpp \ contrib DPKG_FILES = \ dpkg/changelog \ dpkg/changelog.in \ dpkg/compat \ dpkg/control \ dpkg/copyright \ dpkg/copyright.in \ dpkg/rules \ dpkg/libpff-dev.docs \ dpkg/libpff.docs \ dpkg/libpff-tools.docs GETTEXT_FILES = \ config.rpath \ po/Makevars.in PKGCONFIG_FILES = \ libpff.pc.in SPEC_FILES = \ libpff.spec \ libpff.spec.in EXTRA_DIST = \ README.dll \ README.macosx \ README.mingw \ README.static \ $(DPKG_FILES) \ $(GETTEXT_FILES) \ $(PKGCONFIG_FILES) \ $(SPEC_FILES) MAINTAINERCLEANFILES = \ Makefile.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libpff.pc libtool: @LIBTOOL_DEPS@ cd $(srcdir) && $(SHELL) ./config.status --recheck lib: library library: (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcstring && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libclocale && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcnotify && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsplit && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libuna && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcfile && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcpath && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libbfio && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfvalue && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwnt && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfmapi && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libpff && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) distclean: clean /bin/rm -f Makefile /bin/rm -f config.status /bin/rm -f config.cache /bin/rm -f config.log /bin/rm -f libpff.pc /bin/rm -f libpff.spec @for dir in ${subdirs}; do \ (cd $$dir && $(MAKE) distclean) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" splint: (cd $(srcdir)/libcstring && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwnt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfmapi && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libpff && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsystem && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/pfftools && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/pypff && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS)) libpff-20120802/aclocal.m40000664000175000017500000014626512006536012012010 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # intlmacosx.m4 serial 3 (gettext-0.18) dnl Copyright (C) 2004-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Checks for special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT]) ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .]) ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/common.m4]) m4_include([m4/gettext.m4]) m4_include([m4/iconv.m4]) m4_include([m4/java.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) m4_include([m4/libbfio.m4]) m4_include([m4/libcerror.m4]) m4_include([m4/libcfile.m4]) m4_include([m4/libclocale.m4]) m4_include([m4/libcnotify.m4]) m4_include([m4/libcpath.m4]) m4_include([m4/libcsplit.m4]) m4_include([m4/libcstring.m4]) m4_include([m4/libcsystem.m4]) m4_include([m4/libfcache.m4]) m4_include([m4/libfdata.m4]) m4_include([m4/libfdatetime.m4]) m4_include([m4/libfguid.m4]) m4_include([m4/libfmapi.m4]) m4_include([m4/libfvalue.m4]) m4_include([m4/libfwnt.m4]) m4_include([m4/libtool.m4]) m4_include([m4/libuna.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) m4_include([m4/python.m4]) m4_include([m4/types.m4]) libpff-20120802/README.static0000644000175000017500000000077411647210323012312 00000000000000Libpff supports two types of static compilation * static library * static excutables Creating a static library Use the following command to tell configure you want to make a static library: ./configure --enable-shared=no Creating static executables Make sure you have a static version of: * glibc Some distrubions provide separate packages for static versions of libraries Use the following command to tell configure you want to make a static executables: ./configure --enable-static-executables=yes libpff-20120802/README.macosx0000644000175000017500000000104211647210245012305 00000000000000Mac OS X * missing libtoolize * building multiple architecture binaries Missing libtoolize Use glibtoolize instead Building multiple architecture binaries E.g. on Mac OS X 10.4 to build an PPC and Intel 32-bit multi binary, run the following commands: CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" \ LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" \ ./configure --disable-dependency-tracking --prefix=$PWD/macosx/tmp/ make make install The binaries are installed in $PWD/macosx/tmp/ libpff-20120802/libbfio/0000775000175000017500000000000012006536213011623 500000000000000libpff-20120802/libbfio/libbfio_libcstring.h0000644000175000017500000000263012005153060015533 00000000000000/* * The internal libcstring header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCSTRING_H ) #define _LIBBFIO_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libbfio/libbfio_handle.h0000644000175000017500000001741212005153060014632 00000000000000/* * The handle functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_HANDLE_H ) #define _LIBBFIO_INTERNAL_HANDLE_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #include "libbfio_offset_list.h" #include "libbfio_types.h" #if defined( _MSC_VER ) || defined( __BORLANDC__ ) || defined( __MINGW32_VERSION ) || defined( __MINGW64_VERSION_MAJOR ) /* This inclusion is needed otherwise some linkers * mess up exporting the legacy functions */ #include "libbfio_legacy.h" #endif #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_internal_handle libbfio_internal_handle_t; struct libbfio_internal_handle { /* The IO handle */ intptr_t *io_handle; /* The flags */ uint8_t flags; /* The access flags */ int access_flags; /* The current offset */ off64_t offset; /* The size */ size64_t size; /* Value to indicate the size was set */ uint8_t size_set; /* Value to indicate to open and close * the systems file descriptor or handle on demand */ uint8_t open_on_demand; /* Reference to the pool last used list element */ libbfio_list_element_t *pool_last_used_list_element; /* Value to indicate to track offsets read */ uint8_t track_offsets_read; /* The offset ranges that were read */ libbfio_offset_list_t *offsets_read; /* The narrow string codepage */ int narrow_string_codepage; /* The free IO handle function */ int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ); /* The clone (duplicate) IO handle function */ int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ); /* The open function */ int (*open)( intptr_t *io_handle, int access_flags, libcerror_error_t **error ); /* The close function */ int (*close)( intptr_t *io_handle, libcerror_error_t **error ); /* The read function */ ssize_t (*read)( intptr_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); /* The write function */ ssize_t (*write)( intptr_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); /* The seek offset function */ off64_t (*seek_offset)( intptr_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ); /* The exists function */ int (*exists)( intptr_t *io_handle, libcerror_error_t **error ); /* The is open function */ int (*is_open)( intptr_t *io_handle, libcerror_error_t **error ); /* The get size function */ int (*get_size)( intptr_t *io_handle, size64_t *size, libcerror_error_t **error ); }; LIBBFIO_EXTERN \ int libbfio_handle_initialize( libbfio_handle_t **handle, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*open)( intptr_t *io_handle, int access_flags, libcerror_error_t **error ), int (*close)( intptr_t *io_handle, libcerror_error_t **error ), ssize_t (*read)( intptr_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ), ssize_t (*write)( intptr_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ), off64_t (*seek_offset)( intptr_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ), int (*exists)( intptr_t *io_handle, libcerror_error_t **error ), int (*is_open)( intptr_t *io_handle, libcerror_error_t **error ), int (*get_size)( intptr_t *io_handle, size64_t *size, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_free( libbfio_handle_t **handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_clone( libbfio_handle_t **destination_handle, libbfio_handle_t *source_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_open( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_reopen( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_close( libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_handle_read_buffer( libbfio_handle_t *handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_handle_write_buffer( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ off64_t libbfio_handle_seek_offset( libbfio_handle_t *handle, off64_t offset, int whence, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_exists( libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_is_open( libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_io_handle( libbfio_handle_t *handle, intptr_t **io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_access_flags( libbfio_handle_t *handle, int *access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_set_access_flags( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_size( libbfio_handle_t *handle, size64_t *size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_offset( libbfio_handle_t *handle, off64_t *offset, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_set_open_on_demand( libbfio_handle_t *handle, uint8_t open_on_demand, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_set_track_offsets_read( libbfio_handle_t *handle, uint8_t track_offsets_read, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_number_of_offsets_read( libbfio_handle_t *handle, int *number_of_read_offsets, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_handle_get_offset_read( libbfio_handle_t *handle, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_libcerror.h0000644000175000017500000000252712005153060015363 00000000000000/* * The internal libcerror header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCERROR_H ) #define _LIBBFIO_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libbfio/libbfio_handle.c0000644000175000017500000011670212005153060014627 00000000000000/* * The handle functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #include "libbfio_offset_list.h" /* Initializes the handle * Returns 1 if successful or -1 on error */ int libbfio_handle_initialize( libbfio_handle_t **handle, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*open)( intptr_t *io_handle, int access_flags, libcerror_error_t **error ), int (*close)( intptr_t *io_handle, libcerror_error_t **error ), ssize_t (*read)( intptr_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ), ssize_t (*write)( intptr_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ), off64_t (*seek_offset)( intptr_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ), int (*exists)( intptr_t *io_handle, libcerror_error_t **error ), int (*is_open)( intptr_t *io_handle, libcerror_error_t **error ), int (*get_size)( intptr_t *io_handle, size64_t *size, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_initialize"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( *handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid handle value already set.", function ); return( -1 ); } internal_handle = memory_allocate_structure( libbfio_internal_handle_t ); if( internal_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create handle.", function ); goto on_error; } if( memory_set( internal_handle, 0, sizeof( libbfio_internal_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear handle.", function ); goto on_error; } if( libbfio_offset_list_initialize( &( internal_handle->offsets_read ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create read offsets list.", function ); goto on_error; } internal_handle->io_handle = io_handle; internal_handle->flags = flags; internal_handle->free_io_handle = free_io_handle; internal_handle->clone_io_handle = clone_io_handle; internal_handle->open = open; internal_handle->close = close; internal_handle->read = read; internal_handle->write = write; internal_handle->seek_offset = seek_offset; internal_handle->exists = exists; internal_handle->is_open = is_open; internal_handle->get_size = get_size; *handle = (libbfio_handle_t *) internal_handle; return( 1 ); on_error: if( internal_handle != NULL ) { memory_free( internal_handle ); } return( -1 ); } /* Frees the handle * Returns 1 if successful or -1 on error */ int libbfio_handle_free( libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_free"; int is_open = 0; int result = 1; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( *handle != NULL ) { internal_handle = (libbfio_internal_handle_t *) *handle; *handle = NULL; is_open = internal_handle->is_open( internal_handle->io_handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to determine if handle is open.", function ); result = -1; } else if( is_open != 0 ) { if( internal_handle->close( internal_handle->io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle.", function ); result = -1; } } if( ( internal_handle->flags & LIBBFIO_FLAG_IO_HANDLE_MANAGED ) != 0 ) { if( internal_handle->io_handle != NULL ) { if( internal_handle->free_io_handle == NULL ) { memory_free( internal_handle->io_handle ); } else if( internal_handle->free_io_handle( &( internal_handle->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } } } if( internal_handle->offsets_read != NULL ) { if( libbfio_offset_list_free( &( internal_handle->offsets_read ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free read offsets list.", function ); result = -1; } } memory_free( internal_handle ); } return( result ); } /* Clones (duplicates) the handle * The values in the offsets read list are not duplicated * Returns 1 if successful or -1 on error */ int libbfio_handle_clone( libbfio_handle_t **destination_handle, libbfio_handle_t *source_handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_source_handle = NULL; intptr_t *destination_io_handle = NULL; static char *function = "libbfio_handle_clone"; uint8_t destination_flags = 0; if( destination_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination handle.", function ); return( -1 ); } if( *destination_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination handle already set.", function ); return( -1 ); } if( source_handle == NULL ) { *destination_handle = NULL; return( 1 ); } internal_source_handle = (libbfio_internal_handle_t *) source_handle; if( internal_source_handle->io_handle != NULL ) { if( ( internal_source_handle->flags & LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_REFERENCE ) != 0 ) { destination_io_handle = internal_source_handle->io_handle; destination_flags = LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_REFERENCE; } else { if( internal_source_handle->clone_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing clone IO handle function.", function ); goto on_error; } if( internal_source_handle->clone_io_handle( &destination_io_handle, internal_source_handle->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone IO handle.", function ); goto on_error; } destination_flags = LIBBFIO_FLAG_IO_HANDLE_MANAGED; } } if( libbfio_handle_initialize( destination_handle, destination_io_handle, internal_source_handle->free_io_handle, internal_source_handle->clone_io_handle, internal_source_handle->open, internal_source_handle->close, internal_source_handle->read, internal_source_handle->write, internal_source_handle->seek_offset, internal_source_handle->exists, internal_source_handle->is_open, internal_source_handle->get_size, destination_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination handle.", function ); goto on_error; } destination_io_handle = NULL; if( libbfio_handle_open( *destination_handle, internal_source_handle->access_flags, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open destination handle.", function ); goto on_error; } if( libbfio_handle_seek_offset( *destination_handle, internal_source_handle->offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset in destination handle.", function ); goto on_error; } return( 1 ); on_error: if( destination_io_handle != NULL ) { if( internal_source_handle->free_io_handle == NULL ) { memory_free( destination_io_handle ); } else { internal_source_handle->free_io_handle( &destination_io_handle, NULL ); } } if( destination_handle != NULL ) { libbfio_handle_free( destination_handle, NULL ); } return( -1 ); } /* Opens the handle * Returns 1 if successful or -1 on error */ int libbfio_handle_open( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_open"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing open function.", function ); return( -1 ); } if( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( internal_handle->open_on_demand == 0 ) { if( internal_handle->open( internal_handle->io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle.", function ); return( -1 ); } } else if( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: open on demand cannot be used in combination with write access.", function ); return( -1 ); } internal_handle->access_flags = access_flags; return( 1 ); } /* Reopens the handle * Returns 1 if successful or -1 on error */ int libbfio_handle_reopen( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_reopen"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->close == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing close function.", function ); return( -1 ); } if( internal_handle->open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing open function.", function ); return( -1 ); } if( internal_handle->seek_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing seek offset function.", function ); return( -1 ); } if( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags.", function ); return( -1 ); } /* Only reopen if the access flags have changed */ if( internal_handle->access_flags != access_flags ) { if( internal_handle->close( internal_handle->io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle.", function ); return( -1 ); } if( internal_handle->open_on_demand == 0 ) { if( internal_handle->open( internal_handle->io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle.", function ); return( -1 ); } } internal_handle->access_flags = access_flags; if( internal_handle->open_on_demand == 0 ) { /* Seek the previous file offset only when at least reading the file */ if( ( internal_handle->access_flags & LIBBFIO_ACCESS_FLAG_READ ) != 0 ) { if( internal_handle->seek_offset( internal_handle->io_handle, internal_handle->offset, SEEK_CUR, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset in handle.", function ); return( -1 ); } } } } return( 1 ); } /* Closes the handle * Returns 0 if successful or -1 on error */ int libbfio_handle_close( libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_close"; int is_open = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->close == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing close function.", function ); return( -1 ); } if( internal_handle->open_on_demand != 0 ) { if( internal_handle->is_open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing is open function.", function ); return( -1 ); } is_open = internal_handle->is_open( internal_handle->io_handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } else if( is_open == 0 ) { return( 0 ); } } if( internal_handle->close( internal_handle->io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle.", function ); return( -1 ); } return( 0 ); } /* Reads a buffer from the handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_handle_read_buffer( libbfio_handle_t *handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_read_buffer"; ssize_t read_count = 0; int is_open = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->read == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing read function.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( internal_handle->open_on_demand != 0 ) { if( internal_handle->is_open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing is open function.", function ); return( -1 ); } if( internal_handle->open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing open function.", function ); return( -1 ); } if( internal_handle->seek_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing seek offset function.", function ); return( -1 ); } is_open = internal_handle->is_open( internal_handle->io_handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } else if( is_open == 0 ) { if( internal_handle->open( internal_handle->io_handle, internal_handle->access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle on demand.", function ); return( -1 ); } if( internal_handle->seek_offset( internal_handle->io_handle, internal_handle->offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to find current offset: %" PRIi64 " in handle.", function, internal_handle->offset ); return( -1 ); } } } read_count = internal_handle->read( internal_handle->io_handle, buffer, size, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from handle.", function ); return( -1 ); } if( internal_handle->track_offsets_read != 0 ) { if( libbfio_offset_list_append_offset( internal_handle->offsets_read, internal_handle->offset, read_count, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append offset range to offsets read table.", function ); return( -1 ); } } internal_handle->offset += (off64_t) read_count; if( internal_handle->open_on_demand != 0 ) { if( internal_handle->close == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing close function.", function ); return( -1 ); } if( internal_handle->close( internal_handle->io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close handle on demand.", function ); return( -1 ); } } return( read_count ); } /* Writes a buffer to the handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_handle_write_buffer( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_write_buffer"; ssize_t write_count = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->write == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing write function.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } write_count = internal_handle->write( internal_handle->io_handle, buffer, size, error ); if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to handle.", function ); return( -1 ); } internal_handle->offset += (off64_t) write_count; if( (size64_t) internal_handle->offset > internal_handle->size ) { internal_handle->size = (size64_t) internal_handle->offset; } return( write_count ); } /* Seeks a certain offset within the handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_handle_seek_offset( libbfio_handle_t *handle, off64_t offset, int whence, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_seek_offset"; int is_open = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->seek_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing seek offset function.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( internal_handle->open_on_demand != 0 ) { if( internal_handle->is_open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing is open function.", function ); return( -1 ); } if( internal_handle->open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing open function.", function ); return( -1 ); } is_open = internal_handle->is_open( internal_handle->io_handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } else if( is_open == 0 ) { if( internal_handle->open( internal_handle->io_handle, internal_handle->access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle on demand.", function ); return( -1 ); } if( internal_handle->seek_offset( internal_handle->io_handle, internal_handle->offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to find current offset: %" PRIi64 " in handle.", function, internal_handle->offset ); return( -1 ); } } } offset = internal_handle->seek_offset( internal_handle->io_handle, offset, whence, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to find offset: %" PRIi64 " in handle.", function, offset ); return( -1 ); } internal_handle->offset = offset; return( offset ); } /* Function to determine if a file object exists * Returns 1 if file object exists, 0 if not or -1 on error */ int libbfio_handle_exists( libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_exists"; int result = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->exists == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing exists function.", function ); return( -1 ); } result = internal_handle->exists( internal_handle->io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if handle exists.", function ); return( -1 ); } return( result ); } /* Check if the handle is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_handle_is_open( libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_is_open"; int result = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->is_open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing is open function.", function ); return( -1 ); } result = internal_handle->is_open( internal_handle->io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } return( result ); } /* Retrieves the IO handle * Returns 1 if successful or -1 on error */ int libbfio_handle_get_io_handle( libbfio_handle_t *handle, intptr_t **io_handle, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_io_handle"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } *io_handle = internal_handle->io_handle; return( 1 ); } /* Retrieves the access flags * Returns 1 if successful or -1 on error */ int libbfio_handle_get_access_flags( libbfio_handle_t *handle, int *access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_access_flags"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( access_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid access flags.", function ); return( -1 ); } *access_flags = internal_handle->access_flags; return( 1 ); } /* Sets the access flags * Returns 1 if successful or -1 on error */ int libbfio_handle_set_access_flags( libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_set_access_flags"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags.", function ); return( -1 ); } internal_handle->access_flags = access_flags; return( 1 ); } /* Returns the size of the data of the handle * Returns 1 if successful or -1 on error */ int libbfio_handle_get_size( libbfio_handle_t *handle, size64_t *size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_size"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size", function ); return( -1 ); } if( internal_handle->size_set == 0 ) { if( internal_handle->get_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing get size function.", function ); return( -1 ); } if( internal_handle->get_size( internal_handle->io_handle, &( internal_handle->size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size.", function ); return( -1 ); } internal_handle->size_set = 1; } *size = internal_handle->size; return( 1 ); } /* Retrieves the current offset * Returns 1 if successful or -1 on error */ int libbfio_handle_get_offset( libbfio_handle_t *handle, off64_t *offset, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_offset"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } *offset = internal_handle->offset; return( 1 ); } /* Sets the value to have the library open and close * the systems file descriptor or handle on demand * 0 disables open on demand any other value enables it * Returns 1 if successful or -1 on error */ int libbfio_handle_set_open_on_demand( libbfio_handle_t *handle, uint8_t open_on_demand, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_set_open_on_demand"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( ( ( internal_handle->access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) != 0 ) && ( open_on_demand != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: open on demand cannot be used in combination with write access.", function ); return( -1 ); } internal_handle->open_on_demand = open_on_demand; return( 1 ); } /* Sets the value to have the library track the offsets read * 0 disables tracking any other value enables it * Returns 1 if successful or -1 on error */ int libbfio_handle_set_track_offsets_read( libbfio_handle_t *handle, uint8_t track_offsets_read, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_set_track_offsets_read"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; internal_handle->track_offsets_read = track_offsets_read; return( 1 ); } /* Retrieves the number of offsets read * Returns 1 if successful or -1 on error */ int libbfio_handle_get_number_of_offsets_read( libbfio_handle_t *handle, int *number_of_read_offsets, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_number_of_offsets_read"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_offset_list_get_number_of_elements( internal_handle->offsets_read, number_of_read_offsets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of read offsets.", function ); return( -1 ); } return( 1 ); } /* Retrieves the information of an offset read * Returns 1 if successful or -1 on error */ int libbfio_handle_get_offset_read( libbfio_handle_t *handle, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_get_offset_read"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_offset_list_get_offset( internal_handle->offsets_read, index, offset, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve read offset.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libbfio/libbfio_libuna.h0000644000175000017500000000314712005153060014651 00000000000000/* * The internal libuna header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBUNA_H ) #define _LIBBFIO_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libbfio/libbfio_definitions.h0000644000175000017500000000515212005153060015710 00000000000000/* * The internal definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_DEFINITIONS_H ) #define _LIBBFIO_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if !defined( HAVE_LOCAL_LIBBFIO ) #include /* The definitions in are copied here * for local use of libbfio */ #else #define LIBBFIO_VERSION 20120701 /* The libbfio version string */ #define LIBBFIO_VERSION_STRING "20120701" /* The library flags definitions */ enum LIBBFIO_FLAGS { /* The IO handle is not managed by the library */ LIBBFIO_FLAG_IO_HANDLE_NON_MANAGED = 0x00, /* The IO handle is managed by the library */ LIBBFIO_FLAG_IO_HANDLE_MANAGED = 0x01, /* The IO handle is cloned by the function */ LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION = 0x00, /* The IO handle is not cloned, but passed as a reference */ LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_REFERENCE = 0x02, }; /* The access flags definitions * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3 set to 1 to truncate an existing file on write * bit 4-8 not used */ enum LIBBFIO_ACCESS_FLAGS { LIBBFIO_ACCESS_FLAG_READ = 0x01, LIBBFIO_ACCESS_FLAG_WRITE = 0x02, LIBBFIO_ACCESS_FLAG_TRUNCATE = 0x04 }; /* The file access macros */ #define LIBBFIO_OPEN_READ ( LIBBFIO_ACCESS_FLAG_READ ) #define LIBBFIO_OPEN_WRITE ( LIBBFIO_ACCESS_FLAG_WRITE ) #define LIBBFIO_OPEN_READ_WRITE ( LIBBFIO_ACCESS_FLAG_READ | LIBBFIO_ACCESS_FLAG_WRITE ) #define LIBBFIO_OPEN_WRITE_TRUNCATE ( LIBBFIO_ACCESS_FLAG_WRITE | LIBBFIO_ACCESS_FLAG_TRUNCATE ) #define LIBBFIO_OPEN_READ_WRITE_TRUNCATE ( LIBBFIO_ACCESS_FLAG_READ | LIBBFIO_ACCESS_FLAG_WRITE | LIBBFIO_ACCESS_FLAG_TRUNCATE ) #define LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES 0 #endif /* HAVE_LOCAL_LIBBFIO */ #endif libpff-20120802/libbfio/libbfio_libclocale.h0000644000175000017500000000255212005153060015467 00000000000000/* * The internal libclocale header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCLOCALE_H ) #define _LIBBFIO_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libbfio/libbfio_codepage.h0000644000175000017500000000505312005153060015144 00000000000000/* * Codepage functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_CODEPAGE_H ) #define _LIBBFIO_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio * The definitions in are copied here * for local use of libbfio */ #else /* The codepage definitions */ enum LIBBFIO_CODEPAGE { LIBBFIO_CODEPAGE_ASCII = 20127, LIBBFIO_CODEPAGE_ISO_8859_1 = 28591, LIBBFIO_CODEPAGE_ISO_8859_2 = 28592, LIBBFIO_CODEPAGE_ISO_8859_3 = 28593, LIBBFIO_CODEPAGE_ISO_8859_4 = 28594, LIBBFIO_CODEPAGE_ISO_8859_5 = 28595, LIBBFIO_CODEPAGE_ISO_8859_6 = 28596, LIBBFIO_CODEPAGE_ISO_8859_7 = 28597, LIBBFIO_CODEPAGE_ISO_8859_8 = 28598, LIBBFIO_CODEPAGE_ISO_8859_9 = 28599, LIBBFIO_CODEPAGE_ISO_8859_10 = 28600, LIBBFIO_CODEPAGE_ISO_8859_11 = 28601, LIBBFIO_CODEPAGE_ISO_8859_13 = 28603, LIBBFIO_CODEPAGE_ISO_8859_14 = 28604, LIBBFIO_CODEPAGE_ISO_8859_15 = 28605, LIBBFIO_CODEPAGE_ISO_8859_16 = 28606, LIBBFIO_CODEPAGE_KOI8_R = 20866, LIBBFIO_CODEPAGE_KOI8_U = 21866, LIBBFIO_CODEPAGE_WINDOWS_874 = 874, LIBBFIO_CODEPAGE_WINDOWS_932 = 932, LIBBFIO_CODEPAGE_WINDOWS_936 = 936, LIBBFIO_CODEPAGE_WINDOWS_949 = 949, LIBBFIO_CODEPAGE_WINDOWS_950 = 950, LIBBFIO_CODEPAGE_WINDOWS_1250 = 1250, LIBBFIO_CODEPAGE_WINDOWS_1251 = 1251, LIBBFIO_CODEPAGE_WINDOWS_1252 = 1252, LIBBFIO_CODEPAGE_WINDOWS_1253 = 1253, LIBBFIO_CODEPAGE_WINDOWS_1254 = 1254, LIBBFIO_CODEPAGE_WINDOWS_1255 = 1255, LIBBFIO_CODEPAGE_WINDOWS_1256 = 1256, LIBBFIO_CODEPAGE_WINDOWS_1257 = 1257, LIBBFIO_CODEPAGE_WINDOWS_1258 = 1258 }; #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_extern.h0000644000175000017500000000241012005153060014674 00000000000000/* * The internal extern definition * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_EXTERN_H ) #define _LIBBFIO_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if !defined( HAVE_LOCAL_LIBBFIO ) /* If libtool DLL support is enabled set LIBBFIO_DLL_EXPORT * before including libbfio/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBBFIO_DLL_EXPORT #endif #include #else #define LIBBFIO_EXTERN extern #endif #endif libpff-20120802/libbfio/libbfio_legacy.h0000644000175000017500000000354212005153060014642 00000000000000/* * Legacy functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LEGACY_H ) #define _LIBBFIO_LEGACY_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) LIBBFIO_EXTERN \ ssize_t libbfio_handle_read( libbfio_handle_t *handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_handle_write( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_pool_read( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_pool_write( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_file_range.c0000644000175000017500000010064712005153060015470 00000000000000/* * File range functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_file.h" #include "libbfio_file_range.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" /* Initializes the file range IO handle * Returns 1 if successful or -1 on error */ int libbfio_file_range_io_handle_initialize( libbfio_file_range_io_handle_t **file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_initialize"; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( *file_range_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file range IO handle value already set.", function ); return( -1 ); } *file_range_io_handle = memory_allocate_structure( libbfio_file_range_io_handle_t ); if( *file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file range IO handle.", function ); goto on_error; } if( memory_set( *file_range_io_handle, 0, sizeof( libbfio_file_range_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file range IO handle.", function ); goto on_error; } if( libbfio_file_io_handle_initialize( &( ( *file_range_io_handle )->file_io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize file IO handle.", function ); goto on_error; } return( 1 ); on_error: if( *file_range_io_handle != NULL ) { memory_free( *file_range_io_handle ); *file_range_io_handle = NULL; } return( -1 ); } /* Initializes the file range handle * Returns 1 if successful or -1 on error */ int libbfio_file_range_initialize( libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_range_file_initialize"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( *handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid handle value already set.", function ); return( -1 ); } if( libbfio_file_range_io_handle_initialize( &file_range_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file range IO handle.", function ); goto on_error; } if( libbfio_handle_initialize( handle, (intptr_t *) file_range_io_handle, (int (*)(intptr_t **, libcerror_error_t **)) libbfio_file_range_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libbfio_file_range_io_handle_clone, (int (*)(intptr_t *, int, libcerror_error_t **)) libbfio_file_range_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_file_range_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_file_range_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_file_range_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_range_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_file_range_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( file_range_io_handle != NULL ) { libbfio_file_range_io_handle_free( &file_range_io_handle, NULL ); } return( -1 ); } /* Frees the file range IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_free( libbfio_file_range_io_handle_t **file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_free"; int result = 1; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( *file_range_io_handle != NULL ) { if( libbfio_file_io_handle_free( &( ( *file_range_io_handle )->file_io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file IO handle.", function ); result = -1; } memory_free( *file_range_io_handle ); *file_range_io_handle = NULL; } return( result ); } /* Clones (duplicates) the file range IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libbfio_file_range_io_handle_clone( libbfio_file_range_io_handle_t **destination_file_range_io_handle, libbfio_file_range_io_handle_t *source_file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_io_handle_clone"; if( destination_file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination file range IO handle.", function ); return( -1 ); } if( *destination_file_range_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination file range IO handle already set.", function ); return( -1 ); } if( source_file_range_io_handle == NULL ) { *destination_file_range_io_handle = NULL; return( 1 ); } *destination_file_range_io_handle = memory_allocate_structure( libbfio_file_range_io_handle_t ); if( *destination_file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination file range IO handle.", function ); goto on_error; } if( memory_set( *destination_file_range_io_handle, 0, sizeof( libbfio_file_range_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination file range IO handle.", function ); memory_free( *destination_file_range_io_handle ); *destination_file_range_io_handle = NULL; return( -1 ); } if( libbfio_file_io_handle_clone( &( ( *destination_file_range_io_handle )->file_io_handle ), source_file_range_io_handle->file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } ( *destination_file_range_io_handle )->range_offset = source_file_range_io_handle->range_offset; ( *destination_file_range_io_handle )->range_size = source_file_range_io_handle->range_size; return( 1 ); on_error: if( *destination_file_range_io_handle != NULL ) { libbfio_file_range_io_handle_free( destination_file_range_io_handle, NULL ); } return( -1 ); } /* Retrieves the name size of the file range handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name_size"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name_size( file_range_io_handle->file_io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file range handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name( file_range_io_handle->file_io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file range handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_set_name"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_set_name( file_range_io_handle->file_io_handle, name, name_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in file IO handle.", function ); return( -1 ); } return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Retrieves the name size of the file range handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name_size_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name_size_wide( file_range_io_handle->file_io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file range handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get_name_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_get_name_wide( file_range_io_handle->file_io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name from file IO handle.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file range handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_set_name_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( libbfio_file_io_handle_set_name_wide( file_range_io_handle->file_io_handle, name, name_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in file IO handle.", function ); return( -1 ); } return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Retrieves the range of the file range handle * Returns 1 if succesful or -1 on error */ int libbfio_file_range_get( libbfio_handle_t *handle, off64_t *range_offset, size64_t *range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_get"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( range_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range offset.", function ); return( -1 ); } if( range_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range size.", function ); return( -1 ); } *range_offset = file_range_io_handle->range_offset; *range_size = file_range_io_handle->range_size; return( 1 ); } /* Sets the range of the file range handle * A range size of 0 represents that the range continues until the end of the file * Returns 1 if succesful or -1 on error */ int libbfio_file_range_set( libbfio_handle_t *handle, off64_t range_offset, size64_t range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_file_range_io_handle_t *file_range_io_handle = NULL; static char *function = "libbfio_file_range_set"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } file_range_io_handle = (libbfio_file_range_io_handle_t *) internal_handle->io_handle; if( range_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid range offset value less than zero.", function ); return( -1 ); } if( range_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range size value exceeds maximum.", function ); return( -1 ); } file_range_io_handle->range_offset = range_offset; file_range_io_handle->range_size = range_size; return( 1 ); } /* Opens the file range handle * Returns 1 if successful or -1 on error */ int libbfio_file_range_open( libbfio_file_range_io_handle_t *file_range_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_file_range_open"; size64_t file_size = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( libbfio_file_open( file_range_io_handle->file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file IO handle.", function ); return( -1 ); } if( libbfio_file_get_size( file_range_io_handle->file_io_handle, &file_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size from file IO handle.", function ); return( -1 ); } if( file_range_io_handle->range_offset >= (off64_t) file_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range offset value exceeds file size.", function ); return( -1 ); } file_size -= file_range_io_handle->range_offset; if( file_range_io_handle->range_size > file_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid range size value exceeds file size.", function ); return( -1 ); } if( libbfio_file_seek_offset( file_range_io_handle->file_io_handle, file_range_io_handle->range_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek range offset in file IO handle.", function ); return( -1 ); } return( 1 ); } /* Closes the file range handle * Returns 0 if successful or -1 on error */ int libbfio_file_range_close( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_close"; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( libbfio_file_close( file_range_io_handle->file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file IO handle.", function ); return( -1 ); } return( 0 ); } /* Reads a buffer from the file range handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_file_range_read( libbfio_file_range_io_handle_t *file_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_read"; off64_t file_offset = 0; ssize_t read_count = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } file_offset = libbfio_file_seek_offset( file_range_io_handle->file_io_handle, 0, SEEK_CUR, error ); if( file_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset from file IO handle.", function ); return( -1 ); } if( file_offset < file_range_io_handle->range_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file offset value out of bounds.", function ); return( -1 ); } if( file_range_io_handle->range_size != 0 ) { if( (size64_t) file_offset >= file_range_io_handle->range_size ) { return( 0 ); } if( (size64_t) ( file_offset + size ) >= file_range_io_handle->range_size ) { size = (size_t) ( file_range_io_handle->range_offset - file_offset ); } } read_count = libbfio_file_read( file_range_io_handle->file_io_handle, buffer, size, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file IO handle.", function ); return( -1 ); } return( read_count ); } /* Writes a buffer to the file range handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_file_range_write( libbfio_file_range_io_handle_t *file_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_write"; off64_t file_offset = 0; ssize_t write_count = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } file_offset = libbfio_file_seek_offset( file_range_io_handle->file_io_handle, 0, SEEK_CUR, error ); if( file_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset from file IO handle.", function ); return( -1 ); } if( file_offset < file_range_io_handle->range_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file offset value out of bounds.", function ); return( -1 ); } if( file_range_io_handle->range_size != 0 ) { if( (size64_t) file_offset >= file_range_io_handle->range_size ) { return( 0 ); } if( (size64_t) ( file_offset + size ) >= file_range_io_handle->range_size ) { size = (size_t) ( file_range_io_handle->range_offset - file_offset ); } } write_count = libbfio_file_write( file_range_io_handle->file_io_handle, buffer, size, error ); if( write_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to write to file IO handle.", function ); return( -1 ); } return( write_count ); } /* Seeks a certain offset within the file range handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_file_range_seek_offset( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_file_range_seek_offset"; off64_t file_offset = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( whence == SEEK_CUR ) { file_offset = libbfio_file_seek_offset( file_range_io_handle->file_io_handle, 0, SEEK_CUR, error ); if( file_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset from file IO handle.", function ); return( -1 ); } offset += file_offset; whence = SEEK_SET; } else if( whence == SEEK_END ) { if( file_range_io_handle->range_size != 0 ) { offset += file_range_io_handle->range_size; whence = SEEK_SET; } } else if( whence == SEEK_SET ) { offset += file_range_io_handle->range_offset; } if( whence == SEEK_SET ) { if( offset < file_range_io_handle->range_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid offset value out of bounds.", function ); return( -1 ); } } offset = libbfio_file_seek_offset( file_range_io_handle->file_io_handle, offset, whence, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset in file IO handle.", function ); return( -1 ); } if( offset < file_range_io_handle->range_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid offset value out of bounds.", function ); return( -1 ); } offset -= file_range_io_handle->range_offset; return( offset ); } /* Function to determine if a file range exists * Returns 1 if file exists, 0 if not or -1 on error */ int libbfio_file_range_exists( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_exists"; int result = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } result = libbfio_file_exists( file_range_io_handle->file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if file exists.", function ); return( -1 ); } return( result ); } /* Check if the file range is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_file_range_is_open( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_range_is_open"; int result = 0; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } result = libbfio_file_is_open( file_range_io_handle->file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if file is open.", function ); return( -1 ); } return( result ); } /* Retrieves the file range size * Returns 1 if successful or -1 on error */ int libbfio_file_range_get_size( libbfio_file_range_io_handle_t *file_range_io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libbfio_file_range_get_size"; if( file_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file range IO handle.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( file_range_io_handle->range_size == 0 ) { if( libbfio_file_get_size( file_range_io_handle->file_io_handle, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size.", function ); return( -1 ); } *size -= file_range_io_handle->range_offset; } else { *size = file_range_io_handle->range_size; } return( 1 ); } libpff-20120802/libbfio/libbfio_offset_list.h0000644000175000017500000000665012005153060015722 00000000000000/* * Offset list * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_OFFSET_LIST_H ) #define _LIBBFIO_OFFSET_LIST_H #include #include #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_offset_list_value libbfio_offset_list_value_t; struct libbfio_offset_list_value { /* The offset */ off64_t offset; /* The size */ size64_t size; }; typedef struct libbfio_offset_list libbfio_offset_list_t; struct libbfio_offset_list { /* The number of elements */ int number_of_elements; /* The first element */ libbfio_list_element_t *first_element; /* The last element */ libbfio_list_element_t *last_element; /* The current list element */ libbfio_list_element_t *current_element; /* The current list element index */ int current_element_index; }; int libbfio_offset_list_value_initialize( libbfio_offset_list_value_t **offset_list_value, libcerror_error_t **error ); int libbfio_offset_list_value_free( libbfio_offset_list_value_t **offset_list_value, libcerror_error_t **error ); int libbfio_offset_list_value_clone( libbfio_offset_list_value_t **destination_offset_list_value, libbfio_offset_list_value_t *source_offset_list_value, libcerror_error_t **error ); int libbfio_offset_list_initialize( libbfio_offset_list_t **offset_list, libcerror_error_t **error ); int libbfio_offset_list_free( libbfio_offset_list_t **offset_list, libcerror_error_t **error ); int libbfio_offset_list_empty( libbfio_offset_list_t *offset_list, libcerror_error_t **error ); int libbfio_offset_list_clone( libbfio_offset_list_t **destination_offset_list, libbfio_offset_list_t *source_offset_list, libcerror_error_t **error ); int libbfio_offset_list_get_number_of_elements( libbfio_offset_list_t *offset_list, int *number_of_elements, libcerror_error_t **error ); int libbfio_offset_list_append_offset( libbfio_offset_list_t *offset_list, off64_t offset, size64_t size, uint8_t merge_ranges, libcerror_error_t **error ); int libbfio_offset_list_get_offset( libbfio_offset_list_t *offset_list, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ); int libbfio_offset_list_get_offset_by_value( libbfio_offset_list_t *offset_list, off64_t offset_value, off64_t *offset, size64_t *size, libcerror_error_t **error ); int libbfio_offset_list_range_is_present( libbfio_offset_list_t *offset_list, off64_t offset, size64_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/Makefile.am0000644000175000017500000000231312005153060013566 00000000000000if HAVE_LOCAL_LIBBFIO AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libbfio.la libbfio_la_SOURCES = \ libbfio_codepage.h \ libbfio_definitions.h \ libbfio_error.c libbfio_error.h \ libbfio_extern.h \ libbfio_file.c libbfio_file.h \ libbfio_file_pool.c libbfio_file_pool.h \ libbfio_file_range.c libbfio_file_range.h \ libbfio_handle.c libbfio_handle.h \ libbfio_legacy.c libbfio_legacy.h \ libbfio_libcerror.h \ libbfio_libcfile.h \ libbfio_libclocale.h \ libbfio_libcpath.h \ libbfio_libcstring.h \ libbfio_libuna.h \ libbfio_list_type.c libbfio_list_type.h \ libbfio_memory_range.c libbfio_memory_range.h \ libbfio_offset_list.c libbfio_offset_list.h \ libbfio_pool.c libbfio_pool.h \ libbfio_support.c libbfio_support.h \ libbfio_types.h \ libbfio_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libbfio ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libbfio_la_SOURCES) libpff-20120802/libbfio/libbfio_file_pool.c0000644000175000017500000001417112005153060015341 00000000000000/* * File pool functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libbfio_definitions.h" #include "libbfio_file.h" #include "libbfio_file_pool.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_libcstring.h" #include "libbfio_pool.h" #include "libbfio_types.h" /* Appends file handles to the pool for the corresponding filenames * Returns 1 if successful or -1 on error */ int libbfio_file_pool_append_handles_for_names( libbfio_pool_t *pool, char * const names[], int number_of_names, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libbfio_file_pool_append_handles_for_names"; size_t name_length = 0; int pool_entry = 0; int name_iterator = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( names == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid names.", function ); return( -1 ); } if( number_of_names <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid number of names zero or less.", function ); return( -1 ); } for( name_iterator = 0; name_iterator < number_of_names; name_iterator++ ) { name_length = libcstring_narrow_string_length( names[ name_iterator ] ); if( libbfio_file_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle: %d.", function, name_iterator ); return( -1 ); } if( libbfio_file_set_name( file_io_handle, names[ name_iterator ], name_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in file IO handle: %d.", function, name_iterator ); libbfio_handle_free( &file_io_handle, NULL ); return( -1 ); } if( libbfio_pool_append_handle( pool, &pool_entry, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append file IO handle: %d to pool.", function, name_iterator ); libbfio_handle_free( &file_io_handle, NULL ); return( -1 ); } file_io_handle = NULL; } return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Appends file handles to the pool for the corresponding filenames * Returns 1 if successful or -1 on error */ int libbfio_file_pool_append_handles_for_names_wide( libbfio_pool_t *pool, wchar_t * const names[], int number_of_names, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libbfio_file_pool_append_handles_for_names_wide"; size_t name_length = 0; int pool_entry = 0; int name_iterator = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( names == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid names.", function ); return( -1 ); } if( number_of_names <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid number of names zero or less.", function ); return( -1 ); } for( name_iterator = 0; name_iterator < number_of_names; name_iterator++ ) { name_length = libcstring_wide_string_length( names[ name_iterator ] ); if( libbfio_file_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle: %d.", function, name_iterator ); return( -1 ); } if( libbfio_file_set_name_wide( file_io_handle, names[ name_iterator ], name_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name in file IO handle: %d.", function, name_iterator ); libbfio_handle_free( &file_io_handle, NULL ); return( -1 ); } if( libbfio_pool_append_handle( pool, &pool_entry, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append file IO handle: %d to pool.", function, name_iterator ); libbfio_handle_free( &file_io_handle, NULL ); return( -1 ); } file_io_handle = NULL; } return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/libbfio/libbfio_file.c0000644000175000017500000015047612005153060014321 00000000000000/* * File functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_file.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_libcfile.h" #include "libbfio_libclocale.h" #include "libbfio_libcpath.h" #include "libbfio_libcstring.h" #include "libbfio_libuna.h" #include "libbfio_types.h" /* Initializes the file IO handle * Returns 1 if successful or -1 on error */ int libbfio_file_io_handle_initialize( libbfio_file_io_handle_t **file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_initialize"; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( *file_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file IO handle value already set.", function ); return( -1 ); } *file_io_handle = memory_allocate_structure( libbfio_file_io_handle_t ); if( *file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file IO handle.", function ); goto on_error; } if( memory_set( *file_io_handle, 0, sizeof( libbfio_file_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file IO handle.", function ); goto on_error; } if( libcfile_file_initialize( &( ( *file_io_handle )->file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file.", function ); goto on_error; } return( 1 ); on_error: if( *file_io_handle != NULL ) { memory_free( *file_io_handle ); *file_io_handle = NULL; } return( -1 ); } /* Initializes the file handle * Returns 1 if successful or -1 on error */ int libbfio_file_initialize( libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_file_io_handle_t *file_io_handle = NULL; static char *function = "libbfio_file_initialize"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( *handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid handle value already set.", function ); return( -1 ); } if( libbfio_file_io_handle_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } if( libbfio_handle_initialize( handle, (intptr_t *) file_io_handle, (int (*)(intptr_t **, libcerror_error_t **)) libbfio_file_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libbfio_file_io_handle_clone, (int (*)(intptr_t *, int, libcerror_error_t **)) libbfio_file_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_file_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_file_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_file_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_file_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_file_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( file_io_handle != NULL ) { libbfio_file_io_handle_free( &file_io_handle, NULL ); } return( -1 ); } /* Frees the file IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_free( libbfio_file_io_handle_t **file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_free"; int result = 1; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( *file_io_handle != NULL ) { if( ( *file_io_handle )->name != NULL ) { memory_free( ( *file_io_handle )->name ); } if( libcfile_file_free( &( ( *file_io_handle )->file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file.", function ); result = -1; } memory_free( *file_io_handle ); *file_io_handle = NULL; } return( result ); } /* Clones (duplicates) the file IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_clone( libbfio_file_io_handle_t **destination_file_io_handle, libbfio_file_io_handle_t *source_file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_clone"; if( destination_file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination file IO handle.", function ); return( -1 ); } if( *destination_file_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination file IO handle already set.", function ); return( -1 ); } if( source_file_io_handle == NULL ) { *destination_file_io_handle = NULL; return( 1 ); } if( libbfio_file_io_handle_initialize( destination_file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } if( *destination_file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination file IO handle.", function ); goto on_error; } if( source_file_io_handle->name_size > 0 ) { if( ( source_file_io_handle->name_size > (size_t) SSIZE_MAX ) || ( ( sizeof( libcstring_system_character_t ) * source_file_io_handle->name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid source file IO handle - name size value exceeds maximum.", function ); goto on_error; } ( *destination_file_io_handle )->name = libcstring_system_string_allocate( source_file_io_handle->name_size ); if( ( *destination_file_io_handle )->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name.", function ); goto on_error; } if( source_file_io_handle->name_size > 1 ) { if( libcstring_system_string_copy( ( *destination_file_io_handle )->name, source_file_io_handle->name, source_file_io_handle->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy name.", function ); goto on_error; } } ( *destination_file_io_handle )->name[ source_file_io_handle->name_size - 1 ] = 0; ( *destination_file_io_handle )->name_size = source_file_io_handle->name_size; } return( 1 ); on_error: if( *destination_file_io_handle != NULL ) { libbfio_file_io_handle_free( destination_file_io_handle, NULL ); } return( -1 ); } /* Retrieves the name size of the file handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name_size"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name_size( (libbfio_file_io_handle_t *) internal_handle->io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name( (libbfio_file_io_handle_t *) internal_handle->io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file handle * Returns 1 if succesful or -1 on error */ int libbfio_file_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; char *full_name = NULL; static char *function = "libbfio_file_set_name"; size_t full_name_size = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libcpath_path_get_full_path( name, name_length, &full_name, &full_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine full path.", function ); goto on_error; } if( libbfio_file_io_handle_set_name( (libbfio_file_io_handle_t *) internal_handle->io_handle, full_name, full_name_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name.", function ); goto on_error; } if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( 1 ); on_error: if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( -1 ); } /* Retrieves the name size of the file IO handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_get_name_size( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_get_name_size"; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } if( name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name size.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); return( -1 ); } #else *name_size = file_io_handle->name_size; #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Retrieves the name of the file IO handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_get_name( libbfio_file_io_handle_t *file_io_handle, char *name, size_t name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_get_name"; size_t narrow_name_size = 0; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, &narrow_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, &narrow_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, &narrow_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, &narrow_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); return( -1 ); } #else narrow_name_size = file_io_handle->name_size; #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ if( name_size < narrow_name_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: name too small.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) name, name_size, (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) name, name_size, (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) name, name_size, libclocale_codepage, (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) name, name_size, libclocale_codepage, (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); return( -1 ); } #else if( file_io_handle->name_size > 0 ) { if( file_io_handle->name_size > 1 ) { if( libcstring_system_string_copy( name, file_io_handle->name, file_io_handle->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set name.", function ); return( -1 ); } } name[ file_io_handle->name_size - 1 ] = 0; } #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Sets the name for the file IO handle * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_set_name( libbfio_file_io_handle_t *file_io_handle, const char *name, size_t name_length, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_set_name"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } if( name_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid name length is zero.", function ); return( -1 ); } if( name_length >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name length value exceeds maximum.", function ); return( -1 ); } if( file_io_handle->name != NULL ) { result = libcfile_file_is_open( file_io_handle->file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: unable to determine if file is open.", function ); return( -1 ); } if( result != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: unable to set name when file is open.", function ); return( -1 ); } memory_free( file_io_handle->name ); file_io_handle->name = NULL; file_io_handle->name_size = 0; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) name, name_length + 1, &( file_io_handle->name_size ), error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) name, name_length + 1, &( file_io_handle->name_size ), error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) name, name_length + 1, libclocale_codepage, &( file_io_handle->name_size ), error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) name, name_length + 1, libclocale_codepage, &( file_io_handle->name_size ), error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); goto on_error; } #else file_io_handle->name_size = name_length + 1; #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ if( ( file_io_handle->name_size > (size_t) SSIZE_MAX ) || ( ( sizeof( libcstring_system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid file IO handle - name size value exceeds maximum.", function ); goto on_error; } file_io_handle->name = libcstring_system_string_allocate( file_io_handle->name_size ); if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, (libuna_utf8_character_t *) name, name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, (libuna_utf8_character_t *) name, name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) file_io_handle->name, file_io_handle->name_size, (uint8_t *) name, name_length + 1, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) file_io_handle->name, file_io_handle->name_size, (uint8_t *) name, name_length + 1, libclocale_codepage, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); goto on_error; } #else if( name_length > 1 ) { if( libcstring_system_string_copy( file_io_handle->name, name, name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set name.", function ); goto on_error; } } file_io_handle->name[ name_length ] = 0; #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); on_error: if( file_io_handle->name != NULL ) { memory_free( file_io_handle->name ); file_io_handle->name = NULL; file_io_handle->name_size = 0; } return( -1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Retrieves the name size of the file handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name_size_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name_size_wide( (libbfio_file_io_handle_t *) internal_handle->io_handle, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name of the file handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_file_get_name_wide"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libbfio_file_io_handle_get_name_wide( (libbfio_file_io_handle_t *) internal_handle->io_handle, name, name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name.", function ); return( -1 ); } return( 1 ); } /* Sets the name for the file handle * Returns 1 if succesful or -1 on error */ int libbfio_file_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; wchar_t *full_name = NULL; static char *function = "libbfio_file_set_name_wide"; size_t full_name_size = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( libcpath_path_get_full_path_wide( name, name_length, &full_name, &full_name_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine full path.", function ); goto on_error; } if( libbfio_file_io_handle_set_name_wide( (libbfio_file_io_handle_t *) internal_handle->io_handle, full_name, full_name_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set name.", function ); goto on_error; } if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( 1 ); on_error: if( ( full_name != NULL ) && ( full_name != name ) ) { memory_free( full_name ); } return( -1 ); } /* Retrieves the name size of the file IO handle * The name size includes the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_get_name_size_wide( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_get_name_size_wide"; #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - invalid IO handle - missing name.", function ); return( -1 ); } if( name_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name size.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) *name_size = file_io_handle->name_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); return( -1 ); } #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Retrieves the name of the file IO handle * The name size should include the end of string character * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_get_name_wide( libbfio_file_io_handle_t *file_io_handle, wchar_t *name, size_t name_size, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_get_name_wide"; size_t wide_name_size = 0; #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int result = 0; #endif if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - invalid IO handle - missing name.", function ); return( -1 ); } if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) wide_name_size = file_io_handle->name_size; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, &wide_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, &wide_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, &wide_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, &wide_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); return( -1 ); } #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ if( name_size < wide_name_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: name too small.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( file_io_handle->name_size > 0 ) { if( file_io_handle->name_size > 1 ) { if( libcstring_system_string_copy( name, file_io_handle->name, file_io_handle->name_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set name.", function ); return( -1 ); } } name[ file_io_handle->name_size - 1 ] = 0; } #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) name, name_size, (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) name, name_size, (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) name, name_size, (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) name, name_size, (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); return( -1 ); } #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); } /* Sets the name for the file IO handle * Returns 1 if succesful or -1 on error */ int libbfio_file_io_handle_set_name_wide( libbfio_file_io_handle_t *file_io_handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ) { static char *function = "libbfio_file_io_handle_set_name_wide"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name.", function ); return( -1 ); } if( name_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid name length is zero.", function ); return( -1 ); } if( name_length >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid name length value exceeds maximum.", function ); return( -1 ); } if( file_io_handle->name != NULL ) { result = libcfile_file_is_open( file_io_handle->file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: unable to determine if file is open.", function ); return( -1 ); } if( result != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: unable to set name when file is open.", function ); return( -1 ); } memory_free( file_io_handle->name ); file_io_handle->name = NULL; file_io_handle->name_size = 0; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) file_io_handle->name_size = name_length + 1; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) name, name_length + 1, &( file_io_handle->name_size ), error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) name, name_length + 1, &( file_io_handle->name_size ), error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) name, name_length + 1, libclocale_codepage, &( file_io_handle->name_size ), error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) name, name_length + 1, libclocale_codepage, &( file_io_handle->name_size ), error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine name size.", function ); goto on_error; } #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ if( ( file_io_handle->name_size > (size_t) SSIZE_MAX ) || ( ( sizeof( libcstring_system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid file IO handle - name size value exceeds maximum.", function ); goto on_error; } file_io_handle->name = libcstring_system_string_allocate( file_io_handle->name_size ); if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( name_length > 1 ) { if( libcstring_system_string_copy( file_io_handle->name, name, name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set name.", function ); goto on_error; } } file_io_handle->name[ name_length ] = 0; #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, (libuna_utf32_character_t *) name, name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) file_io_handle->name, file_io_handle->name_size, (libuna_utf16_character_t *) name, name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, (libuna_utf32_character_t *) name, name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) file_io_handle->name, file_io_handle->name_size, libclocale_codepage, (libuna_utf16_character_t *) name, name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); goto on_error; } #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ return( 1 ); on_error: if( file_io_handle->name != NULL ) { memory_free( file_io_handle->name ); file_io_handle->name = NULL; file_io_handle->name_size = 0; } return( -1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ /* Opens the file handle * Returns 1 if successful or -1 on error */ int libbfio_file_open( libbfio_file_io_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_file_open"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_open_wide( file_io_handle->file, file_io_handle->name, access_flags, error ); #else result = libcfile_file_open( file_io_handle->file, file_io_handle->name, access_flags, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, file_io_handle->name ); } file_io_handle->access_flags = access_flags; return( 1 ); } /* Closes the file handle * Returns 0 if successful or -1 on error */ int libbfio_file_close( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_close"; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } if( libcfile_file_close( file_io_handle->file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close file: %" PRIs_LIBCSTRING_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } file_io_handle->access_flags = 0; return( 0 ); } /* Reads a buffer from the file handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_file_read( libbfio_file_io_handle_t *file_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_read"; ssize_t read_count = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } read_count = libcfile_file_read_buffer( file_io_handle->file, buffer, size, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file: %" PRIs_LIBCSTRING_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( read_count ); } /* Writes a buffer to the file handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_file_write( libbfio_file_io_handle_t *file_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_file_write"; ssize_t write_count = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } write_count = libcfile_file_write_buffer( file_io_handle->file, buffer, size, error ); if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( write_count ); } /* Seeks a certain offset within the file handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_file_seek_offset( libbfio_file_io_handle_t *file_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_file_seek_offset"; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } offset = libcfile_file_seek_offset( file_io_handle->file, offset, whence, error ); if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to find offset in file: %" PRIs_LIBCSTRING_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( offset ); } /* Function to determine if a file exists * Returns 1 if file exists, 0 if not or -1 on error */ int libbfio_file_exists( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_exists"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( file_io_handle->name, error ); #else result = libcfile_file_exists( file_io_handle->name, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if file: %" PRIs_LIBCSTRING_SYSTEM " exists.", function, file_io_handle->name ); return( -1 ); } return( result ); } /* Check if the file is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_file_is_open( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_file_is_open"; int result = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } result = libcfile_file_is_open( file_io_handle->file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if file is open.", function ); return( -1 ); } return( result ); } /* Retrieves the file size * Returns 1 if successful or -1 on error */ int libbfio_file_get_size( libbfio_file_io_handle_t *file_io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libbfio_file_get_size"; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( file_io_handle->name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle - missing name.", function ); return( -1 ); } if( libcfile_file_get_size( file_io_handle->file, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file: %" PRIs_LIBCSTRING_SYSTEM ".", function, file_io_handle->name ); return( -1 ); } return( 1 ); } libpff-20120802/libbfio/libbfio_pool.h0000644000175000017500000001227512005153060014352 00000000000000/* * The internal pool functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_POOL_H ) #define _LIBBFIO_POOL_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_internal_pool libbfio_internal_pool_t; struct libbfio_internal_pool { /* The number of handles in the pool */ int number_of_handles; /* The number of used handles in the pool */ int number_of_used_handles; /* The number of open handles in the pool */ int number_of_open_handles; /* The maximum number of open handles in the pool */ int maximum_number_of_open_handles; /* A dynamic array containing the handles */ libbfio_handle_t **handles; /* A list containing the file IO handles in order of the last use * it starts with the last used at the beginning of the list * the value of the list element refers to the corresponding file IO handle */ libbfio_list_t *last_used_list; }; LIBBFIO_EXTERN \ int libbfio_pool_initialize( libbfio_pool_t **pool, int number_of_handles, int maximum_number_of_open_handles, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_free( libbfio_pool_t **pool, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_clone( libbfio_pool_t **destination_pool, libbfio_pool_t *source_pool, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_resize( libbfio_pool_t *pool, int number_of_handles, libcerror_error_t **error ); int libbfio_pool_open_handle( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); int libbfio_pool_append_handle_to_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ); int libbfio_pool_move_handle_to_front_of_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_number_of_handles( libbfio_pool_t *pool, int *number_of_handles, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t **handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_append_handle( libbfio_pool_t *pool, int *entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_set_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_open( libbfio_pool_t *pool, int entry, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_reopen( libbfio_pool_t *pool, int entry, int access_flags, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_close( libbfio_pool_t *pool, int entry, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_close_all( libbfio_pool_t *pool, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_pool_read_buffer( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ ssize_t libbfio_pool_write_buffer( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBBFIO_EXTERN \ off64_t libbfio_pool_seek_offset( libbfio_pool_t *pool, int entry, off64_t offset, int whence, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_size( libbfio_pool_t *pool, int entry, size64_t *size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_offset( libbfio_pool_t *pool, int entry, off64_t *offset, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_get_maximum_number_of_open_handles( libbfio_pool_t *pool, int *maximum_number_of_open_handles, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_pool_set_maximum_number_of_open_handles( libbfio_pool_t *pool, int maximum_number_of_open_handles, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_file_range.h0000644000175000017500000001103312005153060015463 00000000000000/* * File range functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_FILE_RANGE_H ) #define _LIBBFIO_FILE_RANGE_H #include #include #include "libbfio_extern.h" #include "libbfio_file.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_file_range_io_handle libbfio_file_range_io_handle_t; struct libbfio_file_range_io_handle { /* The file IO handle */ libbfio_file_io_handle_t *file_io_handle; /* The range (start) offset */ off64_t range_offset; /* The range size */ size64_t range_size; }; int libbfio_file_range_io_handle_initialize( libbfio_file_range_io_handle_t **file_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_initialize( libbfio_handle_t **handle, libcerror_error_t **error ); int libbfio_file_range_io_handle_free( libbfio_file_range_io_handle_t **file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_io_handle_clone( libbfio_file_range_io_handle_t **destination_file_range_io_handle, libbfio_file_range_io_handle_t *source_file_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_range_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBBFIO_EXTERN \ int libbfio_file_range_get( libbfio_handle_t *handle, off64_t *range_offset, size64_t *range_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_range_set( libbfio_handle_t *handle, off64_t range_offset, size64_t range_size, libcerror_error_t **error ); int libbfio_file_range_open( libbfio_file_range_io_handle_t *file_range_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_file_range_close( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); ssize_t libbfio_file_range_read( libbfio_file_range_io_handle_t *file_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_file_range_write( libbfio_file_range_io_handle_t *file_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_file_range_seek_offset( libbfio_file_range_io_handle_t *file_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_file_range_exists( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_is_open( libbfio_file_range_io_handle_t *file_range_io_handle, libcerror_error_t **error ); int libbfio_file_range_get_size( libbfio_file_range_io_handle_t *file_range_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_offset_list.c0000644000175000017500000012272412005153060015716 00000000000000/* * Offset list * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #include "libbfio_offset_list.h" /* Creates an offset list value * Returns 1 if successful or -1 on error */ int libbfio_offset_list_value_initialize( libbfio_offset_list_value_t **offset_list_value, libcerror_error_t **error ) { static char *function = "libbfio_offset_list_value_initialize"; if( offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list value.", function ); return( -1 ); } if( *offset_list_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid offset list value value already set.", function ); return( -1 ); } *offset_list_value = memory_allocate_structure( libbfio_offset_list_value_t ); if( *offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create offset list value.", function ); goto on_error; } if( memory_set( *offset_list_value, 0, sizeof( libbfio_offset_list_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear offset list value.", function ); goto on_error; } return( 1 ); on_error: if( *offset_list_value != NULL ) { memory_free( *offset_list_value ); *offset_list_value = NULL; } return( -1 ); } /* Frees an offset list value */ int libbfio_offset_list_value_free( libbfio_offset_list_value_t **offset_list_value, libcerror_error_t **error ) { static char *function = "libbfio_offset_list_value_free"; if( offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list value.", function ); return( -1 ); } if( *offset_list_value != NULL ) { memory_free( *offset_list_value ); *offset_list_value = NULL; } return( 1 ); } /* Clones the offset list value * Returns 1 if successful or -1 on error */ int libbfio_offset_list_value_clone( libbfio_offset_list_value_t **destination_offset_list_value, libbfio_offset_list_value_t *source_offset_list_value, libcerror_error_t **error ) { static char *function = "libbfio_offset_list_value_clone"; if( destination_offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination offset list value.", function ); return( -1 ); } if( *destination_offset_list_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination offset list value value already set.", function ); return( -1 ); } if( source_offset_list_value == NULL ) { *destination_offset_list_value = NULL; return( 1 ); } *destination_offset_list_value = memory_allocate_structure( libbfio_offset_list_value_t ); if( *destination_offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination offset list value.", function ); goto on_error; } if( memory_copy( *destination_offset_list_value, source_offset_list_value, sizeof( libbfio_offset_list_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy source to destination offset list value.", function ); goto on_error; } return( 1 ); on_error: if( *destination_offset_list_value != NULL ) { memory_free( *destination_offset_list_value ); *destination_offset_list_value = NULL; } return( -1 ); } /* Creates an offset list * Returns 1 if successful or -1 on error */ int libbfio_offset_list_initialize( libbfio_offset_list_t **offset_list, libcerror_error_t **error ) { static char *function = "libbfio_offset_list_initialize"; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( *offset_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid offset list value already set.", function ); return( -1 ); } *offset_list = memory_allocate_structure( libbfio_offset_list_t ); if( *offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create offset list.", function ); goto on_error; } if( memory_set( *offset_list, 0, sizeof( libbfio_offset_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear offset list.", function ); goto on_error; } return( 1 ); on_error: if( *offset_list != NULL ) { memory_free( *offset_list ); *offset_list = NULL; } return( -1 ); } /* Frees an offset list including the elements * Returns 1 if successful or -1 on error */ int libbfio_offset_list_free( libbfio_offset_list_t **offset_list, libcerror_error_t **error ) { static char *function = "libbfio_offset_list_free"; int result = 1; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( *offset_list != NULL ) { result = libbfio_offset_list_empty( *offset_list, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty offset list.", function ); } memory_free( *offset_list ); *offset_list = NULL; } return( result ); } /* Empties an offset list and frees the elements * Returns 1 if successful or -1 on error */ int libbfio_offset_list_empty( libbfio_offset_list_t *offset_list, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_offset_list_empty"; int element_index = 0; int number_of_elements = 0; int result = 1; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset_list->number_of_elements > 0 ) { number_of_elements = offset_list->number_of_elements; for( element_index = 0; element_index < number_of_elements; element_index++ ) { list_element = offset_list->first_element; if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_index ); return( -1 ); } offset_list->first_element = list_element->next_element; if( offset_list->last_element == list_element ) { offset_list->last_element = list_element->next_element; } offset_list->number_of_elements -= 1; if( list_element->next_element != NULL ) { list_element->next_element->previous_element = NULL; } list_element->next_element = NULL; if( libbfio_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); result = -1; } } offset_list->current_element = NULL; offset_list->current_element_index = 0; } return( result ); } /* Clones the offset list * Returns 1 if successful or -1 on error */ int libbfio_offset_list_clone( libbfio_offset_list_t **destination_offset_list, libbfio_offset_list_t *source_offset_list, libcerror_error_t **error ) { libbfio_list_element_t *destination_list_element = NULL; libbfio_list_element_t *source_list_element = NULL; libbfio_offset_list_value_t *destination_value = NULL; static char *function = "libbfio_offset_list_clone"; int element_index = 0; if( destination_offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination offset list.", function ); return( -1 ); } if( *destination_offset_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination offset list value already set.", function ); return( -1 ); } if( source_offset_list == NULL ) { *destination_offset_list = NULL; return( 1 ); } if( libbfio_offset_list_initialize( destination_offset_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination offset list.", function ); goto on_error; } if( *destination_offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination offset list.", function ); goto on_error; } source_list_element = source_offset_list->first_element; for( element_index = 0; element_index < source_offset_list->number_of_elements; element_index++ ) { if( source_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in source offset list element: %d.", function, element_index ); goto on_error; } if( libbfio_list_element_initialize( &destination_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list element: %d.", function, element_index ); goto on_error; } if( libbfio_offset_list_value_clone( &destination_value, (libbfio_offset_list_value_t *) source_list_element->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone value of offset list element: %d.", function, element_index ); goto on_error; } if( libbfio_list_element_set_value( destination_list_element, (intptr_t *) destination_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of destination list element: %d.", function, element_index ); goto on_error; } destination_value = NULL; if( ( *destination_offset_list )->first_element == NULL ) { ( *destination_offset_list )->first_element = destination_list_element; } if( ( *destination_offset_list )->last_element != NULL ) { ( *destination_offset_list )->last_element->next_element = destination_list_element; destination_list_element->previous_element = ( *destination_offset_list )->last_element; } ( *destination_offset_list )->last_element = destination_list_element; ( *destination_offset_list )->number_of_elements += 1; destination_list_element = NULL; source_list_element = source_list_element->next_element; } return( 1 ); on_error: if( destination_value != NULL ) { libbfio_offset_list_value_free( &destination_value, NULL ); } if( destination_list_element != NULL ) { libbfio_list_element_free( &destination_list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, NULL ); } if( *destination_offset_list != NULL ) { libbfio_offset_list_free( destination_offset_list, NULL ); } return( -1 ); } /* Retrieves the number of elements in the offset list * Returns 1 if successful or -1 on error */ int libbfio_offset_list_get_number_of_elements( libbfio_offset_list_t *offset_list, int *number_of_elements, libcerror_error_t **error ) { static char *function = "libbfio_offset_list_get_number_of_elements"; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( number_of_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of elements.", function ); return( -1 ); } *number_of_elements = offset_list->number_of_elements; return( 1 ); } /* Appends an offset * Returns 1 if successful, or -1 on error */ int libbfio_offset_list_append_offset( libbfio_offset_list_t *offset_list, off64_t offset, size64_t size, uint8_t merge_ranges, libcerror_error_t **error ) { libbfio_list_element_t *last_list_element = NULL; libbfio_list_element_t *list_element = NULL; libbfio_list_element_t *remove_element = NULL; libbfio_offset_list_value_t *offset_list_value = NULL; static char *function = "libbfio_offset_list_append_offset"; off64_t last_offset = 0; off64_t last_range_offset = 0; int create_list_element = 0; int element_index = 0; int merge_next_list_element_check = 0; int merge_previous_list_element_check = 0; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid offset value less than zero.", function ); return( -1 ); } if( size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } create_list_element = 1; /* Check if new range should be merged with an existing range */ if( merge_ranges == 0 ) { last_list_element = offset_list->last_element; } else if( offset_list->number_of_elements > 0 ) { last_offset = offset + size; /* Check the last element first, most often the list will be filled linear */ list_element = offset_list->last_element; if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, offset_list->number_of_elements - 1 ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, offset_list->number_of_elements - 1 ); return( -1 ); } offset_list_value = (libbfio_offset_list_value_t *) list_element->value; last_range_offset = offset_list_value->offset + offset_list_value->size; /* Check if the offset range overlaps at the end of the last offset range */ if( ( offset >= offset_list_value->offset ) && ( offset <= last_range_offset ) ) { if( last_offset > last_range_offset ) { offset_list_value->size += (size64_t) ( last_offset - last_range_offset ); } create_list_element = 0; merge_next_list_element_check = 1; } /* Check if the offset range overlaps at the beginning of the last offset range */ else if( ( last_offset >= offset_list_value->offset ) && ( last_offset <= last_range_offset ) ) { if( offset < offset_list_value->offset ) { offset_list_value->offset = offset; offset_list_value->size += (size64_t) ( offset_list_value->offset - offset ); } create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range overlaps the last offset range entirely */ else if( ( offset < offset_list_value->offset ) && ( last_offset > last_range_offset ) ) { offset_list_value->offset = offset; offset_list_value->size = size; create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range is beyond the last range */ else if( last_offset > last_range_offset ) { last_list_element = list_element; } else if( offset_list->number_of_elements > 1 ) { if( last_offset > ( last_range_offset / 2 ) ) { list_element = list_element->previous_element; for( element_index = ( offset_list->number_of_elements - 2 ); element_index >= 0; element_index-- ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libbfio_offset_list_value_t *) list_element->value; last_range_offset = offset_list_value->offset + offset_list_value->size; /* Check if the offset range overlaps at the end of an existing offset range */ if( ( offset >= offset_list_value->offset ) && ( offset <= last_range_offset ) ) { if( last_offset > last_range_offset ) { offset_list_value->size += (size64_t) ( last_offset - last_range_offset ); } create_list_element = 0; merge_next_list_element_check = 1; } /* Check if the offset range overlaps at the beginning of an existing offset range */ else if( ( last_offset >= offset_list_value->offset ) && ( last_offset <= last_range_offset ) ) { if( offset < offset_list_value->offset ) { offset_list_value->offset = offset; offset_list_value->size += (size64_t) ( offset_list_value->offset - offset ); } create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range overlaps an existing offset range entirely */ else if( ( offset < offset_list_value->offset ) && ( last_offset > last_range_offset ) ) { offset_list_value->offset = offset; offset_list_value->size = size; create_list_element = 0; merge_next_list_element_check = 1; merge_previous_list_element_check = 1; } if( create_list_element == 0 ) { break; } /* Check if the offset range belongs after the exising offset range */ if( last_offset > last_range_offset ) { last_list_element = list_element; break; } last_list_element = list_element; list_element = list_element->previous_element; } } else { list_element = offset_list->first_element; for( element_index = 0; element_index < ( offset_list->number_of_elements - 1 ); element_index++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libbfio_offset_list_value_t *) list_element->value; last_range_offset = offset_list_value->offset + offset_list_value->size; /* Check if the offset range overlaps at the end of an existing offset range */ if( ( offset >= offset_list_value->offset ) && ( offset <= last_range_offset ) ) { if( last_offset > last_range_offset ) { offset_list_value->size += (size64_t) ( last_offset - last_range_offset ); } create_list_element = 0; merge_next_list_element_check = 1; } /* Check if the offset range overlaps at the beginning of an existing offset range */ else if( ( last_offset >= offset_list_value->offset ) && ( last_offset <= last_range_offset ) ) { if( offset < offset_list_value->offset ) { offset_list_value->offset = offset; offset_list_value->size += (size64_t) ( offset_list_value->offset - offset ); } create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range overlaps an existing offset range entirely */ else if( ( offset < offset_list_value->offset ) && ( last_offset > last_range_offset ) ) { offset_list_value->offset = offset; offset_list_value->size = size; create_list_element = 0; merge_next_list_element_check = 1; merge_previous_list_element_check = 1; } if( create_list_element == 0 ) { break; } /* Check if the offset range belongs before the current offset range */ if( last_offset < last_range_offset ) { last_list_element = list_element->previous_element; break; } last_list_element = list_element; list_element = list_element->next_element; } } } /* Check if the current range should be merged with the previous range */ if( merge_previous_list_element_check != 0 ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list element.", function ); return( -1 ); } if( list_element->previous_element != NULL ) { if( list_element->previous_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for previous list element.", function ); return( -1 ); } last_offset = ( (libbfio_offset_list_value_t *) list_element->previous_element->value )->offset + ( (libbfio_offset_list_value_t *) list_element->previous_element->value )->size; if( last_offset == offset_list_value->offset ) { /* Merge offset range with previous */ offset_list_value->offset = ( (libbfio_offset_list_value_t *) list_element->previous_element->value )->offset; offset_list_value->size += ( (libbfio_offset_list_value_t *) list_element->previous_element->value )->size; /* Remove previous list element */ remove_element = list_element->previous_element; if( remove_element == offset_list->first_element ) { offset_list->first_element = remove_element->next_element; } if( remove_element == offset_list->last_element ) { offset_list->last_element = remove_element->previous_element; } if( remove_element->next_element != NULL ) { remove_element->next_element->previous_element = remove_element->previous_element; } if( remove_element->previous_element != NULL ) { remove_element->previous_element->next_element = remove_element->next_element; } remove_element->next_element = NULL; remove_element->previous_element = NULL; offset_list->number_of_elements -= 1; if( libbfio_list_element_free( &remove_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); return( -1 ); } } } } /* Check if the current range should be merged with the next range */ if( merge_next_list_element_check != 0 ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list element.", function ); return( -1 ); } if( list_element->next_element != NULL ) { if( list_element->next_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for next list element.", function ); return( -1 ); } last_offset = offset_list_value->offset + offset_list_value->size; if( last_offset == ( (libbfio_offset_list_value_t *) list_element->next_element->value )->offset ) { /* Merge offset range with next */ offset_list_value->size += ( (libbfio_offset_list_value_t *) list_element->next_element->value )->size; /* Remove next list element */ remove_element = list_element->next_element; if( remove_element == offset_list->first_element ) { offset_list->first_element = remove_element->next_element; } if( remove_element == offset_list->last_element ) { offset_list->last_element = remove_element->previous_element; } if( remove_element->next_element != NULL ) { remove_element->next_element->previous_element = remove_element->previous_element; } if( remove_element->previous_element != NULL ) { remove_element->previous_element->next_element = remove_element->next_element; } remove_element->next_element = NULL; remove_element->previous_element = NULL; offset_list->number_of_elements -= 1; if( libbfio_list_element_free( &remove_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); return( -1 ); } } } } } if( create_list_element != 0 ) { offset_list_value = NULL; if( libbfio_offset_list_value_initialize( &offset_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create offset list value.", function ); return( -1 ); } if( offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value.", function ); return( -1 ); } offset_list_value->offset = offset; offset_list_value->size = size; list_element = NULL; if( libbfio_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); libbfio_offset_list_value_free( &offset_list_value, NULL ); return( -1 ); } if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing list element.", function ); libbfio_offset_list_value_free( &offset_list_value, NULL ); return( -1 ); } list_element->value = (intptr_t *) offset_list_value; if( offset_list->number_of_elements == 0 ) { if( offset_list->first_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first element already set.", function ); libbfio_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, NULL ); return( -1 ); } if( offset_list->last_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last element already set.", function ); libbfio_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, NULL ); return( -1 ); } offset_list->first_element = list_element; offset_list->last_element = list_element; } else { if( offset_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first.", function ); libbfio_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, NULL ); return( -1 ); } if( offset_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last.", function ); libbfio_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libbfio_offset_list_value_free, NULL ); return( -1 ); } if( last_list_element == NULL ) { offset_list->first_element->previous_element = list_element; list_element->next_element = offset_list->first_element; offset_list->first_element = list_element; } else { list_element->previous_element = last_list_element; list_element->next_element = last_list_element->next_element; if( last_list_element == offset_list->last_element ) { offset_list->last_element = list_element; } else if( last_list_element->next_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing next in last list element.", function ); return( -1 ); } else { last_list_element->next_element->previous_element = list_element; } last_list_element->next_element = list_element; } } offset_list->number_of_elements++; } return( 1 ); } /* Retrieves a specific offset * Returns 1 if successful or -1 on error */ int libbfio_offset_list_get_offset( libbfio_offset_list_t *offset_list, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libbfio_offset_list_value_t *offset_list_value = NULL; static char *function = "libbfio_offset_list_get_offset"; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( ( index < 0 ) || ( index >= offset_list->number_of_elements ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid index value out of bounds.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( ( offset_list->current_element != NULL ) && ( offset_list->current_element_index != index ) ) { if( index < offset_list->current_element_index ) { if( ( offset_list->current_element_index - index ) < ( offset_list->number_of_elements / 2 ) ) { while( offset_list->current_element_index > index ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->next_element; offset_list->current_element_index--; } } } else { if( ( index - offset_list->current_element_index ) < ( offset_list->number_of_elements / 2 ) ) { while( offset_list->current_element_index < index ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->next_element; offset_list->current_element_index++; } } } } if( ( offset_list->current_element == NULL ) || ( offset_list->current_element_index != index ) ) { if( index < ( offset_list->number_of_elements / 2 ) ) { offset_list->current_element = offset_list->first_element; for( offset_list->current_element_index = 0; offset_list->current_element_index < index; offset_list->current_element_index++ ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->next_element; } } else { offset_list->current_element = offset_list->last_element; for( offset_list->current_element_index = ( offset_list->number_of_elements - 1 ); offset_list->current_element_index > index; offset_list->current_element_index-- ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->previous_element; } } } if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list element: %d.", function, offset_list->current_element_index ); return( -1 ); } if( offset_list->current_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list_value = (libbfio_offset_list_value_t *) offset_list->current_element->value; *offset = offset_list_value->offset; *size = offset_list_value->size; return( 1 ); } /* Retrieves a specific offset by its value * Returns 1 if successful, 0 if not available or -1 on error */ int libbfio_offset_list_get_offset_by_value( libbfio_offset_list_t *offset_list, off64_t offset_value, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; libbfio_offset_list_value_t *offset_list_value = NULL; static char *function = "libbfio_offset_list_get_offset_by_value"; int element_index = 0; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } list_element = offset_list->first_element; for( element_index = 0; element_index < offset_list->number_of_elements; element_index++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libbfio_offset_list_value_t *) list_element->value; if( ( offset_value >= offset_list_value->offset ) && ( offset_value < (off64_t) ( offset_list_value->offset + offset_list_value->size ) ) ) { *offset = offset_list_value->offset; *size = offset_list_value->size; return( 1 ); } list_element = list_element->next_element; } return( 0 ); } /* Determines if a certain offset range is present in the list * Returns 1 if present, 0 if not present or -1 on error */ int libbfio_offset_list_range_is_present( libbfio_offset_list_t *offset_list, off64_t offset, size64_t size, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; libbfio_offset_list_value_t *offset_list_value = NULL; static char *function = "libbfio_offset_list_range_is_present"; off64_t last_offset = 0; int element_index = 0; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid offset value less than zero.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } last_offset = offset + size; list_element = offset_list->first_element; for( element_index = 0; element_index < offset_list->number_of_elements; element_index++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libbfio_offset_list_value_t *) list_element->value; if( ( offset >= offset_list_value->offset ) && ( offset < (off64_t) ( offset_list_value->offset + offset_list_value->size ) ) ) { return( 1 ); } if( ( offset_list_value->offset >= offset ) && ( offset_list_value->offset < last_offset ) ) { return( 1 ); } list_element = list_element->next_element; } return( 0 ); } libpff-20120802/libbfio/libbfio_file.h0000644000175000017500000001167212005153060014320 00000000000000/* * File functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_FILE_H ) #define _LIBBFIO_FILE_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_libcfile.h" #include "libbfio_libcstring.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_file_io_handle libbfio_file_io_handle_t; struct libbfio_file_io_handle { /* The name */ libcstring_system_character_t *name; /* The size of the name */ size_t name_size; /* The file (handle) */ libcfile_file_t *file; /* The access flags */ int access_flags; }; int libbfio_file_io_handle_initialize( libbfio_file_io_handle_t **file_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_initialize( libbfio_handle_t **handle, libcerror_error_t **error ); int libbfio_file_io_handle_free( libbfio_file_io_handle_t **file_io_handle, libcerror_error_t **error ); int libbfio_file_io_handle_clone( libbfio_file_io_handle_t **destination_file_io_handle, libbfio_file_io_handle_t *source_file_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_get_name_size( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_get_name( libbfio_handle_t *handle, char *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_set_name( libbfio_handle_t *handle, const char *name, size_t name_length, libcerror_error_t **error ); int libbfio_file_io_handle_get_name_size( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ); int libbfio_file_io_handle_get_name( libbfio_file_io_handle_t *file_io_handle, char *name, size_t name_size, libcerror_error_t **error ); int libbfio_file_io_handle_set_name( libbfio_file_io_handle_t *file_io_handle, const char *name, size_t name_length, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_get_name_size_wide( libbfio_handle_t *handle, size_t *name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_get_name_wide( libbfio_handle_t *handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_file_set_name_wide( libbfio_handle_t *handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); int libbfio_file_io_handle_get_name_size_wide( libbfio_file_io_handle_t *file_io_handle, size_t *name_size, libcerror_error_t **error ); int libbfio_file_io_handle_get_name_wide( libbfio_file_io_handle_t *file_io_handle, wchar_t *name, size_t name_size, libcerror_error_t **error ); int libbfio_file_io_handle_set_name_wide( libbfio_file_io_handle_t *file_io_handle, const wchar_t *name, size_t name_length, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ int libbfio_file_open( libbfio_file_io_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_file_close( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); ssize_t libbfio_file_read( libbfio_file_io_handle_t *file_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_file_write( libbfio_file_io_handle_t *file_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_file_seek_offset( libbfio_file_io_handle_t *file_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_file_exists( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); int libbfio_file_is_open( libbfio_file_io_handle_t *file_io_handle, libcerror_error_t **error ); int libbfio_file_get_size( libbfio_file_io_handle_t *file_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_support.c0000644000175000017500000000452012005153060015102 00000000000000/* * Support functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_libcerror.h" #include "libbfio_libclocale.h" #include "libbfio_libcstring.h" #include "libbfio_support.h" #if !defined( HAVE_LOCAL_LIBBFIO ) /* Returns the library version as a string */ const char *libbfio_get_version( void ) { return( (const char *) LIBBFIO_VERSION_STRING ); } /* Retrieves the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ int libbfio_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libbfio_get_codepage"; if( libclocale_codepage_get( codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve codepage.", function ); return( -1 ); } return( 1 ); } /* Sets the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ int libbfio_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libbfio_set_codepage"; if( libclocale_codepage_set( codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set codepage.", function ); return( -1 ); } return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ libpff-20120802/libbfio/libbfio_file_pool.h0000644000175000017500000000311112005153060015336 00000000000000/* * File pool functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_FILE_POOL_H ) #define _LIBBFIO_FILE_POOL_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBBFIO_EXTERN \ int libbfio_file_pool_append_handles_for_names( libbfio_pool_t *pool, char * const names[], int number_of_names, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBBFIO_EXTERN \ int libbfio_file_pool_append_handles_for_names_wide( libbfio_pool_t *pool, wchar_t * const names[], int number_of_names, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_legacy.c0000644000175000017500000003357412005153060014645 00000000000000/* * Legacy functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_legacy.h" #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #include "libbfio_offset_list.h" #include "libbfio_pool.h" #if !defined( HAVE_LOCAL_LIBBFIO ) /* Reads a buffer from the handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_handle_read( libbfio_handle_t *handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_read"; ssize_t read_count = 0; int is_open = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->read == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing read function.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( internal_handle->open_on_demand != 0 ) { if( internal_handle->is_open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing is open function.", function ); return( -1 ); } if( internal_handle->open == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing open function.", function ); return( -1 ); } if( internal_handle->seek_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing seek offset function.", function ); return( -1 ); } is_open = internal_handle->is_open( internal_handle->io_handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } else if( is_open == 0 ) { if( internal_handle->open( internal_handle->io_handle, internal_handle->access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle on demand.", function ); return( -1 ); } if( internal_handle->seek_offset( internal_handle->io_handle, internal_handle->offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to find current offset: %" PRIi64 " in handle.", function, internal_handle->offset ); return( -1 ); } } } read_count = internal_handle->read( internal_handle->io_handle, buffer, size, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from handle.", function ); return( -1 ); } if( internal_handle->track_offsets_read != 0 ) { if( libbfio_offset_list_append_offset( internal_handle->offsets_read, internal_handle->offset, read_count, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append offset range to offsets read table.", function ); return( -1 ); } } internal_handle->offset += (off64_t) read_count; if( internal_handle->open_on_demand != 0 ) { if( internal_handle->close == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing close function.", function ); return( -1 ); } if( internal_handle->close( internal_handle->io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close handle on demand.", function ); return( -1 ); } } return( read_count ); } /* Writes a buffer to the handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_handle_write( libbfio_handle_t *handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; static char *function = "libbfio_handle_write"; ssize_t write_count = 0; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } if( internal_handle->write == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing write function.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } write_count = internal_handle->write( internal_handle->io_handle, buffer, size, error ); if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to handle.", function ); return( -1 ); } internal_handle->offset += (off64_t) write_count; if( (size64_t) internal_handle->offset > internal_handle->size ) { internal_handle->size = (size64_t) internal_handle->offset; } return( write_count ); } /* Reads a buffer from a handle in the pool * Returns the number of bytes read or -1 on error */ ssize_t libbfio_pool_read( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_read"; ssize_t read_count = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, internal_pool->handles[ entry ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to move handle to front of last used list.", function ); return( -1 ); } } read_count = libbfio_handle_read_buffer( internal_pool->handles[ entry ], buffer, size, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from entry: %d.", function, entry ); return( -1 ); } return( read_count ); } /* Writes a buffer to a handle in the pool * Returns the number of bytes written or -1 on error */ ssize_t libbfio_pool_write( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_write"; ssize_t write_count = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, internal_pool->handles[ entry ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to move handle to front of last used list.", function ); return( -1 ); } } write_count = libbfio_handle_write_buffer( internal_pool->handles[ entry ], buffer, size, error ); if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to entry: %d.", function, entry ); return( -1 ); } return( write_count ); } #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ libpff-20120802/libbfio/libbfio_error.h0000644000175000017500000000330312005153060014522 00000000000000/* * Error functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_ERROR_H ) #define _LIBBFIO_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBBFIO ) #include #endif #include "libbfio_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) LIBBFIO_EXTERN \ void libbfio_error_free( libbfio_error_t **error ); LIBBFIO_EXTERN \ int libbfio_error_fprint( libbfio_error_t *error, FILE *stream ); LIBBFIO_EXTERN \ int libbfio_error_sprint( libbfio_error_t *error, char *string, size_t size ); LIBBFIO_EXTERN \ int libbfio_error_backtrace_fprint( libbfio_error_t *error, FILE *stream ); LIBBFIO_EXTERN \ int libbfio_error_backtrace_sprint( libbfio_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_memory_range.h0000644000175000017500000000732112005153060016061 00000000000000/* * Memory range functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_MEMORY_RANGE_H ) #define _LIBBFIO_MEMORY_RANGE_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #include "libbfio_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libbfio_memory_range_io_handle libbfio_memory_range_io_handle_t; struct libbfio_memory_range_io_handle { /* The start of the memory range */ uint8_t *range_start; /* The size of the memory range */ size_t range_size; /* The current offset in the memory range */ size_t range_offset; /* Value to indicate the memory range is open */ uint8_t is_open; /* The current access flags */ int access_flags; }; int libbfio_memory_range_io_handle_initialize( libbfio_memory_range_io_handle_t **memory_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_memory_range_initialize( libbfio_handle_t **handle, libcerror_error_t **error ); int libbfio_memory_range_io_handle_free( libbfio_memory_range_io_handle_t **memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_io_handle_clone( libbfio_memory_range_io_handle_t **destination_memory_range_io_handle, libbfio_memory_range_io_handle_t *source_memory_range_io_handle, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_memory_range_get( libbfio_handle_t *handle, uint8_t **range_start, size_t *range_size, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_memory_range_set( libbfio_handle_t *handle, uint8_t *range_start, size_t range_size, libcerror_error_t **error ); int libbfio_memory_range_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, int access_flags, libcerror_error_t **error ); int libbfio_memory_range_close( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); ssize_t libbfio_memory_range_read( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libbfio_memory_range_write( libbfio_memory_range_io_handle_t *memory_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libbfio_memory_range_seek_offset( libbfio_memory_range_io_handle_t *memory_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libbfio_memory_range_exists( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_is_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ); int libbfio_memory_range_get_size( libbfio_memory_range_io_handle_t *memory_range_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_memory_range.c0000644000175000017500000005735112005153060016064 00000000000000/* * Memory range functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_memory_range.h" #include "libbfio_types.h" /* Initializes the memory range IO handle * Returns 1 if successful or -1 on error */ int libbfio_memory_range_io_handle_initialize( libbfio_memory_range_io_handle_t **memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_initialize"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( *memory_range_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid memory range IO handle value already set.", function ); return( -1 ); } *memory_range_io_handle = memory_allocate_structure( libbfio_memory_range_io_handle_t ); if( *memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create memory range IO handle.", function ); goto on_error; } if( memory_set( *memory_range_io_handle, 0, sizeof( libbfio_memory_range_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear memory range IO handle.", function ); goto on_error; } return( 1 ); on_error: if( *memory_range_io_handle != NULL ) { memory_free( *memory_range_io_handle ); *memory_range_io_handle = NULL; } return( -1 ); } /* Initializes the memory range handle * Returns 1 if successful or -1 on error */ int libbfio_memory_range_initialize( libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_memory_range_io_handle_t *memory_range_io_handle = NULL; static char *function = "libbfio_memory_range_initialize"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( *handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid handle value already set.", function ); return( -1 ); } if( libbfio_memory_range_io_handle_initialize( &memory_range_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create memory range IO handle.", function ); goto on_error; } if( libbfio_handle_initialize( handle, (intptr_t *) memory_range_io_handle, (int (*)(intptr_t **, libcerror_error_t **)) libbfio_memory_range_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libbfio_memory_range_io_handle_clone, (int (*)(intptr_t *, int, libcerror_error_t **)) libbfio_memory_range_open, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libbfio_memory_range_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libbfio_memory_range_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libbfio_memory_range_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_exists, (int (*)(intptr_t *, libcerror_error_t **)) libbfio_memory_range_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libbfio_memory_range_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( memory_range_io_handle != NULL ) { libbfio_memory_range_io_handle_free( &memory_range_io_handle, NULL ); } return( -1 ); } /* Frees the memory range IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_io_handle_free( libbfio_memory_range_io_handle_t **memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_free"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( *memory_range_io_handle != NULL ) { memory_free( *memory_range_io_handle ); *memory_range_io_handle = NULL; } return( 1 ); } /* Clones (duplicates) the memory range IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_io_handle_clone( libbfio_memory_range_io_handle_t **destination_memory_range_io_handle, libbfio_memory_range_io_handle_t *source_memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_io_handle_clone"; if( destination_memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination memory range IO handle.", function ); return( -1 ); } if( *destination_memory_range_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination memory range IO handle already set.", function ); return( -1 ); } if( source_memory_range_io_handle == NULL ) { *destination_memory_range_io_handle = NULL; return( 1 ); } if( libbfio_memory_range_io_handle_initialize( destination_memory_range_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create memory range handle.", function ); return( -1 ); } if( *destination_memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination memory range IO handle.", function ); return( -1 ); } ( *destination_memory_range_io_handle )->range_start = source_memory_range_io_handle->range_start; ( *destination_memory_range_io_handle )->range_size = source_memory_range_io_handle->range_size; ( *destination_memory_range_io_handle )->range_offset = source_memory_range_io_handle->range_offset; ( *destination_memory_range_io_handle )->access_flags = source_memory_range_io_handle->access_flags; return( 1 ); } /* Retrieves the range of the memory range handle * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_get( libbfio_handle_t *handle, uint8_t **range_start, size_t *range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_memory_range_io_handle_t *memory_range_io_handle = NULL; static char *function = "libbfio_memory_range_get"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } memory_range_io_handle = (libbfio_memory_range_io_handle_t *) internal_handle->io_handle; if( range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range start.", function ); return( -1 ); } if( range_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range size.", function ); return( -1 ); } *range_start = memory_range_io_handle->range_start; *range_size = memory_range_io_handle->range_size; return( 1 ); } /* Sets the range of the memory range handle * Returns 1 if succesful or -1 on error */ int libbfio_memory_range_set( libbfio_handle_t *handle, uint8_t *range_start, size_t range_size, libcerror_error_t **error ) { libbfio_internal_handle_t *internal_handle = NULL; libbfio_memory_range_io_handle_t *memory_range_io_handle = NULL; static char *function = "libbfio_memory_range_set"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } internal_handle = (libbfio_internal_handle_t *) handle; if( internal_handle->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid handle - missing IO handle.", function ); return( -1 ); } memory_range_io_handle = (libbfio_memory_range_io_handle_t *) internal_handle->io_handle; if( range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range start.", function ); return( -1 ); } if( range_size >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid range size value exceeds maximum.", function ); return( -1 ); } memory_range_io_handle->range_start = range_start; memory_range_io_handle->range_size = range_size; return( 1 ); } /* Opens the memory range handle * Returns 1 if successful or -1 on error */ int libbfio_memory_range_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_open"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - missing range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid memory range IO handle - already open.", function ); return( -1 ); } /* Either read or write flag should be set */ if( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function ); return( -1 ); } memory_range_io_handle->range_offset = 0; memory_range_io_handle->access_flags = access_flags; memory_range_io_handle->is_open = 1; return( 1 ); } /* Closes the memory range handle * Returns 0 if successful or -1 on error */ int libbfio_memory_range_close( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_close"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - missing range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } memory_range_io_handle->is_open = 0; return( 0 ); } /* Reads a buffer from the memory range handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t libbfio_memory_range_read( libbfio_memory_range_io_handle_t *memory_range_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_read"; size_t read_size = 0; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } if( ( memory_range_io_handle->access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - no read access.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( memory_range_io_handle->range_offset > memory_range_io_handle->range_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: range offset exceeds range size.", function ); return( -1 ); } /* Check if the end of the data was reached */ if( memory_range_io_handle->range_offset == memory_range_io_handle->range_size ) { return( 0 ); } /* Check the amount of data available */ read_size = memory_range_io_handle->range_size - memory_range_io_handle->range_offset; /* Cannot read more data than available */ if( read_size > size ) { read_size = size; } if( memory_copy( buffer, &( memory_range_io_handle->range_start[ memory_range_io_handle->range_offset ] ), size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to read buffer from memory range.", function ); return( -1 ); } memory_range_io_handle->range_offset += read_size; return( (ssize_t) read_size ); } /* Writes a buffer to the memory range handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t libbfio_memory_range_write( libbfio_memory_range_io_handle_t *memory_range_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_write"; size_t write_size = 0; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } if( ( memory_range_io_handle->access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - no write access.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( memory_range_io_handle->range_offset >= memory_range_io_handle->range_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: range offset exceeds range size.", function ); return( -1 ); } /* Check the amount of data available */ write_size = memory_range_io_handle->range_size - memory_range_io_handle->range_offset; /* Cannot write more data than available */ if( write_size > size ) { write_size = size; } if( memory_copy( &( memory_range_io_handle->range_start[ memory_range_io_handle->range_offset ] ), buffer, size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to write buffer to memory range.", function ); return( -1 ); } memory_range_io_handle->range_offset += write_size; return( (ssize_t) write_size ); } /* Seeks a certain offset within the memory range handle * Returns the offset if the seek is successful or -1 on error */ off64_t libbfio_memory_range_seek_offset( libbfio_memory_range_io_handle_t *memory_range_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_seek_offset"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - not open.", function ); return( -1 ); } if( offset > (off64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( whence == SEEK_CUR ) { offset += memory_range_io_handle->range_offset; } else if( whence == SEEK_END ) { offset += memory_range_io_handle->range_size; } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset.", function ); return( -1 ); } if( offset > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } memory_range_io_handle->range_offset = (size_t) offset; return( offset ); } /* Function to determine if a memory range exists * Returns 1 if the memory range exists, 0 if not or -1 on error */ int libbfio_memory_range_exists( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_exists"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { return( 0 ); } return( 1 ); } /* Check if the memory range is open * Returns 1 if open, 0 if not or -1 on error */ int libbfio_memory_range_is_open( libbfio_memory_range_io_handle_t *memory_range_io_handle, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_is_open"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( memory_range_io_handle->is_open == 0 ) { return( 0 ); } return( 1 ); } /* Retrieves the memory range size * Returns 1 if successful or -1 on error */ int libbfio_memory_range_get_size( libbfio_memory_range_io_handle_t *memory_range_io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libbfio_memory_range_get_size"; if( memory_range_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid memory range IO handle.", function ); return( -1 ); } if( memory_range_io_handle->range_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid memory range IO handle - invalid range start.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = (size64_t) memory_range_io_handle->range_size; return( 1 ); } libpff-20120802/libbfio/Makefile.in0000664000175000017500000006643712006536015013630 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libbfio DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbfio_la_LIBADD = am__libbfio_la_SOURCES_DIST = libbfio_codepage.h libbfio_definitions.h \ libbfio_error.c libbfio_error.h libbfio_extern.h \ libbfio_file.c libbfio_file.h libbfio_file_pool.c \ libbfio_file_pool.h libbfio_file_range.c libbfio_file_range.h \ libbfio_handle.c libbfio_handle.h libbfio_legacy.c \ libbfio_legacy.h libbfio_libcerror.h libbfio_libcfile.h \ libbfio_libclocale.h libbfio_libcpath.h libbfio_libcstring.h \ libbfio_libuna.h libbfio_list_type.c libbfio_list_type.h \ libbfio_memory_range.c libbfio_memory_range.h \ libbfio_offset_list.c libbfio_offset_list.h libbfio_pool.c \ libbfio_pool.h libbfio_support.c libbfio_support.h \ libbfio_types.h libbfio_unused.h @HAVE_LOCAL_LIBBFIO_TRUE@am_libbfio_la_OBJECTS = libbfio_error.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file.lo libbfio_file_pool.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.lo libbfio_legacy.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_list_type.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_offset_list.lo \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_pool.lo libbfio_support.lo libbfio_la_OBJECTS = $(am_libbfio_la_OBJECTS) @HAVE_LOCAL_LIBBFIO_TRUE@am_libbfio_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libbfio_la_SOURCES) DIST_SOURCES = $(am__libbfio_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBBFIO_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBBFIO_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBBFIO_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LOCAL_LIBBFIO_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBBFIO_TRUE@noinst_LTLIBRARIES = libbfio.la @HAVE_LOCAL_LIBBFIO_TRUE@libbfio_la_SOURCES = \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_codepage.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_definitions.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_error.c libbfio_error.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_extern.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file.c libbfio_file.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_pool.c libbfio_file_pool.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range.c libbfio_file_range.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.c libbfio_handle.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_legacy.c libbfio_legacy.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcerror.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcfile.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libclocale.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcpath.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcstring.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libuna.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_list_type.c libbfio_list_type.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.c libbfio_memory_range.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_offset_list.c libbfio_offset_list.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_pool.c libbfio_pool.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_support.c libbfio_support.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_types.h \ @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libbfio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libbfio/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbfio.la: $(libbfio_la_OBJECTS) $(libbfio_la_DEPENDENCIES) $(LINK) $(am_libbfio_la_rpath) $(libbfio_la_OBJECTS) $(libbfio_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_file_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_legacy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_list_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_memory_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_offset_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libbfio ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libbfio_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libbfio/libbfio_list_type.h0000644000175000017500000001226712005153060015416 00000000000000/* * List type functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIST_TYPE_H ) #define _LIBBFIO_LIST_TYPE_H #include #include #include "libbfio_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The list comparison definitions */ enum LIBBFIO_LIST_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBBFIO_LIST_COMPARE_LESS, /* The first and second values are equal */ LIBBFIO_LIST_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBBFIO_LIST_COMPARE_GREATER }; /* The list insert flag definitions */ enum LIBBFIO_LIST_INSERT_FLAGS { /* Allow duplicate entries */ LIBBFIO_LIST_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBBFIO_LIST_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libbfio_list_element libbfio_list_element_t; struct libbfio_list_element { /* The previous list element */ libbfio_list_element_t *previous_element; /* The next list element */ libbfio_list_element_t *next_element; /* The value */ intptr_t *value; }; typedef struct libbfio_list libbfio_list_t; struct libbfio_list { /* The number of elements */ int number_of_elements; /* The first element */ libbfio_list_element_t *first_element; /* The last element */ libbfio_list_element_t *last_element; }; int libbfio_list_element_initialize( libbfio_list_element_t **element, libcerror_error_t **error ); int libbfio_list_element_free( libbfio_list_element_t **element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libbfio_list_element_get_value( libbfio_list_element_t *element, intptr_t **value, libcerror_error_t **error ); int libbfio_list_element_set_value( libbfio_list_element_t *element, intptr_t *value, libcerror_error_t **error ); int libbfio_list_initialize( libbfio_list_t **list, libcerror_error_t **error ); int libbfio_list_free( libbfio_list_t **list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libbfio_list_empty( libbfio_list_t *list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libbfio_list_clone( libbfio_list_t **destination_list, libbfio_list_t *source_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libbfio_list_get_number_of_elements( libbfio_list_t *list, int *number_of_elements, libcerror_error_t **error ); int libbfio_list_get_element_by_index( libbfio_list_t *list, int list_element_index, libbfio_list_element_t **element, libcerror_error_t **error ); int libbfio_list_get_value_by_index( libbfio_list_t *list, int list_element_index, intptr_t **value, libcerror_error_t **error ); int libbfio_list_prepend_element( libbfio_list_t *list, libbfio_list_element_t *element, libcerror_error_t **error ); int libbfio_list_prepend_value( libbfio_list_t *list, intptr_t *value, libcerror_error_t **error ); int libbfio_list_append_element( libbfio_list_t *list, libbfio_list_element_t *element, libcerror_error_t **error ); int libbfio_list_append_value( libbfio_list_t *list, intptr_t *value, libcerror_error_t **error ); int libbfio_list_insert_element( libbfio_list_t *list, libbfio_list_element_t *element, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); int libbfio_list_insert_value( libbfio_list_t *list, intptr_t *value, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); int libbfio_list_remove_element( libbfio_list_t *list, libbfio_list_element_t *element, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_pool.c0000644000175000017500000015306212005153060014345 00000000000000/* * The internal pool functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_definitions.h" #include "libbfio_handle.h" #include "libbfio_libcerror.h" #include "libbfio_list_type.h" #include "libbfio_pool.h" #include "libbfio_types.h" /* Initialize the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_initialize( libbfio_pool_t **pool, int number_of_handles, int maximum_number_of_open_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_initialize"; size_t handles_size = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( *pool != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid pool value already set.", function ); return( -1 ); } if( number_of_handles < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of handles value less than zero.", function ); return( -1 ); } if( maximum_number_of_open_handles < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid maximum number of open handles value less than zero.", function ); return( -1 ); } internal_pool = memory_allocate_structure( libbfio_internal_pool_t ); if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create pool.", function ); goto on_error; } if( memory_set( internal_pool, 0, sizeof( libbfio_internal_pool_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear pool.", function ); memory_free( internal_pool ); return( -1 ); } if( libbfio_list_initialize( &( internal_pool->last_used_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create last used list.", function ); goto on_error; } if( number_of_handles > 0 ) { handles_size = sizeof( libbfio_handle_t * ) * number_of_handles; if( handles_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid handles size value exceeds maximum.", function ); return( -1 ); } internal_pool->handles = (libbfio_handle_t **) memory_allocate( handles_size ); if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create handles.", function ); goto on_error; } if( memory_set( internal_pool->handles, 0, handles_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear handles.", function ); goto on_error; } } internal_pool->number_of_handles = number_of_handles; internal_pool->maximum_number_of_open_handles = maximum_number_of_open_handles; *pool = (libbfio_pool_t *) internal_pool; return( 1 ); on_error: if( internal_pool != NULL ) { if( internal_pool->handles != NULL ) { memory_free( internal_pool->handles ); } if( internal_pool->last_used_list != NULL ) { libbfio_list_free( &( internal_pool->last_used_list ), NULL, NULL ); } memory_free( internal_pool ); } return( -1 ); } /* Frees the pool including elements * Returns 1 if successful or -1 on error */ int libbfio_pool_free( libbfio_pool_t **pool, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_free"; int handle_iterator = 0; int result = 1; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( *pool != NULL ) { internal_pool = (libbfio_internal_pool_t *) *pool; if( internal_pool->handles != NULL ) { for( handle_iterator = 0; handle_iterator < internal_pool->number_of_handles; handle_iterator++ ) { if( internal_pool->handles[ handle_iterator ] != NULL ) { if( libbfio_handle_free( &( internal_pool->handles[ handle_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to free handle: %d.", function, handle_iterator ); result = -1; } } } memory_free( internal_pool->handles ); } if( internal_pool->last_used_list != NULL ) { if( libbfio_list_free( &( internal_pool->last_used_list ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free last used list.", function ); result = -1; } } memory_free( internal_pool ); *pool = NULL; } return( result ); } /* Clones (duplicates) the pool * The values in the offsets read list are not duplicated * Returns 1 if successful or -1 on error */ int libbfio_pool_clone( libbfio_pool_t **destination_pool, libbfio_pool_t *source_pool, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_source_pool = NULL; static char *function = "libbfio_pool_clone"; int handle_iterator = 0; if( destination_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination pool.", function ); return( -1 ); } if( *destination_pool != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination pool already set.", function ); return( -1 ); } if( source_pool == NULL ) { *destination_pool = NULL; return( 1 ); } internal_source_pool = (libbfio_internal_pool_t *) source_pool; if( libbfio_pool_initialize( destination_pool, internal_source_pool->number_of_handles, internal_source_pool->maximum_number_of_open_handles, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination handle.", function ); goto on_error; } if( *destination_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination pool.", function ); goto on_error; } if( internal_source_pool->handles != NULL ) { for( handle_iterator = 0; handle_iterator < internal_source_pool->number_of_handles; handle_iterator++ ) { if( internal_source_pool->handles[ handle_iterator ] != NULL ) { if( libbfio_handle_clone( &( ( (libbfio_internal_pool_t *) *destination_pool )->handles[ handle_iterator ] ), internal_source_pool->handles[ handle_iterator ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone pool handle: %d.", function, handle_iterator ); goto on_error; } } } } return( 1 ); on_error: if( *destination_pool != NULL ) { libbfio_pool_free( destination_pool, NULL ); } return( -1 ); } /* Resizes the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_resize( libbfio_pool_t *pool, int number_of_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; void *reallocation = NULL; static char *function = "libbfio_pool_resize"; size_t handles_size = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( number_of_handles <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid number of handles value zero or less.", function ); return( -1 ); } if( internal_pool->number_of_handles < number_of_handles ) { handles_size = sizeof( libbfio_handle_t * ) * number_of_handles; if( handles_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid handles size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( internal_pool->handles, handles_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize handles.", function ); return( -1 ); } internal_pool->handles = (libbfio_handle_t **) reallocation; if( memory_set( &( internal_pool->handles[ internal_pool->number_of_handles ] ), 0, sizeof( libbfio_handle_t * ) * ( number_of_handles - internal_pool->number_of_handles ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear handles.", function ); return( -1 ); } internal_pool->number_of_handles = number_of_handles; } return( 1 ); } /* Opens the handle * Returns 1 if successful or -1 on error */ int libbfio_pool_open_handle( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { static char *function = "libbfio_pool_open_handle"; int is_open = 0; if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } is_open = libbfio_handle_is_open( handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } else if( is_open == 1 ) { return( 1 ); } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_append_handle_to_last_used_list( internal_pool, handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append handle to last used list.", function ); return( -1 ); } } if( libbfio_handle_open( handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open handle.", function ); return( -1 ); } if( libbfio_handle_seek_offset( handle, ( (libbfio_internal_handle_t *) handle )->offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset.", function ); return( -1 ); } return( 1 ); } /* Appends the handle to the last used list * Closes the less frequently used handle if necessary * Returns 1 if successful or -1 on error */ int libbfio_pool_append_handle_to_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_append_handle_to_last_used_list"; if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } /* Check if there is room in the pool for another open handle */ if( ( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) && ( ( internal_pool->number_of_open_handles + 1 ) >= internal_pool->maximum_number_of_open_handles ) ) { last_used_list_element = internal_pool->last_used_list->last_element; if( libbfio_list_remove_element( internal_pool->last_used_list, last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove last used list element from list.", function ); return( -1 ); } if( last_used_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element.", function ); return( -1 ); } if( last_used_list_element->value != NULL ) { if( libbfio_handle_close( (libbfio_handle_t *) last_used_list_element->value, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle.", function ); libbfio_list_element_free( &last_used_list_element, NULL, NULL ); return( -1 ); } ( (libbfio_internal_handle_t *) last_used_list_element->value )->pool_last_used_list_element = NULL; /* Make sure the truncate flag is removed from the handle */ ( (libbfio_internal_handle_t *) last_used_list_element->value )->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); } /* The last used list element is reused to contain the new last used entry */ } else { if( libbfio_list_element_initialize( &last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create last used list element.", function ); return( -1 ); } internal_pool->number_of_open_handles++; } last_used_list_element->value = (intptr_t *) handle; ( (libbfio_internal_handle_t *) handle )->pool_last_used_list_element = last_used_list_element; if( libbfio_list_prepend_element( internal_pool->last_used_list, last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend last used list element to list.", function ); libbfio_list_element_free( &last_used_list_element, NULL, NULL ); return( -1 ); } return( 1 ); } /* Moves the handle to the front of the last used list * Returns 1 if successful or -1 on error */ int libbfio_pool_move_handle_to_front_of_last_used_list( libbfio_internal_pool_t *internal_pool, libbfio_handle_t *handle, libcerror_error_t **error ) { libbfio_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_move_handle_to_front_of_last_used_list"; if( internal_pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } last_used_list_element = ( (libbfio_internal_handle_t *) handle )->pool_last_used_list_element; if( last_used_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element.", function ); return( -1 ); } if( last_used_list_element != internal_pool->last_used_list->first_element ) { if( libbfio_list_remove_element( internal_pool->last_used_list, last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove last used list element from list.", function ); return( -1 ); } if( libbfio_list_prepend_element( internal_pool->last_used_list, last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend last used list element to list.", function ); ( (libbfio_internal_handle_t *) handle )->pool_last_used_list_element = NULL; libbfio_list_element_free( &last_used_list_element, NULL, NULL ); return( -1 ); } } return( 1 ); } /* Retrieves the number of handles in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_number_of_handles( libbfio_pool_t *pool, int *number_of_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_number_of_handles"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( number_of_handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of handles.", function ); return( -1 ); } *number_of_handles = internal_pool->number_of_handles; return( 1 ); } /* Retrieves a certain handle from the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t **handle, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_handle"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry value out of bounds.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } *handle = internal_pool->handles[ entry ]; return( 1 ); } /* Appends a handle to the pool * Sets the entry * Returns 1 if successful or -1 on error */ int libbfio_pool_append_handle( libbfio_pool_t *pool, int *entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_append_handle"; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry.", function ); return( -1 ); } if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } /* Check if the handle is open */ is_open = libbfio_handle_is_open( handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } /* Resize the pool if necessary */ if( ( internal_pool->number_of_used_handles + 1 ) >= internal_pool->number_of_handles ) { if( libbfio_pool_resize( pool, internal_pool->number_of_handles + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize pool.", function ); return( -1 ); } } *entry = internal_pool->number_of_used_handles; internal_pool->handles[ *entry ] = handle; internal_pool->number_of_used_handles++; if( is_open == 0 ) { /* Set the access flags is the handle is not open */ if( libbfio_handle_set_access_flags( handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set access flags.", function ); return( -1 ); } } else if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_append_handle_to_last_used_list( internal_pool, handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append handle to last used list.", function ); return( -1 ); } } return( 1 ); } /* Sets a certain handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_set_handle( libbfio_pool_t *pool, int entry, libbfio_handle_t *handle, int access_flags, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_set_handle"; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->last_used_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing last used list.", function ); return( -1 ); } if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry value out of bounds.", function ); return( -1 ); } /* TODO allow to re set handles * make sure all pool references are removed */ if( internal_pool->handles[ entry ] != NULL ) { ( (libbfio_internal_handle_t *) ( internal_pool->handles[ entry ] ) )->pool_last_used_list_element = NULL; libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid entry value already set.", function ); return( -1 ); } /* Check if the handle is open */ is_open = libbfio_handle_is_open( handle, error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if handle is open.", function ); return( -1 ); } internal_pool->handles[ entry ] = handle; if( is_open == 0 ) { /* Set the access flags is the handle is not open */ if( libbfio_handle_set_access_flags( handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set access flags.", function ); return( -1 ); } } else if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_append_handle_to_last_used_list( internal_pool, handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append handle to last used list.", function ); return( -1 ); } } return( 1 ); } /* Opens a handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_open( libbfio_pool_t *pool, int entry, int access_flags, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_open"; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry value out of bounds.", function ); return( -1 ); } /* Make sure the handle is not open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: entry: %d is already open.", function, entry ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } return( 1 ); } /* Reopens a handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_reopen( libbfio_pool_t *pool, int entry, int access_flags, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_reopen"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } if( libbfio_handle_reopen( internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to reopen handle for entry: %d.", function, entry ); return( -1 ); } return( 1 ); } /* Closes a handle in the pool * Returns 0 if successful or -1 on error */ int libbfio_pool_close( libbfio_pool_t *pool, int entry, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; libbfio_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_close"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } if( internal_pool->handles[ entry ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handle for entry: %d.", function, entry ); return( -1 ); } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { last_used_list_element = ( (libbfio_internal_handle_t *) internal_pool->handles[ entry ] )->pool_last_used_list_element; if( libbfio_list_remove_element( internal_pool->last_used_list, last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove last used list element from list.", function ); goto on_error; } if( last_used_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element.", function ); goto on_error; } if( last_used_list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element value.", function ); goto on_error; } ( (libbfio_internal_handle_t *) last_used_list_element->value )->pool_last_used_list_element = NULL; if( libbfio_list_element_free( &last_used_list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free last used list element.", function ); goto on_error; } } if( libbfio_handle_close( internal_pool->handles[ entry ], error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle for entry: %d.", function, entry ); return( -1 ); } return( 0 ); on_error: if( last_used_list_element != NULL ) { libbfio_list_element_free( &last_used_list_element, NULL, NULL ); } return( -1 ); } /* Closes all the files in the pool * Returns 0 if successful or -1 on error */ int libbfio_pool_close_all( libbfio_pool_t *pool, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_close_all"; int handle_iterator = 0; int is_open = 0; int result = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; for( handle_iterator = 0; handle_iterator < internal_pool->number_of_handles; handle_iterator++ ) { if( internal_pool->handles[ handle_iterator ] != NULL ) { /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ handle_iterator ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, handle_iterator ); result = -1; } else if( ( is_open == 1 ) && ( libbfio_pool_close( pool, handle_iterator, error ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle: %d.", function, handle_iterator ); result = -1; } } } return( result ); } /* Reads a buffer from a handle in the pool * Returns the number of bytes read or -1 on error */ ssize_t libbfio_pool_read_buffer( libbfio_pool_t *pool, int entry, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_read_buffer"; ssize_t read_count = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, internal_pool->handles[ entry ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to move handle to front of last used list.", function ); return( -1 ); } } read_count = libbfio_handle_read_buffer( internal_pool->handles[ entry ], buffer, size, error ); if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from entry: %d.", function, entry ); return( -1 ); } return( read_count ); } /* Writes a buffer to a handle in the pool * Returns the number of bytes written or -1 on error */ ssize_t libbfio_pool_write_buffer( libbfio_pool_t *pool, int entry, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_write_buffer"; ssize_t write_count = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, internal_pool->handles[ entry ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to move handle to front of last used list.", function ); return( -1 ); } } write_count = libbfio_handle_write_buffer( internal_pool->handles[ entry ], buffer, size, error ); if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to entry: %d.", function, entry ); return( -1 ); } return( write_count ); } /* Seeks an offset in a handle in the pool * Returns the offset if successful or -1 on error */ off64_t libbfio_pool_seek_offset( libbfio_pool_t *pool, int entry, off64_t offset, int whence, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_seek_offset"; off64_t seek_offset = 0; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) { if( libbfio_pool_move_handle_to_front_of_last_used_list( internal_pool, internal_pool->handles[ entry ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to move handle to front of last used list.", function ); return( -1 ); } } seek_offset = libbfio_handle_seek_offset( internal_pool->handles[ entry ], offset, whence, error ); if( seek_offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset in entry: %d.", function, entry ); return( -1 ); } return( seek_offset ); } /* Retrieves the size of a handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_size( libbfio_pool_t *pool, int entry, size64_t *size, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_size"; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( libbfio_handle_get_size( internal_pool->handles[ entry ], size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of entry: %d.", function, entry ); return( -1 ); } return( 1 ); } /* Retrieves the current offset in a handle in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_offset( libbfio_pool_t *pool, int entry, off64_t *offset, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_offset"; int access_flags = 0; int is_open = 0; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( internal_pool->handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid pool - missing handles.", function ); return( -1 ); } if( ( entry < 0 ) || ( entry >= internal_pool->number_of_handles ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry.", function ); return( -1 ); } /* Make sure the handle is open */ is_open = libbfio_handle_is_open( internal_pool->handles[ entry ], error ); if( is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if entry: %d is open.", function, entry ); return( -1 ); } else if( is_open == 0 ) { if( libbfio_handle_get_access_flags( internal_pool->handles[ entry ], &access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve access flags.", function ); return( -1 ); } if( libbfio_pool_open_handle( internal_pool, internal_pool->handles[ entry ], access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open entry: %d.", function, entry ); return( -1 ); } } if( libbfio_handle_get_offset( internal_pool->handles[ entry ], offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset.", function ); return( -1 ); } return( 1 ); } /* Retrieves the maximum number of open handles in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_get_maximum_number_of_open_handles( libbfio_pool_t *pool, int *maximum_number_of_open_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; static char *function = "libbfio_pool_get_maximum_number_of_open_handles"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; if( maximum_number_of_open_handles == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid maximum number of open handles.", function ); return( -1 ); } *maximum_number_of_open_handles = internal_pool->maximum_number_of_open_handles; return( 1 ); } /* Sets the maximum number of open handles in the pool * Returns 1 if successful or -1 on error */ int libbfio_pool_set_maximum_number_of_open_handles( libbfio_pool_t *pool, int maximum_number_of_open_handles, libcerror_error_t **error ) { libbfio_internal_pool_t *internal_pool = NULL; libbfio_list_element_t *last_used_list_element = NULL; static char *function = "libbfio_pool_set_maximum_number_of_open_handles"; if( pool == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid pool.", function ); return( -1 ); } internal_pool = (libbfio_internal_pool_t *) pool; internal_pool->maximum_number_of_open_handles = maximum_number_of_open_handles; while( ( internal_pool->maximum_number_of_open_handles != LIBBFIO_POOL_UNLIMITED_NUMBER_OF_OPEN_HANDLES ) && ( internal_pool->number_of_open_handles > internal_pool->maximum_number_of_open_handles ) ) { last_used_list_element = internal_pool->last_used_list->last_element; if( libbfio_list_remove_element( internal_pool->last_used_list, last_used_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED, "%s: unable to remove last used list element from list.", function ); goto on_error; } if( last_used_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element.", function ); goto on_error; } if( last_used_list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used list element value.", function ); goto on_error; } if( libbfio_handle_close( (libbfio_handle_t *) last_used_list_element->value, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close handle.", function ); goto on_error; } internal_pool->number_of_open_handles--; ( (libbfio_internal_handle_t *) last_used_list_element->value )->pool_last_used_list_element = NULL; /* Make sure the truncate flag is removed from the handle */ ( (libbfio_internal_handle_t *) last_used_list_element->value )->access_flags &= ~( LIBBFIO_ACCESS_FLAG_TRUNCATE ); if( libbfio_list_element_free( &last_used_list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free last used list element.", function ); goto on_error; } } return( 1 ); on_error: if( last_used_list_element != NULL ) { libbfio_list_element_free( &last_used_list_element, NULL, NULL ); } return( -1 ); } libpff-20120802/libbfio/libbfio_unused.h0000644000175000017500000000246712005153060014706 00000000000000/* * The internal unused definition * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_UNUSED_H ) #define _LIBBFIO_INTERNAL_UNUSED_H #include #if !defined( LIBBFIO_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBBFIO_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBBFIO_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBBFIO_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBBFIO_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libbfio/libbfio_list_type.c0000644000175000017500000007430312005153060015410 00000000000000/* * List type functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_libcerror.h" #include "libbfio_list_type.h" /* Creates a list element * Make sure the value element is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libbfio_list_element_initialize( libbfio_list_element_t **element, libcerror_error_t **error ) { static char *function = "libbfio_list_element_initialize"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( *element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid element value already set.", function ); return( -1 ); } *element = memory_allocate_structure( libbfio_list_element_t ); if( *element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create list element.", function ); goto on_error; } if( memory_set( *element, 0, sizeof( libbfio_list_element_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list element.", function ); goto on_error; } return( 1 ); on_error: if( *element != NULL ) { memory_free( *element ); *element = NULL; } return( -1 ); } /* Frees a list element * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libbfio_list_element_free( libbfio_list_element_t **element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libbfio_list_element_free"; int result = 1; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( *element != NULL ) { if( ( ( *element )->previous_element != NULL ) || ( ( *element )->next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: list element part of a list.", function ); return( -1 ); } if( value_free_function != NULL ) { if( value_free_function( &( ( *element )->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); result = -1; } } memory_free( *element ); *element = NULL; } return( result ); } /* Retrieves the value from the list element * Returns 1 if successful or -1 on error */ int libbfio_list_element_get_value( libbfio_list_element_t *element, intptr_t **value, libcerror_error_t **error ) { static char *function = "libbfio_list_element_get_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } *value = element->value; return( 1 ); } /* Sets the value in the list element * Returns 1 if successful or -1 on error */ int libbfio_list_element_set_value( libbfio_list_element_t *element, intptr_t *value, libcerror_error_t **error ) { static char *function = "libbfio_list_element_set_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } element->value = value; return( 1 ); } /* Creates a list * Make sure the value list is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libbfio_list_initialize( libbfio_list_t **list, libcerror_error_t **error ) { static char *function = "libbfio_list_initialize"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid list value already set.", function ); return( -1 ); } *list = memory_allocate_structure( libbfio_list_t ); if( *list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create list.", function ); goto on_error; } if( memory_set( *list, 0, sizeof( libbfio_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list.", function ); goto on_error; } return( 1 ); on_error: if( *list != NULL ) { memory_free( *list ); *list = NULL; } return( -1 ); } /* Frees a list including the elements * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libbfio_list_free( libbfio_list_t **list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libbfio_list_free"; int result = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *list != NULL ) { result = libbfio_list_empty( *list, value_free_function, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty list.", function ); } memory_free( *list ); *list = NULL; } return( result ); } /* Empties a list and frees the elements * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libbfio_list_empty( libbfio_list_t *list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_empty"; int element_index = 0; int number_of_elements = 0; int result = 1; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( list->number_of_elements > 0 ) { number_of_elements = list->number_of_elements; for( element_index = 0; element_index < number_of_elements; element_index++ ) { list_element = list->first_element; if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_index ); return( -1 ); } list->first_element = list_element->next_element; if( list->last_element == list_element ) { list->last_element = list_element->next_element; } list->number_of_elements -= 1; if( list_element->next_element != NULL ) { list_element->next_element->previous_element = NULL; } list_element->next_element = NULL; if( libbfio_list_element_free( &list_element, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); result = -1; } } } return( result ); } /* Clones the list and its elements * * The values are cloned using the value_clone_function * On error the values are freed using the value_free_function * * Returns 1 if successful or -1 on error */ int libbfio_list_clone( libbfio_list_t **destination_list, libbfio_list_t *source_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { libbfio_list_element_t *source_list_element = NULL; intptr_t *destination_value = NULL; static char *function = "libbfio_list_clone"; int element_index = 0; if( destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination list.", function ); return( -1 ); } if( *destination_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination list already set.", function ); return( -1 ); } if( value_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value free function.", function ); return( -1 ); } if( value_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value clone function.", function ); return( -1 ); } if( source_list == NULL ) { *destination_list = NULL; return( 1 ); } if( libbfio_list_initialize( destination_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list.", function ); goto on_error; } if( *destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination list.", function ); goto on_error; } source_list_element = source_list->first_element; for( element_index = 0; element_index < source_list->number_of_elements; element_index++ ) { if( source_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in source list element: %d.", function, element_index ); goto on_error; } if( value_clone_function( &destination_value, source_list_element->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone value of list element: %d.", function, element_index ); goto on_error; } if( libbfio_list_append_value( *destination_list, destination_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value of list element: %d.", function, element_index ); goto on_error; } destination_value = NULL; source_list_element = source_list_element->next_element; } return( 1 ); on_error: if( destination_value != NULL ) { value_free_function( &destination_value, NULL ); } if( *destination_list != NULL ) { libbfio_list_free( destination_list, value_free_function, error ); } return( -1 ); } /* Retrieves the number of elements in the list * Returns 1 if successful or -1 on error */ int libbfio_list_get_number_of_elements( libbfio_list_t *list, int *number_of_elements, libcerror_error_t **error ) { static char *function = "libbfio_list_get_number_of_elements"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( number_of_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of elements.", function ); return( -1 ); } *number_of_elements = list->number_of_elements; return( 1 ); } /* Retrieves a specific element from the list * Returns 1 if successful or -1 on error */ int libbfio_list_get_element_by_index( libbfio_list_t *list, int element_index, libbfio_list_element_t **element, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_get_element_by_index"; int element_iterator = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( ( element_index < 0 ) || ( element_index >= list->number_of_elements ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( element_index < ( list->number_of_elements / 2 ) ) { list_element = list->first_element; for( element_iterator = 0; element_iterator < element_index; element_iterator++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_iterator ); return( -1 ); } list_element = list_element->next_element; } } else { list_element = list->last_element; for( element_iterator = ( list->number_of_elements - 1 ); element_iterator > element_index; element_iterator-- ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_iterator ); return( -1 ); } list_element = list_element->previous_element; } } if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing list element.", function ); return( -1 ); } *element = list_element; return( 1 ); } /* Retrieves a specific value from the list * Returns 1 if successful or -1 on error */ int libbfio_list_get_value_by_index( libbfio_list_t *list, int element_index, intptr_t **value, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_get_value_by_index"; int result = 0; result = libbfio_list_get_element_by_index( list, element_index, &list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from list.", function, element_index ); return( -1 ); } if( libbfio_list_element_get_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of list element: %d.", function, element_index ); return( -1 ); } return( 1 ); } /* Prepend an element to the list * Returns 1 if successful or -1 on error */ int libbfio_list_prepend_element( libbfio_list_t *list, libbfio_list_element_t *element, libcerror_error_t **error ) { static char *function = "libbfio_list_prepend_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( list->first_element != NULL ) { list->first_element->previous_element = element; element->next_element = list->first_element; } if( list->last_element == NULL ) { list->last_element = element; } list->first_element = element; list->number_of_elements += 1; return( 1 ); } /* Prepend a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libbfio_list_prepend_value( libbfio_list_t *list, intptr_t *value, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_prepend_value"; if( libbfio_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); goto on_error; } if( libbfio_list_prepend_element( list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend element to list.", function ); goto on_error; } if( libbfio_list_element_set_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of list element.", function ); goto on_error; } return( 1 ); on_error: if( list_element != NULL ) { libbfio_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Append an element to the list * Returns 1 if successful or -1 on error */ int libbfio_list_append_element( libbfio_list_t *list, libbfio_list_element_t *element, libcerror_error_t **error ) { static char *function = "libbfio_list_append_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( list->first_element == NULL ) { list->first_element = element; } if( list->last_element != NULL ) { list->last_element->next_element = element; element->previous_element = list->last_element; } list->last_element = element; list->number_of_elements += 1; return( 1 ); } /* Append a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libbfio_list_append_value( libbfio_list_t *list, intptr_t *value, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_append_value"; if( libbfio_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); goto on_error; } if( libbfio_list_append_element( list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to list.", function ); goto on_error; } if( libbfio_list_element_set_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of list element.", function ); goto on_error; } return( 1 ); on_error: if( list_element != NULL ) { libbfio_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Inserts a list element into the list * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBBFIO_LIST_COMPARE_LESS, * LIBBFIO_LIST_COMPARE_EQUAL, LIBBFIO_LIST_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate value. * Only allowing unique entries can be enforced by setting the flag LIBBFIO_LIST_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libbfio_list_insert_element( libbfio_list_t *list, libbfio_list_element_t *element, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_insert_element"; int element_index = 0; int result = -1; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( ( element->previous_element != NULL ) || ( element->next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: list element already part of a list.", function ); return( -1 ); } if( value_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBBFIO_LIST_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( list->number_of_elements == 0 ) { if( list->first_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first element already set.", function ); return( -1 ); } if( list->last_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last element already set.", function ); return( -1 ); } list->first_element = element; list->last_element = element; } else { if( list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first.", function ); return( -1 ); } if( list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last.", function ); return( -1 ); } list_element = list->first_element; for( element_index = 0; element_index < list->number_of_elements; element_index++ ) { result = value_compare_function( element->value, list_element->value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare list element: %d.", function, element_index ); return( -1 ); } else if( result == LIBBFIO_LIST_COMPARE_EQUAL ) { if( ( insert_flags & LIBBFIO_LIST_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBBFIO_LIST_COMPARE_LESS ) { break; } else if( result != LIBBFIO_LIST_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, result ); return( -1 ); } list_element = list_element->next_element; } if( result == LIBBFIO_LIST_COMPARE_LESS ) { element->previous_element = list_element->previous_element; element->next_element = list_element; if( list_element == list->first_element ) { list->first_element = element; } else if( list_element->previous_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing previous in list element: %d.", function, element_index ); return( -1 ); } else { list_element->previous_element->next_element = element; } list_element->previous_element = element; } else { element->previous_element = list->last_element; list->last_element->next_element = element; list->last_element = element; } } list->number_of_elements += 1; return( 1 ); } /* Inserts a value to the list * * Creates a new list element * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBBFIO_LIST_COMPARE_LESS, * LIBBFIO_LIST_COMPARE_EQUAL, LIBBFIO_LIST_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate value. * Only allowing unique entries can be enforced by setting the flag LIBBFIO_LIST_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libbfio_list_insert_value( libbfio_list_t *list, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libbfio_list_element_t *list_element = NULL; static char *function = "libbfio_list_insert_value"; int result = 0; if( libbfio_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); return( -1 ); } if( libbfio_list_element_set_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of list element.", function ); goto on_error; } result = libbfio_list_insert_element( list, list_element, value_compare_function, insert_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element to list.", function ); goto on_error; } else if( result == 0 ) { if( libbfio_list_element_free( &list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free list element.", function ); goto on_error; } } return( result ); on_error: if( list_element != NULL ) { libbfio_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Removes an element from the list * Returns 1 if successful or -1 on error */ int libbfio_list_remove_element( libbfio_list_t *list, libbfio_list_element_t *element, libcerror_error_t **error ) { static char *function = "libbfio_list_remove_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( element == list->first_element ) { list->first_element = element->next_element; } if( element == list->last_element ) { list->last_element = element->previous_element; } if( element->next_element != NULL ) { element->next_element->previous_element = element->previous_element; } if( element->previous_element != NULL ) { element->previous_element->next_element = element->next_element; } element->next_element = NULL; element->previous_element = NULL; list->number_of_elements -= 1; return( 1 ); } libpff-20120802/libbfio/libbfio_libcpath.h0000644000175000017500000000241712005153060015164 00000000000000/* * The internal libcpath header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCPATH_H ) #define _LIBBFIO_LIBCPATH_H #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if defined( HAVE_LOCAL_LIBCPATH ) #include #include #else /* If libtool DLL support is enabled set LIBCPATH_DLL_IMPORT * before including libcpath.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCPATH_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libbfio/libbfio_libcfile.h0000644000175000017500000000251112005153060015142 00000000000000/* * The internal libcfile header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_LIBCFILE_H ) #define _LIBBFIO_LIBCFILE_H #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if defined( HAVE_LOCAL_LIBCFILE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCFILE_DLL_IMPORT * before including libcfile.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCFILE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libbfio/libbfio_support.h0000644000175000017500000000261312005153060015110 00000000000000/* * Support functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_SUPPORT_H ) #define _LIBBFIO_SUPPORT_H #include #include #include "libbfio_extern.h" #include "libbfio_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBBFIO ) LIBBFIO_EXTERN \ const char *libbfio_get_version( void ); LIBBFIO_EXTERN \ int libbfio_get_codepage( int *codepage, libcerror_error_t **error ); LIBBFIO_EXTERN \ int libbfio_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libbfio/libbfio_error.c0000644000175000017500000000470112005153060014520 00000000000000/* * Error functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libbfio_error.h" #include "libbfio_libcerror.h" #if !defined( HAVE_LOCAL_LIBBFIO ) /* Free an error and its elements */ void libbfio_error_free( libbfio_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libbfio_error_fprint( libbfio_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libbfio_error_sprint( libbfio_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libbfio_error_backtrace_fprint( libbfio_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libbfio_error_backtrace_sprint( libbfio_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */ libpff-20120802/libbfio/libbfio_types.h0000644000175000017500000000270712005153060014544 00000000000000/* * The internal type definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBBFIO_INTERNAL_TYPES_H ) #define _LIBBFIO_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio * The definitions in are copied here * for local use of libbfio */ #if defined( HAVE_LOCAL_LIBBFIO ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libbfio_handle {} libbfio_handle_t; typedef struct libbfio_pool {} libbfio_pool_t; #else typedef intptr_t libbfio_handle_t; typedef intptr_t libbfio_pool_t; #endif #endif /* defined( HAVE_LOCAL_LIBBFIO ) */ #endif libpff-20120802/COPYING0000644000175000017500000001673011011553565011201 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. libpff-20120802/README0000644000175000017500000000146211716116771011030 00000000000000Building .deb files To build .deb files make sure you've have installed debhelper, dpkg-buildpackage and fakeroot * copy the dpkg directory to debian * run "dpkg-buildpackage -rfakeroot" this will create the .deb files in the parent directory Building .rpm files To build .rpm files make sure you've have installed rpmbuild * rename the distrubted tar.gz file if necessary; applies to experimental, alpha and beta versions "mv libpff-alpha-.tar.gz libpff-.tar.gz" * run "rpmbuild -ta libpff-.tar.gz" this will create the .rpm files in the rpmbuild tree, commonly ~/rpmbuild/RPMS/... Solaris To build libpff on Solaris make sure that /usr/ccs/bin and /usr/sfw/bin are defined in the PATH environment variable Also see: * README.dll * README.macosx * README.mingw * README.static libpff-20120802/contrib/0000775000175000017500000000000012006536214011656 500000000000000libpff-20120802/contrib/Makefile.am0000644000175000017500000000120711476172470013642 00000000000000WIN64_MSVSCPP_FILES = \ win64/libbfio/libbfio.vcproj \ win64/libcstring/libcstring.vcproj \ win64/liberror/liberror.vcproj \ win64/libfdata/libfdata.vcproj \ win64/libfdatetime/libfdatetime.vcproj \ win64/libfguid/libfguid.vcproj \ win64/libfmapi/libfmapi.vcproj \ win64/libfwnt/libfwnt.vcproj win64/libnotify/libnotify.vcproj \ win64/libpff_dll/libpff_dll.vcproj \ win64/libsystem/libsystem.vcproj \ win64/libuna/libuna.vcproj \ win64/pffexport/pffexport.vcproj \ win64/pffinfo/pffinfo.vcproj \ win64/libpff.sln EXTRA_DIST = \ $(WIN64_MSVSCPP_FILES) MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/contrib/Makefile.in0000664000175000017500000004711112006536015013646 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ WIN64_MSVSCPP_FILES = \ win64/libbfio/libbfio.vcproj \ win64/libcstring/libcstring.vcproj \ win64/liberror/liberror.vcproj \ win64/libfdata/libfdata.vcproj \ win64/libfdatetime/libfdatetime.vcproj \ win64/libfguid/libfguid.vcproj \ win64/libfmapi/libfmapi.vcproj \ win64/libfwnt/libfwnt.vcproj EXTRA_DIST = \ $(WIN64_MSVSCPP_FILES) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu contrib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am win64/libnotify/libnotify.vcproj \ win64/libpff_dll/libpff_dll.vcproj \ win64/libsystem/libsystem.vcproj \ win64/libuna/libuna.vcproj \ win64/pffexport/pffexport.vcproj \ win64/pffinfo/pffinfo.vcproj \ win64/libpff.sln distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/contrib/win64/0000775000175000017500000000000012006536214012625 500000000000000libpff-20120802/contrib/win64/libfguid/0000775000175000017500000000000012006536214014412 500000000000000libpff-20120802/contrib/win64/libfguid/libfguid.vcproj0000644000175000017500000001557511462233676017372 00000000000000 libpff-20120802/contrib/win64/libbfio/0000775000175000017500000000000012006536214014233 500000000000000libpff-20120802/contrib/win64/libbfio/libbfio.vcproj0000644000175000017500000002021011476171033017003 00000000000000 libpff-20120802/contrib/win64/libfdatetime/0000775000175000017500000000000012006536214015256 500000000000000libpff-20120802/contrib/win64/libfdatetime/libfdatetime.vcproj0000644000175000017500000001706311462233676021074 00000000000000 libpff-20120802/contrib/win64/libfwnt/0000775000175000017500000000000012006536214014272 500000000000000libpff-20120802/contrib/win64/libfwnt/libfwnt.vcproj0000644000175000017500000001556311462233676017127 00000000000000 libpff-20120802/contrib/win64/libfmapi/0000775000175000017500000000000012006536214014410 500000000000000libpff-20120802/contrib/win64/libfmapi/libfmapi.vcproj0000644000175000017500000002304411462233676017354 00000000000000 libpff-20120802/contrib/win64/libcstring/0000775000175000017500000000000012006536214014765 500000000000000libpff-20120802/contrib/win64/libcstring/libcstring.vcproj0000644000175000017500000001620411541364347020304 00000000000000 libpff-20120802/contrib/win64/liberror/0000775000175000017500000000000012006536214014445 500000000000000libpff-20120802/contrib/win64/liberror/liberror.vcproj0000644000175000017500000001510011462233676017440 00000000000000 libpff-20120802/contrib/win64/libfdata/0000775000175000017500000000000012006536214014373 500000000000000libpff-20120802/contrib/win64/libfdata/libfdata.vcproj0000644000175000017500000002326111540500451017304 00000000000000 libpff-20120802/include/0000775000175000017500000000000012006536212011637 500000000000000libpff-20120802/include/libpff.h0000664000175000017500000040421312006536127013203 00000000000000/* * Library to support the Personal Folder File (PAB, PST and OST) format * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_H ) #define _LIBPFF_H #include #include #include #include #include #include #include #include #if defined( LIBPFF_HAVE_BFIO ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* ------------------------------------------------------------------------- * Support functions * ------------------------------------------------------------------------- */ /* Returns the library version */ LIBPFF_EXTERN \ const char *libpff_get_version( void ); /* Returns the access flags for reading */ LIBPFF_EXTERN \ int libpff_get_access_flags_read( void ); /* Retrieves the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_get_codepage( int *codepage, libpff_error_t **error ); /* Sets the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_set_codepage( int codepage, libpff_error_t **error ); /* Determines if a file is a Personal Folder File file (check for the file signature) * Returns 1 if true, 0 if not or -1 on error */ LIBPFF_EXTERN \ int libpff_check_file_signature( const char *filename, libpff_error_t **error ); #if defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file is a Personal Folder File file (check for the file signature) * Returns 1 if true, 0 if not or -1 on error */ LIBPFF_EXTERN \ int libpff_check_file_signature_wide( const wchar_t *filename, libpff_error_t **error ); #endif #if defined( LIBPFF_HAVE_BFIO ) /* Determines if a file is a Personal Folder File file (check for the file signature) using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ LIBPFF_EXTERN \ int libpff_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libpff_error_t **error ); #endif /* ------------------------------------------------------------------------- * Notify functions * ------------------------------------------------------------------------- */ /* Sets the verbose notification */ LIBPFF_EXTERN \ void libpff_notify_set_verbose( int verbose ); /* Sets the notification stream * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_notify_set_stream( FILE *stream, libpff_error_t **error ); /* Opens the notification stream using a filename * The stream is opened in append mode * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_notify_stream_open( const char *filename, libpff_error_t **error ); /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_notify_stream_close( libpff_error_t **error ); /* ------------------------------------------------------------------------- * Error functions * ------------------------------------------------------------------------- */ /* Frees the error including elements */ LIBPFF_EXTERN \ void libpff_error_free( libpff_error_t **error ); /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_fprint( libpff_error_t *error, FILE *stream ); /* Prints a descriptive string of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_sprint( libpff_error_t *error, char *string, size_t size ); /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_backtrace_fprint( libpff_error_t *error, FILE *stream ); /* Prints a backtrace of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_backtrace_sprint( libpff_error_t *error, char *string, size_t size ); /* ------------------------------------------------------------------------- * File functions * ------------------------------------------------------------------------- */ /* Initializes a file * Make sure the value file is pointing to is set to NULL * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_initialize( libpff_file_t **file, libpff_error_t **error ); /* Frees a file * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_free( libpff_file_t **file, libpff_error_t **error ); /* Signals the file to abort its current activity * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_signal_abort( libpff_file_t *file, libpff_error_t **error ); /* Opens a file * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_open( libpff_file_t *file, const char *filename, int access_flags, libpff_error_t **error ); #if defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_open_wide( libpff_file_t *file, const wchar_t *filename, int access_flags, libpff_error_t **error ); #endif #if defined( LIBPFF_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_open_file_io_handle( libpff_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libpff_error_t **error ); #endif /* Closes a file * Returns 0 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_close( libpff_file_t *file, libpff_error_t **error ); /* Recovers deleted items within a file * By default only the unallocated space is checked for recoverable items * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_recover_items( libpff_file_t *file, uint8_t recovery_flags, libpff_error_t **error ); /* Retrieves the file size * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_size( libpff_file_t *file, size64_t *size, libpff_error_t **error ); /* Retrieves the content type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_content_type( libpff_file_t *file, uint8_t *content_type, libpff_error_t **error ); /* Retrieves the file type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_type( libpff_file_t *file, uint8_t *type, libpff_error_t **error ); /* Retrieves the encryption type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_encryption_type( libpff_file_t *file, uint8_t *encryption_type, libpff_error_t **error ); /* Retrieves the ASCII codepage * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_ascii_codepage( libpff_file_t *file, int *ascii_codepage, libpff_error_t **error ); /* Sets the ASCII codepage * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_set_ascii_codepage( libpff_file_t *file, int ascii_codepage, libpff_error_t **error ); /* Retrieves the number of unallocated blocks * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_number_of_unallocated_blocks( libpff_file_t *file, int unallocated_block_type, int *number_of_unallocated_blocks, libpff_error_t **error ); /* Retrieves a specific unallocated block * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_unallocated_block( libpff_file_t *file, int unallocated_block_type, int unallocated_block_index, off64_t *offset, size64_t *size, libpff_error_t **error ); /* Retrieves the root item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_root_item( libpff_file_t *file, libpff_item_t **root_item, libpff_error_t **error ); /* Retrieves the message store * Returns 1 if successful, 0 if not present or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_message_store( libpff_file_t *file, libpff_item_t **message_store, libpff_error_t **error ); /* Retrieves the root folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_root_folder( libpff_file_t *file, libpff_item_t **root_folder, libpff_error_t **error ); /* Retrieves an item for a specific identifier * Returns 1 if successful, 0 if no such item, or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_item_by_identifier( libpff_file_t *file, uint32_t item_identifier, libpff_item_t **item, libpff_error_t **error ); /* Retrieves the number of orphan items * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_number_of_orphan_items( libpff_file_t *file, int *number_of_orphan_items, libpff_error_t **error ); /* Retrieves a specific orphan item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_orphan_item( libpff_file_t *file, int orphan_item_index, libpff_item_t **orphan_item, libpff_error_t **error ); /* Retrieves the number of recovered items * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_number_of_recovered_items( libpff_file_t *file, int *number_of_recovered_items, libpff_error_t **error ); /* Retrieves a specific recovered item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_recovered_item( libpff_file_t *file, int recovered_item_index, libpff_item_t **recovered_item, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Name to id map entry functions * ------------------------------------------------------------------------- */ /* Retrieves the type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_type( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *entry_type, libpff_error_t **error ); /* Retrieves the number * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_number( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint32_t *number, libpff_error_t **error ); /* Retrieves the UTF-8 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf8_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-8 string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf8_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf16_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf16_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf16_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error ); /* Retrieves the GUID * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_guid( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *guid, size_t size, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Item functions * ------------------------------------------------------------------------- */ /* Clones an item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_clone( libpff_item_t **destination_item, libpff_item_t *source_item, libpff_error_t **error ); /* Frees an item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_free( libpff_item_t **item, libpff_error_t **error ); /* Retrieves the identifier * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_identifier( libpff_item_t *item, uint32_t *identifier, libpff_error_t **error ); /* Retrieves the number of sets values * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_number_of_sets( libpff_item_t *item, uint32_t *number_of_sets, libpff_error_t **error ); /* Retrieves the number of entries (of a set) * All sets in an item contain the same number of entries * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_number_of_entries( libpff_item_t *item, uint32_t *number_of_entries, libpff_error_t **error ); /* Retrieves the entry and value type of a specific entry * The name to id map entry is set when available * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_type( libpff_item_t *item, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libpff_error_t **error ); /* Retrieves the value type of a specific entry type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_value_type( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t flags, libpff_error_t **error ); /* Retrieves the value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set * the value type is ignored and set. The default behavior is a strict * matching of the value type. In this case the value type must be filled * with the corresponding value type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the value of a specific entry for an UTF-8 encoded name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_by_utf8_name( libpff_item_t *item, int set_index, uint8_t *utf8_entry_name, size_t utf8_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error ); /* Retrieves the value of a specific entry for an UTF-16 encoded name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_by_utf16_name( libpff_item_t *item, int set_index, uint16_t *utf16_entry_name, size_t utf16_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error ); /* Retrieves the boolean value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_boolean( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 16-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_16bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 32-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_32bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 64-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_64bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 64-bit filetime value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_filetime( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the size value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the floating point value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_floating_point( libpff_item_t *item, int set_index, uint32_t entry_type, double *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-8 string size of a specific entry * The returned size includes the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf8_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf8_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-8 string value of a specific entry * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf8_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-16 string size of a specific entry * The returned size includes the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf16_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf16_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-16 string value of a specific entry * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf16_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the size of a binary data value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_binary_data_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libpff_error_t **error ); /* Retrieves the binary data value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_binary_data( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *binary_data, size_t size, uint8_t flags, libpff_error_t **error ); /* Retrieves the GUID value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_guid( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *guid, size_t size, uint8_t flags, libpff_error_t **error ); /* Retrieves the multi value of a specific entry * Creates a new multi value * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_multi_value( libpff_item_t *item, int set_index, uint32_t entry_type, libpff_multi_value_t **multi_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the type value * Determines the item type if neccessary * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_type( libpff_item_t *item, uint8_t *item_type, libpff_error_t **error ); /* Retrieves the number of sub items from a item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_number_of_sub_items( libpff_item_t *item, int *number_of_sub_items, libpff_error_t **error ); /* Retrieves the sub item for the specific index from a item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_sub_item( libpff_item_t *item, int sub_item_index, libpff_item_t **sub_item, libpff_error_t **error ); /* Retrieves the sub item for the specific identifier from a item * Returns 1 if successful, 0 if no such item, or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_sub_item_by_identifier( libpff_item_t *item, uint32_t sub_item_identifier, libpff_item_t **sub_item, libpff_error_t **error ); /* Retrieves the size of the UTF-8 encoded item display name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_display_name_size( item, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded item display name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_display_name( item, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded item display name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_display_name_size( item, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded item display name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_display_name( item, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded item address type * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_address_type_size( item, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded item address type * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_address_type( item, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded item address type * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_address_type_size( item, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded item address type * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_address_type( item, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded item e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_email_address_size( item, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded item e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_email_address( item, utf8_string, size, error ) \ libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded item e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_email_address_size( item, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded item e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_email_address( item, utf16_string, size, error ) \ libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string, utf16_string_size, 0, error ) /* ------------------------------------------------------------------------- * Multi value functions * ------------------------------------------------------------------------- */ /* Frees a multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_free( libpff_multi_value_t **multi_value, libpff_error_t **error ); /* Retrieves the number of values in a multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_number_of_values( libpff_multi_value_t *multi_value, int *number_of_values, libpff_error_t **error ); /* Retrieves a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value( libpff_multi_value_t *multi_value, int value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error ); /* Retrieves the 32-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_32bit( libpff_multi_value_t *multi_value, int value_index, uint32_t *value, libpff_error_t **error ); /* Retrieves the 64-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_64bit( libpff_multi_value_t *multi_value, int value_index, uint64_t *value, libpff_error_t **error ); /* Retrieves the 64-bit filetime value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_filetime( libpff_multi_value_t *multi_value, int value_index, uint64_t *filetime, libpff_error_t **error ); /* Retrieves the UTF-8 string size of a specific value of the multi value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf8_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-8 string value of a specific value of the multi value * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf8_string( libpff_multi_value_t *multi_value, int value_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string size of a specific value of the multi value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf16_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf16_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string value of a specific value of the multi value * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf16_string( libpff_multi_value_t *multi_value, int value_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error ); /* Retrieves the size of a binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_binary_data_size( libpff_multi_value_t *multi_value, int value_index, size_t *size, libpff_error_t **error ); /* Retrieves the binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_binary_data( libpff_multi_value_t *multi_value, int value_index, uint8_t *binary_data, size_t size, libpff_error_t **error ); /* Retrieves the GUID value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_guid( libpff_multi_value_t *multi_value, int value_index, uint8_t *guid, size_t size, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Folder functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded folder name * Size includes the end of string character * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf8_name_size( folder, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded folder name * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf8_name( folder, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded folder name * Size includes the end of string character * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf16_name_size( folder, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded folder name * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf16_name( folder, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the folder type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_type( libpff_item_t *folder, uint8_t *type, libpff_error_t **error ); /* Retrieves the number of sub folders from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_folders( libpff_item_t *folder, int *number_of_sub_folders, libpff_error_t **error ); /* Retrieves the sub folder for the specific index from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folder( libpff_item_t *folder, int sub_folder_index, libpff_item_t **sub_folder, libpff_error_t **error ); /* Retrieves the sub folder from a folder for the specific UTF-8 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub folder or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folder_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_folder_name, size_t utf8_sub_folder_name_size, libpff_item_t **sub_folder, libpff_error_t **error ); /* Retrieves the sub folder from a folder for the specific UTF-16 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub folder or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folder_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_folder_name, size_t utf16_sub_folder_name_size, libpff_item_t **sub_folder, libpff_error_t **error ); /* Retrieves the sub folders from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folders( libpff_item_t *folder, libpff_item_t **sub_folders, libpff_error_t **error ); /* Retrieves the number of sub messages from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_messages( libpff_item_t *folder, int *number_of_sub_messages, libpff_error_t **error ); /* Retrieves the sub message for the specific index from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_message( libpff_item_t *folder, int sub_message_index, libpff_item_t **sub_message, libpff_error_t **error ); /* Retrieves the sub message from a folder for the specific UTF-8 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub message or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_message_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_message_name, size_t utf8_sub_message_name_size, libpff_item_t **sub_message, libpff_error_t **error ); /* Retrieves the sub message from a folder for the specific UTF-16 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub message or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_message_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_message_name, size_t utf16_sub_message_name_size, libpff_item_t **sub_message, libpff_error_t **error ); /* Retrieves the sub messages from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_messages( libpff_item_t *folder, libpff_item_t **sub_messages, libpff_error_t **error ); /* Retrieves the number of sub associated contents from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_associated_contents( libpff_item_t *folder, int *number_of_sub_associated_contents, libpff_error_t **error ); /* Retrieves the sub associated content for the specific index from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_associated_content( libpff_item_t *folder, int sub_associated_content_index, libpff_item_t **sub_associated_content, libpff_error_t **error ); /* Retrieves the sub associated contents from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_associated_contents( libpff_item_t *folder, libpff_item_t **sub_associated_contents, libpff_error_t **error ); /* NOTE that the following function is currently for debugging only */ /* Retrieves the unknowns from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_unknowns( libpff_item_t *folder, libpff_item_t **unknowns, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Message store functions * ------------------------------------------------------------------------- */ /* Retrieves the message store valid folder mask * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_store_get_valid_folder_mask( message_store, valid_folder_mask, error ) \ libpff_item_get_entry_value_32bit( message_store, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_VALID_FOLDER_MASK, valid_folder_mask, 0, error ) /* Retrieves the message store password checksum * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_store_get_password_checksum( message_store, password_checksum, error ) \ libpff_item_get_entry_value_32bit( message_store, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_PASSWORD_CHECKSUM, password_checksum, 0, error ) /* ------------------------------------------------------------------------- * Name to id map functions * ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- * Message functions * ------------------------------------------------------------------------- */ /* Retrieves the UTF-8 string size of a specific entry from the referenced message item * The returned size includes the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf8_string_size( libpff_item_t *message, uint32_t entry_type, size_t *utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-8 string value of a specific entry from the referenced message item * The function uses a codepage if necessary, it tries to read PidTagMessageCodepage * if not available it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf8_string( libpff_item_t *message, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string size of a specific entry from the referenced message item * The returned size includes the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf16_string_size( libpff_item_t *message, uint32_t entry_type, size_t *utf16_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string value of a specific entry from the referenced message item * The function uses a codepage if necessary, it tries to read PidTagMessageCodepage * if not available it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf16_string( libpff_item_t *message, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error ); /* Retrieves the number of attachment from a message item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_number_of_attachments( libpff_item_t *message, int *number_of_attachments, libpff_error_t **error ); /* Retrieves the attachment for the specific index from a message item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_attachment( libpff_item_t *message, int attachment_index, libpff_item_t **attachment, libpff_error_t **error ); /* Retrieves the attachments from a message item * Returns 1 if successful, 0 if the message item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_attachments( libpff_item_t *message, libpff_item_t **attachments, libpff_error_t **error ); /* Retrieves the recipients from a message item * Returns 1 if successful, 0 if the message item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_recipients( libpff_item_t *message, libpff_item_t **recipients, libpff_error_t **error ); /* Retrieves the size of the UTF-8 encoded message class * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_class_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message class * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_class( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message class * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_class_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message class * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_class( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message subject * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_subject_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message subject * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_subject( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message subject * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_subject_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message subject * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_subject( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message conversation topic * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_conversation_topic_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message conversation topic * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_conversation_topic( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message conversation topic * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_conversation_topic_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message conversation topic * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_conversation_topic( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf16_string, utf16_string_size, error ) /* Retrieves the message conversation index size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_conversation_index_size( message, size, error ) \ libpff_item_get_entry_value_binary_data_size( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX, size, 0, error ) /* Retrieves the message conversation index * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_conversation_index( message, conversation_index, size, error ) \ libpff_item_get_entry_value_binary_data( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX, conversation_index, size, 0, error ) /* Retrieves the size of the UTF-8 encoded message sender name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_name_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sender name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_name( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sender name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_name_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sender name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_name( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message sender e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_email_address_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sender e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_email_address( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sender e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_email_address_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sender e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_email_address( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message sent reprenting name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_name_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sent reprenting name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_name( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sent reprenting name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_name_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sent reprenting name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_name( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message sent representing e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_email_address_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sent representing e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_email_address( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sent representing e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_email_address_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sent representing e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_email_address( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message received by name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_name_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message received by name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_name( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message received by name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_name_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message received by name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_name( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message received by e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_email_address_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message received by e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_email_address( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message received by e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_email_address_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message received by e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_email_address( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the message importance * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_importance( message, importance, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IMPORTANCE, importance, 0, error ) /* Retrieves the message priority * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_priority( message, priority, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_PRIORITY, priority, 0, error ) /* Retrieves the message sensitivity * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_sensitivity( message, sensitivity, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENSITIVITY, sensitivity, 0, error ) /* Retrieves the message flags * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_flags( message, flags, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_FLAGS, flags, 0, error ) /* Retrieves the message size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_size( message, size, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SIZE, size, 0, error ) /* Retrieves the message client submit time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_client_submit_time( message, client_submit_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CLIENT_SUBMIT_TIME, client_submit_time, 0, error ) /* Retrieves the message delivery time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_delivery_time( message, delivery_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_DELIVERY_TIME, delivery_time, 0, error ) /* Retrieves the message creation time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_creation_time( message, creation_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CREATION_TIME, creation_time, 0, error ) /* Retrieves the message modification time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_modification_time( message, modification_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_MODIFICATION_TIME, modification_time, 0, error ) /* Retrieves the size of the UTF-8 encoded message transport headers * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_transport_headers_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message transport headers * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_transport_headers( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message transport headers * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_transport_headers_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message transport headers * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_transport_headers( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf16_string, utf16_string_size, error ) /* Retrieves the message plain text body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_plain_text_body_size( libpff_item_t *message, size_t *size, libpff_error_t **error ); /* Retrieves the plain text message body * The body is encoded in UTF-8 * The function uses a codepage if necessary, it tries to read PidTagInternetCodepage first, * after that PidTagMessageCodepage and if not available it uses the codepage set for the library * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_plain_text_body( libpff_item_t *message, uint8_t *message_body, size_t size, libpff_error_t **error ); /* Retrieves the message RTF body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_rtf_body_size( libpff_item_t *message, size_t *size, libpff_error_t **error ); /* Retrieves the RTF message body * The body is encoded in UTF-8 * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_rtf_body( libpff_item_t *message, uint8_t *message_body, size_t size, libpff_error_t **error ); /* Retrieves the message HTML body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_html_body_size( libpff_item_t *message, size_t *size, libpff_error_t **error ); /* Retrieves the HTML message body * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_html_body( libpff_item_t *message, uint8_t *message_body, size_t size, libpff_error_t **error ); /* Retrieves the message reminder time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_reminder_time( message, reminder_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_TIME, reminder_time, 0, error ) /* Retrieves the value indicating if the message is a reminder * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_is_reminder( message, is_reminder, error ) \ libpff_item_get_entry_value_boolean( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_REMINDER, is_reminder, 0, error ) /* Retrieves the value indicating if the message is private * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_is_private( message, is_private, error ) \ libpff_item_get_entry_value_boolean( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_PRIVATE, is_private, 0, error ) /* Retrieves the message reminder signal time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_reminder_signal_time( message, reminder_signal_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_SIGNAL_TIME, reminder_signal_time, 0, error ) /* ------------------------------------------------------------------------- * Task functions * ------------------------------------------------------------------------- */ /* Retrieves the task status * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_status( task, status, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_STATUS, status, 0, error ) /* Retrieves the task percentage complete * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_percentage_complete( task, percentage_complete, error ) \ libpff_item_get_entry_value_floating_point( task, 0, LIBPFF_ENTRY_TYPE_TASK_PERCENTAGE_COMPLETE, percentage_complete, 0, error ) /* Retrieves the task start date * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_start_date( task, start_date, error ) \ libpff_item_get_entry_value_filetime( task, 0, LIBPFF_ENTRY_TYPE_TASK_START_DATE, start_date, 0, error ) /* Retrieves the task due date * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_due_date( task, due_date, error ) \ libpff_item_get_entry_value_filetime( task, 0, LIBPFF_ENTRY_TYPE_TASK_DUE_DATE, due_date, 0, error ) /* Retrieves the task actual effort in minutes * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_actual_effort( task, actual_effort, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_ACTUAL_EFFORT, actual_effort, 0, error ) /* Retrieves the task total effort in minutes * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_total_effort( task, total_effort, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_TOTAL_EFFORT, total_effort, 0, error ) /* Retrieves the task version * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_version( task, version, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_VERSION, version, 0, error ) /* Retrieves the value indicating if the task is complete * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_is_complete( task, is_complete, error ) \ libpff_item_get_entry_value_boolean( task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_COMPLETE, is_complete, 0, error ) /* Retrieves the value indicating if the task is recurring * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_is_recurring( task, is_recurring, error ) \ libpff_item_get_entry_value_boolean( task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_RECURRING, is_recurring, 0, error ) /* ------------------------------------------------------------------------- * Appointment functions * ------------------------------------------------------------------------- */ /* Retrieves the appointment busy status * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_busy_status( appointment, busy_status, error ) \ libpff_item_get_entry_value_32bit( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_BUSY_STATUS, busy_status, 0, error ) /* Retrieves the size of the UTF-8 encoded appointment location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_location_size( appointment, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded appointment location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_location( appointment, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded appointment location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_location_size( appointment, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded appointment location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_location( appointment, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf16_string, utf16_string_size, error ) /* Retrieves the appointment start time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_start_time( appointment, start_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_START_TIME, start_time, 0, error ) /* Retrieves the appointment end time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_end_time( appointment, end_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_END_TIME, end_time, 0, error ) /* Retrieves the appointment duration in minutes * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_duration( appointment, duration, error ) \ libpff_item_get_entry_value_32bit( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_DURATION, duration, 0, error ) /* Retrieves the size of the UTF-8 encoded appointment recurrence pattern * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_recurrence_pattern_size( appointment, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf8_string_size, error ) /* Retrieves the UTF-8 encoded appointment recurrence pattern * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_recurrence_pattern( appointment, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded appointment recurrence pattern * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_recurrence_pattern_size( appointment, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf16_string_size, error ) /* Retrieves the UTF-16 encoded appointment recurrence pattern * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_recurrence_pattern( appointment, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded appointment timezone description * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_timezone_description_size( appointment, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded appointment timezone description * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_timezone_description( appointment, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded appointment timezone description * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_timezone_description_size( appointment, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded appointment timezone description * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_timezone_description( appointment, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf16_string, utf16_string_size, error ) /* Retrieves the appointment first effective time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_first_effective_time( appointment, first_effective_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_FIRST_EFFECTIVE_TIME, first_effective_time, 0, error ) /* Retrieves the appointment last effective time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_last_effective_time( appointment, last_effective_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_LAST_EFFECTIVE_TIME, last_effective_time, 0, error ) /* ------------------------------------------------------------------------- * Address functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded address file under * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf8_file_under_size( address, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded address file under * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf8_file_under( address, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded address file under * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf16_file_under_size( address, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded address file under * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf16_file_under( address, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf16_string, utf16_string_size, error ) /* ------------------------------------------------------------------------- * Contact functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded contact generational abbreviation * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_generational_abbreviation_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact generational abbreviation name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_generational_abbreviation( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact generational abbreviation * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_generational_abbreviation_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact generational abbreviation name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_generational_abbreviation( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact given name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_given_name_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact given name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_given_name( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact given name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_given_name_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact given name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_given_name( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact initials * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_initials_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact initials * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_initials( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact initials * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_initials_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact initials * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_initials( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact surname * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_surname_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact surname * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_surname( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact surname * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_surname_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact surname * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_surname( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact postal address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_postal_address_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact postal address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_postal_address( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact postal address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_postal_address_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact postal address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_postal_address( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact company name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_company_name_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact company name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_company_name( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact company name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_company_name_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact company name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_company_name( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact job title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_job_title_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact job title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_job_title( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact job title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_job_title_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact job title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_job_title( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact department name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_department_name_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact department name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_department_name( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact department name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_department_name_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact department name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_department_name( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact office location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_office_location_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact office location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_office_location( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact office location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_office_location_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact office location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_office_location( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact callback phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_callback_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact callback phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_callback_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact callback phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_callback_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact callback phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_callback_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact primary phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_primary_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact primary phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_primary_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact primary phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_primary_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact primary phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_primary_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact home phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_home_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact home phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_home_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact home phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_home_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact home phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_home_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact primary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_1_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact primary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_1( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact primary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_1_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact primary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_1( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact secondary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_2_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact secondary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_2( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact secondary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_2_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact secondary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_2( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact mobile phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_mobile_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact mobile phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_mobile_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact mobile phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_mobile_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact mobile phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_mobile_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact business fax number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_fax_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact business fax number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_fax_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact business fax number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_fax_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact business fax number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_fax_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact country * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_country_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact country * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_country( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact country * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_country_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact country * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_country( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact locality * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_locality_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact locality * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_locality( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact locality * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_locality_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact locality * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_locality( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_title_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_title( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_title_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_title( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact primary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_1_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact primary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_1( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact primary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_1_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact primary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_1( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact secondary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_2_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact secondary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_2( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact secondary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_2_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact secondary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_2( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact tertiary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_3_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact tertiary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_3( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact tertiary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_3_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact tertiary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_3( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf16_string, utf16_string_size, error ) /* ------------------------------------------------------------------------- * E-mail functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded e-mail filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf8_filename_size( email, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf8_string_size, error ) /* Retrieves the utf-8 encoded e-mail filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf8_filename( email, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded e-mail filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf16_filename_size( email, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf16_string_size, error ) /* Retrieves the utf-16 encoded e-mail filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf16_filename( email, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf16_string, utf16_string_size, error ) /* ------------------------------------------------------------------------- * Attachment functions * ------------------------------------------------------------------------- */ /* Retrieves the attachment type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_type( libpff_item_t *attachment, int *attachment_type, libpff_error_t **error ); /* Retrieves the size of the UTF-8 encoded attachment short filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_short_filename_size( attachment, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded attachment short filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_short_filename( attachment, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded attachment short filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_short_filename_size( attachment, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded attachment short filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_short_filename( attachment, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded attachment long filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_long_filename_size( attachment, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded attachment long filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_long_filename( attachment, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded attachment long filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_long_filename_size( attachment, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded attachment long filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_long_filename( attachment, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf16_string, utf16_string_size, 0, error ) /* Retrieves the attachment data size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_data_size( libpff_item_t *attachment, size64_t *size, libpff_error_t **error ); /* Reads attachment data from the curent offset into a buffer * Returns the amount of bytes read or -1 on error */ LIBPFF_EXTERN \ ssize_t libpff_attachment_data_read_buffer( libpff_item_t *attachment, uint8_t *buffer, size_t buffer_size, libpff_error_t **error ); /* Seeks a certain offset of the attachment data * Returns the offset if seek is successful or -1 on error */ LIBPFF_EXTERN \ off64_t libpff_attachment_data_seek_offset( libpff_item_t *attachment, off64_t offset, int whence, libpff_error_t **error ); #if defined( LIBPFF_HAVE_BFIO ) /* Retrieves the attachment data file io handle * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_data_file_io_handle( libpff_item_t *attachment, libbfio_handle_t **file_io_handle, libpff_error_t **error ); #endif /* Retrieves the attached item * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_item( libpff_item_t *attachment, libpff_item_t **attached_item, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Recipients functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_display_name_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_display_name( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_display_name_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_display_name( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded address type * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_address_type_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded address type * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_address_type( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded address type * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_address_type_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded address type * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_address_type( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded email address * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_email_address_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded email address * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_email_address( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded email address * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_email_address_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded email address * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_email_address( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded recipient display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_recipient_display_name_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded recipient display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_recipient_display_name( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded recipient display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_recipient_display_name_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded recipient display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_recipient_display_name( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the recipient type * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_recipients_get_type( recipients, recipient_index, type, error ) \ libpff_item_get_entry_value_32bit( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_TYPE, type, 0, error ) #if defined( __cplusplus ) } #endif #endif libpff-20120802/include/Makefile.am0000644000175000017500000000103112005155275013611 00000000000000include_HEADERS = \ libpff.h pkginclude_HEADERS = \ libpff/codepage.h \ libpff/definitions.h \ libpff/error.h \ libpff/extern.h \ libpff/features.h \ libpff/mapi.h \ libpff/types.h EXTRA_DIST = \ libpff.h.in \ libpff/definitions.h.in \ libpff/features.h.in \ libpff/types.h.in MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f libpff.h /bin/rm -f libpff/definitions.h /bin/rm -f libpff/features.h /bin/rm -f libpff/types.h /bin/rm -f Makefile libpff-20120802/include/libpff.h.in0000644000175000017500000040421312005155275013606 00000000000000/* * Library to support the Personal Folder File (PAB, PST and OST) format * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_H ) #define _LIBPFF_H #include #include #include #include #include #include #include #include #if defined( LIBPFF_HAVE_BFIO ) #include #endif #if defined( __cplusplus ) extern "C" { #endif /* ------------------------------------------------------------------------- * Support functions * ------------------------------------------------------------------------- */ /* Returns the library version */ LIBPFF_EXTERN \ const char *libpff_get_version( void ); /* Returns the access flags for reading */ LIBPFF_EXTERN \ int libpff_get_access_flags_read( void ); /* Retrieves the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_get_codepage( int *codepage, libpff_error_t **error ); /* Sets the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_set_codepage( int codepage, libpff_error_t **error ); /* Determines if a file is a Personal Folder File file (check for the file signature) * Returns 1 if true, 0 if not or -1 on error */ LIBPFF_EXTERN \ int libpff_check_file_signature( const char *filename, libpff_error_t **error ); #if defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file is a Personal Folder File file (check for the file signature) * Returns 1 if true, 0 if not or -1 on error */ LIBPFF_EXTERN \ int libpff_check_file_signature_wide( const wchar_t *filename, libpff_error_t **error ); #endif #if defined( LIBPFF_HAVE_BFIO ) /* Determines if a file is a Personal Folder File file (check for the file signature) using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ LIBPFF_EXTERN \ int libpff_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libpff_error_t **error ); #endif /* ------------------------------------------------------------------------- * Notify functions * ------------------------------------------------------------------------- */ /* Sets the verbose notification */ LIBPFF_EXTERN \ void libpff_notify_set_verbose( int verbose ); /* Sets the notification stream * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_notify_set_stream( FILE *stream, libpff_error_t **error ); /* Opens the notification stream using a filename * The stream is opened in append mode * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_notify_stream_open( const char *filename, libpff_error_t **error ); /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_notify_stream_close( libpff_error_t **error ); /* ------------------------------------------------------------------------- * Error functions * ------------------------------------------------------------------------- */ /* Frees the error including elements */ LIBPFF_EXTERN \ void libpff_error_free( libpff_error_t **error ); /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_fprint( libpff_error_t *error, FILE *stream ); /* Prints a descriptive string of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_sprint( libpff_error_t *error, char *string, size_t size ); /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_backtrace_fprint( libpff_error_t *error, FILE *stream ); /* Prints a backtrace of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_error_backtrace_sprint( libpff_error_t *error, char *string, size_t size ); /* ------------------------------------------------------------------------- * File functions * ------------------------------------------------------------------------- */ /* Initializes a file * Make sure the value file is pointing to is set to NULL * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_initialize( libpff_file_t **file, libpff_error_t **error ); /* Frees a file * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_free( libpff_file_t **file, libpff_error_t **error ); /* Signals the file to abort its current activity * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_signal_abort( libpff_file_t *file, libpff_error_t **error ); /* Opens a file * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_open( libpff_file_t *file, const char *filename, int access_flags, libpff_error_t **error ); #if defined( LIBPFF_HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_open_wide( libpff_file_t *file, const wchar_t *filename, int access_flags, libpff_error_t **error ); #endif #if defined( LIBPFF_HAVE_BFIO ) /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_open_file_io_handle( libpff_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libpff_error_t **error ); #endif /* Closes a file * Returns 0 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_close( libpff_file_t *file, libpff_error_t **error ); /* Recovers deleted items within a file * By default only the unallocated space is checked for recoverable items * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_recover_items( libpff_file_t *file, uint8_t recovery_flags, libpff_error_t **error ); /* Retrieves the file size * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_size( libpff_file_t *file, size64_t *size, libpff_error_t **error ); /* Retrieves the content type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_content_type( libpff_file_t *file, uint8_t *content_type, libpff_error_t **error ); /* Retrieves the file type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_type( libpff_file_t *file, uint8_t *type, libpff_error_t **error ); /* Retrieves the encryption type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_encryption_type( libpff_file_t *file, uint8_t *encryption_type, libpff_error_t **error ); /* Retrieves the ASCII codepage * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_ascii_codepage( libpff_file_t *file, int *ascii_codepage, libpff_error_t **error ); /* Sets the ASCII codepage * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_set_ascii_codepage( libpff_file_t *file, int ascii_codepage, libpff_error_t **error ); /* Retrieves the number of unallocated blocks * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_number_of_unallocated_blocks( libpff_file_t *file, int unallocated_block_type, int *number_of_unallocated_blocks, libpff_error_t **error ); /* Retrieves a specific unallocated block * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_unallocated_block( libpff_file_t *file, int unallocated_block_type, int unallocated_block_index, off64_t *offset, size64_t *size, libpff_error_t **error ); /* Retrieves the root item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_root_item( libpff_file_t *file, libpff_item_t **root_item, libpff_error_t **error ); /* Retrieves the message store * Returns 1 if successful, 0 if not present or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_message_store( libpff_file_t *file, libpff_item_t **message_store, libpff_error_t **error ); /* Retrieves the root folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_root_folder( libpff_file_t *file, libpff_item_t **root_folder, libpff_error_t **error ); /* Retrieves an item for a specific identifier * Returns 1 if successful, 0 if no such item, or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_item_by_identifier( libpff_file_t *file, uint32_t item_identifier, libpff_item_t **item, libpff_error_t **error ); /* Retrieves the number of orphan items * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_number_of_orphan_items( libpff_file_t *file, int *number_of_orphan_items, libpff_error_t **error ); /* Retrieves a specific orphan item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_orphan_item( libpff_file_t *file, int orphan_item_index, libpff_item_t **orphan_item, libpff_error_t **error ); /* Retrieves the number of recovered items * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_number_of_recovered_items( libpff_file_t *file, int *number_of_recovered_items, libpff_error_t **error ); /* Retrieves a specific recovered item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_file_get_recovered_item( libpff_file_t *file, int recovered_item_index, libpff_item_t **recovered_item, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Name to id map entry functions * ------------------------------------------------------------------------- */ /* Retrieves the type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_type( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *entry_type, libpff_error_t **error ); /* Retrieves the number * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_number( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint32_t *number, libpff_error_t **error ); /* Retrieves the UTF-8 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf8_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-8 string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf8_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf16_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf16_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf16_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error ); /* Retrieves the GUID * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_guid( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *guid, size_t size, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Item functions * ------------------------------------------------------------------------- */ /* Clones an item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_clone( libpff_item_t **destination_item, libpff_item_t *source_item, libpff_error_t **error ); /* Frees an item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_free( libpff_item_t **item, libpff_error_t **error ); /* Retrieves the identifier * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_identifier( libpff_item_t *item, uint32_t *identifier, libpff_error_t **error ); /* Retrieves the number of sets values * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_number_of_sets( libpff_item_t *item, uint32_t *number_of_sets, libpff_error_t **error ); /* Retrieves the number of entries (of a set) * All sets in an item contain the same number of entries * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_number_of_entries( libpff_item_t *item, uint32_t *number_of_entries, libpff_error_t **error ); /* Retrieves the entry and value type of a specific entry * The name to id map entry is set when available * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_type( libpff_item_t *item, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libpff_error_t **error ); /* Retrieves the value type of a specific entry type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_value_type( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t flags, libpff_error_t **error ); /* Retrieves the value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set * the value type is ignored and set. The default behavior is a strict * matching of the value type. In this case the value type must be filled * with the corresponding value type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the value of a specific entry for an UTF-8 encoded name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_by_utf8_name( libpff_item_t *item, int set_index, uint8_t *utf8_entry_name, size_t utf8_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error ); /* Retrieves the value of a specific entry for an UTF-16 encoded name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_by_utf16_name( libpff_item_t *item, int set_index, uint16_t *utf16_entry_name, size_t utf16_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error ); /* Retrieves the boolean value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_boolean( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 16-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_16bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 32-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_32bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 64-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_64bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the 64-bit filetime value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_filetime( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the size value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the floating point value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_floating_point( libpff_item_t *item, int set_index, uint32_t entry_type, double *entry_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-8 string size of a specific entry * The returned size includes the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf8_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf8_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-8 string value of a specific entry * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf8_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-16 string size of a specific entry * The returned size includes the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf16_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf16_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the UTF-16 string value of a specific entry * The function uses a codepage if necessary, it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf16_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, uint8_t flags, libpff_error_t **error ); /* Retrieves the size of a binary data value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_binary_data_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libpff_error_t **error ); /* Retrieves the binary data value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_binary_data( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *binary_data, size_t size, uint8_t flags, libpff_error_t **error ); /* Retrieves the GUID value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_value_guid( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *guid, size_t size, uint8_t flags, libpff_error_t **error ); /* Retrieves the multi value of a specific entry * Creates a new multi value * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_entry_multi_value( libpff_item_t *item, int set_index, uint32_t entry_type, libpff_multi_value_t **multi_value, uint8_t flags, libpff_error_t **error ); /* Retrieves the type value * Determines the item type if neccessary * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_type( libpff_item_t *item, uint8_t *item_type, libpff_error_t **error ); /* Retrieves the number of sub items from a item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_number_of_sub_items( libpff_item_t *item, int *number_of_sub_items, libpff_error_t **error ); /* Retrieves the sub item for the specific index from a item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_sub_item( libpff_item_t *item, int sub_item_index, libpff_item_t **sub_item, libpff_error_t **error ); /* Retrieves the sub item for the specific identifier from a item * Returns 1 if successful, 0 if no such item, or -1 on error */ LIBPFF_EXTERN \ int libpff_item_get_sub_item_by_identifier( libpff_item_t *item, uint32_t sub_item_identifier, libpff_item_t **sub_item, libpff_error_t **error ); /* Retrieves the size of the UTF-8 encoded item display name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_display_name_size( item, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded item display name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_display_name( item, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded item display name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_display_name_size( item, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded item display name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_display_name( item, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded item address type * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_address_type_size( item, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded item address type * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_address_type( item, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded item address type * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_address_type_size( item, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded item address type * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_address_type( item, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded item e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_email_address_size( item, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded item e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf8_email_address( item, utf8_string, size, error ) \ libpff_item_get_entry_value_utf8_string( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded item e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_email_address_size( item, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded item e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_item_get_utf16_email_address( item, utf16_string, size, error ) \ libpff_item_get_entry_value_utf16_string( item, 0, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string, utf16_string_size, 0, error ) /* ------------------------------------------------------------------------- * Multi value functions * ------------------------------------------------------------------------- */ /* Frees a multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_free( libpff_multi_value_t **multi_value, libpff_error_t **error ); /* Retrieves the number of values in a multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_number_of_values( libpff_multi_value_t *multi_value, int *number_of_values, libpff_error_t **error ); /* Retrieves a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value( libpff_multi_value_t *multi_value, int value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error ); /* Retrieves the 32-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_32bit( libpff_multi_value_t *multi_value, int value_index, uint32_t *value, libpff_error_t **error ); /* Retrieves the 64-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_64bit( libpff_multi_value_t *multi_value, int value_index, uint64_t *value, libpff_error_t **error ); /* Retrieves the 64-bit filetime value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_filetime( libpff_multi_value_t *multi_value, int value_index, uint64_t *filetime, libpff_error_t **error ); /* Retrieves the UTF-8 string size of a specific value of the multi value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf8_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-8 string value of a specific value of the multi value * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf8_string( libpff_multi_value_t *multi_value, int value_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string size of a specific value of the multi value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf16_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf16_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string value of a specific value of the multi value * The size should include the end of string character * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf16_string( libpff_multi_value_t *multi_value, int value_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error ); /* Retrieves the size of a binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_binary_data_size( libpff_multi_value_t *multi_value, int value_index, size_t *size, libpff_error_t **error ); /* Retrieves the binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_binary_data( libpff_multi_value_t *multi_value, int value_index, uint8_t *binary_data, size_t size, libpff_error_t **error ); /* Retrieves the GUID value of a specific value of the multi value * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_multi_value_get_value_guid( libpff_multi_value_t *multi_value, int value_index, uint8_t *guid, size_t size, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Folder functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded folder name * Size includes the end of string character * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf8_name_size( folder, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded folder name * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf8_name( folder, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded folder name * Size includes the end of string character * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf16_name_size( folder, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded folder name * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ #define libpff_folder_get_utf16_name( folder, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( folder, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the folder type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_type( libpff_item_t *folder, uint8_t *type, libpff_error_t **error ); /* Retrieves the number of sub folders from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_folders( libpff_item_t *folder, int *number_of_sub_folders, libpff_error_t **error ); /* Retrieves the sub folder for the specific index from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folder( libpff_item_t *folder, int sub_folder_index, libpff_item_t **sub_folder, libpff_error_t **error ); /* Retrieves the sub folder from a folder for the specific UTF-8 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub folder or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folder_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_folder_name, size_t utf8_sub_folder_name_size, libpff_item_t **sub_folder, libpff_error_t **error ); /* Retrieves the sub folder from a folder for the specific UTF-16 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub folder or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folder_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_folder_name, size_t utf16_sub_folder_name_size, libpff_item_t **sub_folder, libpff_error_t **error ); /* Retrieves the sub folders from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_folders( libpff_item_t *folder, libpff_item_t **sub_folders, libpff_error_t **error ); /* Retrieves the number of sub messages from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_messages( libpff_item_t *folder, int *number_of_sub_messages, libpff_error_t **error ); /* Retrieves the sub message for the specific index from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_message( libpff_item_t *folder, int sub_message_index, libpff_item_t **sub_message, libpff_error_t **error ); /* Retrieves the sub message from a folder for the specific UTF-8 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub message or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_message_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_message_name, size_t utf8_sub_message_name_size, libpff_item_t **sub_message, libpff_error_t **error ); /* Retrieves the sub message from a folder for the specific UTF-16 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub message or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_message_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_message_name, size_t utf16_sub_message_name_size, libpff_item_t **sub_message, libpff_error_t **error ); /* Retrieves the sub messages from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_messages( libpff_item_t *folder, libpff_item_t **sub_messages, libpff_error_t **error ); /* Retrieves the number of sub associated contents from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_associated_contents( libpff_item_t *folder, int *number_of_sub_associated_contents, libpff_error_t **error ); /* Retrieves the sub associated content for the specific index from a folder * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_associated_content( libpff_item_t *folder, int sub_associated_content_index, libpff_item_t **sub_associated_content, libpff_error_t **error ); /* Retrieves the sub associated contents from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_sub_associated_contents( libpff_item_t *folder, libpff_item_t **sub_associated_contents, libpff_error_t **error ); /* NOTE that the following function is currently for debugging only */ /* Retrieves the unknowns from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_folder_get_unknowns( libpff_item_t *folder, libpff_item_t **unknowns, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Message store functions * ------------------------------------------------------------------------- */ /* Retrieves the message store valid folder mask * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_store_get_valid_folder_mask( message_store, valid_folder_mask, error ) \ libpff_item_get_entry_value_32bit( message_store, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_VALID_FOLDER_MASK, valid_folder_mask, 0, error ) /* Retrieves the message store password checksum * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_store_get_password_checksum( message_store, password_checksum, error ) \ libpff_item_get_entry_value_32bit( message_store, 0, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_PASSWORD_CHECKSUM, password_checksum, 0, error ) /* ------------------------------------------------------------------------- * Name to id map functions * ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- * Message functions * ------------------------------------------------------------------------- */ /* Retrieves the UTF-8 string size of a specific entry from the referenced message item * The returned size includes the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf8_string_size( libpff_item_t *message, uint32_t entry_type, size_t *utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-8 string value of a specific entry from the referenced message item * The function uses a codepage if necessary, it tries to read PidTagMessageCodepage * if not available it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf8_string( libpff_item_t *message, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string size of a specific entry from the referenced message item * The returned size includes the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf16_string_size( libpff_item_t *message, uint32_t entry_type, size_t *utf16_string_size, libpff_error_t **error ); /* Retrieves the UTF-16 string value of a specific entry from the referenced message item * The function uses a codepage if necessary, it tries to read PidTagMessageCodepage * if not available it uses the codepage set for the library * The size should include the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf16_string( libpff_item_t *message, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error ); /* Retrieves the number of attachment from a message item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_number_of_attachments( libpff_item_t *message, int *number_of_attachments, libpff_error_t **error ); /* Retrieves the attachment for the specific index from a message item * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_attachment( libpff_item_t *message, int attachment_index, libpff_item_t **attachment, libpff_error_t **error ); /* Retrieves the attachments from a message item * Returns 1 if successful, 0 if the message item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_attachments( libpff_item_t *message, libpff_item_t **attachments, libpff_error_t **error ); /* Retrieves the recipients from a message item * Returns 1 if successful, 0 if the message item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_recipients( libpff_item_t *message, libpff_item_t **recipients, libpff_error_t **error ); /* Retrieves the size of the UTF-8 encoded message class * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_class_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message class * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_class( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message class * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_class_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message class * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_class( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message subject * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_subject_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message subject * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_subject( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message subject * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_subject_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message subject * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_subject( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message conversation topic * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_conversation_topic_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message conversation topic * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_conversation_topic( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message conversation topic * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_conversation_topic_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message conversation topic * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_conversation_topic( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, utf16_string, utf16_string_size, error ) /* Retrieves the message conversation index size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_conversation_index_size( message, size, error ) \ libpff_item_get_entry_value_binary_data_size( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX, size, 0, error ) /* Retrieves the message conversation index * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_conversation_index( message, conversation_index, size, error ) \ libpff_item_get_entry_value_binary_data( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX, conversation_index, size, 0, error ) /* Retrieves the size of the UTF-8 encoded message sender name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_name_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sender name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_name( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sender name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_name_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sender name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_name( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message sender e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_email_address_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sender e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sender_email_address( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sender e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_email_address_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sender e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sender_email_address( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message sent reprenting name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_name_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sent reprenting name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_name( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sent reprenting name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_name_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sent reprenting name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_name( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message sent representing e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_email_address_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message sent representing e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_sent_representing_email_address( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message sent representing e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_email_address_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message sent representing e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_sent_representing_email_address( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message received by name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_name_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message received by name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_name( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message received by name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_name_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message received by name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_name( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded message received by e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_email_address_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message received by e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_received_by_email_address( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message received by e-mail address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_email_address_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message received by e-mail address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_received_by_email_address( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the message importance * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_importance( message, importance, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IMPORTANCE, importance, 0, error ) /* Retrieves the message priority * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_priority( message, priority, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_PRIORITY, priority, 0, error ) /* Retrieves the message sensitivity * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_sensitivity( message, sensitivity, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENSITIVITY, sensitivity, 0, error ) /* Retrieves the message flags * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_flags( message, flags, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_FLAGS, flags, 0, error ) /* Retrieves the message size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_size( message, size, error ) \ libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SIZE, size, 0, error ) /* Retrieves the message client submit time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_client_submit_time( message, client_submit_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CLIENT_SUBMIT_TIME, client_submit_time, 0, error ) /* Retrieves the message delivery time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_delivery_time( message, delivery_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_DELIVERY_TIME, delivery_time, 0, error ) /* Retrieves the message creation time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_creation_time( message, creation_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CREATION_TIME, creation_time, 0, error ) /* Retrieves the message modification time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_modification_time( message, modification_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_MODIFICATION_TIME, modification_time, 0, error ) /* Retrieves the size of the UTF-8 encoded message transport headers * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_transport_headers_size( message, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded message transport headers * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf8_transport_headers( message, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded message transport headers * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_transport_headers_size( message, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded message transport headers * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_utf16_transport_headers( message, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( message, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS, utf16_string, utf16_string_size, error ) /* Retrieves the message plain text body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_plain_text_body_size( libpff_item_t *message, size_t *size, libpff_error_t **error ); /* Retrieves the plain text message body * The body is encoded in UTF-8 * The function uses a codepage if necessary, it tries to read PidTagInternetCodepage first, * after that PidTagMessageCodepage and if not available it uses the codepage set for the library * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_plain_text_body( libpff_item_t *message, uint8_t *message_body, size_t size, libpff_error_t **error ); /* Retrieves the message RTF body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_rtf_body_size( libpff_item_t *message, size_t *size, libpff_error_t **error ); /* Retrieves the RTF message body * The body is encoded in UTF-8 * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_rtf_body( libpff_item_t *message, uint8_t *message_body, size_t size, libpff_error_t **error ); /* Retrieves the message HTML body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_html_body_size( libpff_item_t *message, size_t *size, libpff_error_t **error ); /* Retrieves the HTML message body * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_message_get_html_body( libpff_item_t *message, uint8_t *message_body, size_t size, libpff_error_t **error ); /* Retrieves the message reminder time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_reminder_time( message, reminder_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_TIME, reminder_time, 0, error ) /* Retrieves the value indicating if the message is a reminder * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_is_reminder( message, is_reminder, error ) \ libpff_item_get_entry_value_boolean( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_REMINDER, is_reminder, 0, error ) /* Retrieves the value indicating if the message is private * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_is_private( message, is_private, error ) \ libpff_item_get_entry_value_boolean( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_PRIVATE, is_private, 0, error ) /* Retrieves the message reminder signal time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_message_get_reminder_signal_time( message, reminder_signal_time, error ) \ libpff_item_get_entry_value_filetime( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_SIGNAL_TIME, reminder_signal_time, 0, error ) /* ------------------------------------------------------------------------- * Task functions * ------------------------------------------------------------------------- */ /* Retrieves the task status * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_status( task, status, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_STATUS, status, 0, error ) /* Retrieves the task percentage complete * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_percentage_complete( task, percentage_complete, error ) \ libpff_item_get_entry_value_floating_point( task, 0, LIBPFF_ENTRY_TYPE_TASK_PERCENTAGE_COMPLETE, percentage_complete, 0, error ) /* Retrieves the task start date * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_start_date( task, start_date, error ) \ libpff_item_get_entry_value_filetime( task, 0, LIBPFF_ENTRY_TYPE_TASK_START_DATE, start_date, 0, error ) /* Retrieves the task due date * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_due_date( task, due_date, error ) \ libpff_item_get_entry_value_filetime( task, 0, LIBPFF_ENTRY_TYPE_TASK_DUE_DATE, due_date, 0, error ) /* Retrieves the task actual effort in minutes * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_actual_effort( task, actual_effort, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_ACTUAL_EFFORT, actual_effort, 0, error ) /* Retrieves the task total effort in minutes * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_total_effort( task, total_effort, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_TOTAL_EFFORT, total_effort, 0, error ) /* Retrieves the task version * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_version( task, version, error ) \ libpff_item_get_entry_value_32bit( task, 0, LIBPFF_ENTRY_TYPE_TASK_VERSION, version, 0, error ) /* Retrieves the value indicating if the task is complete * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_is_complete( task, is_complete, error ) \ libpff_item_get_entry_value_boolean( task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_COMPLETE, is_complete, 0, error ) /* Retrieves the value indicating if the task is recurring * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_task_get_is_recurring( task, is_recurring, error ) \ libpff_item_get_entry_value_boolean( task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_RECURRING, is_recurring, 0, error ) /* ------------------------------------------------------------------------- * Appointment functions * ------------------------------------------------------------------------- */ /* Retrieves the appointment busy status * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_busy_status( appointment, busy_status, error ) \ libpff_item_get_entry_value_32bit( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_BUSY_STATUS, busy_status, 0, error ) /* Retrieves the size of the UTF-8 encoded appointment location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_location_size( appointment, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded appointment location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_location( appointment, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded appointment location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_location_size( appointment, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded appointment location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_location( appointment, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, utf16_string, utf16_string_size, error ) /* Retrieves the appointment start time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_start_time( appointment, start_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_START_TIME, start_time, 0, error ) /* Retrieves the appointment end time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_end_time( appointment, end_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_END_TIME, end_time, 0, error ) /* Retrieves the appointment duration in minutes * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_duration( appointment, duration, error ) \ libpff_item_get_entry_value_32bit( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_DURATION, duration, 0, error ) /* Retrieves the size of the UTF-8 encoded appointment recurrence pattern * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_recurrence_pattern_size( appointment, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf8_string_size, error ) /* Retrieves the UTF-8 encoded appointment recurrence pattern * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_recurrence_pattern( appointment, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded appointment recurrence pattern * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_recurrence_pattern_size( appointment, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf16_string_size, error ) /* Retrieves the UTF-16 encoded appointment recurrence pattern * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_recurrence_pattern( appointment, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded appointment timezone description * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_timezone_description_size( appointment, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded appointment timezone description * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf8_timezone_description( appointment, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded appointment timezone description * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_timezone_description_size( appointment, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded appointment timezone description * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_get_utf16_timezone_description( appointment, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( appointment, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION, utf16_string, utf16_string_size, error ) /* Retrieves the appointment first effective time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_first_effective_time( appointment, first_effective_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_FIRST_EFFECTIVE_TIME, first_effective_time, 0, error ) /* Retrieves the appointment last effective time * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_appointment_last_effective_time( appointment, last_effective_time, error ) \ libpff_item_get_entry_value_filetime( appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_LAST_EFFECTIVE_TIME, last_effective_time, 0, error ) /* ------------------------------------------------------------------------- * Address functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded address file under * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf8_file_under_size( address, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded address file under * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf8_file_under( address, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded address file under * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf16_file_under_size( address, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded address file under * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_address_get_utf16_file_under( address, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( address, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, utf16_string, utf16_string_size, error ) /* ------------------------------------------------------------------------- * Contact functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded contact generational abbreviation * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_generational_abbreviation_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact generational abbreviation name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_generational_abbreviation( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact generational abbreviation * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_generational_abbreviation_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact generational abbreviation name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_generational_abbreviation( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact given name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_given_name_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact given name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_given_name( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact given name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_given_name_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact given name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_given_name( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact initials * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_initials_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact initials * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_initials( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact initials * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_initials_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact initials * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_initials( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact surname * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_surname_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact surname * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_surname( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact surname * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_surname_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact surname * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_surname( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact postal address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_postal_address_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact postal address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_postal_address( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact postal address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_postal_address_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact postal address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_postal_address( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact company name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_company_name_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact company name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_company_name( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact company name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_company_name_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact company name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_company_name( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact job title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_job_title_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact job title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_job_title( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact job title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_job_title_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact job title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_job_title( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact department name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_department_name_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact department name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_department_name( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact department name * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_department_name_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact department name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_department_name( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact office location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_office_location_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact office location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_office_location( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact office location * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_office_location_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact office location * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_office_location( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact callback phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_callback_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact callback phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_callback_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact callback phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_callback_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact callback phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_callback_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact primary phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_primary_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact primary phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_primary_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact primary phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_primary_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact primary phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_primary_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact home phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_home_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact home phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_home_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact home phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_home_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact home phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_home_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact primary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_1_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact primary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_1( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact primary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_1_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact primary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_1( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact secondary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_2_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact secondary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_phone_number_2( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact secondary business phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_2_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact secondary business phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_phone_number_2( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact mobile phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_mobile_phone_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact mobile phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_mobile_phone_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact mobile phone number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_mobile_phone_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact mobile phone number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_mobile_phone_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact business fax number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_fax_number_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact business fax number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_business_fax_number( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact business fax number * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_fax_number_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact business fax number * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_business_fax_number( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact country * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_country_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact country * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_country( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact country * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_country_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact country * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_country( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact locality * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_locality_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact locality * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_locality( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact locality * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_locality_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact locality * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_locality( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_title_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_title( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact title * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_title_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact title * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_title( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact primary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_1_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact primary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_1( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact primary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_1_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact primary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_1( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact secondary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_2_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact secondary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_2( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact secondary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_2_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact secondary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_2( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, utf16_string, utf16_string_size, error ) /* Retrieves the size of the UTF-8 encoded contact tertiary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_3_size( contact, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf8_string_size, error ) /* Retrieves the UTF-8 encoded contact tertiary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf8_email_address_3( contact, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded contact tertiary email address * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_3_size( contact, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf16_string_size, error ) /* Retrieves the UTF-16 encoded contact tertiary email address * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_contact_get_utf16_email_address_3( contact, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( contact, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, utf16_string, utf16_string_size, error ) /* ------------------------------------------------------------------------- * E-mail functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded e-mail filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf8_filename_size( email, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string_size( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf8_string_size, error ) /* Retrieves the utf-8 encoded e-mail filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf8_filename( email, utf8_string, utf8_string_size, error ) \ libpff_message_get_entry_value_utf8_string( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf8_string, utf8_string_size, error ) /* Retrieves the size of the UTF-16 encoded e-mail filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf16_filename_size( email, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string_size( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf16_string_size, error ) /* Retrieves the utf-16 encoded e-mail filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_email_get_utf16_filename( email, utf16_string, utf16_string_size, error ) \ libpff_message_get_entry_value_utf16_string( email, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME, utf16_string, utf16_string_size, error ) /* ------------------------------------------------------------------------- * Attachment functions * ------------------------------------------------------------------------- */ /* Retrieves the attachment type * Returns 1 if successful or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_type( libpff_item_t *attachment, int *attachment_type, libpff_error_t **error ); /* Retrieves the size of the UTF-8 encoded attachment short filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_short_filename_size( attachment, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded attachment short filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_short_filename( attachment, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded attachment short filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_short_filename_size( attachment, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded attachment short filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_short_filename( attachment, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded attachment long filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_long_filename_size( attachment, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded attachment long filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf8_long_filename( attachment, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded attachment long filename * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_long_filename_size( attachment, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded attachment long filename * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_attachment_get_utf16_long_filename( attachment, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG, utf16_string, utf16_string_size, 0, error ) /* Retrieves the attachment data size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_data_size( libpff_item_t *attachment, size64_t *size, libpff_error_t **error ); /* Reads attachment data from the curent offset into a buffer * Returns the amount of bytes read or -1 on error */ LIBPFF_EXTERN \ ssize_t libpff_attachment_data_read_buffer( libpff_item_t *attachment, uint8_t *buffer, size_t buffer_size, libpff_error_t **error ); /* Seeks a certain offset of the attachment data * Returns the offset if seek is successful or -1 on error */ LIBPFF_EXTERN \ off64_t libpff_attachment_data_seek_offset( libpff_item_t *attachment, off64_t offset, int whence, libpff_error_t **error ); #if defined( LIBPFF_HAVE_BFIO ) /* Retrieves the attachment data file io handle * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_data_file_io_handle( libpff_item_t *attachment, libbfio_handle_t **file_io_handle, libpff_error_t **error ); #endif /* Retrieves the attached item * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ LIBPFF_EXTERN \ int libpff_attachment_get_item( libpff_item_t *attachment, libpff_item_t **attached_item, libpff_error_t **error ); /* ------------------------------------------------------------------------- * Recipients functions * ------------------------------------------------------------------------- */ /* Retrieves the size of the UTF-8 encoded display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_display_name_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_display_name( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_display_name_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_display_name( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded address type * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_address_type_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded address type * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_address_type( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded address type * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_address_type_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded address type * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_address_type( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded email address * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_email_address_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded email address * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_email_address( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded email address * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_email_address_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded email address * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_email_address( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, utf16_string, utf16_string_size, 0, error ) /* Retrieves the size of the UTF-8 encoded recipient display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_recipient_display_name_size( recipients, recipient_index, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf8_string_size, 0, error ) /* Retrieves the UTF-8 encoded recipient display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf8_recipient_display_name( recipients, recipient_index, utf8_string, utf8_string_size, error ) \ libpff_item_get_entry_value_utf8_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf8_string, utf8_string_size, 0, error ) /* Retrieves the size of the UTF-16 encoded recipient display name * Size includes the end of string character * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_recipient_display_name_size( recipients, recipient_index, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string_size( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf16_string_size, 0, error ) /* Retrieves the UTF-16 encoded recipient display name * Returns 1 if successful, 0 if the recipient does not contain such value or -1 on error */ #define libpff_recipients_get_utf16_recipient_display_name( recipients, recipient_index, utf16_string, utf16_string_size, error ) \ libpff_item_get_entry_value_utf16_string( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, utf16_string, utf16_string_size, 0, error ) /* Retrieves the recipient type * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ #define libpff_recipients_get_type( recipients, recipient_index, type, error ) \ libpff_item_get_entry_value_32bit( recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_TYPE, type, 0, error ) #if defined( __cplusplus ) } #endif #endif libpff-20120802/include/libpff/0000775000175000017500000000000012006536212013101 500000000000000libpff-20120802/include/libpff/definitions.h.in0000644000175000017500000001262612005155300016111 00000000000000/* * Definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_DEFINITIONS_H ) #define _LIBPFF_DEFINITIONS_H #include #define LIBPFF_VERSION @VERSION@ /* The version string */ #define LIBPFF_VERSION_STRING "@VERSION@" /* The access flags definitions * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3-8 not used */ enum LIBPFF_ACCESS_FLAGS { LIBPFF_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBPFF_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBPFF_OPEN_READ ( LIBPFF_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_WRITE ( LIBPFF_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_READ_WRITE ( LIBPFF_ACCESS_FLAG_READ | LIBPFF_ACCESS_FLAG_WRITE ) /* TODO deprecated remove after a while */ #define LIBPFF_FLAG_READ LIBPFF_ACCESS_FLAG_READ #define LIBPFF_FLAG_WRITE LIBPFF_ACCESS_FLAG_WRITE /* The recovery flags */ enum LIBPFF_RECOVERY_FLAGS { LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA = 0x01, LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS = 0x02 }; /* The file types */ enum LIBPFF_FILE_TYPES { LIBPFF_FILE_TYPE_32BIT = 32, LIBPFF_FILE_TYPE_64BIT = 64 }; /* The file content types */ enum LIBPFF_FILE_CONTENT_TYPES { LIBPFF_FILE_CONTENT_TYPE_PAB = (int) 'a', LIBPFF_FILE_CONTENT_TYPE_PST = (int) 'p', LIBPFF_FILE_CONTENT_TYPE_OST = (int) 'o' }; /* The encryption types */ enum LIBPFF_ENCRYPTION_TYPES { LIBPFF_ENCRYPTION_TYPE_NONE = 0, LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE = 1, LIBPFF_ENCRYPTION_TYPE_HIGH = 2 }; /* The item types * These item types partially map to the message classes * LIBPFF_ITEM_TYPE_UNDEFINED (initialization value) * LIBPFF_ITEM_TYPE_ACTIVITY IPM.Activity * LIBPFF_ITEM_TYPE_APPOINTMENT IPM.Appointment * LIBPFF_ITEM_TYPE_ATTACHMENT (attachment) * LIBPFF_ITEM_TYPE_ATTACHMENTS (attachments) * LIBPFF_ITEM_TYPE_COMMON IPM * LIBPFF_ITEM_TYPE_CONFIGURATION IPM.Configuration.* * LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE IPM.Conflict.Message * LIBPFF_ITEM_TYPE_CONTACT IPM.Contact * LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST IPM.DistList * LIBPFF_ITEM_TYPE_DOCUMENT IPM.Document.* * LIBPFF_ITEM_TYPE_EMAIL IPM.Note, REPORT.IPM.Note.* * LIBPFF_ITEM_TYPE_EMAIL_SMIME IPM.Note.SMIME.* * LIBPFF_ITEM_TYPE_FAX IPM.FAX, IPM.Note.Fax * LIBPFF_ITEM_TYPE_FOLDER (folder/container) * LIBPFF_ITEM_TYPE_MEETING IPM.Schedule.Meeting * LIBPFF_ITEM_TYPE_MMS IPM.Note.Mobile.MMS * LIBPFF_ITEM_TYPE_NOTE IPM.StickyNote * LIBPFF_ITEM_TYPE_POSTING_NOTE IPM.Post * LIBPFF_ITEM_TYPE_RECIPIENTS (recipients) * LIBPFF_ITEM_TYPE_RSS_FEED IPM.Post.RSS * LIBPFF_ITEM_TYPE_SHARING IPM.Sharing.* * LIBPFF_ITEM_TYPE_SMS IPM.Note.Mobile.SMS * LIBPFF_ITEM_TYPE_TASK IPM.Task * LIBPFF_ITEM_TYPE_TASK_REQUEST IPM.TaskRequest.* * LIBPFF_ITEM_TYPE_VOICEMAIL IPM.Note.Voicemail * LIBPFF_ITEM_TYPE_UNKNOWN (unknown item type, used in folder content type) * * Unsupported: * IPM.Post */ enum LIBPFF_ITEM_TYPES { LIBPFF_ITEM_TYPE_UNDEFINED, LIBPFF_ITEM_TYPE_ACTIVITY, LIBPFF_ITEM_TYPE_APPOINTMENT, LIBPFF_ITEM_TYPE_ATTACHMENT, LIBPFF_ITEM_TYPE_ATTACHMENTS, LIBPFF_ITEM_TYPE_COMMON, LIBPFF_ITEM_TYPE_CONFIGURATION, LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE, LIBPFF_ITEM_TYPE_CONTACT, LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST, LIBPFF_ITEM_TYPE_DOCUMENT, LIBPFF_ITEM_TYPE_EMAIL, LIBPFF_ITEM_TYPE_EMAIL_SMIME, LIBPFF_ITEM_TYPE_FAX, LIBPFF_ITEM_TYPE_FOLDER, LIBPFF_ITEM_TYPE_MEETING, LIBPFF_ITEM_TYPE_MMS, LIBPFF_ITEM_TYPE_NOTE, LIBPFF_ITEM_TYPE_POSTING_NOTE, LIBPFF_ITEM_TYPE_RECIPIENTS, LIBPFF_ITEM_TYPE_RSS_FEED, LIBPFF_ITEM_TYPE_SHARING, LIBPFF_ITEM_TYPE_SMS, LIBPFF_ITEM_TYPE_SUB_ASSOCIATED_CONTENTS, LIBPFF_ITEM_TYPE_SUB_FOLDERS, LIBPFF_ITEM_TYPE_SUB_MESSAGES, LIBPFF_ITEM_TYPE_TASK, LIBPFF_ITEM_TYPE_TASK_REQUEST, LIBPFF_ITEM_TYPE_VOICEMAIL, LIBPFF_ITEM_TYPE_UNKNOWN }; /* The attachment types */ enum LIBPFF_ATTACHMENT_TYPES { LIBPFF_ATTACHMENT_TYPE_UNDEFINED = 0, LIBPFF_ATTACHMENT_TYPE_DATA = (int) 'd', LIBPFF_ATTACHMENT_TYPE_ITEM = (int) 'i', LIBPFF_ATTACHMENT_TYPE_REFERENCE = (int) 'r' }; /* The unallocated block type */ enum LIBPFF_UNALLOCATED_BLOCK_TYPES { LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA = (int) 'd', LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE = (int) 'p' }; /* The name to id map entry types */ enum LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPES { LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC = (int) 'n', LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING = (int) 's' }; /* The entry value flags */ enum LIBPFF_ENTRY_VALUE_FLAGS { LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE = 0x01, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP = 0x02 }; #endif libpff-20120802/include/libpff/extern.h0000644000175000017500000000252612005155300014474 00000000000000/* * The extern definition * This header should be included in header files that export or import * library functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_EXTERN_H ) #define _LIBPFF_EXTERN_H /* To export functions from the libpff DLL define LIBPFF_DLL_EXPORT * To import functions from the libpff DLL define LIBPFF_DLL_IMPORT * Otherwise use default extern statement */ #if defined( LIBPFF_DLL_EXPORT ) #define LIBPFF_EXTERN __declspec(dllexport) #elif defined( LIBPFF_DLL_IMPORT ) #define LIBPFF_EXTERN extern __declspec(dllimport) #else #define LIBPFF_EXTERN extern #endif #endif libpff-20120802/include/libpff/types.h0000664000175000017500000001104512006536127014344 00000000000000/* * Type definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_TYPES_H ) #define _LIBPFF_TYPES_H #include /* Integer type definitions */ #if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) #ifdef __cplusplus extern "C" { #endif /* The Microsoft Visual Studio C++ compiler or earlier versions of the Borland C++ Builder * do not support the (u)int#_t type definitions but have __int# defintions instead */ #if !defined( HAVE_INT8_T ) #define HAVE_INT8_T typedef __int8 int8_t; #endif #if !defined( HAVE_UINT8_T ) #define HAVE_UINT8_T typedef unsigned __int8 uint8_t; #endif #if !defined( HAVE_INT16_T ) #define HAVE_INT16_T typedef __int16 int16_t; #endif #if !defined( HAVE_UINT16_T ) #define HAVE_UINT16_T typedef unsigned __int16 uint16_t; #endif #if !defined( HAVE_INT32_T ) #define HAVE_INT32_T typedef __int32 int32_t; #endif #if !defined( HAVE_UINT32_T ) #define HAVE_UINT32_T typedef unsigned __int32 uint32_t; #endif #if !defined( HAVE_INT64_T ) #define HAVE_INT64_T typedef __int64 int64_t; #endif #if !defined( HAVE_UINT64_T ) #define HAVE_UINT64_T typedef unsigned __int64 uint64_t; #endif /* The Microsoft Visual Studio C++ compiler or earlier versions of the Borland C++ Builder * do not support the ssize_t type definition */ #if !defined( HAVE_SSIZE_T ) #define HAVE_SSIZE_T #if defined( _WIN64 ) typedef __int64 ssize_t; #else typedef __int32 ssize_t; #endif #endif /* !defined( HAVE_SSIZE_T ) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) /* Earlier versions of the Borland C++ Builder do not support the intptr_t type definition */ #if !defined( HAVE_INTPTR_T ) #define HAVE_INTPTR_T #if defined( _WIN64 ) typedef __int64 intptr_t; #else typedef __int32 intptr_t; #endif #endif /* !defined( HAVE_INTPTR_T ) */ #endif /* defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) */ #ifdef __cplusplus } #endif #elif defined( __BORLANDC__ ) /* Later versions of the Borland C/C++ compiler define the types in */ #include #else #if 1 || defined( HAVE_SYS_TYPES_H ) #include #else #error Missing system type definitions (sys/types.h) #endif /* Type definitions for compilers that have access to * or */ #if 1 || defined( HAVE_INTTYPES_H ) #include #elif 1 || defined( HAVE_STDINT_H ) #include #else #error Missing integer type definitions (inttypes.h, stdint.h) #endif #endif #ifdef __cplusplus extern "C" { #endif #if ( !defined( HAVE_SIZE32_T ) && ! 0 ) || HAVE_SIZE32_T == 0 #define HAVE_SIZE32_T 1 typedef uint32_t size32_t; #endif #if ( !defined( HAVE_SSIZE32_T ) && ! 0 ) || HAVE_SSIZE32_T == 0 #define HAVE_SSIZE32_T 1 typedef int32_t ssize32_t; #endif #if ( !defined( HAVE_SIZE64_T ) && ! 0 ) || HAVE_SIZE64_T == 0 #define HAVE_SIZE64_T 1 typedef uint64_t size64_t; #endif #if ( !defined( HAVE_SSIZE64_T ) && ! 0 ) || HAVE_SSIZE64_T == 0 #define HAVE_SSIZE64_T 1 typedef int64_t ssize64_t; #endif #if ( !defined( HAVE_OFF64_T ) && ! 0 ) || HAVE_OFF64_T == 0 #define HAVE_OFF64_T 1 typedef int64_t off64_t; #endif /* Wide character definition */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0520 ) #include #elif defined( WINAPI ) #include #elif 0 || defined( HAVE_WCHAR_H ) /* __USE_UNIX98 is required to add swprintf definition */ #if !defined( __USE_UNIX98 ) #define __USE_UNIX98 #define LIBCSTRING_DEFINITION_UNIX98 #endif #include #if defined( LIBCSTRING_DEFINITION_UNIX98 ) #undef __USE_UNIX98 #undef LIBCSTRING_DEFINITION_UNIX98 #endif #endif /* The following type definitions hide internal data structures */ typedef intptr_t libpff_file_t; typedef intptr_t libpff_name_to_id_map_entry_t; typedef intptr_t libpff_item_t; typedef intptr_t libpff_multi_value_t; #ifdef __cplusplus } #endif #endif libpff-20120802/include/libpff/features.h.in0000644000175000017500000000271612005155300015413 00000000000000/* * Features of libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_FEATURES_H ) #define _LIBPFF_FEATURES_H /* The libpff type support features */ #if defined( WINAPI ) || @HAVE_WIDE_CHARACTER_TYPE@ #define LIBPFF_HAVE_WIDE_CHARACTER_TYPE 1 /* Old definition kept for compatibility (for now) */ #define LIBPFF_WIDE_CHARACTER_TYPE 1 #endif #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && @HAVE_LIBBFIO@ ) #define LIBPFF_HAVE_BFIO 1 #endif #if !defined( LIBPFF_DEPRECATED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBPFF_DEPRECATED __attribute__ ((__deprecated__)) #elif defined( _MSC_VER ) #define LIBPFF_DEPRECATED __declspec(deprecated) #else #define LIBPFF_DEPRECATED #endif #endif #endif libpff-20120802/include/libpff/types.h.in0000644000175000017500000001125012005155300014732 00000000000000/* * Type definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_TYPES_H ) #define _LIBPFF_TYPES_H #include /* Integer type definitions */ #if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) ) #ifdef __cplusplus extern "C" { #endif /* The Microsoft Visual Studio C++ compiler or earlier versions of the Borland C++ Builder * do not support the (u)int#_t type definitions but have __int# defintions instead */ #if !defined( HAVE_INT8_T ) #define HAVE_INT8_T typedef __int8 int8_t; #endif #if !defined( HAVE_UINT8_T ) #define HAVE_UINT8_T typedef unsigned __int8 uint8_t; #endif #if !defined( HAVE_INT16_T ) #define HAVE_INT16_T typedef __int16 int16_t; #endif #if !defined( HAVE_UINT16_T ) #define HAVE_UINT16_T typedef unsigned __int16 uint16_t; #endif #if !defined( HAVE_INT32_T ) #define HAVE_INT32_T typedef __int32 int32_t; #endif #if !defined( HAVE_UINT32_T ) #define HAVE_UINT32_T typedef unsigned __int32 uint32_t; #endif #if !defined( HAVE_INT64_T ) #define HAVE_INT64_T typedef __int64 int64_t; #endif #if !defined( HAVE_UINT64_T ) #define HAVE_UINT64_T typedef unsigned __int64 uint64_t; #endif /* The Microsoft Visual Studio C++ compiler or earlier versions of the Borland C++ Builder * do not support the ssize_t type definition */ #if !defined( HAVE_SSIZE_T ) #define HAVE_SSIZE_T #if defined( _WIN64 ) typedef __int64 ssize_t; #else typedef __int32 ssize_t; #endif #endif /* !defined( HAVE_SSIZE_T ) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) /* Earlier versions of the Borland C++ Builder do not support the intptr_t type definition */ #if !defined( HAVE_INTPTR_T ) #define HAVE_INTPTR_T #if defined( _WIN64 ) typedef __int64 intptr_t; #else typedef __int32 intptr_t; #endif #endif /* !defined( HAVE_INTPTR_T ) */ #endif /* defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0560 ) */ #ifdef __cplusplus } #endif #elif defined( __BORLANDC__ ) /* Later versions of the Borland C/C++ compiler define the types in */ #include #else #if @HAVE_SYS_TYPES_H@ || defined( HAVE_SYS_TYPES_H ) #include #else #error Missing system type definitions (sys/types.h) #endif /* Type definitions for compilers that have access to * or */ #if @HAVE_INTTYPES_H@ || defined( HAVE_INTTYPES_H ) #include #elif @HAVE_STDINT_H@ || defined( HAVE_STDINT_H ) #include #else #error Missing integer type definitions (inttypes.h, stdint.h) #endif #endif #ifdef __cplusplus extern "C" { #endif #if ( !defined( HAVE_SIZE32_T ) && ! @HAVE_SIZE32_T@ ) || HAVE_SIZE32_T == 0 #define HAVE_SIZE32_T 1 typedef uint32_t size32_t; #endif #if ( !defined( HAVE_SSIZE32_T ) && ! @HAVE_SSIZE32_T@ ) || HAVE_SSIZE32_T == 0 #define HAVE_SSIZE32_T 1 typedef int32_t ssize32_t; #endif #if ( !defined( HAVE_SIZE64_T ) && ! @HAVE_SIZE64_T@ ) || HAVE_SIZE64_T == 0 #define HAVE_SIZE64_T 1 typedef uint64_t size64_t; #endif #if ( !defined( HAVE_SSIZE64_T ) && ! @HAVE_SSIZE64_T@ ) || HAVE_SSIZE64_T == 0 #define HAVE_SSIZE64_T 1 typedef int64_t ssize64_t; #endif #if ( !defined( HAVE_OFF64_T ) && ! @HAVE_OFF64_T@ ) || HAVE_OFF64_T == 0 #define HAVE_OFF64_T 1 typedef int64_t off64_t; #endif /* Wide character definition */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ <= 0x0520 ) #include #elif defined( WINAPI ) #include #elif @HAVE_WCHAR_H@ || defined( HAVE_WCHAR_H ) /* __USE_UNIX98 is required to add swprintf definition */ #if !defined( __USE_UNIX98 ) #define __USE_UNIX98 #define LIBCSTRING_DEFINITION_UNIX98 #endif #include #if defined( LIBCSTRING_DEFINITION_UNIX98 ) #undef __USE_UNIX98 #undef LIBCSTRING_DEFINITION_UNIX98 #endif #endif /* The following type definitions hide internal data structures */ typedef intptr_t libpff_file_t; typedef intptr_t libpff_name_to_id_map_entry_t; typedef intptr_t libpff_item_t; typedef intptr_t libpff_multi_value_t; #ifdef __cplusplus } #endif #endif libpff-20120802/include/libpff/features.h0000664000175000017500000000265012006536127015020 00000000000000/* * Features of libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_FEATURES_H ) #define _LIBPFF_FEATURES_H /* The libpff type support features */ #if defined( WINAPI ) || 0 #define LIBPFF_HAVE_WIDE_CHARACTER_TYPE 1 /* Old definition kept for compatibility (for now) */ #define LIBPFF_WIDE_CHARACTER_TYPE 1 #endif #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 ) #define LIBPFF_HAVE_BFIO 1 #endif #if !defined( LIBPFF_DEPRECATED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBPFF_DEPRECATED __attribute__ ((__deprecated__)) #elif defined( _MSC_VER ) #define LIBPFF_DEPRECATED __declspec(deprecated) #else #define LIBPFF_DEPRECATED #endif #endif #endif libpff-20120802/include/libpff/definitions.h0000664000175000017500000001262412006536127015517 00000000000000/* * Definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_DEFINITIONS_H ) #define _LIBPFF_DEFINITIONS_H #include #define LIBPFF_VERSION 20120802 /* The version string */ #define LIBPFF_VERSION_STRING "20120802" /* The access flags definitions * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3-8 not used */ enum LIBPFF_ACCESS_FLAGS { LIBPFF_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBPFF_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBPFF_OPEN_READ ( LIBPFF_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_WRITE ( LIBPFF_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_READ_WRITE ( LIBPFF_ACCESS_FLAG_READ | LIBPFF_ACCESS_FLAG_WRITE ) /* TODO deprecated remove after a while */ #define LIBPFF_FLAG_READ LIBPFF_ACCESS_FLAG_READ #define LIBPFF_FLAG_WRITE LIBPFF_ACCESS_FLAG_WRITE /* The recovery flags */ enum LIBPFF_RECOVERY_FLAGS { LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA = 0x01, LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS = 0x02 }; /* The file types */ enum LIBPFF_FILE_TYPES { LIBPFF_FILE_TYPE_32BIT = 32, LIBPFF_FILE_TYPE_64BIT = 64 }; /* The file content types */ enum LIBPFF_FILE_CONTENT_TYPES { LIBPFF_FILE_CONTENT_TYPE_PAB = (int) 'a', LIBPFF_FILE_CONTENT_TYPE_PST = (int) 'p', LIBPFF_FILE_CONTENT_TYPE_OST = (int) 'o' }; /* The encryption types */ enum LIBPFF_ENCRYPTION_TYPES { LIBPFF_ENCRYPTION_TYPE_NONE = 0, LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE = 1, LIBPFF_ENCRYPTION_TYPE_HIGH = 2 }; /* The item types * These item types partially map to the message classes * LIBPFF_ITEM_TYPE_UNDEFINED (initialization value) * LIBPFF_ITEM_TYPE_ACTIVITY IPM.Activity * LIBPFF_ITEM_TYPE_APPOINTMENT IPM.Appointment * LIBPFF_ITEM_TYPE_ATTACHMENT (attachment) * LIBPFF_ITEM_TYPE_ATTACHMENTS (attachments) * LIBPFF_ITEM_TYPE_COMMON IPM * LIBPFF_ITEM_TYPE_CONFIGURATION IPM.Configuration.* * LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE IPM.Conflict.Message * LIBPFF_ITEM_TYPE_CONTACT IPM.Contact * LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST IPM.DistList * LIBPFF_ITEM_TYPE_DOCUMENT IPM.Document.* * LIBPFF_ITEM_TYPE_EMAIL IPM.Note, REPORT.IPM.Note.* * LIBPFF_ITEM_TYPE_EMAIL_SMIME IPM.Note.SMIME.* * LIBPFF_ITEM_TYPE_FAX IPM.FAX, IPM.Note.Fax * LIBPFF_ITEM_TYPE_FOLDER (folder/container) * LIBPFF_ITEM_TYPE_MEETING IPM.Schedule.Meeting * LIBPFF_ITEM_TYPE_MMS IPM.Note.Mobile.MMS * LIBPFF_ITEM_TYPE_NOTE IPM.StickyNote * LIBPFF_ITEM_TYPE_POSTING_NOTE IPM.Post * LIBPFF_ITEM_TYPE_RECIPIENTS (recipients) * LIBPFF_ITEM_TYPE_RSS_FEED IPM.Post.RSS * LIBPFF_ITEM_TYPE_SHARING IPM.Sharing.* * LIBPFF_ITEM_TYPE_SMS IPM.Note.Mobile.SMS * LIBPFF_ITEM_TYPE_TASK IPM.Task * LIBPFF_ITEM_TYPE_TASK_REQUEST IPM.TaskRequest.* * LIBPFF_ITEM_TYPE_VOICEMAIL IPM.Note.Voicemail * LIBPFF_ITEM_TYPE_UNKNOWN (unknown item type, used in folder content type) * * Unsupported: * IPM.Post */ enum LIBPFF_ITEM_TYPES { LIBPFF_ITEM_TYPE_UNDEFINED, LIBPFF_ITEM_TYPE_ACTIVITY, LIBPFF_ITEM_TYPE_APPOINTMENT, LIBPFF_ITEM_TYPE_ATTACHMENT, LIBPFF_ITEM_TYPE_ATTACHMENTS, LIBPFF_ITEM_TYPE_COMMON, LIBPFF_ITEM_TYPE_CONFIGURATION, LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE, LIBPFF_ITEM_TYPE_CONTACT, LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST, LIBPFF_ITEM_TYPE_DOCUMENT, LIBPFF_ITEM_TYPE_EMAIL, LIBPFF_ITEM_TYPE_EMAIL_SMIME, LIBPFF_ITEM_TYPE_FAX, LIBPFF_ITEM_TYPE_FOLDER, LIBPFF_ITEM_TYPE_MEETING, LIBPFF_ITEM_TYPE_MMS, LIBPFF_ITEM_TYPE_NOTE, LIBPFF_ITEM_TYPE_POSTING_NOTE, LIBPFF_ITEM_TYPE_RECIPIENTS, LIBPFF_ITEM_TYPE_RSS_FEED, LIBPFF_ITEM_TYPE_SHARING, LIBPFF_ITEM_TYPE_SMS, LIBPFF_ITEM_TYPE_SUB_ASSOCIATED_CONTENTS, LIBPFF_ITEM_TYPE_SUB_FOLDERS, LIBPFF_ITEM_TYPE_SUB_MESSAGES, LIBPFF_ITEM_TYPE_TASK, LIBPFF_ITEM_TYPE_TASK_REQUEST, LIBPFF_ITEM_TYPE_VOICEMAIL, LIBPFF_ITEM_TYPE_UNKNOWN }; /* The attachment types */ enum LIBPFF_ATTACHMENT_TYPES { LIBPFF_ATTACHMENT_TYPE_UNDEFINED = 0, LIBPFF_ATTACHMENT_TYPE_DATA = (int) 'd', LIBPFF_ATTACHMENT_TYPE_ITEM = (int) 'i', LIBPFF_ATTACHMENT_TYPE_REFERENCE = (int) 'r' }; /* The unallocated block type */ enum LIBPFF_UNALLOCATED_BLOCK_TYPES { LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA = (int) 'd', LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE = (int) 'p' }; /* The name to id map entry types */ enum LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPES { LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC = (int) 'n', LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING = (int) 's' }; /* The entry value flags */ enum LIBPFF_ENTRY_VALUE_FLAGS { LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE = 0x01, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP = 0x02 }; #endif libpff-20120802/include/libpff/mapi.h0000644000175000017500000003023312005155300014111 00000000000000/* * Message API (MAPI) definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_MAPI_H ) #define _LIBPFF_MAPI_H #include #ifdef __cplusplus extern "C" { #endif /* The attachment methods */ enum LIBPFF_ATTACHMENT_METHODS { LIBPFF_ATTACHMENT_METHOD_NONE = 0, LIBPFF_ATTACHMENT_METHOD_BY_VALUE = 1, LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE = 2, LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE_RESOLVE = 3, LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE_ONLY = 4, LIBPFF_ATTACHMENT_METHOD_EMBEDDED_MESSAGE = 5, LIBPFF_ATTACHMENT_METHOD_OLE = 6 }; /* The message flags */ enum LIBPFF_MESSAGE_FLAGS { LIBPFF_MESSAGE_FLAG_READ = 0x00000001, LIBPFF_MESSAGE_FLAG_UNMODIFIED = 0x00000002, LIBPFF_MESSAGE_FLAG_SUBMIT = 0x00000004, LIBPFF_MESSAGE_FLAG_UNSENT = 0x00000008, LIBPFF_MESSAGE_FLAG_HAS_ATTACHMENTS = 0x00000010, LIBPFF_MESSAGE_FLAG_FROM_ME = 0x00000020, LIBPFF_MESSAGE_FLAG_ASSOCIATED = 0x00000040, LIBPFF_MESSAGE_FLAG_RESEND = 0x00000080, LIBPFF_MESSAGE_FLAG_RN_PENDING = 0x00000100, LIBPFF_MESSAGE_FLAG_NRN_PENDING = 0x00000200 }; /* The message importance types */ enum LIBPFF_MESSAGE_IMPORTANCE_TYPES { LIBPFF_MESSAGE_IMPORTANCE_TYPE_LOW = 0, LIBPFF_MESSAGE_IMPORTANCE_TYPE_NORMAL = 1, LIBPFF_MESSAGE_IMPORTANCE_TYPE_HIGH = 2 }; /* The message priority types */ enum LIBPFF_MESSAGE_PRIORITY_TYPES { LIBPFF_MESSAGE_PRIORITY_TYPE_NON_URGENT = -1, LIBPFF_MESSAGE_PRIORITY_TYPE_NORMAL = 0, LIBPFF_MESSAGE_PRIORITY_TYPE_URGENT = 1 }; /* The message sensitivity types */ enum LIBPFF_MESSAGE_SENSITIVITY_TYPES { LIBPFF_MESSAGE_SENSITIVITY_TYPE_NONE = 0, LIBPFF_MESSAGE_SENSITIVITY_TYPE_PERSONAL = 1, LIBPFF_MESSAGE_SENSITIVITY_TYPE_PRIVATE = 2, LIBPFF_MESSAGE_SENSITIVITY_TYPE_CONFIDENTIAL = 3 }; /* The message store valid folder masks */ enum LIBPFF_MESSAGE_STORE_VALID_FOLDER_MASKS { LIBPFF_VALID_FOLDER_MASK_SUBTREE = 0x00000001, LIBPFF_VALID_FOLDER_MASK_INBOX = 0x00000002, LIBPFF_VALID_FOLDER_MASK_OUTBOX = 0x00000004, LIBPFF_VALID_FOLDER_MASK_WASTEBOX = 0x00000008, LIBPFF_VALID_FOLDER_MASK_SENTMAIL = 0x00000010, LIBPFF_VALID_FOLDER_MASK_VIEWS = 0x00000020, LIBPFF_VALID_FOLDER_MASK_COMMON_VIEWS = 0x00000040, LIBPFF_VALID_FOLDER_MASK_FINDER = 0x00000080 }; /* The object types * TODO enum LIBPFF_OBJECT_TYPES { MAPI_STORE = 0x00000001, MAPI_ADDRBOOK = 0x00000002, MAPI_FOLDER = 0x00000003, MAPI_ABCONT = 0x00000004, MAPI_MESSAGE = 0x00000005, MAPI_MAILUSER = 0x00000006, MAPI_ATTACH = 0x00000007, MAPI_DISTLIST = 0x00000008, MAPI_PROFSECT = 0x00000009, MAPI_STATUS = 0x0000000a, MAPI_SESSION = 0x0000000b, MAPI_FORMINFO = 0x0000000c }; */ /* The recipient type */ enum LIBPFF_RECIPIENT_TYPES { LIBPFF_RECIPIENT_TYPE_ORIGINATOR = 0, LIBPFF_RECIPIENT_TYPE_TO = 1, LIBPFF_RECIPIENT_TYPE_CC = 2, LIBPFF_RECIPIENT_TYPE_BCC = 3 }; /* The value types */ enum LIBPFF_VALUE_TYPES { LIBPFF_VALUE_TYPE_UNSPECIFIED = 0x0000, LIBPFF_VALUE_TYPE_NULL = 0x0001, LIBPFF_VALUE_TYPE_INTEGER_16BIT_SIGNED = 0x0002, LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED = 0x0003, LIBPFF_VALUE_TYPE_FLOAT_32BIT = 0x0004, LIBPFF_VALUE_TYPE_DOUBLE_64BIT = 0x0005, LIBPFF_VALUE_TYPE_CURRENCY = 0x0006, LIBPFF_VALUE_TYPE_APPLICATION_TIME = 0x0007, LIBPFF_VALUE_TYPE_ERROR = 0x000a, LIBPFF_VALUE_TYPE_BOOLEAN = 0x000b, LIBPFF_VALUE_TYPE_OBJECT = 0x000d, LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED = 0x0014, LIBPFF_VALUE_TYPE_STRING_ASCII = 0x001e, LIBPFF_VALUE_TYPE_STRING_UNICODE = 0x001f, LIBPFF_VALUE_TYPE_FILETIME = 0x0040, LIBPFF_VALUE_TYPE_GUID = 0x0048, LIBPFF_VALUE_TYPE_SERVER_IDENTIFIER = 0x00fb, LIBPFF_VALUE_TYPE_RESTRICTION = 0x00fd, LIBPFF_VALUE_TYPE_RULE_ACTION = 0x00fe, LIBPFF_VALUE_TYPE_BINARY_DATA = 0x0102, LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_16BIT_SIGNED = 0x1002, LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_32BIT_SIGNED = 0x1003, LIBPFF_VALUE_TYPE_MULTI_VALUE_FLOAT_32BIT = 0x1004, LIBPFF_VALUE_TYPE_MULTI_VALUE_DOUBLE_64BIT = 0x1005, LIBPFF_VALUE_TYPE_MULTI_VALUE_CURRENCY = 0x1006, LIBPFF_VALUE_TYPE_MULTI_VALUE_APPLICATION_TIME = 0x1007, LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_64BIT_SIGNED = 0x1014, LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_ASCII = 0x101e, LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_UNICODE = 0x101f, LIBPFF_VALUE_TYPE_MULTI_VALUE_FILETIME = 0x1040, LIBPFF_VALUE_TYPE_MULTI_VALUE_GUID = 0x1048, LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA = 0x1102 }; #define LIBPFF_VALUE_TYPE_MULTI_VALUE_FLAG 0x1000 /* The entry types */ enum LIBPFF_ENTRY_TYPES { LIBPFF_ENTRY_TYPE_MESSAGE_IMPORTANCE = 0x0017, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS = 0x001a, LIBPFF_ENTRY_TYPE_MESSAGE_PRIORITY = 0x0026, LIBPFF_ENTRY_TYPE_MESSAGE_SENSITIVITY = 0x0036, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT = 0x0037, LIBPFF_ENTRY_TYPE_MESSAGE_CLIENT_SUBMIT_TIME = 0x0039, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_SEARCH_KEY = 0x003b, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_ENTRY_IDENTIFIER = 0x003f, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME = 0x0040, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_ENTRY_IDENTIFIER = 0x0041, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME = 0x0042, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_ENTRY_IDENTIFIER = 0x0043, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_NAME = 0x0044, LIBPFF_ENTRY_TYPE_MESSAGE_REPLY_RECIPIENT_ENTRIES = 0x004f, LIBPFF_ENTRY_TYPE_MESSAGE_REPLY_RECIPIENT_NAMES = 0x0050, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_SEARCH_KEY = 0x0051, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_SEARCH_KEY = 0x0052, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_ADDRESS_TYPE = 0x0064, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS = 0x0065, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC = 0x0070, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX = 0x0071, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_ADDRESS_TYPE = 0x0075, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS = 0x0076, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_ADDRESS_TYPE = 0x0077, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_EMAIL_ADDRESS = 0x0078, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS = 0x007d, LIBPFF_ENTRY_TYPE_RECIPIENT_TYPE = 0x0c15, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_ENTRY_IDENTIFIER = 0x0c19, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME = 0x0c1a, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_SEARCH_KEY = 0x0c1d, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_ADDRESS_TYPE = 0x0c1e, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS = 0x0c1f, LIBPFF_ENTRY_TYPE_MESSAGE_DISPLAY_TO = 0x0e04, LIBPFF_ENTRY_TYPE_MESSAGE_DELIVERY_TIME = 0x0e06, LIBPFF_ENTRY_TYPE_MESSAGE_FLAGS = 0x0e07, LIBPFF_ENTRY_TYPE_MESSAGE_SIZE = 0x0e08, LIBPFF_ENTRY_TYPE_MESSAGE_STATUS = 0x0e17, LIBPFF_ENTRY_TYPE_ATTACHMENT_SIZE = 0x0e20, LIBPFF_ENTRY_TYPE_MESSAGE_INTERNET_ARTICLE_NUMBER = 0x0e23, LIBPFF_ENTRY_TYPE_MESSAGE_PERMISSION = 0x0e27, LIBPFF_ENTRY_TYPE_MESSAGE_URL_COMPUTER_NAME_SET = 0x0e62, LIBPFF_ENTRY_TYPE_MESSAGE_TRUST_SENDER = 0x0e79, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_PLAIN_TEXT = 0x1000, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_COMPRESSED_RTF = 0x1009, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_HTML = 0x1013, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME = 0x10f3, LIBPFF_ENTRY_TYPE_DISPLAY_NAME = 0x3001, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE = 0x3002, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS = 0x3003, LIBPFF_ENTRY_TYPE_MESSAGE_CREATION_TIME = 0x3007, LIBPFF_ENTRY_TYPE_MESSAGE_MODIFICATION_TIME = 0x3008, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_VALID_FOLDER_MASK = 0x35df, LIBPFF_ENTRY_TYPE_FOLDER_TYPE = 0x3601, LIBPFF_ENTRY_TYPE_NUMBER_OF_CONTENT_ITEMS = 0x3602, LIBPFF_ENTRY_TYPE_NUMBER_OF_UNREAD_CONTENT_ITEMS = 0x3603, LIBPFF_ENTRY_TYPE_HAS_SUB_FOLDERS = 0x360a, LIBPFF_ENTRY_TYPE_CONTAINER_CLASS = 0x3613, LIBPFF_ENTRY_TYPE_NUMBER_OF_ASSOCIATED_CONTENT = 0x3617, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT = 0x3701, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT = 0x3704, LIBPFF_ENTRY_TYPE_ATTACHMENT_METHOD = 0x3705, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG = 0x3707, LIBPFF_ENTRY_TYPE_ATTACHMENT_RENDERING_POSITION = 0x370b, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER = 0x3a02, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION = 0x3a05, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME = 0x3a06, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1 = 0x3a08, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER = 0x3a09, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS = 0x3a0a, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME = 0x3a11, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS = 0x3a15, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME = 0x3a16, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE = 0x3a17, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME = 0x3a18, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION = 0x3a19, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER = 0x3a1a, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2 = 0x3a1b, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER = 0x3a1c, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER = 0x3a24, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY = 0x3a26, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY = 0x3a27, LIBPFF_ENTRY_TYPE_CONTACT_TITLE = 0x3a45, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_CODEPAGE = 0x3fde, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE = 0x3ffd, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME = 0x5ff6, LIBPFF_ENTRY_TYPE_FOLDER_CHILD_COUNT = 0x6638, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER = 0x67f2, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_PASSWORD_CHECKSUM = 0x67ff, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER = 0x8005, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1 = 0x8083, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2 = 0x8093, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3 = 0x80a3, LIBPFF_ENTRY_TYPE_TASK_STATUS = 0x8101, LIBPFF_ENTRY_TYPE_TASK_PERCENTAGE_COMPLETE = 0x8102, LIBPFF_ENTRY_TYPE_TASK_START_DATE = 0x8104, LIBPFF_ENTRY_TYPE_TASK_DUE_DATE = 0x8105, LIBPFF_ENTRY_TYPE_TASK_ACTUAL_EFFORT = 0x8110, LIBPFF_ENTRY_TYPE_TASK_TOTAL_EFFORT = 0x8111, LIBPFF_ENTRY_TYPE_TASK_VERSION = 0x8112, LIBPFF_ENTRY_TYPE_TASK_IS_COMPLETE = 0x811c, LIBPFF_ENTRY_TYPE_TASK_IS_RECURRING = 0x8126, LIBPFF_ENTRY_TYPE_APPOINTMENT_BUSY_STATUS = 0x8205, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION = 0x8208, LIBPFF_ENTRY_TYPE_APPOINTMENT_START_TIME = 0x820d, LIBPFF_ENTRY_TYPE_APPOINTMENT_END_TIME = 0x820e, LIBPFF_ENTRY_TYPE_APPOINTMENT_DURATION = 0x8213, LIBPFF_ENTRY_TYPE_APPOINTMENT_IS_RECURRING = 0x8223, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN = 0x8232, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION = 0x8234, LIBPFF_ENTRY_TYPE_APPOINTMENT_FIRST_EFFECTIVE_TIME = 0x8235, LIBPFF_ENTRY_TYPE_APPOINTMENT_LAST_EFFECTIVE_TIME = 0x8236, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_TIME = 0x8502, LIBPFF_ENTRY_TYPE_MESSAGE_IS_REMINDER = 0x8503, LIBPFF_ENTRY_TYPE_MESSAGE_IS_PRIVATE = 0x8506, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_SIGNAL_TIME = 0x8550 }; #define LIBPFF_ENTRY_TYPE_AMOUNT_OF_CONTENT_ITEMS LIBPFF_ENTRY_TYPE_NUMBER_OF_CONTENT_ITEMS #define LIBPFF_ENTRY_TYPE_AMOUNT_OF_UNREAD_CONTENT_ITEMS LIBPFF_ENTRY_TYPE_NUMBER_OF_UNREAD_CONTENT_ITEMS #define LIBPFF_ENTRY_TYPE_AMOUNT_OF_ASSOCIATED_CONTENT LIBPFF_ENTRY_TYPE_NUMBER_OF_ASSOCIATED_CONTENT #ifdef __cplusplus } #endif #endif libpff-20120802/include/libpff/codepage.h0000644000175000017500000001166412005155300014741 00000000000000/* * Codepage definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_CODEPAGE_H ) #define _LIBPFF_CODEPAGE_H #include #if defined( __cplusplus ) extern "C" { #endif /* The codepage definitions */ enum LIBPFF_CODEPAGE { LIBPFF_CODEPAGE_ASCII = 20127, LIBPFF_CODEPAGE_ISO_8859_1 = 28591, LIBPFF_CODEPAGE_ISO_8859_2 = 28592, LIBPFF_CODEPAGE_ISO_8859_3 = 28593, LIBPFF_CODEPAGE_ISO_8859_4 = 28594, LIBPFF_CODEPAGE_ISO_8859_5 = 28595, LIBPFF_CODEPAGE_ISO_8859_6 = 28596, LIBPFF_CODEPAGE_ISO_8859_7 = 28597, LIBPFF_CODEPAGE_ISO_8859_8 = 28598, LIBPFF_CODEPAGE_ISO_8859_9 = 28599, LIBPFF_CODEPAGE_ISO_8859_10 = 28600, LIBPFF_CODEPAGE_ISO_8859_11 = 28601, LIBPFF_CODEPAGE_ISO_8859_13 = 28603, LIBPFF_CODEPAGE_ISO_8859_14 = 28604, LIBPFF_CODEPAGE_ISO_8859_15 = 28605, LIBPFF_CODEPAGE_ISO_8859_16 = 28606, LIBPFF_CODEPAGE_KOI8_R = 20866, LIBPFF_CODEPAGE_KOI8_U = 21866, LIBPFF_CODEPAGE_WINDOWS_874 = 874, LIBPFF_CODEPAGE_WINDOWS_932 = 932, LIBPFF_CODEPAGE_WINDOWS_936 = 936, LIBPFF_CODEPAGE_WINDOWS_949 = 949, LIBPFF_CODEPAGE_WINDOWS_950 = 950, LIBPFF_CODEPAGE_WINDOWS_1250 = 1250, LIBPFF_CODEPAGE_WINDOWS_1251 = 1251, LIBPFF_CODEPAGE_WINDOWS_1252 = 1252, LIBPFF_CODEPAGE_WINDOWS_1253 = 1253, LIBPFF_CODEPAGE_WINDOWS_1254 = 1254, LIBPFF_CODEPAGE_WINDOWS_1255 = 1255, LIBPFF_CODEPAGE_WINDOWS_1256 = 1256, LIBPFF_CODEPAGE_WINDOWS_1257 = 1257, LIBPFF_CODEPAGE_WINDOWS_1258 = 1258 }; #define LIBPFF_CODEPAGE_US_ASCII LIBPFF_CODEPAGE_ASCII #define LIBPFF_CODEPAGE_ISO_WESTERN_EUROPEAN LIBPFF_CODEPAGE_ISO_8859_1 #define LIBPFF_CODEPAGE_ISO_CENTRAL_EUROPEAN LIBPFF_CODEPAGE_ISO_8859_2 #define LIBPFF_CODEPAGE_ISO_SOUTH_EUROPEAN LIBPFF_CODEPAGE_ISO_8859_3 #define LIBPFF_CODEPAGE_ISO_NORTH_EUROPEAN LIBPFF_CODEPAGE_ISO_8859_4 #define LIBPFF_CODEPAGE_ISO_CYRILLIC LIBPFF_CODEPAGE_ISO_8859_5 #define LIBPFF_CODEPAGE_ISO_ARABIC LIBPFF_CODEPAGE_ISO_8859_6 #define LIBPFF_CODEPAGE_ISO_GREEK LIBPFF_CODEPAGE_ISO_8859_7 #define LIBPFF_CODEPAGE_ISO_HEBREW LIBPFF_CODEPAGE_ISO_8859_8 #define LIBPFF_CODEPAGE_ISO_TURKISH LIBPFF_CODEPAGE_ISO_8859_9 #define LIBPFF_CODEPAGE_ISO_NORDIC LIBPFF_CODEPAGE_ISO_8859_10 #define LIBPFF_CODEPAGE_ISO_THAI LIBPFF_CODEPAGE_ISO_8859_11 #define LIBPFF_CODEPAGE_ISO_BALTIC LIBPFF_CODEPAGE_ISO_8859_13 #define LIBPFF_CODEPAGE_ISO_CELTIC LIBPFF_CODEPAGE_ISO_8859_14 #define LIBPFF_CODEPAGE_ISO_LATIN_1 LIBPFF_CODEPAGE_ISO_8859_1 #define LIBPFF_CODEPAGE_ISO_LATIN_2 LIBPFF_CODEPAGE_ISO_8859_2 #define LIBPFF_CODEPAGE_ISO_LATIN_3 LIBPFF_CODEPAGE_ISO_8859_3 #define LIBPFF_CODEPAGE_ISO_LATIN_4 LIBPFF_CODEPAGE_ISO_8859_4 #define LIBPFF_CODEPAGE_ISO_LATIN_5 LIBPFF_CODEPAGE_ISO_8859_9 #define LIBPFF_CODEPAGE_ISO_LATIN_6 LIBPFF_CODEPAGE_ISO_8859_10 #define LIBPFF_CODEPAGE_ISO_LATIN_7 LIBPFF_CODEPAGE_ISO_8859_13 #define LIBPFF_CODEPAGE_ISO_LATIN_8 LIBPFF_CODEPAGE_ISO_8859_14 #define LIBPFF_CODEPAGE_ISO_LATIN_9 LIBPFF_CODEPAGE_ISO_8859_15 #define LIBPFF_CODEPAGE_ISO_LATIN_10 LIBPFF_CODEPAGE_ISO_8859_16 #define LIBPFF_CODEPAGE_KOI8_RUSSIAN LIBPFF_CODEPAGE_KOI8_R #define LIBPFF_CODEPAGE_KOI8_UKRAINIAN LIBPFF_CODEPAGE_KOI8_U #define LIBPFF_CODEPAGE_WINDOWS_THAI LIBPFF_CODEPAGE_WINDOWS_874 #define LIBPFF_CODEPAGE_WINDOWS_JAPANESE LIBPFF_CODEPAGE_WINDOWS_932 #define LIBPFF_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBPFF_CODEPAGE_WINDOWS_936 #define LIBPFF_CODEPAGE_WINDOWS_KOREAN LIBPFF_CODEPAGE_WINDOWS_949 #define LIBPFF_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBPFF_CODEPAGE_WINDOWS_950 #define LIBPFF_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBPFF_CODEPAGE_WINDOWS_1250 #define LIBPFF_CODEPAGE_WINDOWS_CYRILLIC LIBPFF_CODEPAGE_WINDOWS_1251 #define LIBPFF_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBPFF_CODEPAGE_WINDOWS_1252 #define LIBPFF_CODEPAGE_WINDOWS_GREEK LIBPFF_CODEPAGE_WINDOWS_1253 #define LIBPFF_CODEPAGE_WINDOWS_TURKISH LIBPFF_CODEPAGE_WINDOWS_1254 #define LIBPFF_CODEPAGE_WINDOWS_HEBREW LIBPFF_CODEPAGE_WINDOWS_1255 #define LIBPFF_CODEPAGE_WINDOWS_ARABIC LIBPFF_CODEPAGE_WINDOWS_1256 #define LIBPFF_CODEPAGE_WINDOWS_BALTIC LIBPFF_CODEPAGE_WINDOWS_1257 #define LIBPFF_CODEPAGE_WINDOWS_VIETNAMESE LIBPFF_CODEPAGE_WINDOWS_1258 #if defined( __cplusplus ) } #endif #endif libpff-20120802/include/libpff/error.h0000644000175000017500000001467712005155300014332 00000000000000/* * The error code definitions for libpff * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ERROR_H ) #define _LIBPFF_ERROR_H #include /* External error type definition hides internal structure */ typedef intptr_t libpff_error_t; /* The error domains */ enum LIBPFF_ERROR_DOMAINS { LIBPFF_ERROR_DOMAIN_ARGUMENTS = (int) 'a', LIBPFF_ERROR_DOMAIN_CONVERSION = (int) 'c', LIBPFF_ERROR_DOMAIN_COMPRESSION = (int) 'C', LIBPFF_ERROR_DOMAIN_IO = (int) 'I', LIBPFF_ERROR_DOMAIN_INPUT = (int) 'i', LIBPFF_ERROR_DOMAIN_MEMORY = (int) 'm', LIBPFF_ERROR_DOMAIN_OUTPUT = (int) 'o', LIBPFF_ERROR_DOMAIN_RUNTIME = (int) 'r', }; /* The argument error codes * to signify errors regarding arguments passed to a function */ enum LIBPFF_ARGUMENT_ERROR { LIBPFF_ARGUMENT_ERROR_GENERIC = 0, /* The argument contains an invalid value */ LIBPFF_ARGUMENT_ERROR_INVALID_VALUE = 1, /* The argument contains a value less than zero */ LIBPFF_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO = 2, /* The argument contains a value zero or less */ LIBPFF_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS = 3, /* The argument contains a value that exceeds the maximum * for the specific type */ LIBPFF_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM = 4, /* The argument contains a value that is too small */ LIBPFF_ARGUMENT_ERROR_VALUE_TOO_SMALL = 5, /* The argument contains a value that is too large */ LIBPFF_ARGUMENT_ERROR_VALUE_TOO_LARGE = 6, /* The argument contains a value that is out of bounds */ LIBPFF_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS = 7, /* The argument contains a value that is not supported */ LIBPFF_ARGUMENT_ERROR_UNSUPPORTED_VALUE = 8, /* The argument contains a value that conficts with another argument */ LIBPFF_ARGUMENT_ERROR_CONFLICTING_VALUE = 9 }; /* The conversion error codes * to signify errors regarding conversions */ enum LIBPFF_CONVERSION_ERROR { LIBPFF_CONVERSION_ERROR_GENERIC = 0, /* The conversion failed on the input */ LIBPFF_CONVERSION_ERROR_INPUT_FAILED = 1, /* The conversion failed on the output */ LIBPFF_CONVERSION_ERROR_OUTPUT_FAILED = 2 }; /* The compression error codes * to signify errors regarding compression */ enum LIBPFF_COMPRESSION_ERROR { LIBPFF_COMPRESSION_ERROR_GENERIC = 0, /* The compression failed */ LIBPFF_COMPRESSION_ERROR_COMPRESS_FAILED = 1, /* The decompression failed */ LIBPFF_COMPRESSION_ERROR_DECOMPRESS_FAILED = 2 }; /* The input/output error codes * to signify errors regarding input/output */ enum LIBPFF_IO_ERROR { LIBPFF_IO_ERROR_GENERIC = 0, /* The open failed */ LIBPFF_IO_ERROR_OPEN_FAILED = 1, /* The close failed */ LIBPFF_IO_ERROR_CLOSE_FAILED = 2, /* The seek failed */ LIBPFF_IO_ERROR_SEEK_FAILED = 3, /* The read failed */ LIBPFF_IO_ERROR_READ_FAILED = 4, /* The write failed */ LIBPFF_IO_ERROR_WRITE_FAILED = 5, /* Access denied */ LIBPFF_IO_ERROR_ACCESS_DENIED = 6, /* The resource is invalid i.e. a missing file */ LIBPFF_IO_ERROR_INVALID_RESOURCE = 7, /* The ioctl failed */ LIBPFF_IO_ERROR_IOCTL_FAILED = 8, /* The unlink failed */ LIBPFF_IO_ERROR_UNLINK_FAILED = 9 }; /* The input error codes * to signify errors regarding handing input data */ enum LIBPFF_INPUT_ERROR { LIBPFF_INPUT_ERROR_GENERIC = 0, /* The input contains invalid data */ LIBPFF_INPUT_ERROR_INVALID_DATA = 1, /* The input contains an unsupported signature */ LIBPFF_INPUT_ERROR_SIGNATURE_MISMATCH = 2, /* A checksum in the input did not match */ LIBPFF_INPUT_ERROR_CHECKSUM_MISMATCH = 3, /* A value in the input did not match a previously * read value or calculated value */ LIBPFF_INPUT_ERROR_VALUE_MISMATCH = 4 }; /* The memory error codes * to signify errors regarding memory */ enum LIBPFF_MEMORY_ERROR { LIBPFF_MEMORY_ERROR_GENERIC = 0, /* There is insufficient memory available */ LIBPFF_MEMORY_ERROR_INSUFFICIENT = 1, /* The memory failed to be copied */ LIBPFF_MEMORY_ERROR_COPY_FAILED = 2, /* The memory failed to be set */ LIBPFF_MEMORY_ERROR_SET_FAILED = 3 }; /* The runtime error codes * to signify errors regarding runtime processing */ enum LIBPFF_RUNTIME_ERROR { LIBPFF_RUNTIME_ERROR_GENERIC = 0, /* The value is missing */ LIBPFF_RUNTIME_ERROR_VALUE_MISSING = 1, /* The value was already set */ LIBPFF_RUNTIME_ERROR_VALUE_ALREADY_SET = 2, /* The creation and/or initialization of an internal structure failed */ LIBPFF_RUNTIME_ERROR_INITIALIZE_FAILED = 3, /* The resize of an internal structure failed */ LIBPFF_RUNTIME_ERROR_RESIZE_FAILED = 4, /* The free and/or finalization of an internal structure failed */ LIBPFF_RUNTIME_ERROR_FINALIZE_FAILED = 5, /* The value could not be determined */ LIBPFF_RUNTIME_ERROR_GET_FAILED = 6, /* The value could not be set */ LIBPFF_RUNTIME_ERROR_SET_FAILED = 7, /* The value could not be appended/prepended */ LIBPFF_RUNTIME_ERROR_APPEND_FAILED = 8, /* The value could not be copied */ LIBPFF_RUNTIME_ERROR_COPY_FAILED = 9, /* The value could not be removed */ LIBPFF_RUNTIME_ERROR_REMOVE_FAILED = 10, /* The value could not be printed */ LIBPFF_RUNTIME_ERROR_PRINT_FAILED = 11, /* The value was out of bounds */ LIBPFF_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS = 12, /* The value exceeds the maximum for its specific type */ LIBPFF_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM = 13, /* The value is unsupported */ LIBPFF_RUNTIME_ERROR_UNSUPPORTED_VALUE = 14, /* An abort was requested */ LIBPFF_RUNTIME_ERROR_ABORT_REQUESTED = 15 }; /* The output error codes */ enum LIBPFF_OUTPUT_ERROR { LIBPFF_OUTPUT_ERROR_GENERIC = 0, /* There is insuficient space to write the output */ LIBPFF_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1 }; #endif libpff-20120802/include/Makefile.in0000664000175000017500000006066312006536015013640 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include DIST_COMMON = $(include_HEADERS) $(pkginclude_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/libpff.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = libpff.h CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(includedir)" \ "$(DESTDIR)$(pkgincludedir)" HEADERS = $(include_HEADERS) $(pkginclude_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ include_HEADERS = \ libpff.h pkginclude_HEADERS = \ libpff/codepage.h \ libpff/definitions.h \ libpff/error.h \ libpff/extern.h \ libpff/features.h \ libpff/mapi.h \ libpff/types.h EXTRA_DIST = \ libpff.h.in \ libpff/definitions.h.in \ libpff/features.h.in \ libpff/types.h.in MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libpff.h: $(top_builddir)/config.status $(srcdir)/libpff.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-pkgincludeHEADERS distclean: clean /bin/rm -f libpff.h /bin/rm -f libpff/definitions.h /bin/rm -f libpff/features.h /bin/rm -f libpff/types.h /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libpff.spec.in0000644000175000017500000000746212005155605012670 00000000000000Name: libpff Version: @VERSION@ Release: 1 Summary: Library to to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. Group: System Environment/Libraries License: LGPL Source: %{name}-%{version}.tar.gz URL: http://code.google.com/p/libpff/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @libpff_spec_requires@ @ax_libbfio_spec_requires@ @ax_libcerror_spec_requires@ @ax_libcfile_spec_requires@ @ax_libclocale_spec_requires@ @ax_libcnotify_spec_requires@ @ax_libcpath_spec_requires@ @ax_libcsplit_spec_requires@ @ax_libcstring_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfguid_spec_requires@ @ax_libfmapi_spec_requires@ @ax_libfvalue_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libuna_spec_requires@ @libpff_spec_build_requires@ @ax_libbfio_spec_build_requires@ @ax_libcerror_spec_build_requires@ @ax_libcfile_spec_build_requires@ @ax_libclocale_spec_build_requires@ @ax_libcnotify_spec_build_requires@ @ax_libcpath_spec_build_requires@ @ax_libcsplit_spec_build_requires@ @ax_libcstring_spec_build_requires@ @ax_libfdata_spec_build_requires@ @ax_libfdatetime_spec_build_requires@ @ax_libfguid_spec_build_requires@ @ax_libfmapi_spec_build_requires@ @ax_libfvalue_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libuna_spec_build_requires@ %description libpff is a library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. %package devel Summary: Header files and libraries for developing applications for libpff Group: Development/Libraries Requires: libpff = %{version}-%{release} %description devel Header files and libraries for developing applications for libpff. %package tools Summary: Several tools for reading Personal Folder Files (OST, PAB and PST) Group: Applications/System Requires: libpff = %{version}-%{release} @ax_libcsystem_spec_requires@ @libevt_tools_spec_build_requires@ @ax_libcsystem_spec_build_requires@ %description tools Several tools for reading Personal Folder Files (OST, PAB and PST) %package python Summary: Python binding for libpff Group: System Environment/Libraries Requires: libpff = %{version}-%{release} python BuildRequires: python-devel %description python Python binding for libpff %prep %setup -q %build %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} make %{?_smp_mflags} %install rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_libdir}/*.so.* %files devel %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README README.dll README.macosx README.mingw README.static ChangeLog %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libpff.pc %{_includedir}/* %{_mandir}/man3/* %files tools %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_bindir}/pffexport %attr(755,root,root) %{_bindir}/pffinfo %{_mandir}/man1/* %files python %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/python*/site-packages/*.so.* %{_libdir}/python*/site-packages/*.a %{_libdir}/python*/site-packages/*.la %{_libdir}/python*/site-packages/*.so %changelog * Tue Apr 24 2012 Joachim Metz 20120424-1 - Changes due to dependency changes * Tue Oct 18 2011 Joachim Metz 20111018-1 - Update for configure changes and README files - Added support for Python bindings * Tue Jun 29 2010 Joachim Metz 20100629-1 - Clean up of previous version of spec file libpff-20120802/install-sh0000755000175000017500000003253712006536015012151 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpff-20120802/pypff/0000775000175000017500000000000012006536214011342 500000000000000libpff-20120802/pypff/pypff_folder.h0000644000175000017500000000414712005155272014116 00000000000000/* * Python object definition of the folder type libpff item * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_FOLDER_H ) #define _PYPFF_FOLDER_H #include #include #include "pypff_libcerror.h" #include "pypff_libpff.h" #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pypff_folder pypff_folder_t; struct pypff_folder { /* Python object initialization */ PyObject_HEAD /* The folder type libpff item */ libpff_item_t *item; }; extern PyMethodDef pypff_folder_object_methods[]; extern PyTypeObject pypff_folder_type_object; PyObject *pypff_folder_new( PyObject *self ); int pypff_folder_init( pypff_folder_t *pypff_folder ); void pypff_folder_free( pypff_folder_t *pypff_folder ); PyObject *pypff_folder_get_display_name( pypff_folder_t *pypff_folder ); PyObject *pypff_folder_get_number_of_sub_folders( pypff_folder_t *pypff_folder ); PyObject *pypff_folder_get_sub_folder( pypff_folder_t *pypff_folder, PyObject *arguments, PyObject *keywords ); PyObject *pypff_folder_get_number_of_sub_messages( pypff_folder_t *pypff_folder ); PyObject *pypff_folder_get_sub_message( pypff_folder_t *pypff_folder, PyObject *arguments, PyObject *keywords ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff.h0000644000175000017500000000274312005155272012563 00000000000000/* * Python bindings for libpff (pypff) * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_H ) #define _PYPFF_H #include #include #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif #define PYPFF_ERROR_STRING_SIZE 512 PyObject *pypff_get_version( PyObject *self ); PyObject *pypff_get_access_flags_read( PyObject *self ); PyObject *pypff_check_file_signature( PyObject *self, PyObject *arguments, PyObject *keywords ); PyObject *pypff_set_notify_values( PyObject *self, PyObject *arguments, PyObject *keywords ); PyMODINIT_FUNC initpypff( void ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff_folder.c0000644000175000017500000003506212005155272014111 00000000000000/* * Python object definition of the folder type libpff item * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pypff.h" #include "pypff_folder.h" #include "pypff_libcerror.h" #include "pypff_libcstring.h" #include "pypff_libpff.h" #include "pypff_message.h" #include "pypff_python.h" PyMethodDef pypff_folder_object_methods[] = { /* Functions to access the folder values */ { "get_name", (PyCFunction) pypff_folder_get_display_name, METH_NOARGS, "Retrieves the name" }, { "get_display_name", (PyCFunction) pypff_folder_get_display_name, METH_NOARGS, "Retrieves the display name" }, /* Functions to access the sub folders */ { "get_number_of_sub_folders", (PyCFunction) pypff_folder_get_number_of_sub_folders, METH_NOARGS, "Retrieves the number of sub folders" }, { "get_sub_folder", (PyCFunction) pypff_folder_get_sub_folder, METH_VARARGS | METH_KEYWORDS, "Retrieves a specific sub folder" }, /* Functions to access the sub messages */ { "get_number_of_sub_messages", (PyCFunction) pypff_folder_get_number_of_sub_messages, METH_NOARGS, "Retrieves the number of sub messages" }, { "get_sub_message", (PyCFunction) pypff_folder_get_sub_message, METH_VARARGS | METH_KEYWORDS, "Retrieves a specific sub message" }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyTypeObject pypff_folder_type_object = { PyObject_HEAD_INIT( NULL ) /* ob_size */ 0, /* tp_name */ "pypff.folder", /* tp_basicsize */ sizeof( pypff_folder_t ), /* tp_foldersize */ 0, /* tp_dealloc */ (destructor) pypff_folder_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ Py_TPFLAGS_DEFAULT, /* tp_doc */ "pypff folder object (wraps folder type libpff_item_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pypff_folder_object_methods, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pypff_folder_init, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ NULL, /* tp_mro */ NULL, /* tp_cache */ NULL, /* tp_subclasses */ NULL, /* tp_weaklist */ NULL, /* tp_del */ 0 }; /* Creates a new folder object * Returns a Python object if successful or NULL on error */ PyObject *pypff_folder_new( PyObject *self ) { pypff_folder_t *pypff_folder = NULL; static char *function = "pypff_folder_new"; pypff_folder = PyObject_New( struct pypff_folder, &pypff_folder_type_object ); if( pypff_folder == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize folder.", function ); return( NULL ); } if( pypff_folder_init( pypff_folder ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize folder.", function ); goto on_error; } return( (PyObject *) pypff_folder ); on_error: if( pypff_folder != NULL ) { Py_DecRef( (PyObject *) pypff_folder ); } return( NULL ); } /* Intializes a folder object * Returns 0 if successful or -1 on error */ int pypff_folder_init( pypff_folder_t *pypff_folder ) { static char *function = "pypff_folder_init"; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return( -1 ); } /* Make sure libpff item is set to NULL */ pypff_folder->item = NULL; return( 0 ); } /* Frees a folder object */ void pypff_folder_free( pypff_folder_t *pypff_folder ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_folder_free"; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return; } if( pypff_folder->ob_type == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder - missing ob_type.", function ); return; } if( pypff_folder->ob_type->tp_free == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder - invalid ob_type - missing tp_free.", function ); return; } if( pypff_folder->item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder - missing libpff folder.", function ); return; } if( libpff_item_free( &( pypff_folder->item ), &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to free libpff item.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to free libpff item.\n%s", function, error_string ); } libcerror_error_free( &error ); } pypff_folder->ob_type->tp_free( (PyObject*) pypff_folder ); } /* Retrieves the display name * Returns a Python object if successful or NULL on error */ PyObject *pypff_folder_get_display_name( pypff_folder_t *pypff_folder ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; PyObject *string_object = NULL; const char *errors = NULL; uint8_t *value_string = NULL; static char *function = "pypff_folder_get_display_name"; size_t value_string_size = 0; int result = 0; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return( NULL ); } result = libpff_item_get_entry_value_utf8_string_size( pypff_folder->item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, &value_string_size, 0, &error ); if( result == -1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name size.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name size.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( value_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to create display name.", function ); goto on_error; } result = libpff_item_get_entry_value_utf8_string( pypff_folder->item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, value_string, value_string_size, 0, &error ); if( result != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } /* Pass the string length to PyUnicode_DecodeUTF8 * otherwise it makes the end of string character is part * of the string */ string_object = PyUnicode_DecodeUTF8( (char *) value_string, (Py_ssize_t) value_string_size - 1, errors ); memory_free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( NULL ); } /* Retrieves the number of sub folders * Returns a Python object if successful or NULL on error */ PyObject *pypff_folder_get_number_of_sub_folders( pypff_folder_t *pypff_folder ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_folder_get_number_of_sub_folders"; int number_of_sub_folders = 0; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return( NULL ); } if( libpff_folder_get_number_of_sub_folders( pypff_folder->item, &number_of_sub_folders, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of sub folders.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of sub folders.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } return( PyInt_FromLong( (long) number_of_sub_folders ) ); } /* Retrieves a specific sub folder * Returns a Python object if successful or NULL on error */ PyObject *pypff_folder_get_sub_folder( pypff_folder_t *pypff_folder, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; libpff_item_t *sub_folder = NULL; PyObject *folder_object = NULL; static char *keyword_list[] = { "sub_folder_index", NULL }; static char *function = "pypff_folder_get_sub_folder"; int sub_folder_index = 0; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &sub_folder_index ) == 0 ) { goto on_error; } if( libpff_folder_get_sub_folder( pypff_folder->item, sub_folder_index, &sub_folder, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve sub folder: %d.", function, sub_folder_index ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve sub folder: %d.\n%s", function, sub_folder_index, error_string ); } libcerror_error_free( &error ); goto on_error; } folder_object = pypff_folder_new( NULL ); if( folder_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create folder object.", function ); goto on_error; } ( (pypff_folder_t *) folder_object )->item = sub_folder; return( folder_object ); on_error: if( sub_folder != NULL ) { libpff_item_free( &sub_folder, NULL ); } return( NULL ); } /* Retrieves the number of sub messages * Returns a Python object if successful or NULL on error */ PyObject *pypff_folder_get_number_of_sub_messages( pypff_folder_t *pypff_folder ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_folder_get_number_of_sub_messages"; int number_of_sub_messages = 0; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return( NULL ); } if( libpff_folder_get_number_of_sub_messages( pypff_folder->item, &number_of_sub_messages, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of sub messages.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of sub messages.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } return( PyInt_FromLong( (long) number_of_sub_messages ) ); } /* Retrieves a specific sub message * Returns a Python object if successful or NULL on error */ PyObject *pypff_folder_get_sub_message( pypff_folder_t *pypff_folder, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; libpff_item_t *sub_message = NULL; PyObject *message_object = NULL; static char *keyword_list[] = { "sub_message_index", NULL }; static char *function = "pypff_folder_get_sub_message"; int sub_message_index = 0; if( pypff_folder == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid folder.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &sub_message_index ) == 0 ) { goto on_error; } if( libpff_folder_get_sub_message( pypff_folder->item, sub_message_index, &sub_message, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve sub message: %d.", function, sub_message_index ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve sub message: %d.\n%s", function, sub_message_index, error_string ); } libcerror_error_free( &error ); goto on_error; } message_object = pypff_message_new( NULL ); if( message_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create message object.", function ); goto on_error; } ( (pypff_message_t *) message_object )->item = sub_message; return( message_object ); on_error: if( sub_message != NULL ) { libpff_item_free( &sub_message, NULL ); } return( NULL ); } libpff-20120802/pypff/pypff_message.c0000644000175000017500000002550612005155272014264 00000000000000/* * Python object definition of the message type libpff item * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pypff.h" #include "pypff_libcerror.h" #include "pypff_libcstring.h" #include "pypff_libpff.h" #include "pypff_message.h" #include "pypff_python.h" PyMethodDef pypff_message_object_methods[] = { /* Functions to access the message values */ { "get_subject", (PyCFunction) pypff_message_get_subject, METH_NOARGS, "Retrieves the subject" }, { "get_plain_text_body", (PyCFunction) pypff_message_get_plain_text_body, METH_NOARGS, "Retrieves the plain-text body" }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyTypeObject pypff_message_type_object = { PyObject_HEAD_INIT( NULL ) /* ob_size */ 0, /* tp_name */ "pypff.message", /* tp_basicsize */ sizeof( pypff_message_t ), /* tp_messagesize */ 0, /* tp_dealloc */ (destructor) pypff_message_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ Py_TPFLAGS_DEFAULT, /* tp_doc */ "pypff message object (wraps message type libpff_item_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pypff_message_object_methods, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pypff_message_init, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ NULL, /* tp_mro */ NULL, /* tp_cache */ NULL, /* tp_subclasses */ NULL, /* tp_weaklist */ NULL, /* tp_del */ 0 }; /* Creates a new message object * Returns a Python object if successful or NULL on error */ PyObject *pypff_message_new( PyObject *self ) { pypff_message_t *pypff_message = NULL; static char *function = "pypff_message_new"; pypff_message = PyObject_New( struct pypff_message, &pypff_message_type_object ); if( pypff_message == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize message.", function ); return( NULL ); } if( pypff_message_init( pypff_message ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize message.", function ); goto on_error; } return( (PyObject *) pypff_message ); on_error: if( pypff_message != NULL ) { Py_DecRef( (PyObject *) pypff_message ); } return( NULL ); } /* Intializes a message object * Returns 0 if successful or -1 on error */ int pypff_message_init( pypff_message_t *pypff_message ) { static char *function = "pypff_message_init"; if( pypff_message == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message.", function ); return( -1 ); } /* Make sure libpff item is set to NULL */ pypff_message->item = NULL; return( 0 ); } /* Frees a message object */ void pypff_message_free( pypff_message_t *pypff_message ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_message_free"; if( pypff_message == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message.", function ); return; } if( pypff_message->ob_type == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message - missing ob_type.", function ); return; } if( pypff_message->ob_type->tp_free == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message - invalid ob_type - missing tp_free.", function ); return; } if( pypff_message->item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message - missing libpff message.", function ); return; } if( libpff_item_free( &( pypff_message->item ), &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to free libpff item.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to free libpff item.\n%s", function, error_string ); } libcerror_error_free( &error ); } pypff_message->ob_type->tp_free( (PyObject*) pypff_message ); } /* Retrieves the subject * Returns a Python object if successful or NULL on error */ PyObject *pypff_message_get_subject( pypff_message_t *pypff_message ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; PyObject *string_object = NULL; const char *errors = NULL; uint8_t *value_string = NULL; static char *function = "pypff_message_get_subject"; size_t value_string_size = 0; int result = 0; if( pypff_message == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message.", function ); return( NULL ); } result = libpff_item_get_entry_value_utf8_string_size( pypff_message->item, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, &value_string_size, 0, &error ); if( result == -1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve subject size.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve subject size.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( value_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to create subject.", function ); goto on_error; } result = libpff_item_get_entry_value_utf8_string( pypff_message->item, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT, value_string, value_string_size, 0, &error ); if( result != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve subject.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve subject.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } /* Ignore the subject control codes for now */ if( value_string[ 0 ] < 0x20 ) { /* Pass the string length to PyUnicode_DecodeUTF8 * otherwise it makes the end of string character is part * of the string */ string_object = PyUnicode_DecodeUTF8( (char *) &( value_string[ 2 ] ), (Py_ssize_t) value_string_size - 3, errors ); } else { /* Pass the string length to PyUnicode_DecodeUTF8 * otherwise it makes the end of string character is part * of the string */ string_object = PyUnicode_DecodeUTF8( (char *) value_string, (Py_ssize_t) value_string_size - 1, errors ); } memory_free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( NULL ); } /* Retrieves the plain text body * Returns a Python object if successful or NULL on error */ PyObject *pypff_message_get_plain_text_body( pypff_message_t *pypff_message ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; PyObject *string_object = NULL; const char *errors = NULL; uint8_t *value_string = NULL; static char *function = "pypff_message_get_plain_text_body"; size_t value_string_size = 0; int result = 0; if( pypff_message == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid message.", function ); return( NULL ); } result = libpff_message_get_plain_text_body_size( pypff_message->item, &value_string_size, &error ); if( result == -1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve plain text body size.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve plain text body size.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( value_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to create plain text body.", function ); goto on_error; } result = libpff_message_get_plain_text_body( pypff_message->item, value_string, value_string_size, &error ); if( result != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve plain text body.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve plain text body.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } /* Pass the string length to PyUnicode_DecodeUTF8 * otherwise it makes the end of string character is part * of the string */ string_object = PyUnicode_DecodeUTF8( (char *) value_string, (Py_ssize_t) value_string_size - 1, errors ); memory_free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( NULL ); } libpff-20120802/pypff/Makefile.am0000644000175000017500000000206412005155272013316 00000000000000if HAVE_PYTHON AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ pyexec_LTLIBRARIES = pypff.la pypff_la_SOURCES = \ pypff.c pypff.h \ pypff_codepage.c pypff_codepage.h \ pypff_datetime.c pypff_datetime.h \ pypff_file.c pypff_file.h \ pypff_file_object_io_handle.c pypff_file_object_io_handle.h \ pypff_folder.c pypff_folder.h \ pypff_item.c pypff_item.h \ pypff_libbfio.h \ pypff_libcerror.h \ pypff_libclocale.h \ pypff_libcstring.h \ pypff_libpff.h \ pypff_message.c pypff_message.h \ pypff_python.h pypff_la_LIBADD = \ @LIBCSTRING_LIBADD@ \ @LIBCERROR_LIBADD@ \ ../libpff/libpff.la @LIBCLOCALE_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ pypff_la_CPPFLAGS = $(PYTHON_CPPFLAGS) pypff_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/pypff/pypff_datetime.h0000644000175000017500000000225412005155272014434 00000000000000/* * Date and time functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_DATETIME_H ) #define _PYPFF_DATETIME_H #include #include #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif PyObject *pypff_datetime_new_from_filetime( uint64_t filetime ); PyObject *pypff_datetime_new_from_posix_time( uint32_t posix_time ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff_file.c0000644000175000017500000005263112005155272013556 00000000000000/* * Python object definition of the libpff file * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pypff.h" #include "pypff_codepage.h" #include "pypff_file.h" #include "pypff_file_object_io_handle.h" #include "pypff_folder.h" #include "pypff_item.h" #include "pypff_libcerror.h" #include "pypff_libclocale.h" #include "pypff_libcstring.h" #include "pypff_libpff.h" #include "pypff_python.h" #if !defined( LIBPFF_HAVE_BFIO ) LIBPFF_EXTERN \ int libpff_file_open_file_io_handle( libpff_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libpff_error_t **error ); #endif PyMethodDef pypff_file_object_methods[] = { { "signal_abort", (PyCFunction) pypff_file_signal_abort, METH_NOARGS, "signal_abort() -> None\n" "\n" "Signals the file to abort the current activity" }, /* Functions to access the file */ { "open", (PyCFunction) pypff_file_open, METH_VARARGS | METH_KEYWORDS, "open(filename, access_flags) -> None\n" "\n" "Opens a file" }, { "open_file_object", (PyCFunction) pypff_file_open_file_object, METH_VARARGS | METH_KEYWORDS, "open(file_object, access_flags) -> None\n" "\n" "Opens a file using a file-like object" }, { "close", (PyCFunction) pypff_file_close, METH_NOARGS, "close() -> None\n" "\n" "Closes a file" }, { "get_ascii_codepage", (PyCFunction) pypff_file_get_ascii_codepage, METH_NOARGS, "get_ascii_codepage() -> String\n" "\n" "Returns the codepage used for ASCII strings in the file" }, { "set_ascii_codepage", (PyCFunction) pypff_file_set_ascii_codepage, METH_VARARGS | METH_KEYWORDS, "set_ascii_codepage(codepage) -> None\n" "\n" "Set the codepage used for ASCII strings in the file\n" "Expects the codepage to be a String containing a Python codec definition" }, { "recover_items", (PyCFunction) pypff_file_recover_items, METH_NOARGS, "recover_items() -> None\n" "\n" "Tries to recover items" }, /* Functions to access the items */ { "get_root_folder", (PyCFunction) pypff_file_get_root_folder, METH_NOARGS, "get_root_folder() -> Object or None\n" "\n" "Retrieves the root folder" }, /* Functions to access the recovered items */ { "get_number_of_recovered_items", (PyCFunction) pypff_file_get_number_of_recovered_items, METH_NOARGS, "get_number_of_recovered_items() -> Integer\n" "\n" "Retrieves the number of recovered items" }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyGetSetDef pypff_file_object_get_set_definitions[] = { { "ascii_codepage", (getter) pypff_file_get_ascii_codepage, (setter) pypff_file_set_ascii_codepage, "The codepage used for ASCII strings in the file", NULL }, /* Sentinel */ { NULL, NULL, NULL, NULL, NULL } }; PyTypeObject pypff_file_type_object = { PyObject_HEAD_INIT( NULL ) /* ob_size */ 0, /* tp_name */ "pypff.file", /* tp_basicsize */ sizeof( pypff_file_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pypff_file_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ Py_TPFLAGS_DEFAULT, /* tp_doc */ "pypff file object (wraps libpff_file_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pypff_file_object_methods, /* tp_members */ 0, /* tp_getset */ pypff_file_object_get_set_definitions, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pypff_file_init, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ NULL, /* tp_mro */ NULL, /* tp_cache */ NULL, /* tp_subclasses */ NULL, /* tp_weaklist */ NULL, /* tp_del */ 0 }; /* Creates a new file object * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_new( PyObject *self ) { pypff_file_t *pypff_file = NULL; static char *function = "pypff_file_new"; pypff_file = PyObject_New( struct pypff_file, &pypff_file_type_object ); if( pypff_file == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file.", function ); return( NULL ); } if( pypff_file_init( pypff_file ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file.", function ); goto on_error; } return( (PyObject *) pypff_file ); on_error: if( pypff_file != NULL ) { Py_DecRef( (PyObject *) pypff_file ); } return( NULL ); } /* Creates a new file object and opens it * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_new_open( PyObject *self, PyObject *arguments, PyObject *keywords ) { PyObject *pypff_file = NULL; pypff_file = pypff_file_new( self ); pypff_file_open( (pypff_file_t *) pypff_file, arguments, keywords ); return( pypff_file ); } /* Intializes a file object * Returns 0 if successful or -1 on error */ int pypff_file_init( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; static char *function = "pypff_file_init"; libcerror_error_t *error = NULL; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( -1 ); } /* Make sure libpff file is set to NULL */ pypff_file->file = NULL; if( libpff_file_initialize( &( pypff_file->file ), &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file.", function ); } else { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file.\n%s", function, error_string ); } libcerror_error_free( &error ); return( -1 ); } return( 0 ); } /* Frees a file object */ void pypff_file_free( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_file_free"; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return; } if( pypff_file->ob_type == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file - missing ob_type.", function ); return; } if( pypff_file->ob_type->tp_free == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file - invalid ob_type - missing tp_free.", function ); return; } if( pypff_file->file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file - missing libpff file.", function ); return; } if( libpff_file_free( &( pypff_file->file ), &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to free libpff file.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to free libpff file.\n%s", function, error_string ); } libcerror_error_free( &error ); } pypff_file->ob_type->tp_free( (PyObject*) pypff_file ); } /* Signals the file to abort the current activity * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_signal_abort( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_file_signal_abort"; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( libpff_file_signal_abort( pypff_file->file, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to signal abort.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to signal abort.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } /* Opens a file * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_open( pypff_file_t *pypff_file, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; char *filename = NULL; static char *keyword_list[] = { "filename", "access_flags", NULL }; static char *function = "pypff_file_open"; int access_flags = 0; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "s|i", keyword_list, &filename, &access_flags ) == 0 ) { return( NULL ); } if( libpff_file_open( pypff_file->file, filename, (uint8_t) access_flags, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to open file.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to open file.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } /* Opens a file using a file-like object * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_open_file_object( pypff_file_t *pypff_file, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; PyObject *file_object = NULL; libbfio_handle_t *file_io_handle = NULL; libcerror_error_t *error = NULL; static char *keyword_list[] = { "file_object", "access_flags", NULL }; static char *function = "pypff_file_open_file_object"; int access_flags = 0; int result = 0; if( pypff_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "O|i", keyword_list, &file_object, &access_flags ) == 0 ) { return( NULL ); } /* Default to read-only if no access flags were provided */ if( access_flags == 0 ) { access_flags = libpff_get_access_flags_read(); } if( pypff_file_object_initialize( &file_io_handle, file_object, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file IO handle.", function ); } else { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize file IO handle.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } Py_BEGIN_ALLOW_THREADS result = libpff_file_open_file_io_handle( pypff_file->file, file_io_handle, access_flags, &error ); Py_END_ALLOW_THREADS if( result != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to open file.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to open file.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } Py_IncRef( Py_None ); return( Py_None ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( NULL ); } /* Closes a file * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_close( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_file_close"; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( libpff_file_close( pypff_file->file, &error ) != 0 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to close file.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to close file.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } /* Retrieves the codepage used for ASCII strings in the file * Returns a Python object holding the offset if successful or NULL on error */ PyObject *pypff_file_get_ascii_codepage( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; PyObject *string_object = NULL; const char *codepage_string = NULL; static char *function = "pypff_file_get_ascii_codepage"; int ascii_codepage = 0; if( pypff_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } if( libpff_file_get_ascii_codepage( pypff_file->file, &ascii_codepage, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve ASCII codepage.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve ASCII codepage.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } codepage_string = pypff_codepage_to_string( ascii_codepage ); if( codepage_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: unsupported ASCII codepage: %d.", function, ascii_codepage ); return( NULL ); } string_object = PyString_FromString( codepage_string ); if( string_object == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to convert codepage string into string object.", function ); return( NULL ); } return( string_object ); } /* Sets the codepage used for ASCII strings in the file * Returns a Python object holding the offset if successful or NULL on error */ PyObject *pypff_file_set_ascii_codepage( pypff_file_t *pypff_file, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; char *codepage_string = NULL; static char *keyword_list[] = { "codepage", NULL }; static char *function = "pypff_file_set_ascii_codepage"; size_t codepage_string_length = 0; uint32_t feature_flags = 0; int ascii_codepage = 0; if( pypff_file == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid file.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "s", keyword_list, &codepage_string ) == 0 ) { return( NULL ); } if( codepage_string == NULL ) { PyErr_Format( PyExc_ValueError, "%s: invalid codepage string.", function ); return( NULL ); } codepage_string_length = libcstring_narrow_string_length( codepage_string ); feature_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS; if( libclocale_codepage_copy_from_string( &ascii_codepage, codepage_string, codepage_string_length, feature_flags, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_RuntimeError, "%s: unable to determine ASCII codepage.", function ); } else { PyErr_Format( PyExc_RuntimeError, "%s: unable to determine ASCII codepage.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } if( libpff_file_set_ascii_codepage( pypff_file->file, ascii_codepage, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to set ASCII codepage.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to set ASCII codepage.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } /* Tries to recover items * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_recover_items( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_file_recover_items"; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( libpff_file_recover_items( pypff_file->file, 0, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to recover items.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to recover items.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } Py_IncRef( Py_None ); return( Py_None ); } /* Retrieves the root folder * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_get_root_folder( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; libpff_item_t *root_folder = NULL; PyObject *folder_object = NULL; static char *function = "pypff_file_get_root_folder"; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( libpff_file_get_root_folder( pypff_file->file, &root_folder, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve root folder item.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve root folder item.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } folder_object = pypff_folder_new( NULL ); if( folder_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create folder object.", function ); goto on_error; } ( (pypff_folder_t *) folder_object )->item = root_folder; return( folder_object ); on_error: if( root_folder != NULL ) { libpff_item_free( &root_folder, NULL ); } return( NULL ); } /* Retrieves the number of recovered items * Returns a Python object if successful or NULL on error */ PyObject *pypff_file_get_number_of_recovered_items( pypff_file_t *pypff_file ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_file_get_number_of_recovered_items"; int number_of_items = 0; if( pypff_file == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid file.", function ); return( NULL ); } if( libpff_file_get_number_of_recovered_items( pypff_file->file, &number_of_items, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of recover items.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of recover items.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } return( PyInt_FromLong( (long) number_of_items ) ); } libpff-20120802/pypff/pypff_codepage.h0000644000175000017500000000212012005155272014377 00000000000000/* * Codepage functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_CODEPAGE_H ) #define _PYPFF_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif const char *pypff_codepage_to_string( int codepage ); /* TODO add list function */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff_libcstring.h0000644000175000017500000000261612005155272015002 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_LIBCSTRING_H ) #define _PYPFF_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pypff/pypff_python.h0000644000175000017500000000203212005155272014153 00000000000000/* * The python header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_PYTHON_H ) #define _PYPFF_PYTHON_H #include /* Fix defines in pyconfig.h */ #undef _POSIX_C_SOURCE /* Fix defines in pyport.h */ #undef HAVE_FSTAT #undef HAVE_STAT #include #endif libpff-20120802/pypff/pypff_datetime.c0000644000175000017500000001722012005155272014426 00000000000000/* * Date and time functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "pypff_datetime.h" #include "pypff_python.h" #include /* Creates a new datetime object from a filetime * Returns a Python object if successful or NULL on error */ PyObject *pypff_datetime_new_from_filetime( uint64_t filetime ) { static char *function = "pypff_datetime_new_from_filetime"; PyObject *date_time_object = NULL; uint32_t days_in_century = 0; uint16_t days_in_year = 0; uint16_t year = 0; uint8_t day = 0; uint8_t days_in_month = 0; uint8_t hours = 0; uint8_t micro_seconds = 0; uint8_t minutes = 0; uint8_t month = 0; uint8_t seconds = 0; /* The timestamp is in units of 100 nano seconds correct the value to seconds */ micro_seconds = ( filetime % 10000000 ) / 10; filetime /= 10000000; /* There are 60 seconds in a minute correct the value to minutes */ seconds = filetime % 60; filetime /= 60; /* There are 60 minutes in an hour correct the value to hours */ minutes = filetime % 60; filetime /= 60; /* There are 24 hours in a day correct the value to days */ hours = filetime % 24; filetime /= 24; /* Add 1 day to compensate that Jan 1 1601 is represented as 0 */ filetime += 1; /* Determine the number of years starting at '1 Jan 1601 00:00:00' * correct the value to days within the year */ year = 1601; if( filetime >= 36159 ) { year = 1700; filetime -= 36159; } while( filetime > 0 ) { if( ( year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( filetime <= days_in_century ) { break; } filetime -= days_in_century; year += 100; } while( filetime > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( filetime <= days_in_year ) { break; } filetime -= days_in_year; year += 1; } /* Determine the month correct the value to days within the month */ month = 1; while( filetime > 0 ) { /* February (2) */ if( month == 2 ) { if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( month == 4 ) || ( month == 6 ) || ( month == 9 ) || ( month == 11 ) ) { days_in_month = 30; } /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) || ( month == 5 ) || ( month == 7 ) || ( month == 8 ) || ( month == 10 ) || ( month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { PyErr_Format( PyExc_IOError, "%s: unsupported month: %d.", function, month ); return( NULL ); } if( filetime <= days_in_month ) { break; } filetime -= days_in_month; month += 1; } /* Determine the day */ day = (uint8_t) filetime; PyDateTime_IMPORT; date_time_object = (PyObject *) PyDateTime_FromDateAndTime( year, month, day, hours, minutes, seconds, micro_seconds ); return( date_time_object ); } /* Creates a new datetime object from a POSIX time * Returns a Python object if successful or NULL on error */ PyObject *pypff_datetime_new_from_posix_time( uint32_t posix_time ) { static char *function = "pypff_datetime_new_from_posix_time"; PyObject *date_time_object = NULL; uint16_t days_in_year = 0; uint16_t year = 0; uint8_t day = 0; uint8_t days_in_month = 0; uint8_t hours = 0; uint8_t minutes = 0; uint8_t month = 0; uint8_t seconds = 0; /* There are 60 seconds in a minute correct the value to minutes */ seconds = posix_time % 60; posix_time /= 60; /* There are 60 minutes in an hour correct the value to hours */ minutes = posix_time % 60; posix_time /= 60; /* There are 24 hours in a day correct the value to days */ hours = posix_time % 24; posix_time /= 24; /* Add 1 day to compensate that Jan 1 1601 is represented as 0 */ posix_time += 1; /* Determine the number of years starting at '1 Jan 1970 00:00:00' * correct the value to days within the year */ year = 1970; if( posix_time >= 10957 ) { year = 2000; posix_time -= 10957; } while( posix_time > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( posix_time <= days_in_year ) { break; } posix_time -= days_in_year; year += 1; } /* Determine the month correct the value to days within the month */ month = 1; while( posix_time > 0 ) { /* February (2) */ if( month == 2 ) { if( ( ( ( year % 4 ) == 0 ) && ( ( year % 100 ) != 0 ) ) || ( ( year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( month == 4 ) || ( month == 6 ) || ( month == 9 ) || ( month == 11 ) ) { days_in_month = 30; } /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( month == 1 ) || ( month == 3 ) || ( month == 5 ) || ( month == 7 ) || ( month == 8 ) || ( month == 10 ) || ( month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { PyErr_Format( PyExc_IOError, "%s: unsupported month: %d.", function, month ); return( NULL ); } if( posix_time <= days_in_month ) { break; } posix_time -= days_in_month; month += 1; } /* Determine the day */ day = (uint8_t) posix_time; PyDateTime_IMPORT; date_time_object = (PyObject *) PyDateTime_FromDateAndTime( year, month, day, hours, minutes, seconds, 0 ); return( date_time_object ); } libpff-20120802/pypff/pypff_item.h0000644000175000017500000000345312005155272013600 00000000000000/* * Python object definition of the libpff item * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_ITEM_H ) #define _PYPFF_ITEM_H #include #include #include "pypff_libcerror.h" #include "pypff_libpff.h" #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pypff_item pypff_item_t; struct pypff_item { /* Python object initialization */ PyObject_HEAD /* The libpff item */ libpff_item_t *item; }; extern PyMethodDef pypff_item_object_methods[]; extern PyTypeObject pypff_item_type_object; PyObject *pypff_item_new( PyObject *self ); int pypff_item_init( pypff_item_t *pypff_item ); void pypff_item_free( pypff_item_t *pypff_item ); PyObject *pypff_item_get_display_name( pypff_item_t *pypff_item ); PyObject *pypff_item_get_number_of_sub_items( pypff_item_t *pypff_item ); PyObject *pypff_item_get_sub_item( pypff_item_t *pypff_item, PyObject *arguments, PyObject *keywords ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff_codepage.c0000644000175000017500000000622612005155272014405 00000000000000/* * Codepage functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "pypff_codepage.h" #include "pypff_libpff.h" /* Returns a string representation of the codepage * Codecs and aliases are defined: http://docs.python.org/library/codecs.html#standard-encodings * Returns 1 if successful or NULL if codepage is not supported */ const char *pypff_codepage_to_string( int codepage ) { switch( codepage ) { case LIBPFF_CODEPAGE_ASCII: return( "ascii" ); case LIBPFF_CODEPAGE_ISO_8859_1: return( "iso-8859-1" ); case LIBPFF_CODEPAGE_ISO_8859_2: return( "iso-8859-2" ); case LIBPFF_CODEPAGE_ISO_8859_3: return( "iso-8859-3" ); case LIBPFF_CODEPAGE_ISO_8859_4: return( "iso-8859-4" ); case LIBPFF_CODEPAGE_ISO_8859_5: return( "iso-8859-5" ); case LIBPFF_CODEPAGE_ISO_8859_6: return( "iso-8859-6" ); case LIBPFF_CODEPAGE_ISO_8859_7: return( "iso-8859-7" ); case LIBPFF_CODEPAGE_ISO_8859_8: return( "iso-8859-8" ); case LIBPFF_CODEPAGE_ISO_8859_9: return( "iso-8859-9" ); case LIBPFF_CODEPAGE_ISO_8859_10: return( "iso-8859-10" ); case LIBPFF_CODEPAGE_ISO_8859_11: return( "iso-8859-11" ); case LIBPFF_CODEPAGE_ISO_8859_13: return( "iso-8859-13" ); case LIBPFF_CODEPAGE_ISO_8859_14: return( "iso-8859-14" ); case LIBPFF_CODEPAGE_ISO_8859_15: return( "iso-8859-15" ); case LIBPFF_CODEPAGE_ISO_8859_16: return( "iso-8859-16" ); case LIBPFF_CODEPAGE_KOI8_R: return( "koi8_r" ); case LIBPFF_CODEPAGE_KOI8_U: return( "koi8_u" ); case LIBPFF_CODEPAGE_WINDOWS_874: return( "cp874" ); case LIBPFF_CODEPAGE_WINDOWS_932: return( "cp932" ); case LIBPFF_CODEPAGE_WINDOWS_936: return( "cp936" ); case LIBPFF_CODEPAGE_WINDOWS_949: return( "cp949" ); case LIBPFF_CODEPAGE_WINDOWS_950: return( "cp950" ); case LIBPFF_CODEPAGE_WINDOWS_1250: return( "cp1250" ); case LIBPFF_CODEPAGE_WINDOWS_1251: return( "cp1251" ); case LIBPFF_CODEPAGE_WINDOWS_1252: return( "cp1252" ); case LIBPFF_CODEPAGE_WINDOWS_1253: return( "cp1253" ); case LIBPFF_CODEPAGE_WINDOWS_1254: return( "cp1254" ); case LIBPFF_CODEPAGE_WINDOWS_1255: return( "cp1255" ); case LIBPFF_CODEPAGE_WINDOWS_1256: return( "cp1256" ); case LIBPFF_CODEPAGE_WINDOWS_1257: return( "cp1257" ); case LIBPFF_CODEPAGE_WINDOWS_1258: return( "cp1258" ); default: break; } return( NULL ); } libpff-20120802/pypff/pypff_libpff.h0000644000175000017500000000212112005155272014073 00000000000000/* * The internal libpff header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_LIBPFF_H ) #define _PYPFF_LIBPFF_H #include /* If Cygwin libtool DLL support is enabled set LIBPFF_DLL_IMPORT * before including libpff.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBPFF_DLL_IMPORT #endif #include #endif libpff-20120802/pypff/pypff_file_object_io_handle.h0000644000175000017500000000767112005155272017117 00000000000000/* * Python file object IO handle functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_FILE_OBJECT_IO_HANDLE_H ) #define _PYPFF_FILE_OBJECT_IO_HANDLE_H #include #include #include "pypff_libbfio.h" #include "pypff_libcerror.h" #include "pypff_libcstring.h" #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pypff_file_object_io_handle pypff_file_object_io_handle_t; struct pypff_file_object_io_handle { /* The python file (like) object */ PyObject *file_object; /* The access flags */ int access_flags; }; int pypff_file_object_io_handle_initialize( pypff_file_object_io_handle_t **file_object_io_handle, PyObject *file_object, libcerror_error_t **error ); int pypff_file_object_initialize( libbfio_handle_t **handle, PyObject *file_object, libcerror_error_t **error ); int pypff_file_object_io_handle_free( pypff_file_object_io_handle_t **file_object_io_handle, libcerror_error_t **error ); int pypff_file_object_io_handle_clone( pypff_file_object_io_handle_t **destination_file_object_io_handle, pypff_file_object_io_handle_t *source_file_object_io_handle, libcerror_error_t **error ); int pypff_file_object_io_handle_open( pypff_file_object_io_handle_t *file_object_io_handle, int access_flags, libcerror_error_t **error ); int pypff_file_object_io_handle_close( pypff_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); ssize_t pypff_file_object_read_buffer( PyObject *file_object, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pypff_file_object_io_handle_read( pypff_file_object_io_handle_t *file_object_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pypff_file_object_write_buffer( PyObject *file_object, const uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t pypff_file_object_io_handle_write( pypff_file_object_io_handle_t *file_object_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); int pypff_file_object_seek_offset( PyObject *file_object, off64_t offset, int whence, libcerror_error_t **error ); int pypff_file_object_get_offset( PyObject *file_object, off64_t *offset, libcerror_error_t **error ); off64_t pypff_file_object_io_handle_seek_offset( pypff_file_object_io_handle_t *file_object_io_handle, off64_t offset, int whence, libcerror_error_t **error ); int pypff_file_object_io_handle_exists( pypff_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); int pypff_file_object_io_handle_is_open( pypff_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ); int pypff_file_object_get_size( PyObject *file_object, size64_t *size, libcerror_error_t **error ); int pypff_file_object_io_handle_get_size( pypff_file_object_io_handle_t *file_object_io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff_libbfio.h0000644000175000017500000000265212005155272014250 00000000000000/* * The libbfio header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_LIBBFIO_H ) #define _PYPFF_LIBBFIO_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if defined( HAVE_LOCAL_LIBBFIO ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT * before including libbfio.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBBFIO_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pypff/pypff_file.h0000644000175000017500000000475612005155272013570 00000000000000/* * Python object definition of the libpff file * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_FILE_H ) #define _PYPFF_FILE_H #include #include #include "pypff_libcerror.h" #include "pypff_libpff.h" #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pypff_file pypff_file_t; struct pypff_file { /* Python object initialization */ PyObject_HEAD /* The libpff file */ libpff_file_t *file; }; extern PyMethodDef pypff_file_object_methods[]; extern PyTypeObject pypff_file_type_object; PyObject *pypff_file_new( PyObject *self ); PyObject *pypff_file_new_open( PyObject *self, PyObject *arguments, PyObject *keywords ); int pypff_file_init( pypff_file_t *pypff_file ); void pypff_file_free( pypff_file_t *pypff_file ); PyObject *pypff_file_signal_abort( pypff_file_t *pypff_file ); PyObject *pypff_file_open( pypff_file_t *pypff_file, PyObject *arguments, PyObject *keywords ); PyObject *pypff_file_open_file_object( pypff_file_t *pypff_file, PyObject *arguments, PyObject *keywords ); PyObject *pypff_file_close( pypff_file_t *pypff_file ); PyObject *pypff_file_get_ascii_codepage( pypff_file_t *pypff_file ); PyObject *pypff_file_set_ascii_codepage( pypff_file_t *pypff_file, PyObject *arguments, PyObject *keywords ); PyObject *pypff_file_recover_items( pypff_file_t *pypff_file ); PyObject *pypff_file_get_root_folder( pypff_file_t *pypff_file ); PyObject *pypff_file_get_number_of_recovered_items( pypff_file_t *pypff_file ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/pypff_item.c0000644000175000017500000002551112005155272013572 00000000000000/* * Python object definition of the libpff item * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pypff.h" #include "pypff_item.h" #include "pypff_libcerror.h" #include "pypff_libcstring.h" #include "pypff_libpff.h" #include "pypff_python.h" PyMethodDef pypff_item_object_methods[] = { /* Functions to access the item values */ { "get_display_name", (PyCFunction) pypff_item_get_display_name, METH_NOARGS, "Retrieves the display name" }, /* Functions to access the sub items */ { "get_number_of_sub_items", (PyCFunction) pypff_item_get_number_of_sub_items, METH_NOARGS, "Retrieves the number of sub items" }, { "get_sub_item", (PyCFunction) pypff_item_get_sub_item, METH_VARARGS | METH_KEYWORDS, "Retrieves a specific sub item" }, /* Sentinel */ { NULL, NULL, 0, NULL } }; PyTypeObject pypff_item_type_object = { PyObject_HEAD_INIT( NULL ) /* ob_size */ 0, /* tp_name */ "pypff.item", /* tp_basicsize */ sizeof( pypff_item_t ), /* tp_itemsize */ 0, /* tp_dealloc */ (destructor) pypff_item_free, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as_number */ 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ 0, /* tp_flags */ Py_TPFLAGS_DEFAULT, /* tp_doc */ "pypff item object (wraps libpff_item_t)", /* tp_traverse */ 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ pypff_item_object_methods, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ (initproc) pypff_item_init, /* tp_alloc */ 0, /* tp_new */ 0, /* tp_free */ 0, /* tp_is_gc */ 0, /* tp_bases */ NULL, /* tp_mro */ NULL, /* tp_cache */ NULL, /* tp_subclasses */ NULL, /* tp_weaklist */ NULL, /* tp_del */ 0 }; /* Creates a new item object * Returns a Python object if successful or NULL on error */ PyObject *pypff_item_new( PyObject *self ) { pypff_item_t *pypff_item = NULL; static char *function = "pypff_item_new"; pypff_item = PyObject_New( struct pypff_item, &pypff_item_type_object ); if( pypff_item == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize item.", function ); return( NULL ); } if( pypff_item_init( pypff_item ) != 0 ) { PyErr_Format( PyExc_MemoryError, "%s: unable to initialize item.", function ); goto on_error; } return( (PyObject *) pypff_item ); on_error: if( pypff_item != NULL ) { Py_DecRef( (PyObject *) pypff_item ); } return( NULL ); } /* Intializes an item object * Returns 0 if successful or -1 on error */ int pypff_item_init( pypff_item_t *pypff_item ) { static char *function = "pypff_item_init"; if( pypff_item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item.", function ); return( -1 ); } /* Make sure libpff item is set to NULL */ pypff_item->item = NULL; return( 0 ); } /* Frees an item object */ void pypff_item_free( pypff_item_t *pypff_item ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_item_free"; if( pypff_item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item.", function ); return; } if( pypff_item->ob_type == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item - missing ob_type.", function ); return; } if( pypff_item->ob_type->tp_free == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item - invalid ob_type - missing tp_free.", function ); return; } if( pypff_item->item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item - missing libpff item.", function ); return; } if( libpff_item_free( &( pypff_item->item ), &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to free libpff item.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to free libpff item.\n%s", function, error_string ); } libcerror_error_free( &error ); } pypff_item->ob_type->tp_free( (PyObject*) pypff_item ); } /* Retrieves the display name * Returns a Python object if successful or NULL on error */ PyObject *pypff_item_get_display_name( pypff_item_t *pypff_item ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; PyObject *string_object = NULL; const char *errors = NULL; uint8_t *value_string = NULL; static char *function = "pypff_item_get_display_name"; size_t value_string_size = 0; int result = 0; if( pypff_item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item.", function ); return( NULL ); } result = libpff_item_get_entry_value_utf8_string_size( pypff_item->item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, &value_string_size, 0, &error ); if( result == -1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name size.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name size.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } else if( ( result == 0 ) || ( value_string_size == 0 ) ) { Py_IncRef( Py_None ); return( Py_None ); } value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { PyErr_Format( PyExc_IOError, "%s: unable to create display name.", function ); goto on_error; } result = libpff_item_get_entry_value_utf8_string( pypff_item->item, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, value_string, value_string_size, 0, &error ); if( result != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve display name.\n%s", function, error_string ); } libcerror_error_free( &error ); goto on_error; } /* Pass the string length to PyUnicode_DecodeUTF8 * otherwise it makes the end of string character is part * of the string */ string_object = PyUnicode_DecodeUTF8( (char *) value_string, (Py_ssize_t) value_string_size - 1, errors ); memory_free( value_string ); return( string_object ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( NULL ); } /* Retrieves the number of sub items * Returns a Python object if successful or NULL on error */ PyObject *pypff_item_get_number_of_sub_items( pypff_item_t *pypff_item ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_item_get_number_of_sub_items"; int number_of_sub_items = 0; if( pypff_item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item.", function ); return( NULL ); } if( libpff_item_get_number_of_sub_items( pypff_item->item, &number_of_sub_items, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of sub items.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve number of sub items.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } return( PyInt_FromLong( (long) number_of_sub_items ) ); } /* Retrieves a specific sub item * Returns a Python object if successful or NULL on error */ PyObject *pypff_item_get_sub_item( pypff_item_t *pypff_item, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; libpff_item_t *sub_item = NULL; PyObject *item_object = NULL; static char *keyword_list[] = { "sub_item_index", NULL }; static char *function = "pypff_item_get_sub_item"; int sub_item_index = 0; if( pypff_item == NULL ) { PyErr_Format( PyExc_TypeError, "%s: invalid item.", function ); return( NULL ); } if( PyArg_ParseTupleAndKeywords( arguments, keywords, "i", keyword_list, &sub_item_index ) == 0 ) { goto on_error; } if( libpff_item_get_sub_item( pypff_item->item, sub_item_index, &sub_item, &error ) != 1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to retrieve sub item: %d.", function, sub_item_index ); } else { PyErr_Format( PyExc_IOError, "%s: unable to retrieve sub item: %d.\n%s", function, sub_item_index, error_string ); } libcerror_error_free( &error ); goto on_error; } item_object = pypff_item_new( NULL ); if( item_object == NULL ) { PyErr_Format( PyExc_MemoryError, "%s: unable to create item object.", function ); goto on_error; } ( (pypff_item_t *) item_object )->item = sub_item; return( item_object ); on_error: if( sub_item != NULL ) { libpff_item_free( &sub_item, NULL ); } return( NULL ); } libpff-20120802/pypff/pypff_message.h0000644000175000017500000000335612005155272014270 00000000000000/* * Python object definition of the message type libpff item * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_MESSAGE_H ) #define _PYPFF_MESSAGE_H #include #include #include "pypff_libcerror.h" #include "pypff_libpff.h" #include "pypff_python.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct pypff_message pypff_message_t; struct pypff_message { /* Python object initialization */ PyObject_HEAD /* The message type libpff item */ libpff_item_t *item; }; extern PyMethodDef pypff_message_object_methods[]; extern PyTypeObject pypff_message_type_object; PyObject *pypff_message_new( PyObject *self ); int pypff_message_init( pypff_message_t *pypff_message ); void pypff_message_free( pypff_message_t *pypff_message ); PyObject *pypff_message_get_subject( pypff_message_t *pypff_message ); PyObject *pypff_message_get_plain_text_body( pypff_message_t *pypff_message ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pypff/Makefile.in0000664000175000017500000011146012006536016013332 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pypff DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pyexecdir)" LTLIBRARIES = $(pyexec_LTLIBRARIES) @HAVE_PYTHON_TRUE@pypff_la_DEPENDENCIES = ../libpff/libpff.la am__pypff_la_SOURCES_DIST = pypff.c pypff.h pypff_codepage.c \ pypff_codepage.h pypff_datetime.c pypff_datetime.h \ pypff_file.c pypff_file.h pypff_file_object_io_handle.c \ pypff_file_object_io_handle.h pypff_folder.c pypff_folder.h \ pypff_item.c pypff_item.h pypff_libbfio.h pypff_libcerror.h \ pypff_libclocale.h pypff_libcstring.h pypff_libpff.h \ pypff_message.c pypff_message.h pypff_python.h @HAVE_PYTHON_TRUE@am_pypff_la_OBJECTS = pypff_la-pypff.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_codepage.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_datetime.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_file.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_file_object_io_handle.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_folder.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_item.lo \ @HAVE_PYTHON_TRUE@ pypff_la-pypff_message.lo pypff_la_OBJECTS = $(am_pypff_la_OBJECTS) pypff_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(pypff_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_PYTHON_TRUE@am_pypff_la_rpath = -rpath $(pyexecdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(pypff_la_SOURCES) DIST_SOURCES = $(am__pypff_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_PYTHON_TRUE@AM_CFLAGS = \ @HAVE_PYTHON_TRUE@ -I$(top_srcdir)/include \ @HAVE_PYTHON_TRUE@ -I$(top_srcdir)/common \ @HAVE_PYTHON_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @LIBBFIO_CPPFLAGS@ \ @HAVE_PYTHON_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_PYTHON_TRUE@pyexec_LTLIBRARIES = pypff.la @HAVE_PYTHON_TRUE@pypff_la_SOURCES = \ @HAVE_PYTHON_TRUE@ pypff.c pypff.h \ @HAVE_PYTHON_TRUE@ pypff_codepage.c pypff_codepage.h \ @HAVE_PYTHON_TRUE@ pypff_datetime.c pypff_datetime.h \ @HAVE_PYTHON_TRUE@ pypff_file.c pypff_file.h \ @HAVE_PYTHON_TRUE@ pypff_file_object_io_handle.c pypff_file_object_io_handle.h \ @HAVE_PYTHON_TRUE@ pypff_folder.c pypff_folder.h \ @HAVE_PYTHON_TRUE@ pypff_item.c pypff_item.h \ @HAVE_PYTHON_TRUE@ pypff_libbfio.h \ @HAVE_PYTHON_TRUE@ pypff_libcerror.h \ @HAVE_PYTHON_TRUE@ pypff_libclocale.h \ @HAVE_PYTHON_TRUE@ pypff_libcstring.h \ @HAVE_PYTHON_TRUE@ pypff_libpff.h \ @HAVE_PYTHON_TRUE@ pypff_message.c pypff_message.h \ @HAVE_PYTHON_TRUE@ pypff_python.h @HAVE_PYTHON_TRUE@pypff_la_LIBADD = \ @HAVE_PYTHON_TRUE@ @LIBCSTRING_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_PYTHON_TRUE@ ../libpff/libpff.la @HAVE_PYTHON_TRUE@pypff_la_CPPFLAGS = $(PYTHON_CPPFLAGS) @HAVE_PYTHON_TRUE@pypff_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pypff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pypff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pyexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pyexecdir)" @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pyexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pyexecdir)"; \ } uninstall-pyexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pyexec_LTLIBRARIES)'; test -n "$(pyexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$f"; \ done clean-pyexecLTLIBRARIES: -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done pypff.la: $(pypff_la_OBJECTS) $(pypff_la_DEPENDENCIES) $(pypff_la_LINK) $(am_pypff_la_rpath) $(pypff_la_OBJECTS) $(pypff_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_codepage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_datetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_file_object_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_folder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pypff_la-pypff_message.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< pypff_la-pypff.lo: pypff.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff.Tpo -c -o pypff_la-pypff.lo `test -f 'pypff.c' || echo '$(srcdir)/'`pypff.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff.Tpo $(DEPDIR)/pypff_la-pypff.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff.c' object='pypff_la-pypff.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff.lo `test -f 'pypff.c' || echo '$(srcdir)/'`pypff.c pypff_la-pypff_codepage.lo: pypff_codepage.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_codepage.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_codepage.Tpo -c -o pypff_la-pypff_codepage.lo `test -f 'pypff_codepage.c' || echo '$(srcdir)/'`pypff_codepage.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_codepage.Tpo $(DEPDIR)/pypff_la-pypff_codepage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_codepage.c' object='pypff_la-pypff_codepage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_codepage.lo `test -f 'pypff_codepage.c' || echo '$(srcdir)/'`pypff_codepage.c pypff_la-pypff_datetime.lo: pypff_datetime.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_datetime.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_datetime.Tpo -c -o pypff_la-pypff_datetime.lo `test -f 'pypff_datetime.c' || echo '$(srcdir)/'`pypff_datetime.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_datetime.Tpo $(DEPDIR)/pypff_la-pypff_datetime.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_datetime.c' object='pypff_la-pypff_datetime.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_datetime.lo `test -f 'pypff_datetime.c' || echo '$(srcdir)/'`pypff_datetime.c pypff_la-pypff_file.lo: pypff_file.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_file.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_file.Tpo -c -o pypff_la-pypff_file.lo `test -f 'pypff_file.c' || echo '$(srcdir)/'`pypff_file.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_file.Tpo $(DEPDIR)/pypff_la-pypff_file.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_file.c' object='pypff_la-pypff_file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_file.lo `test -f 'pypff_file.c' || echo '$(srcdir)/'`pypff_file.c pypff_la-pypff_file_object_io_handle.lo: pypff_file_object_io_handle.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_file_object_io_handle.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_file_object_io_handle.Tpo -c -o pypff_la-pypff_file_object_io_handle.lo `test -f 'pypff_file_object_io_handle.c' || echo '$(srcdir)/'`pypff_file_object_io_handle.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_file_object_io_handle.Tpo $(DEPDIR)/pypff_la-pypff_file_object_io_handle.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_file_object_io_handle.c' object='pypff_la-pypff_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_file_object_io_handle.lo `test -f 'pypff_file_object_io_handle.c' || echo '$(srcdir)/'`pypff_file_object_io_handle.c pypff_la-pypff_folder.lo: pypff_folder.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_folder.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_folder.Tpo -c -o pypff_la-pypff_folder.lo `test -f 'pypff_folder.c' || echo '$(srcdir)/'`pypff_folder.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_folder.Tpo $(DEPDIR)/pypff_la-pypff_folder.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_folder.c' object='pypff_la-pypff_folder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_folder.lo `test -f 'pypff_folder.c' || echo '$(srcdir)/'`pypff_folder.c pypff_la-pypff_item.lo: pypff_item.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_item.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_item.Tpo -c -o pypff_la-pypff_item.lo `test -f 'pypff_item.c' || echo '$(srcdir)/'`pypff_item.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_item.Tpo $(DEPDIR)/pypff_la-pypff_item.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_item.c' object='pypff_la-pypff_item.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_item.lo `test -f 'pypff_item.c' || echo '$(srcdir)/'`pypff_item.c pypff_la-pypff_message.lo: pypff_message.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pypff_la-pypff_message.lo -MD -MP -MF $(DEPDIR)/pypff_la-pypff_message.Tpo -c -o pypff_la-pypff_message.lo `test -f 'pypff_message.c' || echo '$(srcdir)/'`pypff_message.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/pypff_la-pypff_message.Tpo $(DEPDIR)/pypff_la-pypff_message.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pypff_message.c' object='pypff_la-pypff_message.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pypff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pypff_la-pypff_message.lo `test -f 'pypff_message.c' || echo '$(srcdir)/'`pypff_message.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pyexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-pyexecLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pyexecLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pyexecLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-pyexecLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-pyexecLTLIBRARIES @HAVE_PYTHON_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCFILE_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBCPATH_LIBADD@ \ @HAVE_PYTHON_TRUE@ @LIBBFIO_LIBADD@ distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/pypff/pypff_file_object_io_handle.c0000644000175000017500000010657212005155272017112 00000000000000/* * Python file object IO handle functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "pypff_file_object_io_handle.h" #include "pypff_libbfio.h" #include "pypff_libcerror.h" #include "pypff_libcstring.h" #include "pypff_python.h" /* Initializes the file object IO handle * Returns 1 if successful or -1 on error */ int pypff_file_object_io_handle_initialize( pypff_file_object_io_handle_t **file_object_io_handle, PyObject *file_object, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_initialize"; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( *file_object_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file object IO handle value already set.", function ); return( -1 ); } if( file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object.", function ); return( -1 ); } *file_object_io_handle = memory_allocate_structure( pypff_file_object_io_handle_t ); if( *file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file object IO handle.", function ); goto on_error; } if( memory_set( *file_object_io_handle, 0, sizeof( pypff_file_object_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file object IO handle.", function ); goto on_error; } ( *file_object_io_handle )->file_object = file_object; Py_IncRef( ( *file_object_io_handle )->file_object ); return( 1 ); on_error: if( *file_object_io_handle != NULL ) { memory_free( *file_object_io_handle ); *file_object_io_handle = NULL; } return( -1 ); } /* Initializes the file object IO handle * Returns 1 if successful or -1 on error */ int pypff_file_object_initialize( libbfio_handle_t **handle, PyObject *file_object, libcerror_error_t **error ) { pypff_file_object_io_handle_t *file_object_io_handle = NULL; static char *function = "pypff_file_object_initialize"; if( handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid handle.", function ); return( -1 ); } if( *handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid handle value already set.", function ); return( -1 ); } if( pypff_file_object_io_handle_initialize( &file_object_io_handle, file_object, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file object IO handle.", function ); goto on_error; } if( libbfio_handle_initialize( handle, (intptr_t *) file_object_io_handle, (int (*)(intptr_t **, libcerror_error_t **)) pypff_file_object_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) pypff_file_object_io_handle_clone, (int (*)(intptr_t *, int, libcerror_error_t **)) pypff_file_object_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) pypff_file_object_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) pypff_file_object_io_handle_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) pypff_file_object_io_handle_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) pypff_file_object_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) pypff_file_object_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) pypff_file_object_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) pypff_file_object_io_handle_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create handle.", function ); goto on_error; } return( 1 ); on_error: if( file_object_io_handle != NULL ) { pypff_file_object_io_handle_free( &file_object_io_handle, NULL ); } return( -1 ); } /* Frees the file object IO handle and its attributes * Returns 1 if succesful or -1 on error */ int pypff_file_object_io_handle_free( pypff_file_object_io_handle_t **file_object_io_handle, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_free"; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( *file_object_io_handle != NULL ) { Py_DecRef( ( *file_object_io_handle )->file_object ); memory_free( *file_object_io_handle ); *file_object_io_handle = NULL; } return( 1 ); } /* Clones (duplicates) the file object IO handle and its attributes * Returns 1 if succesful or -1 on error */ int pypff_file_object_io_handle_clone( pypff_file_object_io_handle_t **destination_file_object_io_handle, pypff_file_object_io_handle_t *source_file_object_io_handle, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_clone"; if( destination_file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination file object IO handle.", function ); return( -1 ); } if( *destination_file_object_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination file object IO handle already set.", function ); return( -1 ); } if( source_file_object_io_handle == NULL ) { *destination_file_object_io_handle = NULL; return( 1 ); } if( pypff_file_object_io_handle_initialize( destination_file_object_io_handle, source_file_object_io_handle->file_object, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file object IO handle.", function ); return( -1 ); } if( *destination_file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination file object IO handle.", function ); return( -1 ); } return( 1 ); } /* Opens the file object IO handle * Returns 1 if successful or -1 on error */ int pypff_file_object_io_handle_open( pypff_file_object_io_handle_t *file_object_io_handle, int access_flags, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_open"; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( file_object_io_handle->file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file object IO handle - missing file object.", function ); return( -1 ); } if( ( ( access_flags & LIBBFIO_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags.", function ); return( -1 ); } if( ( access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: write access currently not supported.", function ); return( -1 ); } /* No need to do anything here, because the file object is already open */ file_object_io_handle->access_flags = access_flags; return( 1 ); } /* Closes the file object IO handle * Returns 0 if successful or -1 on error */ int pypff_file_object_io_handle_close( pypff_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_close"; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( file_object_io_handle->file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file object IO handle - missing file object.", function ); return( -1 ); } /* Do not close the file object, have Python deal with it */ file_object_io_handle->access_flags = 0; return( 0 ); } /* Reads a buffer from the file object * Make sure to hold the GIL state before calling this function * Returns the number of bytes read if successful, or -1 on error */ ssize_t pypff_file_object_read_buffer( PyObject *file_object, uint8_t *buffer, size_t size, libcerror_error_t **error ) { PyObject *argument_size = NULL; PyObject *exception_string = NULL; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; char *error_string = NULL; char *safe_buffer = NULL; static char *function = "pypff_file_object_read_buffer"; Py_ssize_t safe_read_count = 0; ssize_t read_count = 0; int result = 0; if( file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( size > 0 ) { method_name = PyString_FromString( "read" ); argument_size = PyLong_FromSize_t( size ); PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, argument_size, NULL ); if( PyErr_Occurred() ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object.", function ); } Py_DecRef( exception_string ); goto on_error; } result = PyString_AsStringAndSize( method_result, &safe_buffer, &safe_read_count ); if( result == -1 ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object.", function ); } Py_DecRef( exception_string ); goto on_error; } if( safe_read_count > (Py_ssize_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid read count value exceeds maximum.", function ); goto on_error; } read_count = (ssize_t) safe_read_count; if( memory_copy( buffer, safe_buffer, read_count ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to data to buffer.", function ); goto on_error; } Py_DecRef( method_result ); Py_DecRef( argument_size ); Py_DecRef( method_name ); } return( read_count ); on_error: if( method_result != NULL ) { Py_DecRef( method_result ); } if( argument_size != NULL ) { Py_DecRef( argument_size ); } if( method_name != NULL ) { Py_DecRef( method_name ); } return( -1 ); } /* Reads a buffer from the file object IO handle * Returns the number of bytes read if successful, or -1 on error */ ssize_t pypff_file_object_io_handle_read( pypff_file_object_io_handle_t *file_object_io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_read"; PyGILState_STATE gil_state = 0; ssize_t read_count = 0; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } gil_state = PyGILState_Ensure(); read_count = pypff_file_object_read_buffer( file_object_io_handle->file_object, buffer, size, error ); if( read_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file object.", function ); goto on_error; } PyGILState_Release( gil_state ); return( read_count ); on_error: PyGILState_Release( gil_state ); return( -1 ); } /* Writes a buffer to the file object * Make sure to hold the GIL state before calling this function * Returns the number of bytes written if successful, or -1 on error */ ssize_t pypff_file_object_write_buffer( PyObject *file_object, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { PyObject *argument_string = NULL; PyObject *exception_string = NULL; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; char *error_string = NULL; static char *function = "pypff_file_object_write_buffer"; ssize_t write_count = 0; if( file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( size > 0 ) { method_name = PyString_FromString( "write" ); /* TODO set up argument_string */ write_count = (ssize_t) size; PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, argument_string, NULL ); if( PyErr_Occurred() ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write from file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write from file object.", function ); } Py_DecRef( exception_string ); goto on_error; } Py_DecRef( method_result ); Py_DecRef( argument_string ); Py_DecRef( method_name ); } return( write_count ); on_error: if( method_result != NULL ) { Py_DecRef( method_result ); } if( argument_string != NULL ) { Py_DecRef( argument_string ); } if( method_name != NULL ) { Py_DecRef( method_name ); } return( -1 ); } /* Writes a buffer to the file object IO handle * Returns the number of bytes written if successful, or -1 on error */ ssize_t pypff_file_object_io_handle_write( pypff_file_object_io_handle_t *file_object_io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_write"; PyGILState_STATE gil_state = 0; ssize_t write_count = 0; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } gil_state = PyGILState_Ensure(); write_count = pypff_file_object_write_buffer( file_object_io_handle->file_object, buffer, size, error ); if( write_count == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write from file object.", function ); goto on_error; } PyGILState_Release( gil_state ); return( write_count ); on_error: PyGILState_Release( gil_state ); return( -1 ); } /* Seeks a certain offset within the file object * Make sure to hold the GIL state before calling this function * Returns 1 if successful or -1 on error */ int pypff_file_object_seek_offset( PyObject *file_object, off64_t offset, int whence, libcerror_error_t **error ) { PyObject *argument_offset = NULL; PyObject *argument_whence = NULL; PyObject *exception_string = NULL; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; char *error_string = NULL; static char *function = "pypff_file_object_seek_offset"; if( file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object.", function ); return( -1 ); } if( offset > (off64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } method_name = PyString_FromString( "seek" ); argument_offset = PyLong_FromLongLong( (PY_LONG_LONG) offset ); argument_whence = PyInt_FromLong( (long) whence ); PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, argument_offset, argument_whence, NULL ); if( PyErr_Occurred() ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek in file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek in file object.", function ); } Py_DecRef( exception_string ); goto on_error; } Py_DecRef( method_result ); Py_DecRef( argument_whence ); Py_DecRef( argument_offset ); Py_DecRef( method_name ); return( 1 ); on_error: if( method_result != NULL ) { Py_DecRef( method_result ); } if( argument_whence != NULL ) { Py_DecRef( argument_whence ); } if( argument_offset != NULL ) { Py_DecRef( argument_offset ); } if( method_name != NULL ) { Py_DecRef( method_name ); } return( -1 ); } /* Retrieves the current offset within the file object * Make sure to hold the GIL state before calling this function * Returns 1 if successful or -1 on error */ int pypff_file_object_get_offset( PyObject *file_object, off64_t *offset, libcerror_error_t **error ) { PyObject *exception_string = NULL; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; char *error_string = NULL; static char *function = "pypff_file_object_get_offset"; PY_LONG_LONG safe_offset = 0; int result = 0; if( file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } method_name = PyString_FromString( "get_offset" ); PyErr_Clear(); /* Determine if the file object has the get_offset method */ result = PyObject_HasAttr( file_object, method_name ); if( result == 0 ) { Py_DecRef( method_name ); /* Fall back to the tell method */ method_name = PyString_FromString( "tell" ); } PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, NULL ); if( PyErr_Occurred() ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset in file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset in file object.", function ); } Py_DecRef( exception_string ); goto on_error; } PyErr_Clear(); safe_offset = PyLong_AsLong( method_result ); if( safe_offset == -1 ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset in file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset in file object.", function ); } Py_DecRef( exception_string ); goto on_error; } if( safe_offset > (PY_LONG_LONG) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); goto on_error; } *offset = (off64_t) safe_offset; Py_DecRef( method_result ); Py_DecRef( method_name ); return( 1 ); on_error: if( method_result != NULL ) { Py_DecRef( method_result ); } if( method_name != NULL ) { Py_DecRef( method_name ); } return( -1 ); } /* Seeks a certain offset within the file object IO handle * Returns the offset if the seek is successful or -1 on error */ off64_t pypff_file_object_io_handle_seek_offset( pypff_file_object_io_handle_t *file_object_io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_seek_offset"; PyGILState_STATE gil_state = 0; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } gil_state = PyGILState_Ensure(); if( pypff_file_object_seek_offset( file_object_io_handle->file_object, offset, whence, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek in file object.", function ); goto on_error; } if( pypff_file_object_get_offset( file_object_io_handle->file_object, &offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to retrieve current offset in file object.", function ); goto on_error; } PyGILState_Release( gil_state ); return( offset ); on_error: PyGILState_Release( gil_state ); return( -1 ); } /* Function to determine if a file exists * Returns 1 if file exists, 0 if not or -1 on error */ int pypff_file_object_io_handle_exists( pypff_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_exists"; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( file_object_io_handle->file_object == NULL ) { return( 0 ); } return( 1 ); } /* Check if the file is open * Returns 1 if open, 0 if not or -1 on error */ int pypff_file_object_io_handle_is_open( pypff_file_object_io_handle_t *file_object_io_handle, libcerror_error_t **error ) { static char *function = "pypff_file_object_io_handle_is_open"; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( file_object_io_handle->file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file object IO handle - missing file object.", function ); return( -1 ); } /* As far as BFIO is concerned the file object is always open */ return( 1 ); } /* Retrieves the size of the file object * Make sure to hold the GIL state before calling this function * Returns 1 if successful or -1 on error */ int pypff_file_object_get_size( PyObject *file_object, size64_t *size, libcerror_error_t **error ) { PyObject *exception_string = NULL; PyObject *exception_traceback = NULL; PyObject *exception_type = NULL; PyObject *exception_value = NULL; PyObject *method_name = NULL; PyObject *method_result = NULL; char *error_string = NULL; static char *function = "pypff_file_object_get_size"; PY_LONG_LONG safe_size = 0; if( file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } method_name = PyString_FromString( "get_size" ); PyErr_Clear(); method_result = PyObject_CallMethodObjArgs( file_object, method_name, NULL ); if( PyErr_Occurred() ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file object.", function ); } Py_DecRef( exception_string ); goto on_error; } PyErr_Clear(); safe_size = PyLong_AsUnsignedLong( method_result ); if( safe_size == -1 ) { PyErr_Fetch( &exception_type, &exception_value, &exception_traceback ); exception_string = PyObject_Repr( exception_value ); error_string = PyString_AsString( exception_string ); if( error_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file object with error: %s.", function, error_string ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of in file object.", function ); } Py_DecRef( exception_string ); goto on_error; } if( safe_size > (PY_LONG_LONG) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); goto on_error; } *size = (size64_t) safe_size; Py_DecRef( method_result ); Py_DecRef( method_name ); return( 1 ); on_error: if( method_result != NULL ) { Py_DecRef( method_result ); } if( method_name != NULL ) { Py_DecRef( method_name ); } return( -1 ); } /* Retrieves the file size * Returns 1 if successful or -1 on error */ int pypff_file_object_io_handle_get_size( pypff_file_object_io_handle_t *file_object_io_handle, size64_t *size, libcerror_error_t **error ) { PyObject *method_name = NULL; static char *function = "pypff_file_object_io_handle_get_size"; off64_t current_offset = 0; PyGILState_STATE gil_state = 0; int result = 0; if( file_object_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file object IO handle.", function ); return( -1 ); } if( file_object_io_handle->file_object == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file object IO handle - missing file object.", function ); return( -1 ); } gil_state = PyGILState_Ensure(); method_name = PyString_FromString( "get_size" ); PyErr_Clear(); /* Determine if the file object has the get_size method */ result = PyObject_HasAttr( file_object_io_handle->file_object, method_name ); if( result != 0 ) { if( pypff_file_object_get_size( file_object_io_handle->file_object, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size of file object.", function ); goto on_error; } } else { if( pypff_file_object_get_offset( file_object_io_handle->file_object, ¤t_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset in file object.", function ); goto on_error; } if( pypff_file_object_seek_offset( file_object_io_handle->file_object, 0, SEEK_END, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek end of file object.", function ); goto on_error; } if( pypff_file_object_get_offset( file_object_io_handle->file_object, (off64_t *) size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve end offset in file object.", function ); pypff_file_object_seek_offset( file_object_io_handle->file_object, current_offset, SEEK_SET, NULL ); goto on_error; } if( pypff_file_object_seek_offset( file_object_io_handle->file_object, current_offset, SEEK_SET, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek current offset in file object.", function ); goto on_error; } } Py_DecRef( method_name ); PyGILState_Release( gil_state ); return( 1 ); on_error: if( method_name != NULL ) { Py_DecRef( method_name ); } PyGILState_Release( gil_state ); return( 1 ); } libpff-20120802/pypff/pypff_libclocale.h0000644000175000017500000000254012005155272014727 00000000000000/* * The internal libclocale header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_LIBCLOCALE_H ) #define _PYPFF_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pypff/pypff_libcerror.h0000644000175000017500000000251512005155272014623 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PYPFF_LIBCERROR_H ) #define _PYPFF_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pypff/pypff.c0000644000175000017500000001400412005155272012547 00000000000000/* * Python bindings module for libpff (pypff) * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include "pypff.h" #include "pypff_file.h" #include "pypff_folder.h" #include "pypff_item.h" #include "pypff_libcerror.h" #include "pypff_libcstring.h" #include "pypff_libpff.h" #include "pypff_message.h" #include "pypff_python.h" /* The pypff module methods */ PyMethodDef pypff_module_methods[] = { { "get_version", (PyCFunction) pypff_get_version, METH_NOARGS, "Retrieves the version" }, { "get_access_flags_read", (PyCFunction) pypff_get_access_flags_read, METH_NOARGS, "Retrieves the read access flags" }, { "check_file_signature", (PyCFunction) pypff_check_file_signature, METH_VARARGS | METH_KEYWORDS, "Checks if a file has a Personal Folder Format (PFF) signature" }, { "open", (PyCFunction) pypff_file_new_open, METH_VARARGS | METH_KEYWORDS, "Creates a new file and opens it" }, /* Sentinel */ { NULL, NULL, 0, NULL} }; /* Retrieves the pypff/libpff version * Returns a Python object if successful or NULL on error */ PyObject *pypff_get_version( PyObject *self ) { const char *errors = NULL; const char *version_string = NULL; size_t version_string_length = 0; version_string = libpff_get_version(); version_string_length = libcstring_narrow_string_length( version_string ); /* Pass the string length to PyUnicode_DecodeUTF8 * otherwise it makes the end of string character is part * of the string */ return( PyUnicode_DecodeUTF8( version_string, (Py_ssize_t) version_string_length, errors ) ); } /* Retrieves the pypff/libpff read access flags * Returns a Python object if successful or NULL on error */ PyObject *pypff_get_access_flags_read( PyObject *self ) { return( PyInt_FromLong( (long) libpff_get_access_flags_read() ) ); } /* Checks if the file has a Personal Folder File signature * Returns a Python object if successful or NULL on error */ PyObject *pypff_check_file_signature( PyObject *self, PyObject *arguments, PyObject *keywords ) { char error_string[ PYPFF_ERROR_STRING_SIZE ]; libcerror_error_t *error = NULL; static char *function = "pypff_check_file_signature"; static char *keyword_list[] = { "filename", NULL }; const char *filename = NULL; int result = 0; if( PyArg_ParseTupleAndKeywords( arguments, keywords, "|s", keyword_list, &filename ) == 0 ) { return( NULL ); } result = libpff_check_file_signature( filename, &error ); if( result == -1 ) { if( libcerror_error_backtrace_sprint( error, error_string, PYPFF_ERROR_STRING_SIZE ) == -1 ) { PyErr_Format( PyExc_IOError, "%s: unable to check file signature.", function ); } else { PyErr_Format( PyExc_IOError, "%s: unable to check file signature.\n%s", function, error_string ); } libcerror_error_free( &error ); return( NULL ); } if( result != 0 ) { return( Py_True ); } return( Py_False ); } /* Declarations for DLL import/export */ #ifndef PyMODINIT_FUNC #define PyMODINIT_FUNC void #endif /* Initializes the pypff module */ PyMODINIT_FUNC initpypff( void ) { PyObject *module = NULL; PyTypeObject *file_type_object = NULL; PyTypeObject *folder_type_object = NULL; PyTypeObject *item_type_object = NULL; PyTypeObject *message_type_object = NULL; PyGILState_STATE gil_state = 0; PyEval_InitThreads(); gil_state = PyGILState_Ensure(); /* Create the module */ module = Py_InitModule3( "pypff", pypff_module_methods, "Python libpff module (pypff)." ); /* Setup the file type object */ pypff_file_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pypff_file_type_object ) < 0 ) { return; } Py_IncRef( (PyObject *) &pypff_file_type_object ); file_type_object = &pypff_file_type_object; PyModule_AddObject( module, "file", (PyObject *) file_type_object ); /* Setup the folder type object */ pypff_folder_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pypff_folder_type_object ) < 0 ) { return; } Py_IncRef( (PyObject *) &pypff_folder_type_object ); folder_type_object = &pypff_folder_type_object; PyModule_AddObject( module, "folder", (PyObject *) folder_type_object ); /* Setup the item type object */ pypff_item_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pypff_item_type_object ) < 0 ) { return; } Py_IncRef( (PyObject *) &pypff_item_type_object ); item_type_object = &pypff_item_type_object; PyModule_AddObject( module, "item", (PyObject *) item_type_object ); /* Setup the message type object */ pypff_message_type_object.tp_new = PyType_GenericNew; if( PyType_Ready( &pypff_message_type_object ) < 0 ) { return; } Py_IncRef( (PyObject *) &pypff_message_type_object ); message_type_object = &pypff_message_type_object; PyModule_AddObject( module, "message", (PyObject *) message_type_object ); PyGILState_Release( gil_state ); } libpff-20120802/INSTALL0000644000175000017500000003633212006536016011174 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libpff-20120802/dpkg/0000775000175000017500000000000012006536212011141 500000000000000libpff-20120802/dpkg/libpff.docs0000644000175000017500000000003412005155773013200 00000000000000AUTHORS COPYING NEWS README libpff-20120802/dpkg/changelog.in0000644000175000017500000000016312005155773013346 00000000000000libpff (@VERSION@-1) unstable; urgency=low * Initial release -- Joachim Metz @DATE@ libpff-20120802/dpkg/changelog0000664000175000017500000000021312006536127012734 00000000000000libpff (20120802-1) unstable; urgency=low * Initial release -- Joachim Metz Thu, 02 Aug 2012 19:43:49 +0200 libpff-20120802/dpkg/libpff-dev.docs0000644000175000017500000000012012005155773013750 00000000000000AUTHORS COPYING NEWS README README.dll README.macosx README.mingw README.static libpff-20120802/dpkg/libpff-tools.docs0000644000175000017500000000003412005155773014336 00000000000000AUTHORS COPYING NEWS README libpff-20120802/dpkg/copyright0000664000175000017500000000254212006536127013024 00000000000000This work was packaged for Debian by: Joachim Metz on Thu, 02 Aug 2012 19:43:49 +0200 It was downloaded from http://code.google.com/p/libpff/ Upstream Author(s): Joachim Metz Copyright: Copyright (C) 2008-2012, Joachim Metz License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-3'. The Debian packaging is: Copyright (C) 2008-2012, Joachim Metz and is licensed under the GPL version 3, see `/usr/share/common-licenses/GPL-3'. libpff-20120802/dpkg/rules0000754000175000017500000000461712005155773012156 00000000000000#!/usr/bin/make -f # debian/rules that uses debhelper >= 7. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS %: dh $@ install_libpff: # Set up libpff package directories and files mkdir -p debian/libpff/usr/lib install -p -m755 debian/tmp/usr/lib/lib*.so.* debian/libpff/usr/lib install_libpff_dev: # Set up libpff-dev package directories and files mkdir -p debian/libpff-dev/usr/include mkdir -p debian/libpff-dev/usr/include/libpff mkdir -p debian/libpff-dev/usr/lib mkdir -p debian/libpff-dev/usr/lib/pkgconfig mkdir -p debian/libpff-dev/usr/share/man/man3 install -p -m755 debian/tmp/usr/include/*.h debian/libpff-dev/usr/include install -p -m755 debian/tmp/usr/include/libpff/*.h debian/libpff-dev/usr/include/libpff install -p -m755 debian/tmp/usr/lib/*.la debian/libpff-dev/usr/lib install -p -m755 debian/tmp/usr/lib/lib*.a debian/libpff-dev/usr/lib install -p -m755 debian/tmp/usr/lib/lib*.so debian/libpff-dev/usr/lib install -p -m755 debian/tmp/usr/lib/pkgconfig/* debian/libpff-dev/usr/lib/pkgconfig install -p -m755 debian/tmp/usr/share/man/man3/* debian/libpff-dev/usr/share/man/man3 install_libpff_tools: # Set up libpff-tools package directories and files mkdir -p debian/libpff-tools/usr/bin mkdir -p debian/libpff-tools/usr/share/man/man1 install -p -m755 debian/tmp/usr/bin/* debian/libpff-tools/usr/bin install -p -m755 debian/tmp/usr/share/man/man1/* debian/libpff-tools/usr/share/man/man1 install_libpff_python: # Set up libpff-python package directories and files mkdir -p debian/libpff-python/usr/lib/python2.6/dist-packages/ install -p -m775 debian/tmp/usr/lib/python2.6/dist-packages/pypff.* debian/libpff-python/usr/lib/python2.6/dist-packages/ override_dh_auto_configure: dh_auto_configure -- --enable-python override_dh_auto_test: override_dh_installinit: install_libpff install_libpff_dev install_libpff_tools install_libpff_python override_dh_installmenu: override_dh_installmime: override_dh_installmodules: override_dh_installlogcheck: override_dh_installlogrotate: override_dh_installpam: override_dh_installppp: override_dh_installudev: override_dh_installwm: override_dh_installxfonts: override_dh_gconf: override_dh_icons: override_dh_perl: override_dh_shlibdeps: dh_shlibdeps -Llibpff -l${PWD}/debian/tmp/usr/lib override_dh_makeshlibs: dh_makeshlibs -Xlibpff-dev libpff-20120802/dpkg/compat0000644000175000017500000000000212005155773012265 000000000000007 libpff-20120802/dpkg/control0000644000175000017500000000233212005155773012472 00000000000000Source: libpff Section: unknown Priority: extra Maintainer: Joachim Metz Build-Depends: debhelper (>= 7), autotools-dev Standards-Version: 3.8.3 Homepage: http://code.google.com/p/libpff/ Package: libpff Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. libpff is a library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. Package: libpff-dev Section: libdevel Architecture: any Depends: libpff (= ${Source-Version}) Description: Header files and libraries for developing applications for libpff Header files and libraries for developing applications for libpff. Package: libpff-tools Section: utils Architecture: any Depends: libpff (= ${Source-Version}), ${shlibs:Depends} Description: Several tools for reading Personal Folder Files (OST, PAB and PST) Several tools for reading Personal Folder Files (OST, PAB and PST) libpff-20120802/dpkg/copyright.in0000644000175000017500000000251112005156041013413 00000000000000This work was packaged for Debian by: Joachim Metz on @DATE@ It was downloaded from http://code.google.com/p/libpff/ Upstream Author(s): Joachim Metz Copyright: Copyright (C) 2008-2012, Joachim Metz License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU Lesser General Public License can be found in `/usr/share/common-licenses/LGPL-3'. The Debian packaging is: Copyright (C) 2008-2012, Joachim Metz and is licensed under the GPL version 3, see `/usr/share/common-licenses/GPL-3'. libpff-20120802/examples/0000775000175000017500000000000012006536214012034 500000000000000libpff-20120802/examples/Makefile.am0000644000175000017500000000052111450560020013776 00000000000000JPFF_EXAMPLES = \ jpff/Load.java \ jpff/OpenClose.java LIBPFF_EXAMPLES = \ libpff/open_close.c PYPFF_EXAMPLES = \ pypff/folders.py \ pypff/messages.py \ pypff/open_close.py EXTRA_DIST = \ $(JPFF_EXAMPLES) \ $(LIBPFF_EXAMPLES) \ $(PYPFF_EXAMPLES) MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/examples/pypff/0000775000175000017500000000000012006536214013160 500000000000000libpff-20120802/examples/pypff/folders.py0000754000175000017500000000344312005155763015121 00000000000000#! /usr/bin/env python # # Python script to iterate the folder hierarchy in a Personal Folder File using pypff # # Author: Joachim Metz # Creation date: July 24, 2010 # Modification date: October 14, 2010 # __author__ = "Joachim Metz" __version__ = "20101014" __date__ = "Oct 14, 2010" __copyright__ = "Copyright (c) 2010, Joachim Metz " __license__ = "GNU LGPL version 3" import sys import pypff # ---------------------------------------------------------------------------- # Functions # ---------------------------------------------------------------------------- def print_folder( folder, level ): if folder == None: print "Missing folder object." sys.exit( 1 ) for sub_folder_index in range( 0, folder.get_number_of_sub_folders() ): sub_folder = folder.get_sub_folder( sub_folder_index ) for level_iterator in range( 0, level ): print " ", name = sub_folder.get_name() if name != None: print name.encode( "utf8" ) print_folder( sub_folder, level + 1 ) # ---------------------------------------------------------------------------- # Main # ---------------------------------------------------------------------------- print "folders.py " + __version__ + " (libpff " + pypff.get_version() + ")\n" if len( sys.argv ) != 2: print "Usage: folders.py filename." sys.exit( 1 ) file = pypff.new_file(); if file == None: print "Missing file object." print sys.exc_info()[ 1 ] sys.exit( 1 ) try: file.open( sys.argv[ 1 ], pypff.get_access_flags_read() ) except: print "Unable to open file." print sys.exc_info()[ 1 ] sys.exit( 1 ) print_folder( file.get_root_folder(), 0 ) print "" try: file.close() except: print "Unable to close file." print sys.exc_info()[ 1 ] sys.exit( 1 ) sys.exit( 0 ) libpff-20120802/examples/pypff/open_close.py0000754000175000017500000000215012005155763015603 00000000000000#! /usr/bin/env python # # Python sccript to open and close a Personal Folder File using pypff # # Author: Joachim Metz # Creation date: July 24, 2010 # Modification date: October 14, 2010 # __author__ = "Joachim Metz" __version__ = "20101014" __date__ = "Oct 14, 2010" __copyright__ = "Copyright (c) 2010, Joachim Metz " __license__ = "GNU LGPL version 3" import sys import pypff # ---------------------------------------------------------------------------- # Main # ---------------------------------------------------------------------------- print "open_close.py " + __version__ + " (libpff " + pypff.get_version() + ")\n" if len( sys.argv ) != 2: print "Usage: open_close.py filename\n" sys.exit( 1 ) file = pypff.new_file(); if file == None: print "Missing file object\n" sys.exit( 1 ) try: file.open( sys.argv[ 1 ], pypff.get_access_flags_read() ) except: print "Unable to open file\n" print sys.exc_info()[ 1 ] sys.exit( 1 ) try: file.close() except: print "Unable to close file\n" print sys.exc_info()[ 1 ] sys.exit( 1 ) sys.exit( 0 ) libpff-20120802/examples/pypff/messages.py0000754000175000017500000000407612005155763015275 00000000000000#! /usr/bin/env python # # Ptyhon script to iterate the messages in a Personal Folder File using pypff # # Author: Joachim Metz # Creation date: July 24, 2010 # Modification date: October 14, 2010 # __author__ = "Joachim Metz" __version__ = "20101014" __date__ = "OCt 14, 2010" __copyright__ = "Copyright (c) 2010, Joachim Metz " __license__ = "GNU LGPL version 3" import sys import pypff # ---------------------------------------------------------------------------- # Functions # ---------------------------------------------------------------------------- def print_folder( folder ): if folder == None: print "Missing folder object." sys.exit( 1 ) for sub_message_index in range( 0, folder.get_number_of_sub_messages() ): print_message( folder.get_sub_message( sub_message_index ) ) for sub_folder_index in range( 0, folder.get_number_of_sub_folders() ): print_folder( folder.get_sub_folder( sub_folder_index ) ) def print_message( message ): if message == None: print "Missing message object." sys.exit( 1 ) subject = message.get_subject() if subject != None: print "Subject: " + subject.encode( "utf8" ) print "" plain_text_body = message.get_plain_text_body() if plain_text_body != None: print plain_text_body.encode( "utf8" ) print "" # ---------------------------------------------------------------------------- # Main # ---------------------------------------------------------------------------- print "messages.py " + __version__ + " (libpff " + pypff.get_version() + ")\n" if len( sys.argv ) != 2: print "Usage: messages.py filename." sys.exit( 1 ) file = pypff.new_file(); if file == None: print "Missing file object." print sys.exc_info()[ 1 ] sys.exit( 1 ) try: file.open( sys.argv[ 1 ], pypff.get_access_flags_read() ) except: print "Unable to open file." print sys.exc_info()[ 1 ] sys.exit( 1 ) print_folder( file.get_root_folder() ) print "" try: file.close() except: print "Unable to close file." print sys.exc_info()[ 1 ] sys.exit( 1 ) sys.exit( 0 ) libpff-20120802/examples/jpff/0000775000175000017500000000000012006536214012761 500000000000000libpff-20120802/examples/jpff/Load.java0000644000175000017500000000240412005155753014425 00000000000000/* * Java application to load jpff * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ public class Load { public static void main( String args[] ) { try { System.loadLibrary( "jpff" ); } catch( UnsatisfiedLinkError exception ) { System.err.println( "Failed to load: jpff with exception: " + exception + "\n" ); System.err.println( "java.library.path: " + System.getProperty( "java.library.path" ) + "\n" ); System.exit( 1 ); } System.out.println( "jpff loaded successfully.\n" ); System.exit( 0 ); } } libpff-20120802/examples/jpff/OpenClose.java0000644000175000017500000000302312005155753015433 00000000000000/* * Java application to open and close a Personal Folder File using jpff * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ import jpff.File; public class OpenClose { public static void main( String args[] ) { if( args.length != 1 ) { System.err.println( "Usage: OpenClose filename\n" ); System.exit( 1 ); } jpff.File file = new jpff.File(); try { // TODO replace 1 by descriptive definition file.open( args[ 0 ], 1 ); } catch( Exception exception ) { System.err.println( "Unable to open file with exception: " + exception + ".\n" ); System.exit( 1 ); } try { file.close(); } catch( Exception exception ) { System.err.println( "Unable to close file with exception: " + exception + ".\n" ); System.exit( 1 ); } System.exit( 0 ); } } libpff-20120802/examples/libpff/0000775000175000017500000000000012006536214013276 500000000000000libpff-20120802/examples/libpff/open_close.c0000644000175000017500000000444412005155757015524 00000000000000/* * C application to open and close a Personal Folder File using libpff * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include int main( int argc, char * const argv[] ) { libpff_error_t *error = NULL; libpff_file_t *file = NULL; if( argc != 2 ) { fprintf( stderr, "Usage: ./open_close filename\n" ); return( EXIT_FAILURE ); } /* The function will return 1 if successful or -1 on error. * On error the error 'object' is created by the library. * * file must refer to NULL to create a new libpff file 'object'. * * If error is NULL e.g. libpff_file_initialize( &file, NULL ) * no error 'object' is created * * The error 'object' can be freed by libpff_error_free() */ if( libpff_file_initialize( &file, &error ) != 1 ) { fprintf( stderr, "Unable to initialize file.\n" ); goto exit_failure; } if( libpff_file_open( file, argv[ 1 ], LIBPFF_OPEN_READ, &error ) != 1 ) { fprintf( stderr, "Unable to open file.\n" ); goto exit_failure_free_file; } if( libpff_file_close( file, &error ) != 0 ) { fprintf( stderr, "Unable to close file.\n" ); goto exit_failure_free_file; } if( libpff_file_free( &file, &error ) != 1 ) { fprintf( stderr, "Unable to free file.\n" ); goto exit_failure; } return( EXIT_SUCCESS ); exit_failure_free_file: libpff_file_free( &file, NULL ); exit_failure: libpff_error_backtrace_fprint( error, stderr ); libpff_error_free( &error ); return( EXIT_FAILURE ); } libpff-20120802/examples/Makefile.in0000664000175000017500000004642612006536015014034 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ JPFF_EXAMPLES = \ jpff/Load.java \ jpff/OpenClose.java LIBPFF_EXAMPLES = \ libpff/open_close.c PYPFF_EXAMPLES = \ pypff/folders.py \ pypff/messages.py \ pypff/open_close.py EXTRA_DIST = \ $(JPFF_EXAMPLES) \ $(LIBPFF_EXAMPLES) \ $(PYPFF_EXAMPLES) MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfdatetime/0000775000175000017500000000000012006536213012646 500000000000000libpff-20120802/libfdatetime/libfdatetime_support.c0000644000175000017500000000220412005153134017147 00000000000000/* * Support functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_support.h" #if !defined( HAVE_LOCAL_LIBFDATETIME ) /* Returns the library version as a string */ const char *libfdatetime_get_version( void ) { return( (const char *) LIBFDATETIME_VERSION_STRING ); } #endif libpff-20120802/libfdatetime/libfdatetime_systemtime.h0000644000175000017500000001006312005153134017645 00000000000000/* * Systemtime functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_SYSTEMTIME_H ) #define _LIBFDATETIME_INTERNAL_SYSTEMTIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_systemtime libfdatetime_internal_systemtime_t; struct libfdatetime_internal_systemtime { /* The year */ uint16_t year; /* The month */ uint16_t month; /* The day of week */ uint16_t day_of_week; /* The day of month */ uint16_t day_of_month; /* The hours */ uint16_t hours; /* The minutes */ uint16_t minutes; /* The seconds */ uint16_t seconds; /* The milli seconds */ uint16_t milli_seconds; }; LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_initialize( libfdatetime_systemtime_t **systemtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_free( libfdatetime_systemtime_t **systemtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_from_byte_stream( libfdatetime_systemtime_t *systemtime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); int libfdatetime_systemtime_copy_to_date_time_values( libfdatetime_internal_systemtime_t *internal_systemtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_get_string_size( libfdatetime_systemtime_t *systemtime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf8_string( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf8_string_with_index( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf16_string( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf16_string_with_index( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf32_string( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_systemtime_copy_to_utf32_string_with_index( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_error.h0000644000175000017500000000340112005153135016572 00000000000000/* * Error functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_ERROR_H ) #define _LIBFDATETIME_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFDATETIME ) #include #endif #include "libfdatetime_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATETIME ) LIBFDATETIME_EXTERN \ void libfdatetime_error_free( libfdatetime_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_error_fprint( libfdatetime_error_t *error, FILE *stream ); LIBFDATETIME_EXTERN \ int libfdatetime_error_sprint( libfdatetime_error_t *error, char *string, size_t size ); LIBFDATETIME_EXTERN \ int libfdatetime_error_backtrace_fprint( libfdatetime_error_t *error, FILE *stream ); LIBFDATETIME_EXTERN \ int libfdatetime_error_backtrace_sprint( libfdatetime_error_t *error, char *string, size_t size ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/Makefile.am0000644000175000017500000000216412005153135014620 00000000000000if HAVE_LOCAL_LIBFDATETIME AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfdatetime.la libfdatetime_la_SOURCES = \ libfdatetime_date_time_values.c libfdatetime_date_time_values.h \ libfdatetime_definitions.h \ libfdatetime_extern.h \ libfdatetime_error.c libfdatetime_error.h \ libfdatetime_fat_date_time.c libfdatetime_fat_date_time.h \ libfdatetime_filetime.c libfdatetime_filetime.h \ libfdatetime_floatingtime.c libfdatetime_floatingtime.h \ libfdatetime_libcerror.h \ libfdatetime_libcstring.h \ libfdatetime_nsf_timedate.c libfdatetime_nsf_timedate.h \ libfdatetime_posix_time.c libfdatetime_posix_time.h \ libfdatetime_support.c libfdatetime_support.h \ libfdatetime_systemtime.c libfdatetime_systemtime.h \ libfdatetime_types.h \ libfdatetime_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) libpff-20120802/libfdatetime/libfdatetime_unused.h0000644000175000017500000000252412005153135016751 00000000000000/* * The internal unused definition * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_UNUSED_H ) #define _LIBFDATETIME_INTERNAL_UNUSED_H #include #if !defined( LIBFDATETIME_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFDATETIME_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFDATETIME_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFDATETIME_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFDATETIME_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libfdatetime/libfdatetime_error.c0000644000175000017500000000513512005153135016573 00000000000000/* * Error functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdatetime_error.h" #include "libfdatetime_libcerror.h" #if !defined( HAVE_LOCAL_LIBFDATETIME ) /* Free an error and its elements */ void libfdatetime_error_free( libfdatetime_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfdatetime_error_fprint( libfdatetime_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libfdatetime_error_sprint( libfdatetime_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfdatetime_error_backtrace_fprint( libfdatetime_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libfdatetime_error_backtrace_sprint( libfdatetime_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif libpff-20120802/libfdatetime/libfdatetime_posix_time.c0000644000175000017500000010253712005153135017626 00000000000000/* * POSIX time functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_posix_time.h" #include "libfdatetime_types.h" /* Initialize a POSIX time * Make sure the value posix_time is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_initialize( libfdatetime_posix_time_t **posix_time, libcerror_error_t **error ) { libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_initialize"; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } if( *posix_time != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid POSIX time value already set.", function ); return( -1 ); } internal_posix_time = memory_allocate_structure( libfdatetime_internal_posix_time_t ); if( internal_posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create POSIX time.", function ); goto on_error; } if( memory_set( internal_posix_time, 0, sizeof( libfdatetime_internal_posix_time_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear POSIX time.", function ); goto on_error; } *posix_time = (libfdatetime_posix_time_t *) internal_posix_time; return( 1 ); on_error: if( internal_posix_time != NULL ) { memory_free( internal_posix_time ); } return( -1 ); } /* Frees a POSIX time * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_free( libfdatetime_posix_time_t **posix_time, libcerror_error_t **error ) { libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_free"; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } if( *posix_time != NULL ) { internal_posix_time = (libfdatetime_internal_posix_time_t *) *posix_time; *posix_time = NULL; memory_free( internal_posix_time ); } return( 1 ); } /* Converts a byte stream into a POSIX time * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_from_byte_stream( libfdatetime_posix_time_t *posix_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, uint8_t value_type, libcerror_error_t **error ) { libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_from_byte_stream"; uint64_t value_64bit = 0; uint8_t is_signed = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFDATETIME_ENDIAN_BIG ) && ( byte_order != LIBFDATETIME_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED ) || ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED ) ) { if( byte_stream_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint32_little_endian( byte_stream, value_64bit ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, value_64bit ); } is_signed = (uint8_t) ( value_64bit >> 31 ); if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffUL ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported timestamp.", function ); return( -1 ); } } else if( ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED ) || ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED ) || ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) || ( value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { if( byte_stream_size < 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint64_little_endian( byte_stream, value_64bit ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint64_big_endian( byte_stream, value_64bit ); } is_signed = (uint8_t) ( value_64bit >> 63 ); if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffffffffffULL ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported timestamp.", function ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } internal_posix_time->timestamp = value_64bit; internal_posix_time->value_type = value_type; return( 1 ); } /* Converts a 32-bit value into a POSIX time * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_from_32bit( libfdatetime_posix_time_t *posix_time, uint32_t value_32bit, uint8_t value_type, libcerror_error_t **error ) { libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_from_32bit"; uint8_t is_signed = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED ) && ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } is_signed = (uint8_t) ( value_32bit >> 31 ); if( ( is_signed != 0 ) && ( ( value_32bit & 0x7fffffffUL ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported timestamp.", function ); return( -1 ); } internal_posix_time->timestamp = (uint64_t) value_32bit; internal_posix_time->value_type = value_type; return( 1 ); } /* Converts a 64-bit value into a POSIX time * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_from_64bit( libfdatetime_posix_time_t *posix_time, uint64_t value_64bit, uint8_t value_type, libcerror_error_t **error ) { libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_from_64bit"; uint8_t is_signed = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED ) && ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED ) && ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) && ( value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } is_signed = (uint8_t) ( value_64bit >> 63 ); if( ( is_signed != 0 ) && ( ( value_64bit & 0x7fffffffffffffffULL ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported timestamp.", function ); return( -1 ); } internal_posix_time->timestamp = value_64bit; internal_posix_time->value_type = value_type; return( 1 ); } /* Converts a POSIX time into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_date_time_values( libfdatetime_internal_posix_time_t *internal_posix_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_date_time_values"; uint64_t posix_timestamp = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; uint8_t is_signed = 0; if( internal_posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal POSIX time.", function ); return( -1 ); } if( ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) && ( internal_posix_time->value_type != LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid internal POSIX time - unsupported value type.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } posix_timestamp = internal_posix_time->timestamp; if( ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED ) ) { is_signed = (uint8_t) ( posix_timestamp >> 31 ); posix_timestamp &= 0x7fffffffUL; } else if( ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { is_signed = (uint8_t) ( posix_timestamp >> 63 ); posix_timestamp &= 0x7fffffffffffffffULL; } if( posix_timestamp == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported timestamp.", function ); return( -1 ); } date_time_values->nano_seconds = 0; if( ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED ) || ( internal_posix_time->value_type == LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED ) ) { /* The timestamp is in units of micro seconds correct the value to seconds */ if( is_signed == 0 ) { date_time_values->micro_seconds = posix_timestamp % 1000; date_time_values->micro_seconds = posix_timestamp % 1000; } else { date_time_values->micro_seconds = 1000 - ( posix_timestamp % 1000 ); } posix_timestamp /= 1000; if( is_signed == 0 ) { date_time_values->milli_seconds = posix_timestamp % 1000; date_time_values->milli_seconds = posix_timestamp % 1000; } else { date_time_values->milli_seconds = 1000 - ( posix_timestamp % 1000 ); } posix_timestamp /= 1000; } else { date_time_values->micro_seconds = 0; date_time_values->milli_seconds = 0; } /* There are 60 seconds in a minute correct the value to minutes */ date_time_values->seconds = posix_timestamp % 60; posix_timestamp /= 60; if( ( is_signed != 0 ) && ( date_time_values->seconds > 0 ) ) { date_time_values->seconds = 60 - date_time_values->seconds; } /* There are 60 minutes in an hour correct the value to hours */ date_time_values->minutes = posix_timestamp % 60; posix_timestamp /= 60; if( ( is_signed != 0 ) && ( date_time_values->minutes > 0 ) ) { date_time_values->minutes = 60 - date_time_values->minutes; } /* There are 24 hours in a day correct the value to days */ date_time_values->hours = posix_timestamp % 24; posix_timestamp /= 24; if( ( is_signed != 0 ) && ( date_time_values->hours > 0 ) ) { date_time_values->hours = 24 - date_time_values->hours; } /* Determine the number of years starting at '1 Jan 1970 00:00:00' * correct the value to days within the year */ if( is_signed == 0 ) { /* Add 1 day to compensate that Jan 1 1970 is represented as 0 */ posix_timestamp += 1; date_time_values->year = 1970; if( posix_timestamp >= 10957 ) { date_time_values->year = 2000; posix_timestamp -= 10957; } } else { /* Remove 1 day to compensate that Jan 1 1970 is represented as 0 */ posix_timestamp -= 1; date_time_values->year = 1969; } while( posix_timestamp > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( posix_timestamp <= days_in_year ) { break; } posix_timestamp -= days_in_year; if( is_signed == 0 ) { date_time_values->year += 1; } else { date_time_values->year -= 1; } } /* Determine the month correct the value to days within the month */ if( is_signed == 0 ) { date_time_values->month = 1; } else { date_time_values->month = 12; } do { /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( posix_timestamp <= days_in_month ) { break; } posix_timestamp -= days_in_month; if( is_signed == 0 ) { date_time_values->month += 1; } else { date_time_values->month -= 1; } } while( posix_timestamp > 0 ); date_time_values->day = (uint8_t) posix_timestamp; /* Determine the day */ if( is_signed != 0 ) { date_time_values->day = days_in_month - date_time_values->day; } return( 1 ); } /* Deterimes the size of the string for the POSIX time * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_get_string_size( libfdatetime_posix_time_t *posix_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_posix_time_get_string_size"; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_posix_time_copy_to_date_time_values( (libfdatetime_internal_posix_time_t *) posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ if( libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } /* Make sure the string can hold the hexadecimal representation * of a POSIX time */ if( *string_size < 13 ) { *string_size = 13; } return( 1 ); } /* Converts the POSIX time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf8_string( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_posix_time_copy_to_utf8_string_with_index( posix_time, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the POSIX time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf8_string_with_index( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( libfdatetime_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 13 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_posix_time->timestamp >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the POSIX time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf16_string( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_posix_time_copy_to_utf16_string_with_index( posix_time, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the POSIX time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf16_string_with_index( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( libfdatetime_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 13 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_posix_time->timestamp >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the POSIX time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf32_string( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_posix_time_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_posix_time_copy_to_utf32_string_with_index( posix_time, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy POSIX time to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the POSIX time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_posix_time_copy_to_utf32_string_with_index( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_posix_time_t *internal_posix_time = NULL; static char *function = "libfdatetime_posix_time_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( posix_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid POSIX time.", function ); return( -1 ); } internal_posix_time = (libfdatetime_internal_posix_time_t *) posix_time; if( libfdatetime_posix_time_copy_to_date_time_values( internal_posix_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 13 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_posix_time->timestamp >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libpff-20120802/libfdatetime/libfdatetime_fat_date_time.h0000644000175000017500000001027512005153135020235 00000000000000/* * FAT date and time functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H ) #define _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_fat_date_time libfdatetime_internal_fat_date_time_t; /* Contains two 16-bit value representing * a date since 1980 * a time in 2 second intervals */ struct libfdatetime_internal_fat_date_time { /* The date part */ uint16_t date; /* The time part */ uint16_t time; }; LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_initialize( libfdatetime_fat_date_time_t **fat_date_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_free( libfdatetime_fat_date_time_t **fat_date_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_from_byte_stream( libfdatetime_fat_date_time_t *fat_date_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_from_uint32( libfdatetime_fat_date_time_t *fat_date_time, uint32_t value_32bit, libcerror_error_t **error ); int libfdatetime_fat_dat_time_copy_to_date_time_values( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_get_string_size( libfdatetime_fat_date_time_t *fat_date_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf8_string( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf8_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf16_string( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf16_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf32_string( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_fat_date_time_copy_to_utf32_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_types.h0000644000175000017500000000424712005153135016616 00000000000000/* * The internal type definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_TYPES_H ) #define _LIBFDATETIME_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime * The definitions in are copied here * for local use of libfdatetime */ #if defined( HAVE_LOCAL_LIBFDATETIME ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfdatetime_fat_date_time {} libfdatetime_fat_date_time_t; typedef struct libfdatetime_fat_date {} libfdatetime_fat_date_t; typedef struct libfdatetime_fat_time {} libfdatetime_fat_time_t; typedef struct libfdatetime_filetime {} libfdatetime_filetime_t; typedef struct libfdatetime_floatingtime {} libfdatetime_floatingtime_t; typedef struct libfdatetime_nsf_timedate {} libfdatetime_nsf_timedate_t; typedef struct libfdatetime_posix_time {} libfdatetime_posix_time_t; typedef struct libfdatetime_systemtime {} libfdatetime_systemtime_t; #else typedef intptr_t libfdatetime_fat_date_time_t; typedef intptr_t libfdatetime_fat_date_t; typedef intptr_t libfdatetime_fat_time_t; typedef intptr_t libfdatetime_filetime_t; typedef intptr_t libfdatetime_floatingtime_t; typedef intptr_t libfdatetime_nsf_timedate_t; typedef intptr_t libfdatetime_posix_time_t; typedef intptr_t libfdatetime_systemtime_t; #endif #endif #endif libpff-20120802/libfdatetime/libfdatetime_floatingtime.c0000644000175000017500000006601412005153135020127 00000000000000/* * Floatingtime functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_floatingtime.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* Initialize a floatingtime * Make sure the value floatingtime is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_initialize( libfdatetime_floatingtime_t **floatingtime, libcerror_error_t **error ) { libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_initialize"; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } if( *floatingtime != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid floatingtime value already set.", function ); return( -1 ); } internal_floatingtime = memory_allocate_structure( libfdatetime_internal_floatingtime_t ); if( internal_floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create floatingtime.", function ); goto on_error; } if( memory_set( internal_floatingtime, 0, sizeof( libfdatetime_internal_floatingtime_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear floatingtime.", function ); goto on_error; } *floatingtime = (libfdatetime_floatingtime_t *) internal_floatingtime; return( 1 ); on_error: if( internal_floatingtime != NULL ) { memory_free( internal_floatingtime ); } return( -1 ); } /* Frees a floatingtime * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_free( libfdatetime_floatingtime_t **floatingtime, libcerror_error_t **error ) { libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_free"; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } if( *floatingtime != NULL ) { internal_floatingtime = (libfdatetime_internal_floatingtime_t *) *floatingtime; *floatingtime = NULL; memory_free( internal_floatingtime ); } return( 1 ); } /* Converts a byte stream into a floatingtime * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_from_byte_stream( libfdatetime_floatingtime_t *floatingtime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_from_byte_stream"; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFDATETIME_ENDIAN_BIG ) && ( byte_order != LIBFDATETIME_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint64_little_endian( byte_stream, internal_floatingtime->timestamp.integer ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint64_big_endian( byte_stream, internal_floatingtime->timestamp.integer ); } return( 1 ); } /* Converts a 64-bit value into a floatingtime * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_from_64bit( libfdatetime_floatingtime_t *floatingtime, uint64_t value_64bit, libcerror_error_t **error ) { libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_from_64bit"; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; internal_floatingtime->timestamp.integer = value_64bit; return( 1 ); } /* Converts a floatingtime into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_date_time_values( libfdatetime_internal_floatingtime_t *internal_floatingtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_date_time_values"; double floatingtimestamp = 0; uint32_t days_in_century = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; if( internal_floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal floatingtime.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } floatingtimestamp = internal_floatingtime->timestamp.floating_point; /* Determine the number of years starting at '30 Dec 1899 00:00:00' * correct the value to days within the year */ date_time_values->year = 1899; if( floatingtimestamp >= 2 ) { date_time_values->year = 1900; floatingtimestamp -= 2; } while( floatingtimestamp > 0 ) { if( ( date_time_values->year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( floatingtimestamp <= days_in_century ) { break; } floatingtimestamp -= days_in_century; date_time_values->year += 100; } while( floatingtimestamp > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( floatingtimestamp <= days_in_year ) { break; } floatingtimestamp -= days_in_year; date_time_values->year += 1; } /* Determine the month correct the value to days within the month */ date_time_values->month = 1; while( floatingtimestamp > 0 ) { /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( floatingtimestamp <= days_in_month ) { break; } floatingtimestamp -= days_in_month; date_time_values->month += 1; } /* Determine the day */ date_time_values->day = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->day; /* There are 24 hours in a day correct the value to hours */ floatingtimestamp *= 24; date_time_values->hours = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->hours; /* There are 60 minutes in an hour correct the value to minutes */ floatingtimestamp *= 60; date_time_values->minutes = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->minutes; /* There are 60 seconds in a minute correct the value to seconds */ floatingtimestamp *= 60; date_time_values->seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->seconds; /* There are 1000 milli seconds in a seconds correct the value to milli seconds */ floatingtimestamp *= 1000; date_time_values->milli_seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->milli_seconds; /* There are 1000 micro seconds in a seconds correct the value to micro seconds */ floatingtimestamp *= 1000; date_time_values->micro_seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->micro_seconds; /* There are 1000 nano seconds in a seconds correct the value to nano seconds */ floatingtimestamp *= 1000; date_time_values->nano_seconds = (uint8_t) floatingtimestamp; floatingtimestamp -= date_time_values->nano_seconds; return( 1 ); } /* Deterimes the size of the string for the floatingtime * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_get_string_size( libfdatetime_floatingtime_t *floatingtime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_floatingtime_get_string_size"; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_floatingtime_copy_to_date_time_values( (libfdatetime_internal_floatingtime_t *) floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ if( libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } /* Make sure the string can hold the hexadecimal representation * of a floatingtime */ if( *string_size < 21 ) { *string_size = 21; } return( 1 ); } /* Converts the floatingtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf8_string( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_floatingtime_copy_to_utf8_string_with_index( floatingtime, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the floatingtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf8_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( libfdatetime_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 24 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 60; do { byte_value = ( internal_floatingtime->timestamp.integer >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the floatingtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf16_string( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_floatingtime_copy_to_utf16_string_with_index( floatingtime, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the floatingtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf16_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( libfdatetime_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 24 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 60; do { byte_value = ( internal_floatingtime->timestamp.integer >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the floatingtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf32_string( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_floatingtime_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_floatingtime_copy_to_utf32_string_with_index( floatingtime, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the floatingtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_floatingtime_copy_to_utf32_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_floatingtime_t *internal_floatingtime = NULL; static char *function = "libfdatetime_floatingtime_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( floatingtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floatingtime.", function ); return( -1 ); } internal_floatingtime = (libfdatetime_internal_floatingtime_t *) floatingtime; if( libfdatetime_floatingtime_copy_to_date_time_values( internal_floatingtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floatingtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 24 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 60; do { byte_value = ( internal_floatingtime->timestamp.integer >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libpff-20120802/libfdatetime/libfdatetime_support.h0000644000175000017500000000223412005153135017160 00000000000000/* * Support functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_SUPPORT_H ) #define _LIBFDATETIME_SUPPORT_H #include #include #include "libfdatetime_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATETIME ) LIBFDATETIME_EXTERN \ const char *libfdatetime_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_extern.h0000644000175000017500000000246412005153135016756 00000000000000/* * The internal extern definition * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_EXTERN_H ) #define _LIBFDATETIME_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if !defined( HAVE_LOCAL_LIBFDATETIME ) /* If libtool DLL support is enabled set LIBFDATETIME_DLL_EXPORT * before including libfdatetime/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFDATETIME_DLL_EXPORT #endif #include #else #define LIBFDATETIME_EXTERN extern #endif #endif libpff-20120802/libfdatetime/libfdatetime_filetime.h0000644000175000017500000001037412005153135017246 00000000000000/* * Filetime functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FILETIME_H ) #define _LIBFDATETIME_INTERNAL_FILETIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_filetime libfdatetime_internal_filetime_t; /* Contains a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC) * The upper and lower part are separated due to byte alignment */ struct libfdatetime_internal_filetime { /* The lower filetime part */ uint32_t lower; /* The upper filetime part */ uint32_t upper; }; LIBFDATETIME_EXTERN \ int libfdatetime_filetime_initialize( libfdatetime_filetime_t **filetime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_free( libfdatetime_filetime_t **filetime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_add( libfdatetime_filetime_t *filetime, libfdatetime_filetime_t *additional_filetime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_from_byte_stream( libfdatetime_filetime_t *filetime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_from_64bit( libfdatetime_filetime_t *filetime, uint64_t value_64bit, libcerror_error_t **error ); int libfdatetime_filetime_copy_to_date_time_values( libfdatetime_internal_filetime_t *internal_filetime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_get_string_size( libfdatetime_filetime_t *filetime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf8_string( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf8_string_with_index( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf16_string( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf16_string_with_index( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf32_string( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_filetime_copy_to_utf32_string_with_index( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_date_time_values.c0000644000175000017500000013370012005153135020754 00000000000000/* * Date and time values functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* Initialize date time values * Returns 1 if successful or -1 on error */ int libfdatetime_date_time_values_initialize( libfdatetime_date_time_values_t **date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_date_time_values_initialize"; if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( *date_time_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid date time values value already set.", function ); return( -1 ); } *date_time_values = memory_allocate_structure( libfdatetime_date_time_values_t ); if( *date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create date time values.", function ); goto on_error; } if( memory_set( *date_time_values, 0, sizeof( libfdatetime_date_time_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear date time values.", function ); goto on_error; } return( 1 ); on_error: if( *date_time_values != NULL ) { memory_free( *date_time_values ); *date_time_values = NULL; } return( -1 ); } /* Frees date time values * Returns 1 if successful or -1 on error */ int libfdatetime_date_time_values_free( libfdatetime_date_time_values_t **date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_date_time_values_free"; if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( *date_time_values != NULL ) { memory_free( *date_time_values ); *date_time_values = NULL; } return( 1 ); } /* Deterimes the size of the string for the date and time values * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_date_time_values_get_string_size( libfdatetime_date_time_values_t *date_time_values, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_date_time_values_get_string_size"; uint32_t string_format_type = 0; uint32_t supported_flags = 0; if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_DURATION | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) && ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type: 0x%08" PRIx32 ".", function, string_format_type ); return( -1 ); } /* End of string character */ *string_size = 1; /* Determine the size of the date and time string */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { /* Example: Jan 01, 1970 */ if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { *string_size += 12; } /* Example: 1970-01-01 */ else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { *string_size += 10; } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { /* Date and time separator */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { *string_size += 1; } /* Example: 00:00:00 */ *string_size += 8; /* Example: .000 */ if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { *string_size += 4; } /* Example: .000000 */ if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { *string_size += 3; } /* Example: .000000000 */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { *string_size += 3; } } return( 1 ); } /* Converts the date and time values into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful, 0 if the date and time values are not a valid or -1 on error */ int libfdatetime_date_time_values_copy_to_utf8_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { char *month_string = NULL; static char *function = "libfdatetime_date_time_values_copy_to_utf8_string_with_index"; size_t string_index = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t micro_seconds = 0; uint16_t milli_seconds = 0; uint16_t nano_seconds = 0; uint16_t year_value = 0; uint8_t days_in_month = 0; if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_DURATION | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) && ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type: 0x%08" PRIx32 ".", function, string_format_type ); return( -1 ); } string_index = *utf8_string_index; /* Validate the date and time if necessary */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { if( date_time_values->year > 9999 ) { return( 0 ); } if( ( date_time_values->month == 0 ) || ( date_time_values->month > 12 ) ) { return( 0 ); } switch( date_time_values->month ) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: days_in_month = 31; break; case 4: case 6: case 9: case 11: days_in_month = 30; break; case 2: if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } break; } if( ( date_time_values->day == 0 ) || ( date_time_values->day > days_in_month ) ) { return( 0 ); } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( date_time_values->hours > 23 ) { return( 0 ); } if( date_time_values->minutes > 59 ) { return( 0 ); } if( date_time_values->seconds > 59 ) { return( 0 ); } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( date_time_values->milli_seconds > 999 ) { return( 0 ); } } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( date_time_values->micro_seconds > 999 ) { return( 0 ); } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { if( date_time_values->nano_seconds > 999 ) { return( 0 ); } } } /* Create the date and time string */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { switch( date_time_values->month ) { case 1: month_string = "Jan"; break; case 2: month_string = "Feb"; break; case 3: month_string = "Mar"; break; case 4: month_string = "Apr"; break; case 5: month_string = "May"; break; case 6: month_string = "Jun"; break; case 7: month_string = "Jul"; break; case 8: month_string = "Aug"; break; case 9: month_string = "Sep"; break; case 10: month_string = "Oct"; break; case 11: month_string = "Nov"; break; case 12: month_string = "Dec"; break; } if( ( string_index + 12 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } /* Format: mmm dd, yyyy */ utf8_string[ string_index++ ] = (uint8_t) month_string[ 0 ]; utf8_string[ string_index++ ] = (uint8_t) month_string[ 1 ]; utf8_string[ string_index++ ] = (uint8_t) month_string[ 2 ]; utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->day / 10 ); utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->day % 10 ); utf8_string[ string_index++ ] = (uint8_t) ','; utf8_string[ string_index++ ] = (uint8_t) ' '; year_value = date_time_values->year; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( year_value / 1000 ); year_value %= 1000; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( year_value / 100 ); year_value %= 100; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( year_value / 10 ); year_value %= 10; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) year_value; if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 1 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) ' '; } } else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { if( ( string_index + 10 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } /* Format: yyyy-mm-dd */ year_value = date_time_values->year; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( year_value / 1000 ); year_value %= 1000; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( year_value / 100 ); year_value %= 100; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( year_value / 10 ); year_value %= 10; utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) year_value; utf8_string[ string_index++ ] = (uint8_t) '-'; utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->month / 10 ); utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->month % 10 ); utf8_string[ string_index++ ] = (uint8_t) '-'; utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->day / 10 ); utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->day % 10 ); if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 1 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) 'T'; } } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 8 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } /* Format: HH:MM:SS */ utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->hours / 10 ); utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->hours % 10 ); utf8_string[ string_index++ ] = (uint8_t) ':'; utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->minutes / 10 ); utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->minutes % 10 ); utf8_string[ string_index++ ] = (uint8_t) ':'; utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->seconds / 10 ); utf8_string[ string_index++ ] = (uint8_t) '0' + ( date_time_values->seconds % 10 ); if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( ( string_index + 4 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } /* Format: .### */ utf8_string[ string_index++ ] = (uint8_t) '.'; milli_seconds = date_time_values->milli_seconds; utf8_string[ string_index + 2 ] = (uint8_t) '0' + (uint8_t) ( milli_seconds % 10 ); milli_seconds /= 10; utf8_string[ string_index + 1 ] = (uint8_t) '0' + (uint8_t) ( milli_seconds % 10 ); milli_seconds /= 10; utf8_string[ string_index ] = (uint8_t) '0' + (uint8_t) ( milli_seconds % 10 ); milli_seconds /= 10; string_index += 3; } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( ( string_index + 3 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } /* Format: ### */ micro_seconds = date_time_values->micro_seconds; utf8_string[ string_index + 2 ] = (uint8_t) '0' + (uint8_t) ( micro_seconds % 10 ); micro_seconds /= 10; utf8_string[ string_index + 1 ] = (uint8_t) '0' + (uint8_t) ( micro_seconds % 10 ); micro_seconds /= 10; utf8_string[ string_index ] = (uint8_t) '0' + (uint8_t) ( micro_seconds % 10 ); micro_seconds /= 10; string_index += 3; } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { if( ( string_index + 3 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } /* Format: ### */ nano_seconds = date_time_values->nano_seconds; utf8_string[ string_index + 2 ] = (uint8_t) '0' + (uint8_t) ( nano_seconds % 10 ); nano_seconds /= 10; utf8_string[ string_index + 1 ] = (uint8_t) '0' + (uint8_t) ( nano_seconds % 10 ); nano_seconds /= 10; utf8_string[ string_index ] = (uint8_t) '0' + (uint8_t) ( nano_seconds % 10 ); nano_seconds /= 10; string_index += 3; } } if( ( string_index + 1 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Converts the date and time values into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful, 0 if the date and time values are not a valid or -1 on error */ int libfdatetime_date_time_values_copy_to_utf16_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { char *month_string = NULL; static char *function = "libfdatetime_date_time_values_copy_to_utf16_string_with_index"; size_t string_index = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t micro_seconds = 0; uint16_t milli_seconds = 0; uint16_t nano_seconds = 0; uint16_t year_value = 0; uint8_t days_in_month = 0; if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_DURATION | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) && ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type: 0x%08" PRIx32 ".", function, string_format_type ); return( -1 ); } string_index = *utf16_string_index; /* Validate the date and time if necessary */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { if( date_time_values->year > 9999 ) { return( 0 ); } if( ( date_time_values->month == 0 ) || ( date_time_values->month > 12 ) ) { return( 0 ); } switch( date_time_values->month ) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: days_in_month = 31; break; case 4: case 6: case 9: case 11: days_in_month = 30; break; case 2: if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } break; } if( ( date_time_values->day == 0 ) || ( date_time_values->day > days_in_month ) ) { return( 0 ); } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( date_time_values->hours > 23 ) { return( 0 ); } if( date_time_values->minutes > 59 ) { return( 0 ); } if( date_time_values->seconds > 59 ) { return( 0 ); } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( date_time_values->milli_seconds > 999 ) { return( 0 ); } } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( date_time_values->micro_seconds > 999 ) { return( 0 ); } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { if( date_time_values->nano_seconds > 999 ) { return( 0 ); } } } /* Create the date and time string */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { switch( date_time_values->month ) { case 1: month_string = "Jan"; break; case 2: month_string = "Feb"; break; case 3: month_string = "Mar"; break; case 4: month_string = "Apr"; break; case 5: month_string = "May"; break; case 6: month_string = "Jun"; break; case 7: month_string = "Jul"; break; case 8: month_string = "Aug"; break; case 9: month_string = "Sep"; break; case 10: month_string = "Oct"; break; case 11: month_string = "Nov"; break; case 12: month_string = "Dec"; break; } if( ( string_index + 12 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } /* Format: mmm dd, yyyy */ utf16_string[ string_index++ ] = (uint16_t) month_string[ 0 ]; utf16_string[ string_index++ ] = (uint16_t) month_string[ 1 ]; utf16_string[ string_index++ ] = (uint16_t) month_string[ 2 ]; utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->day / 10 ); utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->day % 10 ); utf16_string[ string_index++ ] = (uint16_t) ','; utf16_string[ string_index++ ] = (uint16_t) ' '; year_value = date_time_values->year; utf16_string[ string_index++ ] = (uint16_t) '0' + ( year_value / 1000 ); year_value %= 1000; utf16_string[ string_index++ ] = (uint16_t) '0' + ( year_value / 100 ); year_value %= 100; utf16_string[ string_index++ ] = (uint16_t) '0' + ( year_value / 10 ); year_value %= 10; utf16_string[ string_index++ ] = (uint16_t) '0' + year_value; if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 1 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) ' '; } } else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { if( ( string_index + 10 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } /* Format: yyyy-mm-dd */ year_value = date_time_values->year; utf16_string[ string_index++ ] = (uint16_t) '0' + ( year_value / 1000 ); year_value %= 1000; utf16_string[ string_index++ ] = (uint16_t) '0' + ( year_value / 100 ); year_value %= 100; utf16_string[ string_index++ ] = (uint16_t) '0' + ( year_value / 10 ); year_value %= 10; utf16_string[ string_index++ ] = (uint16_t) '0' + year_value; utf16_string[ string_index++ ] = (uint16_t) '-'; utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->month / 10 ); utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->month % 10 ); utf16_string[ string_index++ ] = (uint16_t) '-'; utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->day / 10 ); utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->day % 10 ); if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 1 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) 'T'; } } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 8 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } /* Format: HH:MM:SS */ utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->hours / 10 ); utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->hours % 10 ); utf16_string[ string_index++ ] = (uint16_t) ':'; utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->minutes / 10 ); utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->minutes % 10 ); utf16_string[ string_index++ ] = (uint16_t) ':'; utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->seconds / 10 ); utf16_string[ string_index++ ] = (uint16_t) '0' + ( date_time_values->seconds % 10 ); if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( ( string_index + 4 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } /* Format: .### */ utf16_string[ string_index++ ] = (uint16_t) '.'; milli_seconds = date_time_values->milli_seconds; utf16_string[ string_index + 2 ] = (uint16_t) '0' + (uint16_t) ( milli_seconds % 10 ); milli_seconds /= 10; utf16_string[ string_index + 1 ] = (uint16_t) '0' + (uint16_t) ( milli_seconds % 10 ); milli_seconds /= 10; utf16_string[ string_index ] = (uint16_t) '0' + (uint16_t) ( milli_seconds % 10 ); milli_seconds /= 10; string_index += 3; } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( ( string_index + 3 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } /* Format: ### */ micro_seconds = date_time_values->micro_seconds; utf16_string[ string_index + 2 ] = (uint16_t) '0' + (uint16_t) ( micro_seconds % 10 ); micro_seconds /= 10; utf16_string[ string_index + 1 ] = (uint16_t) '0' + (uint16_t) ( micro_seconds % 10 ); micro_seconds /= 10; utf16_string[ string_index ] = (uint16_t) '0' + (uint16_t) ( micro_seconds % 10 ); micro_seconds /= 10; string_index += 3; } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { if( ( string_index + 3 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } /* Format: ### */ nano_seconds = date_time_values->nano_seconds; utf16_string[ string_index + 2 ] = (uint16_t) '0' + (uint16_t) ( nano_seconds % 10 ); nano_seconds /= 10; utf16_string[ string_index + 1 ] = (uint16_t) '0' + (uint16_t) ( nano_seconds % 10 ); nano_seconds /= 10; utf16_string[ string_index ] = (uint16_t) '0' + (uint16_t) ( nano_seconds % 10 ); nano_seconds /= 10; string_index += 3; } } if( ( string_index + 1 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Converts the date and time values into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful, 0 if the date and time values are not a valid or -1 on error */ int libfdatetime_date_time_values_copy_to_utf32_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { char *month_string = NULL; static char *function = "libfdatetime_date_time_values_copy_to_utf32_string_with_index"; size_t string_index = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t micro_seconds = 0; uint16_t milli_seconds = 0; uint16_t nano_seconds = 0; uint16_t year_value = 0; uint8_t days_in_month = 0; if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_DURATION | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS; if( ( string_format_flags & supported_flags ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) && ( string_format_type != LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type: 0x%08" PRIx32 ".", function, string_format_type ); return( -1 ); } string_index = *utf32_string_index; /* Validate the date and time if necessary */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { if( date_time_values->year > 9999 ) { return( 0 ); } if( ( date_time_values->month == 0 ) || ( date_time_values->month > 12 ) ) { return( 0 ); } switch( date_time_values->month ) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: days_in_month = 31; break; case 4: case 6: case 9: case 11: days_in_month = 30; break; case 2: if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } break; } if( ( date_time_values->day == 0 ) || ( date_time_values->day > days_in_month ) ) { return( 0 ); } { return( 0 ); } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( date_time_values->hours > 23 ) { return( 0 ); } if( date_time_values->minutes > 59 ) { return( 0 ); } if( date_time_values->seconds > 59 ) { return( 0 ); } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( date_time_values->milli_seconds > 999 ) { return( 0 ); } } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( date_time_values->micro_seconds > 999 ) { return( 0 ); } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { if( date_time_values->nano_seconds > 999 ) { return( 0 ); } } } /* Create the date and time string */ if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_DATE ) != 0 ) { if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_CTIME ) { switch( date_time_values->month ) { case 1: month_string = "Jan"; break; case 2: month_string = "Feb"; break; case 3: month_string = "Mar"; break; case 4: month_string = "Apr"; break; case 5: month_string = "May"; break; case 6: month_string = "Jun"; break; case 7: month_string = "Jul"; break; case 8: month_string = "Aug"; break; case 9: month_string = "Sep"; break; case 10: month_string = "Oct"; break; case 11: month_string = "Nov"; break; case 12: month_string = "Dec"; break; } if( ( string_index + 12 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } /* Format: mmm dd, yyyy */ utf32_string[ string_index++ ] = (uint32_t) month_string[ 0 ]; utf32_string[ string_index++ ] = (uint32_t) month_string[ 1 ]; utf32_string[ string_index++ ] = (uint32_t) month_string[ 2 ]; utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->day / 10 ); utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->day % 10 ); utf32_string[ string_index++ ] = (uint32_t) ','; utf32_string[ string_index++ ] = (uint32_t) ' '; year_value = date_time_values->year; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 1000 ); year_value %= 1000; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 100 ); year_value %= 100; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 10 ); year_value %= 10; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) year_value; if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 1 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ string_index++ ] = (uint32_t) ' '; } } else if( string_format_type == LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 ) { if( ( string_index + 10 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } /* Format: yyyy-mm-dd */ year_value = date_time_values->year; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 1000 ); year_value %= 1000; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 100 ); year_value %= 100; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 10 ); year_value %= 10; utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) year_value; utf32_string[ string_index++ ] = (uint32_t) '-'; utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->month / 10 ); utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->month % 10 ); utf32_string[ string_index++ ] = (uint32_t) '-'; utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->day / 10 ); utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->day % 10 ); if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 1 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ string_index++ ] = (uint32_t) 'T'; } } } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 ) { if( ( string_index + 8 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } /* Format: HH:MM:SS */ utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->hours / 10 ); utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->hours % 10 ); utf32_string[ string_index++ ] = (uint32_t) ':'; utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->minutes / 10 ); utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->minutes % 10 ); utf32_string[ string_index++ ] = (uint32_t) ':'; utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->seconds / 10 ); utf32_string[ string_index++ ] = (uint32_t) '0' + ( date_time_values->seconds % 10 ); if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( ( string_index + 4 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } /* Format: .### */ utf32_string[ string_index++ ] = (uint32_t) '.'; milli_seconds = date_time_values->milli_seconds; utf32_string[ string_index + 2 ] = (uint32_t) '0' + (uint32_t) ( milli_seconds % 10 ); milli_seconds /= 10; utf32_string[ string_index + 1 ] = (uint32_t) '0' + (uint32_t) ( milli_seconds % 10 ); milli_seconds /= 10; utf32_string[ string_index ] = (uint32_t) '0' + (uint32_t) ( milli_seconds % 10 ); milli_seconds /= 10; string_index += 3; } if( ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) != 0 ) || ( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) ) { if( ( string_index + 3 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } /* Format: ### */ micro_seconds = date_time_values->micro_seconds; utf32_string[ string_index + 2 ] = (uint32_t) '0' + (uint32_t) ( micro_seconds % 10 ); micro_seconds /= 10; utf32_string[ string_index + 1 ] = (uint32_t) '0' + (uint32_t) ( micro_seconds % 10 ); micro_seconds /= 10; utf32_string[ string_index ] = (uint32_t) '0' + (uint32_t) ( micro_seconds % 10 ); micro_seconds /= 10; string_index += 3; } if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) != 0 ) { if( ( string_index + 3 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } /* Format: ### */ nano_seconds = date_time_values->nano_seconds; utf32_string[ string_index + 2 ] = (uint32_t) '0' + (uint32_t) ( nano_seconds % 10 ); nano_seconds /= 10; utf32_string[ string_index + 1 ] = (uint32_t) '0' + (uint32_t) ( nano_seconds % 10 ); nano_seconds /= 10; utf32_string[ string_index ] = (uint32_t) '0' + (uint32_t) ( nano_seconds % 10 ); nano_seconds /= 10; string_index += 3; } } if( ( string_index + 1 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } libpff-20120802/libfdatetime/libfdatetime_floatingtime.h0000644000175000017500000001041212005153135020123 00000000000000/* * Floatingtime functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_FLOATINGTIME_H ) #define _LIBFDATETIME_INTERNAL_FLOATINGTIME_H #include #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_floatingtime libfdatetime_internal_floatingtime_t; /* Contains a 64-bit value containing a floating point where the whole number part represents * the number of days since December 30, 1899 and the fractional part fraction of a day since midnight */ struct libfdatetime_internal_floatingtime { /* The floatingtime floating point */ byte_stream_float64_t timestamp; }; LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_initialize( libfdatetime_floatingtime_t **floatingtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_free( libfdatetime_floatingtime_t **floatingtime, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_from_byte_stream( libfdatetime_floatingtime_t *floatingtime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_from_64bit( libfdatetime_floatingtime_t *floatingtime, uint64_t value_64bit, libcerror_error_t **error ); int libfdatetime_floatingtime_copy_to_date_time_values( libfdatetime_internal_floatingtime_t *internal_floatingtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_get_string_size( libfdatetime_floatingtime_t *floatingtime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf8_string( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf8_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf16_string( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf16_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf32_string( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_floatingtime_copy_to_utf32_string_with_index( libfdatetime_floatingtime_t *floatingtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_libcerror.h0000644000175000017500000000253312005153135017431 00000000000000/* * The internal libcerror header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_LIBCERROR_H ) #define _LIBFDATETIME_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfdatetime/Makefile.in0000664000175000017500000006621612006536016014647 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfdatetime DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfdatetime_la_LIBADD = am__libfdatetime_la_SOURCES_DIST = libfdatetime_date_time_values.c \ libfdatetime_date_time_values.h libfdatetime_definitions.h \ libfdatetime_extern.h libfdatetime_error.c \ libfdatetime_error.h libfdatetime_fat_date_time.c \ libfdatetime_fat_date_time.h libfdatetime_filetime.c \ libfdatetime_filetime.h libfdatetime_floatingtime.c \ libfdatetime_floatingtime.h libfdatetime_libcerror.h \ libfdatetime_libcstring.h libfdatetime_nsf_timedate.c \ libfdatetime_nsf_timedate.h libfdatetime_posix_time.c \ libfdatetime_posix_time.h libfdatetime_support.c \ libfdatetime_support.h libfdatetime_systemtime.c \ libfdatetime_systemtime.h libfdatetime_types.h \ libfdatetime_unused.h @HAVE_LOCAL_LIBFDATETIME_TRUE@am_libfdatetime_la_OBJECTS = libfdatetime_date_time_values.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_error.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_fat_date_time.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_filetime.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_floatingtime.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_nsf_timedate.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_posix_time.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_support.lo \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_systemtime.lo libfdatetime_la_OBJECTS = $(am_libfdatetime_la_OBJECTS) @HAVE_LOCAL_LIBFDATETIME_TRUE@am_libfdatetime_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfdatetime_la_SOURCES) DIST_SOURCES = $(am__libfdatetime_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFDATETIME_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFDATETIME_TRUE@noinst_LTLIBRARIES = libfdatetime.la @HAVE_LOCAL_LIBFDATETIME_TRUE@libfdatetime_la_SOURCES = \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_date_time_values.c libfdatetime_date_time_values.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_definitions.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_extern.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_error.c libfdatetime_error.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_fat_date_time.c libfdatetime_fat_date_time.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_filetime.c libfdatetime_filetime.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_floatingtime.c libfdatetime_floatingtime.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_libcerror.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_libcstring.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_nsf_timedate.c libfdatetime_nsf_timedate.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_posix_time.c libfdatetime_posix_time.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_support.c libfdatetime_support.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_systemtime.c libfdatetime_systemtime.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_types.h \ @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfdatetime/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfdatetime/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfdatetime.la: $(libfdatetime_la_OBJECTS) $(libfdatetime_la_DEPENDENCIES) $(LINK) $(am_libfdatetime_la_rpath) $(libfdatetime_la_OBJECTS) $(libfdatetime_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_date_time_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_fat_date_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_filetime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_floatingtime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_nsf_timedate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_posix_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdatetime_systemtime.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdatetime ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdatetime_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfdatetime/libfdatetime_nsf_timedate.c0000644000175000017500000006713412005153135020113 00000000000000/* * Notes Storage Facility (NSF) timedate functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_nsf_timedate.h" #include "libfdatetime_types.h" /* Initialize a NSF timedate * Make sure the value nsf_timedate is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_initialize( libfdatetime_nsf_timedate_t **nsf_timedate, libcerror_error_t **error ) { libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_initialize"; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } if( *nsf_timedate != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid NSF timedate value already set.", function ); return( -1 ); } internal_nsf_timedate = memory_allocate_structure( libfdatetime_internal_nsf_timedate_t ); if( internal_nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create NSF timedate.", function ); goto on_error; } if( memory_set( internal_nsf_timedate, 0, sizeof( libfdatetime_internal_nsf_timedate_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear NSF timedate.", function ); goto on_error; } *nsf_timedate = (libfdatetime_nsf_timedate_t *) internal_nsf_timedate; return( 1 ); on_error: if( internal_nsf_timedate != NULL ) { memory_free( internal_nsf_timedate ); } return( -1 ); } /* Frees a NSF timedate * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_free( libfdatetime_nsf_timedate_t **nsf_timedate, libcerror_error_t **error ) { libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_free"; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } if( *nsf_timedate != NULL ) { internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) *nsf_timedate; *nsf_timedate = NULL; memory_free( internal_nsf_timedate ); } return( 1 ); } /* Converts a byte stream into a NSF timedate * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_from_byte_stream( libfdatetime_nsf_timedate_t *nsf_timedate, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_from_byte_stream"; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFDATETIME_ENDIAN_BIG ) && ( byte_order != LIBFDATETIME_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint32_little_endian( byte_stream, internal_nsf_timedate->lower ); byte_stream += 4; byte_stream_copy_to_uint32_little_endian( byte_stream, internal_nsf_timedate->upper ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, internal_nsf_timedate->upper ); byte_stream += 4; byte_stream_copy_to_uint32_big_endian( byte_stream, internal_nsf_timedate->lower ); } return( 1 ); } /* Converts a 64-bit value into a NSF timedate * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_from_64bit( libfdatetime_nsf_timedate_t *nsf_timedate, uint64_t value_64bit, libcerror_error_t **error ) { libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_from_64bit"; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; internal_nsf_timedate->upper = value_64bit >> 32; internal_nsf_timedate->lower = value_64bit & 0x0ffffffffULL; return( 1 ); } /* Converts a NSF timedate into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_date_time_values( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_date_time_values"; uint32_t nsf_julian_day = 0; uint32_t nsf_time = 0; uint32_t number_of_years = 0; uint32_t number_of_months = 0; uint32_t julian_quad_cycles = 0; uint32_t gregorian_cent_cycles = 0; uint32_t gregorian_quad_cycles = 0; uint32_t roman_annual_cycles = 0; if( internal_nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal NSF timedate.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } /* TODO what about dates before 1582 ? */ /* Retrieve the Julian day value which is stored in the 24 LSB of the upper value * the NSF Julian day starts with January 1, 4713 BC 00:00 UTC * instead of January 1, 4713 BC 12:00 UTC */ nsf_julian_day = internal_nsf_timedate->upper & 0x00ffffffUL; /* Shift the epoch back to March 1, 4800 BC 00:00 * This is the beginning of the Gregorian quadricentennial * which is 32044 days before the Julian period */ nsf_julian_day += 32044; /* Determine the number of Gregorian quadricentennial cycles * 1 cycle consists of 146097 days */ gregorian_quad_cycles = nsf_julian_day / 146097; nsf_julian_day %= 146097; /* Determine the number of Gregorian centennial cycles * 1 cycle consists of 36524 days * Correct for leap years per cycle, either 3 or 4 */ gregorian_cent_cycles = ( ( ( nsf_julian_day / 36524 ) + 1 ) * 3 ) / 4; nsf_julian_day -= gregorian_cent_cycles * 36524; /* Determine the number of Julian quadrennial cycles * 1 cycle consists of 1461 days per 4 year */ julian_quad_cycles = nsf_julian_day / 1461; nsf_julian_day %= 1461; /* Determine the number of Roman annual cycles * 1 cycle consists of 365 days * Correct for leap years per cycle, either 3 or 4 */ roman_annual_cycles = ( ( ( nsf_julian_day / 365 ) + 1 ) * 3 ) / 4; /* The number of days remaining in the current Julian year */ nsf_julian_day -= roman_annual_cycles * 365; /* Determine the number of years since March 1, 4801 BC */ number_of_years = ( gregorian_quad_cycles * 400 ) + ( gregorian_cent_cycles * 100 ) + ( julian_quad_cycles * 4 ) + roman_annual_cycles; /* Determine the number of months since March */ number_of_months = ( ( ( nsf_julian_day * 5 ) + 308 ) / 153 ) - 2; /* Determine the number of days since the 1st of the month */ nsf_julian_day -= ( ( ( number_of_months + 4 ) * 153 ) / 5 ); nsf_julian_day += 122; /* Determine the year */ date_time_values->year = (uint16_t) ( number_of_years - 4800 + ( ( number_of_months + 2 ) / 12 ) ); /* Determine the month */ date_time_values->month = ( ( number_of_months + 2 ) % 12 ) + 1; /* Determine the day of the month */ date_time_values->day = (uint8_t) ( nsf_julian_day + 1 ); /* Retrieve the number of seconds from the lower part of the NFS timedate */ nsf_time = internal_nsf_timedate->lower; /* The timestamp is in units of 10 milli seconds correct the value to seconds */ date_time_values->nano_seconds = 0; date_time_values->micro_seconds = 0; date_time_values->milli_seconds = ( nsf_time % 100 ) * 10; nsf_time /= 100; /* There are 60 seconds in a minute correct the value to minutes */ date_time_values->seconds = nsf_time % 60; nsf_time /= 60; /* There are 60 minutes in an hour correct the value to hours */ date_time_values->minutes = nsf_time % 60; nsf_time /= 60; /* There are 24 hours in a day correct the value to days */ date_time_values->hours = (uint8_t) nsf_time; /* TODO day light savings and timezone */ return( 1 ); } /* Deterimes the size of the string for the NSF timedate * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_get_string_size( libfdatetime_nsf_timedate_t *nsf_timedate, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_nsf_timedate_get_string_size"; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_nsf_timedate_copy_to_date_time_values( (libfdatetime_internal_nsf_timedate_t *) nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ if( libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } /* Make sure the string can hold the hexadecimal representation * of a NSF timedate */ if( *string_size < 24 ) { *string_size = 24; } return( 1 ); } /* Converts the NSF timedate into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf8_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_nsf_timedate_copy_to_utf8_string_with_index( nsf_timedate, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy NSF timedate to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the NSF timedate into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf8_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( libfdatetime_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 24 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the NSF timedate into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf16_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_nsf_timedate_copy_to_utf16_string_with_index( nsf_timedate, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy NSF timedate to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the NSF timedate into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf16_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( libfdatetime_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 24 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the NSF timedate into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf32_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_nsf_timedate_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_nsf_timedate_copy_to_utf32_string_with_index( nsf_timedate, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy NSF timedate to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the NSF timedate into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_nsf_timedate_copy_to_utf32_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate = NULL; static char *function = "libfdatetime_nsf_timedate_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( nsf_timedate == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid NSF timedate.", function ); return( -1 ); } internal_nsf_timedate = (libfdatetime_internal_nsf_timedate_t *) nsf_timedate; if( libfdatetime_nsf_timedate_copy_to_date_time_values( internal_nsf_timedate, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 24 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_nsf_timedate->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libpff-20120802/libfdatetime/libfdatetime_date_time_values.h0000644000175000017500000000601412005153135020756 00000000000000/* * Date and time values functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_DATE_TIME_VALUES_H ) #define _LIBFDATETIME_DATE_TIME_VALUES_H #include #include #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_date_time_values libfdatetime_date_time_values_t; struct libfdatetime_date_time_values { /* The year */ uint16_t year; /* The month * 1 represents January */ uint8_t month; /* The day of the month */ uint8_t day; /* The number of hours in 24 hour format * E.g. 13 represents 1 PM */ uint8_t hours; /* The number of minutes */ uint8_t minutes; /* The number of seconds */ uint8_t seconds; /* The number of milli seconds */ uint16_t milli_seconds; /* The number of micro seconds */ uint16_t micro_seconds; /* The number of nano seconds */ uint16_t nano_seconds; }; int libfdatetime_date_time_values_initialize( libfdatetime_date_time_values_t **date_time_values, libcerror_error_t **error ); int libfdatetime_date_time_values_free( libfdatetime_date_time_values_t **date_time_values, libcerror_error_t **error ); int libfdatetime_date_time_values_get_string_size( libfdatetime_date_time_values_t *date_time_values, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_date_time_values_copy_to_utf8_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_date_time_values_copy_to_utf16_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfdatetime_date_time_values_copy_to_utf32_string_with_index( libfdatetime_date_time_values_t *date_time_values, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_posix_time.h0000644000175000017500000001066112005153135017627 00000000000000/* * POSIX time functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_POSIX_TIME_H ) #define _LIBFDATETIME_INTERNAL_POSIX_TIME_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_posix_time libfdatetime_internal_posix_time_t; /* Contains a value representing the number of seconds since January 1, 1970 (UTC) * Normally this value is a 32-bit signed integer where negative numbers predate * the epoch, but different variations exists */ struct libfdatetime_internal_posix_time { /* The timestamp */ uint64_t timestamp; /* The value type */ uint8_t value_type; }; LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_initialize( libfdatetime_posix_time_t **posix_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_free( libfdatetime_posix_time_t **posix_time, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_from_byte_stream( libfdatetime_posix_time_t *posix_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, uint8_t value_type, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_from_32bit( libfdatetime_posix_time_t *posix_time, uint32_t value_32bit, uint8_t value_type, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_from_64bit( libfdatetime_posix_time_t *posix_time, uint64_t value_64bit, uint8_t value_type, libcerror_error_t **error ); int libfdatetime_posix_time_copy_to_date_time_values( libfdatetime_internal_posix_time_t *internal_posix_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_get_string_size( libfdatetime_posix_time_t *posix_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf8_string( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf8_string_with_index( libfdatetime_posix_time_t *posix_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf16_string( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf16_string_with_index( libfdatetime_posix_time_t *posix_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf32_string( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_posix_time_copy_to_utf32_string_with_index( libfdatetime_posix_time_t *posix_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_fat_date_time.c0000644000175000017500000006320612005153135020232 00000000000000/* * FAT date and time functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_fat_date_time.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* Initialize a FAT date and time * Make sure the value fat_date_time is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_initialize( libfdatetime_fat_date_time_t **fat_date_time, libcerror_error_t **error ) { libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_initialize"; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } if( *fat_date_time != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid FAT date time value already set.", function ); return( -1 ); } internal_fat_date_time = memory_allocate_structure( libfdatetime_internal_fat_date_time_t ); if( internal_fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create FAT date time.", function ); goto on_error; } if( memory_set( internal_fat_date_time, 0, sizeof( libfdatetime_internal_fat_date_time_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear FAT date time.", function ); goto on_error; } *fat_date_time = (libfdatetime_fat_date_time_t *) internal_fat_date_time; return( 1 ); on_error: if( internal_fat_date_time != NULL ) { memory_free( internal_fat_date_time ); } return( -1 ); } /* Frees a FAT date and time * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_free( libfdatetime_fat_date_time_t **fat_date_time, libcerror_error_t **error ) { libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_free"; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } if( *fat_date_time != NULL ) { internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) *fat_date_time; *fat_date_time = NULL; memory_free( internal_fat_date_time ); } return( 1 ); } /* Converts a byte stream into a FAT date and time * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_from_byte_stream( libfdatetime_fat_date_time_t *fat_date_time, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_from_byte_stream"; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFDATETIME_ENDIAN_BIG ) && ( byte_order != LIBFDATETIME_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint16_little_endian( byte_stream, internal_fat_date_time->date ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_fat_date_time->time ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint16_big_endian( byte_stream, internal_fat_date_time->date ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_fat_date_time->time ); } return( 1 ); } /* Converts a 32-bit value into a FAT date and time * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_from_uint32( libfdatetime_fat_date_time_t *fat_date_time, uint32_t value_32bit, libcerror_error_t **error ) { libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_from_uint32"; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; internal_fat_date_time->time = value_32bit & 0x0ffffL; internal_fat_date_time->date = value_32bit >> 16; return( 1 ); } /* Converts a FAT date and time into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_date_time_values( libfdatetime_internal_fat_date_time_t *internal_fat_date_time, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_date_time_values"; if( internal_fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal fat date time.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } /* The year value is stored in bits 9 - 15 of the date (7 bits) * A year value of 0 represents 1980 */ date_time_values->year = (uint16_t) ( 1980 + ( ( internal_fat_date_time->date >> 9 ) & 0x7f ) ); /* The month value is stored in bits 5 - 8 of the date (4 bits) * A month value of 1 represents January */ date_time_values->month = (uint8_t) ( ( internal_fat_date_time->date >> 5 ) & 0x0f ); /* The day value is stored in bits 0 - 4 of the date (5 bits) */ date_time_values->day = (uint8_t) ( internal_fat_date_time->date & 0x1f ); /* The hours value is stored in bits 11 - 15 of the time (5 bits) */ date_time_values->hours = (uint8_t) ( ( internal_fat_date_time->time >> 11 ) & 0x1f ); /* The minutes value is stored in bits 5 - 10 of the time (6 bits) */ date_time_values->minutes = (uint8_t) ( ( internal_fat_date_time->time >> 5 ) & 0x3f ); /* The seconds value is stored in bits 0 - 4 of the time (5 bits) * The seconds are stored as 2 second intervals */ date_time_values->seconds = (uint8_t) ( internal_fat_date_time->time & 0x1f ) * 2; date_time_values->milli_seconds = 0; date_time_values->micro_seconds = 0; date_time_values->nano_seconds = 0; return( 1 ); } /* Deterimes the size of the string for the fat date time * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_get_string_size( libfdatetime_fat_date_time_t *fat_date_time, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_fat_date_time_get_string_size"; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid fat date time.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_fat_date_time_copy_to_date_time_values( (libfdatetime_internal_fat_date_time_t *) fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ if( libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } /* Make sure the string can hold the hexadecimal representation * of a fat date time */ if( *string_size < 18 ) { *string_size = 18; } return( 1 ); } /* Converts the FAT date and time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf8_string( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_fat_date_time_copy_to_utf8_string_with_index( fat_date_time, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy FAT date time to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the FAT date and time into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf8_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( libfdatetime_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-8 string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 16 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->date >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->time >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the FAT date and time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf16_string( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_fat_date_time_copy_to_utf16_string_with_index( fat_date_time, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy FAT date time to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the FAT date and time into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf16_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( libfdatetime_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-16 string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 16 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->date >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->time >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the FAT date and time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf32_string( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_fat_date_time_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_fat_date_time_copy_to_utf32_string_with_index( fat_date_time, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy FAT date time to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the FAT date and time into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_fat_date_time_copy_to_utf32_string_with_index( libfdatetime_fat_date_time_t *fat_date_time, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_fat_date_time_t *internal_fat_date_time = NULL; static char *function = "libfdatetime_fat_date_time_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( fat_date_time == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid FAT date time.", function ); return( -1 ); } internal_fat_date_time = (libfdatetime_internal_fat_date_time_t *) fat_date_time; if( libfdatetime_fat_date_time_copy_to_date_time_values( internal_fat_date_time, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-32 string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 32 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->date >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 12; do { byte_value = ( internal_fat_date_time->time >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libpff-20120802/libfdatetime/libfdatetime_libcstring.h0000644000175000017500000000273412005153135017611 00000000000000/* * The internal libcstring header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_LIBCSTRING_H ) #define _LIBFDATETIME_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfdatetime/libfdatetime_nsf_timedate.h0000644000175000017500000001115512005153135020110 00000000000000/* * Notes Storage Facility (NSF) timedate functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H ) #define _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H #include #include #include "libfdatetime_extern.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdatetime_internal_nsf_timedate libfdatetime_internal_nsf_timedate_t; /* Contains a 64-bit value which consists of: * The lower 32-bit value represents the number of 100th seconds * The upper 32-bit value which consists of: * a 24-bit value which contains the number of Julian day * a 4-bit value which contains the UTC timezone difference in hours * a 2-bit value which contains the UTC timezone difference in 15 minutes periods * a 1-bit value to indicate if the timezone difference is negative (0) or positive (1) * a 1-bit value to indicate if the day light savings are active */ struct libfdatetime_internal_nsf_timedate { /* The lower nsf timedate part */ uint32_t lower; /* The upper nsf timedate part */ uint32_t upper; }; LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_initialize( libfdatetime_nsf_timedate_t **nsf_timedate, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_free( libfdatetime_nsf_timedate_t **nsf_timedate, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_from_byte_stream( libfdatetime_nsf_timedate_t *nsf_timedate, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_from_64bit( libfdatetime_nsf_timedate_t *nsf_timedate, uint64_t value_64bit, libcerror_error_t **error ); int libfdatetime_nsf_timedate_copy_to_date_time_values( libfdatetime_internal_nsf_timedate_t *internal_nsf_timedate, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_get_string_size( libfdatetime_nsf_timedate_t *nsf_timedate, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf8_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf8_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf16_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf16_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf32_string( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFDATETIME_EXTERN \ int libfdatetime_nsf_timedate_copy_to_utf32_string_with_index( libfdatetime_nsf_timedate_t *nsf_timedate, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdatetime/libfdatetime_definitions.h0000644000175000017500000000740212005153135017761 00000000000000/* * The internal definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFDATETIME_INTERNAL_DEFINITIONS_H ) #define LIBFDATETIME_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if !defined( HAVE_LOCAL_LIBFDATETIME ) #include /* The definitions in are copied here * for local use of libfdatetime */ #else #include #define LIBFDATETIME_VERSION 20120701 /* The version string */ #define LIBFDATETIME_VERSION_STRING "20120701" /* The byte order definitions */ #define LIBFDATETIME_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFDATETIME_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* The string format definition flags */ enum LIBFDATETIME_STRING_FORMAT_FLAGS { /* Format the date time value in C time */ LIBFDATETIME_STRING_FORMAT_TYPE_CTIME = 0x00000001UL, /* Format the date time value in ISO 8601 */ LIBFDATETIME_STRING_FORMAT_TYPE_ISO8601 = 0x00000002UL, /* Format the date time value as a date only */ LIBFDATETIME_STRING_FORMAT_FLAG_DATE = 0x00000100UL, /* Format the date time value as a time only */ LIBFDATETIME_STRING_FORMAT_FLAG_TIME = 0x00000200UL, /* Format the date time value as a duration */ LIBFDATETIME_STRING_FORMAT_FLAG_DURATION = 0x00000400UL, /* Format the date time value with a time in milli seconds */ LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS = 0x00010000UL, /* Format the date time value with a time in micro seconds */ LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS = 0x00020000UL, /* Format the date time value with a time in nano seconds */ LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS = 0x00040000UL }; #define LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME \ ( LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) #define LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_MILLI_SECONDS \ ( LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MILLI_SECONDS ) #define LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_MICRO_SECONDS \ ( LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_MICRO_SECONDS ) #define LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS \ ( LIBFDATETIME_STRING_FORMAT_FLAG_DATE | LIBFDATETIME_STRING_FORMAT_FLAG_TIME | LIBFDATETIME_STRING_FORMAT_FLAG_TIME_NANO_SECONDS ) /* The POSIX time value type definitions */ enum LIBFDATETIME_POSIX_TIME_VALUE_TYPES { LIBFDATETIME_POSIX_TIME_VALUE_TYPE_UNDEFINED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_UNSIGNED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_SIGNED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_64BIT_UNSIGNED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_SIGNED, LIBFDATETIME_POSIX_TIME_VALUE_TYPE_MICRO_SECONDS_64BIT_UNSIGNED }; #endif #endif libpff-20120802/libfdatetime/libfdatetime_systemtime.c0000644000175000017500000011204612005153135017645 00000000000000/* * Systemtime functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_systemtime.h" #include "libfdatetime_types.h" /* Initialize a systemtime * Make sure the value systemtime is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_initialize( libfdatetime_systemtime_t **systemtime, libcerror_error_t **error ) { libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_initialize"; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } if( *systemtime != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid systemtime value already set.", function ); return( -1 ); } internal_systemtime = memory_allocate_structure( libfdatetime_internal_systemtime_t ); if( internal_systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create systemtime.", function ); goto on_error; } if( memory_set( internal_systemtime, 0, sizeof( libfdatetime_internal_systemtime_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear systemtime.", function ); goto on_error; } *systemtime = (libfdatetime_systemtime_t *) internal_systemtime; return( 1 ); on_error: if( internal_systemtime != NULL ) { memory_free( internal_systemtime ); } return( -1 ); } /* Frees a systemtime * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_free( libfdatetime_systemtime_t **systemtime, libcerror_error_t **error ) { libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_free"; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } if( *systemtime != NULL ) { internal_systemtime = (libfdatetime_internal_systemtime_t *) *systemtime; *systemtime = NULL; memory_free( internal_systemtime ); } return( 1 ); } /* Converts a byte stream into a systemtime * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_from_byte_stream( libfdatetime_systemtime_t *systemtime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_from_byte_stream"; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFDATETIME_ENDIAN_BIG ) && ( byte_order != LIBFDATETIME_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->year ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->month ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->day_of_week ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->day_of_month ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->hours ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->minutes ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->seconds ); byte_stream += 2; byte_stream_copy_to_uint16_little_endian( byte_stream, internal_systemtime->milli_seconds ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->year ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->month ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->day_of_week ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->day_of_month ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->hours ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->minutes ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->seconds ); byte_stream += 2; byte_stream_copy_to_uint16_big_endian( byte_stream, internal_systemtime->milli_seconds ); } return( 1 ); } /* Converts a systemtime into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_date_time_values( libfdatetime_internal_systemtime_t *internal_systemtime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_date_time_values"; uint8_t days_in_month = 0; if( internal_systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal systemtime.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } if( internal_systemtime->milli_seconds > 999 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - milli seconds value out of bounds.", function ); return( -1 ); } date_time_values->nano_seconds = 0; date_time_values->micro_seconds = 0; date_time_values->milli_seconds = internal_systemtime->milli_seconds; if( internal_systemtime->seconds > 59 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - seconds value out of bounds.", function ); return( -1 ); } date_time_values->seconds = (uint8_t) internal_systemtime->seconds; if( internal_systemtime->minutes > 59 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - minutes value out of bounds.", function ); return( -1 ); } date_time_values->minutes = (uint8_t) internal_systemtime->minutes; if( internal_systemtime->hours > 23 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - hours value out of bounds.", function ); return( -1 ); } date_time_values->hours = (uint8_t) internal_systemtime->hours; if( internal_systemtime->year > 9999 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - year value out of bounds.", function ); return( -1 ); } date_time_values->year = (uint16_t) internal_systemtime->year; if( ( internal_systemtime->month == 0 ) || ( internal_systemtime->month > 12 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - month value out of bounds.", function ); return( -1 ); } date_time_values->month = (uint8_t) internal_systemtime->month; if( internal_systemtime->day_of_week > 6 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - day of week value out of bounds.", function ); return( -1 ); } /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( internal_systemtime->day_of_month > (uint16_t) days_in_month ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid systemtime - day of month value out of bounds.", function ); return( -1 ); } date_time_values->day = (uint8_t) internal_systemtime->day_of_month; return( 1 ); } /* Deterimes the size of the string for the systemtime * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_get_string_size( libfdatetime_systemtime_t *systemtime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_systemtime_get_string_size"; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_systemtime_copy_to_date_time_values( (libfdatetime_internal_systemtime_t *) systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ if( libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } /* Make sure the string can hold the hexadecimal representation * of a systemtime */ if( *string_size < 57 ) { *string_size = 57; } return( 1 ); } /* Converts the systemtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf8_string( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_systemtime_copy_to_utf8_string_with_index( systemtime, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the systemtime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf8_string_with_index( libfdatetime_systemtime_t *systemtime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( libfdatetime_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 57 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->year >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_week >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->hours >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->minutes >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->milli_seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the systemtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf16_string( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_systemtime_copy_to_utf16_string_with_index( systemtime, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the systemtime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf16_string_with_index( libfdatetime_systemtime_t *systemtime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( libfdatetime_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 57 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->year >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_week >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->hours >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->minutes >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->milli_seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the systemtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf32_string( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_systemtime_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_systemtime_copy_to_utf32_string_with_index( systemtime, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the systemtime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_systemtime_copy_to_utf32_string_with_index( libfdatetime_systemtime_t *systemtime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_systemtime_t *internal_systemtime = NULL; static char *function = "libfdatetime_systemtime_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( systemtime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid systemtime.", function ); return( -1 ); } internal_systemtime = (libfdatetime_internal_systemtime_t *) systemtime; if( libfdatetime_systemtime_copy_to_date_time_values( internal_systemtime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy systemtime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 57 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->year >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_week >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->day_of_month >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->hours >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->minutes >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 14; do { byte_value = ( internal_systemtime->milli_seconds >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libpff-20120802/libfdatetime/libfdatetime_filetime.c0000644000175000017500000007075012005153135017245 00000000000000/* * Filetime functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfdatetime_definitions.h" #include "libfdatetime_date_time_values.h" #include "libfdatetime_filetime.h" #include "libfdatetime_libcerror.h" #include "libfdatetime_types.h" /* Initialize a filetime * Make sure the value filetime is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_initialize( libfdatetime_filetime_t **filetime, libcerror_error_t **error ) { libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_initialize"; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } if( *filetime != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid filetime value already set.", function ); return( -1 ); } internal_filetime = memory_allocate_structure( libfdatetime_internal_filetime_t ); if( internal_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create filetime.", function ); goto on_error; } if( memory_set( internal_filetime, 0, sizeof( libfdatetime_internal_filetime_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear filetime.", function ); goto on_error; } *filetime = (libfdatetime_filetime_t *) internal_filetime; return( 1 ); on_error: if( internal_filetime != NULL ) { memory_free( internal_filetime ); } return( -1 ); } /* Frees a filetime * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_free( libfdatetime_filetime_t **filetime, libcerror_error_t **error ) { libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_free"; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } if( *filetime != NULL ) { internal_filetime = (libfdatetime_internal_filetime_t *) *filetime; *filetime = NULL; memory_free( internal_filetime ); } return( 1 ); } /* Adds the additional filetime to the filetime * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_add( libfdatetime_filetime_t *filetime, libfdatetime_filetime_t *additional_filetime, libcerror_error_t **error ) { libfdatetime_internal_filetime_t *internal_additional_filetime = NULL; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_add"; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( additional_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid additional filetime.", function ); return( -1 ); } internal_additional_filetime = (libfdatetime_internal_filetime_t *) additional_filetime; internal_filetime->lower += internal_additional_filetime->lower; internal_filetime->upper += internal_additional_filetime->upper; return( 1 ); } /* Converts a byte stream into a filetime * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_from_byte_stream( libfdatetime_filetime_t *filetime, const uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_from_byte_stream"; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBFDATETIME_ENDIAN_BIG ) && ( byte_order != LIBFDATETIME_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBFDATETIME_ENDIAN_LITTLE ) { byte_stream_copy_to_uint32_little_endian( byte_stream, internal_filetime->lower ); byte_stream += 4; byte_stream_copy_to_uint32_little_endian( byte_stream, internal_filetime->upper ); } else if( byte_order == LIBFDATETIME_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, internal_filetime->upper ); byte_stream += 4; byte_stream_copy_to_uint32_big_endian( byte_stream, internal_filetime->lower ); } return( 1 ); } /* Converts a 64-bit value into a filetime * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_from_64bit( libfdatetime_filetime_t *filetime, uint64_t value_64bit, libcerror_error_t **error ) { libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_from_64bit"; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; internal_filetime->upper = value_64bit >> 32; internal_filetime->lower = value_64bit & 0x0ffffffffLL; return( 1 ); } /* Converts a filetime into date time values * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_date_time_values( libfdatetime_internal_filetime_t *internal_filetime, libfdatetime_date_time_values_t *date_time_values, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_date_time_values"; uint64_t filetimestamp = 0; uint32_t days_in_century = 0; uint16_t days_in_year = 0; uint8_t days_in_month = 0; if( internal_filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal filetime.", function ); return( -1 ); } if( date_time_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid date time values.", function ); return( -1 ); } /* Combine the lower and upper filetime parts into a single filetime timestamp */ filetimestamp = ( (uint64_t) ( internal_filetime->upper ) << 32 ) + internal_filetime->lower; /* The timestamp is in units of 100 nano seconds correct the value to seconds */ date_time_values->nano_seconds = ( filetimestamp % 10 ) * 100; filetimestamp /= 10; date_time_values->micro_seconds = filetimestamp % 1000; filetimestamp /= 1000; date_time_values->milli_seconds = filetimestamp % 1000; filetimestamp /= 1000; /* There are 60 seconds in a minute correct the value to minutes */ date_time_values->seconds = filetimestamp % 60; filetimestamp /= 60; /* There are 60 minutes in an hour correct the value to hours */ date_time_values->minutes = filetimestamp % 60; filetimestamp /= 60; /* There are 24 hours in a day correct the value to days */ date_time_values->hours = filetimestamp % 24; filetimestamp /= 24; /* Add 1 day to compensate that Jan 1 1601 is represented as 0 */ filetimestamp += 1; /* Determine the number of years starting at '1 Jan 1601 00:00:00' * correct the value to days within the year */ date_time_values->year = 1601; if( filetimestamp >= 36159 ) { date_time_values->year = 1700; filetimestamp -= 36159; } while( filetimestamp > 0 ) { if( ( date_time_values->year % 400 ) == 0 ) { days_in_century = 36525; } else { days_in_century = 36524; } if( filetimestamp <= days_in_century ) { break; } filetimestamp -= days_in_century; date_time_values->year += 100; } while( filetimestamp > 0 ) { /* Check for a leap year * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 ) */ if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_year = 366; } else { days_in_year = 365; } if( filetimestamp <= days_in_year ) { break; } filetimestamp -= days_in_year; date_time_values->year += 1; } /* Determine the month correct the value to days within the month */ date_time_values->month = 1; while( filetimestamp > 0 ) { /* February (2) */ if( date_time_values->month == 2 ) { if( ( ( ( date_time_values->year % 4 ) == 0 ) && ( ( date_time_values->year % 100 ) != 0 ) ) || ( ( date_time_values->year % 400 ) == 0 ) ) { days_in_month = 29; } else { days_in_month = 28; } } /* April (4), June (6), September (9), November (11) */ else if( ( date_time_values->month == 4 ) || ( date_time_values->month == 6 ) || ( date_time_values->month == 9 ) || ( date_time_values->month == 11 ) ) { days_in_month = 30; } /* January (1), March (3), May (5), July (7), August (8), October (10), December (12) */ else if( ( date_time_values->month == 1 ) || ( date_time_values->month == 3 ) || ( date_time_values->month == 5 ) || ( date_time_values->month == 7 ) || ( date_time_values->month == 8 ) || ( date_time_values->month == 10 ) || ( date_time_values->month == 12 ) ) { days_in_month = 31; } /* This should never happen, but just in case */ else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported month: %d.", function, date_time_values->month ); return( -1 ); } if( filetimestamp <= days_in_month ) { break; } filetimestamp -= days_in_month; date_time_values->month += 1; } /* Determine the day */ date_time_values->day = (uint8_t) filetimestamp; return( 1 ); } /* Deterimes the size of the string for the filetime * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_get_string_size( libfdatetime_filetime_t *filetime, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; static char *function = "libfdatetime_filetime_get_string_size"; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( libfdatetime_filetime_copy_to_date_time_values( (libfdatetime_internal_filetime_t *) filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ if( libfdatetime_date_time_values_get_string_size( &date_time_values, string_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get string size.", function ); return( -1 ); } /* Make sure the string can hold the hexadecimal representation * of a filetime */ if( *string_size < 24 ) { *string_size = 24; } return( 1 ); } /* Converts the filetime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf8_string( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfdatetime_filetime_copy_to_utf8_string_with_index( filetime, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the filetime into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf8_string_with_index( libfdatetime_filetime_t *filetime, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_to_utf8_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( libfdatetime_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf8_string_with_index( &date_time_values, utf8_string, utf8_string_size, utf8_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( ( *utf8_string_index + 24 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } string_index = *utf8_string_index; utf8_string[ string_index++ ] = (uint8_t) '('; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ' '; utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf8_string[ string_index++ ] = (uint8_t) ')'; utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; } return( 1 ); } /* Converts the filetime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf16_string( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfdatetime_filetime_copy_to_utf16_string_with_index( filetime, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the filetime into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf16_string_with_index( libfdatetime_filetime_t *filetime, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_to_utf16_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( libfdatetime_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf16_string_with_index( &date_time_values, utf16_string, utf16_string_size, utf16_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( ( *utf16_string_index + 24 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } string_index = *utf16_string_index; utf16_string[ string_index++ ] = (uint16_t) '('; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ' '; utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf16_string[ string_index++ ] = (uint16_t) ')'; utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; } return( 1 ); } /* Converts the filetime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf32_string( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfdatetime_filetime_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfdatetime_filetime_copy_to_utf32_string_with_index( filetime, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the filetime into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfdatetime_filetime_copy_to_utf32_string_with_index( libfdatetime_filetime_t *filetime, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfdatetime_date_time_values_t date_time_values; libfdatetime_internal_filetime_t *internal_filetime = NULL; static char *function = "libfdatetime_filetime_copy_to_utf32_string_with_index"; size_t string_index = 0; uint8_t byte_value = 0; int8_t byte_shift = 0; int result = 0; if( filetime == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filetime.", function ); return( -1 ); } internal_filetime = (libfdatetime_internal_filetime_t *) filetime; if( libfdatetime_filetime_copy_to_date_time_values( internal_filetime, &date_time_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to date time values.", function ); return( -1 ); } /* Create the date and time string */ result = libfdatetime_date_time_values_copy_to_utf32_string_with_index( &date_time_values, utf32_string, utf32_string_size, utf32_string_index, string_format_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } else if( result == 0 ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( ( *utf32_string_index + 24 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } string_index = *utf32_string_index; utf32_string[ string_index++ ] = (uint32_t) '('; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->upper >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ' '; utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; byte_shift = 28; do { byte_value = ( internal_filetime->lower >> byte_shift ) & 0x0f; if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } byte_shift -= 4; } while( byte_shift >= 0 ); utf32_string[ string_index++ ] = (uint32_t) ')'; utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; } return( 1 ); } libpff-20120802/libcfile/0000775000175000017500000000000012006536212011765 500000000000000libpff-20120802/libcfile/libcfile_file.c0000644000175000017500000020017412005153053014620 00000000000000/* * File functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_SYS_STAT_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_FCNTL_H ) || defined( WINAPI ) #include #endif #if defined( WINAPI ) #include #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #include #endif #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_GLIB_H ) #include #include #endif #include "libcfile_definitions.h" #include "libcfile_file.h" #include "libcfile_libcerror.h" #include "libcfile_libclocale.h" #include "libcfile_libcstring.h" #include "libcfile_libuna.h" #include "libcfile_types.h" /* Initializes the file * Returns 1 if successful or -1 on error */ int libcfile_file_initialize( libcfile_file_t **file, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_initialize"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } if( *file != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file value already set.", function ); return( -1 ); } internal_file = memory_allocate_structure( libcfile_internal_file_t ); if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file.", function ); goto on_error; } if( memory_set( internal_file, 0, sizeof( libcfile_internal_file_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); goto on_error; } #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) internal_file->handle = INVALID_HANDLE_VALUE; #else internal_file->descriptor = -1; #endif *file = (libcfile_file_t *) internal_file; return( 1 ); on_error: if( internal_file != NULL ) { memory_free( internal_file ); } return( -1 ); } /* Frees the file including elements * Returns 1 if successful or -1 on error */ int libcfile_file_free( libcfile_file_t **file, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_free"; int result = 1; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } if( *file != NULL ) { internal_file = (libcfile_internal_file_t *) *file; #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) if( internal_file->handle != INVALID_HANDLE_VALUE ) #else if( internal_file->descriptor != -1 ) #endif { if( libcfile_file_close( *file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file.", function ); result = -1; } } *file = NULL; memory_free( internal_file ); } return( result ); } #if defined( WINAPI ) && ( WINVER > 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Opens a file * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcfile_file_open( libcfile_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open"; DWORD error_code = 0; DWORD file_io_access_flags = 0; DWORD file_io_creation_flags = 0; DWORD file_io_shared_flags = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle != INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - handle value already set.", function ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { file_io_access_flags = GENERIC_WRITE | GENERIC_READ; file_io_creation_flags = OPEN_ALWAYS; file_io_shared_flags = FILE_SHARE_READ; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { file_io_access_flags = GENERIC_READ; file_io_creation_flags = OPEN_EXISTING; file_io_shared_flags = FILE_SHARE_READ; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { file_io_access_flags = GENERIC_WRITE; file_io_creation_flags = OPEN_ALWAYS; file_io_shared_flags = 0; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) ) { file_io_creation_flags = CREATE_ALWAYS; } internal_file->handle = CreateFileA( (LPCSTR) filename, file_io_access_flags, file_io_shared_flags, NULL, file_io_creation_flags, FILE_ATTRIBUTE_NORMAL, NULL ); if( internal_file->handle == INVALID_HANDLE_VALUE ) { error_code = GetLastError(); switch( error_code ) { case ERROR_ACCESS_DENIED: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, error_code, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } return( 1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file open function for Windows 2000 or earlier NOT implemented yet #elif defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) && defined( _MSC_VER ) /* Opens a file * This function uses the Visual Studio C runtime library function * Returns 1 if successful or -1 on error */ int libcfile_file_open( libcfile_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open"; int file_io_permission_flags = 0; int file_io_flags = 0; int file_io_shared_flags = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { file_io_flags = _O_RDWR | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; file_io_shared_flags = _SH_DENYWR; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { file_io_flags = _O_RDONLY; file_io_shared_flags = _SH_DENYWR; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { file_io_flags = _O_WRONLY | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; file_io_shared_flags = _SH_DENYRW; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) ) { file_io_flags |= _O_TRUNC; } if( _sopen_s( &( internal_file->descriptor ), (char *) filename, file_io_flags | _O_BINARY, file_io_shared_flags, file_io_permission_flags ) != 0 ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: invalid descriptor: %d returned.", function, internal_file->descriptor ); return( -1 ); } return( 1 ); } #elif defined( HAVE_OPEN ) || defined( WINAPI ) /* Opens a file * This function uses the POSIX open function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_open( libcfile_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open"; int file_io_flags = 0; #if defined( WINAPI ) int file_io_permission_flags = 0; int file_io_flags = 0; #endif if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { #if defined( WINAPI ) file_io_flags = _O_RDWR | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; #else file_io_flags = O_RDWR | O_CREAT; #endif } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { #if defined( WINAPI ) file_io_flags = _O_RDONLY; #else file_io_flags = O_RDONLY; #endif } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { #if defined( WINAPI ) file_io_flags = _O_WRONLY | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; #else file_io_flags = O_WRONLY | O_CREAT; #endif } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) ) { #if defined( WINAPI ) file_io_flags |= _O_TRUNC; #else file_io_flags |= O_TRUNC; #endif } #if defined( WINAPI ) internal_file->descriptor = _sopen( filename, file_io_flags | _O_BINARY, file_io_permission_flags ); #elif defined( HAVE_GLIB_H ) internal_file->descriptor = g_open( filename, file_io_flags, 0644 ); #else internal_file->descriptor = open( filename, file_io_flags, 0644 ); #endif if( internal_file->descriptor == -1 ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } return( 1 ); } #else #error Missing file open function #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER > 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Opens a file * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcfile_file_open_wide( libcfile_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_wide"; DWORD error_code = 0; DWORD file_io_access_flags = 0; DWORD file_io_creation_flags = 0; DWORD file_io_shared_flags = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle != INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file - handle value already set.", function ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { file_io_access_flags = GENERIC_WRITE | GENERIC_READ; file_io_creation_flags = OPEN_ALWAYS; file_io_shared_flags = FILE_SHARE_READ; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { file_io_access_flags = GENERIC_READ; file_io_creation_flags = OPEN_EXISTING; file_io_shared_flags = FILE_SHARE_READ; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { file_io_access_flags = GENERIC_WRITE; file_io_creation_flags = OPEN_ALWAYS; file_io_shared_flags = 0; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) ) { file_io_creation_flags = CREATE_ALWAYS; } internal_file->handle = CreateFileW( (LPCWSTR) filename, file_io_access_flags, file_io_shared_flags, NULL, file_io_creation_flags, FILE_ATTRIBUTE_NORMAL, NULL ); if( internal_file->handle == INVALID_HANDLE_VALUE ) { error_code = GetLastError(); switch( error_code ) { case ERROR_ACCESS_DENIED: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, error_code, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } return( 1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file open function for Windows 2000 or earlier NOT implemented yet #elif defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) && defined( _MSC_VER ) /* Opens a file * This function uses the Visual Studio C runtime library function * Returns 1 if successful or -1 on error */ int libcfile_file_open_wide( libcfile_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_wide"; int file_io_permission_flags = 0; int file_io_flags = 0; int file_io_shared_flags = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { file_io_flags = _O_RDWR | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; file_io_shared_flags = _SH_DENYWR; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { file_io_flags = _O_RDONLY; file_io_shared_flags = _SH_DENYWR; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { file_io_flags = _O_WRONLY | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; file_io_shared_flags = _SH_DENYRW; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) ) { file_io_flags |= _O_TRUNC; } if( _wsopen_s( &( internal_file->descriptor ), (wchar_t *) filename, file_io_flags | _O_BINARY, file_io_shared_flags, file_io_permission_flags ) != 0 ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: invalid descriptor: %d returned.", function, internal_file->descriptor ); return( -1 ); } return( 1 ); } #elif defined( HAVE_OPEN ) || defined( WINAPI ) /* Opens a file * This function uses the POSIX open function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_open_wide( libcfile_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_open_wide"; int file_io_flags = 0; int result = 0; #if defined( WINAPI ) int file_io_permission_flags = 0; int file_io_flags = 0; #else char *narrow_filename = NULL; size_t filename_size = 0; size_t narrow_filename_size = 0; #endif if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { #if defined( WINAPI ) file_io_flags = _O_RDWR | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; #else file_io_flags = O_RDWR | O_CREAT; #endif } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { #if defined( WINAPI ) file_io_flags = _O_RDONLY; #else file_io_flags = O_RDONLY; #endif } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { #if defined( WINAPI ) file_io_flags = _O_WRONLY | _O_CREAT; file_io_permission_flags = _S_IREAD | _S_IWRITE; #else file_io_flags = O_WRONLY | O_CREAT; #endif } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) ) { #if defined( WINAPI ) file_io_flags |= _O_TRUNC; #else file_io_flags |= O_TRUNC; #endif } #if defined( WINAPI ) internal_file->descriptor = _wsopen( (wchar_t *) filename, file_io_flags | _O_BINARY, file_io_permission_flags ); #else filename_size = 1 + libcstring_wide_string_length( filename ); if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) filename, filename_size, &narrow_filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) filename, filename_size, &narrow_filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) filename, filename_size, libclocale_codepage, &narrow_filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) filename, filename_size, libclocale_codepage, &narrow_filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow character filename size.", function ); return( -1 ); } narrow_filename = libcstring_narrow_string_allocate( narrow_filename_size ); if( narrow_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create narrow character filename.", function ); return( -1 ); } if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_filename, narrow_filename_size, (libuna_utf32_character_t *) filename, filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_filename, narrow_filename_size, (libuna_utf16_character_t *) filename, filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_filename, narrow_filename_size, libclocale_codepage, (libuna_utf32_character_t *) filename, filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_filename, narrow_filename_size, libclocale_codepage, (libuna_utf16_character_t *) filename, filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow character filename.", function ); memory_free( narrow_filename ); return( -1 ); } #if defined( HAVE_GLIB_H ) internal_file->descriptor = g_open( narrow_filename, file_io_flags, 0644 ); #else internal_file->descriptor = open( narrow_filename, file_io_flags, 0644 ); #endif memory_free( narrow_filename ); #endif /* defined( WINAPI ) */ if( internal_file->descriptor == -1 ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } return( 1 ); } #else #error Missing file open wide function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( WINAPI ) && ( WINVER >= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Closes the file * This function uses the WINAPI function for Windows 2000 or later * Returns 0 if successful or -1 on error */ int libcfile_file_close( libcfile_file_t *file, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_close"; DWORD error_code = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( CloseHandle( internal_file->handle ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, error_code, "%s: unable to close file.", function ); return( -1 ); } internal_file->handle = INVALID_HANDLE_VALUE; return( 0 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file open function for Windows NT4 or earlier NOT implemented yet #elif defined( HAVE_CLOSE ) || defined( WINAPI ) /* Closes the file * This function uses the POSIX close function or equivalent * Returns 0 if successful or -1 on error */ int libcfile_file_close( libcfile_file_t *file, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_close"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } #if defined( WINAPI ) if( _close( internal_file->descriptor ) != 0 ) #else if( close( internal_file->descriptor ) != 0 ) #endif { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, errno, "%s: unable to close file.", function ); return( -1 ); } internal_file->descriptor = -1; return( 0 ); } #else #error Missing file close function #endif #if defined( WINAPI ) && ( WINVER > 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Reads a buffer from the file * This function uses the WINAPI function for Windows XP or later * Returns the number of bytes read if successful, or -1 on error */ ssize_t libcfile_file_read_buffer( libcfile_file_t *file, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_read_buffer"; ssize_t read_count = 0; DWORD error_code = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } #if UINT32_MAX < SSIZE_MAX if( size > (size_t) UINT32_MAX ) #else if( size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( ReadFile( internal_file->handle, buffer, (DWORD) size, (LPDWORD) &read_count, NULL ) == 0 ) { error_code = GetLastError(); switch( error_code ) { case ERROR_HANDLE_EOF: break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, error_code, "%s: unable to read from file.", function ); break; } return( -1 ); } if( read_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: invalid read count: %" PRIzd " returned.", function, read_count ); return( -1 ); } return( read_count ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file read function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_READ ) || defined( WINAPI ) /* Reads a buffer from the file * This function uses the POSIX read function or equivalent * Returns the number of bytes read if successful, or -1 on error */ ssize_t libcfile_file_read_buffer( libcfile_file_t *file, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_read_buffer"; ssize_t read_count = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } #if UINT_MAX < SSIZE_MAX if( size > (size_t) UINT_MAX ) #else if( size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) read_count = _read( internal_file->descriptor, (void *) buffer, (unsigned int) size ); #else read_count = read( internal_file->descriptor, (void *) buffer, size ); #endif if( read_count < 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, errno, "%s: unable to read from file.", function ); return( -1 ); } return( read_count ); } #else #error Missing file read function #endif #if defined( WINAPI ) && ( WINVER > 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Writes a buffer to the file * This function uses the WINAPI function for Windows XP or later * Returns the number of bytes written if successful, or -1 on error */ ssize_t libcfile_file_write_buffer( libcfile_file_t *file, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_write_buffer"; ssize_t write_count = 0; DWORD error_code = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } #if UINT32_MAX < SSIZE_MAX if( size > (size_t) UINT32_MAX ) #else if( size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( WriteFile( internal_file->handle, buffer, (DWORD) size, (LPDWORD) &write_count, NULL ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, error_code, "%s: unable to write to file.", function ); return( -1 ); } if( write_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: invalid write count: %" PRIzd " returned.", function, write_count ); return( -1 ); } return( write_count ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file write function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_WRITE ) || defined( WINAPI ) /* Writes a buffer to the file * This function uses the POSIX write function or equivalent * Returns the number of bytes written if successful, or -1 on error */ ssize_t libcfile_file_write_buffer( libcfile_file_t *file, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_write_buffer"; ssize_t write_count = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } #if UINT_MAX < SSIZE_MAX if( size > (size_t) UINT_MAX ) #else if( size > (size_t) SSIZE_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) write_count = _write( internal_file->descriptor, (void *) buffer, (unsigned int) size ); #else write_count = write( internal_file->descriptor, (void *) buffer, size ); #endif if( write_count < 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, errno, "%s: unable to write to file.", function ); return( -1 ); } return( write_count ); } #else #error Missing file write function #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) #if !defined( INVALID_SET_FILE_POINTER ) #define INVALID_SET_FILE_POINTER ((LONG) -1) #endif /* Cross Windows safe version of SetFilePointerEx * Returns TRUE if successful or FALSE on error */ BOOL libcfile_SetFilePointerEx( HANDLE file_handle, LARGE_INTEGER distance_to_move_large_integer, LARGE_INTEGER *new_file_pointer_large_integer, DWORD move_method ) { FARPROC function = NULL; HMODULE library_handle = NULL; LONG distance_to_move_lower_long = 0; LONG distance_to_move_upper_long = 0; DWORD error_number = 0; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } if( new_file_pointer_large_integer == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "SetFilePointerEx" ); if( function != NULL ) { result = function( file_handle, distance_to_move_large_integer, new_file_pointer_large_integer, move_method ); } else { #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x520 distance_to_move_lower_long = distance_to_move_large_integer.QuadPart & 0xffffffffUL; distance_to_move_upper_long = distance_to_move_large_integer.QuadPart >> 32; #else distance_to_move_lower_long = distance_to_move_large_integer.LowPart; distance_to_move_upper_long = distance_to_move_large_integer.HighPart; #endif /* TODO make sure SetFilePointer is WINAPI version safe ? Officially first supported in Windows XP */ distance_to_move_lower_long = SetFilePointer( file_handle, distance_to_move_lower_long, &distance_to_move_upper_long, move_method ); error_number = GetLastError(); if( ( distance_to_move_lower_long == (LONG) INVALID_SET_FILE_POINTER ) && ( error_number != NO_ERROR ) ) { } else { #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x520 new_file_pointer_large_integer->QuadPart = distance_to_move_upper_long; new_file_pointer_large_integer->QuadPart <<= 32; new_file_pointer_large_integer->QuadPart += distance_to_move_lower_long; #else new_file_pointer_large_integer->HighPart = distance_to_move_upper_long; new_file_pointer_large_integer->LowPart = distance_to_move_lower_long; #endif result = TRUE; } } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } #endif #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* Seeks a certain offset within the file * This function uses the WINAPI function for Windows XP (0x0501) or later * or tries to dynamically call the function for Windows 2000 (0x0500) or earlier * Returns the offset if the seek is successful or -1 on error */ off64_t libcfile_file_seek_offset( libcfile_file_t *file, off64_t offset, int whence, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_seek_offset"; LARGE_INTEGER large_integer_offset = LIBCFILE_LARGE_INTEGER_ZERO; DWORD error_code = 0; DWORD move_method = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( offset > (off64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( whence == SEEK_SET ) { move_method = FILE_BEGIN; } else if( whence == SEEK_CUR ) { move_method = FILE_CURRENT; } else if( whence == SEEK_END ) { move_method = FILE_END; } #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 large_integer_offset.QuadPart = (LONGLONG) offset; #else large_integer_offset.LowPart = (DWORD) ( 0x0ffffffffUL & offset ); large_integer_offset.HighPart = (LONG) ( offset >> 32 ); #endif #if ( WINVER <= 0x0500 ) if( libcfile_SetFilePointerEx( internal_file->handle, large_integer_offset, &large_integer_offset, move_method ) == 0 ) #else if( SetFilePointerEx( internal_file->handle, large_integer_offset, &large_integer_offset, move_method ) == 0 ) #endif { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, error_code, "%s: unable to seek offset in file.", function ); return( -1 ); } #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 offset = (off64_t) large_integer_offset.QuadPart; #else offset = ( (off64_t) large_integer_offset.HighPart << 32 ) + large_integer_offset.LowPart; #endif if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: invalid offset: %" PRIi64 " returned.", function, offset ); return( -1 ); } return( offset ); } #elif defined( HAVE_LSEEK ) || defined( WINAPI ) /* Seeks a certain offset within the file * This function uses the POSIX lseek function or equivalent * Returns the offset if the seek is successful or -1 on error */ off64_t libcfile_file_seek_offset( libcfile_file_t *file, off64_t offset, int whence, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_seek_offset"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( offset > (off64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } #if defined( WINAPI ) offset = _lseeki64( internal_file->descriptor, offset, whence ); #else offset = lseek( internal_file->descriptor, (off_t) offset, whence ); #endif if( offset < 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, errno, "%s: unable to seek offset in file.", function ); return( -1 ); } return( offset ); } #else #error Missing file lseek function #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Cross Windows safe version of SetEndOfFile * Returns TRUE if successful or FALSE on error */ BOOL libcfile_SetEndOfFile( HANDLE file_handle ) { FARPROC function = NULL; HMODULE library_handle = NULL; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "SetEndOfFile" ); if( function != NULL ) { result = function( file_handle ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } #endif #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* Resizes the file * This function uses the WINAPI function for Windows XP (0x0501) or later * or tries to dynamically call the function for Windows 2000 (0x0500) or earlier * Returns 1 if successful or -1 on error */ int libcfile_file_resize( libcfile_file_t *file, size64_t size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_resize"; off64_t offset = 0; LARGE_INTEGER large_integer_offset = LIBCFILE_LARGE_INTEGER_ZERO; DWORD error_code = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 large_integer_offset.QuadPart = (LONGLONG) size; #else large_integer_offset.LowPart = (DWORD) ( 0x0ffffffffUL & size ); large_integer_offset.HighPart = (LONG) ( size >> 32 ); #endif #if ( WINVER <= 0x0500 ) if( libcfile_SetFilePointerEx( internal_file->handle, large_integer_offset, &large_integer_offset, FILE_BEGIN ) == 0 ) #else if( SetFilePointerEx( internal_file->handle, large_integer_offset, &large_integer_offset, FILE_BEGIN ) == 0 ) #endif { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, error_code, "%s: unable to seek offset in file.", function ); return( -1 ); } #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 offset = (off64_t) large_integer_offset.QuadPart; #else offset = ( (off64_t) large_integer_offset.HighPart << 32 ) + large_integer_offset.LowPart; #endif if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: invalid offset: %" PRIi64 " returned.", function, offset ); return( -1 ); } #if ( WINVER <= 0x0500 ) if( libcfile_SetEndOfFile( internal_file->handle ) == 0 ) #else if( SetEndOfFile( internal_file->handle ) == 0 ) #endif { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, error_code, "%s: unable to resize file.", function ); return( -1 ); } return( 1 ); } #elif defined( HAVE_FTRUNCATE ) || defined( WINAPI ) /* Resizes the file * This function uses the POSIX truncate function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_resize( libcfile_file_t *file, size64_t size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_resize"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) if( _chsize( internal_file->descriptor, size ) != 0 ) #else if( ftruncate( internal_file->descriptor, size ) != 0 ) #endif { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, errno, "%s: unable to resize file.", function ); return( -1 ); } return( 1 ); } #else #error Missing file truncate function #endif /* Checks if the file is open * Returns 1 if open, 0 if not or -1 on error */ int libcfile_file_is_open( libcfile_file_t *file, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_is_open"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) if( internal_file->handle == INVALID_HANDLE_VALUE ) #else if( internal_file->descriptor == -1 ) #endif { return( 0 ); } return( 1 ); } #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Cross Windows safe version of GetFileSizeEx * Returns TRUE if successful or FALSE on error */ BOOL libcfile_GetFileSizeEx( HANDLE file_handle, LARGE_INTEGER *file_size_large_integer ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD error_number = 0; DWORD file_size_upper_dword = 0; DWORD file_size_lower_dword = 0; BOOL result = FALSE; if( file_handle == NULL ) { return( FALSE ); } if( file_size_large_integer == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "GetFileSizeEx" ); if( function != NULL ) { result = function( file_handle, file_size_large_integer ); } else { /* TODO make sure GetFileSize is WINAPI version safe ? Officially first supported in Windows XP */ file_size_lower_dword = GetFileSize( file_handle, &file_size_upper_dword ); error_number = GetLastError(); if( ( file_size_lower_dword == INVALID_FILE_SIZE ) && ( error_number != NO_ERROR ) ) { } else { #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x520 file_size_large_integer->QuadPart = file_size_upper_dword; file_size_large_integer->QuadPart <<= 32; file_size_large_integer->QuadPart += file_size_lower_dword; #else file_size_large_integer->HighPart = file_size_upper_dword; file_size_large_integer->LowPart = file_size_lower_dword; #endif result = TRUE; } } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } #endif #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* Retrieves the current offset in the file * This function uses the WINAPI function for Windows XP (0x0501) or later * or tries to dynamically call the function for Windows 2000 (0x0500) or earlier * Returns 1 if successful or -1 on error */ int libcfile_file_get_offset( libcfile_file_t *file, off64_t *offset, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_get_offset"; LARGE_INTEGER large_integer_offset = LIBCFILE_LARGE_INTEGER_ZERO; DWORD error_code = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( 1 ); } #if ( WINVER <= 0x0500 ) if( libcfile_SetFilePointerEx( internal_file->handle, large_integer_offset, &large_integer_offset, FILE_CURRENT ) == 0 ) #else if( SetFilePointerEx( internal_file->handle, large_integer_offset, &large_integer_offset, FILE_CURRENT ) == 0 ) #endif { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, error_code, "%s: unable to seek offset in file.", function ); return( -1 ); } #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 *offset = (off64_t) large_integer_offset.QuadPart; #else *offset = ( (off64_t) large_integer_offset.HighPart << 32 ) + large_integer_offset.LowPart; #endif if( *offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: invalid offset: %" PRIi64 " returned.", function, *offset ); return( -1 ); } return( 1 ); } #elif defined( HAVE_LSEEK ) || defined( WINAPI ) /* Retrieves the current offset in the file * This function uses the POSIX lseek function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_get_offset( libcfile_file_t *file, off64_t *offset, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_get_offset"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( 1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( 1 ); } #if defined( WINAPI ) *offset = _lseeki64( internal_file->descriptor, 0, SEEK_CUR ); #else *offset = lseek( internal_file->descriptor, 0, SEEK_CUR ); #endif if( *offset < 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, errno, "%s: unable to seek offset in file.", function ); return( -1 ); } return( 1 ); } #else #error Missing file lseek function #endif #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* Retrieves the size of the file * This function uses the WINAPI function for Windows XP (0x0501) or later * or tries to dynamically call the function for Windows 2000 (0x0500) or earlier * Returns 1 if successful or -1 on error */ int libcfile_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ) { libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_get_size"; LARGE_INTEGER large_integer_size = LIBCFILE_LARGE_INTEGER_ZERO; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->handle == INVALID_HANDLE_VALUE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing handle.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } /* TODO implement device support ? */ #if ( WINVER <= 0x0500 ) if( libcfile_GetFileSizeEx( internal_file->handle, &large_integer_size ) == 0 ) #else if( GetFileSizeEx( internal_file->handle, &large_integer_size ) == 0 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file size.", function ); return( -1 ); } #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x520 *size = (size64_t) large_integer_size.QuadPart; #else *size = ( (size64_t) large_integer_size.HighPart << 32 ) + large_integer_size.LowPart; #endif return( 1 ); } #elif defined( HAVE_FSTAT ) || defined( WINAPI ) /* Retrieves the size of the file * This function uses the POSIX fstat function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ) { #if defined( _MSC_VER ) struct __stat64 file_statistics; #elif defined( __BORLANDC__ ) struct stati64 file_statistics; #else struct stat file_statistics; #endif libcfile_internal_file_t *internal_file = NULL; static char *function = "libcfile_file_get_size"; off64_t current_offset = 0; off64_t offset = 0; size_t file_statistics_size = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libcfile_internal_file_t *) file; if( internal_file->descriptor == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing descriptor.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } #if defined( _MSC_VER ) file_statistics_size = sizeof( struct __stat64 ); #elif defined( __BORLANDC__ ) file_statistics_size = sizeof( struct stati64 ); #else file_statistics_size = sizeof( struct stat ); #endif if( memory_set( &file_statistics, 0, file_statistics_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file statistics.", function ); return( -1 ); } #if defined( _MSC_VER ) if( _fstat64( internal_file->descriptor, &file_statistics ) != 0 ) #elif defined( __BORLANDC__ ) if( _fstati64( internal_file->descriptor, &file_statistics ) != 0 ) #else if( fstat( internal_file->descriptor, &file_statistics ) != 0 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file statistics.", function ); return( -1 ); } /* TODO implement device support ? */ if( S_ISBLK( file_statistics.st_mode ) || S_ISCHR( file_statistics.st_mode ) ) { if( libcfile_file_get_offset( file, ¤t_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current offset.", function ); return( -1 ); } /* If the file is a device try to seek the end of the file */ /* TODO does not work on mac os x */ offset = libcfile_file_seek_offset( file, 0, SEEK_END, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek end of file.", function ); return( -1 ); } *size = (size64_t) offset; offset = libcfile_file_seek_offset( file, current_offset, SEEK_SET, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset: %" PRIi64 ".", function, current_offset ); return( -1 ); } } else { *size = (size64_t) file_statistics.st_size; } return( 1 ); } #else #error Missing file get size function #endif libpff-20120802/libcfile/libcfile_libclocale.h0000644000175000017500000000254612005153053016002 00000000000000/* * The internal libclocale header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBCLOCALE_H ) #define _LIBCFILE_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcfile/libcfile_support.c0000644000175000017500000002453712005153053015424 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_SYS_STAT_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #include "libcfile_definitions.h" #include "libcfile_libcerror.h" #include "libcfile_libclocale.h" #include "libcfile_libcstring.h" #include "libcfile_libuna.h" #include "libcfile_support.h" #if !defined( HAVE_LOCAL_LIBCFILE ) /* Returns the library version as a string */ const char *libcfile_get_version( void ) { return( (const char *) LIBCFILE_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ #if defined( WINAPI ) && ( WINVER > 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Determines if a file exists using get file attibutes * This function uses the WINAPI functions for Windows XP or later * Returns 1 if the file exists, 0 if not or -1 on error */ int libcfile_file_exists( const char *filename, libcerror_error_t **error ) { static char *function = "libcfile_file_exists"; int result = 1; DWORD error_code = 0; DWORD file_attributes = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } file_attributes = GetFileAttributesA( (LPCSTR) filename ); if( file_attributes == INVALID_FILE_ATTRIBUTES ) { error_code = GetLastError(); switch( error_code ) { case ERROR_ACCESS_DENIED: result = 1; break; case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: result = 0; break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, error_code, "%s: unable to determine attributes of file: %s.", function, filename ); return( -1 ); } } return( result ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file stat function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_STAT ) && !defined( WINAPI ) /* Determines if a file exists * This function uses the POSIX stat function or equivalent * Returns 1 if the file exists, 0 if not or -1 on error */ int libcfile_file_exists( const char *filename, libcerror_error_t **error ) { struct stat file_statistics; static char *function = "libcfile_file_exists"; int result = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( memory_set( &file_statistics, 0, sizeof( struct stat ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file statistics.", function ); return( -1 ); } result = stat( filename, &file_statistics ); if( result != 0 ) { switch( errno ) { case EACCES: result = 1; break; case ENOENT: result = 0; break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, errno, "%s: unable to stat file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); return( -1 ); } } else { result = 1; } return( result ); } #else #error Missing file exists function #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER > 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Determines if a file exists using get file attibutes * This function uses the WINAPI functions for Windows XP or later * Returns 1 if the file exists, 0 if not or -1 on error */ int libcfile_file_exists_wide( const wchar_t *filename, libcerror_error_t **error ) { static char *function = "libcfile_file_exists_wide"; int result = 1; DWORD error_code = 0; DWORD file_attributes = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } file_attributes = GetFileAttributesW( (LPCWSTR) filename ); if( file_attributes == INVALID_FILE_ATTRIBUTES ) { error_code = GetLastError(); switch( error_code ) { case ERROR_ACCESS_DENIED: result = 1; break; case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: result = 0; break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, error_code, "%s: unable to determine attributes of file: %ls.", function, filename ); return( -1 ); } } return( result ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI file stat function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_STAT ) && !defined( WINAPI ) /* Determines if a file exists * This function uses the POSIX stat function or equivalent * Returns 1 if the file exists, 0 if not or -1 on error */ int libcfile_file_exists_wide( const wchar_t *filename, libcerror_error_t **error ) { struct stat file_statistics; char *narrow_filename = NULL; static char *function = "libcfile_file_exists_wide"; size_t narrow_filename_size = 0; size_t filename_size = 0; int result = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } filename_size = 1 + libcstring_wide_string_length( filename ); /* Convert the filename to a narrow string * if the platform has no wide character open function */ if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) filename, filename_size, &narrow_filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) filename, filename_size, &narrow_filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) filename, filename_size, libclocale_codepage, &narrow_filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) filename, filename_size, libclocale_codepage, &narrow_filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow character filename size.", function ); return( -1 ); } narrow_filename = libcstring_narrow_string_allocate( narrow_filename_size ); if( narrow_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create narrow character filename.", function ); return( -1 ); } if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_filename, narrow_filename_size, (libuna_utf32_character_t *) filename, filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_filename, narrow_filename_size, (libuna_utf16_character_t *) filename, filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_filename, narrow_filename_size, libclocale_codepage, (libuna_utf32_character_t *) filename, filename_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_filename, narrow_filename_size, libclocale_codepage, (libuna_utf16_character_t *) filename, filename_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set narrow character filename.", function ); memory_free( narrow_filename ); return( -1 ); } result = stat( narrow_filename, &file_statistics ); memory_free( narrow_filename ); if( result != 0 ) { switch( errno ) { case EACCES: result = 1; break; case ENOENT: result = 0; break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, errno, "%s: unable to stat file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); return( -1 ); } } else { result = 1; } return( result ); } #else #error Missing file exists wide function #endif #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/libcfile/libcfile_libcstring.h0000644000175000017500000000262412005153053016046 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBCSTRING_H ) #define _LIBCFILE_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcfile/libcfile_support.h0000644000175000017500000000300112005153053015410 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_SUPPORT_H ) #define _LIBCFILE_SUPPORT_H #include #include #include "libcfile_extern.h" #include "libcfile_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCFILE ) LIBCFILE_EXTERN \ const char *libcfile_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ LIBCFILE_EXTERN \ int libcfile_file_exists( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCFILE_EXTERN \ int libcfile_file_exists_wide( const wchar_t *filename, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcfile/libcfile_error.c0000644000175000017500000000471112005153053015031 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcfile_error.h" #include "libcfile_libcerror.h" #if !defined( HAVE_LOCAL_LIBCFILE ) /* Free an error and its elements */ void libcfile_error_free( libcfile_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcfile_error_fprint( libcfile_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libcfile_error_sprint( libcfile_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcfile_error_backtrace_fprint( libcfile_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libcfile_error_backtrace_sprint( libcfile_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ libpff-20120802/libcfile/Makefile.am0000644000175000017500000000150712005153053013737 00000000000000if HAVE_LOCAL_LIBCFILE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcfile.la libcfile_la_SOURCES = \ libcfile_definitions.h \ libcfile_error.c libcfile_error.h \ libcfile_extern.h \ libcfile_file.c libcfile_file.h \ libcfile_libcerror.h \ libcfile_libclocale.h \ libcfile_libcstring.h \ libcfile_libuna.h \ libcfile_stream.c libcfile_stream.h \ libcfile_support.c libcfile_support.h \ libcfile_types.h \ libcfile_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) libpff-20120802/libcfile/libcfile_stream.h0000644000175000017500000000573112005153053015203 00000000000000/* * File stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_STREAM_H ) #define _LIBCFILE_INTERNAL_STREAM_H #include #include #if defined( HAVE_GLIB_H ) #include #include #endif #include #include "libcfile_extern.h" #include "libcfile_libcerror.h" #include "libcfile_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcfile_internal_stream libcfile_internal_stream_t; struct libcfile_internal_stream { /* TODO #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) HANDLE handle; #else FILE *stream; #endif */ FILE *stream; }; LIBCFILE_EXTERN \ int libcfile_stream_initialize( libcfile_stream_t **stream, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_stream_free( libcfile_stream_t **stream, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_stream_open( libcfile_stream_t *stream, const char *filename, int access_flags, libcerror_error_t **error ); /* TODO */ #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCFILE_EXTERN \ int libcfile_stream_open_wide( libcfile_stream_t *stream, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBCFILE_EXTERN \ int libcfile_stream_close( libcfile_stream_t *stream, libcerror_error_t **error ); LIBCFILE_EXTERN \ ssize_t libcfile_stream_read_buffer( libcfile_stream_t *stream, uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBCFILE_EXTERN \ ssize_t libcfile_stream_write_buffer( libcfile_stream_t *stream, const uint8_t *buffer, size_t size, libcerror_error_t **error ); LIBCFILE_EXTERN \ off64_t libcfile_stream_seek_offset( libcfile_stream_t *stream, off64_t offset, int whence, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_stream_get_offset( libcfile_stream_t *stream, off64_t *offset, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_stream_get_size( libcfile_stream_t *stream, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcfile/libcfile_stream.c0000644000175000017500000004571512005153053015204 00000000000000/* * File stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_GLIB_H ) #include #include #endif #include #include "libcfile_definitions.h" #include "libcfile_libcerror.h" #include "libcfile_libclocale.h" #include "libcfile_libcstring.h" #include "libcfile_stream.h" #include "libcfile_types.h" /* Initializes the file stream * Returns 1 if successful or -1 on error */ int libcfile_stream_initialize( libcfile_stream_t **stream, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_initialize"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( 1 ); } if( *stream != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid stream value already set.", function ); return( -1 ); } internal_stream = memory_allocate_structure( libcfile_internal_stream_t ); if( internal_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create stream.", function ); goto on_error; } if( memory_set( internal_stream, 0, sizeof( libcfile_internal_stream_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear stream.", function ); goto on_error; } /* TODO #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) internal_stream->handle = INVALID_HANDLE_VALUE; #endif */ *stream = (libcfile_stream_t *) internal_stream; return( 1 ); on_error: if( internal_stream != NULL ) { memory_free( internal_stream ); } return( -1 ); } /* Frees the file stream including elements * Returns 1 if successful or -1 on error */ int libcfile_stream_free( libcfile_stream_t **stream, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_free"; int result = 1; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( 1 ); } if( *stream != NULL ) { internal_stream = (libcfile_internal_stream_t *) *stream; /* TODO #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) if( internal_stream->handle != INVALID_HANDLE_VALUE ) #else if( internal_stream->stream != NULL ) #endif */ if( internal_stream->stream != NULL ) { if( libcfile_stream_close( *stream, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close stream.", function ); result = -1; } } *stream = NULL; memory_free( internal_stream ); } return( result ); } #if defined( HAVE_FOPEN ) || defined( WINAPI ) /* Opens a file stream * This function uses the POSIX fopen function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_stream_open( libcfile_stream_t *stream, const char *filename, int access_flags, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; const char *stream_io_mode = NULL; static char *function = "libcfile_stream_open"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( ( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) && ( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) ) { if( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) { stream_io_mode = "wb+"; } else { stream_io_mode = "ab+"; } } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_READ ) != 0 ) { stream_io_mode = "rb"; } else if( ( access_flags & LIBCFILE_ACCESS_FLAG_WRITE ) != 0 ) { if( ( access_flags & LIBCFILE_ACCESS_FLAG_TRUNCATE ) != 0 ) { stream_io_mode = "wb"; } else { stream_io_mode = "ab"; } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags: 0x%02x.", function, access_flags ); return( -1 ); } #if defined( HAVE_GLIB_H ) internal_stream->stream = g_fopen( filename, stream_io_mode ); #else internal_stream->stream = fopen( filename, stream_io_mode ); #endif if( internal_stream->stream == NULL ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; default: libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, errno, "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".", function, filename ); break; } return( -1 ); } return( 1 ); } #else #error Missing file stream open function #endif /* TODO */ /* wide character FILE stream open */ #if defined( WINAPI ) #define file_stream_open_wide( filename, mode ) \ _wfopen( filename, mode ) #endif #if defined( HAVE_FCLOSE ) || defined( WINAPI ) /* Closes the file stream * This function uses the POSIX fclose function or equivalent * Returns 0 if successful or -1 on error */ int libcfile_stream_close( libcfile_stream_t *stream, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_close"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( internal_stream->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing stream.", function ); return( -1 ); } if( fclose( internal_stream->stream ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, errno, "%s: unable to close stream.", function ); return( -1 ); } internal_stream->stream = NULL; return( 0 ); } #else #error Missing file stream close function #endif #if defined( HAVE_FREAD ) || defined( WINAPI ) /* Reads a buffer from the file stream * This function uses the POSIX fread function or equivalent * Returns the number of bytes read if successful, or -1 on error */ ssize_t libcfile_stream_read_buffer( libcfile_stream_t *stream, uint8_t *buffer, size_t size, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_read_buffer"; size_t read_count = 0; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( 1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( internal_stream->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing stream.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } read_count = fread( (void *) buffer, 1, size, internal_stream->stream ); if( ( read_count == 0 ) || ( read_count != size ) ) { if( feof( internal_stream->stream ) == 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, errno, "%s: unable to read from stream.", function ); clearerr( internal_stream->stream ); return( -1 ); } clearerr( internal_stream->stream ); } return( (ssize_t) read_count ); } #else #error Missing file read function #endif #if defined( HAVE_FWRITE ) || defined( WINAPI ) /* Writes a buffer to the file stream * This function uses the POSIX fwrite function or equivalent * Returns the number of bytes written if successful, or -1 on error */ ssize_t libcfile_stream_write_buffer( libcfile_stream_t *stream, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_write_buffer"; ssize_t write_count = 0; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( 1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( internal_stream->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing stream.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } write_count = fwrite( (void *) buffer, 1, size, internal_stream->stream ); if( write_count == 0 ) { if( feof( internal_stream->stream ) == 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, errno, "%s: unable to write to stream.", function ); clearerr( internal_stream->stream ); return( -1 ); } clearerr( internal_stream->stream ); } return( write_count ); } #else #error Missing file stream write function #endif #if ( defined( HAVE_FSEEKO ) && defined( HAVE_FTELLO ) ) || ( defined( HAVE_FSEEKO64 ) && defined( HAVE_FTELLO64 ) ) || defined( WINAPI ) /* Seeks a certain offset within the file stream * This function uses the POSIX fseeko and ftello functions or equivalent * Returns the offset if the seek is successful or -1 on error */ off64_t libcfile_stream_seek_offset( libcfile_stream_t *stream, off64_t offset, int whence, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_seek_offset"; int result = 0; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( 1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( internal_stream->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing stream.", function ); return( -1 ); } #if defined( WINAPI ) && ( LONG_MAX < INT64_MAX ) if( offset > (off64_t) LONG_MAX ) #else if( offset > (off64_t) INT64_MAX ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset value exceeds maximum.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } #if defined( WINAPI ) result = fseek( internal_stream->stream, (long) offset, whence ); #elif defined( HAVE_FSEEKO64 ) && !defined( HAVE_FSEEKO ) result = fseeko64( internal_stream->stream, offset, whence ); #else result = fseeko( internal_stream->stream, (off_t) offset, whence ); #endif if( result != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, errno, "%s: unable to seek offset in stream.", function ); return( -1 ); } #if defined( WINAPI ) offset = (off64_t) ftell( internal_stream->stream ); #elif defined( HAVE_FTELLO64 ) && !defined( HAVE_FTELLO ) offset = ftello64( internal_stream->stream ); #else offset = (off64_t) ftello( internal_stream->stream ); #endif if( offset < 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, errno, "%s: unable to get offset from stream.", function ); return( -1 ); } return( offset ); } #else #error Missing file fstream seeko and ftello function #endif #if defined( HAVE_FTELLO ) || defined( HAVE_FTELLO64 ) || defined( WINAPI ) /* Retrieves the current offset in the file stream * This function uses the POSIX ftello function or equivalent * Returns 1 if successful or -1 on error */ int libcfile_stream_get_offset( libcfile_stream_t *stream, off64_t *offset, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_get_offset"; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( 1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( internal_stream->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing stream.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( 1 ); } #if defined( WINAPI ) *offset = (off64_t) ftell( internal_stream->stream ); #elif defined( HAVE_FTELLO64 ) && !defined( HAVE_FTELLO ) *offset = ftello64( internal_stream->stream ); #else *offset = (off64_t) ftello( internal_stream->stream ); #endif if( *offset < 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, errno, "%s: unable to get offset from stream.", function ); return( -1 ); } return( 1 ); } #else #error Missing file stream ftello function #endif #if ( defined( HAVE_FSEEKO ) && defined( HAVE_FTELLO ) ) || ( defined( HAVE_FSEEKO64 ) && defined( HAVE_FTELLO64 ) ) || defined( WINAPI ) /* Retrieves the size of the file stream * This function uses the POSIX fseeko and ftello functions or equivalent * Returns 1 if successful or -1 on error */ int libcfile_stream_get_size( libcfile_stream_t *stream, size64_t *size, libcerror_error_t **error ) { libcfile_internal_stream_t *internal_stream = NULL; static char *function = "libcfile_stream_get_size"; off64_t current_offset = 0; off64_t offset = 0; if( stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid stream.", function ); return( -1 ); } internal_stream = (libcfile_internal_stream_t *) stream; if( internal_stream->stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid stream - missing stream.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( libcfile_stream_get_offset( stream, ¤t_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to get current offset.", function ); return( -1 ); } offset = libcfile_stream_seek_offset( stream, 0, SEEK_END, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek end of stream.", function ); return( -1 ); } *size = (size64_t) offset; offset = libcfile_stream_seek_offset( stream, current_offset, SEEK_SET, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset: %" PRIi64 ".", function, current_offset ); return( -1 ); } return( 1 ); } #else #error Missing file stream get size function #endif libpff-20120802/libcfile/libcfile_libcerror.h0000644000175000017500000000252312005153053015667 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBCERROR_H ) #define _LIBCFILE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcfile/libcfile_unused.h0000644000175000017500000000247012005153053015210 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_UNUSED_H ) #define _LIBCFILE_INTERNAL_UNUSED_H #include #if !defined( LIBCFILE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCFILE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCFILE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCFILE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCFILE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libcfile/libcfile_types.h0000644000175000017500000000263012005153053015047 00000000000000/* * The internal type definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_TYPES_H ) #define _LIBCFILE_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile * The definitions in are copied here * for local use of libcfile */ #if defined( HAVE_LOCAL_LIBCFILE ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libcfile_file {} libcfile_file_t; typedef struct libcfile_stream {} libcfile_stream_t; #else typedef intptr_t libcfile_file_t; typedef intptr_t libcfile_stream_t; #endif #endif #endif libpff-20120802/libcfile/libcfile_extern.h0000644000175000017500000000241412005153053015210 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_EXTERN_H ) #define _LIBCFILE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if !defined( HAVE_LOCAL_LIBCFILE ) /* If libtool DLL support is enabled set LIBCFILE_DLL_EXPORT * before including libcfile/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCFILE_DLL_EXPORT #endif #include #else #define LIBCFILE_EXTERN extern #endif #endif libpff-20120802/libcfile/libcfile_definitions.h0000644000175000017500000000521212005153053016215 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCFILE_INTERNAL_DEFINITIONS_H ) #define LIBCFILE_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if !defined( HAVE_LOCAL_LIBCFILE ) #include /* The definitions in are copied here * for local use of libcfile */ #else #define LIBCFILE_VERSION 20120630 /* The libcstring version string */ #define LIBCFILE_VERSION_STRING "20120630" /* The file access flags * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3 set to 1 to truncate an existing file on write * bit 4-8 not used */ #define LIBCFILE_ACCESS_FLAG_READ 0x01 #define LIBCFILE_ACCESS_FLAG_WRITE 0x02 #define LIBCFILE_ACCESS_FLAG_TRUNCATE 0x04 /* The file access macros */ #define LIBCFILE_OPEN_READ \ ( LIBCFILE_ACCESS_FLAG_READ ) #define LIBCFILE_OPEN_WRITE \ ( LIBCFILE_ACCESS_FLAG_WRITE ) #define LIBCFILE_OPEN_READ_WRITE \ ( LIBCFILE_ACCESS_FLAG_READ | LIBCFILE_ACCESS_FLAG_WRITE ) #define LIBCFILE_OPEN_WRITE_TRUNCATE \ ( LIBCFILE_ACCESS_FLAG_WRITE | LIBCFILE_ACCESS_FLAG_TRUNCATE ) #define LIBCFILE_OPEN_READ_WRITE_TRUNCATE \ ( LIBCFILE_ACCESS_FLAG_READ | LIBCFILE_ACCESS_FLAG_WRITE | LIBCFILE_ACCESS_FLAG_TRUNCATE ) #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ /* Platform specific macros */ #if defined( WINAPI ) #if defined( _MSC_VER ) #define LIBCFILE_LARGE_INTEGER_ZERO { 0, 0 } #elif defined( __BORLANDC__ ) #define LIBCFILE_LARGE_INTEGER_ZERO { 0 } #elif defined( __CYGWIN__ ) #define LIBCFILE_LARGE_INTEGER_ZERO { { 0, 0 } } #elif defined( __MINGW32_VERSION ) || defined( __MINGW64_VERSION_MAJOR ) #define LIBCFILE_LARGE_INTEGER_ZERO { { 0, 0 } } #endif #if !defined( INVALID_FILE_ATTRIBUTES ) #define INVALID_FILE_ATTRIBUTES ( (DWORD) -1 ) #endif #endif /* defined( WINAPI ) */ #endif libpff-20120802/libcfile/libcfile_file.h0000644000175000017500000001013712005153053014623 00000000000000/* * File functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_FILE_H ) #define _LIBCFILE_INTERNAL_FILE_H #include #include #include "libcfile_extern.h" #include "libcfile_libcerror.h" #include "libcfile_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcfile_internal_file libcfile_internal_file_t; struct libcfile_internal_file { #if defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) HANDLE handle; #else int descriptor; #endif }; LIBCFILE_EXTERN \ int libcfile_file_initialize( libcfile_file_t **file, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_free( libcfile_file_t **file, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_open( libcfile_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCFILE_EXTERN \ int libcfile_file_open_wide( libcfile_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ LIBCFILE_EXTERN \ int libcfile_file_close( libcfile_file_t *file, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* TODO implement */ BOOL libcfile_ReadFile( HANDLE file_handle, LPVOID buffer, DWORD read_size, DWORD *read_count, LPOVERLAPPED overlapped ); #endif LIBCFILE_EXTERN \ ssize_t libcfile_file_read_buffer( libcfile_file_t *file, uint8_t *buffer, size_t size, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* TODO implement */ BOOL libcfile_WriteFile( HANDLE file_handle, LPVOID buffer, DWORD write_size, DWORD *write_count, LPOVERLAPPED overlapped ); #endif LIBCFILE_EXTERN \ ssize_t libcfile_file_write_buffer( libcfile_file_t *file, const uint8_t *buffer, size_t size, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) BOOL libcfile_SetFilePointerEx( HANDLE file_handle, LARGE_INTEGER distance_to_move_large_integer, LARGE_INTEGER *new_file_pointer_large_integer, DWORD move_method ); #endif LIBCFILE_EXTERN \ off64_t libcfile_file_seek_offset( libcfile_file_t *file, off64_t offset, int whence, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) BOOL libcfile_SetEndOfFile( HANDLE file_handle ); #endif LIBCFILE_EXTERN \ int libcfile_file_resize( libcfile_file_t *file, size64_t size, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_is_open( libcfile_file_t *file, libcerror_error_t **error ); #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) BOOL libcfile_GetFileSizeEx( HANDLE file_handle, LARGE_INTEGER *file_size_large_integer ); #endif LIBCFILE_EXTERN \ int libcfile_file_get_offset( libcfile_file_t *file, off64_t *offset, libcerror_error_t **error ); LIBCFILE_EXTERN \ int libcfile_file_get_size( libcfile_file_t *file, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcfile/libcfile_error.h0000644000175000017500000000332312005153053015034 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_INTERNAL_ERROR_H ) #define _LIBCFILE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCFILE ) #include #endif #include "libcfile_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCFILE ) LIBCFILE_EXTERN \ void libcfile_error_free( libcfile_error_t **error ); LIBCFILE_EXTERN \ int libcfile_error_fprint( libcfile_error_t *error, FILE *stream ); LIBCFILE_EXTERN \ int libcfile_error_sprint( libcfile_error_t *error, char *string, size_t size ); LIBCFILE_EXTERN \ int libcfile_error_backtrace_fprint( libcfile_error_t *error, FILE *stream ); LIBCFILE_EXTERN \ int libcfile_error_backtrace_sprint( libcfile_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcfile/Makefile.in0000664000175000017500000006277112006536015013770 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcfile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcfile_la_LIBADD = am__libcfile_la_SOURCES_DIST = libcfile_definitions.h libcfile_error.c \ libcfile_error.h libcfile_extern.h libcfile_file.c \ libcfile_file.h libcfile_libcerror.h libcfile_libclocale.h \ libcfile_libcstring.h libcfile_libuna.h libcfile_stream.c \ libcfile_stream.h libcfile_support.c libcfile_support.h \ libcfile_types.h libcfile_unused.h @HAVE_LOCAL_LIBCFILE_TRUE@am_libcfile_la_OBJECTS = libcfile_error.lo \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_file.lo libcfile_stream.lo \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.lo libcfile_la_OBJECTS = $(am_libcfile_la_OBJECTS) @HAVE_LOCAL_LIBCFILE_TRUE@am_libcfile_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcfile_la_SOURCES) DIST_SOURCES = $(am__libcfile_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCFILE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCFILE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCFILE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBCFILE_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCFILE_TRUE@noinst_LTLIBRARIES = libcfile.la @HAVE_LOCAL_LIBCFILE_TRUE@libcfile_la_SOURCES = \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_definitions.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_error.c libcfile_error.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_extern.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_file.c libcfile_file.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libcerror.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libclocale.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libcstring.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libuna.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_stream.c libcfile_stream.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.c libcfile_support.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_types.h \ @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcfile/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcfile.la: $(libcfile_la_OBJECTS) $(libcfile_la_DEPENDENCIES) $(LINK) $(am_libcfile_la_rpath) $(libcfile_la_OBJECTS) $(libcfile_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcfile ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcfile_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcfile/libcfile_libuna.h0000644000175000017500000000314312005153053015155 00000000000000/* * The internal libuna header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCFILE_LIBUNA_H ) #define _LIBCFILE_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfwnt/0000775000175000017500000000000012006536213011662 500000000000000libpff-20120802/libfwnt/libfwnt_libcerror.h0000644000175000017500000000252111765042654015475 00000000000000/* * The internal libcerror header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_LIBCERROR_H ) #define _LIBFWNT_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfwnt/libfwnt_support.c0000644000175000017500000000215311765042654015222 00000000000000/* * Support functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_definitions.h" #include "libfwnt_support.h" #if !defined( HAVE_LOCAL_LIBFWNT ) /* Returns the library version as a string */ const char *libfwnt_get_version( void ) { return( (const char *) LIBFWNT_VERSION_STRING ); } #endif libpff-20120802/libfwnt/Makefile.am0000644000175000017500000000134011765042654013646 00000000000000if HAVE_LOCAL_LIBFWNT AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfwnt.la libfwnt_la_SOURCES = \ libfwnt_definitions.h \ libfwnt_extern.h \ libfwnt_error.c libfwnt_error.h \ libfwnt_libcerror.h \ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ libfwnt_security_identifier.c libfwnt_security_identifier.h \ libfwnt_support.c libfwnt_support.h \ libfwnt_types.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfwnt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwnt_la_SOURCES) libpff-20120802/libfwnt/libfwnt_locale_identifier.c0000644000175000017500000004472711765042654017164 00000000000000/* * Locale identifier (LCID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_locale_identifier.h" #if defined( HAVE_DEBUG_OUTPUT ) libfwnt_locale_identifier_language_tag_t libfwnt_locale_identifier_language_tags[ ] = { { 0x0001, "ar", "Arabic" }, { 0x0002, "bg", "Bulgarian" }, { 0x0003, "ca", "Catalan" }, { 0x0004, "zh-Hans", "Chinese, Han (Simplified variant)" }, { 0x0005, "cs", "Czech" }, { 0x0006, "da", "Danish" }, { 0x0007, "de", "German" }, { 0x0008, "el", "Modern Greek (1453-)" }, { 0x0009, "en", "English" }, { 0x000a, "es", "Spanish" }, { 0x000b, "fi", "Finnish" }, { 0x000c, "fr", "French" }, { 0x000d, "he", "Hebrew" }, { 0x000e, "hu", "Hungarian" }, { 0x000f, "is", "Icelandic" }, { 0x0010, "it", "Italian" }, { 0x0011, "ja", "Japanese" }, { 0x0012, "ko", "Korean" }, { 0x0013, "nl", "Dutch" }, { 0x0014, "no", "Norwegian" }, { 0x0015, "pl", "Polish" }, { 0x0016, "pt", "Portuguese" }, { 0x0017, "rm", "Romansh" }, { 0x0018, "ro", "Romanian" }, { 0x0019, "ru", "Russian" }, { 0x001a, "hr", "Croatian" }, { 0x001b, "sk", "Slovak" }, { 0x001c, "sq", "Albanian" }, { 0x001d, "sv", "Swedish" }, { 0x001e, "th", "Thai" }, { 0x001f, "tr", "Turkish" }, { 0x0020, "ur", "Urdu" }, { 0x0021, "id", "Indonesian" }, { 0x0022, "uk", "Ukrainian" }, { 0x0023, "be", "Belarusian" }, { 0x0024, "sl", "Slovenian" }, { 0x0025, "et", "Estonian" }, { 0x0026, "lv", "Latvian" }, { 0x0027, "lt", "Lithuanian" }, { 0x0028, "tg", "Tajik" }, { 0x0029, "fa", "Persian" }, { 0x002a, "vi", "Vietnamese" }, { 0x002b, "hy", "Armenian" }, { 0x002c, "az", "Azerbaijani" }, { 0x002d, "eu", "Basque" }, { 0x002e, "hsb", "Upper Sorbian" }, { 0x002f, "mk", "Macedonian" }, { 0x0032, "tn", "Tswana" }, { 0x0034, "xh", "Xhosa" }, { 0x0035, "zu", "Zulu" }, { 0x0036, "af", "Afrikaans" }, { 0x0037, "ka", "Georgian" }, { 0x0038, "fo", "Faroese" }, { 0x0039, "hi", "Hindi" }, { 0x003a, "mt", "Maltese" }, { 0x003b, "se", "Northern Sami" }, { 0x003c, "ga", "Irish" }, { 0x003e, "ms", "Malay (macrolanguage)" }, { 0x003f, "kk", "Kazakh" }, { 0x0040, "ky", "Kirghiz" }, { 0x0041, "sw", "Swahili (macrolanguage)" }, { 0x0042, "tk", "Turkmen" }, { 0x0043, "uz", "Uzbek" }, { 0x0044, "tt", "Tatar" }, { 0x0045, "bn", "Bengali" }, { 0x0046, "pa", "Panjabi" }, { 0x0047, "gu", "Gujarati" }, { 0x0048, "or", "Oriya" }, { 0x0049, "ta", "Tamil" }, { 0x004a, "te", "Telugu" }, { 0x004b, "kn", "Kannada" }, { 0x004c, "ml", "Malayalam" }, { 0x004d, "as", "Assamese" }, { 0x004e, "mr", "Marathi" }, { 0x004f, "sa", "Sanskrit" }, { 0x0050, "mn", "Mongolian" }, { 0x0051, "bo", "Tibetan" }, { 0x0052, "cy", "Welsh" }, { 0x0053, "km", "Central Khmer" }, { 0x0054, "lo", "Lao" }, { 0x0056, "gl", "Galician" }, { 0x0057, "kok", "Konkani (macrolanguage)" }, { 0x005a, "syr", "Syriac" }, { 0x005b, "si", "Sinhala" }, { 0x005d, "iu", "Inuktitut" }, { 0x005e, "am", "Amharic" }, { 0x005f, "tzm", "Central Atlas Tamazight" }, { 0x0061, "ne", "Nepali" }, { 0x0062, "fy", "Western Frisian" }, { 0x0063, "ps", "Pushto" }, { 0x0064, "fil", "Filipino" }, { 0x0065, "dv", "Dhivehi" }, { 0x0068, "ha", "Hausa" }, { 0x006a, "yo", "Yoruba" }, { 0x006b, "quz", "Cusco Quechua" }, { 0x006c, "nso", "Pedi" }, { 0x006d, "ba", "Bashkir" }, { 0x006e, "lb", "Luxembourgish" }, { 0x006f, "kl", "Kalaallisut" }, { 0x0070, "ig", "Igbo" }, { 0x0078, "ii", "Sichuan Yi" }, { 0x007a, "arn", "Mapudungun" }, { 0x007c, "moh", "Mohawk" }, { 0x007e, "br", "Breton" }, { 0x0080, "ug", "Uighur" }, { 0x0081, "mi", "Maori" }, { 0x0082, "oc", "Occitan (post 1500)" }, { 0x0083, "co", "Corsican" }, { 0x0084, "gsw", "Swiss German" }, { 0x0085, "sah", "Yakut" }, { 0x0086, "qut", "" }, { 0x0087, "rw", "Kinyarwanda" }, { 0x0088, "wo", "Wolof" }, { 0x008c, "prs", "Dari" }, { 0x0091, "gd", "Scottish Gaelic" }, { 0x0401, "ar-SA", "Arabic, Saudi Arabia" }, { 0x0402, "bg-BG", "Bulgarian, Bulgaria" }, { 0x0403, "ca-ES", "Catalan, Spain" }, { 0x0404, "zh-TW", "Chinese, Taiwan, Province of China" }, { 0x0405, "cs-CZ", "Czech, Czech Republic" }, { 0x0406, "da-DK", "Danish, Denmark" }, { 0x0407, "de-DE", "German, Germany" }, { 0x0408, "el-GR", "Modern Greek (1453-), Greece" }, { 0x0409, "en-US", "English, United States" }, { 0x040a, "es-ES_tradnl", "Spanish" }, { 0x040b, "fi-FI", "Finnish, Finland" }, { 0x040c, "fr-FR", "French, France" }, { 0x040d, "he-IL", "Hebrew, Israel" }, { 0x040e, "hu-HU", "Hungarian, Hungary" }, { 0x040f, "is-IS", "Icelandic, Iceland" }, { 0x0410, "it-IT", "Italian, Italy" }, { 0x0411, "ja-JP", "Japanese, Japan" }, { 0x0412, "ko-KR", "Korean, Republic of Korea" }, { 0x0413, "nl-NL", "Dutch, Netherlands" }, { 0x0414, "nb-NO", "Norwegian Bokmål, Norway" }, { 0x0415, "pl-PL", "Polish, Poland" }, { 0x0416, "pt-BR", "Portuguese, Brazil" }, { 0x0417, "rm-CH", "Romansh, Switzerland" }, { 0x0418, "ro-RO", "Romanian, Romania" }, { 0x0419, "ru-RU", "Russian, Russian Federation" }, { 0x041a, "hr-HR", "Croatian, Croatia" }, { 0x041b, "sk-SK", "Slovak, Slovakia" }, { 0x041c, "sq-AL", "Albanian, Albania" }, { 0x041d, "sv-SE", "Swedish, Sweden" }, { 0x041e, "th-TH", "Thai, Thailand" }, { 0x041f, "tr-TR", "Turkish, Turkey" }, { 0x0420, "ur-PK", "Urdu, Pakistan" }, { 0x0421, "id-ID", "Indonesian, Indonesia" }, { 0x0422, "uk-UA", "Ukrainian, Ukraine" }, { 0x0423, "be-BY", "Belarusian, Belarus" }, { 0x0424, "sl-SI", "Slovenian, Slovenia" }, { 0x0425, "et-EE", "Estonian, Estonia" }, { 0x0426, "lv-LV", "Latvian, Latvia" }, { 0x0427, "lt-LT", "Lithuanian, Lithuania" }, { 0x0428, "tg-Cyrl-TJ", "Tajik, Cyrillic, Tajikistan" }, { 0x0429, "fa-IR", "Persian, Islamic Republic of Iran" }, { 0x042a, "vi-VN", "Vietnamese, Viet Nam" }, { 0x042b, "hy-AM", "Armenian, Armenia" }, { 0x042c, "az-Latn-AZ", "Azerbaijani, Latin, Azerbaijan" }, { 0x042d, "eu-ES", "Basque, Spain" }, { 0x042e, "wen-DE", "Sorbian languages, Germany" }, { 0x042f, "mk-MK", "Macedonian, The Former Yugoslav Republic of Macedonia" }, { 0x0430, "st-ZA", "Southern Sotho, South Africa" }, { 0x0431, "ts-ZA", "Tsonga, South Africa" }, { 0x0432, "tn-ZA", "Tswana, South Africa" }, { 0x0433, "ven-ZA", "South Africa" }, { 0x0434, "xh-ZA", "Xhosa, South Africa" }, { 0x0435, "zu-ZA", "Zulu, South Africa" }, { 0x0436, "af-ZA", "Afrikaans, South Africa" }, { 0x0437, "ka-GE", "Georgian, Georgia" }, { 0x0438, "fo-FO", "Faroese, Faroe Islands" }, { 0x0439, "hi-IN", "Hindi, India" }, { 0x043a, "mt-MT", "Maltese, Malta" }, { 0x043b, "se-NO", "Northern Sami, Norway" }, { 0x043e, "ms-MY", "Malay (macrolanguage), Malaysia" }, { 0x043f, "kk-KZ", "Kazakh, Kazakhstan" }, { 0x0440, "ky-KG", "Kirghiz, Kyrgyzstan" }, { 0x0441, "sw-KE", "Swahili (macrolanguage), Kenya" }, { 0x0442, "tk-TM", "Turkmen, Turkmenistan" }, { 0x0443, "uz-Latn-UZ", "Uzbek, Latin, Uzbekistan" }, { 0x0444, "tt-RU", "Tatar, Russian Federation" }, { 0x0445, "bn-IN", "Bengali, India" }, { 0x0446, "pa-IN", "Panjabi, India" }, { 0x0447, "gu-IN", "Gujarati, India" }, { 0x0448, "or-IN", "Oriya, India" }, { 0x0449, "ta-IN", "Tamil, India" }, { 0x044a, "te-IN", "Telugu, India" }, { 0x044b, "kn-IN", "Kannada, India" }, { 0x044c, "ml-IN", "Malayalam, India" }, { 0x044d, "as-IN", "Assamese, India" }, { 0x044e, "mr-IN", "Marathi, India" }, { 0x044f, "sa-IN", "Sanskrit, India" }, { 0x0450, "mn-MN", "Mongolian, Mongolia" }, { 0x0451, "bo-CN", "Tibetan, China" }, { 0x0452, "cy-GB", "Welsh, United Kingdom" }, { 0x0453, "km-KH", "Central Khmer, Cambodia" }, { 0x0454, "lo-LA", "Lao, Lao People's Democratic Republic" }, { 0x0455, "my-MM", "Burmese, Myanmar" }, { 0x0456, "gl-ES", "Galician, Spain" }, { 0x0457, "kok-IN", "Konkani (macrolanguage), India" }, { 0x0458, "mni", "Manipuri" }, { 0x0459, "sd-IN", "Sindhi, India" }, { 0x045a, "syr-SY", "Syriac, Syrian Arab Republic" }, { 0x045b, "si-LK", "Sinhala, Sri Lanka" }, { 0x045c, "chr-US", "Cherokee, United States" }, { 0x045d, "iu-Cans-CA", "Inuktitut, Unified Canadian Aboriginal Syllabics, Canada" }, { 0x045e, "am-ET", "Amharic, Ethiopia" }, { 0x045f, "tmz", "Tamanaku" }, { 0x0461, "ne-NP", "Nepali, Nepal" }, { 0x0462, "fy-NL", "Western Frisian, Netherlands" }, { 0x0463, "ps-AF", "Pushto, Afghanistan" }, { 0x0464, "fil-PH", "Filipino, Philippines" }, { 0x0465, "dv-MV", "Dhivehi, Maldives" }, { 0x0466, "bin-NG", "Bini, Nigeria" }, { 0x0467, "fuv-NG", "Nigerian Fulfulde, Nigeria" }, { 0x0468, "ha-Latn-NG", "Hausa, Latin, Nigeria" }, { 0x0469, "ibb-NG", "Ibibio, Nigeria" }, { 0x046a, "yo-NG", "Yoruba, Nigeria" }, { 0x046b, "quz-BO", "Cusco Quechua, Bolivia" }, { 0x046c, "nso-ZA", "Pedi, South Africa" }, { 0x046d, "ba-RU", "Bashkir, Russian Federation" }, { 0x046e, "lb-LU", "Luxembourgish, Luxembourg" }, { 0x046f, "kl-GL", "Kalaallisut, Greenland" }, { 0x0470, "ig-NG", "Igbo, Nigeria" }, { 0x0471, "kr-NG", "Kanuri, Nigeria" }, { 0x0472, "gaz-ET", "West Central Oromo, Ethiopia" }, { 0x0473, "ti-ER", "Tigrinya, Eritrea" }, { 0x0474, "gn-PY", "Guarani, Paraguay" }, { 0x0475, "haw-US", "Hawaiian, United States" }, { 0x0477, "so-SO", "Somali, Somalia" }, { 0x0478, "ii-CN", "Sichuan Yi, China" }, { 0x0479, "pap-AN", "Papiamento, Netherlands Antilles" }, { 0x047a, "arn-CL", "Mapudungun, Chile" }, { 0x047c, "moh-CA", "Mohawk, Canada" }, { 0x047e, "br-FR", "Breton, France" }, { 0x0480, "ug-CN", "Uighur, China" }, { 0x0481, "mi-NZ", "Maori, New Zealand" }, { 0x0482, "oc-FR", "Occitan (post 1500), France" }, { 0x0483, "co-FR", "Corsican, France" }, { 0x0484, "gsw-FR", "Swiss German, France" }, { 0x0485, "sah-RU", "Yakut, Russian Federation" }, { 0x0486, "qut-GT", "Guatemala" }, { 0x0487, "rw-RW", "Kinyarwanda, Rwanda" }, { 0x0488, "wo-SN", "Wolof, Senegal" }, { 0x048c, "prs-AF", "Dari, Afghanistan" }, { 0x048d, "plt-MG", "Plateau Malagasy, Madagascar" }, { 0x0491, "gd-GB", "Scottish Gaelic, United Kingdom" }, { 0x0801, "ar-IQ", "Arabic, Iraq" }, { 0x0804, "zh-CN", "Chinese, China" }, { 0x0807, "de-CH", "German, Switzerland" }, { 0x0809, "en-GB", "English, United Kingdom" }, { 0x080a, "es-MX", "Spanish, Mexico" }, { 0x080c, "fr-BE", "French, Belgium" }, { 0x0810, "it-CH", "Italian, Switzerland" }, { 0x0813, "nl-BE", "Dutch, Belgium" }, { 0x0814, "nn-NO", "Norwegian Nynorsk, Norway" }, { 0x0816, "pt-PT", "Portuguese, Portugal" }, { 0x0818, "ro-MO", "Romanian, Macao" }, { 0x0819, "ru-MO", "Russian, Macao" }, { 0x081a, "sr-Latn-CS", "Serbian, Latin, Serbia and Montenegro" }, { 0x081d, "sv-FI", "Swedish, Finland" }, { 0x0820, "ur-IN", "Urdu, India" }, { 0x082c, "az-Cyrl-AZ", "Azerbaijani, Cyrillic, Azerbaijan" }, { 0x082e, "dsb-DE", "Lower Sorbian, Germany" }, { 0x083b, "se-SE", "Northern Sami, Sweden" }, { 0x083c, "ga-IE", "Irish, Ireland" }, { 0x083e, "ms-BN", "Malay (macrolanguage), Brunei Darussalam" }, { 0x0843, "uz-Cyrl-UZ", "Uzbek, Cyrillic, Uzbekistan" }, { 0x0845, "bn-BD", "Bengali, Bangladesh" }, { 0x0846, "pa-PK", "Panjabi, Pakistan" }, { 0x0850, "mn-Mong-CN", "Mongolian, Mongolian, China" }, { 0x0851, "bo-BT", "Tibetan, Bhutan" }, { 0x0859, "sd-PK", "Sindhi, Pakistan" }, { 0x085d, "iu-Latn-CA", "Inuktitut, Latin, Canada" }, { 0x085f, "tzm-Latn-DZ", "Central Atlas Tamazight, Latin, Algeria" }, { 0x0861, "ne-IN", "Nepali, India" }, { 0x086b, "quz-EC", "Cusco Quechua, Ecuador" }, { 0x0873, "ti-ET", "Tigrinya, Ethiopia" }, { 0x0c01, "ar-EG", "Arabic, Egypt" }, { 0x0c04, "zh-HK", "Chinese, Hong Kong" }, { 0x0c07, "de-AT", "German, Austria" }, { 0x0c09, "en-AU", "English, Australia" }, { 0x0c0a, "es-ES", "Spanish, Spain" }, { 0x0c0c, "fr-CA", "French, Canada" }, { 0x0c1a, "sr-Cyrl-CS", "Serbian, Cyrillic, Serbia and Montenegro" }, { 0x0c3b, "se-FI", "Northern Sami, Finland" }, { 0x0c5f, "tmz-MA", "Tamanaku, Morocco" }, { 0x0c6b, "quz-PE", "Cusco Quechua, Peru" }, { 0x1001, "ar-LY", "Arabic, Libyan Arab Jamahiriya" }, { 0x1004, "zh-SG", "Chinese, Singapore" }, { 0x1007, "de-LU", "German, Luxembourg" }, { 0x1009, "en-CA", "English, Canada" }, { 0x100a, "es-GT", "Spanish, Guatemala" }, { 0x100c, "fr-CH", "French, Switzerland" }, { 0x101a, "hr-BA", "Croatian, Bosnia and Herzegovina" }, { 0x103b, "smj-NO", "Lule Sami, Norway" }, { 0x1401, "ar-DZ", "Arabic, Algeria" }, { 0x1404, "zh-MO", "Chinese, Macao" }, { 0x1407, "de-LI", "German, Liechtenstein" }, { 0x1409, "en-NZ", "English, New Zealand" }, { 0x140a, "es-CR", "Spanish, Costa Rica" }, { 0x140c, "fr-LU", "French, Luxembourg" }, { 0x141a, "bs-Latn-BA", "Bosnian, Latin, Bosnia and Herzegovina" }, { 0x143b, "smj-SE", "Lule Sami, Sweden" }, { 0x1801, "ar-MA", "Arabic, Morocco" }, { 0x1809, "en-IE", "English, Ireland" }, { 0x180a, "es-PA", "Spanish, Panama" }, { 0x180c, "fr-MC", "French, Monaco" }, { 0x181a, "sr-Latn-BA", "Serbian, Latin, Bosnia and Herzegovina" }, { 0x183b, "sma-NO", "Southern Sami, Norway" }, { 0x1c01, "ar-TN", "Arabic, Tunisia" }, { 0x1c09, "en-ZA", "English, South Africa" }, { 0x1c0a, "es-DO", "Spanish, Dominican Republic" }, { 0x1c0c, "fr-West", "French" }, { 0x1c1a, "sr-Cyrl-BA", "Serbian, Cyrillic, Bosnia and Herzegovina" }, { 0x1c3b, "sma-SE", "Southern Sami, Sweden" }, { 0x2001, "ar-OM", "Arabic, Oman" }, { 0x2009, "en-JM", "English, Jamaica" }, { 0x200a, "es-VE", "Spanish, Venezuela" }, { 0x200c, "fr-RE", "French, Réunion" }, { 0x201a, "bs-Cyrl-BA", "Bosnian, Cyrillic, Bosnia and Herzegovina" }, { 0x203b, "sms-FI", "Skolt Sami, Finland" }, { 0x2401, "ar-YE", "Arabic, Yemen" }, { 0x2409, "en-CB", "English" }, { 0x240a, "es-CO", "Spanish, Colombia" }, { 0x240c, "fr-CG", "French, Congo" }, { 0x241a, "sr-Latn-RS", "Serbian, Latin, Serbia" }, { 0x243b, "smn-FI", "Inari Sami, Finland" }, { 0x2801, "ar-SY", "Arabic, Syrian Arab Republic" }, { 0x2809, "en-BZ", "English, Belize" }, { 0x280a, "es-PE", "Spanish, Peru" }, { 0x280c, "fr-SN", "French, Senegal" }, { 0x281a, "sr-Cyrl-RS", "Serbian, Cyrillic, Serbia" }, { 0x2c01, "ar-JO", "Arabic, Jordan" }, { 0x2c09, "en-TT", "English, Trinidad and Tobago" }, { 0x2c0a, "es-AR", "Spanish, Argentina" }, { 0x2c0c, "fr-CM", "French, Cameroon" }, { 0x2c1a, "sr-Latn-ME", "Serbian, Latin, Montenegro" }, { 0x3001, "ar-LB", "Arabic, Lebanon" }, { 0x3009, "en-ZW", "English, Zimbabwe" }, { 0x300a, "es-EC", "Spanish, Ecuador" }, { 0x300c, "fr-CI", "French, Côte d'Ivoire" }, { 0x301a, "sr-Cyrl-ME", "Serbian, Cyrillic, Montenegro" }, { 0x3401, "ar-KW", "Arabic, Kuwait" }, { 0x3409, "en-PH", "English, Philippines" }, { 0x340a, "es-CL", "Spanish, Chile" }, { 0x340c, "fr-ML", "French, Mali" }, { 0x3801, "ar-AE", "Arabic, United Arab Emirates" }, { 0x3809, "en-ID", "English, Indonesia" }, { 0x380a, "es-UY", "Spanish, Uruguay" }, { 0x380c, "fr-MA", "French, Morocco" }, { 0x3c01, "ar-BH", "Arabic, Bahrain" }, { 0x3c09, "en-HK", "English, Hong Kong" }, { 0x3c0a, "es-PY", "Spanish, Paraguay" }, { 0x3c0c, "fr-HT", "French, Haiti" }, { 0x4001, "ar-QA", "Arabic, Qatar" }, { 0x4009, "en-IN", "English, India" }, { 0x400a, "es-BO", "Spanish, Bolivia" }, { 0x4409, "en-MY", "English, Malaysia" }, { 0x440a, "es-SV", "Spanish, El Salvador" }, { 0x4809, "en-SG", "English, Singapore" }, { 0x480a, "es-HN", "Spanish, Honduras" }, { 0x4c0a, "es-NI", "Spanish, Nicaragua" }, { 0x500a, "es-PR", "Spanish, Puerto Rico" }, { 0x540a, "es-US", "Spanish, United States" }, { 0x641a, "bs-Cyrl", "Bosnian, Cyrillic" }, { 0x681a, "bs-Latn", "Bosnian, Latin" }, { 0x6c1a, "sr-Cyrl", "Serbian, Cyrillic" }, { 0x701a, "sr-Latn", "Serbian, Latin" }, { 0x703b, "smn", "Inari Sami" }, { 0x742c, "az-Cyrl", "Azerbaijani, Cyrillic" }, { 0x743b, "sms", "Skolt Sami" }, { 0x7804, "zh", "Chinese" }, { 0x7814, "nn", "Norwegian Nynorsk" }, { 0x781a, "bs", "Bosnian" }, { 0x782c, "az-Latn", "Azerbaijani, Latin" }, { 0x783b, "sma", "Southern Sami" }, { 0x7843, "uz-Cyrl", "Uzbek, Cyrillic" }, { 0x7850, "mn-Cyrl", "Mongolian, Cyrillic" }, { 0x785d, "iu-Cans", "Inuktitut, Unified Canadian Aboriginal Syllabics" }, { 0x7c04, "zh-Hant", "Chinese, Han (Traditional variant)" }, { 0x7c14, "nb", "Norwegian Bokmål" }, { 0x7c1a, "sr", "Serbian" }, { 0x7c28, "tg-Cyrl", "Tajik, Cyrillic" }, { 0x7c2e, "dsb", "Lower Sorbian" }, { 0x7c3b, "smj", "Lule Sami" }, { 0x7c43, "uz-Latn", "Uzbek, Latin" }, { 0x7c50, "mn-Mong", "Mongolian, Mongolian" }, { 0x7c5d, "iu-Latn", "Inuktitut, Latin" }, { 0x7c5f, "tzm-Latn", "Central Atlas Tamazight, Latin" }, { 0x7c68, "ha-Latn", "Hausa, Latin" }, { (uint16_t) -1, "_UNKNOWN_", "Unknown" } }; /* Retrieves a string containing the language tag identifier */ const char *libfwnt_locale_identifier_language_tag_get_identifier( uint16_t lcid_language_tag ) { int iterator = 0; while( ( libfwnt_locale_identifier_language_tags[ iterator ] ).lcid_language_tag != (uint16_t) -1 ) { if( ( libfwnt_locale_identifier_language_tags[ iterator ] ).lcid_language_tag == lcid_language_tag ) { break; } iterator++; } return( ( libfwnt_locale_identifier_language_tags[ iterator ] ).identifier ); } /* Retrieves a string containing the language tag description */ const char *libfwnt_locale_identifier_language_tag_get_description( uint16_t lcid_language_tag ) { int iterator = 0; while( ( libfwnt_locale_identifier_language_tags[ iterator ] ).lcid_language_tag != (uint16_t) -1 ) { if( ( libfwnt_locale_identifier_language_tags[ iterator ] ).lcid_language_tag == lcid_language_tag ) { break; } iterator++; } return( ( libfwnt_locale_identifier_language_tags[ iterator ] ).description ); } #endif libpff-20120802/libfwnt/libfwnt_definitions.h0000644000175000017500000000340311765042654016025 00000000000000/* * The internal definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFWNT_INTERNAL_DEFINITIONS_H ) #define LIBFWNT_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if !defined( HAVE_LOCAL_LIBFWNT ) #include /* The definitions in are copied here * for local use of libfwnt */ #else #include #define LIBFWNT_VERSION 20120426 /* The libfwnt version string */ #define LIBFWNT_VERSION_STRING "20120426" /* The endian definitions */ #define LIBFWNT_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFWNT_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE enum LIBFWNT_SECURITY_IDENTIFIER_AUTHORITIES { LIBFWNT_AUTHORITY_NULL = 0x00, LIBFWNT_AUTHORITY_WORLD = 0x01, LIBFWNT_AUTHORITY_LOCAL = 0x02, LIBFWNT_AUTHORITY_CREATOR = 0x03, LIBFWNT_AUTHORITY_NON_UNIQUE = 0x04, LIBFWNT_AUTHORITY_NT_AUTHORITY = 0x05, LIBFWNT_AUTHORITY_EXCHANGE_2007 = 0x09 }; #endif #endif libpff-20120802/libfwnt/libfwnt_types.h0000644000175000017500000000234011765042654014655 00000000000000/* * The internal type definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_TYPES_H ) #define _LIBFWNT_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt * The definitions in are copied here * for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) /* The following type definitions hide internal data structures */ typedef intptr_t libfwnt_security_identifier_t; #endif #endif libpff-20120802/libfwnt/libfwnt_locale_identifier.h0000644000175000017500000000313111765042654017151 00000000000000/* * Locale identifier (LCID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_LOCALE_IDENTIFIER_H ) #define _LIBFWNT_LOCALE_IDENTIFIER_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libfwnt_locale_identifier_language_tag libfwnt_locale_identifier_language_tag_t; struct libfwnt_locale_identifier_language_tag { /* The LCID language tag value */ uint16_t lcid_language_tag; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libfwnt_locale_identifier_language_tag_get_identifier( uint16_t lcid_language_tag ); const char *libfwnt_locale_identifier_language_tag_get_description( uint16_t lcid_language_tag ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfwnt/libfwnt_extern.h0000644000175000017500000000240211765042654015015 00000000000000/* * The internal extern definition * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_EXTERN_H ) #define _LIBFWNT_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if !defined( HAVE_LOCAL_LIBFWNT ) /* If libtool DLL support is enabled set LIBFWNT_DLL_EXPORT * before including libfwnt/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFWNT_DLL_EXPORT #endif #include #else #define LIBFWNT_EXTERN extern #endif #endif libpff-20120802/libfwnt/libfwnt_support.h0000644000175000017500000000217611765042654015234 00000000000000/* * Support functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_SUPPORT_H ) #define _LIBFWNT_SUPPORT_H #include #include #include "libfwnt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWNT ) LIBFWNT_EXTERN \ const char *libfwnt_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfwnt/libfwnt_security_identifier.h0000644000175000017500000001143411765042654017566 00000000000000/* * Windows NT Security Identifier (SID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_SECURITY_IDENTIFIER_H ) #define _LIBFWNT_INTERNAL_SECURITY_IDENTIFIER_H #include #include #include "libfwnt_extern.h" #include "libfwnt_libcerror.h" #include "libfwnt_types.h" #if defined( __cplusplus ) extern "C" { #endif /* The Windows NT Security Identifier (SID) is formatted as following: * S-1-5-21-7623811015-3361044348-030300820-1013 * * S - The string is a SID. * 1 - The revision number (the version of the SID specification). * 5 - The identifier authority value. * 21-7623811015-3361044348-030300820 - domain or local computer identifier * 1013 – a Relative ID (RID). Any group or user that is not created by default will have a Relative ID of 1000 or greater. * * The SID is stored as * 01 - 05 - 00 00 00 00 00 05 - aa aa aa aa - bb bb bb bb - cc cc cc cc - dd dd dd dd - ee ee ee ee * uint8_t - uint8_t - uint48_t - uint32_t - uin32_t - uin32_t - uin32_t - uin32_t * - (big endian) - (little endian) * revision - number - authority - sub authorities * * The second value contains the number of sub authorities in the SID */ typedef struct libfwnt_internal_security_identifier libfwnt_internal_security_identifier_t; struct libfwnt_internal_security_identifier { /* The revision number */ uint8_t revision_number; /* The authority value */ uint64_t authority; /* The number of sub authoritties */ uint8_t number_of_sub_authorities; /* The sub autoritites */ uint32_t sub_authority[ 10 ]; }; LIBFWNT_EXTERN \ int libfwnt_security_identifier_initialize( libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_free( libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_from_byte_stream( libfwnt_security_identifier_t *security_identifier, uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_get_string_size( libfwnt_security_identifier_t *security_identifier, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_to_utf8_string( libfwnt_security_identifier_t *security_identifier, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_to_utf8_string_with_index( libfwnt_security_identifier_t *security_identifier, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_to_utf16_string( libfwnt_security_identifier_t *security_identifier, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_to_utf16_string_with_index( libfwnt_security_identifier_t *security_identifier, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_to_utf32_string( libfwnt_security_identifier_t *security_identifier, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_security_identifier_copy_to_utf32_string_with_index( libfwnt_security_identifier_t *security_identifier, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfwnt/libfwnt_error.h0000644000175000017500000000324711765042654014651 00000000000000/* * Error functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFWNT_INTERNAL_ERROR_H ) #define _LIBFWNT_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFWNT ) #include #endif #include "libfwnt_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFWNT ) LIBFWNT_EXTERN \ void libfwnt_error_free( libfwnt_error_t **error ); LIBFWNT_EXTERN \ int libfwnt_error_fprint( libfwnt_error_t *error, FILE *stream ); LIBFWNT_EXTERN \ int libfwnt_error_sprint( libfwnt_error_t *error, char *string, size_t size ); LIBFWNT_EXTERN \ int libfwnt_error_backtrace_fprint( libfwnt_error_t *error, FILE *stream ); LIBFWNT_EXTERN \ int libfwnt_error_backtrace_sprint( libfwnt_error_t *error, char *string, size_t size ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfwnt/Makefile.in0000664000175000017500000006235712006536016013665 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfwnt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfwnt_la_LIBADD = am__libfwnt_la_SOURCES_DIST = libfwnt_definitions.h libfwnt_extern.h \ libfwnt_error.c libfwnt_error.h libfwnt_libcerror.h \ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ libfwnt_security_identifier.c libfwnt_security_identifier.h \ libfwnt_support.c libfwnt_support.h libfwnt_types.h @HAVE_LOCAL_LIBFWNT_TRUE@am_libfwnt_la_OBJECTS = libfwnt_error.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_locale_identifier.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_security_identifier.lo \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_support.lo libfwnt_la_OBJECTS = $(am_libfwnt_la_OBJECTS) @HAVE_LOCAL_LIBFWNT_TRUE@am_libfwnt_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfwnt_la_SOURCES) DIST_SOURCES = $(am__libfwnt_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFWNT_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFWNT_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFWNT_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFWNT_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFWNT_TRUE@noinst_LTLIBRARIES = libfwnt.la @HAVE_LOCAL_LIBFWNT_TRUE@libfwnt_la_SOURCES = \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_definitions.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_extern.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_error.c libfwnt_error.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcerror.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_security_identifier.c libfwnt_security_identifier.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_support.c libfwnt_support.h \ @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_types.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfwnt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfwnt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfwnt.la: $(libfwnt_la_OBJECTS) $(libfwnt_la_DEPENDENCIES) $(LINK) $(am_libfwnt_la_rpath) $(libfwnt_la_OBJECTS) $(libfwnt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_locale_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_security_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfwnt_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfwnt ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfwnt_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfwnt/libfwnt_security_identifier.c0000644000175000017500000007012011765042654017556 00000000000000/* * Windows NT Security Identifier (SID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfwnt_definitions.h" #include "libfwnt_libcerror.h" #include "libfwnt_security_identifier.h" #include "libfwnt_types.h" /* Initialize a security_identifier * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_initialize( libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_initialize"; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security_identifier.", function ); return( -1 ); } if( *security_identifier != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid security identifier value already set.", function ); return( -1 ); } internal_security_identifier = memory_allocate_structure( libfwnt_internal_security_identifier_t ); if( internal_security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create security_identifier.", function ); goto on_error; } if( memory_set( internal_security_identifier, 0, sizeof( libfwnt_internal_security_identifier_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear security_identifier.", function ); goto on_error; } *security_identifier = (libfwnt_security_identifier_t *) internal_security_identifier; return( 1 ); on_error: if( internal_security_identifier != NULL ) { memory_free( internal_security_identifier ); } return( -1 ); } /* Frees a security_identifier * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_free( libfwnt_security_identifier_t **security_identifier, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_free"; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security_identifier.", function ); return( -1 ); } if( *security_identifier != NULL ) { internal_security_identifier = (libfwnt_internal_security_identifier_t *) *security_identifier; *security_identifier = NULL; memory_free( internal_security_identifier ); } return( 1 ); } /* Converts a class identifier stored in a byte stream into a runtime version * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_from_byte_stream( libfwnt_security_identifier_t *security_identifier, uint8_t *byte_stream, size_t byte_stream_size, int byte_order, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_copy_from_byte_stream"; uint8_t sub_authority_index = 0; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid class identifier.", function ); return( -1 ); } internal_security_identifier = (libfwnt_internal_security_identifier_t *) security_identifier; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( byte_order != LIBFWNT_ENDIAN_LITTLE ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } internal_security_identifier->revision_number = byte_stream[ 0 ]; internal_security_identifier->number_of_sub_authorities = byte_stream[ 1 ]; if( byte_stream_size < (size_t) ( 8 + ( internal_security_identifier->number_of_sub_authorities * 4 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( internal_security_identifier->number_of_sub_authorities > 10 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported security identifier contains more than 10 sub authoritites.", function ); return( -1 ); } byte_stream += 2; /* The authority is stored as a 48-bit value */ byte_stream_copy_to_uint48_big_endian( byte_stream, internal_security_identifier->authority ); byte_stream += 6; for( sub_authority_index = 0; sub_authority_index < internal_security_identifier->number_of_sub_authorities; sub_authority_index++ ) { byte_stream_copy_to_uint32_little_endian( byte_stream, internal_security_identifier->sub_authority[ sub_authority_index ] ); byte_stream += 4; } return( 1 ); } /* Deterimes the size of the string for the security identifier * The string size includes the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_get_string_size( libfwnt_security_identifier_t *security_identifier, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_get_string_size"; uint64_t value_64bit = 0; uint8_t sub_authority_index = 0; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security_identifier.", function ); return( -1 ); } internal_security_identifier = (libfwnt_internal_security_identifier_t *) security_identifier; if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags.", function ); return( -1 ); } *string_size = 3; value_64bit = internal_security_identifier->revision_number; do { *string_size += 1; value_64bit /= 10; } while( value_64bit > 0 ); *string_size += 1; value_64bit = internal_security_identifier->authority; do { *string_size += 1; value_64bit /= 10; } while( value_64bit > 0 ); for( sub_authority_index = 0; sub_authority_index < internal_security_identifier->number_of_sub_authorities; sub_authority_index++ ) { *string_size += 1; value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; do { *string_size += 1; value_64bit /= 10; } while( value_64bit > 0 ); } return( 1 ); } /* Converts the security identifier into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_to_utf8_string( libfwnt_security_identifier_t *security_identifier, uint8_t *utf8_string, size_t utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfwnt_security_identifier_copy_to_utf8_string"; size_t utf8_string_index = 0; if( libfwnt_security_identifier_copy_to_utf8_string_with_index( security_identifier, utf8_string, utf8_string_size, &utf8_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy security identifier to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Converts the security identifier into an UTF-8 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_to_utf8_string_with_index( libfwnt_security_identifier_t *security_identifier, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_copy_to_utf8_string"; size_t string_index = 0; size_t value_string_index = 0; size_t value_string_length = 0; uint64_t value_64bit = 0; uint8_t sub_authority_index = 0; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security_identifier.", function ); return( -1 ); } internal_security_identifier = (libfwnt_internal_security_identifier_t *) security_identifier; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 size.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-8 string size exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags.", function ); return( -1 ); } string_index = *utf8_string_index; if( ( string_index + 2 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) 'S'; utf8_string[ string_index++ ] = (uint8_t) '-'; value_64bit = internal_security_identifier->revision_number; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length + 1 ) >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } value_64bit = internal_security_identifier->revision_number; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf8_string[ string_index + value_string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; utf8_string[ string_index++ ] = (uint8_t) '-'; value_64bit = internal_security_identifier->authority; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length ) >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } value_64bit = internal_security_identifier->authority; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf8_string[ string_index + value_string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; for( sub_authority_index = 0; sub_authority_index < internal_security_identifier->number_of_sub_authorities; sub_authority_index++ ) { value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length + 1 ) >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = (uint8_t) '-'; value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf8_string[ string_index + value_string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; } if( string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Converts the security identifier into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_to_utf16_string( libfwnt_security_identifier_t *security_identifier, uint16_t *utf16_string, size_t utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfwnt_security_identifier_copy_to_utf16_string"; size_t utf16_string_index = 0; if( libfwnt_security_identifier_copy_to_utf16_string_with_index( security_identifier, utf16_string, utf16_string_size, &utf16_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy security identifier to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Converts the security identifier into an UTF-16 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_to_utf16_string_with_index( libfwnt_security_identifier_t *security_identifier, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_copy_to_utf16_string"; size_t string_index = 0; size_t value_string_index = 0; size_t value_string_length = 0; uint64_t value_64bit = 0; uint8_t sub_authority_index = 0; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security_identifier.", function ); return( -1 ); } internal_security_identifier = (libfwnt_internal_security_identifier_t *) security_identifier; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-16 string size exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags.", function ); return( -1 ); } string_index = *utf16_string_index; if( ( string_index + 2 ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) 'S'; utf16_string[ string_index++ ] = (uint16_t) '-'; value_64bit = internal_security_identifier->revision_number; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length + 1 ) >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } value_64bit = internal_security_identifier->revision_number; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf16_string[ string_index + value_string_index ] = (uint16_t) '0' + (uint16_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; utf16_string[ string_index++ ] = (uint16_t) '-'; value_64bit = internal_security_identifier->authority; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length ) >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } value_64bit = internal_security_identifier->authority; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf16_string[ string_index + value_string_index ] = (uint16_t) '0' + (uint16_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; for( sub_authority_index = 0; sub_authority_index < internal_security_identifier->number_of_sub_authorities; sub_authority_index++ ) { value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length + 1 ) >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = (uint16_t) '-'; value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf16_string[ string_index + value_string_index ] = (uint16_t) '0' + (uint16_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; } if( string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Converts the security identifier into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_to_utf32_string( libfwnt_security_identifier_t *security_identifier, uint32_t *utf32_string, size_t utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfwnt_security_identifier_copy_to_utf32_string"; size_t utf32_string_index = 0; if( libfwnt_security_identifier_copy_to_utf32_string_with_index( security_identifier, utf32_string, utf32_string_size, &utf32_string_index, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy security identifier to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Converts the security identifier into an UTF-32 string * The string size should include the end of string character * Returns 1 if successful or -1 on error */ int libfwnt_security_identifier_copy_to_utf32_string_with_index( libfwnt_security_identifier_t *security_identifier, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { libfwnt_internal_security_identifier_t *internal_security_identifier = NULL; static char *function = "libfwnt_security_identifier_copy_to_utf32_string_with_index"; size_t string_index = 0; size_t value_string_index = 0; size_t value_string_length = 0; uint64_t value_64bit = 0; uint8_t sub_authority_index = 0; if( security_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid security_identifier.", function ); return( -1 ); } internal_security_identifier = (libfwnt_internal_security_identifier_t *) security_identifier; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: UTF-32 string size exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags.", function ); return( -1 ); } string_index = *utf32_string_index; if( ( string_index + 2 ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ string_index++ ] = (uint32_t) 'S'; utf32_string[ string_index++ ] = (uint32_t) '-'; value_64bit = internal_security_identifier->revision_number; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length + 1 ) >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } value_64bit = internal_security_identifier->revision_number; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf32_string[ string_index + value_string_index ] = (uint32_t) '0' + (uint32_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; utf32_string[ string_index++ ] = (uint32_t) '-'; value_64bit = internal_security_identifier->authority; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length ) >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } value_64bit = internal_security_identifier->authority; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf32_string[ string_index + value_string_index ] = (uint32_t) '0' + (uint32_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; for( sub_authority_index = 0; sub_authority_index < internal_security_identifier->number_of_sub_authorities; sub_authority_index++ ) { value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; value_string_length = 0; do { value_64bit /= 10; value_string_length++; } while( value_64bit > 0 ); if( ( string_index + value_string_length + 1 ) >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ string_index++ ] = (uint32_t) '-'; value_64bit = internal_security_identifier->sub_authority[ sub_authority_index ]; value_string_index = value_string_length; while( value_string_index > 0 ) { value_string_index--; utf32_string[ string_index + value_string_index ] = (uint32_t) '0' + (uint32_t) ( value_64bit % 10 ); value_64bit /= 10; } string_index += value_string_length; } if( string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } libpff-20120802/libfwnt/libfwnt_error.c0000644000175000017500000000462611765042654014646 00000000000000/* * Error functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfwnt_error.h" #include "libfwnt_libcerror.h" #if !defined( HAVE_LOCAL_LIBFWNT ) /* Free an error and its elements */ void libfwnt_error_free( libfwnt_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfwnt_error_fprint( libfwnt_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfwnt_error_sprint( libfwnt_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfwnt_error_backtrace_fprint( libfwnt_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfwnt_error_backtrace_sprint( libfwnt_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif libpff-20120802/AUTHORS0000644000175000017500000000206112005155333011201 00000000000000Acknowledgements: libpff Copyright (c) 2008-2012, Joachim Metz This code is derived from information and software contributed by: * Earlier work on the PST file format in libpst by Dave Smith , Joe Nahmias , Brad Hards and Carl Byington (http://www.five-ten-sg.com/libpst/) * Carl Byington for continued work on analyzing the Personal Folder Format in libpst * Igor Rogov for alpha testing and bug hunting * Krzysztof Mazur for the recipient list patch and bug hunting * Warren Brown for the multi value support, the 16-bit value patch, alpha testing, bug hunting and the several Visual Studio related improvements like the WIN64 project/solution files * Björn Ganster, X-Ways Software Technology, for providing the Windows extended filename patches, file exists speed improvement, alpha testing and bug hunting libpff-20120802/config.sub0000755000175000017500000010316712006536015012126 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libpff-20120802/libcpath/0000775000175000017500000000000012006536212012002 500000000000000libpff-20120802/libcpath/libcpath_unused.h0000644000175000017500000000247012005152776015255 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_INTERNAL_UNUSED_H ) #define _LIBCPATH_INTERNAL_UNUSED_H #include #if !defined( LIBCPATH_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCPATH_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCPATH_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCPATH_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCPATH_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libcpath/libcpath_support.c0000644000175000017500000000230312005152776015454 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcpath_definitions.h" #include "libcpath_libcerror.h" #include "libcpath_libcstring.h" #include "libcpath_support.h" #if !defined( HAVE_LOCAL_LIBCPATH ) /* Returns the library version as a string */ const char *libcpath_get_version( void ) { return( (const char *) LIBCPATH_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ libpff-20120802/libcpath/libcpath_libclocale.h0000644000175000017500000000254612005152776016047 00000000000000/* * The internal libclocale header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCLOCALE_H ) #define _LIBCPATH_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcpath/Makefile.am0000644000175000017500000000147412005152776013772 00000000000000if HAVE_LOCAL_LIBCPATH AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcpath.la libcpath_la_SOURCES = \ libcpath_definitions.h \ libcpath_extern.h \ libcpath_error.c libcpath_error.h \ libcpath_path.c libcpath_path.h \ libcpath_libcerror.h \ libcpath_libclocale.h \ libcpath_libcsplit.h \ libcpath_libcstring.h \ libcpath_libuna.h \ libcpath_support.c libcpath_support.h \ libcpath_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) libpff-20120802/libcpath/libcpath_error.h0000644000175000017500000000332312005152776015101 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_INTERNAL_ERROR_H ) #define _LIBCPATH_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCPATH ) #include #endif #include "libcpath_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCPATH ) LIBCPATH_EXTERN \ void libcpath_error_free( libcpath_error_t **error ); LIBCPATH_EXTERN \ int libcpath_error_fprint( libcpath_error_t *error, FILE *stream ); LIBCPATH_EXTERN \ int libcpath_error_sprint( libcpath_error_t *error, char *string, size_t size ); LIBCPATH_EXTERN \ int libcpath_error_backtrace_fprint( libcpath_error_t *error, FILE *stream ); LIBCPATH_EXTERN \ int libcpath_error_backtrace_sprint( libcpath_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcpath/libcpath_error.c0000644000175000017500000000471112005152776015076 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcpath_error.h" #include "libcpath_libcerror.h" #if !defined( HAVE_LOCAL_LIBCPATH ) /* Free an error and its elements */ void libcpath_error_free( libcpath_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcpath_error_fprint( libcpath_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libcpath_error_sprint( libcpath_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcpath_error_backtrace_fprint( libcpath_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libcpath_error_backtrace_sprint( libcpath_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ libpff-20120802/libcpath/libcpath_libcsplit.h0000644000175000017500000000266412005152776015744 00000000000000/* * The internal libcsplit header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCSPLIT_H ) #define _LIBCPATH_LIBCSPLIT_H #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if defined( HAVE_LOCAL_LIBCSPLIT ) #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSPLIT_DLL_IMPORT * before including libcsplit.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSPLIT_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcpath/libcpath_path.h0000644000175000017500000000663712005152776014717 00000000000000/* * Path functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_PATH_H ) #define _LIBCPATH_PATH_H #include #include #include "libcpath_extern.h" #include "libcpath_libcerror.h" #include "libcpath_libcstring.h" #if defined( __cplusplus ) extern "C" { #endif LIBCPATH_EXTERN \ int libcpath_path_change_directory( const char *directory_name, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_current_working_directory( char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_full_path( const char *path, size_t path_length, char **full_path, size_t *full_path_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_join( char **path, size_t *path_size, const char *directory_name, size_t directory_name_length, const char *filename, size_t filename_length, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_make_directory( const char *directory_name, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_sanitize( char *path, size_t *path_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_sanitize_filename( char *filename, size_t *filename_size, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCPATH_EXTERN \ int libcpath_path_change_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_current_working_directory_wide( wchar_t **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_get_full_path_wide( const wchar_t *path, size_t path_length, wchar_t **full_path, size_t *full_path_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_join_wide( wchar_t **path, size_t *path_size, const wchar_t *directory_name, size_t directory_name_length, const wchar_t *filename, size_t filename_length, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_make_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_sanitize_wide( wchar_t *path, size_t *path_size, libcerror_error_t **error ); LIBCPATH_EXTERN \ int libcpath_path_sanitize_filename_wide( wchar_t *filename, size_t *filename_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcpath/Makefile.in0000664000175000017500000006251612006536015014002 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcpath DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcpath_la_LIBADD = am__libcpath_la_SOURCES_DIST = libcpath_definitions.h \ libcpath_extern.h libcpath_error.c libcpath_error.h \ libcpath_path.c libcpath_path.h libcpath_libcerror.h \ libcpath_libclocale.h libcpath_libcsplit.h \ libcpath_libcstring.h libcpath_libuna.h libcpath_support.c \ libcpath_support.h libcpath_unused.h @HAVE_LOCAL_LIBCPATH_TRUE@am_libcpath_la_OBJECTS = libcpath_error.lo \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_path.lo libcpath_support.lo libcpath_la_OBJECTS = $(am_libcpath_la_OBJECTS) @HAVE_LOCAL_LIBCPATH_TRUE@am_libcpath_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcpath_la_SOURCES) DIST_SOURCES = $(am__libcpath_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCPATH_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCPATH_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCPATH_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCSPLIT_CPPFLAGS@ \ @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBCPATH_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCPATH_TRUE@noinst_LTLIBRARIES = libcpath.la @HAVE_LOCAL_LIBCPATH_TRUE@libcpath_la_SOURCES = \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_definitions.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_extern.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_error.c libcpath_error.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_path.c libcpath_path.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libcerror.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libclocale.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libcsplit.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libcstring.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libuna.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_support.c libcpath_support.h \ @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcpath/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcpath/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcpath.la: $(libcpath_la_OBJECTS) $(libcpath_la_DEPENDENCIES) $(LINK) $(am_libcpath_la_rpath) $(libcpath_la_OBJECTS) $(libcpath_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_path.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcpath ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcpath_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcpath/libcpath_libcstring.h0000644000175000017500000000262412005152776016113 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCSTRING_H ) #define _LIBCPATH_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcpath/libcpath_definitions.h0000644000175000017500000000271212005152776016264 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCPATH_INTERNAL_DEFINITIONS_H ) #define LIBCPATH_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if !defined( HAVE_LOCAL_LIBCPATH ) #include /* The definitions in are copied here * for local use of libcpath */ #else #define LIBCPATH_VERSION 20120715 /* The libcstring version string */ #define LIBCPATH_VERSION_STRING "20120715" #if defined( WINAPI ) #define LIBCPATH_SEPARATOR '\\' #else #define LIBCPATH_SEPARATOR '/' #endif /* defined( WINAPI ) */ #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #endif libpff-20120802/libcpath/libcpath_libcerror.h0000644000175000017500000000252312005152776015734 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBCERROR_H ) #define _LIBCPATH_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcpath/libcpath_extern.h0000644000175000017500000000241412005152776015255 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_INTERNAL_EXTERN_H ) #define _LIBCPATH_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if !defined( HAVE_LOCAL_LIBCPATH ) /* If libtool DLL support is enabled set LIBCPATH_DLL_EXPORT * before including libcpath/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCPATH_DLL_EXPORT #endif #include #else #define LIBCPATH_EXTERN extern #endif #endif libpff-20120802/libcpath/libcpath_path.c0000644000175000017500000042415712005152776014713 00000000000000/* * Path functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_SYS_STAT_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_UNISTD_H ) #include #endif #include "libcpath_definitions.h" #include "libcpath_libcerror.h" #include "libcpath_libclocale.h" #include "libcpath_libcsplit.h" #include "libcpath_libcstring.h" #include "libcpath_libuna.h" #include "libcpath_path.h" #if defined( WINAPI ) enum LIBCPATH_TYPES { LIBCPATH_TYPE_ABSOLUTE, LIBCPATH_TYPE_DEVICE, LIBCPATH_TYPE_EXTENDED_LENGTH, LIBCPATH_TYPE_RELATIVE, LIBCPATH_TYPE_UNC }; #else enum LIBCPATH_TYPES { LIBCPATH_TYPE_ABSOLUTE, LIBCPATH_TYPE_RELATIVE }; #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Changes the directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcpath_path_change_directory( const char *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_change_directory"; DWORD error_code = 0; if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } if( SetCurrentDirectoryA( directory_name ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, error_code, "%s: unable to change directory.", function ); return( -1 ); } return( 1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI make directory function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_CHDIR ) || defined( WINAPI ) /* Changes the directory * This function uses the POSIX chdir function or equivalent * Returns 1 if successful or -1 on error */ int libcpath_path_change_directory( const char *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_change_directory"; if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } #if defined( WINAPI ) if( _chdir( directory_name ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to change directory.", function ); return( -1 ); } #else if( chdir( directory_name ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to change directory.", function ); return( -1 ); } #endif return( 1 ); } #else #error Missing change directory function #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Retrieves the current working directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcpath_path_get_current_working_directory( char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_current_working_directory"; DWORD safe_current_working_directory_size = 0; DWORD error_code = 0; if( current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory.", function ); return( -1 ); } if( *current_working_directory != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid current working directory value already set.", function ); return( -1 ); } if( current_working_directory_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory size.", function ); return( -1 ); } safe_current_working_directory_size = GetCurrentDirectoryA( 0, NULL ); if( safe_current_working_directory_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current working directory size.", function ); goto on_error; } if( (size_t) safe_current_working_directory_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: current working directory size value out of bounds.", function ); goto on_error; } *current_working_directory_size = (size_t) safe_current_working_directory_size; *current_working_directory = libcstring_narrow_string_allocate( *current_working_directory_size ); if( *current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create current working directory.", function ); goto on_error; } if( GetCurrentDirectoryA( safe_current_working_directory_size, *current_working_directory ) != ( safe_current_working_directory_size - 1 ) ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve current working directory.", function ); goto on_error; } return( 1 ); on_error: if( current_working_directory != NULL ) { memory_free( *current_working_directory ); *current_working_directory = NULL; } *current_working_directory_size = 0; return( -1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI get current working directory function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_GETCWD ) || defined( WINAPI ) /* Retrieves the current working directory * This function uses the POSIX getcwd function or equivalent * Returns 1 if successful or -1 on error */ int libcpath_path_get_current_working_directory( char **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_current_working_directory"; if( current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory.", function ); return( -1 ); } if( *current_working_directory != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid current working directory value already set.", function ); return( -1 ); } if( current_working_directory_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory size.", function ); return( -1 ); } #if defined( WINAPI ) *current_working_directory_size = (size_t) _MAX_PATH; #else *current_working_directory_size = (size_t) PATH_MAX; #endif *current_working_directory = libcstring_narrow_string_allocate( *current_working_directory_size ); if( *current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create current working directory.", function ); goto on_error; } #if defined( WINAPI ) if( _getcwd( *current_working_directory, *current_working_directory_size ) == NULL ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, errno, "%s: unable to retrieve current working directory.", function ); goto on_error; } #else if( getcwd( *current_working_directory, *current_working_directory_size ) == NULL ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, errno, "%s: unable to retrieve current working directory.", function ); goto on_error; } #endif return( 1 ); on_error: if( current_working_directory != NULL ) { memory_free( *current_working_directory ); *current_working_directory = NULL; } *current_working_directory_size = 0; return( -1 ); } #else #error Missing get current working directory function #endif #if defined( WINAPI ) /* Determines the full path of the Windows path specified * The function uses the extended-length path format * (path with \\?\ prefix) * * Scenario's that are considered full paths: * Device path: \\.\PhysicalDrive0 * Extended-length path: \\?\C:\directory\file.txt * Extended-length UNC path: \\?\UNC\server\share\directory\file.txt * * Scenario's that are not considered full paths: * Local 'absolute' path: \directory\file.txt * Local 'relative' path: ..\directory\file.txt * Local 'relative' path: .\directory\file.txt * Volume 'absolute' path: C:\directory\file.txt * Volume 'relative' path: C:directory\file.txt * UNC path: \\server\share\directory\file.txt * * This function does not support paths like (although Windows does): * C:\..\directory\file.txt * * Returns 1 if succesful or -1 on error */ int libcpath_path_get_full_path( const char *path, size_t path_length, char **full_path, size_t *full_path_size, libcerror_error_t **error ) { libcsplit_narrow_split_string_t *current_directory_split_string = NULL; libcsplit_narrow_split_string_t *path_split_string = NULL; char *change_volume_name = NULL; char *current_working_directory = NULL; char *current_directory = NULL; char *current_directory_string_segment = NULL; char *full_path_prefix = NULL; char *last_used_path_string_segment = NULL; char *path_string_segment = NULL; const char *volume_name = NULL; static char *function = "libcpath_path_get_full_path"; size_t current_directory_name_index = 0; size_t current_directory_size = 0; size_t current_directory_string_segment_size = 0; size_t current_working_directory_size = 0; size_t full_path_index = 0; size_t full_path_prefix_length = 0; size_t last_used_path_string_segment_size = 0; size_t path_directory_name_index = 0; size_t path_string_segment_size = 0; size_t share_name_index = 0; size_t volume_name_length = 0; uint8_t path_type = LIBCPATH_TYPE_RELATIVE; int current_directory_number_of_segments = 0; int current_directory_segment_index = 0; int error_abort = 0; int last_used_path_segment_index = -1; int path_number_of_segments = 0; int path_segment_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid path length is zero.", function ); return( -1 ); } if( path_length >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path length value exceeds maximum.", function ); return( -1 ); } if( full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path.", function ); return( -1 ); } if( *full_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid full path value already set.", function ); return( -1 ); } if( full_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path size.", function ); return( -1 ); } if( path_length >= 2 ) { /* Check if the path starts with a volume letter */ if( ( path[ 1 ] == ':' ) && ( ( ( path[ 0 ] >= 'A' ) && ( path[ 0 ] <= 'Z' ) ) || ( ( path[ 0 ] >= 'a' ) && ( path[ 0 ] <= 'z' ) ) ) ) { volume_name = &( path[ 0 ] ); volume_name_length = 2; path_directory_name_index = 2; if( ( path_length >= 3 ) && ( path[ 2 ] == '\\' ) ) { path_type = LIBCPATH_TYPE_ABSOLUTE; path_directory_name_index += 1; } } /* Check for special paths * paths with prefix: \\ */ else if( ( path[ 0 ] == '\\' ) && ( path[ 1 ] == '\\' ) ) { /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( ( path[ 2 ] == '.' ) || ( path[ 2 ] == '?' ) ) && ( path[ 3 ] == '\\' ) ) { if( path[ 2 ] == '.' ) { path_type = LIBCPATH_TYPE_DEVICE; } else { path_type = LIBCPATH_TYPE_EXTENDED_LENGTH; } } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index <= path_length; share_name_index++ ) { if( path[ share_name_index ] == '\\' ) { break; } } if( share_name_index > path_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid path - missing share name.", function ); goto on_error; } for( path_directory_name_index = share_name_index + 1; path_directory_name_index <= path_length; path_directory_name_index++ ) { if( path[ path_directory_name_index ] == '\\' ) { break; } } path_type = LIBCPATH_TYPE_UNC; volume_name = &( path[ 2 ] ); volume_name_length = path_directory_name_index - 2; } } } /* If the path is a device path, an extended-length path or an UNC * do not bother to lookup the current directory */ if( ( path_type != LIBCPATH_TYPE_DEVICE ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH ) && ( path_type != LIBCPATH_TYPE_UNC ) ) { /* If the path contains a volume name switch to that * volume to determine the current directory */ if( volume_name != NULL ) { if( libcpath_path_get_current_working_directory( ¤t_working_directory, ¤t_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current working directory.", function ); goto on_error; } change_volume_name = libcstring_narrow_string_allocate( volume_name_length + 1 ); if( change_volume_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create change volume name.", function ); goto on_error; } if( libcstring_narrow_string_copy( change_volume_name, volume_name, volume_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set change volume name.", function ); goto on_error; } change_volume_name[ volume_name_length ] = 0; if( libcpath_path_change_directory( change_volume_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to change current working directory.", function ); goto on_error; } memory_free( change_volume_name ); change_volume_name = NULL; } if( libcpath_path_get_current_working_directory( ¤t_directory, ¤t_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory.", function ); error_abort = 1; } if( current_working_directory != NULL ) { if( libcpath_path_change_directory( current_working_directory, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to change current working directory.", function ); goto on_error; } memory_free( current_working_directory ); current_working_directory = NULL; } /* Make sure the current working directory has been changed * back to its original value */ if( error_abort != 0 ) { goto on_error; } /* Determine the volume name using the current directory if necessary */ if( current_directory_size >= 3 ) { /* Check if the path starts with a volume letter */ if( ( current_directory[ 1 ] == ':' ) && ( ( ( current_directory[ 0 ] >= 'A' ) && ( current_directory[ 0 ] <= 'Z' ) ) || ( ( current_directory[ 0 ] >= 'a' ) && ( current_directory[ 0 ] <= 'z' ) ) ) ) { if( volume_name == NULL ) { volume_name = &( current_directory[ 0 ] ); volume_name_length = 2; } current_directory_name_index = 2; if( current_directory[ 2 ] == '\\' ) { current_directory_name_index += 1; } } /* Check for special paths * paths with prefix: \\ */ else if( ( current_directory[ 0 ] == '\\' ) && ( current_directory[ 1 ] == '\\' ) ) { /* Ignore the following special paths * device path prefix: \\.\ */ if( ( current_directory_size >= 4 ) && ( current_directory[ 2 ] == '.' ) && ( current_directory[ 3 ] == '\\' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported current directory.", function ); return( -1 ); } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index < current_directory_size; share_name_index++ ) { if( current_directory[ share_name_index ] == '\\' ) { break; } } if( share_name_index >= current_directory_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid path - missing share name.", function ); goto on_error; } for( current_directory_name_index = share_name_index + 1; current_directory_name_index < current_directory_size; current_directory_name_index++ ) { if( current_directory[ current_directory_name_index ] == '\\' ) { break; } } if( volume_name == NULL ) { volume_name = &( current_directory[ 2 ] ); volume_name_length = current_directory_name_index - 2; } } } } } if( current_directory != NULL ) { if( libcsplit_narrow_string_split( &( current_directory[ current_directory_name_index ] ), libcstring_narrow_string_length( &( current_directory[ current_directory_name_index ] ) ) + 1, '\\', ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split current directory.", function ); goto on_error; } } if( libcsplit_narrow_string_split( &( path[ path_directory_name_index ] ), path_length - path_directory_name_index + 1, '\\', &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split path.", function ); goto on_error; } /* The size of the full path consists of: * the size of the prefix (\\?\ or \\.\) */ *full_path_size = 4; /* If the path contains a volume name * the length of the volume name * a directory separator */ if( volume_name != NULL ) { *full_path_size += volume_name_length + 1; } /* If the path contains an UNC path * add the size of the UNC\ prefix */ if( share_name_index > 0 ) { *full_path_size += 4; } /* If the path is relative * add the size of the current directory * a directory separator, if necessary */ if( path_type == LIBCPATH_TYPE_RELATIVE ) { *full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) ); if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != '\\' ) ) { *full_path_size += 1; } } if( current_directory_split_string != NULL ) { if( libcsplit_narrow_split_string_get_number_of_segments( current_directory_split_string, ¤t_directory_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of current directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_narrow_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == '.' ) && ( path_string_segment[ 1 ] == '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= current_directory_string_segment_size; if( libcsplit_narrow_split_string_set_segment_by_index( current_directory_split_string, current_directory_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } current_directory_segment_index--; } else if( last_used_path_segment_index >= 0 ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used path string string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= last_used_path_string_segment_size; if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, last_used_path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Find the previous path split value that contains a name */ while( last_used_path_segment_index > 0 ) { last_used_path_segment_index--; if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment_size != 0 ) { break; } } } if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is . ignore the entry */ else if( ( path_string_segment_size == 2 ) && ( path_string_segment[ 0 ] == '.' ) ) { if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is empty ignore the entry */ else if( path_string_segment_size <= 1 ) { if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } else { /* Add the size of the directory or file name and a directory separator * Note that the size includes the end of string character */ *full_path_size += path_string_segment_size; last_used_path_segment_index = path_segment_index; } } /* Note that the last path separator serves as the end of string */ full_path_index = 0; *full_path = libcstring_narrow_string_allocate( *full_path_size ); if( *full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create full path.", function ); goto on_error; } if( path_type == LIBCPATH_TYPE_DEVICE ) { full_path_prefix = "\\\\.\\"; full_path_prefix_length = 4; } else { full_path_prefix = "\\\\?\\"; full_path_prefix_length = 4; } if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), full_path_prefix, full_path_prefix_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set prefix in full path.", function ); goto on_error; } full_path_index += full_path_prefix_length; /* If there is a share name the path is an UNC path */ if( share_name_index > 0 ) { if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), "UNC\\", 4 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UNC\\ prefix in full path.", function ); goto on_error; } full_path_index += 4; } if( volume_name != NULL ) { if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), volume_name, volume_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set volume name in full path.", function ); goto on_error; } full_path_index += volume_name_length; ( *full_path )[ full_path_index ] = '\\'; full_path_index += 1; } /* If the path is relative * add the current directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = '\\'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = '\\'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_narrow_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_narrow_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_narrow_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_narrow_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } if( change_volume_name != NULL ) { memory_free( change_volume_name ); } if( current_working_directory != NULL ) { memory_free( current_working_directory ); } return( -1 ); } #else /* Determines the full path of the POSIX path specified * * Scenarios: * /home/user/file.txt * /home/user/../user/file.txt * /../home/user/file.txt * user/../user/file.txt * * Returns 1 if succesful or -1 on error */ int libcpath_path_get_full_path( const char *path, size_t path_length, char **full_path, size_t *full_path_size, libcerror_error_t **error ) { libcsplit_narrow_split_string_t *current_directory_split_string = NULL; libcsplit_narrow_split_string_t *path_split_string = NULL; char *current_directory = NULL; char *current_directory_string_segment = NULL; char *last_used_path_string_segment = NULL; char *path_string_segment = NULL; static char *function = "libcpath_path_get_full_path"; size_t current_directory_size = 0; size_t current_directory_string_segment_size = 0; size_t full_path_index = 0; size_t last_used_path_string_segment_size = 0; size_t path_string_segment_size = 0; uint8_t path_type = LIBCPATH_TYPE_RELATIVE; int current_directory_number_of_segments = 0; int current_directory_segment_index = 0; int last_used_path_segment_index = -1; int path_number_of_segments = 0; int path_segment_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid path length is zero.", function ); return( -1 ); } if( path_length >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path length value exceeds maximum.", function ); return( -1 ); } if( full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path.", function ); return( -1 ); } if( *full_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid full path value already set.", function ); return( -1 ); } if( full_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path size.", function ); return( -1 ); } if( path[ 0 ] == '/' ) { path_type = LIBCPATH_TYPE_ABSOLUTE; } else { if( libcpath_path_get_current_working_directory( ¤t_directory, ¤t_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory.", function ); goto on_error; } } if( current_directory != NULL ) { if( libcsplit_narrow_string_split( current_directory, libcstring_narrow_string_length( current_directory ) + 1, '/', ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split current directory.", function ); goto on_error; } } if( libcsplit_narrow_string_split( path, path_length + 1, '/', &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split path.", function ); goto on_error; } /* Determine the full path size */ /* If the path is absolute * a directory separator */ if( path_type == LIBCPATH_TYPE_ABSOLUTE ) { *full_path_size = 1; } /* If the path is relative * add the size of the current directory * a directory separator, if necessary */ else if( path_type == LIBCPATH_TYPE_RELATIVE ) { *full_path_size = current_directory_size - 1; if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != '/' ) ) { *full_path_size += 1; } } if( current_directory_split_string != NULL ) { if( libcsplit_narrow_split_string_get_number_of_segments( current_directory_split_string, ¤t_directory_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of current directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_narrow_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == '.' ) && ( path_string_segment[ 1 ] == '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= current_directory_string_segment_size; if( libcsplit_narrow_split_string_set_segment_by_index( current_directory_split_string, current_directory_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } current_directory_segment_index--; } else if( last_used_path_segment_index >= 0 ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used path string string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= last_used_path_string_segment_size; if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, last_used_path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Find the previous path split value that contains a name */ while( last_used_path_segment_index > 0 ) { last_used_path_segment_index--; if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment_size != 0 ) { break; } } } if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is . ignore the entry */ else if( ( path_string_segment_size == 2 ) && ( path_string_segment[ 0 ] == '.' ) ) { if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is empty ignore the entry */ else if( path_string_segment_size <= 1 ) { if( libcsplit_narrow_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } else { /* Add the size of the directory or file name and a directory separator * Note that the size includes the end of string character */ *full_path_size += path_string_segment_size; last_used_path_segment_index = path_segment_index; } } /* Note that the last path separator serves as the end of string */ full_path_index = 0; *full_path = libcstring_narrow_string_allocate( *full_path_size ); if( *full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create full path.", function ); goto on_error; } if( path_type == LIBCPATH_TYPE_ABSOLUTE ) { ( *full_path )[ full_path_index ] = '/'; full_path_index += 1; } /* If the path is relative * add the current directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = '/'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_narrow_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( libcstring_narrow_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = '/'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_narrow_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_narrow_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_narrow_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_narrow_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } return( -1 ); } #endif /* defined( WINAPI ) */ /* Combines the directory name and filename into a path * Returns 1 if successful or -1 on error */ int libcpath_path_join( char **path, size_t *path_size, const char *directory_name, size_t directory_name_length, const char *filename, size_t filename_length, libcerror_error_t **error ) { static char *function = "libcpath_path_join"; size_t path_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( *path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid path value already set.", function ); return( -1 ); } if( path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path size.", function ); return( -1 ); } if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } if( directory_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid directory name length value exceeds maximum.", function ); return( -1 ); } if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( filename_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename length value exceeds maximum.", function ); return( -1 ); } *path_size = directory_name_length + filename_length + 1; if( directory_name[ directory_name_length ] != (char) LIBCPATH_SEPARATOR ) { *path_size += 1; } *path = libcstring_narrow_string_allocate( *path_size ); if( *path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create path.", function ); goto on_error; } if( libcstring_narrow_string_copy( *path, directory_name, directory_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy directory name to path.", function ); goto on_error; } path_index = directory_name_length; ( *path )[ path_index++ ] = (char) LIBCPATH_SEPARATOR; if( libcstring_narrow_string_copy( &( ( *path )[ path_index ] ), filename, filename_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filename to path.", function ); goto on_error; } path_index += filename_length; ( *path )[ path_index ] = 0; return( 1 ); on_error: if( *path != NULL ) { memory_free( path ); *path = NULL; } *path_size = 0; return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Makes the directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcpath_path_make_directory( const char *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_make_directory"; DWORD error_code = 0; if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } if( CreateDirectoryA( directory_name, NULL ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, error_code, "%s: unable to make directory.", function ); return( -1 ); } return( 1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI make directory function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_MKDIR ) || defined( WINAPI ) /* Makes the directory * This function uses the POSIX mkdir function or equivalent * Returns 1 if successful or -1 on error */ int libcpath_path_make_directory( const char *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_make_directory"; if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } #if defined( WINAPI ) if( _mkdir( directory_name ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to make directory.", function ); return( -1 ); } #else if( mkdir( directory_name, 0755 ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to make directory.", function ); return( -1 ); } #endif return( 1 ); } #else #error Missing make directory function #endif /* Sanitizes the path * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize( char *path, size_t *path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize"; size_t path_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path size.", function ); return( -1 ); } if( *path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *path_size > 32767 ) { path[ 32766 ] = 0; *path_size = 32767; } #endif for( path_index = 0; path_index < *path_size; path_index++ ) { if( path[ path_index ] == 0x00 ) { break; } else if( ( path[ path_index ] >= 0x01 ) && ( path[ path_index ] <= 0x1f ) ) { path[ path_index ] = '_'; } #if defined( WINAPI ) else if( path[ path_index ] == '/' ) #else else if( path[ path_index ] == '\\' ) #endif { path[ path_index ] = '_'; } else if( ( path[ path_index ] == '!' ) || ( path[ path_index ] == '$' ) || ( path[ path_index ] == '%' ) || ( path[ path_index ] == '&' ) || ( path[ path_index ] == '*' ) || ( path[ path_index ] == '+' ) || ( path[ path_index ] == ':' ) || ( path[ path_index ] == ';' ) || ( path[ path_index ] == '<' ) || ( path[ path_index ] == '>' ) || ( path[ path_index ] == '?' ) || ( path[ path_index ] == '@' ) || ( path[ path_index ] == '|' ) || ( path[ path_index ] == '~' ) || ( path[ path_index ] == 0x7e ) ) { path[ path_index ] = '_'; } } return( 1 ); } /* Sanitizes the filename * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize_filename( char *filename, size_t *filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize_filename"; size_t filename_index = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename size.", function ); return( -1 ); } if( *filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *filename_size > 256 ) { filename[ 255 ] = 0; *filename_size = 256; } #endif for( filename_index = 0; filename_index < *filename_size; filename_index++ ) { if( filename[ filename_index ] == 0x00 ) { break; } else if( ( filename[ filename_index ] >= 0x01 ) && ( filename[ filename_index ] <= 0x1f ) ) { filename[ filename_index ] = '_'; } else if( ( filename[ filename_index ] == '/' ) || ( filename[ filename_index ] == '\\' ) ) { filename[ filename_index ] = '_'; } else if( ( filename[ filename_index ] == '!' ) || ( filename[ filename_index ] == '$' ) || ( filename[ filename_index ] == '%' ) || ( filename[ filename_index ] == '&' ) || ( filename[ filename_index ] == '*' ) || ( filename[ filename_index ] == '+' ) || ( filename[ filename_index ] == ':' ) || ( filename[ filename_index ] == ';' ) || ( filename[ filename_index ] == '<' ) || ( filename[ filename_index ] == '>' ) || ( filename[ filename_index ] == '?' ) || ( filename[ filename_index ] == '@' ) || ( filename[ filename_index ] == '~' ) || ( filename[ filename_index ] == '|' ) || ( filename[ filename_index ] == 0x7e ) ) { filename[ filename_index ] = '_'; } } return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Changes the directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcpath_path_change_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_change_directory_wide"; DWORD error_code = 0; if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } if( SetCurrentDirectoryW( directory_name ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, error_code, "%s: unable to change directory.", function ); return( -1 ); } return( 1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI make directory function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_CHDIR ) || defined( WINAPI ) /* Changes the directory * This function uses the POSIX chdir function or equivalent * Returns 1 if successful or -1 on error */ int libcpath_path_change_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_change_directory_wide"; #if !defined( WINAPI ) char *narrow_directory_name = 0; size_t directory_name_length = 0; size_t narrow_directory_name_size = 0; int result = 0; #endif if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } #if defined( WINAPI ) if( _wchdir( directory_name ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to change directory.", function ); return( -1 ); } #else directory_name_length = libcstring_wide_string_length( directory_name ); if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) directory_name, directory_name_length + 1, &narrow_directory_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) directory_name, directory_name_length + 1, &narrow_directory_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) directory_name, directory_name_length + 1, libclocale_codepage, &narrow_directory_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) directory_name, directory_name_length + 1, libclocale_codepage, &narrow_directory_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow directory name size.", function ); goto on_error; } if( ( narrow_directory_name_size > (size_t) SSIZE_MAX ) || ( ( sizeof( char ) * narrow_directory_name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow directory name size value exceeds maximum.", function ); goto on_error; } narrow_directory_name = libcstring_narrow_string_allocate( narrow_directory_name_size ); if( narrow_directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create narrow directory name.", function ); goto on_error; } if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_directory_name, narrow_directory_name_size, (libuna_utf32_character_t *) directory_name, directory_name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_directory_name, narrow_directory_name_size, (libuna_utf16_character_t *) directory_name, directory_name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_directory_name, narrow_directory_name_size, libclocale_codepage, (libuna_utf32_character_t *) directory_name, directory_name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_directory_name, narrow_directory_name_size, libclocale_codepage, (libuna_utf16_character_t *) directory_name, directory_name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); goto on_error; } if( chdir( narrow_directory_name ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to change directory.", function ); return( -1 ); } memory_free( narrow_directory_name ); #endif return( 1 ); #if !defined( WINAPI ) on_error: if( narrow_directory_name != NULL ) { memory_free( narrow_directory_name ); } return( -1 ); #endif } #else #error Missing change directory function #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Retrieves the current working directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcpath_path_get_current_working_directory_wide( wchar_t **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_current_working_directory_wide"; DWORD safe_current_working_directory_size = 0; DWORD error_code = 0; if( current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory.", function ); return( -1 ); } if( *current_working_directory != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid current working directory value already set.", function ); return( -1 ); } if( current_working_directory_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory size.", function ); return( -1 ); } safe_current_working_directory_size = GetCurrentDirectoryW( 0, NULL ); if( safe_current_working_directory_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current working directory size.", function ); goto on_error; } if( (size_t) safe_current_working_directory_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: current working directory size value out of bounds.", function ); goto on_error; } *current_working_directory_size = (size_t) safe_current_working_directory_size; *current_working_directory = libcstring_wide_string_allocate( *current_working_directory_size ); if( *current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create current working directory.", function ); goto on_error; } if( GetCurrentDirectoryW( safe_current_working_directory_size, *current_working_directory ) != ( safe_current_working_directory_size - 1 ) ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, error_code, "%s: unable to retrieve current working directory.", function ); goto on_error; } return( 1 ); on_error: if( current_working_directory != NULL ) { memory_free( *current_working_directory ); *current_working_directory = NULL; } *current_working_directory_size = 0; return( -1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI get current working directory function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_GETCWD ) || defined( WINAPI ) /* Retrieves the current working directory * This function uses the POSIX getcwd function or equivalent * Returns 1 if successful or -1 on error */ int libcpath_path_get_current_working_directory_wide( wchar_t **current_working_directory, size_t *current_working_directory_size, libcerror_error_t **error ) { static char *function = "libcpath_path_get_current_working_directory_wide"; #if !defined( WINAPI ) char *narrow_current_working_directory = 0; size_t narrow_current_working_directory_size = 0; int result = 0; #endif if( current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory.", function ); return( -1 ); } if( *current_working_directory != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid current working directory value already set.", function ); return( -1 ); } if( current_working_directory_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid current working directory size.", function ); return( -1 ); } #if defined( WINAPI ) *current_working_directory_size = (size_t) _MAX_PATH; #else narrow_current_working_directory = libcstring_narrow_string_allocate( PATH_MAX ); if( narrow_current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create narrow current working directory.", function ); goto on_error; } if( getcwd( narrow_current_working_directory, PATH_MAX ) == NULL ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, errno, "%s: unable to retrieve current working directory.", function ); goto on_error; } narrow_current_working_directory_size = 1 + libcstring_narrow_string_length( narrow_current_working_directory ); /* Convert the current working directory to a wide string * if the platform has no wide character open function */ if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) narrow_current_working_directory, narrow_current_working_directory_size, current_working_directory_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) narrow_current_working_directory, narrow_current_working_directory_size, current_working_directory_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_size_from_byte_stream( (uint8_t *) narrow_current_working_directory, narrow_current_working_directory_size, libclocale_codepage, current_working_directory_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_size_from_byte_stream( (uint8_t *) narrow_current_working_directory, narrow_current_working_directory_size, libclocale_codepage, current_working_directory_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine wide character current working directory size.", function ); return( -1 ); } #endif *current_working_directory = libcstring_wide_string_allocate( *current_working_directory_size ); if( *current_working_directory == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create current working directory.", function ); goto on_error; } #if defined( WINAPI ) if( _wgetcwd( *current_working_directory, *current_working_directory_size ) == NULL ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, errno, "%s: unable to retrieve current working directory.", function ); goto on_error; } #else if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) *current_working_directory, *current_working_directory_size, (libuna_utf8_character_t *) narrow_current_working_directory, narrow_current_working_directory_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) *current_working_directory, *current_working_directory_size, (libuna_utf8_character_t *) narrow_current_working_directory, narrow_current_working_directory_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_utf32_string_copy_from_byte_stream( (libuna_utf32_character_t *) *current_working_directory, *current_working_directory_size, (uint8_t *) narrow_current_working_directory, narrow_current_working_directory_size, libclocale_codepage, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) *current_working_directory, *current_working_directory_size, (uint8_t *) narrow_current_working_directory, narrow_current_working_directory_size, libclocale_codepage, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set current working directory.", function ); goto on_error; } #endif return( 1 ); on_error: #if !defined( WINAPI ) if( narrow_current_working_directory != NULL ) { memory_free( narrow_current_working_directory ); } #endif if( current_working_directory != NULL ) { memory_free( *current_working_directory ); *current_working_directory = NULL; } *current_working_directory_size = 0; return( -1 ); } #else #error Missing get current working directory function #endif #if defined( WINAPI ) /* Determines the full path of the Windows path specified * The function uses the extended-length path format * (path with \\?\ prefix) * * Scenario's that are considered full paths: * Device path: \\.\PhysicalDrive0 * Extended-length path: \\?\C:\directory\file.txt * Extended-length UNC path: \\?\UNC\server\share\directory\file.txt * * Scenario's that are not considered full paths: * Local 'absolute' path: \directory\file.txt * Local 'relative' path: ..\directory\file.txt * Local 'relative' path: .\directory\file.txt * Volume 'absolute' path: C:\directory\file.txt * Volume 'relative' path: C:directory\file.txt * UNC path: \\server\share\directory\file.txt * * This function does not support paths like (although Windows does): * C:\..\directory\file.txt * * Returns 1 if succesful or -1 on error */ int libcpath_path_get_full_path_wide( const wchar_t *path, size_t path_length, wchar_t **full_path, size_t *full_path_size, libcerror_error_t **error ) { libcsplit_wide_split_string_t *current_directory_split_string = NULL; libcsplit_wide_split_string_t *path_split_string = NULL; wchar_t *change_volume_name = NULL; wchar_t *current_working_directory = NULL; wchar_t *current_directory = NULL; wchar_t *current_directory_string_segment = NULL; wchar_t *full_path_prefix = NULL; wchar_t *last_used_path_string_segment = NULL; wchar_t *path_string_segment = NULL; const wchar_t *volume_name = NULL; static char *function = "libcpath_path_get_full_path_wide"; size_t current_directory_name_index = 0; size_t current_directory_size = 0; size_t current_directory_string_segment_size = 0; size_t current_working_directory_size = 0; size_t full_path_index = 0; size_t full_path_prefix_length = 0; size_t last_used_path_string_segment_size = 0; size_t path_directory_name_index = 0; size_t path_string_segment_size = 0; size_t share_name_index = 0; size_t volume_name_length = 0; uint8_t path_type = LIBCPATH_TYPE_RELATIVE; int current_directory_number_of_segments = 0; int current_directory_segment_index = 0; int error_abort = 0; int last_used_path_segment_index = -1; int path_number_of_segments = 0; int path_segment_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid path length is zero.", function ); return( -1 ); } if( path_length >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path length value exceeds maximum.", function ); return( -1 ); } if( full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path.", function ); return( -1 ); } if( *full_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid full path value already set.", function ); return( -1 ); } if( full_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path size.", function ); return( -1 ); } if( path_length >= 2 ) { /* Check if the path starts with a volume letter */ if( ( path[ 1 ] == (wchar_t) ':' ) && ( ( ( path[ 0 ] >= (wchar_t) 'A' ) && ( path[ 0 ] <= (wchar_t) 'Z' ) ) || ( ( path[ 0 ] >= (wchar_t) 'a' ) && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) ) { volume_name = &( path[ 0 ] ); volume_name_length = 2; path_directory_name_index = 2; if( ( path_length >= 3 ) && ( path[ 2 ] == (wchar_t) '\\' ) ) { path_type = LIBCPATH_TYPE_ABSOLUTE; path_directory_name_index += 1; } } /* Check for special paths * paths with prefix: \\ */ else if( ( path[ 0 ] == (wchar_t) '\\' ) && ( path[ 1 ] == (wchar_t) '\\' ) ) { /* Determine if the path is a special path * device path prefix: \\.\ * extended-length path prefix: \\?\ */ if( ( path_length >= 4 ) && ( ( path[ 2 ] == (wchar_t) '.' ) || ( path[ 2 ] == (wchar_t) '?' ) ) && ( path[ 3 ] == (wchar_t) '\\' ) ) { if( path[ 2 ] == (wchar_t) '.' ) { path_type = LIBCPATH_TYPE_DEVICE; } else { path_type = LIBCPATH_TYPE_EXTENDED_LENGTH; } } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index <= path_length; share_name_index++ ) { if( path[ share_name_index ] == (wchar_t) '\\' ) { break; } } if( share_name_index > path_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid path - missing share name.", function ); goto on_error; } for( path_directory_name_index = share_name_index + 1; path_directory_name_index <= path_length; path_directory_name_index++ ) { if( path[ path_directory_name_index ] == (wchar_t) '\\' ) { break; } } path_type = LIBCPATH_TYPE_UNC; volume_name = &( path[ 2 ] ); volume_name_length = path_directory_name_index - 2; } } } /* If the path is a device path, an extended-length path or an UNC * do not bother to lookup the current directory */ if( ( path_type != LIBCPATH_TYPE_DEVICE ) && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH ) && ( path_type != LIBCPATH_TYPE_UNC ) ) { /* If the path contains a volume name switch to that * volume to determine the current directory */ if( volume_name != NULL ) { if( libcpath_path_get_current_working_directory_wide( ¤t_working_directory, ¤t_working_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current working directory.", function ); goto on_error; } change_volume_name = libcstring_wide_string_allocate( volume_name_length + 1 ); if( change_volume_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create change volume name.", function ); goto on_error; } if( libcstring_wide_string_copy( change_volume_name, volume_name, volume_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set change volume name.", function ); goto on_error; } change_volume_name[ volume_name_length ] = 0; if( libcpath_path_change_directory_wide( change_volume_name, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to change current working directory.", function ); goto on_error; } memory_free( change_volume_name ); change_volume_name = NULL; } if( libcpath_path_get_current_working_directory_wide( ¤t_directory, ¤t_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory.", function ); error_abort = 1; } if( current_working_directory != NULL ) { if( libcpath_path_change_directory_wide( current_working_directory, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to change current working directory.", function ); goto on_error; } memory_free( current_working_directory ); current_working_directory = NULL; } /* Make sure the current working directory has been changed * back to its original value */ if( error_abort != 0 ) { goto on_error; } /* Determine the volume name using the current directory if necessary */ if( current_directory_size >= 3 ) { /* Check if the path starts with a volume letter */ if( ( current_directory[ 1 ] == (wchar_t) ':' ) && ( ( ( current_directory[ 0 ] >= (wchar_t) 'A' ) && ( current_directory[ 0 ] <= (wchar_t) 'Z' ) ) || ( ( current_directory[ 0 ] >= (wchar_t) 'a' ) && ( current_directory[ 0 ] <= (wchar_t) 'z' ) ) ) ) { if( volume_name == NULL ) { volume_name = &( current_directory[ 0 ] ); volume_name_length = 2; } current_directory_name_index = 2; if( current_directory[ 2 ] == (wchar_t) '\\' ) { current_directory_name_index += 1; } } /* Check for special paths * paths with prefix: \\ */ else if( ( current_directory[ 0 ] == (wchar_t) '\\' ) && ( current_directory[ 1 ] == (wchar_t) '\\' ) ) { /* Ignore the following special paths * device path prefix: \\.\ */ if( ( current_directory_size >= 4 ) && ( current_directory[ 2 ] == (wchar_t) '.' ) && ( current_directory[ 3 ] == (wchar_t) '\\' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported current directory.", function ); return( -1 ); } else { /* Determine the volume in an UNC path * \\server\share */ for( share_name_index = 2; share_name_index < current_directory_size; share_name_index++ ) { if( current_directory[ share_name_index ] == (wchar_t) '\\' ) { break; } } if( share_name_index >= current_directory_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid path - missing share name.", function ); goto on_error; } for( current_directory_name_index = share_name_index + 1; current_directory_name_index < current_directory_size; current_directory_name_index++ ) { if( current_directory[ current_directory_name_index ] == (wchar_t) '\\' ) { break; } } if( volume_name == NULL ) { volume_name = &( current_directory[ 2 ] ); volume_name_length = current_directory_name_index - 2; } } } } } if( current_directory != NULL ) { if( libcsplit_wide_string_split( &( current_directory[ current_directory_name_index ] ), libcstring_wide_string_length( &( current_directory[ current_directory_name_index ] ) ) + 1, (wchar_t) '\\', ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split current directory.", function ); goto on_error; } } if( libcsplit_wide_string_split( &( path[ path_directory_name_index ] ), path_length - path_directory_name_index + 1, (wchar_t) '\\', &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split path.", function ); goto on_error; } /* The size of the full path consists of: * the size of the prefix (\\?\ or \\.\) * the length of the volume name * a directory separator */ *full_path_size = 4; /* If the path contains a volume name * the length of the volume name * a directory separator */ if( volume_name != NULL ) { *full_path_size += volume_name_length + 1; } /* If the path contains an UNC path * add the size of the UNC\ prefix */ if( share_name_index > 0 ) { *full_path_size += 4; } /* If the path is relative * add the size of the current directory * a directory separator, if necessary */ if( path_type == LIBCPATH_TYPE_RELATIVE ) { *full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) ); if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != (wchar_t) '\\' ) ) { *full_path_size += 1; } } if( current_directory_split_string != NULL ) { if( libcsplit_wide_split_string_get_number_of_segments( current_directory_split_string, ¤t_directory_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of current directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_wide_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == (wchar_t) '.' ) && ( path_string_segment[ 1 ] == (wchar_t) '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= current_directory_string_segment_size; if( libcsplit_wide_split_string_set_segment_by_index( current_directory_split_string, current_directory_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } current_directory_segment_index--; } else if( last_used_path_segment_index >= 0 ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used path string string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= last_used_path_string_segment_size; if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, last_used_path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Find the previous path split value that contains a name */ while( last_used_path_segment_index > 0 ) { last_used_path_segment_index--; if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment_size != 0 ) { break; } } } if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is . ignore the entry */ else if( ( path_string_segment_size == 2 ) && ( path_string_segment[ 0 ] == (wchar_t) '.' ) ) { if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is empty ignore the entry */ else if( path_string_segment_size <= 1 ) { if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } else { /* Add the size of the directory or file name and a directory separator * Note that the size includes the end of string character */ *full_path_size += path_string_segment_size; last_used_path_segment_index = path_segment_index; } } /* Note that the last path separator serves as the end of string */ full_path_index = 0; *full_path = libcstring_wide_string_allocate( *full_path_size ); if( *full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create full path.", function ); goto on_error; } if( path_type == LIBCPATH_TYPE_DEVICE ) { full_path_prefix = L"\\\\.\\"; full_path_prefix_length = 4; } else { full_path_prefix = L"\\\\?\\"; full_path_prefix_length = 4; } if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), full_path_prefix, full_path_prefix_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set prefix in full path.", function ); goto on_error; } full_path_index += full_path_prefix_length; /* If there is a share name the path is an UNC path */ if( share_name_index > 0 ) { if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), L"UNC\\", 4 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UNC\\ prefix in full path.", function ); goto on_error; } full_path_index += 4; } if( volume_name != NULL ) { if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), volume_name, volume_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set volume name in full path.", function ); goto on_error; } full_path_index += volume_name_length; ( *full_path )[ full_path_index ] = (wchar_t) '\\'; full_path_index += 1; } /* If the path is relative * add the current directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '\\'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '\\'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_wide_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_wide_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_wide_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_wide_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } if( change_volume_name != NULL ) { memory_free( change_volume_name ); } if( current_working_directory != NULL ) { memory_free( current_working_directory ); } return( -1 ); } #else /* Determines the full path of the POSIX path specified * * Scenarios: * /home/user/file.txt * /home/user/../user/file.txt * /../home/user/file.txt * user/../user/file.txt * * Returns 1 if succesful or -1 on error */ int libcpath_path_get_full_path_wide( const wchar_t *path, size_t path_length, wchar_t **full_path, size_t *full_path_size, libcerror_error_t **error ) { libcsplit_wide_split_string_t *current_directory_split_string = NULL; libcsplit_wide_split_string_t *path_split_string = NULL; wchar_t *current_directory = NULL; wchar_t *current_directory_string_segment = NULL; wchar_t *last_used_path_string_segment = NULL; wchar_t *path_string_segment = NULL; static char *function = "libcpath_path_get_full_path_wide"; size_t current_directory_size = 0; size_t current_directory_string_segment_size = 0; size_t full_path_index = 0; size_t last_used_path_string_segment_size = 0; size_t path_string_segment_size = 0; uint8_t path_type = LIBCPATH_TYPE_RELATIVE; int current_directory_number_of_segments = 0; int current_directory_segment_index = 0; int last_used_path_segment_index = -1; int path_number_of_segments = 0; int path_segment_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid path length is zero.", function ); return( -1 ); } if( path_length >= (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path length value exceeds maximum.", function ); return( -1 ); } if( full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path.", function ); return( -1 ); } if( *full_path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid full path value already set.", function ); return( -1 ); } if( full_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid full path size.", function ); return( -1 ); } if( path[ 0 ] == (wchar_t) '/' ) { path_type = LIBCPATH_TYPE_ABSOLUTE; } else { if( libcpath_path_get_current_working_directory_wide( ¤t_directory, ¤t_directory_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory.", function ); goto on_error; } } if( current_directory != NULL ) { if( libcsplit_wide_string_split( current_directory, libcstring_wide_string_length( current_directory ) + 1, (wchar_t) '/', ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split current directory.", function ); goto on_error; } } if( libcsplit_wide_string_split( path, path_length + 1, (wchar_t) '/', &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to split path.", function ); goto on_error; } /* Determine the full path size */ /* If the path is absolute * a directory separator */ if( path_type == LIBCPATH_TYPE_ABSOLUTE ) { *full_path_size = 1; } /* If the path is relative * add the size of the current directory * a directory separator, if necessary */ else if( path_type == LIBCPATH_TYPE_RELATIVE ) { *full_path_size = current_directory_size - 1; if( ( current_directory_size >= 2 ) && ( current_directory[ current_directory_size - 2 ] != (wchar_t) '/' ) ) { *full_path_size += 1; } } if( current_directory_split_string != NULL ) { if( libcsplit_wide_split_string_get_number_of_segments( current_directory_split_string, ¤t_directory_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of current directory string segments.", function ); goto on_error; } current_directory_segment_index = current_directory_number_of_segments - 1; } if( libcsplit_wide_split_string_get_number_of_segments( path_split_string, &path_number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of path string segments.", function ); goto on_error; } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } /* If the path is .. reverse the current path by one directory */ if( ( path_string_segment_size == 3 ) && ( path_string_segment[ 0 ] == (wchar_t) '.' ) && ( path_string_segment[ 1 ] == (wchar_t) '.' ) ) { if( ( current_directory_split_string != NULL ) && ( last_used_path_segment_index == -1 ) ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= current_directory_string_segment_size; if( libcsplit_wide_split_string_set_segment_by_index( current_directory_split_string, current_directory_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } current_directory_segment_index--; } else if( last_used_path_segment_index >= 0 ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing last used path string string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Remove the size of the parent directory name and a directory separator * Note that the size includes the end of string character */ *full_path_size -= last_used_path_string_segment_size; if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, last_used_path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } /* Find the previous path split value that contains a name */ while( last_used_path_segment_index > 0 ) { last_used_path_segment_index--; if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, last_used_path_segment_index, &last_used_path_string_segment, &last_used_path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve last used path string segment: %d.", function, last_used_path_segment_index ); goto on_error; } if( last_used_path_string_segment_size != 0 ) { break; } } } if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is . ignore the entry */ else if( ( path_string_segment_size == 2 ) && ( path_string_segment[ 0 ] == (wchar_t) '.' ) ) { if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } /* If the path is empty ignore the entry */ else if( path_string_segment_size <= 1 ) { if( libcsplit_wide_split_string_set_segment_by_index( path_split_string, path_segment_index, NULL, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path string segment: %d.", function, path_segment_index ); goto on_error; } } else { /* Add the size of the directory or file name and a directory separator * Note that the size includes the end of string character */ *full_path_size += path_string_segment_size; last_used_path_segment_index = path_segment_index; } } /* Note that the last path separator serves as the end of string */ full_path_index = 0; *full_path = libcstring_wide_string_allocate( *full_path_size ); if( *full_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create full path.", function ); goto on_error; } if( path_type == LIBCPATH_TYPE_ABSOLUTE ) { ( *full_path )[ full_path_index ] = (wchar_t) '/'; full_path_index += 1; } /* If the path is relative * add the current directory elements */ if( ( path_type == LIBCPATH_TYPE_RELATIVE ) && ( current_directory_split_string != NULL ) ) { for( current_directory_segment_index = 0; current_directory_segment_index < current_directory_number_of_segments; current_directory_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( current_directory_split_string, current_directory_segment_index, ¤t_directory_string_segment, ¤t_directory_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( current_directory_string_segment_size != 0 ) { if( current_directory_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing current directory string segment: %d.", function, current_directory_segment_index ); goto on_error; } if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), current_directory_string_segment, current_directory_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set current directory split value: %d in full path.", function, current_directory_segment_index ); goto on_error; } full_path_index += current_directory_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '/'; full_path_index += 1; } } } for( path_segment_index = 0; path_segment_index < path_number_of_segments; path_segment_index++ ) { if( libcsplit_wide_split_string_get_segment_by_index( path_split_string, path_segment_index, &path_string_segment, &path_string_segment_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve path string segment: %d.", function, path_segment_index ); goto on_error; } if( path_string_segment_size != 0 ) { if( path_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing path string segment: %d.", function, path_segment_index ); goto on_error; } if( libcstring_wide_string_copy( &( ( *full_path )[ full_path_index ] ), path_string_segment, path_string_segment_size - 1 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set path split value: %d in full path.", function, path_segment_index ); goto on_error; } full_path_index += path_string_segment_size - 1; ( *full_path )[ full_path_index ] = (wchar_t) '/'; full_path_index += 1; } } ( *full_path )[ full_path_index - 1 ] = 0; if( libcsplit_wide_split_string_free( &path_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free path split string.", function ); goto on_error; } if( current_directory_split_string != NULL ) { if( libcsplit_wide_split_string_free( ¤t_directory_split_string, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free current directory split string.", function ); goto on_error; } } if( current_directory != NULL ) { memory_free( current_directory ); } return( 1 ); on_error: if( *full_path != NULL ) { memory_free( *full_path ); *full_path = NULL; } *full_path_size = 0; if( path_split_string != NULL ) { libcsplit_wide_split_string_free( &path_split_string, NULL ); } if( current_directory_split_string != NULL ) { libcsplit_wide_split_string_free( ¤t_directory_split_string, NULL ); } if( current_directory != NULL ) { memory_free( current_directory ); } return( -1 ); } #endif /* defined( WINAPI ) */ /* Combines the directory name and filename into a path * Returns 1 if successful or -1 on error */ int libcpath_path_join_wide( wchar_t **path, size_t *path_size, const wchar_t *directory_name, size_t directory_name_length, const wchar_t *filename, size_t filename_length, libcerror_error_t **error ) { static char *function = "libcpath_path_join_wide"; size_t path_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( *path != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid path value already set.", function ); return( -1 ); } if( path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path size.", function ); return( -1 ); } if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } if( directory_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid directory name length value exceeds maximum.", function ); return( -1 ); } if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( filename_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename length value exceeds maximum.", function ); return( -1 ); } *path_size = directory_name_length + filename_length + 1; if( directory_name[ directory_name_length ] != (wchar_t) LIBCPATH_SEPARATOR ) { *path_size += 1; } *path = libcstring_wide_string_allocate( *path_size ); if( *path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create path.", function ); goto on_error; } if( libcstring_wide_string_copy( *path, directory_name, directory_name_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy directory name to path.", function ); goto on_error; } path_index = directory_name_length; ( *path )[ path_index++ ] = (wchar_t) LIBCPATH_SEPARATOR; if( libcstring_wide_string_copy( &( ( *path )[ path_index ] ), filename, filename_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filename to path.", function ); goto on_error; } path_index += filename_length; ( *path )[ path_index ] = 0; return( 1 ); on_error: if( *path != NULL ) { memory_free( path ); *path = NULL; } *path_size = 0; return( -1 ); } #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Makes the directory * This function uses the WINAPI function for Windows XP or later * Returns 1 if successful or -1 on error */ int libcpath_path_make_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_make_directory_wide"; DWORD error_code = 0; if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } if( CreateDirectoryW( directory_name, NULL ) == 0 ) { error_code = GetLastError(); libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, error_code, "%s: unable to make directory.", function ); return( -1 ); } return( 1 ); } #elif defined( WINAPI ) && !defined( USE_CRT_FUNCTIONS ) /* TODO */ #error WINAPI make directory function for Windows 2000 or earlier NOT implemented yet #elif defined( HAVE_MKDIR ) || defined( WINAPI ) /* Makes the directory * This function uses the POSIX mkdir function or equivalent * Returns 1 if successful or -1 on error */ int libcpath_path_make_directory_wide( const wchar_t *directory_name, libcerror_error_t **error ) { static char *function = "libcpath_path_make_directory_wide"; #if !defined( WINAPI ) char *narrow_directory_name = 0; size_t directory_name_length = 0; size_t narrow_directory_name_size = 0; int result = 0; #endif if( directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid directory name.", function ); return( -1 ); } #if defined( WINAPI ) if( _wmkdir( directory_name ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to make directory.", function ); return( -1 ); } #else directory_name_length = libcstring_wide_string_length( directory_name ); if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) directory_name, directory_name_length + 1, &narrow_directory_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) directory_name, directory_name_length + 1, &narrow_directory_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_size_from_utf32( (libuna_utf32_character_t *) directory_name, directory_name_length + 1, libclocale_codepage, &narrow_directory_name_size, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_size_from_utf16( (libuna_utf16_character_t *) directory_name, directory_name_length + 1, libclocale_codepage, &narrow_directory_name_size, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine narrow directory name size.", function ); goto on_error; } if( ( narrow_directory_name_size > (size_t) SSIZE_MAX ) || ( ( sizeof( char ) * narrow_directory_name_size ) > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid narrow directory name size value exceeds maximum.", function ); goto on_error; } narrow_directory_name = libcstring_narrow_string_allocate( narrow_directory_name_size ); if( narrow_directory_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create narrow directory name.", function ); goto on_error; } if( libclocale_codepage == 0 ) { #if SIZEOF_WCHAR_T == 4 result = libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) narrow_directory_name, narrow_directory_name_size, (libuna_utf32_character_t *) directory_name, directory_name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) narrow_directory_name, narrow_directory_name_size, (libuna_utf16_character_t *) directory_name, directory_name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } else { #if SIZEOF_WCHAR_T == 4 result = libuna_byte_stream_copy_from_utf32( (uint8_t *) narrow_directory_name, narrow_directory_name_size, libclocale_codepage, (libuna_utf32_character_t *) directory_name, directory_name_length + 1, error ); #elif SIZEOF_WCHAR_T == 2 result = libuna_byte_stream_copy_from_utf16( (uint8_t *) narrow_directory_name, narrow_directory_name_size, libclocale_codepage, (libuna_utf16_character_t *) directory_name, directory_name_length + 1, error ); #else #error Unsupported size of wchar_t #endif /* SIZEOF_WCHAR_T */ } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name.", function ); goto on_error; } if( mkdir( narrow_directory_name, 0755 ) != 0 ) { libcerror_system_set_error( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, errno, "%s: unable to make directory.", function ); goto on_error; } memory_free( narrow_directory_name ); #endif return( 1 ); #if !defined( WINAPI ) on_error: if( narrow_directory_name != NULL ) { memory_free( narrow_directory_name ); } return( -1 ); #endif } #else #error Missing make directory function #endif /* Sanitizes the path * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize_wide( wchar_t *path, size_t *path_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize_wide"; size_t path_index = 0; if( path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path.", function ); return( -1 ); } if( path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid path size.", function ); return( -1 ); } if( *path_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid path size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *path_size > 32767 ) { path[ 32766 ] = 0; *path_size = 32767; } #endif for( path_index = 0; path_index < *path_size; path_index++ ) { if( path[ path_index ] == 0x00 ) { break; } else if( ( path[ path_index ] >= 0x01 ) && ( path[ path_index ] <= 0x1f ) ) { path[ path_index ] = (wchar_t) '_'; } #if defined( WINAPI ) else if( path[ path_index ] == (wchar_t) '/' ) #else else if( path[ path_index ] == (wchar_t) '\\' ) #endif { path[ path_index ] = (wchar_t) '_'; } else if( ( path[ path_index ] == (wchar_t) '!' ) || ( path[ path_index ] == (wchar_t) '$' ) || ( path[ path_index ] == (wchar_t) '%' ) || ( path[ path_index ] == (wchar_t) '&' ) || ( path[ path_index ] == (wchar_t) '*' ) || ( path[ path_index ] == (wchar_t) '+' ) || ( path[ path_index ] == (wchar_t) ':' ) || ( path[ path_index ] == (wchar_t) ';' ) || ( path[ path_index ] == (wchar_t) '<' ) || ( path[ path_index ] == (wchar_t) '>' ) || ( path[ path_index ] == (wchar_t) '?' ) || ( path[ path_index ] == (wchar_t) '@' ) || ( path[ path_index ] == (wchar_t) '|' ) || ( path[ path_index ] == (wchar_t) '~' ) || ( path[ path_index ] == 0x7e ) ) { path[ path_index ] = (wchar_t) '_'; } } return( 1 ); } /* Sanitizes the filename * Returns 1 if successful or -1 on error */ int libcpath_path_sanitize_filename_wide( wchar_t *filename, size_t *filename_size, libcerror_error_t **error ) { static char *function = "libcpath_path_sanitize_filename_wide"; size_t filename_index = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( filename_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename size.", function ); return( -1 ); } if( *filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid filename size value exceeds maximum.", function ); return( -1 ); } #if defined( WINAPI ) || defined( __CYGWIN__ ) if( *filename_size > 256 ) { filename[ 255 ] = 0; *filename_size = 256; } #endif for( filename_index = 0; filename_index < *filename_size; filename_index++ ) { if( filename[ filename_index ] == 0x00 ) { break; } else if( ( filename[ filename_index ] >= 0x01 ) && ( filename[ filename_index ] <= 0x1f ) ) { filename[ filename_index ] = (wchar_t) '_'; } else if( ( filename[ filename_index ] == (wchar_t) '/' ) || ( filename[ filename_index ] == (wchar_t) '\\' ) ) { filename[ filename_index ] = (wchar_t) '_'; } else if( ( filename[ filename_index ] == (wchar_t) '!' ) || ( filename[ filename_index ] == (wchar_t) '$' ) || ( filename[ filename_index ] == (wchar_t) '%' ) || ( filename[ filename_index ] == (wchar_t) '&' ) || ( filename[ filename_index ] == (wchar_t) '*' ) || ( filename[ filename_index ] == (wchar_t) '+' ) || ( filename[ filename_index ] == (wchar_t) ':' ) || ( filename[ filename_index ] == (wchar_t) ';' ) || ( filename[ filename_index ] == (wchar_t) '<' ) || ( filename[ filename_index ] == (wchar_t) '>' ) || ( filename[ filename_index ] == (wchar_t) '?' ) || ( filename[ filename_index ] == (wchar_t) '@' ) || ( filename[ filename_index ] == (wchar_t) '~' ) || ( filename[ filename_index ] == (wchar_t) '|' ) || ( filename[ filename_index ] == 0x7e ) ) { filename[ filename_index ] = (wchar_t) '_'; } } return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/libcpath/libcpath_support.h0000644000175000017500000000231212005152776015461 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_SUPPORT_H ) #define _LIBCPATH_SUPPORT_H #include #include #include "libcpath_extern.h" #include "libcpath_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCPATH ) LIBCPATH_EXTERN \ const char *libcpath_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcpath/libcpath_libuna.h0000644000175000017500000000314312005152776015222 00000000000000/* * The internal libuna header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCPATH_LIBUNA_H ) #define _LIBCPATH_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/manuals/0000775000175000017500000000000012006536214011656 500000000000000libpff-20120802/manuals/Makefile.am0000644000175000017500000000027012005155357013633 00000000000000man_MANS = \ pffexport.1 \ pffinfo.1 \ libpff.3 EXTRA_DIST = \ pffexport.1 \ pffinfo.1 \ libpff.3 MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/manuals/pffexport.10000644000175000017500000000531412005155461013676 00000000000000.Dd July 29, 2012 .Dt pffexport .Os libpff .Sh NAME .Nm pffexport .Nd exports items stored in a Personal Folder File (OST, PAB and PST) .Sh SYNOPSIS .Nm pffexport .Op Fl c Ar codepage .Op Fl f Ar format .Op Fl l Ar logfile .Op Fl m Ar mode .Op Fl t Ar target .Op Fl dhqvV .Va Ar source .Sh DESCRIPTION .Nm pffexport is a utility to export items stored in a Personal Folder File (OST, PAB and PST) .Pp .Nm pffexport is part of the .Nm libpff package. .Nm libpff is a library to support the Personal Folder File (OST, PAB and PST) format .Pp .Ar source is the source file. .Pp The options are as follows: .Bl -tag -width Ds .It Fl c Ar codepage specify the codepage of ASCII strings, options: ascii, windows-1250, windows-1251, windows-1252 (default), windows-1253, windows-1254, windows-1255, windows-1256, windows-1257 or windows-1258 .It Fl d dumps the item values in a separate file: ItemValues.txt .It Fl f Ar format specify the preferred output format, options: all, html, rtf, text (default) .It Fl h shows this help .It Fl l Ar logfile specify the file in which to log information about the exported items .It Fl m Ar mode export mode, option: all, debug, items (default), recovered. 'all' exports the (allocated) items, orphan and recovered items. 'debug' exports all the (allocated) items, also those outside the the root folder. 'items' exports the (allocated) items. 'recovered' exports the orphan and recovered items. .It Fl q quiet shows minimal status information .It Fl t Ar target specify the basename of the target directory to export to (default is the source filename) pffexport will add the following suffixes to the basename: .export, .orphans, .recovered .It Fl v verbose output to stderr .It Fl V print version .El .Sh ENVIRONMENT None .Sh FILES None .Sh EXAMPLES .Bd -literal # pffexport file.pst pffexport 20110107 Opening file. Exporting items. Exporting folder item 1 out of 4. .Dl ... Exporting e-mail item 17 out of 115. Exporting attachment 1 out of 3. Exporting attachment 2 out of 3. Exporting attachment 3 out of 3. Exporting e-mail item 18 out of 115. .Dl ... Exporting folder item 4 out of 4. Export completed. .Ed .Sh DIAGNOSTICS Errors, verbose and debug output are printed to stderr when verbose output \-v is enabled. Verbose and debug output are only printed when enabled at compilation. .Sh BUGS Please report bugs of any kind to or on the project website: http://code.google.com/p/libpff/ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT Copyright 2008-2012 Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO .Xr pffinfo 1 libpff-20120802/manuals/pffinfo.10000644000175000017500000000416212005155475013315 00000000000000.Dd July 29, 2012 .Dt pffinfo .Os libpff .Sh NAME .Nm pffinfo .Nd determines information about a Personal Folder File (OST, PAB and PST) .Sh SYNOPSIS .Nm pffinfo .Op Fl c Ar codepage .Op Fl ahvV .Va Ar source .Sh DESCRIPTION .Nm pffinfo is a utility to determine information about a Personal Folder File (OST, PAB and PST) .Pp .Nm pffinfo is part of the .Nm libpff package. .Nm libpff is a library to support the Personal Folder File (OST, PAB and PST) format .Pp .Ar source is the source file. .Pp The options are as follows: .Bl -tag -width Ds .It Fl a shows allocation information .It Fl c Ar codepage specify the codepage of ASCII strings, options: ascii, windows-1250, windows-1251, windows-1252 (default), windows-1253, windows-1254, windows-1255, windows-1256, windows-1257 or windows-1258 .It Fl h shows this help .It Fl v verbose output to stderr .It Fl V print version .El .Sh ENVIRONMENT None .Sh FILES None .Sh EXAMPLES .Bd -literal # pffinfo -a file.pst pffinfo 20110107 Personal Folder File information: File size: 271360 bytes File content type: Personal Storage Tables (PST) File type: 64-bit Encryption type: compressible Message store: Folders: Subtree, Wastbox, Finder Password checksum: N/A Unallocated index node blocks: 00018944 (0x00004a00) - 00020480 (0x00005000) size: 1536 .Dl ... 01051648 (0x00100c00) - 01052160 (0x00100e00) size: 512 Unallocated data blocks: 00025024 (0x000061c0) - 00025536 (0x000063c0) size: 512 .Dl ... 01353664 (0x0014a7c0) - 01541120 (0x00178400) size: 187456 .Ed .Sh DIAGNOSTICS Errors, verbose and debug output are printed to stderr when verbose output \-v is enabled. Verbose and debug output are only printed when enabled at compilation. .Sh BUGS Please report bugs of any kind to or on the project website: http://code.google.com/p/libpff/ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT Copyright 2008-2012 Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO .Xr pffexport 1 libpff-20120802/manuals/Makefile.in0000664000175000017500000006032612006536016013652 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = manuals DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man_MANS = \ pffexport.1 \ pffinfo.1 \ libpff.3 EXTRA_DIST = \ pffexport.1 \ pffinfo.1 \ libpff.3 MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu manuals/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu manuals/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } install-man3: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list=''; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 uninstall-man3 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-man3 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \ uninstall-man3 distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/manuals/libpff.30000644000175000017500000012540412005155426013131 00000000000000.Dd July 29, 2012 .Dt libpff 3 .Os libpff .Sh NAME .Nm libpff.h .Nd Library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. .Sh LIBRARY .Lb libpff .Sh SYNOPSIS .In libpff.h .Pp Support functions .Ft const char * .Fn libpff_get_version "void" .Ft int .Fn libpff_get_access_flags_read .Ft int .Fn libpff_get_codepage "int *codepage, libpff_error_t **error" .Ft int .Fn libpff_set_codepage "int codepage, libpff_error_t **error" .Ft int .Fn libpff_check_file_signature "const char *filename, libpff_error_t **error" .Pp Available when compiled with wide character string support: .Ft int .Fn libpff_check_file_signature_wide "const wchar_t *filename, libpff_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libpff_check_file_signature_file_io_handle "libbfio_handle_t *bfio_handle, libpff_error_t **error" .Pp Notify functions .Ft void .Fn libpff_notify_set_verbose "int verbose" .Ft int .Fn libpff_notify_set_stream "FILE *stream, libpff_error_t **error" .Ft int .Fn libpff_notify_stream_open "const char *filename, libpff_error_t **error" .Ft int .Fn libpff_notify_stream_close "libpff_error_t **error" .Pp Error functions .Ft void .Fn libpff_error_free "libpff_error_t **error" .Ft int .Fn libpff_error_fprint "libpff_error_t *error, FILE *stream" .Ft int .Fn libpff_error_sprint "libpff_error_t *error, char *string, size_t size" .Ft int .Fn libpff_error_backtrace_fprint "libpff_error_t *error, FILE *stream" .Ft int .Fn libpff_error_backtrace_sprint "libpff_error_t *error, char *string, size_t size" .Pp File functions .Ft int .Fn libpff_file_initialize "libpff_file_t **file, libpff_error_t **error" .Ft int .Fn libpff_file_free "libpff_file_t **file, libpff_error_t **error" .Ft int .Fn libpff_file_signal_abort "libpff_file_t *file, libpff_error_t **error" .Ft int .Fn libpff_file_open "libpff_file_t *file, const char *filename, int flags, libpff_error_t **error" .Ft int .Fn libpff_file_close "libpff_file_t *file, libpff_error_t **error" .Ft int .Fn libpff_file_recover_items "libpff_file_t *file, uint8_t recovery_flags, libpff_error_t **error" .Ft int .Fn libpff_file_get_size "libpff_file_t *file, size64_t *size, libpff_error_t **error" .Ft int .Fn libpff_file_get_type "libpff_file_t *file, uint8_t *type, libpff_error_t **error" .Ft int .Fn libpff_file_get_encryption_type "libpff_file_t *file, uint8_t *encryption_type, libpff_error_t **error" .Ft int .Fn libpff_file_get_ascii_codepage "libpff_file_t *file, int *ascii_codepage, libpff_error_t **error" .Ft int .Fn libpff_file_set_ascii_codepage "libpff_file_t *file, int ascii_codepage, libpff_error_t **error" .Ft int .Fn libpff_file_get_number_of_unallocated_blocks "libpff_file_t *file, int unallocated_block_type, int *number_of_unallocated_blocks, libpff_error_t **error" .Ft int .Fn libpff_file_get_unallocated_block "libpff_file_t *file, int unallocated_block_type, int unallocated_block_index, off64_t *offset, size64_t *size, libpff_error_t **error" .Ft int .Fn libpff_file_get_root_item "libpff_file_t *file, libpff_item_t **root_item, libpff_error_t **error" .Ft int .Fn libpff_file_get_message_store "libpff_file_t *file, libpff_item_t **message_store, libpff_error_t **error" .Ft int .Fn libpff_file_get_root_folder "libpff_file_t *file, libpff_item_t **root_folder, libpff_error_t **error" .Ft int .Fn libpff_file_get_item_by_identifier "libpff_file_t *file, uint32_t item_identifier, libpff_item_t **item, libpff_error_t **error" .Ft int .Fn libpff_file_get_number_of_orphan_items "libpff_file_t *file, int *number_of_orphan_items, libpff_error_t **error" .Ft int .Fn libpff_file_get_orphan_item "libpff_file_t *file, int orphan_item_index, libpff_item_t **orphan_item, libpff_error_t **error" .Ft int .Fn libpff_file_get_number_of_recovered_items "libpff_file_t *file, int *number_of_recovered_items, libpff_error_t **error" .Ft int .Fn libpff_file_get_recovered_item "libpff_file_t *file, int recovered_item_index, libpff_item_t **recovered_item, libpff_error_t **error" .Pp Available when compiled with wide character string support: .Ft int .Fn libpff_file_open_wide "libpff_file_t *file, const wchar_t *filename, int flags, libpff_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libpff_file_open_file_io_handle "libpff_file_t *file, libbfio_handle_t *file_io_handle, int flags, libpff_error_t **error" .PP Name to id map entry functions .Ft int .Fn libpff_name_to_id_map_entry_get_type "libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *entry_type, libpff_error_t **error" .Ft int .Fn libpff_name_to_id_map_entry_get_number "libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint32_t *number, libpff_error_t **error" .Ft int .Fn libpff_name_to_id_map_entry_get_utf8_string_size "libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_name_to_id_map_entry_get_utf8_string "libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_name_to_id_map_entry_get_utf16_string_size "libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_name_to_id_map_entry_get_utf16_string "libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_name_to_id_map_entry_get_guid "libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *guid, size_t size, libpff_error_t **error" .PP Item functions .Ft int .Fn libpff_item_clone "libpff_item_t **destination_item, libpff_item_t *source_item, libpff_error_t **error" .Ft int .Fn libpff_item_free "libpff_item_t **item, libpff_error_t **error" .Ft int .Fn libpff_item_get_identifier "libpff_item_t *item, uint32_t *identifier, libpff_error_t **error" .Ft int .Fn libpff_item_get_number_of_sets "libpff_item_t *item, uint32_t *number_of_sets, libpff_error_t **error" .Ft int .Fn libpff_item_get_number_of_entries "libpff_item_t *item, uint32_t *number_of_entries, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_type "libpff_item_t *item, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libpff_error_t **error" .Ft int .Fn libpff_item_get_value_type "libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value "libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_by_utf8_name "libpff_item_t *item, int set_index, uint8_t* utf8_entry_name, size_t utf8_entry_name_size, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_by_utf16_name "libpff_item_t *item, int set_index, uint16_t* utf16_entry_name, size_t utf16_entry_name_size, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_boolean "libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_16bit "libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_32bit "libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_64bit "libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_filetime "libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_size "libpff_item_t *item, int set_index, uint32_t entry_type, size_t *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_floating_point "libpff_item_t *item, int set_index, uint32_t entry_type, double *entry_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_utf8_string_size "libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf8_string_size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_utf8_string "libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_utf16_string_size "libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf16_string_size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_utf16_string "libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *utf16_string, size_t utf16_string_size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_binary_data_size "libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_binary_data "libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *binary_data, size_t size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_value_guid "libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *guid, size_t size, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_entry_multi_value "libpff_item_t *item, int set_index, uint32_t entry_type, libpff_multi_value_t **multi_value, uint8_t flags, libpff_error_t **error" .Ft int .Fn libpff_item_get_type "libpff_item_t *item, uint8_t *item_type, libpff_error_t **error" .Ft int .Fn libpff_item_get_number_of_sub_items "libpff_item_t *item, int *number_of_sub_items, libpff_error_t **error" .Ft int .Fn libpff_item_get_sub_item "libpff_item_t *item, int sub_item_index, libpff_item_t **sub_item, libpff_error_t **error" .Ft int .Fn libpff_item_get_sub_item_by_identifier "libpff_item_t *item, uint32_t sub_item_identifier, libpff_item_t **sub_item, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf8_display_name_size "libpff_item_t *item, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf8_display_name "libpff_item_t *item, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf16_display_name_size "libpff_item_t *item, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf16_display_name "libpff_item_t *item, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf8_address_type_size "libpff_item_t *item, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf8_address_type "libpff_item_t *item, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf16_address_type_size "libpff_item_t *item, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf16_address_type "libpff_item_t *item, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf8_email_address_size "libpff_item_t *item, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf8_email_address "libpff_item_t *item, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf16_email_address_size "libpff_item_t *item, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_item_get_utf16_email_address "libpff_item_t *item, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Pp Multi value functions .Ft int .Fn libpff_multi_value_free "libpff_multi_value_t **multi_value, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_number_of_values "libpff_multi_value_t *multi_value, int *number_of_values, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_entry_value "libpff_multi_value_t *multi_value, int value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_32bit "libpff_multi_value_t *multi_value, int value_index, uint32_t *value, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_64bit "libpff_multi_value_t *multi_value, int value_index, uint64_t *value, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_filetime "libpff_multi_value_t *multi_value, int value_index, uint64_t *filetime, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_utf8_string_size "libpff_multi_value_t *multi_value, int value_index, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_utf8_string "libpff_multi_value_t *multi_value, int value_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_utf16_string_size "libpff_multi_value_t *multi_value, int value_index, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_utf16_string "libpff_multi_value_t *multi_value, int value_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_binary_data_size "libpff_multi_value_t *multi_value, int value_index, size_t *size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_binary_data "libpff_multi_value_t *multi_value, int value_index, uint8_t *binary_data, size_t size, libpff_error_t **error" .Ft int .Fn libpff_multi_value_get_value_guid "libpff_multi_value_t *multi_value, int value_index, uint8_t *guid, size_t size, libpff_error_t **error" .Pp Folder functions .Ft int .Fn libpff_folder_get_utf8_name_size "libpff_item_t *folder, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_folder_get_utf8_name "libpff_item_t *folder, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_folder_get_utf16_name_size "libpff_item_t *folder, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_folder_get_utf16_name "libpff_item_t *folder, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_folder_get_type "libpff_item_t *folder, uint8_t *type, libpff_error_t **error" .Ft int .Fn libpff_folder_get_number_of_sub_folders "libpff_item_t *folder, int *number_of_sub_folders, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_folder "libpff_item_t *folder, int sub_folder_index, libpff_item_t **sub_folder, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_folder_by_utf8_name "libpff_item_t *folder, uint8_t *utf8_sub_folder_name, size_t utf8_sub_folder_name_size, libpff_item_t **sub_folder, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_folder_by_utf16_name "libpff_item_t *folder, uint16_t *utf16_sub_folder_name, size_t utf16_sub_folder_name_size, libpff_item_t **sub_folder, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_folders "libpff_item_t *folder, libpff_item_t **sub_folders, libpff_error_t **error" .Ft int .Fn libpff_folder_get_number_of_sub_messages "libpff_item_t *folder, int *number_of_sub_messages, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_message "libpff_item_t *folder, int sub_message_index, libpff_item_t **sub_message, libpff_error_t **error" .Fn libpff_folder_get_sub_message_by_utf8_name "libpff_item_t *folder, uint8_t *utf8_sub_message_name, size_t utf8_sub_message_name_size, libpff_item_t **sub_message, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_message_by_utf16_name "libpff_item_t *folder, uint16_t *utf16_sub_message_name, size_t utf16_sub_message_name_size, libpff_item_t **sub_message, libpff_error_t **error" .Ft int .Ft int .Fn libpff_folder_get_sub_messages "libpff_item_t *folder, libpff_item_t **sub_messages, libpff_error_t **error" .Ft int .Fn libpff_folder_get_number_of_sub_associated_contents "libpff_item_t *folder, int *number_of_sub_associated_contents, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_associated_content "libpff_item_t *folder, int sub_associated_content_index, libpff_item_t **sub_associated_content, libpff_error_t **error" .Ft int .Fn libpff_folder_get_sub_associated_contents "libpff_item_t *folder, libpff_item_t **sub_associated_contents, libpff_error_t **error" .Pp Message store functions .Ft int .Fn libpff_message_store_get_valid_folder_mask "libpff_item_t *message_store, uint32_t *valid_folder_mask, libpff_error_t **error" .Ft int .Fn libpff_message_store_get_password_checksum "libpff_item_t *message_store, uint32_t *password_checksum, libpff_error_t **error" .Pp Message functions .Ft int .Fn libpff_message_get_entry_value_utf8_string_size "libpff_item_t *message, uint32_t entry_type, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_entry_value_utf8_string "libpff_item_t *message, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_entry_value_utf16_string_size "libpff_item_t *message, uint32_t entry_type, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_entry_value_utf16_string "libpff_item_t *message, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_number_of_attachments "libpff_item_t *message, int *number_of_attachments, libpff_error_t **error" .Ft int .Fn libpff_message_get_attachment "libpff_item_t *message, int attachment_index, libpff_item_t **attachment, libpff_error_t **error" .Ft int .Fn libpff_message_get_attachments "libpff_item_t *message, libpff_item_t **attachments, libpff_error_t **error" .Ft int .Fn libpff_message_get_recipients "libpff_item_t *message, libpff_item_t **recipients, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_class_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_class "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_subject_size *subject_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_subject "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_conversation_topic_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_conversation_topic "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_conversation_index_size "libpff_item_t *message, size_t *size, libpff_error_t **error" .Ft int .Fn libpff_message_get_conversation_index "libpff_item_t *message, uint8_t *conversation_index, size_t size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sender_name_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sender_name "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sender_name_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sender_name "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sender_email_address_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sender_email_address "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sender_email_address_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sender_email_address "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sent_representing_name_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sent_representing_name "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sent_representing_name_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sent_representing_name "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sent_representing_email_address_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_sent_representing_email_address "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sent_representing_email_address_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_sent_representing_email_address "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_received_by_name_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_received_by_name "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_received_by_name_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_received_by_name "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_received_by_email_address_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_received_by_email_address "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_received_by_email_address_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_received_by_email_address "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_importance "libpff_item_t *message, uint32_t *importance, libpff_error_t **error" .Ft int .Fn libpff_message_get_priority "libpff_item_t *message, uint32_t *priority, libpff_error_t **error" .Ft int .Fn libpff_message_get_sensitivity "libpff_item_t *message, uint32_t *sensitivity, libpff_error_t **error" .Ft int .Fn libpff_message_get_flags "libpff_item_t *message, uint32_t *flags, libpff_error_t **error" .Ft int .Fn libpff_message_get_size "libpff_item_t *message, uint32_t *size, libpff_error_t **error" .Ft int .Fn libpff_message_get_client_submit_time "libpff_item_t *message, uint64_t *client_submit_time, libpff_error_t **error" .Ft int .Fn libpff_message_get_delivery_time "libpff_item_t *message, uint64_t *delivery_time, libpff_error_t **error" .Ft int .Fn libpff_message_get_creation_time "libpff_item_t *message, uint64_t *creation_time, libpff_error_t **error" .Ft int .Fn libpff_message_get_modification_time "libpff_item_t *message, uint64_t *modification_time, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_transport_headers_size "libpff_item_t *message, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf8_transport_headers "libpff_item_t *message, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_transport_headers_size "libpff_item_t *message, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_utf16_transport_headers "libpff_item_t *message, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_message_get_plain_text_body_size "libpff_item_t *message, size_t *size, libpff_error_t **error" .Ft int .Fn libpff_message_get_plain_text_body "libpff_item_t *message, uint8_t *plain_text_body, size_t size, libpff_error_t **error" .Ft int .Fn libpff_message_get_rtf_body_size "libpff_item_t *message, size_t *size, libpff_error_t **error" .Ft int .Fn libpff_message_get_body "libpff_item_t *message, uint8_t *rtf_body, size_t size, libpff_error_t **error" .Ft int .Fn libpff_message_get_html_body_size "libpff_item_t *message, size_t *size, libpff_error_t **error" .Ft int .Fn libpff_message_get_html_body "libpff_item_t *message, uint8_t *html_body, size_t size, libpff_error_t **error" .Pp Appointment functions .Ft int .Fn libpff_appointment_get_utf8_location_size "libpff_item_t *appointment, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf8_location "libpff_item_t *appointment, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf16_location_size "libpff_item_t *appointment, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf16_location "libpff_item_t *appointment, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_start_time "libpff_item_t *appointment, uint64_t *start_time, libpff_error_t **error" .Ft int .Fn libpff_appointment_end_time "libpff_item_t *appointment, uint64_t *end_time, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf8_recurring_pattern_size "libpff_item_t *appointment, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf8_recurring_pattern "libpff_item_t *appointment, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf16_recurring_pattern_size "libpff_item_t *appointment, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf16_recurring_pattern "libpff_item_t *appointment, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf8_timezone_description_size "libpff_item_t *appointment, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf8_timezone_description "libpff_item_t *appointment, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf16_timezone_description_size "libpff_item_t *appointment, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_get_utf16_timezone_description "libpff_item_t *appointment, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_appointment_first_effective_time "libpff_item_t *message, uint64_t *first_effective_time, libpff_error_t **error" .Ft int .Fn libpff_appointment_last_effective_time "libpff_item_t *message, uint64_t *last_effective_time, libpff_error_t **error" .Pp Address functions .Ft int .Fn libpff_address_get_utf8_file_under_size "libpff_item_t *address, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_address_get_utf8_file_under "libpff_item_t *address, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_address_get_utf16_file_under_size "libpff_item_t *address, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_address_get_utf16_file_under "libpff_item_t *address, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Pp Contact functions .Ft int .Fn libpff_contact_get_utf8_file_as_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_file_as "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_file_as_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_file_as "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_postal_address_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_postal_address "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_postal_address_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_postal_address "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_company_name_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_company_name "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_company_name_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_company_name "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_department_name_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_department_name "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_department_name_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_department_name "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_office_location_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_office_location "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_office_location_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_office_location "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_callback_phone_number_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_callback_phone_number "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_callback_phone_number_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_callback_phone_number "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_primary_phone_number_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_primary_phone_number "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_primary_phone_number_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_primary_phone_number "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_home_phone_number_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_home_phone_number "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_home_phone_number_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_home_phone_number "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_business_phone_number_1_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_business_phone_number_1 "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_business_phone_number_1_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_business_phone_number_1 "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_business_phone_number_2_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_business_phone_number_2 "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_business_phone_number_2_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_business_phone_number_2 "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_mobile_phone_number_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_mobile_phone_number "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_mobile_phone_number_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_mobile_phone_number "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_business_fax_number_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_business_fax_number "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_business_fax_number_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_business_fax_number "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_country_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_country "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_country_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_country "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_locality_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_locality "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_locality_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_locality "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_title_size "libpff_item_t *contact, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf8_title "libpff_item_t *contact, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_title_size "libpff_item_t *contact, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_contact_get_utf16_title "libpff_item_t *contact, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Pp E-mail functions .Ft int .Fn libpff_email_get_utf8_filename_size "libpff_item_t *email, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_email_get_utf8_filename "libpff_item_t *email, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_email_get_utf16_filename_size "libpff_item_t *email, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_email_get_utf16_filename "libpff_item_t *email, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Pp Attachment functions .Ft int .Fn libpff_attachment_get_utf8_short_filename_size "libpff_item_t *attachment, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf8_short_filename "libpff_item_t *attachment, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf16_short_filename_size "libpff_item_t *attachment, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf16_short_filename "libpff_item_t *attachment, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf8_long_filename_size "libpff_item_t *attachment, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf8_long_filename "libpff_item_t *attachment, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf16_long_filename_size "libpff_item_t *attachment, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_utf16_long_filename "libpff_item_t *attachment, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_data_size "libpff_item_t *attachment, size64_t *size, libpff_error_t **error" .Ft ssize_t .Fn libpff_attachment_data_read_buffer "libpff_item_t *attachment, uint8_t *buffer, size_t buffer_size, libpff_error_t **error" .Ft off64_ .Fn libpff_attachment_data_seek_offset "libpff_item_t *attachment, off64_t offset, int whence, libpff_error_t **error" .Ft int .Fn libpff_attachment_get_item "libpff_item_t *attachment, libpff_item_t **attached_item, libpff_error_t **error" .Pp Available when compiled with libbfio support: .Ft int .Fn libpff_attachment_get_data_file_io_handle "libpff_item_t *attachment, libbfio_handle_t **file_io_handle, libpff_error_t **error" .Pp Recipients functions .Ft int .Fn libpff_recipients_get_utf8_display_name_size "libpff_item_t *recipients, int recipient_index, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_display_name "libpff_item_t *recipients, int recipient_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_display_name_size "libpff_item_t *recipients, int recipient_index, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_display_name "libpff_item_t *recipients, int recipient_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_address_type_size "libpff_item_t *recipients, int recipient_index, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_address_type "libpff_item_t *recipients, int recipient_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_address_type_size "libpff_item_t *recipients, int recipient_index, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_address_type "libpff_item_t *recipients, int recipient_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_email_address_size "libpff_item_t *recipients, int recipient_index, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_email_address "libpff_item_t *recipients, int recipient_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_email_address_size "libpff_item_t *recipients, int recipient_index, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_email_address "libpff_item_t *recipients, int recipient_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_recipient_display_name_size "libpff_item_t *recipients, int recipient_index, size_t *utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf8_recipient_display_name "libpff_item_t *recipients, int recipient_index, uint8_t *utf8_string, size_t utf8_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_recipient_display_name_size "libpff_item_t *recipients, int recipient_index, size_t *utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_utf16_recipient_display_name "libpff_item_t *recipients, int recipient_index, uint16_t *utf16_string, size_t utf16_string_size, libpff_error_t **error" .Ft int .Fn libpff_recipients_get_type "libpff_item_t *recipients, int recipient_index, uint32_t *type, libpff_error_t **error" .Sh DESCRIPTION The .Fn libpff_get_version function is used to retrieve the library version. .Sh RETURN VALUES Most of the functions return NULL or \-1 on error, dependent on the return type. For the actual return values refer to libpff.h .Sh ENVIRONMENT None .Sh FILES None .Sh NOTES libpff mainly uses UTF-8 encoded strings except for filenames, but provides several UTF-16 functions. ASCII strings in a PFF file contain an extended ASCII string using the codepage of the system it was created on. The function .Ar libpff_set_ascii_codepage allows to set the required codepage for reading and writing. The default codepage is ASCII and replaces all extended characters to the Unicode replacement character (U+fffd) when reading and the ASCII substitude character (0x1a) when writing. libpff allows to be compiled with wide character support. To compile libpff with wide character support use .Ar ./configure --enable-wide-character-type=yes or pass the definition .Ar _UNICODE or .Ar UNICODE to the compiler (i.e. in case of Microsoft Visual Studio (MSVS) C++). To have other code to determine if libpff was compiled with wide character support it defines .Ar LIBPFF_HAVE_WIDE_CHARACTER_TYPE in libpff/features.h. libpff allows to be compiled with chained IO support using libbfio. libpff will automatically detect if a compatible version of libbfio is available. To have other code to determine if libpff was compiled with libbfio support it defines .Ar LIBPFF_HAVE_BFIO in libpff/features.h. .Sh BUGS Please report bugs of any kind to or on the project website: http://code.google.com/p/libpff/ .Sh AUTHOR These man pages were written by Joachim Metz. .Sh COPYRIGHT Copyright 2008-2012 Joachim Metz . This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .Sh SEE ALSO the libpff.h include file libpff-20120802/jpff/0000775000175000017500000000000012006536213011142 500000000000000libpff-20120802/jpff/jpff_File.c0000644000175000017500000002434112005155744013121 00000000000000/* * Java object definition of the libpff file * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include #include #include "jpff_File.h" #include "jpff_jni.h" #include "jpff_string.h" static jfieldID jpff_File_field_identifier = 0; JNIEXPORT void JNICALL Java_jpff_File_internal_1class_1initialize( JNIEnv *environment, jclass file_class ) { if( ( environment == NULL ) || ( *environment == NULL ) ) { return; } jpff_File_field_identifier = jpff_jni_environment_get_field_identifier( environment, file_class, "libpff_file", "J" ); } JNIEXPORT void JNICALL Java_jpff_File_internal_1initialize( JNIEnv *environment, jobject file_object ) { jclass exception = NULL; libpff_error_t *pff_error = NULL; libpff_file_t *pff_file = NULL; static char *function = "Java_jpff_File_internal_1initialize"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return; } pff_file = (libpff_file_t *) jpff_jni_environment_get_long_field( environment, file_object, jpff_File_field_identifier ); if( pff_file != NULL ) { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1initialize: file already set" ); } return; } if( libpff_file_initialize( &pff_file, &pff_error ) != 1 ) { exception = jpff_jni_environment_find_class( environment, "java/lang/OutOfMemoryError" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { /* TODO something useful with error */ jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1initialize: unable to create file" ); } libpff_error_free( &pff_error ); return; } jpff_jni_environment_set_long_field( environment, file_object, jpff_File_field_identifier, (jlong) pff_file ); } JNIEXPORT void JNICALL Java_jpff_File_internal_1free( JNIEnv *environment, jobject file_object ) { jclass exception = NULL; libpff_error_t *pff_error = NULL; libpff_file_t *pff_file = NULL; static char *function = "Java_jpff_File_internal_1free"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return; } pff_file = (libpff_file_t *) jpff_jni_environment_get_long_field( environment, file_object, jpff_File_field_identifier ); if( pff_file == NULL ) { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1free: missing file" ); } return; } jpff_jni_environment_set_long_field( environment, file_object, jpff_File_field_identifier, (jlong) NULL ); if( libpff_file_free( &pff_file, &pff_error ) != 1 ) { /* TODO something useful with error */ libpff_error_free( &pff_error ); return; } } JNIEXPORT void JNICALL Java_jpff_File_internal_1open( JNIEnv *environment, jobject file_object, jstring filename, jint access_flags ) { jclass exception = NULL; libpff_error_t *pff_error = NULL; libpff_file_t *pff_file = NULL; static char *function = "Java_jpff_File_internal_1open"; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) wchar_t *wide_filename = NULL; size_t wide_filename_size = 0; #else char *narrow_filename = NULL; size_t narrow_filename_size = 0; #endif if( ( environment == NULL ) || ( *environment == NULL ) ) { return; } if( filename == NULL ) { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1open: invalid filename" ); } return; } pff_file = (libpff_file_t *) jpff_jni_environment_get_long_field( environment, file_object, jpff_File_field_identifier ); if( pff_file == NULL ) { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1open: missing file" ); } return; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( jpff_string_get_wide_string_size( environment, filename, &wide_filename_size ) != 1 ) #else if( jpff_string_get_narrow_string_size( environment, filename, &narrow_filename_size ) != 1 ) #endif { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1open: unable to determine narrow filename size" ); } return; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) wide_filename = (wchar_t *) memory_allocate( sizeof( wchar_t ) * wide_filename_size ); #else narrow_filename = (char *) memory_allocate( sizeof( char ) * narrow_filename_size ); #endif #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( jpff_string_copy_to_wide_string( environment, filename, wide_filename, wide_filename_size ) != 1 ) #else if( jpff_string_copy_to_narrow_string( environment, filename, narrow_filename, narrow_filename_size ) != 1 ) #endif { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1open: unable to determine narrow filename size" ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( wide_filename ); #else memory_free( narrow_filename ); #endif return; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libpff_file_open_wide( pff_file, wide_filename, access_flags, &pff_error ) != 1 ) #else if( libpff_file_open( pff_file, narrow_filename, access_flags, &pff_error ) != 1 ) #endif { exception = jpff_jni_environment_find_class( environment, "java/io/IOException" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { /* TODO something useful with error */ jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1open: unable to open file" ); } libpff_error_free( &pff_error ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( wide_filename ); #else memory_free( narrow_filename ); #endif return; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( wide_filename ); #else memory_free( narrow_filename ); #endif } JNIEXPORT void JNICALL Java_jpff_File_internal_1close( JNIEnv *environment, jobject file_object ) { jclass exception = NULL; libpff_error_t *pff_error = NULL; libpff_file_t *pff_file = NULL; static char *function = "Java_jpff_File_internal_1close"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return; } pff_file = (libpff_file_t *) jpff_jni_environment_get_long_field( environment, file_object, jpff_File_field_identifier ); if( pff_file == NULL ) { exception = jpff_jni_environment_find_class( environment, "jpff/Exception" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1close: missing file" ); } return; } if( libpff_file_close( pff_file, &pff_error ) != 0 ) { exception = jpff_jni_environment_find_class( environment, "java/io/IOException" ); jpff_jni_environment_exception_clear( environment ); if( exception != NULL ) { /* TODO something useful with error */ jpff_jni_environment_throw_new( environment, exception, "Java_jpff_File_internal_1close: unable to close file" ); } libpff_error_free( &pff_error ); return; } } libpff-20120802/jpff/Makefile.am0000644000175000017500000000235412005155744013125 00000000000000# Notes: # If .java files are put in _SOURCES autoconf/make requires GJC # If .java files are put in _JAVA they will be build after _LTLIBRARIES JAVA_FILES = \ Exception.java \ File.java if HAVE_JAVA AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ -I$(top_srcdir)/libcstring \ -I$(top_srcdir)/liberror \ @MEMWATCH_CPPFLAGS@ jardir = @JAR_PACKAGE_DIR@ jnidir = @JNI_LIBRARY_DIR@ jar_DATA = jpff.jar noinst_JAVA = \ $(JAVA_FILES) # On Linux the name of the JNI library should start with lib # and should be in the library path (ldconfig) jni_LTLIBRARIES = libjpff.la BUILT_SOURCES = \ jpff_File.h libjpff_la_SOURCES = \ jpff_File.c \ jpff_jni.h \ jpff_string.c jpff_string.h libjpff_la_LIBADD = \ ../libcstring/libcstring.la \ ../liberror/liberror.la \ ../libpff/libpff.la libjpff_la_CPPFLAGS = $(JAVA_CPPFLAGS) libjpff_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS) endif .java.class: $(JAVAC) -classpath .. $(JAVACFLAGS) $< jpff_File.h: Exception.class File.class $(JAVAH) -classpath .. -jni $(JAVAHFLAGS) jpff.File jpff.jar: $(noinst_JAVA) (cd .. && $(JAR) cf $(JARFLAGS) jpff/$@ jpff/*.class) EXTRA_DIST = \ $(JAVA_FILES) MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/jpff/File.java0000644000175000017500000000450312005155744012611 00000000000000package jpff; /* * File class * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ import jpff.Exception; /** * File class * Wraps libpff_file using JNI */ public class File { /** * Internal reference of the libpff file */ protected long libpff_file = 0; /* Internal functions */ private static native void internal_class_initialize(); private native void internal_initialize(); private native void internal_free(); private native void internal_open( String filename, int access_flags ) throws jpff.Exception; private native void internal_close() throws jpff.Exception; /* External functions */ /** * Creates a new file */ public File() { synchronized( this ) { internal_initialize(); } } /** * Destructor */ protected void finalize() { synchronized( this ) { internal_free(); } } /** * Opens a file * * @param filename the name of the file * @param access_flags the access flags (e.g. ACCESS_FLAGS_READ) */ public void open( String filename, int access_flags ) throws jpff.Exception { synchronized( this ) { internal_open( filename, access_flags ); } } /** * Closes a file */ public void close() throws jpff.Exception { synchronized( this ) { internal_close(); } } static { try { System.loadLibrary( "jpff" ); } catch( Throwable throwable ) { System.err.println( "Unable to load jpff: " + throwable ); } internal_class_initialize(); } } libpff-20120802/jpff/jpff_jni.h0000644000175000017500000000634312005155744013031 00000000000000/* * JNI functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _JPFF_JNI_H ) #define _JPFF_JNI_H #include #include #include #if defined( __cplusplus ) extern "C" { #endif /* JNI class/object functions */ #define jpff_jni_environment_find_class( environment, class_name ) \ ( *environment )->FindClass( environment, class_name ) #define jpff_jni_environment_get_field_identifier( environment, jni_object, field_name, signature ) \ ( *environment )->GetFieldID( environment, jni_object, field_name, signature ) #define jpff_jni_environment_get_long_field( environment, jni_object, field_identifier ) \ ( *environment )->GetLongField( environment, jni_object, field_identifier ) #define jpff_jni_environment_set_long_field( environment, jni_object, field_identifier, value ) \ ( *environment )->SetLongField( environment, jni_object, field_identifier, value ) #define jpff_jni_environment_get_method_identifier( environment, jni_object, method_name, signature ) \ ( *environment )->GetMethodID( environment, jni_object, method_name, signature ) #define jpff_jni_environment_call_method( environment, jni_object, method_identifier ) \ ( *environment )->CallObjectMethod( environment, jni_object, method_identifier ) #define jpff_jni_environment_delete_local_reference( environment, jni_object ) \ ( *environment )->DeleteLocalRef( environment, jni_object ) /* JNI exception functions */ #define jpff_jni_environment_exception_clear( environment ) \ ( *environment )->ExceptionClear( environment ) #define jpff_jni_environment_exception_occurred( environment ) \ ( *environment )->ExceptionOccurred( environment ) #define jpff_jni_environment_throw_new( environment, execption, error_string ) \ ( *environment )->ThrowNew( environment, execption, error_string ) /* JNI array functions */ #define jpff_jni_environment_get_array_length( environment, array ) \ ( *environment )->GetArrayLength( environment, array ) /* JNI byte array functions */ #define jpff_jni_environment_get_byte_array_region( environment, byte_array, index, length, buffer ) \ ( *environment )->GetByteArrayRegion( environment, byte_array, index, length, buffer ) /* JNI string functions */ #define jpff_jni_environment_get_string_length( environment, string ) \ ( *environment )->GetStringLength( environment, string ) #define jpff_jni_environment_get_string_characters( environment, string, is_copy ) \ ( *environment )->GetStringChars( environment, string, is_copy ) #if defined( __cplusplus ) } #endif #endif libpff-20120802/jpff/Exception.java0000644000175000017500000000205112005155744013664 00000000000000package jpff; /* * Exception class * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ /** * Exception class */ public class Exception extends java.lang.Exception { /** * Creates a new exception * * @param string The error string */ public Exception( String string ) { super( string ); } } libpff-20120802/jpff/Makefile.in0000664000175000017500000007640012006536015013136 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Notes: # If .java files are put in _SOURCES autoconf/make requires GJC # If .java files are put in _JAVA they will be build after _LTLIBRARIES VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = jpff DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(jnidir)" "$(DESTDIR)$(jardir)" LTLIBRARIES = $(jni_LTLIBRARIES) @HAVE_JAVA_TRUE@libjpff_la_DEPENDENCIES = ../libcstring/libcstring.la \ @HAVE_JAVA_TRUE@ ../liberror/liberror.la ../libpff/libpff.la am__libjpff_la_SOURCES_DIST = jpff_File.c jpff_jni.h jpff_string.c \ jpff_string.h @HAVE_JAVA_TRUE@am_libjpff_la_OBJECTS = libjpff_la-jpff_File.lo \ @HAVE_JAVA_TRUE@ libjpff_la-jpff_string.lo libjpff_la_OBJECTS = $(am_libjpff_la_OBJECTS) libjpff_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libjpff_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_JAVA_TRUE@am_libjpff_la_rpath = -rpath $(jnidir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libjpff_la_SOURCES) DIST_SOURCES = $(am__libjpff_la_SOURCES_DIST) CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT):$$CLASSPATH JAVAROOT = $(top_builddir) DATA = $(jar_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ JAVA_FILES = \ Exception.java \ File.java @HAVE_JAVA_TRUE@AM_CFLAGS = \ @HAVE_JAVA_TRUE@ -I$(top_srcdir)/include \ @HAVE_JAVA_TRUE@ -I$(top_srcdir)/common \ @HAVE_JAVA_TRUE@ -I$(top_srcdir)/libcstring \ @HAVE_JAVA_TRUE@ -I$(top_srcdir)/liberror \ @HAVE_JAVA_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_JAVA_TRUE@jardir = @JAR_PACKAGE_DIR@ @HAVE_JAVA_TRUE@jnidir = @JNI_LIBRARY_DIR@ @HAVE_JAVA_TRUE@jar_DATA = jpff.jar @HAVE_JAVA_TRUE@noinst_JAVA = \ @HAVE_JAVA_TRUE@ $(JAVA_FILES) # On Linux the name of the JNI library should start with lib # and should be in the library path (ldconfig) @HAVE_JAVA_TRUE@jni_LTLIBRARIES = libjpff.la @HAVE_JAVA_TRUE@BUILT_SOURCES = \ @HAVE_JAVA_TRUE@ jpff_File.h @HAVE_JAVA_TRUE@libjpff_la_SOURCES = \ @HAVE_JAVA_TRUE@ jpff_File.c \ @HAVE_JAVA_TRUE@ jpff_jni.h \ @HAVE_JAVA_TRUE@ jpff_string.c jpff_string.h @HAVE_JAVA_TRUE@libjpff_la_LIBADD = \ @HAVE_JAVA_TRUE@ ../libcstring/libcstring.la \ @HAVE_JAVA_TRUE@ ../liberror/liberror.la \ @HAVE_JAVA_TRUE@ ../libpff/libpff.la @HAVE_JAVA_TRUE@libjpff_la_CPPFLAGS = $(JAVA_CPPFLAGS) @HAVE_JAVA_TRUE@libjpff_la_LDFLAGS = -module -avoid-version $(JAVA_LDFLAGS) EXTRA_DIST = \ $(JAVA_FILES) MAINTAINERCLEANFILES = \ Makefile.in all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .class .java .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu jpff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu jpff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-jniLTLIBRARIES: $(jni_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(jnidir)" || $(MKDIR_P) "$(DESTDIR)$(jnidir)" @list='$(jni_LTLIBRARIES)'; test -n "$(jnidir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(jnidir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(jnidir)"; \ } uninstall-jniLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(jni_LTLIBRARIES)'; test -n "$(jnidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(jnidir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(jnidir)/$$f"; \ done clean-jniLTLIBRARIES: -test -z "$(jni_LTLIBRARIES)" || rm -f $(jni_LTLIBRARIES) @list='$(jni_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjpff.la: $(libjpff_la_OBJECTS) $(libjpff_la_DEPENDENCIES) $(libjpff_la_LINK) $(am_libjpff_la_rpath) $(libjpff_la_OBJECTS) $(libjpff_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpff_la-jpff_File.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libjpff_la-jpff_string.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libjpff_la-jpff_File.lo: jpff_File.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjpff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libjpff_la-jpff_File.lo -MD -MP -MF $(DEPDIR)/libjpff_la-jpff_File.Tpo -c -o libjpff_la-jpff_File.lo `test -f 'jpff_File.c' || echo '$(srcdir)/'`jpff_File.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpff_la-jpff_File.Tpo $(DEPDIR)/libjpff_la-jpff_File.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpff_File.c' object='libjpff_la-jpff_File.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjpff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libjpff_la-jpff_File.lo `test -f 'jpff_File.c' || echo '$(srcdir)/'`jpff_File.c libjpff_la-jpff_string.lo: jpff_string.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjpff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libjpff_la-jpff_string.lo -MD -MP -MF $(DEPDIR)/libjpff_la-jpff_string.Tpo -c -o libjpff_la-jpff_string.lo `test -f 'jpff_string.c' || echo '$(srcdir)/'`jpff_string.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libjpff_la-jpff_string.Tpo $(DEPDIR)/libjpff_la-jpff_string.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='jpff_string.c' object='libjpff_la-jpff_string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libjpff_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libjpff_la-jpff_string.lo `test -f 'jpff_string.c' || echo '$(srcdir)/'`jpff_string.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs classnoinst.stamp: $(noinst_JAVA) @list1='$?'; list2=; if test -n "$$list1"; then \ for p in $$list1; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ list2="$$list2 $$d$$p"; \ done; \ echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \ $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \ else :; fi echo timestamp > classnoinst.stamp clean-noinstJAVA: -rm -f *.class classnoinst.stamp install-jarDATA: $(jar_DATA) @$(NORMAL_INSTALL) test -z "$(jardir)" || $(MKDIR_P) "$(DESTDIR)$(jardir)" @list='$(jar_DATA)'; test -n "$(jardir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(jardir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(jardir)" || exit $$?; \ done uninstall-jarDATA: @$(NORMAL_UNINSTALL) @list='$(jar_DATA)'; test -n "$(jardir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(jardir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(jardir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) classnoinst.stamp $(DATA) installdirs: for dir in "$(DESTDIR)$(jnidir)" "$(DESTDIR)$(jardir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-jniLTLIBRARIES clean-libtool \ clean-noinstJAVA mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-jarDATA install-jniLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-jarDATA uninstall-jniLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-jniLTLIBRARIES clean-libtool clean-noinstJAVA ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-jarDATA install-jniLTLIBRARIES \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-jarDATA uninstall-jniLTLIBRARIES .java.class: $(JAVAC) -classpath .. $(JAVACFLAGS) $< jpff_File.h: Exception.class File.class $(JAVAH) -classpath .. -jni $(JAVAHFLAGS) jpff.File jpff.jar: $(noinst_JAVA) (cd .. && $(JAR) cf $(JARFLAGS) jpff/$@ jpff/*.class) distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/jpff/jpff_string.h0000644000175000017500000000307412005155744013555 00000000000000/* * Java string functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _JPFF_STRING_H ) #define _JPFF_STRING_H #include #include #include #if defined( __cplusplus ) extern "C" { #endif int jpff_string_get_narrow_string_size( JNIEnv *environment, jstring string, size_t *narrow_string_size ); int jpff_string_copy_to_narrow_string( JNIEnv *environment, jstring string, char *narrow_string, size_t narrow_string_size ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) int jpff_string_get_wide_string_size( JNIEnv *environment, jstring string, size_t *wide_string_size ); int jpff_string_copy_to_wide_string( JNIEnv *environment, jstring string, wchar_t *wide_string, size_t wide_string_size ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/jpff/jpff_string.c0000644000175000017500000001456512005155744013557 00000000000000/* * Java string functions * * Copyright (c) 2010, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI ) #include #endif #include #include "jpff_jni.h" static jmethodID MID_String_getBytes = NULL; /* Determines the C narrow string size of a Java string * Returns 1 if successful or -1 on error */ int jpff_string_get_narrow_string_size( JNIEnv *environment, jstring string, size_t *narrow_string_size ) { jbyteArray byte_array = NULL; jclass string_class = NULL; jthrowable exception = NULL; static char *function = "jpff_string_get_narrow_string_size"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return( -1 ); } if( string == NULL ) { return( -1 ); } if( narrow_string_size == NULL ) { return( -1 ); } if( MID_String_getBytes == NULL ) { string_class = jpff_jni_environment_find_class( environment, "java/lang/String" ); if( string_class == 0 ) { return( -1 ); } MID_String_getBytes = jpff_jni_environment_get_method_identifier( environment, string_class, "getBytes", "()[B" ); if( MID_String_getBytes == NULL ) { return( -1 ); } } byte_array = jpff_jni_environment_call_method( environment, string, MID_String_getBytes ); exception = jpff_jni_environment_exception_occurred( environment ); if( exception != NULL ) { jpff_jni_environment_delete_local_reference( environment, byte_array ); jpff_jni_environment_delete_local_reference( environment, exception ); return( -1 ); } *narrow_string_size = (size_t) jpff_jni_environment_get_array_length( environment, byte_array ); *narrow_string_size += 1; jpff_jni_environment_delete_local_reference( environment, byte_array ); return( 1 ); } /* Copies the Java string to a C narrow string * Returns 1 if successful or -1 on error */ int jpff_string_copy_to_narrow_string( JNIEnv *environment, jstring string, char *narrow_string, size_t narrow_string_size ) { jbyteArray byte_array = NULL; jclass string_class = NULL; jthrowable exception = NULL; static char *function = "jpff_string_copy_to_narrow_string"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return( -1 ); } if( string == NULL ) { return( -1 ); } if( narrow_string == NULL ) { return( -1 ); } if( narrow_string_size > (size_t) SSIZE_MAX ) { return( -1 ); } if( MID_String_getBytes == NULL ) { string_class = jpff_jni_environment_find_class( environment, "java/lang/String" ); if( string_class == 0 ) { return( -1 ); } MID_String_getBytes = jpff_jni_environment_get_method_identifier( environment, string_class, "getBytes", "()[B" ); if(MID_String_getBytes == NULL ) { return( -1 ); } } byte_array = jpff_jni_environment_call_method( environment, string, MID_String_getBytes ); exception = jpff_jni_environment_exception_occurred( environment ); if( exception != NULL ) { jpff_jni_environment_delete_local_reference( environment, byte_array ); jpff_jni_environment_delete_local_reference( environment, exception ); return( -1 ); } jpff_jni_environment_get_byte_array_region( environment, byte_array, 0, narrow_string_size - 1, (jbyte *) narrow_string ); narrow_string[ narrow_string_size - 1 ] = 0; jpff_jni_environment_delete_local_reference( environment, byte_array ); return( 1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Determines the C wide string size of a Java string * Returns 1 if successful or -1 on error */ int jpff_string_get_wide_string_size( JNIEnv *environment, jstring string, size_t *wide_string_size ) { static char *function = "jpff_string_get_wide_string_size"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return( -1 ); } if( string == NULL ) { return( -1 ); } if( wide_string_size == NULL ) { return( -1 ); } *wide_string_size = (size_t) jpff_jni_environment_get_string_length( environment, string ); *wide_string_size += 1; return( 1 ); } /* Copies the Java string to a C wide string * Returns 1 if successful or -1 on error */ int jpff_string_copy_to_wide_string( JNIEnv *environment, jstring string, wchar_t *wide_string, size_t wide_string_size ) { jchar* character_array = NULL; jthrowable exception = NULL; static char *function = "jpff_string_copy_to_wide_string"; if( ( environment == NULL ) || ( *environment == NULL ) ) { return( -1 ); } if( string == NULL ) { return( -1 ); } if( wide_string == NULL ) { return( -1 ); } if( wide_string_size > (size_t) SSIZE_MAX ) { return( -1 ); } character_array = jpff_jni_environment_get_string_characters( environment, string, NULL ); if( memory_copy( wide_string, character_array, sizeof( wchar_t ) * wide_string_size ) == NULL ) { jpff_jni_environment_delete_local_reference( environment, character_array ); return( -1 ); } jpff_jni_environment_delete_local_reference( environment, character_array ); return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/ABOUT-NLS0000644000175000017500000022532611502470475011403 000000000000001 Notes on the Free Translation Project *************************************** Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. 1.1 Quick configuration advice ============================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. 1.2 INSTALL Matters =================== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. 1.3 Using This Package ====================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. If you happen to have the `LC_ALL' or some other `LC_xxx' environment variables set, you should unset them before setting `LANG', otherwise the setting of `LANG' will not have the desired effect. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your language by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. 1.4 Translating Teams ===================== For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://translationproject.org/', in the "Teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `coordinator@translationproject.org' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skills are praised more than programming skills, here. 1.5 Available Packages ====================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of November 2007. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo +----------------------------------------------------+ Compendium | [] [] [] [] | a2ps | [] [] [] [] [] | aegis | () | ant-phone | () | anubis | [] | ap-utils | | aspell | [] [] [] [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] | bison-runtime | [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | | cpplib | [] [] [] | cryptonit | [] | dialog | | diffutils | [] [] [] [] [] [] | doodle | [] | e2fsprogs | [] [] | enscript | [] [] [] [] | fetchmail | [] [] () [] [] | findutils | [] | findutils_stable | [] [] [] | flex | [] [] [] | fslint | | gas | | gawk | [] [] [] | gcal | [] | gcc | [] | gettext-examples | [] [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] | gip | [] | gliv | [] [] | glunarclock | [] | gmult | [] [] | gnubiff | () | gnucash | [] [] () () [] | gnuedu | | gnulib | [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | | gpe-edit | [] | gpe-filemanager | | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-package | | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | | gphoto2 | [] [] [] [] | gprof | [] [] | gpsdrive | | gramadoir | [] [] | grep | [] [] | gretl | () | gsasl | | gss | | gst-plugins-bad | [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] [] | gst-plugins-ugly | [] [] | gstreamer | [] [] [] [] [] [] [] | gtick | () | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] | indent | [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | [] | jtag | | jwhois | | kbd | [] [] [] [] | keytouch | [] [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | () | ld | [] | leafpad | [] [] [] [] [] | libc | [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] | libgpg-error | [] | libgphoto2 | [] [] | libgphoto2_port | [] [] | libgsasl | | libiconv | [] [] | libidn | [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lprng | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] | make | [] [] | man-db | [] [] [] | minicom | [] [] [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] | pwdutils | | qof | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] | screem | | scrollkeeper | [] [] [] [] [] [] [] [] | sed | [] [] [] | shared-mime-info | [] [] [] [] () [] [] [] | sharutils | [] [] [] [] [] [] | shishi | | skencil | [] () | solfege | | soundtracker | [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] | texinfo | [] [] [] | tin | () () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] | xpad | [] [] [] | +----------------------------------------------------+ af am ar az be bg bs ca cs cy da de el en en_GB eo 6 0 2 1 8 26 2 40 48 2 56 88 15 1 15 18 es et eu fa fi fr ga gl gu he hi hr hu id is it +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | [] [] [] () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] [] | aspell | [] [] [] | bash | [] | bfd | [] [] | bibshelf | [] [] [] | binutils | [] [] [] | bison | [] [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] | cflow | [] | clisp | [] [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] | cpplib | [] [] | cryptonit | [] | dialog | [] [] [] | diffutils | [] [] [] [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] | fetchmail | [] | findutils | [] [] [] | findutils_stable | [] [] [] [] | flex | [] [] [] | fslint | | gas | [] [] | gawk | [] [] [] [] () | gcal | [] [] | gcc | [] | gettext-examples | [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] | gettext-tools | [] [] [] [] | gip | [] [] [] [] | gliv | () | glunarclock | [] [] [] | gmult | [] [] [] | gnubiff | () () | gnucash | () () () | gnuedu | [] | gnulib | [] [] [] | gnunet | | gnunet-gtk | | gnutls | | gpe-aerial | [] [] | gpe-beam | [] [] | gpe-calendar | | gpe-clock | [] [] [] [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] [] [] | gpe-filemanager | [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] [] [] [] | gpe-package | [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] | gphoto2 | [] [] [] [] [] | gprof | [] [] [] [] [] | gpsdrive | [] | gramadoir | [] [] | grep | [] [] [] | gretl | [] [] [] () | gsasl | [] [] | gss | [] [] | gst-plugins-bad | [] [] [] [] | gst-plugins-base | [] [] [] [] | gst-plugins-good | [] [] [] [] [] | gst-plugins-ugly | [] [] [] [] | gstreamer | [] [] [] | gtick | [] [] [] | gtkam | [] [] [] [] | gtkorphan | [] [] | gtkspell | [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] | jpilot | [] [] | jtag | [] | jwhois | [] [] [] [] [] | kbd | [] [] | keytouch | [] [] [] | keytouch-editor | [] | keytouch-keyboa... | [] [] | latrine | [] [] | ld | [] [] [] [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] [] | libexif | [] | libextractor | [] | libgpewidget | [] [] [] [] [] | libgpg-error | [] | libgphoto2 | [] [] [] | libgphoto2_port | [] [] | libgsasl | [] [] | libiconv | [] [] [] | libidn | [] [] | lifelines | () | lilypond | [] [] [] | lingoteach | [] [] [] | lprng | | lynx | [] [] [] | m4 | [] [] [] [] | mailfromd | | mailutils | [] [] | make | [] [] [] [] [] [] [] [] | man-db | [] | minicom | [] [] [] [] | nano | [] [] [] [] [] [] [] | opcodes | [] [] [] [] | parted | [] [] [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | | qof | [] | radius | [] [] | recode | [] [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] | sed | [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] [] [] [] [] | shishi | [] | skencil | [] [] | solfege | [] | soundtracker | [] [] [] | sp | [] | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] [] | texinfo | [] [] [] | tin | [] () | tuxpaint | [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] [] [] [] | util-linux-ng | [] [] [] [] [] [] [] | vorbis-tools | | wastesedge | () | wdiff | [] [] [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ es et eu fa fi fr ga gl gu he hi hr hu id is it 85 22 14 2 48 101 61 12 2 8 2 6 53 29 1 52 ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn +--------------------------------------------------+ Compendium | [] | a2ps | () [] [] | aegis | () | ant-phone | [] | anubis | [] [] [] | ap-utils | [] | aspell | [] [] | bash | [] | bfd | | bibshelf | [] | binutils | | bison | [] [] [] | bison-runtime | [] [] [] | bluez-pin | [] [] [] | cflow | | clisp | [] | console-tools | | coreutils | [] | cpio | [] | cpplib | [] | cryptonit | [] | dialog | [] [] | diffutils | [] [] [] | doodle | | e2fsprogs | [] | enscript | [] | fetchmail | [] [] | findutils | [] | findutils_stable | [] | flex | [] [] | fslint | | gas | | gawk | [] [] | gcal | | gcc | | gettext-examples | [] [] [] | gettext-runtime | [] [] [] | gettext-tools | [] [] | gip | [] [] | gliv | [] | glunarclock | [] [] | gmult | [] [] [] | gnubiff | | gnucash | () () () | gnuedu | | gnulib | [] [] | gnunet | | gnunet-gtk | | gnutls | [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] | gpe-clock | [] [] [] | gpe-conf | [] [] [] | gpe-contacts | [] | gpe-edit | [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] | gpe-ownerinfo | [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] | gphoto2 | [] [] | gprof | [] | gpsdrive | [] | gramadoir | () | grep | [] [] | gretl | | gsasl | [] | gss | | gst-plugins-bad | [] | gst-plugins-base | [] | gst-plugins-good | [] | gst-plugins-ugly | [] | gstreamer | [] | gtick | [] | gtkam | [] [] | gtkorphan | [] | gtkspell | [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] | herrie | [] | hylafax | | idutils | [] | indent | [] [] | iso_15924 | [] | iso_3166 | [] [] [] [] [] [] [] [] | iso_3166_2 | [] | iso_4217 | [] [] [] | iso_639 | [] [] [] [] | jpilot | () () | jtag | | jwhois | [] | kbd | [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | | latrine | [] | ld | | leafpad | [] [] | libc | [] [] [] | libexif | | libextractor | | libgpewidget | [] | libgpg-error | | libgphoto2 | [] | libgphoto2_port | [] | libgsasl | [] | libiconv | [] | libidn | [] [] | lifelines | [] | lilypond | [] | lingoteach | [] | lprng | | lynx | [] [] | m4 | [] [] | mailfromd | | mailutils | | make | [] [] [] | man-db | | minicom | [] | nano | [] [] [] | opcodes | [] | parted | [] [] | pilot-qof | | popt | [] [] [] | psmisc | [] [] [] | pwdutils | | qof | | radius | | recode | [] | rpm | [] [] | screem | [] | scrollkeeper | [] [] [] [] | sed | [] [] | shared-mime-info | [] [] [] [] [] [] [] | sharutils | [] [] | shishi | | skencil | | solfege | () () | soundtracker | | sp | () | system-tools-ba... | [] [] [] [] | tar | [] [] [] | texinfo | [] [] | tin | | tuxpaint | () [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] | util-linux-ng | [] [] | vorbis-tools | | wastesedge | [] | wdiff | [] [] | wget | [] [] | xchat | [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ ja ka ko ku ky lg lt lv mk mn ms mt nb ne nl nn 51 2 25 3 2 0 6 0 2 2 20 0 11 1 103 6 or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta +--------------------------------------------------+ Compendium | [] [] [] [] [] | a2ps | () [] [] [] [] [] [] | aegis | () () | ant-phone | [] [] | anubis | [] [] [] | ap-utils | () | aspell | [] [] [] | bash | [] [] | bfd | | bibshelf | [] | binutils | [] [] | bison | [] [] [] [] [] | bison-runtime | [] [] [] [] [] | bluez-pin | [] [] [] [] [] [] [] [] [] | cflow | [] | clisp | [] | console-tools | [] | coreutils | [] [] [] [] | cpio | [] [] [] | cpplib | [] | cryptonit | [] [] | dialog | [] | diffutils | [] [] [] [] [] [] | doodle | [] [] | e2fsprogs | [] [] | enscript | [] [] [] [] [] | fetchmail | [] [] [] | findutils | [] [] [] | findutils_stable | [] [] [] [] [] [] | flex | [] [] [] [] [] | fslint | [] | gas | | gawk | [] [] [] [] | gcal | [] | gcc | [] [] | gettext-examples | [] [] [] [] [] [] [] [] | gettext-runtime | [] [] [] [] [] [] [] [] | gettext-tools | [] [] [] [] [] [] [] | gip | [] [] [] [] | gliv | [] [] [] [] [] [] | glunarclock | [] [] [] [] [] [] | gmult | [] [] [] [] | gnubiff | () [] | gnucash | () [] | gnuedu | | gnulib | [] [] [] | gnunet | | gnunet-gtk | [] | gnutls | [] [] | gpe-aerial | [] [] [] [] [] [] [] | gpe-beam | [] [] [] [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] [] [] [] [] | gpe-conf | [] [] [] [] [] [] [] | gpe-contacts | [] [] [] [] [] | gpe-edit | [] [] [] [] [] [] [] [] [] | gpe-filemanager | [] [] | gpe-go | [] [] [] [] [] [] [] [] | gpe-login | [] [] [] [] [] [] [] [] | gpe-ownerinfo | [] [] [] [] [] [] [] [] | gpe-package | [] [] | gpe-sketchbook | [] [] [] [] [] [] [] [] | gpe-su | [] [] [] [] [] [] [] [] | gpe-taskmanager | [] [] [] [] [] [] [] [] | gpe-timesheet | [] [] [] [] [] [] [] [] | gpe-today | [] [] [] [] [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] [] [] [] [] [] | gprof | [] [] [] | gpsdrive | [] [] | gramadoir | [] [] | grep | [] [] [] [] | gretl | [] [] [] | gsasl | [] [] [] | gss | [] [] [] [] | gst-plugins-bad | [] [] [] | gst-plugins-base | [] [] | gst-plugins-good | [] [] | gst-plugins-ugly | [] [] [] | gstreamer | [] [] [] [] | gtick | [] | gtkam | [] [] [] [] [] | gtkorphan | [] | gtkspell | [] [] [] [] [] [] [] [] | gutenprint | [] | hello | [] [] [] [] [] [] [] [] | herrie | [] [] [] | hylafax | | idutils | [] [] [] [] [] | indent | [] [] [] [] [] [] [] | iso_15924 | | iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | iso_3166_2 | | iso_4217 | [] [] [] [] [] [] [] | iso_639 | [] [] [] [] [] [] [] | jpilot | | jtag | [] | jwhois | [] [] [] [] | kbd | [] [] [] | keytouch | [] | keytouch-editor | [] | keytouch-keyboa... | [] | latrine | | ld | [] | leafpad | [] [] [] [] [] [] | libc | [] [] [] [] | libexif | [] [] | libextractor | [] [] | libgpewidget | [] [] [] [] [] [] [] [] | libgpg-error | [] [] [] | libgphoto2 | [] | libgphoto2_port | [] [] [] | libgsasl | [] [] [] [] | libiconv | [] [] [] | libidn | [] [] () | lifelines | [] [] | lilypond | | lingoteach | [] | lprng | [] | lynx | [] [] [] | m4 | [] [] [] [] [] | mailfromd | [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] [] [] [] | minicom | [] [] [] [] [] | nano | [] [] [] [] | opcodes | [] [] | parted | [] | pilot-qof | | popt | [] [] [] [] | psmisc | [] [] | pwdutils | [] [] | qof | [] [] | radius | [] [] | recode | [] [] [] [] [] [] [] | rpm | [] [] [] [] | screem | | scrollkeeper | [] [] [] [] [] [] [] | sed | [] [] [] [] [] [] [] [] [] | shared-mime-info | [] [] [] [] [] [] | sharutils | [] [] [] [] | shishi | [] | skencil | [] [] [] | solfege | [] | soundtracker | [] [] | sp | | system-tools-ba... | [] [] [] [] [] [] [] [] [] | tar | [] [] [] [] | texinfo | [] [] [] [] | tin | () | tuxpaint | [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] | util-linux-ng | [] [] [] [] | vorbis-tools | [] | wastesedge | | wdiff | [] [] [] [] [] [] [] | wget | [] [] [] [] | xchat | [] [] [] [] [] [] [] | xkeyboard-config | [] [] [] | xpad | [] [] [] | +--------------------------------------------------+ or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta 0 5 77 31 53 4 58 72 3 45 46 9 45 122 3 tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu +---------------------------------------------------+ Compendium | [] [] [] [] | 19 a2ps | [] [] [] | 19 aegis | [] | 1 ant-phone | [] [] | 6 anubis | [] [] [] | 11 ap-utils | () [] | 4 aspell | [] [] [] | 16 bash | [] | 6 bfd | | 2 bibshelf | [] | 7 binutils | [] [] [] [] | 9 bison | [] [] [] [] | 20 bison-runtime | [] [] [] [] | 18 bluez-pin | [] [] [] [] [] [] | 28 cflow | [] [] | 5 clisp | | 9 console-tools | [] [] | 5 coreutils | [] [] [] | 18 cpio | [] [] [] [] | 11 cpplib | [] [] [] [] [] | 12 cryptonit | [] | 6 dialog | [] [] [] | 9 diffutils | [] [] [] [] [] | 29 doodle | [] | 6 e2fsprogs | [] [] | 10 enscript | [] [] [] | 16 fetchmail | [] [] | 12 findutils | [] [] [] | 11 findutils_stable | [] [] [] [] | 18 flex | [] [] | 15 fslint | [] | 2 gas | [] | 3 gawk | [] [] [] | 16 gcal | [] | 5 gcc | [] [] [] | 7 gettext-examples | [] [] [] [] [] [] | 29 gettext-runtime | [] [] [] [] [] [] | 28 gettext-tools | [] [] [] [] [] | 20 gip | [] [] | 13 gliv | [] [] | 11 glunarclock | [] [] [] | 15 gmult | [] [] [] [] | 16 gnubiff | [] | 2 gnucash | () [] | 5 gnuedu | [] | 2 gnulib | [] | 10 gnunet | | 0 gnunet-gtk | [] [] | 3 gnutls | | 4 gpe-aerial | [] [] | 14 gpe-beam | [] [] | 14 gpe-calendar | [] [] | 7 gpe-clock | [] [] [] [] | 21 gpe-conf | [] [] [] | 16 gpe-contacts | [] [] | 10 gpe-edit | [] [] [] [] [] | 22 gpe-filemanager | [] [] | 7 gpe-go | [] [] [] [] | 19 gpe-login | [] [] [] [] [] | 21 gpe-ownerinfo | [] [] [] [] | 21 gpe-package | [] | 6 gpe-sketchbook | [] [] | 16 gpe-su | [] [] [] [] | 21 gpe-taskmanager | [] [] [] [] | 21 gpe-timesheet | [] [] [] [] | 18 gpe-today | [] [] [] [] [] | 21 gpe-todo | [] [] | 8 gphoto2 | [] [] [] [] | 21 gprof | [] [] | 13 gpsdrive | [] | 5 gramadoir | [] | 7 grep | [] | 12 gretl | | 6 gsasl | [] [] [] | 9 gss | [] | 7 gst-plugins-bad | [] [] [] | 13 gst-plugins-base | [] [] | 11 gst-plugins-good | [] [] [] [] [] | 16 gst-plugins-ugly | [] [] [] | 13 gstreamer | [] [] [] | 18 gtick | [] [] | 7 gtkam | [] | 16 gtkorphan | [] | 7 gtkspell | [] [] [] [] [] [] | 27 gutenprint | | 4 hello | [] [] [] [] [] | 38 herrie | [] [] | 8 hylafax | | 0 idutils | [] [] | 15 indent | [] [] [] [] [] | 28 iso_15924 | [] [] | 4 iso_3166 | [] [] [] [] [] [] [] [] [] | 54 iso_3166_2 | [] [] | 4 iso_4217 | [] [] [] [] [] | 24 iso_639 | [] [] [] [] [] | 26 jpilot | [] [] [] [] | 7 jtag | [] | 3 jwhois | [] [] [] | 13 kbd | [] [] [] | 13 keytouch | [] | 8 keytouch-editor | [] | 5 keytouch-keyboa... | [] | 5 latrine | [] [] | 5 ld | [] [] [] [] | 10 leafpad | [] [] [] [] [] | 24 libc | [] [] [] | 19 libexif | [] | 5 libextractor | [] | 5 libgpewidget | [] [] [] | 20 libgpg-error | [] | 6 libgphoto2 | [] [] | 9 libgphoto2_port | [] [] [] | 11 libgsasl | [] | 8 libiconv | [] [] | 11 libidn | [] [] | 11 lifelines | | 4 lilypond | [] | 6 lingoteach | [] | 6 lprng | [] | 2 lynx | [] [] [] | 15 m4 | [] [] [] | 18 mailfromd | [] [] | 3 mailutils | [] [] | 8 make | [] [] [] | 20 man-db | [] | 9 minicom | [] | 14 nano | [] [] [] | 20 opcodes | [] [] | 10 parted | [] [] [] | 11 pilot-qof | [] | 1 popt | [] [] [] [] | 18 psmisc | [] [] | 10 pwdutils | [] | 3 qof | [] | 4 radius | [] [] | 7 recode | [] [] [] | 25 rpm | [] [] [] [] | 13 screem | [] | 2 scrollkeeper | [] [] [] [] | 26 sed | [] [] [] [] | 23 shared-mime-info | [] [] [] | 29 sharutils | [] [] [] | 23 shishi | [] | 3 skencil | [] | 7 solfege | [] | 3 soundtracker | [] [] | 9 sp | [] | 3 system-tools-ba... | [] [] [] [] [] [] [] | 38 tar | [] [] [] | 17 texinfo | [] [] [] | 15 tin | | 1 tuxpaint | [] [] [] | 19 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] [] | 20 util-linux-ng | [] [] [] | 20 vorbis-tools | [] [] | 4 wastesedge | | 1 wdiff | [] [] | 23 wget | [] [] [] | 20 xchat | [] [] [] [] | 29 xkeyboard-config | [] [] [] | 14 xpad | [] [] [] | 15 +---------------------------------------------------+ 76 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu 163 domains 0 3 1 74 51 0 143 21 1 57 7 45 0 2036 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If November 2007 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://translationproject.org/extra/matrix.html'. 1.6 Using `gettext' in new packages =================================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `coordinator@translationproject.org' to make the `.pot' files available to the translation teams. libpff-20120802/msvscpp/0000775000175000017500000000000012006536214011711 500000000000000libpff-20120802/msvscpp/libfcache/0000775000175000017500000000000012006536214013611 500000000000000libpff-20120802/msvscpp/libfcache/libfcache.vcproj0000644000175000017500000001204412005200340016640 00000000000000 libpff-20120802/msvscpp/libfguid/0000775000175000017500000000000012006536214013476 500000000000000libpff-20120802/msvscpp/libfguid/libfguid.vcproj0000644000175000017500000001125712005200340016417 00000000000000 libpff-20120802/msvscpp/libclocale/0000775000175000017500000000000012006536214014002 500000000000000libpff-20120802/msvscpp/libclocale/libclocale.vcproj0000664000175000017500000001134312005200340017225 00000000000000 libpff-20120802/msvscpp/Makefile.am0000644000175000017500000000132612005154270013662 00000000000000EXTRA_DIST = \ libcstring/libcstring.vcproj \ libbfio/libbfio.vcproj \ libcerror/libcerror.vcproj \ libcfile/libcfile.vcproj \ libclocale/libclocale.vcproj \ libcnotify/libcnotify.vcproj \ libcpath/libcpath.vcproj \ libcsplit/libcsplit.vcproj \ libcstring/libcstring.vcproj \ libcsystem/libcsystem.vcproj \ libfcache/libfcache.vcproj \ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ libfmapi/libfmapi.vcproj \ libfvalue/libfvalue.vcproj \ libfwnt/libfwnt.vcproj \ libpff_dll/libpff_dll.vcproj \ libuna/libuna.vcproj \ pffexport/pffexport.vcproj \ pffinfo/pffinfo.vcproj \ libpff.sln MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile libpff-20120802/msvscpp/pffinfo/0000775000175000017500000000000012006536214013340 500000000000000libpff-20120802/msvscpp/pffinfo/pffinfo.vcproj0000644000175000017500000001563312005200340016125 00000000000000 libpff-20120802/msvscpp/libbfio/0000775000175000017500000000000012006536214013317 500000000000000libpff-20120802/msvscpp/libbfio/libbfio.vcproj0000644000175000017500000001524712005200340016064 00000000000000 libpff-20120802/msvscpp/pffexport/0000775000175000017500000000000012006536214013726 500000000000000libpff-20120802/msvscpp/pffexport/pffexport.vcproj0000644000175000017500000001671212005200340017100 00000000000000 libpff-20120802/msvscpp/libpff_dll/0000775000175000017500000000000012006536214014006 500000000000000libpff-20120802/msvscpp/libpff_dll/libpff_dll.vcproj0000644000175000017500000003263612005200340017243 00000000000000 libpff-20120802/msvscpp/libfdatetime/0000775000175000017500000000000012006536214014342 500000000000000libpff-20120802/msvscpp/libfdatetime/libfdatetime.vcproj0000644000175000017500000001364512005200340020132 00000000000000 libpff-20120802/msvscpp/libcfile/0000775000175000017500000000000012006536214013462 500000000000000libpff-20120802/msvscpp/libcfile/libcfile.vcproj0000664000175000017500000001231212005200340016362 00000000000000 libpff-20120802/msvscpp/libfwnt/0000775000175000017500000000000012006536214013356 500000000000000libpff-20120802/msvscpp/libfwnt/libfwnt.vcproj0000644000175000017500000001065412005200340016157 00000000000000 libpff-20120802/msvscpp/libcpath/0000775000175000017500000000000012006536214013477 500000000000000libpff-20120802/msvscpp/libcpath/libcpath.vcproj0000664000175000017500000001216412005200340016421 00000000000000 libpff-20120802/msvscpp/libfmapi/0000775000175000017500000000000012006536214013474 500000000000000libpff-20120802/msvscpp/libfmapi/libfmapi.vcproj0000644000175000017500000001514712005200340016415 00000000000000 libpff-20120802/msvscpp/libcstring/0000775000175000017500000000000012006536214014051 500000000000000libpff-20120802/msvscpp/libcstring/libcstring.vcproj0000644000175000017500000001065312005200340017344 00000000000000 libpff-20120802/msvscpp/libuna/0000775000175000017500000000000012006536214013163 500000000000000libpff-20120802/msvscpp/libuna/libuna.vcproj0000644000175000017500000002743512005200340015576 00000000000000 libpff-20120802/msvscpp/libfvalue/0000775000175000017500000000000012006536214013662 500000000000000libpff-20120802/msvscpp/libfvalue/libfvalue.vcproj0000644000175000017500000001606012005200340016764 00000000000000 libpff-20120802/msvscpp/Makefile.in0000664000175000017500000004723012006536016013704 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = msvscpp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ libcstring/libcstring.vcproj \ libbfio/libbfio.vcproj \ libcerror/libcerror.vcproj \ libcfile/libcfile.vcproj \ libclocale/libclocale.vcproj \ libcnotify/libcnotify.vcproj \ libcpath/libcpath.vcproj \ libcsplit/libcsplit.vcproj \ libcstring/libcstring.vcproj \ libcsystem/libcsystem.vcproj \ libfcache/libfcache.vcproj \ libfdata/libfdata.vcproj \ libfdatetime/libfdatetime.vcproj \ libfguid/libfguid.vcproj \ libfmapi/libfmapi.vcproj \ libfvalue/libfvalue.vcproj \ libfwnt/libfwnt.vcproj \ libpff_dll/libpff_dll.vcproj \ libuna/libuna.vcproj \ pffexport/pffexport.vcproj \ pffinfo/pffinfo.vcproj \ libpff.sln MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu msvscpp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu msvscpp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am distclean: clean /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/msvscpp/libcerror/0000775000175000017500000000000012006536214013674 500000000000000libpff-20120802/msvscpp/libcerror/libcerror.vcproj0000664000175000017500000001103712005200340017011 00000000000000 libpff-20120802/msvscpp/libpff.sln0000644000175000017500000004443512005200340013604 00000000000000 Microsoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpff_dll", "libpff_dll\libpff_dll.vcproj", "{B5225323-AC67-411D-8FBA-199E9467FAB5}" ProjectSection(ProjectDependencies) = postProject {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {F94DCC2D-2B49-453E-89B3-FD81992677D0} = {F94DCC2D-2B49-453E-89B3-FD81992677D0} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {CDB03E65-C81B-47E0-B70F-C880D841DD61} = {CDB03E65-C81B-47E0-B70F-C880D841DD61} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} = {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pffinfo", "pffinfo\pffinfo.vcproj", "{A7545354-5D50-49F6-A3D0-1F97F6228955}" ProjectSection(ProjectDependencies) = postProject {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B5225323-AC67-411D-8FBA-199E9467FAB5} = {B5225323-AC67-411D-8FBA-199E9467FAB5} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {A2B861D5-6751-43A9-B085-8D48F8754AC5} = {A2B861D5-6751-43A9-B085-8D48F8754AC5} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pffexport", "pffexport\pffexport.vcproj", "{6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}" ProjectSection(ProjectDependencies) = postProject {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {B5225323-AC67-411D-8FBA-199E9467FAB5} = {B5225323-AC67-411D-8FBA-199E9467FAB5} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} = {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} {CDB03E65-C81B-47E0-B70F-C880D841DD61} = {CDB03E65-C81B-47E0-B70F-C880D841DD61} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {A2B861D5-6751-43A9-B085-8D48F8754AC5} = {A2B861D5-6751-43A9-B085-8D48F8754AC5} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuna", "libuna\libuna.vcproj", "{BC27FF34-C859-4A1A-95D6-FC89952E1910}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfmapi", "libfmapi\libfmapi.vcproj", "{CDB03E65-C81B-47E0-B70F-C880D841DD61}" ProjectSection(ProjectDependencies) = postProject {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbfio", "libbfio\libbfio.vcproj", "{41CFAFBF-A1C8-4704-AFEF-31979E6452B9}" ProjectSection(ProjectDependencies) = postProject {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfdatetime", "libfdatetime\libfdatetime.vcproj", "{25C60507-39C6-4564-912D-DA2E7482A00F}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcstring", "libcstring\libcstring.vcproj", "{20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfdata", "libfdata\libfdata.vcproj", "{F94DCC2D-2B49-453E-89B3-FD81992677D0}" ProjectSection(ProjectDependencies) = postProject {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} = {3D19EAAD-9195-468B-BC5B-D147A89CA4F5} {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfguid", "libfguid\libfguid.vcproj", "{8C13E498-6369-4792-A0CF-B7134C54561B}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfwnt", "libfwnt\libfwnt.vcproj", "{9D37639F-1694-47DF-84BF-336D98E0639F}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcerror", "libcerror\libcerror.vcproj", "{BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcfile", "libcfile\libcfile.vcproj", "{4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}" ProjectSection(ProjectDependencies) = postProject {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclocale", "libclocale\libclocale.vcproj", "{CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpath", "libcpath\libcpath.vcproj", "{3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}" ProjectSection(ProjectDependencies) = postProject {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcnotify", "libcnotify\libcnotify.vcproj", "{5304AD69-D449-4589-B2C9-E4607E56A51D}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcsystem", "libcsystem\libcsystem.vcproj", "{A2B861D5-6751-43A9-B085-8D48F8754AC5}" ProjectSection(ProjectDependencies) = postProject {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfcache", "libfcache\libfcache.vcproj", "{3D19EAAD-9195-468B-BC5B-D147A89CA4F5}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfvalue", "libfvalue\libfvalue.vcproj", "{85005D62-6AA7-4D8A-86CB-4061B23D7C6C}" ProjectSection(ProjectDependencies) = postProject {25C60507-39C6-4564-912D-DA2E7482A00F} = {25C60507-39C6-4564-912D-DA2E7482A00F} {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910} {8C13E498-6369-4792-A0CF-B7134C54561B} = {8C13E498-6369-4792-A0CF-B7134C54561B} {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F} {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcsplit", "libcsplit\libcsplit.vcproj", "{B86FB73A-4ACC-42DE-9545-586D93955B06}" ProjectSection(ProjectDependencies) = postProject {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 VSDebug|Win32 = VSDebug|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {B5225323-AC67-411D-8FBA-199E9467FAB5}.Release|Win32.ActiveCfg = Release|Win32 {B5225323-AC67-411D-8FBA-199E9467FAB5}.Release|Win32.Build.0 = Release|Win32 {B5225323-AC67-411D-8FBA-199E9467FAB5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {B5225323-AC67-411D-8FBA-199E9467FAB5}.VSDebug|Win32.Build.0 = VSDebug|Win32 {A7545354-5D50-49F6-A3D0-1F97F6228955}.Release|Win32.ActiveCfg = Release|Win32 {A7545354-5D50-49F6-A3D0-1F97F6228955}.Release|Win32.Build.0 = Release|Win32 {A7545354-5D50-49F6-A3D0-1F97F6228955}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {A7545354-5D50-49F6-A3D0-1F97F6228955}.VSDebug|Win32.Build.0 = VSDebug|Win32 {6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}.Release|Win32.ActiveCfg = Release|Win32 {6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}.Release|Win32.Build.0 = Release|Win32 {6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}.VSDebug|Win32.Build.0 = VSDebug|Win32 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.Release|Win32.ActiveCfg = Release|Win32 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.Release|Win32.Build.0 = Release|Win32 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.VSDebug|Win32.Build.0 = VSDebug|Win32 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.Release|Win32.ActiveCfg = Release|Win32 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.Release|Win32.Build.0 = Release|Win32 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.VSDebug|Win32.Build.0 = VSDebug|Win32 {41CFAFBF-A1C8-4704-AFEF-31979E6452B9}.Release|Win32.ActiveCfg = Release|Win32 {41CFAFBF-A1C8-4704-AFEF-31979E6452B9}.Release|Win32.Build.0 = Release|Win32 {41CFAFBF-A1C8-4704-AFEF-31979E6452B9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {41CFAFBF-A1C8-4704-AFEF-31979E6452B9}.VSDebug|Win32.Build.0 = VSDebug|Win32 {25C60507-39C6-4564-912D-DA2E7482A00F}.Release|Win32.ActiveCfg = Release|Win32 {25C60507-39C6-4564-912D-DA2E7482A00F}.Release|Win32.Build.0 = Release|Win32 {25C60507-39C6-4564-912D-DA2E7482A00F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {25C60507-39C6-4564-912D-DA2E7482A00F}.VSDebug|Win32.Build.0 = VSDebug|Win32 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.Release|Win32.ActiveCfg = Release|Win32 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.Release|Win32.Build.0 = Release|Win32 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.VSDebug|Win32.Build.0 = VSDebug|Win32 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.Release|Win32.ActiveCfg = Release|Win32 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.Release|Win32.Build.0 = Release|Win32 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.VSDebug|Win32.Build.0 = VSDebug|Win32 {8C13E498-6369-4792-A0CF-B7134C54561B}.Release|Win32.ActiveCfg = Release|Win32 {8C13E498-6369-4792-A0CF-B7134C54561B}.Release|Win32.Build.0 = Release|Win32 {8C13E498-6369-4792-A0CF-B7134C54561B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {8C13E498-6369-4792-A0CF-B7134C54561B}.VSDebug|Win32.Build.0 = VSDebug|Win32 {9D37639F-1694-47DF-84BF-336D98E0639F}.Release|Win32.ActiveCfg = Release|Win32 {9D37639F-1694-47DF-84BF-336D98E0639F}.Release|Win32.Build.0 = Release|Win32 {9D37639F-1694-47DF-84BF-336D98E0639F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {9D37639F-1694-47DF-84BF-336D98E0639F}.VSDebug|Win32.Build.0 = VSDebug|Win32 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}.Release|Win32.ActiveCfg = Release|Win32 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}.Release|Win32.Build.0 = Release|Win32 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}.VSDebug|Win32.Build.0 = VSDebug|Win32 {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}.Release|Win32.ActiveCfg = Release|Win32 {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}.Release|Win32.Build.0 = Release|Win32 {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}.VSDebug|Win32.Build.0 = VSDebug|Win32 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}.Release|Win32.ActiveCfg = Release|Win32 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}.Release|Win32.Build.0 = Release|Win32 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}.VSDebug|Win32.Build.0 = VSDebug|Win32 {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}.Release|Win32.ActiveCfg = Release|Win32 {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}.Release|Win32.Build.0 = Release|Win32 {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}.VSDebug|Win32.Build.0 = VSDebug|Win32 {5304AD69-D449-4589-B2C9-E4607E56A51D}.Release|Win32.ActiveCfg = Release|Win32 {5304AD69-D449-4589-B2C9-E4607E56A51D}.Release|Win32.Build.0 = Release|Win32 {5304AD69-D449-4589-B2C9-E4607E56A51D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {5304AD69-D449-4589-B2C9-E4607E56A51D}.VSDebug|Win32.Build.0 = VSDebug|Win32 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.Release|Win32.ActiveCfg = Release|Win32 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.Release|Win32.Build.0 = Release|Win32 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.VSDebug|Win32.Build.0 = VSDebug|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.Release|Win32.ActiveCfg = Release|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.Release|Win32.Build.0 = Release|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {3D19EAAD-9195-468B-BC5B-D147A89CA4F5}.VSDebug|Win32.Build.0 = VSDebug|Win32 {85005D62-6AA7-4D8A-86CB-4061B23D7C6C}.Release|Win32.ActiveCfg = Release|Win32 {85005D62-6AA7-4D8A-86CB-4061B23D7C6C}.Release|Win32.Build.0 = Release|Win32 {85005D62-6AA7-4D8A-86CB-4061B23D7C6C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {85005D62-6AA7-4D8A-86CB-4061B23D7C6C}.VSDebug|Win32.Build.0 = VSDebug|Win32 {B86FB73A-4ACC-42DE-9545-586D93955B06}.Release|Win32.ActiveCfg = Release|Win32 {B86FB73A-4ACC-42DE-9545-586D93955B06}.Release|Win32.Build.0 = Release|Win32 {B86FB73A-4ACC-42DE-9545-586D93955B06}.VSDebug|Win32.ActiveCfg = VSDebug|Win32 {B86FB73A-4ACC-42DE-9545-586D93955B06}.VSDebug|Win32.Build.0 = VSDebug|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal libpff-20120802/msvscpp/libcnotify/0000775000175000017500000000000012006536214014053 500000000000000libpff-20120802/msvscpp/libcnotify/libcnotify.vcproj0000644000175000017500000001133512005200340017346 00000000000000 libpff-20120802/msvscpp/libcsystem/0000775000175000017500000000000012006536214014067 500000000000000libpff-20120802/msvscpp/libcsystem/libcsystem.vcproj0000664000175000017500000001371512005200340017404 00000000000000 libpff-20120802/msvscpp/libfdata/0000775000175000017500000000000012006536214013457 500000000000000libpff-20120802/msvscpp/libfdata/libfdata.vcproj0000644000175000017500000001677412005200340016372 00000000000000 libpff-20120802/msvscpp/libcsplit/0000775000175000017500000000000012006536214013676 500000000000000libpff-20120802/msvscpp/libcsplit/libcsplit.vcproj0000664000175000017500000001274012005200340017017 00000000000000 libpff-20120802/config.guess0000755000175000017500000012761512006536015012467 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. timestamp='2009-11-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libpff-20120802/libfmapi/0000775000175000017500000000000012006536213012000 500000000000000libpff-20120802/libfmapi/libfmapi_entry_identifier.h0000644000175000017500000000375512005155705017311 00000000000000/* * Entry identifier (ENTRYID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_INTERNAL_ENTRY_IDENTIFIER_H ) #define _LIBFMAPI_INTERNAL_ENTRY_IDENTIFIER_H #include #include #include "libfmapi_extern.h" #include "libfmapi_libcerror.h" #include "libfmapi_libfguid.h" #include "libfmapi_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfmapi_internal_entry_identifier libfmapi_internal_entry_identifier_t; struct libfmapi_internal_entry_identifier { /* The flags */ uint8_t flags[ 4 ]; /* The service provider identifier */ libfguid_identifier_t *service_provider_identifier; }; LIBFMAPI_EXTERN \ int libfmapi_entry_identifier_initialize( libfmapi_entry_identifier_t **entry_identifier, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_entry_identifier_free( libfmapi_entry_identifier_t **entry_identifier, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_entry_identifier_copy_from_byte_stream( libfmapi_entry_identifier_t *entry_identifier, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); /* TODO add function to determine type of object indentifier ? */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_debug.h0000644000175000017500000000501312005155705015021 00000000000000/* * Debug functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_DEBUG_H ) #define _LIBFMAPI_DEBUG_H #include #include #include #include "libfmapi_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) int libfmapi_debug_string_contains_zero_bytes( uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); int libfmapi_debug_print_entry_identifier( uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libfmapi_debug_print_one_off_entry_identifier( uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libfmapi_debug_print_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libfmapi_debug_print_integer_32bit_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ); int libfmapi_debug_print_binary_data_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libfmapi_debug_print_array_multi_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libfmapi_debug_print_element_multi_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_class_identifier.c0000644000175000017500000001201312005155705017233 00000000000000/* * Class identifier (CLSID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfmapi_class_identifier.h" #include "libfmapi_definitions.h" uint8_t libfmapi_class_identifier_mapi[ 16 ] = \ { 0x28, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_public_strings[ 16 ] = \ { 0x29, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_internet_headers[ 16 ] = \ { 0x86, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_appointment[ 16 ] = \ { 0x02, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_task[ 16 ] = \ { 0x03, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_address[ 16 ] = \ { 0x04, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_common[ 16 ] = \ { 0x08, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_journal[ 16 ] = \ { 0x0a, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_sticky_note[ 16 ] = \ { 0x0e, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_sharing[ 16 ] = \ { 0x40, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_rss_feed[ 16 ] = \ { 0x41, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; uint8_t libfmapi_class_identifier_unified_messaging[ 16 ] = \ { 0x8e, 0x85, 0x42, 0x44, 0xe3, 0xa9, 0x80, 0x4e, 0xb9, 0x00, 0x31, 0x7a, 0x21, 0x0c, 0xc1, 0x5b }; uint8_t libfmapi_class_identifier_calendar[ 16 ] = \ { 0x90, 0xda, 0xd8, 0x6e, 0x0b, 0x45, 0x1b, 0x10, 0x98, 0xda, 0x00, 0xaa, 0x00, 0x3f, 0x13, 0x05 }; uint8_t libfmapi_class_identifier_air_sync[ 16 ] = \ { 0x49, 0x55, 0x03, 0x71, 0x39, 0x07, 0xcb, 0x4d, 0x91, 0x63, 0x00, 0xf0, 0x58, 0x0d, 0xbb, 0xdf }; uint8_t libfmapi_class_identifier_attachment[ 16 ] = \ { 0x7f, 0x7f, 0x35, 0x96, 0xe1, 0x59, 0xd0, 0x47, 0x99, 0xa7, 0x46, 0x51, 0x5c, 0x18, 0x3b, 0x54 }; uint8_t libfmapi_class_identifier_unknown[ 16 ] = \ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; #if defined( HAVE_DEBUG_OUTPUT ) /* The class identifiers */ libfmapi_class_identifier_definition_t libfmapi_class_identifier_definitions[ ] = { { libfmapi_class_identifier_mapi, "MAPI" }, { libfmapi_class_identifier_public_strings, "Public strings" }, { libfmapi_class_identifier_internet_headers, "Internet headers" }, { libfmapi_class_identifier_appointment, "Appointment" }, { libfmapi_class_identifier_task, "Task" }, { libfmapi_class_identifier_address, "Address" }, { libfmapi_class_identifier_common, "Common" }, { libfmapi_class_identifier_journal, "Journal" }, { libfmapi_class_identifier_sticky_note, "Sticky note" }, { libfmapi_class_identifier_sharing, "Sharing" }, { libfmapi_class_identifier_rss_feed, "RSS feed" }, { libfmapi_class_identifier_unified_messaging, "Unified messaging" }, { libfmapi_class_identifier_calendar, "Calendar" }, { libfmapi_class_identifier_air_sync, "Air sync" }, { libfmapi_class_identifier_unknown, "Unknown" } }; /* Retrieves a string containing the name of the class identifier */ const char *libfmapi_class_identifier_get_name( uint8_t *class_identifier ) { int iterator = 0; if( class_identifier == NULL ) { return( "Invalid class identifier" ); } while( memory_compare( ( libfmapi_class_identifier_definitions[ iterator ] ).identifier, libfmapi_class_identifier_unknown, 16 ) != 0 ) { if( memory_compare( ( libfmapi_class_identifier_definitions[ iterator ] ).identifier, class_identifier, 16 ) == 0 ) { break; } iterator++; } return( ( libfmapi_class_identifier_definitions[ iterator ] ).name ); } #endif libpff-20120802/libfmapi/libfmapi_libfdatetime.h0000644000175000017500000000303312005155705016364 00000000000000/* * The libfdatetime header wrapper * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBFDATETIME_H ) #define _LIBFMAPI_LIBFDATETIME_H #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if defined( HAVE_LOCAL_LIBFDATETIME ) #include #include #include #include #include #include #elif defined( HAVE_LIBFDATETIME_H ) /* If libtool DLL support is enabled set LIBFDATETIME_DLL_IMPORT * before including libfdatetime.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFDATETIME_DLL_IMPORT #endif #include #else #error Missing libfdatetime.h #endif #endif libpff-20120802/libfmapi/libfmapi_definitions.h0000644000175000017500000000402512005155722016247 00000000000000/* * The internal definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFMAPI_INTERNAL_DEFINITIONS_H ) #define LIBFMAPI_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFMAPI for local use of libfmapi */ #if !defined( HAVE_LOCAL_LIBFMAPI ) /* The definitions in are copied here * for local use of libfmapi */ #else #include #define LIBFMAPI_VERSION 20120729 /* The libfmapi version string */ #define LIBFMAPI_VERSION_STRING "20120729" /* The endian definitions */ #define LIBFMAPI_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFMAPI_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE enum LIBFMAPI_ENTRY_IDENTIFIER_FLAGS { LIBFMAPI_ENTRY_IDENTIFIER_FLAG_MAPI_NOTRESERVED = 0x08, LIBFMAPI_ENTRY_IDENTIFIER_FLAG_MAPI_NOW = 0x10, LIBFMAPI_ENTRY_IDENTIFIER_FLAG_MAPI_THISSESSION = 0x20, LIBFMAPI_ENTRY_IDENTIFIER_FLAG_MAPI_NOTRECIP = 0x40, LIBFMAPI_ENTRY_IDENTIFIER_FLAG_MAPI_SHORTTERM = 0x80 }; #define LIBFMAPI_ENTRY_IDENTIFIER_FLAG_MAPI_COMPOUND 0x80 enum LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAGS { LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_NO_RICH_INFO = 0x0001, LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_0x1000 = 0x1000, LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE = 0x8000 }; #endif #endif libpff-20120802/libfmapi/libfmapi_value_type.h0000644000175000017500000000267712005155705016125 00000000000000/* * Value type functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_VALUE_TYPE_H ) #define _LIBFMAPI_VALUE_TYPE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libfmapi_value_type libfmapi_value_type_t; struct libfmapi_value_type { /* The value type */ uint32_t value_type; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libfmapi_value_type_get_identifier( uint32_t value_type ); const char *libfmapi_value_type_get_description( uint32_t value_type ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_value_type.c0000644000175000017500000000744712005155705016120 00000000000000/* * Value type functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfmapi_value_type.h" #if defined( HAVE_DEBUG_OUTPUT ) libfmapi_value_type_t libfmapi_value_types[ ] = { { 0x0000, "PtypUnspecified", "Unspecified" }, { 0x0001, "PtypNull", "NULL" }, { 0x0002, "PtypInteger16", "Integer 16-bit signed" }, { 0x0003, "PtypInteger32", "Integer 32-bit signed" }, { 0x0004, "PtypFloating32", "Floating point single precision (32-bit)" }, { 0x0005, "PtypFloating64", "Floating point double precision (64-bit)" }, { 0x0006, "PtypCurrency", "Currency (64-bit)" }, { 0x0007, "PtypFloatingTime", "Floating time (64-bit)" }, { 0x000a, "PtypErrorCode", "Error value (32-bit)" }, { 0x000b, "PtypBoolean", "Boolean" }, { 0x000d, "PtypObject", "Embedded object" }, { 0x0014, "PtypInteger64", "Integer 64-bit signed" }, { 0x001e, "PtypString8", "Extended ASCII string" }, { 0x001f, "PtypString", "UTF-16 Unicode string" }, { 0x0040, "PtypTime", "Windows Filetime (64-bit)" }, { 0x0048, "PtypGuid", "GUID (128-bit)" }, { 0x00fb, "PtypServerId", "Server identifier" }, { 0x00fd, "PtypRestriction", "Restriction" }, { 0x00fe, "PtypRuleAction", "Rule actions" }, { 0x0102, "PtypBinary", "Binary data" }, { 0x1002, "PtypMultipleInteger16", "Array of Integer 16-bit signed values" }, { 0x1003, "PtypMultipleInteger32", "Array of Integer 32-bit signed values" }, { 0x1004, "PtypMultipleFloating32", "Array of Floating point single precision (32-bit) values" }, { 0x1005, "PtypMultipleFloating64", "Array of Floating point double precision (64-bit) values" }, { 0x1006, "PtypMultipleCurrency", "Array of Currency (64-bit) values" }, { 0x1007, "PtypMultipleFloatingTime", "Array of Floating time (64-bit) values" }, { 0x1014, "PtypMultipleInteger64", "Array of Integer 64-bit signed values" }, { 0x101e, "PtypMultipleString8", "Array of Extended ASCII string values" }, { 0x101f, "PtypMultipleString", "Array of UTF-16 Unicode string values" }, { 0x1040, "PtypMultipleTime", "Array of Windows Filetime (64-bit) values" }, { 0x1048, "PtypMultipleGuid", "Array of GUID (128-bit) values" }, { 0x1102, "PtypMultipleBinary", "Array of Binary data values" }, { (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* Retrieves a string containing the value type identifier */ const char *libfmapi_value_type_get_identifier( uint32_t value_type ) { int iterator = 0; while( ( libfmapi_value_types[ iterator ] ).value_type != (uint32_t) -1 ) { if( ( libfmapi_value_types[ iterator ] ).value_type == value_type ) { break; } iterator++; } return( ( libfmapi_value_types[ iterator ] ).identifier ); } /* Retrieves a string containing the value type description */ const char *libfmapi_value_type_get_description( uint32_t value_type ) { int iterator = 0; while( ( libfmapi_value_types[ iterator ] ).value_type != (uint32_t) -1 ) { if( ( libfmapi_value_types[ iterator ] ).value_type == value_type ) { break; } iterator++; } return( ( libfmapi_value_types[ iterator ] ).description ); } #endif libpff-20120802/libfmapi/libfmapi_libfguid.h0000644000175000017500000000254712005155705015531 00000000000000/* * The libfguid header wrapper * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBFGUID_H ) #define _LIBFMAPI_LIBFGUID_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) #include #include #include #elif defined( HAVE_LIBFGUID_H ) /* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT * before including libfguid.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFGUID_DLL_IMPORT #endif #include #else #error Missing libfguid.h #endif #endif libpff-20120802/libfmapi/libfmapi_libuna.h0000644000175000017500000000323112005155705015205 00000000000000/* * The libuna header wrapper * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBUNA_H ) #define _LIBFMAPI_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #elif defined( HAVE_LIBUNA_H ) /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #else #error Missing libuna.h #endif #endif libpff-20120802/libfmapi/libfmapi_libcstring.h0000644000175000017500000000272312005155705016100 00000000000000/* * The internal libcstring header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBCSTRING_H ) #define _LIBFMAPI_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #elif defined( HAVE_LIBCSTRING_H ) /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #else #error Missing libcstring.h #endif #endif libpff-20120802/libfmapi/libfmapi_extern.h0000644000175000017500000000241412005155705015242 00000000000000/* * The internal extern definition * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_INTERNAL_EXTERN_H ) #define _LIBFMAPI_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFMAPI for local use of libfmapi */ #if !defined( HAVE_LOCAL_LIBFMAPI ) /* If libtool DLL support is enabled set LIBFMAPI_DLL_EXPORT * before including libfmapi/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFMAPI_DLL_EXPORT #endif #include #else #define LIBFMAPI_EXTERN extern #endif #endif libpff-20120802/libfmapi/Makefile.am0000644000175000017500000000257412005155705013764 00000000000000if HAVE_LOCAL_LIBFMAPI AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfmapi.la libfmapi_la_SOURCES = \ libfmapi_class_identifier.c libfmapi_class_identifier.h \ libfmapi_codepage.c libfmapi_codepage.h \ libfmapi_crc.c libfmapi_crc.h \ libfmapi_debug.c libfmapi_debug.h \ libfmapi_definitions.h \ libfmapi_entry_identifier.c libfmapi_entry_identifier.h \ libfmapi_extern.h \ libfmapi_guid.c libfmapi_guid.h \ libfmapi_libcerror.h \ libfmapi_libcnotify.h \ libfmapi_libcstring.h \ libfmapi_libfdatetime.h \ libfmapi_libfguid.h \ libfmapi_libfwnt.h \ libfmapi_libuna.h \ libfmapi_lzfu.c libfmapi_lzfu.h \ libfmapi_one_off_entry_identifier.c libfmapi_one_off_entry_identifier.h \ libfmapi_property_type.c libfmapi_property_type.h \ libfmapi_service_provider_identifier.c libfmapi_service_provider_identifier.h \ libfmapi_types.h \ libfmapi_value_type.c libfmapi_value_type.h \ libfmapi_x400_object_identifier.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfmapi ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfmapi_la_SOURCES) libpff-20120802/libfmapi/libfmapi_lzfu.h0000644000175000017500000000405512005155705014720 00000000000000/* * LZFu (un)compression functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LZFU_H ) #define _LIBFMAPI_LZFU_H #include #include #include "libfmapi_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The LZFu compression header (compressed RTF header) */ typedef struct libfmapi_lzfu_header libfmapi_lzfu_header_t; struct libfmapi_lzfu_header { /* The size of the compressed data after the header */ uint32_t compressed_data_size; /* The size of the uncompressed data after the header */ uint32_t uncompressed_data_size; /* The (un)compressed data signature */ uint32_t signature; /* A CRC32 of the compressed data */ uint32_t crc; }; int libfmapi_lzfu_get_uncompressed_data_size( uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ); int libfmapi_lzfu_compress( uint8_t *compressed_data, size_t *compressed_data_size, uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ); int libfmapi_lzfu_decompress( uint8_t *uncompressed_data, size_t *uncompressed_data_size, uint8_t *compressed_data, size_t compressed_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_property_type.c0000644000175000017500000046330412005155705016666 00000000000000/* * Property type functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfmapi_class_identifier.h" #include "libfmapi_libcstring.h" #include "libfmapi_property_type.h" #if defined( HAVE_DEBUG_OUTPUT ) /* The message envelope property types (0x0001 - 0x0bff) */ libfmapi_property_type_t libfmapi_message_envelope_property_types[ ] = { { 0x0001, 0x0003, "PidTagAcknowledgementMode", "Acknowledgment mode" }, { 0x0002, 0x000b, "PidTagAlternateRecipientAllowed", "Alternate recipient allowed" }, { 0x0003, 0x0102, "PidTagAuthorizingUsers", "Authorized users" }, { 0x0004, 0x001e, "PidTagAutoForwardComment", "Auto forward comment" }, { 0x0005, 0x000b, "PidTagAutoForwarded", "Auto forwarded" }, { 0x0006, 0x0102, "PidTagContentConfidentialityAlgorithmId", "Content confidentiality algorithm identifier" }, { 0x0007, 0x0102, "PidTagContentCorrelator", "Original content correlator" }, { 0x0008, 0x001e, "PidTagContentIdentifier", "Content identifier" }, { 0x0009, 0x0003, "PidTagContentLength", "Content length" }, { 0x000a, 0x000b, "PidTagContentReturnRequested", "Content return requested" }, { 0x000b, 0x0102, "PidTagConversationKey", "Conversation key" }, { 0x000c, 0x0102, "PidTagConversionEits", "Conversion encoded information types" }, { 0x000d, 0x000b, "PidTagConversionWithLossProhibited", "Text conversions that loose information is prohibited" }, { 0x000e, 0x0102, "PidTagConvertedEits", "Encoded information types (EITS) conversation identifier" }, { 0x000f, 0x0040, "PidTagDeferredDeliveryTime", "Sender requested delivery date and time" }, { 0x0010, 0x0040, "PidTagDeliverTime", "Message delivery time" }, { 0x0011, 0x0003, "PidTagDiscardReason", "Message discard reason" }, { 0x0012, 0x000b, "PidTagDisclosureOfRecipients", "Disclosure of recipient allowed" }, { 0x0013, 0x0102, "PidTagDistributionListExpansionHistory", "Distribution list expansion history" }, { 0x0014, 0x000b, "PidTagDistributionListExpansionProhibited", "Expansion of distribution list is prohibited" }, { 0x0015, 0x0040, "PidTagExpiryTime", "Message expiry time" }, { 0x0016, 0x000b, "PidTagImplicitConversionProhibited", "Implicit message text conversions prohibited" }, { 0x0017, 0x0003, "PidTagImportance", "Importance" }, { 0x0018, 0x0102, "PR_IPM_ID", "Interpersonal message X400 identifier" }, { 0x0019, 0x0040, "PidTagLatestDeliveryTime", "Latest message delivery time" }, { 0x001a, 0x001e, "PidTagMessageClass", "Message class" }, { 0x001b, 0x0102, "PidTagMessageDeliveryId", "Message delivery identifier" }, { 0x001e, 0x0102, "PidTagMessageSecurityLabel", "Message security label" }, { 0x001f, 0x0102, "PidTagObsoletedMessageIds", "Obsolete message identifiers" }, { 0x0020, 0x0102, "PidTagOriginallyIntendedRecipientName", "Originally intended recipient name" }, { 0x0021, 0x0102, "PidTagOriginalEits", "Message text original encoded information types (EITS)" }, { 0x0022, 0x0102, "PidTagOriginatorCertificate", "Originator certificate" }, { 0x0023, 0x000b, "PidTagOriginatorDeliveryReportRequested", "Originator delivery report requested" }, { 0x0024, 0x0102, "PidTagOriginatorReturnAddress", "Originator return address" }, { 0x0025, 0x0102, "PidTagParentKey", "Parent key" }, { 0x0026, 0x0003, "PidTagPriority", "Priority" }, { 0x0027, 0x0102, "PidTagOriginCheck", "Origin verification value" }, { 0x0028, 0x000b, "PidTagProofOfSubmissionRequested", "ASN.1 proof of submission requested" }, { 0x0029, 0x000b, "PidTagReadReceiptRequested", "Read receipt requested" }, { 0x002a, 0x0040, "PidTagReceiptTime", "Receipt time" }, { 0x002b, 0x000b, "PidTagRecipientReassignmentProhibited", "Recipient reassignment prohibited" }, { 0x002c, 0x0102, "PR_REDIRECTION_HISTORY", "" }, { 0x002d, 0x0102, "PR_RELATED_IPMS", "" }, { 0x002e, 0x0003, "PidTagOriginalSensitivity", "Original sensitivity" }, { 0x002f, 0x001e, "PR_LANGUAGES", "" }, { 0x0030, 0x0040, "PR_REPLY_TIME", "" }, { 0x0031, 0x0102, "PidTagReportTag", "Report tag" }, { 0x0032, 0x0040, "PR_REPORT_TIME", "" }, { 0x0033, 0x000b, "PR_RETURNED_IPM", "" }, { 0x0034, 0x0003, "PidTagSecurity", "Security" }, { 0x0035, 0x000b, "PR_INCOMPLETE_COPY", "" }, { 0x0036, 0x0003, "PidTagSensitivity", "Sensitivity" }, { 0x0037, 0x001e, "PidTagSubject", "Subject" }, { 0x0038, 0x0102, "PidTagSubjectMessageId", "Subject message identifier" }, { 0x0039, 0x0040, "PidTagClientSubmitTime", "Client submit time" }, { 0x003a, 0x001e, "PR_REPORT_NAME", "" }, { 0x003b, 0x0102, "PidTagSentRepresentingSearchKey", "Sent representing search key" }, { 0x003c, 0x0102, "PR_X400_CONTENT_TYPE", "" }, { 0x003d, 0x001e, "PidTagSubjectPrefix", "Subject prefix" }, { 0x003e, 0x0003, "PR_NON_RECEIPT_REASON", "" }, { 0x003f, 0x0102, "PidTagReceivedByEntryId", "Received by entry identifier" }, { 0x0040, 0x001e, "PidTagReceivedByName", "Received by name" }, { 0x0041, 0x0102, "PidTagSentRepresentingEntryId", "Sent representing entry identifier" }, { 0x0042, 0x001e, "PidTagSentRepresentingName", "Sent representing name" }, { 0x0043, 0x0102, "PR_RCVD_REPRESENTING_ENTRYID", "Received representing entry identifier" }, { 0x0044, 0x001e, "PR_RCVD_REPRESENTING_NAME", "Received representing name" }, { 0x0045, 0x0102, "PR_REPORT_ENTRYID", "Report entry identifier" }, { 0x0046, 0x0102, "PR_READ_RECEIPT_ENTRYID", "Read receipt entry identifier" }, { 0x0047, 0x0102, "PR_MESSAGE_SUBMISSION_ID", "" }, { 0x0048, 0x0040, "PR_PROVIDER_SUBMIT_TIME", "" }, { 0x0049, 0x001e, "PidTagOriginalSubject", "Original subject" }, { 0x004a, 0x000b, "PR_DISC_VAL", "" }, { 0x004b, 0x001e, "PR_ORIG_MESSAGE_CLASS", "" }, { 0x004c, 0x0102, "PidTagOriginalAuthorEntryId", "Original author entry identifier" }, { 0x004d, 0x001e, "PidTagOriginalAuthorName", "Original author name" }, { 0x004e, 0x0040, "PidTagOriginalSubmitTime", "Original submit time" }, { 0x004f, 0x0102, "PR_REPLY_RECIPIENT_ENTRIES", "Reply recipient entries" }, { 0x0050, 0x001e, "PR_REPLY_RECIPIENT_NAMES", "Reply recipient names" }, { 0x0051, 0x0102, "PR_RECEIVED_BY_SEARCH_KEY", "Received by search key" }, { 0x0052, 0x0102, "PR_RCVD_REPRESENTING_SEARCH_KEY", "Received representing search key" }, { 0x0053, 0x0102, "PR_READ_RECEIPT_SEARCH_KEY", "" }, { 0x0054, 0x0102, "PR_REPORT_SEARCH_KEY", "" }, { 0x0055, 0x0040, "PR_ORIGINAL_DELIVERY_TIME", "" }, { 0x0056, 0x0102, "PR_ORIGINAL_AUTHOR_SEARCH_KEY", "" }, { 0x0057, 0x000b, "PidTagMessageToMe", "My address in To field" }, { 0x0058, 0x000b, "PidTagMessageCcMe", "My address in CC field" }, { 0x0059, 0x000b, "PidTagMessageRecipientMe", "Message addressed to me" }, { 0x005a, 0x001e, "PidTagOriginalSenderName", "Orginal sender name" }, { 0x005b, 0x0102, "PidTagOriginalSenderEntryId", "Orginal sender entry identifier" }, { 0x005c, 0x0102, "PidTagOriginalSenderSearchKey", "Original sender search key" }, { 0x005d, 0x001e, "PidTagOriginalSentRepresentingName", "Original sent representing name" }, { 0x005e, 0x0102, "PidTagOriginalSentRepresentingEntryId", "Original sent representing entry identifier" }, { 0x005f, 0x0102, "PidTagOriginalSentRepresentingSearchKey", "Original sent representing search key" }, { 0x0060, 0x0040, "PidTagStartDate", "Appointment start date and time" }, { 0x0061, 0x0040, "PidTagEndDate", "Appointment end date and time" }, { 0x0062, 0x0003, "PidTagOwnerAppointmentId", "Appointment owner identifier" }, { 0x0063, 0x000b, "PidTagResponseRequested", "Response requested" }, { 0x0064, 0x001e, "PidTagSentRepresentingAddressType", "Sent representing address type" }, { 0x0065, 0x001e, "PidTagSentRepresentingEmailAddress", "Sent representing e-mail address" }, { 0x0066, 0x001e, "PidTagOriginalSenderAddressType", "Original sender address type" }, { 0x0067, 0x001e, "PidTagOriginalSenderEmailAddress", "Original sender e-mail address" }, { 0x0068, 0x001e, "PidTagOriginalSentRepresentingAddressType", "Original sent representing address type" }, { 0x0069, 0x001e, "PidTagOriginalSentRepresentingEmailAddress", "Original sent representing e-mail address" }, { 0x0070, 0x001e, "PidTagConversationTopic", "Conversation topic" }, { 0x0071, 0x0102, "PidTagConversationIndex", "Conversation index" }, { 0x0072, 0x001e, "PidTagOriginalDisplayBcc", "Original display BCC" }, { 0x0073, 0x001e, "PidTagOriginalDisplayCc", "Original display CC" }, { 0x0074, 0x001e, "PidTagOriginalDisplayTo", "Original display To" }, { 0x0075, 0x001e, "PidTagReceivedByAddressType", "Received by address type" }, { 0x0076, 0x001e, "PidTagReceivedByEmailAddress", "Received by e-mail address" }, { 0x0077, 0x001e, "PidTagReceivedRepresentingAddressType", "Received representing address type" }, { 0x0078, 0x001e, "PidTagReceivedRepresentingEmailAddress", "Received representing e-mail address" }, { 0x0079, 0x001e, "PidTagOriginalAuthorAddressType", "Original author address type" }, { 0x007a, 0x001e, "PidTagOriginalAuthorEmailAddress", "Original author e-mail address" }, { 0x007b, 0x001e, "PidTagOriginallyIntendedRecipAddrtype", "Originally intended recipient address type" }, { 0x007c, 0x001e, "PidTagOriginallyIntendedRecipEmailAddress", "Originally intended recipient e-mail address" }, { 0x007d, 0x001e, "PidTagTransportMessageHeaders", "Transport message headers" }, { 0x007e, 0x0102, "PidTagDelegation", "Delegation" }, { 0x007f, 0x0102, "PidTagTnefCorrelationKey", "TNEF correlation key" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The recipient property type (0x0c00 - 0x0dff) */ libfmapi_property_type_t libfmapi_recipient_property_types[ ] = { { 0x0c00, 0x0102, "PR_CONTENT_INTEGRITY_CHECK", "" }, { 0x0c01, 0x0003, "PR_EXPLICIT_CONVERSION", "" }, { 0x0c02, 0x000b, "PidTagIpmReturnRequested", "Return report requested" }, { 0x0c03, 0x0102, "PidTagMessageToken", "Message ASN.1 secutiry token" }, { 0x0c04, 0x0003, "PR_NDR_REASON_CODE", "" }, { 0x0c05, 0x0003, "PR_NDR_DIAG_CODE", "" }, { 0x0c06, 0x000b, "PR_NON_RECEIPT_NOTIFICATION_REQUESTED", "Non receipt notification requested" }, { 0x0c07, 0x0003, "PR_DELIVERY_POINT", "" }, { 0x0c08, 0x000b, "PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED", "Originator non delivery report requested" }, { 0x0c09, 0x0102, "PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT", "" }, { 0x0c0a, 0x000b, "PR_PHYSICAL_DELIVERY_BUREAU_FAX_DELIVERY", "" }, { 0x0c0b, 0x0003, "PR_PHYSICAL_DELIVERY_MODE", "" }, { 0x0c0c, 0x0003, "PR_PHYSICAL_DELIVERY_REPORT_REQUEST", "" }, { 0x0c0d, 0x0102, "PR_PHYSICAL_FORWARDING_ADDRESS", "" }, { 0x0c0e, 0x000b, "PR_PHYSICAL_FORWARDING_ADDRESS_REQUESTED", "" }, { 0x0c0f, 0x000b, "PR_PHYSICAL_FORWARDING_PROHIBITED", "" }, { 0x0c10, 0x0102, "PR_PHYSICAL_RENDITION_ATTRIBUTES", "" }, { 0x0c11, 0x0102, "PR_PROOF_OF_DELIVERY", "" }, { 0x0c12, 0x000b, "PR_PROOF_OF_DELIVERY_REQUESTED", "" }, { 0x0c13, 0x0102, "PidTagRecipientCertificate", "Recipient certificate" }, { 0x0c14, 0x001e, "PR_RECIPIENT_NUMBER_FOR_ADVICE", "" }, { 0x0c15, 0x0003, "PidTagRecipientType", "Recipient type" }, { 0x0c16, 0x0003, "PR_REGISTERED_MAIL_TYPE", "" }, { 0x0c17, 0x000b, "PR_REPLY_REQUESTED", "" }, { 0x0c18, 0x0003, "PR_REQUESTED_DELIVERY_METHOD", "" }, { 0x0c19, 0x0102, "PidTagSenderEntryId", "Sender entry identifier" }, { 0x0c1a, 0x001e, "PidTagSenderName", "Sender entry name" }, { 0x0c1b, 0x001e, "PR_SUPPLEMENTARY_INFO", "" }, { 0x0c1c, 0x0003, "PR_TYPE_OF_MTS_USER", "" }, { 0x0c1d, 0x0102, "PidTagSenderSearchKey", "Sender search key" }, { 0x0c1e, 0x001e, "PidTagSenderAddressType", "Sender address type" }, { 0x0c1f, 0x001e, "PidTagSenderEmailAddress", "Sender e-mail address" }, { 0x0c20, 0x0003, "PR_NDR_STATUS_CODE", "None delivery status code" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The non-transmittable message property type (0x0e00 - 0x0fff) */ libfmapi_property_type_t libfmapi_non_transmittable_message_property_types[ ] = { { 0x0e00, 0x0014, "PidTagCurrentVersion", "Message store verion" }, { 0x0e01, 0x000b, "PidTagDeleteAfterSubmit", "Delete after submit" }, { 0x0e02, 0x001e, "PidTagDisplayBcc", "Display BCC" }, { 0x0e03, 0x001e, "PidTagDisplayCc", "Display CC" }, { 0x0e04, 0x001e, "PidTagDisplayTo", "Display To" }, { 0x0e05, 0x001e, "PidTagParentDisplay", "Parent display name" }, { 0x0e06, 0x0040, "PidTagOriginalDeliveryTime", "Message delivery time" }, { 0x0e07, 0x0003, "PidTagMessageFlags", "Message flags" }, { 0x0e08, 0x0003, "PidTagMessageSize", "Message size (32-bit)" }, { 0x0e08, 0x0014, "PidTagMessageSizeExtended", "Message size (64-bit)" }, { 0x0e09, 0x0102, "PidTagParentEntryId", "Parent folder entry identifier" }, { 0x0e0a, 0x0102, "PidTagSentMailEntryId", "Sent mail folder entry identifier" }, { 0x0e0c, 0x000b, "PidTagCorrelate", "Correlation requested" }, { 0x0e0d, 0x0102, "PidTagCorrelateMtsid", "Correlation message transfer system identifier" }, { 0x0e0e, 0x000b, "PidTagDiscreteValues", "Report applies to specific members only" }, { 0x0e0f, 0x000b, "PidTagResponsibility", "Transport provider has responsibility" }, { 0x0e10, 0x0003, "PidTagSpoolerStatus", "Spooler status" }, { 0x0e11, 0x0003, "PR_TRANSPORT_STATUS", "" }, { 0x0e12, 0x000d, "PR_MESSAGE_RECIPIENTS", "" }, { 0x0e13, 0x000d, "PR_MESSAGE_ATTACHMENTS", "" }, { 0x0e14, 0x0003, "PidTagSubmitFlags", "Message submit flags" }, { 0x0e15, 0x0003, "PR_RECIPIENT_STATUS", "" }, { 0x0e16, 0x0003, "PR_TRANSPORT_KEY", "" }, { 0x0e17, 0x0003, "PidTagMessageStatus", "Message status flags" }, { 0x0e18, 0x0003, "PR_MESSAGE_DOWNLOAD_TIME", "" }, { 0x0e19, 0x0014, "PR_CREATION_VERSION", "" }, { 0x0e1a, 0x0014, "PR_MODIFY_VERSION", "" }, { 0x0e1b, 0x000b, "PR_HASATTACH", "" }, { 0x0e1c, 0x0003, "PidTagBodyCrc", "Plain text message body checksum" }, { 0x0e1d, 0x001e, "PidTagNormalizedSubject", "Normalized subject" }, { 0x0e1f, 0x000b, "PidTagRtfInSync", "Compressed RTF message body in sync with plain text" }, { 0x0e20, 0x0003, "PidTagAttachSize", "Attachment size" }, { 0x0e21, 0x0003, "PidTagAttachNumber", "Attachment number" }, { 0x0e22, 0x000b, "PidTagPreprocess", "Needs preprocessing" }, { 0x0e23, 0x0003, "PidTagInternetArticleNumber", "Internet article number" }, { 0x0e24, 0x001e, "PR_NEWSGROUP_NAME", "" }, { 0x0e25, 0x0102, "PR_ORIGINATING_MTA_CERTIFICATE", "" }, { 0x0e26, 0x0102, "PR_PROOF_OF_SUBMISSION", "" }, { 0x0e27, 0x0102, "PidTagSecurityDescriptor", "Permissions (NT security descriptor)" }, { 0x0e30, 0x0003, "PidTagReplItemid", "Replication item identifier" }, { 0x0e33, 0x0014, "PidTagReplChangenum", "Replication change number" }, { 0x0e34, 0x0102, "PidTagReplVersionHistory", "Replication version history" }, { 0x0e38, 0x0003, "PidTagReplFlags", "Replication flags" }, { 0x0e3c, 0x0102, "PidTagReplCopiedfromVersionhistory", "Replication version information" }, { 0x0e3d, 0x0102, "PidTagReplCopiedfromItemid", "Replication item identifier information" }, { 0x0e58, 0x0102, "PR_CREATOR_SID", "Creator (NT security identifier)" }, { 0x0e59, 0x0102, "PR_LAST_MODIFIER_SID", "Last modifier (NT security identifier)" }, { 0x0e5e, 0x0048, "PR_MIME_HANDLER_CLASSID", "MIME handle class identifier" }, { 0x0e5e, 0x1048, "PR_MIME_HANDLER_CLASSIDS", "MIME handle class identifiers" }, { 0x0e61, 0x0003, "PR_URL_COMP_NAME_POSTFIX", "URL computer name postfix" }, { 0x0e62, 0x000b, "PR_URL_COMP_NAME_SET", "URL computer name set" }, { 0x0e63, 0x0003, "PR_SUBFOLDER_CT", "" }, { 0x0e64, 0x0003, "PR_DELETED_SUBFOLDER_CT", "" }, { 0x0e66, 0x0040, "PR_DELETE_TIME", "" }, { 0x0e67, 0x0102, "PR_AGE_LIMIT", "" }, { 0x0e79, 0x0003, "PR_TRUST_SENDER", "Trust sender" }, { 0x0e96, 0x0102, "PR_ATTACH_VIRUS_SCAN_INFO", "" }, { 0x0ea0, 0x0048, "PR_ASSOCIATED_SHARING_PROVIDER", "Associated sharing provider identifier" }, { 0x0ea3, 0x0102, "PidTagProviderItemId", "Provider identifier" }, { 0x0ea4, 0x0102, "PidTagProviderParentItemId", "Parent provider identifier" }, { 0x0ff4, 0x0003, "PidTagAccess", "Client access flags" }, { 0x0ff5, 0x0102, "PidTagRowType", "Row type" }, { 0x0ff6, 0x0003, "PidTagInstanceKey", "Instance key" }, { 0x0ff7, 0x0003, "PidTagAccessLevel", "Client access level flags" }, { 0x0ff8, 0x0102, "PidTagMappingSignature", "Mapping signature" }, { 0x0ff9, 0x0102, "PidTagRecordKey", "Record key" }, { 0x0ffa, 0x0102, "PidTagStoreRecordKey", "Message store record key" }, { 0x0ffb, 0x0102, "PidTagStoreEntryId", "Message store entry identifier" }, { 0x0ffc, 0x0102, "PidTagMiniIcon", "Mini icon bitmap" }, { 0x0ffd, 0x0102, "PidTagIcon", "Icon bitmap" }, { 0x0ffe, 0x0003, "PidTagObjectType", "Object type" }, { 0x0fff, 0x0102, "PidTagEntryId", "Entry identifier" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The message content property type (0x1000 - 0x2fff) */ libfmapi_property_type_t libfmapi_message_content_property_types[ ] = { { 0x1000, 0x001e, "PidTagBody", "Plain text message body" }, { 0x1001, 0x001e, "PidTagReportText", "Report text" }, { 0x1002, 0x0102, "PidTagOriginatorAndDistributionListExpansionHistory", "Originator and distribution list expansion history" }, { 0x1003, 0x0102, "PR_REPORTING_DL_NAME", "" }, { 0x1004, 0x0102, "PR_REPORTING_MTA_CERTIFICATE", "" }, { 0x1006, 0x0003, "PR_RTF_SYNC_BODY_CRC", "" }, { 0x1007, 0x0003, "PR_RTF_SYNC_BODY_COUNT", "" }, { 0x1008, 0x001e, "PR_RTF_SYNC_BODY_TAG", "" }, { 0x1009, 0x0102, "PidTagRtfCompressed", "Compressed RTF message body" }, { 0x1010, 0x0003, "PR_RTF_SYNC_PREFIX_COUNT", "" }, { 0x1011, 0x0003, "PR_RTF_SYNC_TRAILING_COUNT", "" }, { 0x1012, 0x0102, "PR_ORIGINALLY_INTENDED_RECIP_ENTRYID", "" }, { 0x1013, 0x001e, "PidTagBodyHtml", "HTML message body" }, { 0x1013, 0x0102, "PidTagHtml", "HTML message body" }, { 0x1014, 0x001e, "PidTagBodyContentLocation", "Message body content location" }, { 0x1030, 0x001e, "PR_INTERNET_APPROVED", "" }, { 0x1031, 0x001e, "PR_INTERNET_CONTROL", "" }, { 0x1032, 0x001e, "PR_INTERNET_DISTRIBUTION", "" }, { 0x1033, 0x001e, "PR_INTERNET_FOLLOWUP_TO", "" }, { 0x1034, 0x0003, "PR_INTERNET_LINES", "" }, { 0x1035, 0x001e, "PidTagInternetMessageId", "Message identifier" }, { 0x1036, 0x001e, "PR_INTERNET_NEWSGROUPS", "" }, { 0x1037, 0x001e, "PR_INTERNET_ORGANIZATION", "" }, { 0x1038, 0x001e, "PR_INTERNET_NNTP_PATH", "" }, { 0x1039, 0x001e, "PR_INTERNET_REFERENCES", "" }, { 0x103a, 0x001e, "PR_SUPERSEDES", "" }, { 0x103b, 0x0102, "PR_POST_FOLDER_ENTRIES", "" }, { 0x103c, 0x001e, "PR_POST_FOLDER_NAMES", "" }, { 0x103d, 0x0102, "PR_POST_REPLY_FOLDER_ENTRIES", "" }, { 0x103e, 0x001e, "PR_POST_REPLY_FOLDER_NAMES", "" }, { 0x103f, 0x0102, "PR_POST_REPLY_DENIED", "" }, { 0x1040, 0x001e, "PR_NNTP_XREF", "" }, { 0x1041, 0x001e, "PR_INTERNET_PRECEDENCE", "" }, { 0x1042, 0x001e, "PR_IN_REPLY_TO_ID", "" }, { 0x1043, 0x001e, "PR_LIST_HELP", "" }, { 0x1044, 0x001e, "PR_LIST_SUBSCRIBE", "" }, { 0x1045, 0x001e, "PR_LIST_UNSUBSCRIBE", "" }, { 0x1046, 0x001e, "PidTagInternetReturnPath", "Internet return path" }, { 0x1080, 0x0003, "PR_ICON_INDEX", "Icon index" }, { 0x1081, 0x0003, "PR_ACTION_FLAG", "" }, { 0x1082, 0x0040, "PR_ACTION_DATE", "" }, { 0x1090, 0x0003, "PR_FLAG_STATUS", "" }, { 0x1091, 0x0040, "PR_FLAG_COMPLETE", "" }, { 0x1097, 0x0003, "PidTagItemTemporaryFlags", "Temporary item flags" }, { 0x10c0, 0x0102, "PR_SMTP_TEMP_TBL_DATA", "" }, { 0x10c1, 0x0003, "PR_SMTP_TEMP_TBL_DATA_2", "" }, { 0x10c2, 0x0102, "PR_SMTP_TEMP_TBL_DATA_3", "" }, { 0x10c3, 0x0040, "PR_CAL_START_TIME", "" }, { 0x10c4, 0x0040, "PR_CAL_END_TIME", "" }, { 0x10c5, 0x0040, "PR_CAL_RECURRING_ID", "" }, { 0x10c6, 0x001e, "PR_DAV_SUBMIT_DATA", "" }, { 0x10c7, 0x0003, "PR_CDO_EXPANSION_INDEX", "" }, { 0x10c8, 0x0102, "PR_IFS_INTERNAL_DATA", "" }, { 0x10ca, 0x0040, "PR_CAL_REMINDER_NEXT_TIME", "" }, { 0x10f1, 0x001e, "PR_OWA_URL", "" }, { 0x10f2, 0x000b, "PR_DISABLE_FULL_FIDELITY", "Disable full fidelity" }, { 0x10f3, 0x001e, "PidTagUrlComponentName", "URL computer name" }, { 0x10f4, 0x000b, "PidTagAttributeHidden", "Attribute hidden" }, { 0x10f5, 0x000b, "PidTagAttributeSystem", "Attribute system" }, { 0x10f6, 0x000b, "PidTagAttributeReadOnly", "Attribute read only" }, { 0x1100, 0x0102, "PR_P1_CONTENT", "" }, { 0x1101, 0x0102, "PR_P1_CONTENT_TYPE", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The common object property type (0x3000 - 0x32ff) */ libfmapi_property_type_t libfmapi_common_object_property_types[ ] = { { 0x3000, 0x0003, "PidTagRowid", "Recipient row identifier" }, { 0x3001, 0x001e, "PidTagDisplayName", "Message store display name" }, { 0x3002, 0x001e, "PidTagAddressType", "E-mail address type" }, { 0x3003, 0x001e, "PidTagEmailAddress", "E-mail address" }, { 0x3004, 0x001e, "PidTagComment", "Comment" }, { 0x3005, 0x0003, "PidTagDepth", "Hierarchy table depth" }, { 0x3006, 0x001e, "PidTagProviderDisplayName", "Service provider display name" }, { 0x3007, 0x0040, "PidTagCreationTime", "Creation time" }, { 0x3008, 0x0040, "PidTagLastModificationTime", "Last modification time" }, { 0x3009, 0x0003, "PidTagResourceFlags", "Resource flags" }, { 0x300a, 0x001e, "PidTagProviderDisplay", "Service provider DLL filename" }, { 0x300b, 0x0102, "PidTagSearchKey", "Search key" }, { 0x300c, 0x0102, "PidTagProviderUid", "Service provider identifier" }, { 0x300d, 0x0003, "PidTagProviderOrdinal", "Service provider table index" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The form property type (0x3300 - 0x33ff) */ libfmapi_property_type_t libfmapi_form_property_types[ ] = { { 0x3301, 0x001e, "PR_FORM_VERSION", "" }, { 0x3302, 0x0048, "PR_FORM_CLSID", "" }, { 0x3303, 0x001e, "PR_FORM_CONTACT_NAME", "" }, { 0x3304, 0x001e, "PR_FORM_CATEGORY", "" }, { 0x3305, 0x001e, "PR_FORM_CATEGORY_SUB", "" }, { 0x3306, 0x1003, "PR_FORM_HOST_MAP", "" }, { 0x3307, 0x000b, "PR_FORM_HIDDEN", "" }, { 0x3308, 0x001e, "PR_FORM_DESIGNER_NAME", "" }, { 0x3309, 0x0048, "PR_FORM_DESIGNER_GUID", "" }, { 0x330a, 0x0003, "PR_FORM_MESSAGE_BEHAVIOR", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The message store property type (0x3400 - 0x35ff) */ libfmapi_property_type_t libfmapi_message_store_property_types[ ] = { { 0x3400, 0x000b, "PR_DEFAULT_STORE", "" }, { 0x340d, 0x0003, "PidTagStoreSupportMask", "Message store characteristics mask" }, { 0x340e, 0x0003, "PR_STORE_STATE", "" }, { 0x3410, 0x0102, "PR_IPM_SUBTREE_SEARCH_KEY", "" }, { 0x3411, 0x0102, "PR_IPM_OUTBOX_SEARCH_KEY", "" }, { 0x3412, 0x0102, "PR_IPM_WASTEBASKET_SEARCH_KEY", "" }, { 0x3413, 0x0102, "PR_IPM_SENTMAIL_SEARCH_KEY", "" }, { 0x3414, 0x0102, "PidTagStoreProvider", "Message store provider" }, { 0x3415, 0x000d, "PR_RECEIVE_FOLDER_SETTINGS", "" }, { 0x3416, 0x0102, "", "Item proc search entry identifier" }, { 0x3419, 0x0003, "PR_SEARCH_OWNER_ID", "Search owner identifier" }, { 0x35df, 0x0003, "PidTagValidFolderMask", "Valid folder mask" }, { 0x35e0, 0x0102, "PidTagIpmSubtreeEntryId", "IPM sub tree root folder entry identifier" }, { 0x35e2, 0x0102, "PidTagIpmOutboxEntryId", "Outbox folder entry identifier" }, { 0x35e3, 0x0102, "PidTagIpmWastebasketEntryId", "Wastebasket folder entry identifier" }, { 0x35e4, 0x0102, "PidTagIpmSentMailEntryId", "Sent mail folder entry identifier" }, { 0x35e5, 0x0102, "PidTagViewsEntryId", "Views folder entry identifier" }, { 0x35e6, 0x0102, "PidTagCommonViewsEntryId", "Common views folder entry identifier" }, { 0x35e7, 0x0102, "PidTagFinderEntryId", "Finder folder entry identifier" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The folder and address book property type (0x3600 - 0x36ff) */ libfmapi_property_type_t libfmapi_folder_and_address_book_property_types[ ] = { { 0x3600, 0x0003, "PidTagContainerFlags", "Address book container capabilities flags" }, { 0x3601, 0x0003, "PidTagFolderType", "Folder type" }, { 0x3602, 0x0003, "PidTagContentCount", "Number of content items" }, { 0x3603, 0x0003, "PidTagContentUnreadCount", "Number of unread content items" }, { 0x3604, 0x000d, "PidTagCreateTemplates", "Dialog box template entry identifiers" }, { 0x3605, 0x000d, "PidTagDetailsTable", "Display table object" }, { 0x3607, 0x000d, "PR_SEARCH", "Advanced search object" }, { 0x3609, 0x000b, "PR_SELECTABLE", "Table entry selectable" }, { 0x360a, 0x000b, "PidTagSubfolders", "Has sub folders" }, { 0x360b, 0x0003, "PR_STATUS", "Folder status flags" }, { 0x360c, 0x001e, "PR_ANR", "Address book property restriction" }, { 0x360d, 0x1003, "PR_CONTENTS_SORT_ORDER", "Content item sort order" }, { 0x360e, 0x000d, "PR_CONTAINER_HIERARCHY", "Hierarchy table" }, { 0x360f, 0x000d, "PR_CONTAINER_CONTENTS", "Contents table" }, { 0x3610, 0x000d, "PR_FOLDER_ASSOCIATED_CONTENTS", "Associated contents table" }, { 0x3611, 0x0102, "PR_DEF_CREATE_DL", "Distribution list template identifier" }, { 0x3612, 0x0102, "PR_DEF_CREATE_MAILUSER", "Messaging user template identifier" }, { 0x3613, 0x001e, "PidTagContainerClass", "Container class" }, { 0x3614, 0x0014, "PR_CONTAINER_MODIFY_VERSION", "Current modification version" }, { 0x3615, 0x0102, "PidTagAbProviderId", "Address book provider" }, { 0x3616, 0x0102, "PidTagDefaultViewEntryId", "Default view entry identifier" }, { 0x3617, 0x0003, "PidTagAssociatedContentCount", "Number of associated content items" }, { 0x361c, 0x0102, "PR_PACKED_NAME_PROPS", "" }, { 0x36d0, 0x0102, "PidTagIpmAppointmentEntryId", "Calendar folder entry identifier" }, { 0x36d1, 0x0102, "PidTagIpmContactEntryId", "Contact folder entry identifier" }, { 0x36d2, 0x0102, "PidTagIpmJournalEntryId", "Journal folder entry identifier" }, { 0x36d3, 0x0102, "PidTagIpmNoteEntryId", "Notes folder entry identifier" }, { 0x36d4, 0x0102, "PidTagIpmTaskEntryId", "Tasks folder entry identifier" }, { 0x36d5, 0x0102, "PidTagRemindersOnlineEntryId", "Online reminders folder entry identifier" }, { 0x36d6, 0x0102, "PR_REMINDERS_OFFLINE_ENTRYID", "Offline reminders folder entry identifier" }, { 0x36d7, 0x0102, "PidTagIpmDraftsEntryId", "Drafts entry identifier" }, { 0x36d8, 0x1102, "PidTagAdditionalRenEntryIds", "Additional REN folder entry identifiers" }, { 0x36da, 0x0102, "PidTagExtendedFolderFlags", "Extended folder flags" }, { 0x36df, 0x0102, "PidTagFolderWebViewInfo", "Folder web view information" }, { 0x36e0, 0x0102, "PR_FOLDER_XVIEWINFO_E", "" }, { 0x36e1, 0x0003, "PR_FOLDER_VIEWS_ONLY", "" }, { 0x36e2, 0x0003, "PidTagOrdinalMost", "Task ordinal maximum" }, { 0x36e4, 0x1102, "PidTagFreeBusyEntryIds", "Free busy entry identifiers" }, { 0x36e5, 0x001e, "PR_DEF_MSG_CLASS", "" }, { 0x36e6, 0x001e, "PR_DEF_FORM_NAME", "" }, { 0x36e9, 0x000b, "PR_GENERATE_EXCHANGE_VIEWS", "" }, { 0x36eb, 0x0102, "PR_FOLDER_VIEWLIST", "Folder view list" }, { 0x36ec, 0x0003, "PR_AGING_PERIOD", "Aging period" }, { 0x36ee, 0x0003, "PR_AGING_GRANULARITY", "Aging period granularity" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The attachment property type (0x3700 - 0x38ff) */ libfmapi_property_type_t libfmapi_attachment_property_types[ ] = { { 0x3700, 0x0102, "PR_ATTACHMENT_X400_PARAMETERS", "Attachment transmission parameters" }, { 0x3701, 0x000d, "PidTagAttachDataObject", "Attachment object" }, { 0x3701, 0x0102, "PidTagAttachDataBinary", "Attachment binary data" }, { 0x3702, 0x0102, "PidTagAttachEncoding", "Attachment encoding" }, { 0x3703, 0x001e, "PidTagAttachExtension", "Attachment extension" }, { 0x3704, 0x001e, "PidTagAttachFilename", "Attachment (short) filename" }, { 0x3705, 0x0003, "PidTagAttachMethod", "Attachment method" }, { 0x3707, 0x001e, "PidTagAttachLongFilename", "Attachment long filename" }, { 0x3708, 0x001e, "PidTagAttachPathname", "Attachment (short) pathname" }, { 0x3709, 0x0102, "PidTagAttachRendering", "Attachment rendering information" }, { 0x370a, 0x0102, "PidTagAttachTag", "Attachment application tag" }, { 0x370b, 0x0003, "PidTagRenderingPosition", "Attachment rendering offset" }, { 0x370c, 0x001e, "PidTagAttachTransportName", "Attachment TNEF transport name" }, { 0x370d, 0x001e, "PidTagAttachLongPathname", "Attachment long pathname" }, { 0x370e, 0x001e, "PidTagAttachMimeTag", "Attachment MIME type" }, { 0x370f, 0x0102, "PidTagAttachAdditionalInformation", "Attachment encoding information" }, { 0x3710, 0x0003, "PidTagAttachMimeSequence", "Attachment MIME sequence number" }, { 0x3711, 0x001e, "PidTagAttachContentBase", "Attachment MIME content base header URI" }, { 0x3712, 0x001e, "PidTagAttachContentId", "Attachment MIME content identifier header" }, { 0x3713, 0x001e, "PidTagAttachContentLocation", "Attachment MIME content location header" }, { 0x3714, 0x0003, "PidTagAttachFlags", "Attachment flags" }, { 0x3716, 0x001e, "PR_ATTACH_CONTENT_DISPOSITION", "" }, { 0x3719, 0x001e, "PidTagAttachPayloadProviderGuidString", "Attachment MIME X-Payload-Provider-Guid header" }, { 0x371a, 0x001e, "PidTagAttachPayloadClass", "Attachment MIME X-Payload-Class header" }, { 0x371b, 0x001e, "PidTagTextAttachmentCharset", "Attachment character set" }, { 0x3880, 0x0102, "PR_SYNCEVENT_SUPPRESS_GUID", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The address book property type (0x3900 - 0x39ff) */ libfmapi_property_type_t libfmapi_address_book_property_types[ ] = { { 0x3900, 0x0003, "PidTagDisplayType", "Icon display type" }, { 0x3902, 0x0102, "PidTagTemplateid", "Service provider template entry identifier" }, { 0x3904, 0x0102, "PidTagPrimaryCapability", "Primary capability" }, { 0x3905, 0x0003, "PidTagDisplayTypeEx", "Extended icon display type" }, { 0x39fe, 0x001e, "PidTagSmtpAddress", "SMTP address" }, { 0x39ff, 0x001e, "PidTag7BitDisplayName", "Messaging username" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The messaging user property type (0x3a00 - 0x3bff) */ libfmapi_property_type_t libfmapi_messaging_user_property_types[ ] = { { 0x3a00, 0x001e, "PidTagAccount", "Recipient account name" }, { 0x3a01, 0x0102, "PidTagAlternateRecipient", "Alternate recipient entry identifiers" }, { 0x3a02, 0x001e, "PidTagCallbackTelephoneNumber", "Callback telephone number" }, { 0x3a03, 0x000b, "PidTagConversionProhibited", "Conversation prohibited" }, { 0x3a04, 0x000b, "PR_DISCLOSE_RECIPIENTS", "Disclose recipient" }, { 0x3a05, 0x001e, "PidTagGeneration", "Generational abbreviation" }, { 0x3a06, 0x001e, "PidTagGivenName", "Given name" }, { 0x3a07, 0x001e, "PidTagGovernmentIdNumber", "Government identifier" }, { 0x3a08, 0x001e, "PidTagBusinessTelephoneNumber", "Business (office) phone number" }, { 0x3a09, 0x001e, "PidTagHomeTelephoneNumber", "Home phone number" }, { 0x3a0a, 0x001e, "PidTagInitials", "Initials" }, { 0x3a0b, 0x001e, "PidTagKeyword", "Recipient identification keyword" }, { 0x3a0c, 0x001e, "PidTagLanguage", "Language" }, { 0x3a0d, 0x001e, "PidTagLocation", "Location" }, { 0x3a0e, 0x000b, "PidTagMailPermission", "Permitted to send/receive messaged" }, { 0x3a0f, 0x001e, "PidTagMessageHandlingSystemCommonName", "Message handling system (MHS) common name" }, { 0x3a10, 0x001e, "PidTagOrganizationalIdNumber", "Organizational identification number" }, { 0x3a11, 0x001e, "PidTagSurname", "Surname" }, { 0x3a12, 0x0102, "PidTagOriginalEntryId", "Original entry identifier" }, { 0x3a13, 0x001e, "PidTagOriginalDisplayName", "Original display name" }, { 0x3a14, 0x0102, "PidTagOriginalSearchKey", "Original search key" }, { 0x3a15, 0x001e, "PidTagPostalAddress", "Postal address" }, { 0x3a16, 0x001e, "PidTagCompanyName", "Company name" }, { 0x3a17, 0x001e, "PidTagTitle", "Job title" }, { 0x3a18, 0x001e, "PidTagDepartmentName", "Department name" }, { 0x3a19, 0x001e, "PidTagOfficeLocation", "Office location" }, { 0x3a1a, 0x001e, "PidTagPrimaryTelephoneNumber", "Primary phone number" }, { 0x3a1b, 0x001e, "PidTagBusiness2TelephoneNumber", "Secondary business (office) phone number" }, { 0x3a1c, 0x001e, "PidTagMobileTelephoneNumber", "Mobile phone number" }, { 0x3a1d, 0x001e, "PidTagRadioTelephoneNumber", "Radio phone number" }, { 0x3a1e, 0x001e, "PidTagCarTelephoneNumber", "Car phone number" }, { 0x3a1f, 0x001e, "PidTagOtherTelephoneNumber", "Alternate telephone number" }, { 0x3a20, 0x001e, "PidTagTransmittableDisplayName", "Transmittable display name" }, { 0x3a21, 0x001e, "PidTagPagerTelephoneNumber", "Pager phone number" }, { 0x3a22, 0x0102, "PidTagUserCertificate", "User certificate" }, { 0x3a23, 0x001e, "PidTagPrimaryFaxNumber", "Primary fax number" }, { 0x3a24, 0x001e, "PidTagBusinessFaxNumber", "Business (office) fax number" }, { 0x3a25, 0x001e, "PidTagHomeFaxNumber", "Home fax number" }, { 0x3a26, 0x001e, "PidTagCountry", "Country" }, { 0x3a27, 0x001e, "PidTagLocality", "Locality (town or city)" }, { 0x3a28, 0x001e, "PidTagStateOrProvince", "State or province" }, { 0x3a29, 0x001e, "PidTagStreetAddress", "Street" }, { 0x3a2a, 0x001e, "PidTagPostalCode", "Postal code" }, { 0x3a2b, 0x001e, "PidTagPostOfficeBox", "Post office box" }, { 0x3a2c, 0x001e, "PidTagTelexNumber", "Telex number" }, { 0x3a2d, 0x001e, "PidTagIsdnNumber", "ISDN number" }, { 0x3a2e, 0x001e, "PidTagAssistantTelephoneNumber", "Assistant phone number" }, { 0x3a2f, 0x001e, "PidTagHome2TelephoneNumber", "Secondary home phone number" }, { 0x3a30, 0x001e, "PidTagAssistant", "Assistant name" }, { 0x3a40, 0x000b, "PidTagSendRichInfo", "Can receive rich text (RTF, OLE)" }, { 0x3a41, 0x0040, "PidTagWeddingAnniversary", "Wedding anniversary" }, { 0x3a42, 0x0040, "PidTagBirthday", "Brithday" }, { 0x3a43, 0x001e, "PidTagHobbies", "Hobbies" }, { 0x3a44, 0x001e, "PidTagMiddleName", "Middle name(s)" }, { 0x3a45, 0x001e, "PidTagDisplayNamePrefix", "Display name prefix" }, { 0x3a46, 0x001e, "PidTagProfession", "Profession" }, { 0x3a47, 0x001e, "PidTagPreferredByName", "Preferred name" }, { 0x3a48, 0x001e, "PidTagSpouseName", "Name spouse" }, { 0x3a49, 0x001e, "PidTagComputerNetworkName", "Computer network name" }, { 0x3a4a, 0x001e, "PidTagCustomerId", "Customer identifier" }, { 0x3a4b, 0x001e, "PidTagTtyTddPhoneNumber", "Text telephone (TTY) or telecommunication device for the deaf (TDD) phone number" }, { 0x3a4c, 0x001e, "PidTagFtpSite", "FTP site" }, { 0x3a4d, 0x0002, "PidTagGender", "Gender" }, { 0x3a4e, 0x001e, "PidTagManagerName", "Name manager" }, { 0x3a4f, 0x001e, "PidTagNickname", "Nickname" }, { 0x3a50, 0x001e, "PidTagPersonalHomePage", "Personal home page" }, { 0x3a51, 0x001e, "PidTagBusinessHomePage", "Business home page" }, { 0x3a52, 0x0048, "PidTagContactVersion", "Contact version" }, { 0x3a53, 0x1102, "PR_CONTACT_ENTRYIDS", "Contact entry identifiers" }, { 0x3a54, 0x101e, "PidTagContactAddressTypes", "Contact address types" }, { 0x3a55, 0x0003, "PR_CONTACT_DEFAULT_ADDRESS_INDEX", "Contact default address index" }, { 0x3a56, 0x101e, "PR_CONTACT_EMAIL_ADDRESSES", "Contact email addresses" }, { 0x3a57, 0x001e, "PidTagCompanyMainTelephoneNumber", "Company main phone number" }, { 0x3a58, 0x101e, "PidTagChildrensNames", "Name(s) of children" }, { 0x3a59, 0x001e, "PidTagHomeAddressCity", "City of home address" }, { 0x3a5a, 0x001e, "PidTagHomeAddressCountry", "Country of home address" }, { 0x3a5b, 0x001e, "PidTagHomeAddressPostalCode", "Postal code of home address" }, { 0x3a5c, 0x001e, "PidTagHomeAddressStateOrProvince", "State or province of home address" }, { 0x3a5d, 0x001e, "PidTagHomeAddressStreet", "Street of home address" }, { 0x3a5e, 0x001e, "PidTagHomeAddressPostOfficeBox", "Post office box of home address" }, { 0x3a5f, 0x001e, "PidTagOtherAddressCity", "City of other address" }, { 0x3a60, 0x001e, "PidTagOtherAddressCountry", "Country of other address" }, { 0x3a61, 0x001e, "PidTagOtherAddressPostalCode", "Postal code of other address" }, { 0x3a62, 0x001e, "PidTagOtherAddressStateOrProvince", "State or province of other address" }, { 0x3a63, 0x001e, "PidTagOtherAddressStreet", "Street of other address" }, { 0x3a64, 0x001e, "PidTagOtherAddressPostOfficeBox", "Post office box of other address" }, { 0x3a70, 0x1102, "PidTagUserX509Certificate", "User X.509 certificate" }, { 0x3a71, 0x0003, "PidTagSendInternetEncoding", "Message encoding preference flags" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The distribution list property type (0x3c00 - 0x3cff) */ libfmapi_property_type_t libfmapi_distribution_list_property_types[ ] = { { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The profile property type (0x3d00 - 0x3dff) */ libfmapi_property_type_t libfmapi_profile_property_types[ ] = { { 0x3d00, 0x0102, "PR_STORE_PROVIDERS", "" }, { 0x3d01, 0x0102, "PR_AB_PROVIDERS", "" }, { 0x3d02, 0x0102, "PR_TRANSPORT_PROVIDERS", "" }, { 0x3d04, 0x000b, "PR_DEFAULT_PROFILE", "" }, { 0x3d05, 0x1102, "PR_AB_SEARCH_PATH", "" }, { 0x3d06, 0x0102, "PR_AB_DEFAULT_DIR", "" }, { 0x3d07, 0x0102, "PR_AB_DEFAULT_PAB", "" }, { 0x3d08, 0x0102, "PR_FILTERING_HOOKS", "" }, { 0x3d09, 0x001e, "PR_SERVICE_NAME", "" }, { 0x3d0a, 0x001e, "PR_SERVICE_DLL_NAME", "" }, { 0x3d0b, 0x001e, "PR_SERVICE_ENTRY_NAME", "" }, { 0x3d0c, 0x0102, "PR_SERVICE_UID", "" }, { 0x3d0d, 0x0102, "PR_SERVICE_EXTRA_UIDS", "" }, { 0x3d0e, 0x0102, "PR_SERVICES", "" }, { 0x3d0f, 0x101e, "PR_SERVICE_SUPPORT_FILES", "" }, { 0x3d10, 0x101e, "PR_SERVICE_DELETE_FILES", "" }, { 0x3d11, 0x0102, "PR_AB_SEARCH_PATH_UPDATE", "" }, { 0x3d12, 0x001e, "PR_PROFILE_NAME", "" }, { 0x3d13, 0x001e, "PR_SERVICE_INSTALL_ID", "" }, { 0x3d21, 0x0102, "ptagAdminNTSD", "Administrator permissions (NT security descriptor)" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The status object property type (0x3e00 - 0x3fff) */ libfmapi_property_type_t libfmapi_status_object_property_types[ ] = { { 0x3e00, 0x001e, "PR_IDENTITY_DISPLAY", "" }, { 0x3e01, 0x0102, "PR_IDENTITY_ENTRYID", "" }, { 0x3e02, 0x0003, "PR_RESOURCE_METHODS", "" }, { 0x3e03, 0x0003, "PR_RESOURCE_TYPE", "" }, { 0x3e04, 0x0003, "PR_STATUS_CODE", "" }, { 0x3e05, 0x0102, "PR_IDENTITY_SEARCH_KEY", "" }, { 0x3e06, 0x0102, "PR_OWN_STORE_ENTRYID", "" }, { 0x3e07, 0x001e, "PR_RESOURCE_PATH", "" }, { 0x3e08, 0x001e, "PR_STATUS_STRING", "" }, { 0x3e09, 0x000b, "PR_X400_DEFERRED_DELIVERY_CANCEL", "" }, { 0x3e0a, 0x0102, "PR_HEADER_FOLDER_ENTRYID", "" }, { 0x3e0b, 0x0003, "PR_REMOTE_PROGRESS", "" }, { 0x3e0c, 0x001e, "PR_REMOTE_PROGRESS_TEXT", "" }, { 0x3e0d, 0x000b, "PR_REMOTE_VALIDATE_OK", "" }, { 0x3f00, 0x0003, "PR_CONTROL_FLAGS", "Dialog box control behavior flags" }, { 0x3f01, 0x0102, "PR_CONTROL_STRUCTURE", "Dialog box control structure" }, { 0x3f02, 0x0003, "PR_CONTROL_TYPE", "Dialog box control type" }, { 0x3f03, 0x0003, "PR_DELTAX", "Dialog box control width" }, { 0x3f04, 0x0003, "PR_DELTAY", "Dialog box control height" }, { 0x3f05, 0x0003, "PR_XPOS", "Dialog box control left x coordinate" }, { 0x3f06, 0x0003, "PR_YPOS", "Dialog box control upper y coordinate" }, { 0x3f07, 0x0102, "PR_CONTROL_ID", "Dialog box control identifier" }, { 0x3f08, 0x0003, "PR_INITIAL_DETAILS_PANE", "Initial property page" }, { 0x3f80, 0x0014, "PR_DID", "" }, { 0x3f81, 0x0014, "PR_SEQID", "" }, { 0x3f82, 0x0014, "PR_DRAFTID", "" }, { 0x3f83, 0x0040, "PR_CHECK_IN_TIME", "" }, { 0x3f84, 0x001e, "PR_CHECK_IN_COMMENT", "" }, { 0x3f85, 0x0003, "PR_VERSION_OP_CODE", "" }, { 0x3f86, 0x0102, "PR_VERSION_OP_DATA", "" }, { 0x3f87, 0x0003, "PR_VERSION_SEQUENCE_NUMBER", "" }, { 0x3f88, 0x0014, "PR_ATTACH_ID", "" }, { 0x3f8d, 0x001e, "PR_PKM_DOC_STATUS", "" }, { 0x3f8e, 0x101e, "PR_MV_PKM_OPERATION_REQ", "" }, { 0x3f8f, 0x001e, "PR_PKM_DOC_INTERNAL_STATE", "" }, { 0x3f90, 0x0002, "PR_VERSIONING_FLAGS", "" }, { 0x3f91, 0x0102, "PR_PKM_LAST_UNAPPROVED_VID", "" }, { 0x3f92, 0x101e, "PR_MV_PKM_VERSION_LABELS", "" }, { 0x3f93, 0x101e, "PR_MV_PKM_VERSION_STATUS", "" }, { 0x3f94, 0x0102, "PR_PKM_INTERNAL_DATA", "" }, { 0x3fc9, 0x0102, "PR_LAST_CONFLICT", "" }, { 0x3fca, 0x0102, "PR_CONFLICT_MSG_KEY", "" }, { 0x3fd0, 0x0102, "PR_REPL_HEADER", "" }, { 0x3fd1, 0x0102, "PR_REPL_STATUS", "" }, { 0x3fd2, 0x0102, "PR_REPL_CHANGES", "" }, { 0x3fd3, 0x0102, "PR_REPL_RGM", "" }, { 0x3fd4, 0x0102, "PR_RMI", "" }, { 0x3fd5, 0x0102, "PR_INTERNAL_POST_REPLY", "" }, { 0x3fd6, 0x0040, "PR_NTSD_MODIFICATION_TIME", "" }, { 0x3fd8, 0x001e, "PR_PREVIEW_UNREAD", "" }, { 0x3fd9, 0x001e, "PR_PREVIEW", "" }, { 0x3fda, 0x001e, "PR_ABSTRACT", "" }, { 0x3fdb, 0x0003, "PR_DL_REPORT_FLAGS", "" }, { 0x3fdc, 0x0102, "PR_BILATERAL_INFO", "" }, { 0x3fdd, 0x0003, "PR_MSG_BODY_ID", "" }, { 0x3fde, 0x0003, "PidTagInternetCodepage", "Message body codepage" }, { 0x3fdf, 0x0003, "PidTagAutoResponseSuppress", "Suppress auto response" }, { 0x3fe0, 0x000d, "PR_ACL_TABLE", "Access control list table object" }, { 0x3fe0, 0x0102, "PR_ACL_DATA", "Access control list data" }, { 0x3fe1, 0x000d, "PidTagRulesTable", "Folder rules table object" }, { 0x3fe1, 0x0102, "PidTagRulesData", "Folder rules table data" }, { 0x3fe2, 0x0003, "PR_FOLDER_DESIGN_FLAGS", "" }, { 0x3fe3, 0x000b, "PR_DELEGATED_BY_RULE", "" }, { 0x3fe4, 0x000b, "PR_DESIGN_IN_PROGRESS", "" }, { 0x3fe5, 0x000b, "PR_SECURE_ORIGINATION", "" }, { 0x3fe6, 0x000b, "PR_PUBLISH_IN_ADDRESS_BOOK", "" }, { 0x3fe7, 0x0003, "PidTagResolveMethod", "Conflict resolution method" }, { 0x3fe8, 0x001e, "PR_ADDRESS_BOOK_DISPLAY_NAME", "" }, { 0x3fe9, 0x0003, "PR_EFORMS_LOCALE_ID", "" }, { 0x3fea, 0x000b, "PR_HAS_DAMS", "" }, { 0x3feb, 0x0003, "PR_DEFERRED_SEND_NUMBER", "" }, { 0x3fec, 0x0003, "PR_DEFERRED_SEND_UNITS", "" }, { 0x3fed, 0x0003, "PR_EXPIRY_NUMBER", "" }, { 0x3fee, 0x0003, "PR_EXPIRY_UNITS", "" }, { 0x3fef, 0x0040, "PR_DEFERRED_SEND_TIME", "" }, { 0x3ff0, 0x0102, "PidTagConflictEntryId", "Conflict entry identifier" }, { 0x3ff1, 0x0003, "PidTagMessageLocaleId", "Message locale identifier" }, { 0x3ff2, 0x0102, "PR_RULE_TRIGGER_HISTORY", "" }, { 0x3ff3, 0x0102, "PR_MOVE_TO_STORE_ENTRYID", "" }, { 0x3ff4, 0x0102, "PR_MOVE_TO_FOLDER_ENTRYID", "" }, { 0x3ff5, 0x0003, "PR_STORAGE_QUOTA_LIMIT", "" }, { 0x3ff6, 0x0003, "PR_EXCESS_STORAGE_USED", "" }, { 0x3ff7, 0x001e, "PR_SVR_GENERATING_QUOTA_MSG", "" }, { 0x3ff8, 0x001e, "PR_CREATOR_NAME", "Creator name" }, { 0x3ff9, 0x0102, "PR_CREATOR_ENTRYID", "Creator entry identifier" }, { 0x3ffa, 0x001e, "PR_LAST_MODIFIER_NAME", "Last modifier name" }, { 0x3ffb, 0x0102, "PR_LAST_MODIFIER_ENTRYID", "Last modifier entry identifier" }, { 0x3ffc, 0x001e, "PR_REPLY_RECIPIENT_SMTP_PROXIES", "" }, { 0x3ffd, 0x0003, "PidTagMessageCodepage", "Message codepage" }, { 0x3ffe, 0x0102, "PR_EXTENDED_ACL_DATA", "" }, { 0x3fff, 0x000b, "PR_FROM_I_HAVE", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The transport provider message envelope property type (0x4000 - 0x57ff) */ libfmapi_property_type_t libfmapi_transport_provider_message_envelope_property_types[ ] = { { 0x4000, 0x0003, "PR_NEW_ATTACH", "" }, { 0x4001, 0x0003, "PR_START_EMBED", "" }, { 0x4002, 0x0003, "PR_END_EMBED", "" }, { 0x4003, 0x0003, "PR_START_RECIP", "" }, { 0x4004, 0x0003, "PR_END_RECIP", "" }, { 0x4005, 0x0003, "PR_END_CC_RECIP", "" }, { 0x4006, 0x0003, "PR_END_BCC_RECIP", "" }, { 0x4007, 0x0003, "PR_END_P1_RECIP", "" }, { 0x4009, 0x0003, "PR_START_TOP_FLD", "" }, { 0x400a, 0x0003, "PR_START_SUB_FLD", "" }, { 0x400b, 0x0003, "PR_END_FOLDER", "" }, { 0x400c, 0x0003, "PR_START_MESSAGE", "" }, { 0x400d, 0x0003, "PR_END_MESSAGE", "" }, { 0x400e, 0x0003, "PR_END_ATTACH", "" }, { 0x400f, 0x0003, "PR_EC_WARNING", "" }, { 0x4010, 0x0003, "PR_START_FAI_MSG", "" }, { 0x4011, 0x0102, "PR_NEW_FX_FOLDER", "" }, { 0x4012, 0x0003, "PR_INCR_SYNC_CHG", "" }, { 0x4013, 0x0003, "PR_INCR_SYNC_DEL", "" }, { 0x4014, 0x0003, "PR_INCR_SYNC_END", "" }, { 0x4015, 0x0003, "PR_INCR_SYNC_MSG", "" }, { 0x4016, 0x0003, "PR_FX_DEL_PROP", "" }, { 0x4017, 0x0003, "PR_IDSET_GIVEN", "" }, { 0x4019, 0x0003, "PR_SENDER_FLAGS", "Sender flags" }, { 0x401a, 0x0003, "PR_SENT_REPRESENTING_FLAGS", "Sent representing flags" }, { 0x401b, 0x0003, "PR_RCVD_BY_FLAGS", "Received by flags" }, { 0x401c, 0x0003, "PR_RCVD_REPRESENTING_FLAGS", "Received representing flags" }, { 0x401d, 0x0003, "PR_ORIGINAL_SENDER_FLAGS", "Original sender flags" }, { 0x401e, 0x0003, "PR_ORIGINAL_SENT_REPRESENTING_FLAGS", "Original sent representing flags" }, { 0x401f, 0x0003, "PR_REPORT_FLAGS", "" }, { 0x4020, 0x0003, "PR_READ_RECEIPT_FLAGS", "" }, { 0x4021, 0x000b, "PR_SOFT_DELETES", "" }, { 0x402c, 0x0102, "PR_MESSAGE_SUBMISSION_ID_FROM_CLIENT", "" }, { 0x4030, 0x001e, "PR_SENDER_SIMPLE_DISP_NAME", "" }, { 0x4031, 0x001e, "PR_SENT_REPRESENTING_SIMPLE_DISP_NAME", "" }, { 0x4038, 0x001e, "PR_CREATOR_SIMPLE_DISP_NAME", "" }, { 0x403d, 0x001e, "PR_ORG_ADDR_TYPE", "Original address type" }, { 0x403e, 0x001e, "PR_ORG_EMAIL_ADDR", "Original e-mail address" }, { 0x4059, 0x0003, "PR_CREATOR_FLAGS", "" }, { 0x405a, 0x0003, "PR_MODIFIER_FLAGS", "" }, { 0x405b, 0x0003, "PR_ORIGINATOR_FLAGS", "" }, { 0x405c, 0x0003, "PR_REPORT_DESTINATION_FLAGS", "" }, { 0x405d, 0x0003, "PR_ORIGINAL_AUTHOR_FLAGS", "Original author flags" }, { 0x4061, 0x0102, "PR_ORIGINATOR_SEARCH_KEY", "" }, { 0x4064, 0x0102, "PR_REPORT_DESTINATION_SEARCH_KEY", "" }, { 0x4065, 0x0003, "PR_ER_FLAG", "" }, { 0x4068, 0x0102, "PR_INTERNET_SUBJECT", "" }, { 0x4069, 0x0102, "PR_INTERNET_SENT_REPRESENTING_NAME", "" }, { 0x4076, 0x0003, "PR_CONTENT_FILTER_SCL", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The transport provider recipient property type (0x5800 - 0x5fff) */ libfmapi_property_type_t libfmapi_transport_provider_recipient_property_types[ ] = { { 0x5902, 0x0003, "PR_INET_MAIL_OVERRIDE_FORMAT", "" }, { 0x5909, 0x0003, "PidTagMessageEditorFormat", "Message editor format" }, { 0x5ff6, 0x001e, "PR_RECIPIENT_DISPLAY_NAME", "" }, { 0x5ff7, 0x0102, "PR_RECIPIENT_ENTRYID", "" }, { 0x5ffb, 0x0040, "PR_RECIPIENT_TRACKSTATUS_ME", "" }, { 0x5ffd, 0x0003, "PR_RECIPIENTS_FLAGS", "" }, { 0x5fff, 0x0003, "PR_RECIPIENT_TRACKSTATUS", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The client non-transmittable message property type (0x6000 - 0x65ff) */ libfmapi_property_type_t libfmapi_client_non_transmittable_message_property_types[ ] = { { 0x6001, 0x0003, "PR_DOTSTUFF_STATE", "" }, { 0x6001, 0x001e, "", "Alias" }, { 0x65a0, 0x0014, "PR_RULE_SERVER_RULE_ID", "" }, { 0x65c2, 0x0102, "PR_REPLY_TEMPLATE_ID", "" }, { 0x65c6, 0x0003, "PidTagSecureSubmitFlags", "Secure submit flags" }, { 0x65e0, 0x0102, "PidTagSourceKey", "Source key" }, { 0x65e1, 0x0102, "PidTagParentSourceKey", "Parent source key" }, { 0x65e2, 0x0102, "PidTagChangeKey", "Change key" }, { 0x65e3, 0x0102, "PidTagPredecessorChangeList", "Predecessor change list" }, { 0x65e4, 0x0003, "PR_SYNCHRONIZE_FLAGS", "" }, { 0x65e5, 0x000b, "PR_AUTO_ADD_NEW_SUBS", "" }, { 0x65e6, 0x000b, "PR_NEW_SUBS_GET_AUTO_ADD", "" }, { 0x65e7, 0x001e, "PR_MESSAGE_SITE_NAME", "" }, { 0x65e8, 0x000b, "PR_MESSAGE_PROCESSED", "" }, { 0x65e9, 0x0003, "PR_RULE_MSG_STATE", "" }, { 0x65ea, 0x0003, "PR_RULE_MSG_USER_FLAGS", "" }, { 0x65eb, 0x001e, "PR_RULE_MSG_PROVIDER", "" }, { 0x65ec, 0x001e, "PR_RULE_MSG_NAME", "" }, { 0x65ed, 0x0003, "PR_RULE_MSG_LEVEL", "" }, { 0x65ee, 0x0102, "PR_RULE_MSG_PROVIDER_DATA", "" }, { 0x65ef, 0x0102, "PR_RULE_MSG_ACTIONS", "" }, { 0x65f0, 0x0102, "PR_RULE_MSG_CONDITION", "" }, { 0x65f1, 0x0003, "PR_RULE_MSG_CONDITION_LCID", "" }, { 0x65f2, 0x0002, "PR_RULE_MSG_VERSION", "" }, { 0x65f3, 0x0003, "PR_RULE_MSG_SEQUENCE", "" }, { 0x65f4, 0x000b, "PR_PREVENT_MSG_CREATE", "" }, { 0x65f5, 0x0040, "PR_IMAP_INTERNAL_DATE", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The service provider non-transmittable property type (0x6600 - 0x67ef) */ libfmapi_property_type_t libfmapi_service_provider_non_transmittable_property_types[ ] = { { 0x6600, 0x0003, "PR_PROFILE_VERSION", "" }, { 0x6601, 0x0003, "PR_PROFILE_CONFIG_FLAGS", "" }, { 0x6602, 0x001e, "PR_PROFILE_HOME_SERVER", "" }, { 0x6603, 0x001e, "PR_PROFILE_USER", "" }, { 0x6604, 0x0003, "PR_PROFILE_CONNECT_FLAGS", "Profile connection flags" }, { 0x6605, 0x0003, "PR_PROFILE_TRANSPORT_FLAGS", "" }, { 0x6606, 0x0003, "PR_PROFILE_UI_STATE", "" }, { 0x6607, 0x001e, "PR_PROFILE_UNRESOLVED_NAME", "" }, { 0x6608, 0x001e, "PR_PROFILE_UNRESOLVED_SERVER", "" }, { 0x6609, 0x0003, "PR_PROFILE_OPEN_FLAGS", "" }, { 0x6609, 0x001e, "PR_PROFILE_BINDING_ORDER", "" }, { 0x660a, 0x0003, "PR_PROFILE_TYPE", "" }, { 0x660b, 0x001e, "PR_PROFILE_MAILBOX", "" }, { 0x660c, 0x001e, "PR_PROFILE_SERVER", "" }, { 0x660d, 0x0003, "PR_PROFILE_MAX_RESTRICT", "" }, { 0x660e, 0x001e, "PR_PROFILE_AB_FILES_PATH", "" }, { 0x660f, 0x001e, "PR_PROFILE_FAVFLD_DISPLAY_NAME", "" }, { 0x6610, 0x001e, "PR_PROFILE_OFFLINE_STORE_PATH", "" }, { 0x6611, 0x0003, "PidTagContactAddressBookStoreSupportMask", "Contact address book store support flags" }, { 0x6611, 0x0102, "PR_PROFILE_OFFLINE_INFO", "" }, { 0x6612, 0x001e, "PR_PROFILE_HOME_SERVER_DN", "" }, { 0x6613, 0x101e, "PR_PROFILE_HOME_SERVER_ADDRS", "" }, { 0x6614, 0x001e, "PR_PROFILE_SERVER_DN", "" }, { 0x6615, 0x001e, "PR_PROFILE_FAVFLD_COMMENT", "" }, { 0x6616, 0x001e, "PR_PROFILE_ALLPUB_DISPLAY_NAME", "" }, { 0x6617, 0x001e, "PR_PROFILE_ALLPUB_COMMENT", "" }, { 0x6618, 0x0003, "PR_DISABLE_WINSOCK", "" }, { 0x6618, 0x000b, "PR_IN_TRANSIT", "" }, { 0x6619, 0x0003, "PR_PROFILE_AUTH_PACKAGE", "" }, { 0x6619, 0x001e, "PidTagPstBodyPrefix", "Body prefix" }, { 0x6619, 0x0102, "PR_USER_ENTRYID", "" }, { 0x661a, 0x001e, "PR_USER_NAME", "" }, { 0x661b, 0x0102, "PR_MAILBOX_OWNER_ENTRYID", "" }, { 0x661c, 0x001e, "PR_MAILBOX_OWNER_NAME", "" }, { 0x661d, 0x0003, "PidTagPstBestBodyProptag", "" }, { 0x661d, 0x000b, "PR_OOF_STATE", "" }, { 0x661e, 0x0102, "PR_SCHEDULE_FOLDER_ENTRYID", "" }, { 0x661f, 0x0102, "PR_IPM_DAF_ENTRYID", "" }, { 0x6620, 0x0102, "PidTagNonIpmSubtreeEntryId", "Non-IPM subtree entry identifier" }, { 0x6620, 0x1102, "PidTagContactAddressBookFolderEntryIds", "Contact address book entry identifiers" }, { 0x6621, 0x0102, "PR_EFORMS_REGISTRY_ENTRYID", "" }, { 0x6621, 0x1102, "PidTagContactAddressBookStoreSupportMasks", "Contact address book store support flags" }, { 0x6622, 0x0102, "PR_SPLUS_FREE_BUSY_ENTRYID", "" }, { 0x6623, 0x0003, "PR_ROH_FLAGS", "RPC over HTTP flags" }, { 0x6623, 0x001e, "PR_HIERARCHY_SERVER", "" }, { 0x6623, 0x0102, "PR_OFFLINE_ADDRBOOK_ENTRYID", "" }, { 0x6624, 0x0102, "PR_EFORMS_FOR_LOCALE_ENTRYID", "" }, { 0x6625, 0x0102, "PR_FREE_BUSY_FOR_LOCAL_SITE_ENTRYID", "" }, { 0x6626, 0x0102, "PR_ADDRBOOK_FOR_LOCAL_SITE_ENTRYID", "" }, { 0x6627, 0x0003, "PR_ROH_PROXY_AUTH_SCHEME", "RPC over HTTP proxy authentication scheme" }, { 0x6627, 0x0102, "PR_OFFLINE_MESSAGE_ENTRYID", "" }, { 0x6628, 0x0102, "PR_GW_MTSIN_ENTRYID", "" }, { 0x6629, 0x0102, "PR_GW_MTSOUT_ENTRYID", "" }, { 0x662a, 0x000b, "PR_TRANSFER_ENABLED", "" }, { 0x662b, 0x0102, "PR_TEST_LINE_SPEED", "" }, { 0x662c, 0x000d, "PR_HIERARCHY_SYNCHRONIZER", "" }, { 0x662d, 0x000d, "PR_CONTENTS_SYNCHRONIZER", "" }, { 0x662e, 0x000d, "PR_COLLECTOR", "" }, { 0x662f, 0x000d, "PR_FAST_TRANSFER", "" }, { 0x6630, 0x0102, "PR_IPM_FAVORITES_ENTRYID", "" }, { 0x6631, 0x0102, "PR_IPM_PUBLIC_FOLDERS_ENTRYID", "" }, { 0x6632, 0x000b, "PR_STORE_OFFLINE", "" }, { 0x6633, 0x000b, "PidTagPstLrnorestrictions", "" }, { 0x6634, 0x000d, "PR_CHANGE_ADVISOR", "" }, { 0x6635, 0x0003, "PidTagPstHiddenCount", "Number of hidden items" }, { 0x6635, 0x001e, "PR_FAVORITES_DEFAULT_NAME", "" }, { 0x6636, 0x0003, "PidTagPstHiddenUnread", "Number of unread hidden items" }, { 0x6636, 0x0102, "PR_SYS_CONFIG_FOLDER_ENTRYID", "" }, { 0x6637, 0x0048, "PR_CHANGE_NOTIFICATION_GUID", "" }, { 0x6638, 0x0003, "PR_FOLDER_CHILD_COUNT", "Number of sub folders" }, { 0x6639, 0x0003, "PR_RIGHTS", "" }, { 0x663a, 0x000b, "PidTagHasRules", "Has email rules" }, { 0x663b, 0x0102, "PidTagAddressBookEntryId", "Address book entry identifier" }, { 0x663c, 0x0102, "PR_PUBLIC_FOLDER_ENTRYID", "" }, { 0x663d, 0x0003, "PR_OFFLINE_FLAGS", "" }, { 0x663e, 0x0003, "PidTagHierarchyChangeNumber", "Hierarchy change number" }, { 0x663f, 0x000b, "PR_HAS_MODERATOR_RULES", "" }, { 0x6640, 0x0003, "PR_DELETED_MSG_COUNT", "" }, { 0x6641, 0x0003, "PR_DELETED_FOLDER_COUNT", "" }, { 0x6642, 0x0040, "PR_OLDEST_DELETED_ON", "" }, { 0x6643, 0x0003, "PR_DELETED_ASSOC_MSG_COUNT", "" }, { 0x6644, 0x001e, "PR_REPLICA_SERVER", "" }, { 0x6645, 0x0102, "PR_CLIENT_ACTIONS", "" }, { 0x6646, 0x0102, "PR_DAM_ORIGINAL_ENTRYID", "" }, { 0x6647, 0x000b, "PR_DAM_BACK_PATCHED", "" }, { 0x6648, 0x0003, "PR_RULE_ERROR", "" }, { 0x6649, 0x0003, "PR_RULE_ACTION_TYPE", "" }, { 0x664a, 0x000b, "PR_HAS_NAMED_PROPERTIES", "" }, { 0x664b, 0x0014, "PR_REPLICA_VERSION", "" }, { 0x6650, 0x0003, "PR_RULE_ACTION_NUMBER", "" }, { 0x6651, 0x0102, "PR_RULE_FOLDER_ENTRYID", "" }, { 0x6652, 0x0102, "PR_ACTIVE_USER_ENTRYID", "" }, { 0x6653, 0x0003, "PR_0X400_ENVELOPE_TYPE", "" }, { 0x6654, 0x0040, "PR_MSG_FOLD_TIME", "" }, { 0x6655, 0x0102, "PR_ICS_CHANGE_KEY", "" }, { 0x6658, 0x0003, "PR_GW_ADMIN_OPERATIONS", "" }, { 0x6659, 0x0102, "PR_INTERNET_CONTENT", "" }, { 0x665a, 0x000b, "PR_HAS_ATTACH_FROM_IMAIL", "" }, { 0x665b, 0x001e, "PR_ORIGINATOR_NAME", "" }, { 0x665c, 0x001e, "PR_ORIGINATOR_ADDR", "" }, { 0x665d, 0x001e, "PR_ORIGINATOR_ADDRTYPE", "" }, { 0x665e, 0x0102, "PR_ORIGINATOR_ENTRYID", "" }, { 0x665f, 0x0040, "PR_ARRIVAL_TIME", "" }, { 0x6660, 0x0102, "PR_TRACE_INFO", "" }, { 0x6661, 0x0102, "PR_SUBJECT_TRACE_INFO", "" }, { 0x6662, 0x0003, "PR_RECIPIENT_NUMBER", "" }, { 0x6663, 0x0102, "PR_MTS_SUBJECT_ID", "" }, { 0x6664, 0x001e, "PR_REPORT_DESTINATION_NAME", "" }, { 0x6665, 0x0102, "PR_REPORT_DESTINATION_ENTRYID", "" }, { 0x6666, 0x0102, "PR_CONTENT_SEARCH_KEY", "" }, { 0x6667, 0x0102, "PR_FOREIGN_ID", "" }, { 0x6668, 0x0102, "PR_FOREIGN_REPORT_ID", "" }, { 0x6669, 0x0102, "PR_FOREIGN_SUBJECT_ID", "" }, { 0x666a, 0x0102, "PR_INTERNAL_TRACE_INFO", "" }, { 0x666c, 0x000b, "PR_IN_CONFLICT", "" }, { 0x6670, 0x0102, "PR_LONGTERM_ENTRYID_FROM_TABLE", "" }, { 0x6671, 0x0014, "PR_MEMBER_ID", "" }, { 0x6672, 0x001e, "PR_MEMBER_NAME", "" }, { 0x6673, 0x0003, "PR_MEMBER_RIGHTS", "" }, { 0x6674, 0x0014, "PR_RULE_ID", "" }, { 0x6675, 0x0102, "PR_RULE_IDS", "" }, { 0x6676, 0x0003, "PR_RULE_SEQUENCE", "" }, { 0x6677, 0x0003, "PR_RULE_STATE", "" }, { 0x6678, 0x0003, "PR_RULE_USER_FLAGS", "" }, { 0x6679, 0x00fd, "PR_RULE_CONDITION", "" }, { 0x667b, 0x001e, "PR_PROFILE_MOAB", "" }, { 0x667c, 0x001e, "PR_PROFILE_MOAB_GUID", "" }, { 0x667d, 0x0003, "PR_PROFILE_MOAB_SEQ", "" }, { 0x667f, 0x1102, "PR_IMPLIED_RESTRICTIONS", "" }, { 0x6680, 0x00fe, "PR_RULE_ACTIONS", "" }, { 0x6681, 0x001e, "PR_RULE_PROVIDER", "" }, { 0x6682, 0x001e, "PR_RULE_NAME", "" }, { 0x6683, 0x0003, "PR_RULE_LEVEL", "" }, { 0x6684, 0x0102, "PR_RULE_PROVIDER_DATA", "" }, { 0x6685, 0x0040, "PR_LAST_FULL_BACKUP", "" }, { 0x6687, 0x0102, "PR_PROFILE_ADDR_INFO", "" }, { 0x6689, 0x0102, "PR_PROFILE_OPTIONS_DATA", "" }, { 0x668a, 0x0102, "PR_EVENTS_ROOT_FOLDER_ENTRYID", "" }, { 0x668d, 0x001e, "PR_INBOUND_NEWSFEED_DN", "" }, { 0x668e, 0x001e, "PR_OUTBOUND_NEWSFEED_DN", "" }, { 0x668f, 0x0040, "PidTagDeletedOn", "Soft-deletion time" }, { 0x6690, 0x0003, "PR_REPLICATION_STYLE", "" }, { 0x6691, 0x0102, "PR_REPLICATION_SCHEDULE", "" }, { 0x6692, 0x0003, "PR_REPLICATION_MESSAGE_PRIORITY", "" }, { 0x6693, 0x0003, "PR_OVERALL_MSG_AGE_LIMIT", "" }, { 0x6694, 0x0003, "PR_REPLICATION_ALWAYS_INTERVAL", "" }, { 0x6695, 0x0003, "PR_REPLICATION_MSG_SIZE", "" }, { 0x6696, 0x000b, "PR_IS_NEWSGROUP_ANCHOR", "" }, { 0x6697, 0x000b, "PR_IS_NEWSGROUP", "" }, { 0x6698, 0x0102, "PR_REPLICA_LIST", "" }, { 0x6699, 0x0003, "PR_OVERALL_AGE_LIMIT", "" }, { 0x669a, 0x001e, "PR_INTERNET_CHARSET", "" }, { 0x669b, 0x0014, "PR_DELETED_MESSAGE_SIZE_EXTENDED", "" }, { 0x669c, 0x0014, "PR_DELETED_NORMAL_MESSAGE_SIZE_EXTENDED", "" }, { 0x669d, 0x0014, "PR_DELETED_ASSOC_MESSAGE_SIZE_EXTENDED", "" }, { 0x669e, 0x000b, "PR_SECURE_IN_SITE", "" }, { 0x66a0, 0x001e, "PR_NT_USER_NAME", "" }, { 0x66a1, 0x0003, "PR_LOCALE_ID", "" }, { 0x66a2, 0x0040, "PR_LAST_LOGON_TIME", "" }, { 0x66a3, 0x0040, "PR_LAST_LOGOFF_TIME", "" }, { 0x66a4, 0x0003, "PR_STORAGE_LIMIT_INFORMATION", "" }, { 0x66a5, 0x001e, "PR_NEWSGROUP_COMPONENT", "" }, { 0x66a6, 0x0102, "PR_NEWSFEED_INFO", "" }, { 0x66a7, 0x001e, "PR_INTERNET_NEWSGROUP_NAME", "" }, { 0x66a8, 0x0003, "PR_FOLDER_FLAGS", "" }, { 0x66a9, 0x0040, "PR_LAST_ACCESS_TIME", "" }, { 0x66aa, 0x0003, "PR_RESTRICTION_COUNT", "" }, { 0x66ab, 0x0003, "PR_CATEG_COUNT", "" }, { 0x66ac, 0x0003, "PR_CACHED_COLUMN_COUNT", "" }, { 0x66ad, 0x0003, "PR_NORMAL_MSG_W_ATTACH_COUNT", "" }, { 0x66ae, 0x0003, "PR_ASSOC_MSG_W_ATTACH_COUNT", "" }, { 0x66af, 0x0003, "PR_RECIPIENT_ON_NORMAL_MSG_COUNT", "" }, { 0x66b0, 0x0003, "PR_RECIPIENT_ON_ASSOC_MSG_COUNT", "" }, { 0x66b1, 0x0003, "PR_ATTACH_ON_NORMAL_MSG_COUNT", "" }, { 0x66b2, 0x0003, "PR_ATTACH_ON_ASSOC_MSG_COUNT", "" }, { 0x66b3, 0x0003, "PR_NORMAL_MESSAGE_SIZE", "" }, { 0x66b3, 0x0014, "PR_NORMAL_MESSAGE_SIZE_EXTENDED", "" }, { 0x66b4, 0x0003, "PR_ASSOC_MESSAGE_SIZE", "" }, { 0x66b4, 0x0014, "PR_ASSOC_MESSAGE_SIZE_EXTENDED", "" }, { 0x66b5, 0x001e, "PR_FOLDER_PATHNAME", "" }, { 0x66b6, 0x0003, "PR_OWNER_COUNT", "" }, { 0x66b7, 0x0003, "PR_CONTACT_COUNT", "" }, { 0x66c3, 0x0003, "PR_CODE_PAGE_ID", "" }, { 0x66c4, 0x0003, "PR_RETENTION_AGE_LIMIT", "" }, { 0x66c5, 0x000b, "PR_DISABLE_PERUSER_READ", "Disable per-user read/unread processing" }, { 0x66c6, 0x0102, "PR_INTERNET_PARSE_STATE", "" }, { 0x66c7, 0x0102, "PR_INTERNET_MESSAGE_INFO", "" }, { 0x66fa, 0x0003, "PidTagLatestPstEnsure", "" }, { 0x6700, 0x001e, "PR_PST_PATH", "" }, { 0x6701, 0x000b, "PR_PST_REMEMBER_PW", "" }, { 0x6702, 0x0003, "PR_OST_ENCRYPTION", "" }, { 0x6703, 0x001e, "PR_PST_PW_SZ_OLD", "" }, { 0x6704, 0x001e, "PR_PST_PW_SZ_NEW", "" }, { 0x6705, 0x0003, "PR_SORT_LOCALE_ID", "" }, { 0x6705, 0x000b, "PidTagPstImpsubtreeDescendant", "" }, { 0x6707, 0x001e, "PidTagUrlName", "Object URL" }, { 0x6709, 0x0040, "PidTagLocalCommitTime", "Local commit time" }, { 0x670a, 0x0040, "PR_LOCAL_COMMIT_TIME_MAX", "" }, { 0x670b, 0x0003, "PR_DELETED_COUNT_TOTAL", "Total deleted item count" }, { 0x670c, 0x0048, "PR_AUTO_RESET", "" }, { 0x6710, 0x0003, "PR_URL_COMP_NAME_HASH", "" }, { 0x6711, 0x0003, "PR_MSG_FOLDER_TEMPLATE_RES_2", "" }, { 0x6712, 0x0003, "PR_RANK", "" }, { 0x6713, 0x000b, "PR_MSG_FOLDER_TEMPLATE_RES_4", "" }, { 0x6714, 0x000b, "PR_MSG_FOLDER_TEMPLATE_RES_5", "" }, { 0x6715, 0x000b, "PR_MSG_FOLDER_TEMPLATE_RES_6", "" }, { 0x6716, 0x0102, "PR_MSG_FOLDER_TEMPLATE_RES_7", "" }, { 0x6717, 0x0102, "PR_MSG_FOLDER_TEMPLATE_RES_8", "" }, { 0x6718, 0x0102, "PR_MSG_FOLDER_TEMPLATE_RES_9", "" }, { 0x6719, 0x001e, "PR_MSG_FOLDER_TEMPLATE_RES_10", "" }, { 0x671a, 0x001e, "PR_MSG_FOLDER_TEMPLATE_RES_11", "" }, { 0x671b, 0x001e, "PR_MSG_FOLDER_TEMPLATE_RES_12", "" }, { 0x671e, 0x000b, "PR_PF_PLATINUM_HOME_MDB", "" }, { 0x671f, 0x000b, "PR_PF_PROXY_REQUIRED", "" }, { 0x6720, 0x0102, "PR_INTERNET_FREE_DOC_INFO", "" }, { 0x6721, 0x0003, "PR_PF_OVER_HARD_QUOTA_LIMIT", "" }, { 0x6722, 0x0003, "PR_PF_MSG_SIZE_LIMIT", "" }, { 0x6743, 0x0003, "PR_CONNECTION_MODULUS", "" }, { 0x6743, 0x0014, "PR_CONNECTION_MODULUS_EXTENDED", "" }, { 0x6744, 0x001e, "PR_DELIVER_TO_DN", "" }, { 0x6746, 0x0003, "PR_MIME_SIZE", "" }, { 0x6747, 0x0014, "PR_FILE_SIZE_EXTENDED", "" }, { 0x6748, 0x0014, "PidTagFolderId", "Folder identifier" }, { 0x6749, 0x0014, "PidTagParentFolderId", "Parent folder identifier" }, { 0x674a, 0x0014, "PidTagMid", "Message identifier" }, { 0x674b, 0x0014, "PR_CATEG_ID", "Exchange category identifier" }, { 0x674c, 0x0014, "PR_PARENT_CATEG_ID", "Exchange parent category identifier" }, { 0x674d, 0x0014, "PR_INST_ID", "" }, { 0x674e, 0x0003, "PR_INSTANCE_NUM", "" }, { 0x674f, 0x0014, "PR_ADDRBOOK_MID", "" }, { 0x6750, 0x0003, "PR_ICS_NOTIF", "" }, { 0x6751, 0x0003, "PR_ARTICLE_NUM_NEXT", "" }, { 0x6752, 0x0003, "PR_IMAP_LAST_ARTICLE_ID", "" }, { 0x6753, 0x000b, "PR_NOT_822_RENDERABLE", "" }, { 0x6758, 0x0102, "PR_LTID", "" }, { 0x6759, 0x0102, "PR_CN_EXPORT", "" }, { 0x675a, 0x0102, "PR_PCL_EXPORT", "" }, { 0x675b, 0x1102, "PR_CN_MV_EXPORT", "" }, { 0x6764, 0x0014, "", "Exchange mailbox identifier" }, { 0x6770, 0x0003, "PidTagPstConfigurationFlags", "Personal storage table configuration flags" }, { 0x6772, 0x0003, "PidTagPstSubtreeContainer", "" }, { 0x6779, 0x0003, "PR_PF_QUOTA_STYLE", "" }, { 0x677b, 0x0003, "PR_PF_STORAGE_QUOTA", "" }, { 0x6783, 0x0003, "PR_SEARCH_FLAGS", "" }, { 0x6783, 0x0102, "PR_USER_SID", "" }, { 0x6796, 0x0102, "PidTagCnsetSeen", "Seen synchronization change number set" }, { 0x67a4, 0x0014, "PidTagChangeNumber", "Synchronization change number" }, { 0x67aa, 0x000b, "PR_ASSOCIATED", "" }, { 0x67da, 0x0102, "PidTagCnsetSeenFAI", "Seen folder associated information synchronization change number set" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The secure property type (0x67f0 - 0x67ff) */ libfmapi_property_type_t libfmapi_secure_property_types[ ] = { { 0x67f0, 0x0102, "PR_PROFILE_SECURE_MAILBOX", "" }, { 0x67f1, 0x0003, "PidTagLtpParentNid", "Parent node identifier" }, { 0x67f2, 0x0003, "PidTagLtpRowId", "Row identifier" }, { 0x67f3, 0x0003, "PidTagLtpRowVer", "Row version" }, { 0x67f4, 0x0014, "PRQ_ID_SECURE4", "" }, { 0x67ff, 0x0003, "PidTagPstPassword", "Password checksum" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The custom message content property type (0x6800 - 0x7bff) */ libfmapi_property_type_t libfmapi_custom_message_content_property_types[ ] = { { 0x6800, 0x001e, "PidTagOfflineAddressBookName", "Offline address book name" }, { 0x6801, 0x0040, "PR_MAILBEAT_REQUEST_SENT", "" }, { 0x6802, 0x001e, "PR_USENET_SITE_NAME", "" }, { 0x6803, 0x000b, "PidTagSendOutlookRecallReport", "Send recall report" }, { 0x6803, 0x0040, "PR_MAILBEAT_REQUEST_RECEIVED", "" }, { 0x6804, 0x0040, "PR_MAILBEAT_REQUEST_PROCESSED", "" }, { 0x6805, 0x0003, "PR_SHUTOFFQUOTA", "" }, { 0x6805, 0x1003, "PidTagOfflineAddressBookTruncatedProperties", "Offline address book truncated properties" }, { 0x6806, 0x0040, "PR_MAILBEAT_REPLY_SENT", "" }, { 0x6807, 0x0040, "PR_MAILBEAT_REPLY_SUBMIT", "" }, { 0x6808, 0x0003, "PidTagOfflineAddressBookFileType", "Offline Address Book file type" }, { 0x6808, 0x0040, "PR_MAILBEAT_REPLY_RECEIVED", "" }, { 0x6809, 0x0040, "PR_MAILBEAT_REPLY_PROCESSED", "" }, { 0x682f, 0x001e, "PidTagMapiFormComposeCommand", "View class" }, { 0x6833, 0x0048, "", "View class" }, { 0x6834, 0x0003, "PR_VIEW_STYLE", "View style" }, { 0x6835, 0x0102, "", "Binary view data" }, { 0x683a, 0x0003, "PR_VIEW_MAJORVERSION", "View major version" }, { 0x683c, 0x0102, "", "XML view data" }, { 0x6842, 0x0102, "PidTagSearchFolderId", "Search folder identifier" }, { 0x6844, 0x101e, "PR_DELEGATES_DISPLAY_NAMES", "" }, { 0x6845, 0x0102, "PR_DELEGATES_ENTRYID", "" }, { 0x6845, 0x1102, "PR_DELEGATES_ENTRYIDS", "" }, { 0x6847, 0x0003, "PR_FREEBUSY_START_RANGE", "" }, { 0x6848, 0x0003, "PidTagSearchFolderEfpFlags", "Extended search folder flags" }, { 0x6849, 0x001e, "PR_FREEBUSY_EMAIL_ADDRESS", "" }, { 0x684f, 0x1003, "PR_FREEBUSY_ALL_MONTHS", "" }, { 0x6850, 0x1102, "PR_FREEBUSY_ALL_EVENTS", "" }, { 0x6851, 0x1003, "PR_FREEBUSY_TENTATIVE_MONTHS", "" }, { 0x6852, 0x1102, "PR_FREEBUSY_TENTATIVE_EVENTS", "" }, { 0x6853, 0x1003, "PR_FREEBUSY_BUSY_MONTHS", "" }, { 0x6854, 0x1102, "PR_FREEBUSY_BUSY_EVENTS", "" }, { 0x6855, 0x1003, "PR_FREEBUSY_OOF_MONTHS", "" }, { 0x6856, 0x1102, "PR_FREEBUSY_OOF_EVENTS", "" }, { 0x6868, 0x0040, "PR_FREEBUSY_LAST_MODIFIED", "" }, { 0x6869, 0x0003, "PR_FREEBUSY_NUM_MONTHS", "" }, { 0x686b, 0x1003, "PR_DELEGATES_SEE_PRIVATE", "" }, { 0x686c, 0x0102, "PR_PERSONAL_FREEBUSY", "" }, { 0x686d, 0x000b, "PR_PROCESS_MEETING_REQUESTS", "" }, { 0x686e, 0x000b, "PR_DECLINE_RECURRING_MEETING_REQUESTS", "" }, { 0x686f, 0x000b, "PR_DECLINE_CONFLICTING_MEETING_REQUESTS", "" }, { 0x7001, 0x0102, "PR_VD_BINARY", "" }, { 0x7002, 0x001e, "PR_VD_STRINGS", "" }, { 0x7003, 0x0003, "PR_VD_FLAGS", "" }, { 0x7004, 0x0102, "PR_VD_LINK_TO", "" }, { 0x7005, 0x0102, "PR_VD_VIEW_FOLDER", "" }, { 0x7006, 0x001e, "PR_VD_NAME", "" }, { 0x7007, 0x0003, "PR_VD_VERSION", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The custom message non-transmittable property type (0x7c00 - 0x7fff) */ libfmapi_property_type_t libfmapi_custom_message_non_transmittable_property_types[ ] = { { 0x7c00, 0x001e, "PR_FAV_DISPLAY_NAME", "" }, { 0x7c02, 0x0102, "PR_FAV_PUBLIC_SOURCE_KEY", "" }, { 0x7c04, 0x0102, "PR_OST_OSTID", "Offline storage table identifier" }, { 0x7c0a, 0x000b, "PR_STORE_SLOWLINK", "" }, { 0x7d01, 0x0003, "PR_FAV_AUTOSUBFOLDERS", "" }, { 0x7d01, 0x000b, "PR_PROCESSED", "" }, { 0x7d02, 0x0102, "PR_FAV_PARENT_SOURCE_KEY", "" }, { 0x7d03, 0x0003, "PR_FAV_LEVEL_MASK", "" }, { 0x7d07, 0x0003, "PR_FAV_INHERIT_AUTO", "" }, { 0x7d08, 0x0102, "PR_FAV_DEL_SUBS", "" }, { 0x7ffa, 0x0003, "PR_ATTACHMENT_LINKID", "Attachment link identifier" }, { 0x7ffb, 0x0040, "PR_EXCEPTION_STARTTIME", "Exception start time" }, { 0x7ffc, 0x0040, "PR_EXCEPTION_ENDTIME", "Exception end time" }, { 0x7ffd, 0x0003, "PR_ATTACHMENT_FLAGS", "Attachment flags" }, { 0x7ffe, 0x000b, "PR_ATTACHMENT_HIDDEN", "Hidden attachment" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The custom named property type (0x8000 - 0xffff) */ libfmapi_property_type_t libfmapi_custom_named_property_types[ ] = { { 0x8001, 0x000b, "PR_EMS_AB_DISPLAY_NAME_OVERRIDE", "" }, { 0x8003, 0x1102, "PR_EMS_AB_CA_CERTIFICATE", "" }, { 0x8004, 0x001e, "PR_EMS_AB_FOLDER_PATHNAME", "" }, { 0x8005, 0x000d, "PR_EMS_AB_MANAGER", "" }, { 0x8005, 0x001e, "PR_EMS_AB_MANAGER_T", "" }, { 0x8006, 0x000d, "PR_EMS_AB_HOME_MDB_O", "" }, { 0x8006, 0x001e, "PR_EMS_AB_HOME_MDB", "" }, { 0x8007, 0x000d, "PR_EMS_AB_HOME_MTA_O", "" }, { 0x8007, 0x001e, "PR_EMS_AB_HOME_MTA", "" }, { 0x8008, 0x000d, "PR_EMS_AB_IS_MEMBER_OF_DL", "" }, { 0x8008, 0x001e, "PR_EMS_AB_IS_MEMBER_OF_DL_T", "" }, { 0x8009, 0x000d, "PR_EMS_AB_MEMBER", "" }, { 0x8009, 0x001e, "PR_EMS_AB_MEMBER_T", "" }, { 0x800a, 0x001e, "PR_EMS_AB_AUTOREPLY_MESSAGE", "" }, { 0x800b, 0x000b, "PR_EMS_AB_AUTOREPLY", "" }, { 0x800c, 0x000d, "PR_EMS_AB_OWNER_O", "" }, { 0x800c, 0x001e, "PR_EMS_AB_OWNER", "" }, { 0x800d, 0x000d, "PR_EMS_AB_KM_SERVER_O", "" }, { 0x800d, 0x001e, "PR_EMS_AB_KM_SERVER", "" }, { 0x800e, 0x000d, "PidTagAddressBookReports", "Address book reports" }, { 0x800f, 0x101e, "PidTagAddressBookProxyAddresses", "Address book proxy addresses" }, { 0x8010, 0x0102, "PR_EMS_AB_HELP_DATA32", "" }, { 0x8011, 0x001e, "PR_EMS_AB_TARGET_ADDRESS", "" }, { 0x8012, 0x101e, "PR_EMS_AB_TELEPHONE_NUMBER", "" }, { 0x8013, 0x0102, "PR_EMS_AB_NT_SECURITY_DESCRIPTOR", "" }, { 0x8014, 0x000d, "PR_EMS_AB_HOME_MDB_BL_O", "" }, { 0x8014, 0x101e, "PR_EMS_AB_HOME_MDB_BL", "" }, { 0x8015, 0x000d, "PR_EMS_AB_PUBLIC_DELEGATES", "" }, { 0x8015, 0x001e, "PR_EMS_AB_PUBLIC_DELEGATES_T", "" }, { 0x8016, 0x0102, "PR_EMS_AB_CERTIFICATE_REVOCATION_LIST", "" }, { 0x8017, 0x0102, "PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE", "" }, { 0x8018, 0x0102, "PR_EMS_AB_ADDRESS_SYNTAX", "" }, { 0x8023, 0x0102, "PR_EMS_AB_BUSINESS_ROLES", "" }, { 0x8024, 0x000d, "PR_EMS_AB_OWNER_BL_O", "" }, { 0x8024, 0x101e, "PR_EMS_AB_OWNER_BL", "" }, { 0x8025, 0x1102, "PR_EMS_AB_CROSS_CERTIFICATE_PAIR", "" }, { 0x8026, 0x1102, "PR_EMS_AB_AUTHORITY_REVOCATION_LIST", "" }, { 0x8027, 0x0102, "PR_EMS_AB_ASSOC_NT_ACCOUNT", "" }, { 0x8028, 0x0040, "PR_EMS_AB_EXPIRATION_TIME", "" }, { 0x8029, 0x0003, "PR_EMS_AB_USN_CHANGED", "" }, { 0x802d, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_1", "" }, { 0x802e, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_2", "" }, { 0x802f, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_3", "" }, { 0x8030, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_4", "" }, { 0x8031, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_5", "" }, { 0x8032, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_6", "" }, { 0x8033, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_7", "" }, { 0x8034, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_8", "" }, { 0x8035, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_9", "" }, { 0x8036, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_10", "" }, { 0x8037, 0x1102, "PR_EMS_AB_SECURITY_PROTOCOL", "" }, { 0x8038, 0x000d, "PR_EMS_AB_PF_CONTACTS_O", "" }, { 0x8038, 0x101e, "PR_EMS_AB_PF_CONTACTS", "" }, { 0x803a, 0x0102, "PR_EMS_AB_HELP_DATA16", "" }, { 0x803b, 0x001e, "PR_EMS_AB_HELP_FILE_NAME", "" }, { 0x803c, 0x000d, "PR_EMS_AB_OBJ_DIST_NAME_O", "" }, { 0x803c, 0x001e, "PidTagAddressBookObjectDistinguishedName", "Address book object distinguished name" }, { 0x803d, 0x001e, "PR_EMS_AB_ENCRYPT_ALG_SELECTED_OTHER", "" }, { 0x803e, 0x001e, "PR_EMS_AB_AUTOREPLY_SUBJECT", "" }, { 0x803f, 0x000d, "PR_EMS_AB_HOME_PUBLIC_SERVER_O", "" }, { 0x803f, 0x001e, "PR_EMS_AB_HOME_PUBLIC_SERVER", "" }, { 0x8040, 0x101e, "PR_EMS_AB_ENCRYPT_ALG_LIST_NA", "" }, { 0x8041, 0x101e, "PR_EMS_AB_ENCRYPT_ALG_LIST_OTHER", "" }, { 0x8042, 0x001e, "PR_EMS_AB_IMPORTED_FROM", "" }, { 0x8043, 0x001e, "PR_EMS_AB_ENCRYPT_ALG_SELECTED_NA", "" }, { 0x8044, 0x0003, "PR_EMS_AB_ACCESS_CATEGORY", "" }, { 0x8045, 0x0102, "PR_EMS_AB_ACTIVATION_SCHEDULE", "" }, { 0x8046, 0x0003, "PR_EMS_AB_ACTIVATION_STYLE", "" }, { 0x8047, 0x0102, "PR_EMS_AB_ADDRESS_ENTRY_DISPLAY_TABLE_MSDOS", "" }, { 0x8048, 0x001e, "PR_EMS_AB_ADDRESS_TYPE", "" }, { 0x8049, 0x001e, "PR_EMS_AB_ADMD", "" }, { 0x804a, 0x001e, "PR_EMS_AB_ADMIN_DESCRIPTION", "" }, { 0x804b, 0x001e, "PR_EMS_AB_ADMIN_DISPLAY_NAME", "" }, { 0x804c, 0x001e, "PR_EMS_AB_ADMIN_EXTENSION_DLL", "" }, { 0x804d, 0x000d, "PR_EMS_AB_ALIASED_OBJECT_NAME_O", "" }, { 0x804d, 0x001e, "PR_EMS_AB_ALIASED_OBJECT_NAME", "" }, { 0x804e, 0x000d, "PR_EMS_AB_ALT_RECIPIENT_O", "" }, { 0x804e, 0x001e, "PR_EMS_AB_ALT_RECIPIENT", "" }, { 0x804f, 0x000d, "PR_EMS_AB_ALT_RECIPIENT_BL_O", "" }, { 0x804f, 0x101e, "PR_EMS_AB_ALT_RECIPIENT_BL", "" }, { 0x8050, 0x0102, "PR_EMS_AB_ANCESTOR_ID", "" }, { 0x8051, 0x000d, "PR_EMS_AB_ASSOC_REMOTE_DXA_O", "" }, { 0x8051, 0x101e, "PR_EMS_AB_ASSOC_REMOTE_DXA", "" }, { 0x8052, 0x0003, "PR_EMS_AB_ASSOCIATION_LIFETIME", "" }, { 0x8053, 0x000d, "PR_EMS_AB_AUTH_ORIG_BL_O", "" }, { 0x8053, 0x101e, "PR_EMS_AB_AUTH_ORIG_BL", "" }, { 0x8054, 0x001e, "PR_EMS_AB_AUTHORIZED_DOMAIN", "" }, { 0x8055, 0x0102, "PR_EMS_AB_AUTHORIZED_PASSWORD", "" }, { 0x8056, 0x001e, "PR_EMS_AB_AUTHORIZED_USER", "" }, { 0x8057, 0x101e, "PR_EMS_AB_BUSINESS_CATEGORY", "" }, { 0x8058, 0x000d, "PR_EMS_AB_CAN_CREATE_PF_O", "" }, { 0x8058, 0x101e, "PR_EMS_AB_CAN_CREATE_PF", "" }, { 0x8059, 0x000d, "PR_EMS_AB_CAN_CREATE_PF_BL_O", "" }, { 0x8059, 0x101e, "PR_EMS_AB_CAN_CREATE_PF_BL", "" }, { 0x805a, 0x000d, "PR_EMS_AB_CAN_CREATE_PF_DL_O", "" }, { 0x805a, 0x101e, "PR_EMS_AB_CAN_CREATE_PF_DL", "" }, { 0x805b, 0x000d, "PR_EMS_AB_CAN_CREATE_PF_DL_BL_O", "" }, { 0x805b, 0x101e, "PR_EMS_AB_CAN_CREATE_PF_DL_BL", "" }, { 0x805c, 0x000d, "PR_EMS_AB_CAN_NOT_CREATE_PF_O", "" }, { 0x805c, 0x101e, "PR_EMS_AB_CAN_NOT_CREATE_PF", "" }, { 0x805d, 0x000d, "PR_EMS_AB_CAN_NOT_CREATE_PF_BL_O", "" }, { 0x805d, 0x101e, "PR_EMS_AB_CAN_NOT_CREATE_PF_BL", "" }, { 0x805e, 0x000d, "PR_EMS_AB_CAN_NOT_CREATE_PF_DL_O", "" }, { 0x805e, 0x101e, "PR_EMS_AB_CAN_NOT_CREATE_PF_DL", "" }, { 0x805f, 0x000d, "PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL_O", "" }, { 0x805f, 0x101e, "PR_EMS_AB_CAN_NOT_CREATE_PF_DL_BL", "" }, { 0x8060, 0x000b, "PR_EMS_AB_CAN_PRESERVE_DNS", "" }, { 0x8061, 0x0003, "PR_EMS_AB_CLOCK_ALERT_OFFSET", "" }, { 0x8062, 0x000b, "PR_EMS_AB_CLOCK_ALERT_REPAIR", "" }, { 0x8063, 0x0003, "PR_EMS_AB_CLOCK_WARNING_OFFSET", "" }, { 0x8064, 0x000b, "PR_EMS_AB_CLOCK_WARNING_REPAIR", "" }, { 0x8065, 0x001e, "PR_EMS_AB_COMPUTER_NAME", "" }, { 0x8066, 0x101e, "PR_EMS_AB_CONNECTED_DOMAINS", "" }, { 0x8067, 0x0003, "PR_EMS_AB_CONTAINER_INFO", "" }, { 0x8068, 0x0003, "PR_EMS_AB_COST", "" }, { 0x8069, 0x001e, "PR_EMS_AB_COUNTRY_NAME", "" }, { 0x806a, 0x0003, "PR_EMS_AB_DELIV_CONT_LENGTH", "" }, { 0x806b, 0x1102, "PR_EMS_AB_DELIV_EITS", "" }, { 0x806c, 0x1102, "PR_EMS_AB_DELIV_EXT_CONT_TYPES", "" }, { 0x806d, 0x000b, "PR_EMS_AB_DELIVER_AND_REDIRECT", "" }, { 0x806e, 0x0003, "PR_EMS_AB_DELIVERY_MECHANISM", "" }, { 0x806f, 0x101e, "PR_EMS_AB_DESCRIPTION", "" }, { 0x8070, 0x101e, "PR_EMS_AB_DESTINATION_INDICATOR", "" }, { 0x8071, 0x001e, "PR_EMS_AB_DIAGNOSTIC_REG_KEY", "" }, { 0x8072, 0x000d, "PR_EMS_AB_DL_MEM_REJECT_PERMS_BL_O", "" }, { 0x8072, 0x101e, "PR_EMS_AB_DL_MEM_REJECT_PERMS_BL", "" }, { 0x8073, 0x000d, "PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL_O", "" }, { 0x8073, 0x101e, "PR_EMS_AB_DL_MEM_SUBMIT_PERMS_BL", "" }, { 0x8074, 0x1102, "PR_EMS_AB_DL_MEMBER_RULE", "" }, { 0x8075, 0x000d, "PR_EMS_AB_DOMAIN_DEF_ALT_RECIP_O", "" }, { 0x8075, 0x001e, "PR_EMS_AB_DOMAIN_DEF_ALT_RECIP", "" }, { 0x8076, 0x001e, "PR_EMS_AB_DOMAIN_NAME", "" }, { 0x8077, 0x0102, "PR_EMS_AB_DSA_SIGNATURE", "" }, { 0x8078, 0x000b, "PR_EMS_AB_DXA_ADMIN_COPY", "" }, { 0x8079, 0x000b, "PR_EMS_AB_DXA_ADMIN_FORWARD", "" }, { 0x807a, 0x0003, "PR_EMS_AB_DXA_ADMIN_UPDATE", "" }, { 0x807b, 0x000b, "PR_EMS_AB_DXA_APPEND_REQCN", "" }, { 0x807c, 0x000d, "PR_EMS_AB_DXA_CONF_CONTAINER_LIST_O", "" }, { 0x807c, 0x101e, "PR_EMS_AB_DXA_CONF_CONTAINER_LIST", "" }, { 0x807d, 0x0040, "PR_EMS_AB_DXA_CONF_REQ_TIME", "" }, { 0x807e, 0x001e, "PR_EMS_AB_DXA_CONF_SEQ", "" }, { 0x807f, 0x0003, "PR_EMS_AB_DXA_CONF_SEQ_USN", "" }, { 0x8080, 0x0003, "PR_EMS_AB_DXA_EXCHANGE_OPTIONS", "" }, { 0x8081, 0x000b, "PR_EMS_AB_DXA_EXPORT_NOW", "" }, { 0x8082, 0x0003, "PR_EMS_AB_DXA_FLAGS", "" }, { 0x8083, 0x001e, "PR_EMS_AB_DXA_IMP_SEQ", "" }, { 0x8084, 0x0040, "PR_EMS_AB_DXA_IMP_SEQ_TIME", "" }, { 0x8085, 0x0003, "PR_EMS_AB_DXA_IMP_SEQ_USN", "" }, { 0x8086, 0x000b, "PR_EMS_AB_DXA_IMPORT_NOW", "" }, { 0x8087, 0x101e, "PR_EMS_AB_DXA_IN_TEMPLATE_MAP", "" }, { 0x8088, 0x000d, "PR_EMS_AB_DXA_LOCAL_ADMIN_O", "" }, { 0x8088, 0x001e, "PR_EMS_AB_DXA_LOCAL_ADMIN", "" }, { 0x8089, 0x0003, "PR_EMS_AB_DXA_LOGGING_LEVEL", "" }, { 0x808a, 0x001e, "PR_EMS_AB_DXA_NATIVE_ADDRESS_TYPE", "" }, { 0x808b, 0x101e, "PR_EMS_AB_DXA_OUT_TEMPLATE_MAP", "" }, { 0x808c, 0x001e, "PR_EMS_AB_DXA_PASSWORD", "" }, { 0x808d, 0x0003, "PR_EMS_AB_DXA_PREV_EXCHANGE_OPTIONS", "" }, { 0x808e, 0x000b, "PR_EMS_AB_DXA_PREV_EXPORT_NATIVE_ONLY", "" }, { 0x808f, 0x0003, "PR_EMS_AB_DXA_PREV_IN_EXCHANGE_SENSITIVITY", "" }, { 0x8090, 0x000d, "PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES_O", "" }, { 0x8090, 0x001e, "PR_EMS_AB_DXA_PREV_REMOTE_ENTRIES", "" }, { 0x8091, 0x0003, "PR_EMS_AB_DXA_PREV_REPLICATION_SENSITIVITY", "" }, { 0x8092, 0x0003, "PR_EMS_AB_DXA_PREV_TEMPLATE_OPTIONS", "" }, { 0x8093, 0x0003, "PR_EMS_AB_DXA_PREV_TYPES", "" }, { 0x8094, 0x001e, "PR_EMS_AB_DXA_RECIPIENT_CP", "" }, { 0x8095, 0x000d, "PR_EMS_AB_DXA_REMOTE_CLIENT_O", "" }, { 0x8095, 0x001e, "PR_EMS_AB_DXA_REMOTE_CLIENT", "" }, { 0x8096, 0x001e, "PR_EMS_AB_DXA_REQ_SEQ", "" }, { 0x8097, 0x0040, "PR_EMS_AB_DXA_REQ_SEQ_TIME", "" }, { 0x8098, 0x0003, "PR_EMS_AB_DXA_REQ_SEQ_USN", "" }, { 0x8099, 0x001e, "PR_EMS_AB_DXA_REQNAME", "" }, { 0x809a, 0x001e, "PR_EMS_AB_DXA_SVR_SEQ", "" }, { 0x809b, 0x0040, "PR_EMS_AB_DXA_SVR_SEQ_TIME", "" }, { 0x809c, 0x0003, "PR_EMS_AB_DXA_SVR_SEQ_USN", "" }, { 0x809d, 0x0003, "PR_EMS_AB_DXA_TASK", "" }, { 0x809e, 0x0003, "PR_EMS_AB_DXA_TEMPLATE_OPTIONS", "" }, { 0x809f, 0x0040, "PR_EMS_AB_DXA_TEMPLATE_TIMESTAMP", "" }, { 0x80a0, 0x0003, "PR_EMS_AB_DXA_TYPES", "" }, { 0x80a1, 0x000d, "PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST_O", "" }, { 0x80a1, 0x101e, "PR_EMS_AB_DXA_UNCONF_CONTAINER_LIST", "" }, { 0x80a2, 0x0003, "PR_EMS_AB_ENCAPSULATION_METHOD", "" }, { 0x80a3, 0x000b, "PR_EMS_AB_ENCRYPT", "" }, { 0x80a4, 0x000b, "PR_EMS_AB_EXPAND_DLS_LOCALLY", "" }, { 0x80a5, 0x000d, "PR_EMS_AB_EXPORT_CONTAINERS_O", "" }, { 0x80a5, 0x101e, "PR_EMS_AB_EXPORT_CONTAINERS", "" }, { 0x80a6, 0x000b, "PR_EMS_AB_EXPORT_CUSTOM_RECIPIENTS", "" }, { 0x80a7, 0x000b, "PR_EMS_AB_EXTENDED_CHARS_ALLOWED", "" }, { 0x80a8, 0x1102, "PR_EMS_AB_EXTENSION_DATA", "" }, { 0x80a9, 0x101e, "PR_EMS_AB_EXTENSION_NAME", "" }, { 0x80aa, 0x101e, "PR_EMS_AB_EXTENSION_NAME_INHERITED", "" }, { 0x80ab, 0x1102, "PR_EMS_AB_FACSIMILE_TELEPHONE_NUMBER", "" }, { 0x80ac, 0x0102, "PR_EMS_AB_FILE_VERSION", "" }, { 0x80ad, 0x000b, "PR_EMS_AB_FILTER_LOCAL_ADDRESSES", "" }, { 0x80ae, 0x000d, "PR_EMS_AB_FOLDERS_CONTAINER_O", "" }, { 0x80ae, 0x001e, "PR_EMS_AB_FOLDERS_CONTAINER", "" }, { 0x80af, 0x0003, "PR_EMS_AB_GARBAGE_COLL_PERIOD", "" }, { 0x80b0, 0x001e, "PR_EMS_AB_GATEWAY_LOCAL_CRED", "" }, { 0x80b1, 0x001e, "PR_EMS_AB_GATEWAY_LOCAL_DESIG", "" }, { 0x80b2, 0x101e, "PR_EMS_AB_GATEWAY_PROXY", "" }, { 0x80b3, 0x0102, "PR_EMS_AB_GATEWAY_ROUTING_TREE", "" }, { 0x80b4, 0x0040, "PR_EMS_AB_GWART_LAST_MODIFIED", "" }, { 0x80b5, 0x000d, "PR_EMS_AB_HAS_FULL_REPLICA_NCS_O", "" }, { 0x80b5, 0x101e, "PR_EMS_AB_HAS_FULL_REPLICA_NCS", "" }, { 0x80b6, 0x000d, "PR_EMS_AB_HAS_MASTER_NCS_O", "" }, { 0x80b6, 0x101e, "PR_EMS_AB_HAS_MASTER_NCS", "" }, { 0x80b7, 0x0003, "PR_EMS_AB_HEURISTICS", "" }, { 0x80b8, 0x000b, "PR_EMS_AB_HIDE_DL_MEMBERSHIP", "" }, { 0x80b9, 0x000b, "PR_EMS_AB_HIDE_FROM_ADDRESS_BOOK", "" }, { 0x80ba, 0x000d, "PR_EMS_AB_IMPORT_CONTAINER_O", "" }, { 0x80ba, 0x001e, "PR_EMS_AB_IMPORT_CONTAINER", "" }, { 0x80bb, 0x0003, "PR_EMS_AB_IMPORT_SENSITIVITY", "" }, { 0x80bc, 0x000d, "PR_EMS_AB_INBOUND_SITES_O", "" }, { 0x80bc, 0x101e, "PR_EMS_AB_INBOUND_SITES", "" }, { 0x80bd, 0x0003, "PR_EMS_AB_INSTANCE_TYPE", "" }, { 0x80be, 0x101e, "PR_EMS_AB_INTERNATIONAL_ISDN_NUMBER", "" }, { 0x80bf, 0x0102, "PR_EMS_AB_INVOCATION_ID", "" }, { 0x80c0, 0x000b, "PR_EMS_AB_IS_DELETED", "" }, { 0x80c1, 0x000b, "PR_EMS_AB_IS_SINGLE_VALUED", "" }, { 0x80c2, 0x1102, "PR_EMS_AB_KCC_STATUS", "" }, { 0x80c3, 0x101e, "PR_EMS_AB_KNOWLEDGE_INFORMATION", "" }, { 0x80c4, 0x0003, "PR_EMS_AB_LINE_WRAP", "" }, { 0x80c5, 0x0003, "PR_EMS_AB_LINK_ID", "" }, { 0x80c6, 0x001e, "PR_EMS_AB_LOCAL_BRIDGE_HEAD", "" }, { 0x80c7, 0x001e, "PR_EMS_AB_LOCAL_BRIDGE_HEAD_ADDRESS", "" }, { 0x80c8, 0x000b, "PR_EMS_AB_LOCAL_INITIAL_TURN", "" }, { 0x80c9, 0x000d, "PR_EMS_AB_LOCAL_SCOPE_O", "" }, { 0x80c9, 0x101e, "PR_EMS_AB_LOCAL_SCOPE", "" }, { 0x80ca, 0x001e, "PR_EMS_AB_LOG_FILENAME", "" }, { 0x80cb, 0x0003, "PR_EMS_AB_LOG_ROLLOVER_INTERVAL", "" }, { 0x80cc, 0x000b, "PR_EMS_AB_MAINTAIN_AUTOREPLY_HISTORY", "" }, { 0x80cd, 0x0003, "PR_EMS_AB_MAPI_DISPLAY_TYPE", "" }, { 0x80ce, 0x0003, "PR_EMS_AB_MAPI_ID", "" }, { 0x80cf, 0x0003, "PR_EMS_AB_MDB_BACKOFF_INTERVAL", "" }, { 0x80d0, 0x0003, "PR_EMS_AB_MDB_MSG_TIME_OUT_PERIOD", "" }, { 0x80d1, 0x0003, "PR_EMS_AB_MDB_OVER_QUOTA_LIMIT", "" }, { 0x80d2, 0x0003, "PR_EMS_AB_MDB_STORAGE_QUOTA", "" }, { 0x80d3, 0x0003, "PR_EMS_AB_MDB_UNREAD_LIMIT", "" }, { 0x80d4, 0x000b, "PR_EMS_AB_MDB_USE_DEFAULTS", "" }, { 0x80d5, 0x000b, "PR_EMS_AB_MESSAGE_TRACKING_ENABLED", "" }, { 0x80d6, 0x000b, "PR_EMS_AB_MONITOR_CLOCK", "" }, { 0x80d7, 0x000b, "PR_EMS_AB_MONITOR_SERVERS", "" }, { 0x80d8, 0x000b, "PR_EMS_AB_MONITOR_SERVICES", "" }, { 0x80d9, 0x000d, "PR_EMS_AB_MONITORED_CONFIGURATIONS_O", "" }, { 0x80d9, 0x101e, "PR_EMS_AB_MONITORED_CONFIGURATIONS", "" }, { 0x80da, 0x000d, "PR_EMS_AB_MONITORED_SERVERS_O", "" }, { 0x80da, 0x101e, "PR_EMS_AB_MONITORED_SERVERS", "" }, { 0x80db, 0x101e, "PR_EMS_AB_MONITORED_SERVICES", "" }, { 0x80dc, 0x0003, "PR_EMS_AB_MONITORING_ALERT_DELAY", "" }, { 0x80dd, 0x0003, "PR_EMS_AB_MONITORING_ALERT_UNITS", "" }, { 0x80de, 0x0003, "PR_EMS_AB_MONITORING_AVAILABILITY_STYLE", "" }, { 0x80df, 0x0102, "PR_EMS_AB_MONITORING_AVAILABILITY_WINDOW", "" }, { 0x80e0, 0x000d, "PR_EMS_AB_MONITORING_CACHED_VIA_MAIL_O", "" }, { 0x80e0, 0x101e, "PR_EMS_AB_MONITORING_CACHED_VIA_MAIL", "" }, { 0x80e1, 0x000d, "PR_EMS_AB_MONITORING_CACHED_VIA_RPC_O", "" }, { 0x80e1, 0x101e, "PR_EMS_AB_MONITORING_CACHED_VIA_RPC", "" }, { 0x80e2, 0x1102, "PR_EMS_AB_MONITORING_ESCALATION_PROCEDURE", "" }, { 0x80e3, 0x0003, "PR_EMS_AB_MONITORING_HOTSITE_POLL_INTERVAL", "" }, { 0x80e4, 0x0003, "PR_EMS_AB_MONITORING_HOTSITE_POLL_UNITS", "" }, { 0x80e5, 0x0003, "PR_EMS_AB_MONITORING_MAIL_UPDATE_INTERVAL", "" }, { 0x80e6, 0x0003, "PR_EMS_AB_MONITORING_MAIL_UPDATE_UNITS", "" }, { 0x80e7, 0x0003, "PR_EMS_AB_MONITORING_NORMAL_POLL_INTERVAL", "" }, { 0x80e8, 0x0003, "PR_EMS_AB_MONITORING_NORMAL_POLL_UNITS", "" }, { 0x80e9, 0x000d, "PR_EMS_AB_MONITORING_RECIPIENTS_O", "" }, { 0x80e9, 0x101e, "PR_EMS_AB_MONITORING_RECIPIENTS", "" }, { 0x80ea, 0x000d, "PR_EMS_AB_MONITORING_RECIPIENTS_NDR_O", "" }, { 0x80ea, 0x101e, "PR_EMS_AB_MONITORING_RECIPIENTS_NDR", "" }, { 0x80eb, 0x0003, "PR_EMS_AB_MONITORING_RPC_UPDATE_INTERVAL", "" }, { 0x80ec, 0x0003, "PR_EMS_AB_MONITORING_RPC_UPDATE_UNITS", "" }, { 0x80ed, 0x0003, "PR_EMS_AB_MONITORING_WARNING_DELAY", "" }, { 0x80ee, 0x0003, "PR_EMS_AB_MONITORING_WARNING_UNITS", "" }, { 0x80ef, 0x001e, "PR_EMS_AB_MTA_LOCAL_CRED", "" }, { 0x80f0, 0x001e, "PR_EMS_AB_MTA_LOCAL_DESIG", "" }, { 0x80f1, 0x0102, "PR_EMS_AB_N_ADDRESS", "" }, { 0x80f2, 0x0003, "PR_EMS_AB_N_ADDRESS_TYPE", "" }, { 0x80f3, 0x001e, "PR_EMS_AB_NT_MACHINE_NAME", "" }, { 0x80f4, 0x0003, "PR_EMS_AB_NUM_OF_OPEN_RETRIES", "" }, { 0x80f5, 0x0003, "PR_EMS_AB_NUM_OF_TRANSFER_RETRIES", "" }, { 0x80f6, 0x0003, "PR_EMS_AB_OBJECT_CLASS_CATEGORY", "" }, { 0x80f7, 0x0003, "PR_EMS_AB_OBJECT_VERSION", "" }, { 0x80f8, 0x000d, "PR_EMS_AB_OFF_LINE_AB_CONTAINERS_O", "" }, { 0x80f8, 0x101e, "PR_EMS_AB_OFF_LINE_AB_CONTAINERS", "" }, { 0x80f9, 0x0102, "PR_EMS_AB_OFF_LINE_AB_SCHEDULE", "" }, { 0x80fa, 0x000d, "PR_EMS_AB_OFF_LINE_AB_SERVER_O", "" }, { 0x80fa, 0x001e, "PR_EMS_AB_OFF_LINE_AB_SERVER", "" }, { 0x80fb, 0x0003, "PR_EMS_AB_OFF_LINE_AB_STYLE", "" }, { 0x80fc, 0x0003, "PR_EMS_AB_OID_TYPE", "" }, { 0x80fd, 0x0102, "PR_EMS_AB_OM_OBJECT_CLASS", "" }, { 0x80fe, 0x0003, "PR_EMS_AB_OM_SYNTAX", "" }, { 0x80ff, 0x000b, "PR_EMS_AB_OOF_REPLY_TO_ORIGINATOR", "" }, { 0x8100, 0x0003, "PR_EMS_AB_OPEN_RETRY_INTERVAL", "" }, { 0x8101, 0x101e, "PR_EMS_AB_ORGANIZATION_NAME", "" }, { 0x8102, 0x101e, "PR_EMS_AB_ORGANIZATIONAL_UNIT_NAME", "" }, { 0x8103, 0x0102, "PR_EMS_AB_ORIGINAL_DISPLAY_TABLE", "" }, { 0x8104, 0x0102, "PR_EMS_AB_ORIGINAL_DISPLAY_TABLE_MSDOS", "" }, { 0x8105, 0x000d, "PR_EMS_AB_OUTBOUND_SITES_O", "" }, { 0x8105, 0x101e, "PR_EMS_AB_OUTBOUND_SITES", "" }, { 0x8106, 0x0102, "PR_EMS_AB_P_SELECTOR", "" }, { 0x8107, 0x0102, "PR_EMS_AB_P_SELECTOR_INBOUND", "" }, { 0x8108, 0x0102, "PR_EMS_AB_PER_MSG_DIALOG_DISPLAY_TABLE", "" }, { 0x8109, 0x0102, "PR_EMS_AB_PER_RECIP_DIALOG_DISPLAY_TABLE", "" }, { 0x810a, 0x0102, "PR_EMS_AB_PERIOD_REP_SYNC_TIMES", "" }, { 0x810b, 0x0003, "PR_EMS_AB_PERIOD_REPL_STAGGER", "" }, { 0x810c, 0x1102, "PR_EMS_AB_POSTAL_ADDRESS", "" }, { 0x810d, 0x1003, "PR_EMS_AB_PREFERRED_DELIVERY_METHOD", "" }, { 0x810e, 0x001e, "PR_EMS_AB_PRMD", "" }, { 0x810f, 0x001e, "PR_EMS_AB_PROXY_GENERATOR_DLL", "" }, { 0x8110, 0x000d, "PR_EMS_AB_PUBLIC_DELEGATES_BL_O", "" }, { 0x8110, 0x101e, "PR_EMS_AB_PUBLIC_DELEGATES_BL", "" }, { 0x8111, 0x0102, "PR_EMS_AB_QUOTA_NOTIFICATION_SCHEDULE", "" }, { 0x8112, 0x0003, "PR_EMS_AB_QUOTA_NOTIFICATION_STYLE", "" }, { 0x8113, 0x0003, "PR_EMS_AB_RANGE_LOWER", "" }, { 0x8114, 0x0003, "PR_EMS_AB_RANGE_UPPER", "" }, { 0x8115, 0x001e, "PR_EMS_AB_RAS_CALLBACK_NUMBER", "" }, { 0x8116, 0x001e, "PR_EMS_AB_RAS_PHONE_NUMBER", "" }, { 0x8117, 0x001e, "PR_EMS_AB_RAS_PHONEBOOK_ENTRY_NAME", "" }, { 0x8118, 0x001e, "PR_EMS_AB_RAS_REMOTE_SRVR_NAME", "" }, { 0x8119, 0x001e, "PR_CE_SIGNATURE", "Text signature" }, { 0x8119, 0x1102, "PR_EMS_AB_REGISTERED_ADDRESS", "" }, { 0x811a, 0x001e, "PR_EMS_AB_REMOTE_BRIDGE_HEAD", "" }, { 0x811b, 0x001e, "PR_EMS_AB_REMOTE_BRIDGE_HEAD_ADDRESS", "" }, { 0x811c, 0x000d, "PR_EMS_AB_REMOTE_OUT_BH_SERVER_O", "" }, { 0x811c, 0x001e, "PR_EMS_AB_REMOTE_OUT_BH_SERVER", "" }, { 0x811d, 0x000d, "PR_EMS_AB_REMOTE_SITE_O", "" }, { 0x811d, 0x001e, "PR_EMS_AB_REMOTE_SITE", "" }, { 0x811e, 0x0003, "PR_EMS_AB_REPLICATION_SENSITIVITY", "" }, { 0x811f, 0x0003, "PR_EMS_AB_REPLICATION_STAGGER", "" }, { 0x8120, 0x000b, "PR_EMS_AB_REPORT_TO_ORIGINATOR", "" }, { 0x8121, 0x000b, "PR_EMS_AB_REPORT_TO_OWNER", "" }, { 0x8122, 0x0003, "PR_EMS_AB_REQ_SEQ", "" }, { 0x8123, 0x000d, "PR_EMS_AB_RESPONSIBLE_LOCAL_DXA_O", "" }, { 0x8123, 0x001e, "PR_EMS_AB_RESPONSIBLE_LOCAL_DXA", "" }, { 0x8124, 0x000d, "PR_EMS_AB_RID_SERVER_O", "" }, { 0x8124, 0x001e, "PR_EMS_AB_RID_SERVER", "" }, { 0x8125, 0x000d, "PR_EMS_AB_ROLE_OCCUPANT_O", "" }, { 0x8125, 0x101e, "PR_EMS_AB_ROLE_OCCUPANT", "" }, { 0x8126, 0x101e, "PR_EMS_AB_ROUTING_LIST", "" }, { 0x8127, 0x0003, "PR_EMS_AB_RTS_CHECKPOINT_SIZE", "" }, { 0x8128, 0x0003, "PR_EMS_AB_RTS_RECOVERY_TIMEOUT", "" }, { 0x8129, 0x0003, "PR_EMS_AB_RTS_WINDOW_SIZE", "" }, { 0x812a, 0x000d, "PR_EMS_AB_RUNS_ON_O", "" }, { 0x812a, 0x101e, "PR_EMS_AB_RUNS_ON", "" }, { 0x812b, 0x0102, "PR_EMS_AB_S_SELECTOR", "" }, { 0x812c, 0x0102, "PR_EMS_AB_S_SELECTOR_INBOUND", "" }, { 0x812d, 0x0003, "PR_EMS_AB_SEARCH_FLAGS", "" }, { 0x812e, 0x1102, "PR_EMS_AB_SEARCH_GUIDE", "" }, { 0x812f, 0x000d, "PR_EMS_AB_SEE_ALSO_O", "" }, { 0x812f, 0x101e, "PR_EMS_AB_SEE_ALSO", "" }, { 0x8130, 0x101e, "PR_EMS_AB_SERIAL_NUMBER", "" }, { 0x8131, 0x0003, "PR_EMS_AB_SERVICE_ACTION_FIRST", "" }, { 0x8132, 0x0003, "PR_EMS_AB_SERVICE_ACTION_OTHER", "" }, { 0x8133, 0x0003, "PR_EMS_AB_SERVICE_ACTION_SECOND", "" }, { 0x8134, 0x0003, "PR_EMS_AB_SERVICE_RESTART_DELAY", "" }, { 0x8135, 0x001e, "PR_EMS_AB_SERVICE_RESTART_MESSAGE", "" }, { 0x8136, 0x0003, "PR_EMS_AB_SESSION_DISCONNECT_TIMER", "" }, { 0x8137, 0x101e, "PR_EMS_AB_SITE_AFFINITY", "" }, { 0x8138, 0x101e, "PR_EMS_AB_SITE_PROXY_SPACE", "" }, { 0x8139, 0x0040, "PR_EMS_AB_SPACE_LAST_COMPUTED", "" }, { 0x813a, 0x001e, "PR_EMS_AB_STREET_ADDRESS", "" }, { 0x813b, 0x000d, "PR_EMS_AB_SUB_REFS_O", "" }, { 0x813b, 0x101e, "PR_EMS_AB_SUB_REFS", "" }, { 0x813c, 0x0003, "PR_EMS_AB_SUBMISSION_CONT_LENGTH", "" }, { 0x813d, 0x1102, "PR_EMS_AB_SUPPORTED_APPLICATION_CONTEXT", "" }, { 0x813e, 0x000d, "PR_EMS_AB_SUPPORTING_STACK_O", "" }, { 0x813e, 0x101e, "PR_EMS_AB_SUPPORTING_STACK", "" }, { 0x813f, 0x000d, "PR_EMS_AB_SUPPORTING_STACK_BL_O", "" }, { 0x813f, 0x101e, "PR_EMS_AB_SUPPORTING_STACK_BL", "" }, { 0x8140, 0x0102, "PR_EMS_AB_T_SELECTOR", "" }, { 0x8141, 0x0102, "PR_EMS_AB_T_SELECTOR_INBOUND", "" }, { 0x8142, 0x101e, "PR_EMS_AB_TARGET_MTAS", "" }, { 0x8143, 0x1102, "PR_EMS_AB_TELETEX_TERMINAL_IDENTIFIER", "" }, { 0x8144, 0x0003, "PR_EMS_AB_TEMP_ASSOC_THRESHOLD", "" }, { 0x8145, 0x0003, "PR_EMS_AB_TOMBSTONE_LIFETIME", "" }, { 0x8146, 0x001e, "PR_EMS_AB_TRACKING_LOG_PATH_NAME", "" }, { 0x8147, 0x0003, "PR_EMS_AB_TRANS_RETRY_MINS", "" }, { 0x8148, 0x0003, "PR_EMS_AB_TRANS_TIMEOUT_MINS", "" }, { 0x8149, 0x0003, "PR_EMS_AB_TRANSFER_RETRY_INTERVAL", "" }, { 0x814a, 0x0003, "PR_EMS_AB_TRANSFER_TIMEOUT_NON_URGENT", "" }, { 0x814b, 0x0003, "PR_EMS_AB_TRANSFER_TIMEOUT_NORMAL", "" }, { 0x814c, 0x0003, "PR_EMS_AB_TRANSFER_TIMEOUT_URGENT", "" }, { 0x814d, 0x0003, "PR_EMS_AB_TRANSLATION_TABLE_USED", "" }, { 0x814e, 0x000b, "PR_EMS_AB_TRANSPORT_EXPEDITED_DATA", "" }, { 0x814f, 0x0003, "PR_EMS_AB_TRUST_LEVEL", "" }, { 0x8150, 0x0003, "PR_EMS_AB_TURN_REQUEST_THRESHOLD", "" }, { 0x8151, 0x000b, "PR_EMS_AB_TWO_WAY_ALTERNATE_FACILITY", "" }, { 0x8152, 0x000d, "PR_EMS_AB_UNAUTH_ORIG_BL_O", "" }, { 0x8152, 0x101e, "PR_EMS_AB_UNAUTH_ORIG_BL", "" }, { 0x8153, 0x1102, "PR_EMS_AB_USER_PASSWORD", "" }, { 0x8154, 0x0003, "PR_EMS_AB_USN_CREATED", "" }, { 0x8155, 0x0003, "PR_EMS_AB_USN_DSA_LAST_OBJ_REMOVED", "" }, { 0x8156, 0x0003, "PR_EMS_AB_USN_LAST_OBJ_REM", "" }, { 0x8157, 0x0003, "PR_EMS_AB_USN_SOURCE", "" }, { 0x8158, 0x101e, "PR_EMS_AB_X121_ADDRESS", "" }, { 0x8159, 0x0102, "PR_EMS_AB_X25_CALL_USER_DATA_INCOMING", "" }, { 0x815a, 0x0102, "PR_EMS_AB_X25_CALL_USER_DATA_OUTGOING", "" }, { 0x815b, 0x0102, "PR_EMS_AB_X25_FACILITIES_DATA_INCOMING", "" }, { 0x815c, 0x0102, "PR_EMS_AB_X25_FACILITIES_DATA_OUTGOING", "" }, { 0x815d, 0x0102, "PR_EMS_AB_X25_LEASED_LINE_PORT", "" }, { 0x815e, 0x000b, "PR_EMS_AB_X25_LEASED_OR_SWITCHED", "" }, { 0x815f, 0x001e, "PR_EMS_AB_X25_REMOTE_MTA_PHONE", "" }, { 0x8160, 0x0102, "PR_EMS_AB_X400_ATTACHMENT_TYPE", "" }, { 0x8161, 0x0003, "PR_EMS_AB_X400_SELECTOR_SYNTAX", "" }, { 0x8162, 0x0102, "PR_EMS_AB_X500_ACCESS_CONTROL_LIST", "" }, { 0x8163, 0x0003, "PR_EMS_AB_XMIT_TIMEOUT_NON_URGENT", "" }, { 0x8164, 0x0003, "PR_EMS_AB_XMIT_TIMEOUT_NORMAL", "" }, { 0x8165, 0x0003, "PR_EMS_AB_XMIT_TIMEOUT_URGENT", "" }, { 0x8166, 0x0102, "PR_EMS_AB_SITE_FOLDER_GUID", "" }, { 0x8167, 0x000d, "PR_EMS_AB_SITE_FOLDER_SERVER_O", "" }, { 0x8167, 0x001e, "PR_EMS_AB_SITE_FOLDER_SERVER", "" }, { 0x8168, 0x0003, "PR_EMS_AB_REPLICATION_MAIL_MSG_SIZE", "" }, { 0x8169, 0x0102, "PR_EMS_AB_MAXIMUM_OBJECT_ID", "" }, { 0x8170, 0x101e, "PidTagAddressBookNetworkAddress", "Address book network address" }, { 0x8171, 0x101e, "PR_EMS_AB_LDAP_DISPLAY_NAME", "" }, { 0x8173, 0x0003, "PR_EMS_AB_SCHEMA_FLAGS", "" }, { 0x8174, 0x000d, "PR_EMS_AB_BRIDGEHEAD_SERVERS_O", "" }, { 0x8174, 0x101e, "PR_EMS_AB_BRIDGEHEAD_SERVERS", "" }, { 0x8175, 0x001e, "PR_EMS_AB_WWW_HOME_PAGE", "" }, { 0x8176, 0x001e, "PR_EMS_AB_NNTP_CONTENT_FORMAT", "" }, { 0x8177, 0x001e, "PR_EMS_AB_POP_CONTENT_FORMAT", "" }, { 0x8178, 0x0003, "PR_EMS_AB_LANGUAGE", "" }, { 0x8179, 0x001e, "PR_EMS_AB_POP_CHARACTER_SET", "" }, { 0x817a, 0x0003, "PR_EMS_AB_USN_INTERSITE", "" }, { 0x817b, 0x001e, "PR_EMS_AB_SUB_SITE", "" }, { 0x817c, 0x1003, "PR_EMS_AB_SCHEMA_VERSION", "" }, { 0x817d, 0x001e, "PR_EMS_AB_NNTP_CHARACTER_SET", "" }, { 0x817e, 0x000b, "PR_EMS_AB_USE_SERVER_VALUES", "" }, { 0x817f, 0x0003, "PR_EMS_AB_ENABLED_PROTOCOLS", "" }, { 0x8180, 0x0102, "PR_EMS_AB_CONNECTION_LIST_FILTER", "" }, { 0x8181, 0x101e, "PR_EMS_AB_AVAILABLE_AUTHORIZATION_PACKAGES", "" }, { 0x8182, 0x101e, "PR_EMS_AB_CHARACTER_SET_LIST", "" }, { 0x8183, 0x000b, "PR_EMS_AB_USE_SITE_VALUES", "" }, { 0x8184, 0x101e, "PR_EMS_AB_ENABLED_AUTHORIZATION_PACKAGES", "" }, { 0x8185, 0x001e, "PR_EMS_AB_CHARACTER_SET", "" }, { 0x8186, 0x0003, "PR_EMS_AB_CONTENT_TYPE", "" }, { 0x8187, 0x000b, "PR_EMS_AB_ANONYMOUS_ACCESS", "" }, { 0x8188, 0x0102, "PR_EMS_AB_CONTROL_MSG_FOLDER_ID", "" }, { 0x8189, 0x001e, "PR_EMS_AB_USENET_SITE_NAME", "" }, { 0x818a, 0x0102, "PR_EMS_AB_CONTROL_MSG_RULES", "" }, { 0x818b, 0x001e, "PR_EMS_AB_AVAILABLE_DISTRIBUTIONS", "" }, { 0x818d, 0x0102, "PR_EMS_AB_OUTBOUND_HOST", "" }, { 0x818e, 0x101e, "PR_EMS_AB_INBOUND_HOST", "" }, { 0x818f, 0x0003, "PR_EMS_AB_OUTGOING_MSG_SIZE_LIMIT", "" }, { 0x8190, 0x0003, "PR_EMS_AB_INCOMING_MSG_SIZE_LIMIT", "" }, { 0x8191, 0x000b, "PR_EMS_AB_SEND_TNEF", "" }, { 0x8192, 0x0102, "PR_EMS_AB_AUTHORIZED_PASSWORD_CONFIRM", "" }, { 0x8193, 0x001e, "PR_EMS_AB_INBOUND_NEWSFEED", "" }, { 0x8194, 0x0003, "PR_EMS_AB_NEWSFEED_TYPE", "" }, { 0x8195, 0x001e, "PR_EMS_AB_OUTBOUND_NEWSFEED", "" }, { 0x8196, 0x0102, "PR_EMS_AB_NEWSGROUP_LIST", "" }, { 0x8197, 0x101e, "PR_EMS_AB_NNTP_DISTRIBUTIONS", "" }, { 0x8198, 0x001e, "PR_EMS_AB_NEWSGROUP", "" }, { 0x8199, 0x001e, "PR_EMS_AB_MODERATOR", "" }, { 0x819a, 0x001e, "PR_EMS_AB_AUTHENTICATION_TO_USE", "" }, { 0x819b, 0x000b, "PR_EMS_AB_HTTP_PUB_GAL", "" }, { 0x819c, 0x0003, "PR_EMS_AB_HTTP_PUB_GAL_LIMIT", "" }, { 0x819e, 0x1102, "PR_EMS_AB_HTTP_PUB_PF", "" }, { 0x81a1, 0x001e, "PR_EMS_AB_X500_RDN", "" }, { 0x81a2, 0x001e, "PR_EMS_AB_X500_NC", "" }, { 0x81a3, 0x101e, "PR_EMS_AB_REFERRAL_LIST", "" }, { 0x81a4, 0x000b, "PR_EMS_AB_NNTP_DISTRIBUTIONS_FLAG", "" }, { 0x81a5, 0x000d, "PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP_O", "" }, { 0x81a5, 0x001e, "PR_EMS_AB_ASSOC_PROTOCOL_CFG_NNTP", "" }, { 0x81a6, 0x000d, "PR_EMS_AB_NNTP_NEWSFEEDS_O", "" }, { 0x81a6, 0x101e, "PR_EMS_AB_NNTP_NEWSFEEDS", "" }, { 0x81a8, 0x000b, "PR_EMS_AB_ENABLED_PROTOCOL_CFG", "" }, { 0x81a9, 0x101e, "PR_EMS_AB_HTTP_PUB_AB_ATTRIBUTES", "" }, { 0x81ab, 0x101e, "PR_EMS_AB_HTTP_SERVERS", "" }, { 0x81ac, 0x000b, "PR_EMS_AB_MODERATED", "" }, { 0x81ad, 0x001e, "PR_EMS_AB_RAS_ACCOUNT", "" }, { 0x81ae, 0x0102, "PR_EMS_AB_RAS_PASSWORD", "" }, { 0x81af, 0x0102, "PR_EMS_AB_INCOMING_PASSWORD", "" }, { 0x81b0, 0x000b, "PR_EMS_AB_OUTBOUND_HOST_TYPE", "" }, { 0x81b1, 0x000b, "PR_EMS_AB_PROXY_GENERATION_ENABLED", "" }, { 0x81b2, 0x0102, "PR_EMS_AB_ROOT_NEWSGROUPS_FOLDER_ID", "" }, { 0x81b3, 0x000b, "PR_EMS_AB_CONNECTION_TYPE", "" }, { 0x81b4, 0x0003, "PR_EMS_AB_CONNECTION_LIST_FILTER_TYPE", "" }, { 0x81b5, 0x0003, "PR_EMS_AB_PORT_NUMBER", "" }, { 0x81b6, 0x101e, "PR_EMS_AB_PROTOCOL_SETTINGS", "" }, { 0x81b7, 0x001e, "PR_EMS_AB_GROUP_BY_ATTR_1", "" }, { 0x81b8, 0x001e, "PR_EMS_AB_GROUP_BY_ATTR_2", "" }, { 0x81b9, 0x001e, "PR_EMS_AB_GROUP_BY_ATTR_3", "" }, { 0x81ba, 0x001e, "PR_EMS_AB_GROUP_BY_ATTR_4", "" }, { 0x81be, 0x001e, "PR_EMS_AB_VIEW_SITE", "" }, { 0x81bf, 0x001e, "PR_EMS_AB_VIEW_CONTAINER_1", "" }, { 0x81c0, 0x001e, "PR_EMS_AB_VIEW_CONTAINER_2", "" }, { 0x81c1, 0x001e, "PR_EMS_AB_VIEW_CONTAINER_3", "" }, { 0x81c2, 0x0040, "PR_EMS_AB_PROMO_EXPIRATION", "" }, { 0x81c3, 0x101e, "PR_EMS_AB_DISABLED_GATEWAY_PROXY", "" }, { 0x81c4, 0x0102, "PR_EMS_AB_COMPROMISED_KEY_LIST", "" }, { 0x81c5, 0x000d, "PR_EMS_AB_INSADMIN_O", "" }, { 0x81c5, 0x001e, "PR_EMS_AB_INSADMIN", "" }, { 0x81c6, 0x000b, "PR_EMS_AB_OVERRIDE_NNTP_CONTENT_FORMAT", "" }, { 0x81c7, 0x000d, "PR_EMS_AB_OBJ_VIEW_CONTAINERS_O", "" }, { 0x81c7, 0x101e, "PR_EMS_AB_OBJ_VIEW_CONTAINERS", "" }, { 0x8c18, 0x0003, "PR_EMS_AB_VIEW_FLAGS", "" }, { 0x8c19, 0x001e, "PR_EMS_AB_GROUP_BY_ATTR_VALUE_STR", "" }, { 0x8c1a, 0x000d, "PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN_O", "" }, { 0x8c1a, 0x001e, "PR_EMS_AB_GROUP_BY_ATTR_VALUE_DN", "" }, { 0x8c1b, 0x1102, "PR_EMS_AB_VIEW_DEFINITION", "" }, { 0x8c1c, 0x0102, "PR_EMS_AB_MIME_TYPES", "" }, { 0x8c1d, 0x0003, "PR_EMS_AB_LDAP_SEARCH_CFG", "" }, { 0x8c1e, 0x000d, "PR_EMS_AB_INBOUND_DN_O", "" }, { 0x8c1e, 0x001e, "PR_EMS_AB_INBOUND_DN", "" }, { 0x8c1f, 0x000b, "PR_EMS_AB_INBOUND_NEWSFEED_TYPE", "" }, { 0x8c20, 0x000b, "PR_EMS_AB_INBOUND_ACCEPT_ALL", "" }, { 0x8c21, 0x000b, "PR_EMS_AB_ENABLED", "" }, { 0x8c22, 0x000b, "PR_EMS_AB_PRESERVE_INTERNET_CONTENT", "" }, { 0x8c23, 0x000b, "PR_EMS_AB_DISABLE_DEFERRED_COMMIT", "" }, { 0x8c24, 0x000b, "PR_EMS_AB_CLIENT_ACCESS_ENABLED", "" }, { 0x8c25, 0x000b, "PR_EMS_AB_REQUIRE_SSL", "" }, { 0x8c26, 0x001e, "PR_EMS_AB_ANONYMOUS_ACCOUNT", "" }, { 0x8c27, 0x0102, "PR_EMS_AB_CERTIFICATE_CHAIN_V3", "" }, { 0x8c28, 0x0102, "PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V3", "" }, { 0x8c29, 0x0102, "PR_EMS_AB_CERTIFICATE_REVOCATION_LIST_V1", "" }, { 0x8c30, 0x1102, "PR_EMS_AB_CROSS_CERTIFICATE_CRL", "" }, { 0x8c31, 0x000b, "PR_EMS_AB_SEND_EMAIL_MESSAGE", "" }, { 0x8c32, 0x000b, "PR_EMS_AB_ENABLE_COMPATIBILITY", "" }, { 0x8c33, 0x101e, "PR_EMS_AB_SMIME_ALG_LIST_NA", "" }, { 0x8c34, 0x101e, "PR_EMS_AB_SMIME_ALG_LIST_OTHER", "" }, { 0x8c35, 0x001e, "PR_EMS_AB_SMIME_ALG_SELECTED_NA", "" }, { 0x8c36, 0x001e, "PR_EMS_AB_SMIME_ALG_SELECTED_OTHER", "" }, { 0x8c37, 0x000b, "PR_EMS_AB_DEFAULT_MESSAGE_FORMAT", "" }, { 0x8c38, 0x001e, "PR_EMS_AB_TYPE", "" }, { 0x8c3a, 0x0003, "PR_EMS_AB_DO_OAB_VERSION", "" }, { 0x8c3b, 0x0102, "PR_EMS_AB_VOICE_MAIL_SYSTEM_GUID", "" }, { 0x8c3c, 0x001e, "PR_EMS_AB_VOICE_MAIL_USER_ID", "" }, { 0x8c3d, 0x001e, "PR_EMS_AB_VOICE_MAIL_PASSWORD", "" }, { 0x8c3e, 0x0102, "PR_EMS_AB_VOICE_MAIL_RECORDED_NAME", "" }, { 0x8c3f, 0x101e, "PR_EMS_AB_VOICE_MAIL_GREETINGS", "" }, { 0x8c40, 0x1102, "PR_EMS_AB_VOICE_MAIL_FLAGS", "" }, { 0x8c41, 0x0003, "PR_EMS_AB_VOICE_MAIL_VOLUME", "" }, { 0x8c42, 0x0003, "PR_EMS_AB_VOICE_MAIL_SPEED", "" }, { 0x8c43, 0x1003, "PR_EMS_AB_VOICE_MAIL_RECORDING_LENGTH", "" }, { 0x8c44, 0x001e, "PR_EMS_AB_DISPLAY_NAME_SUFFIX", "" }, { 0x8c45, 0x1102, "PR_EMS_AB_ATTRIBUTE_CERTIFICATE", "" }, { 0x8c46, 0x1102, "PR_EMS_AB_DELTA_REVOCATION_LIST", "" }, { 0x8c47, 0x1102, "PR_EMS_AB_SECURITY_POLICY", "" }, { 0x8c48, 0x000b, "PR_EMS_AB_SUPPORT_SMIME_SIGNATURES", "" }, { 0x8c49, 0x000b, "PR_EMS_AB_DELEGATE_USER", "" }, { 0x8c50, 0x000b, "PR_EMS_AB_LIST_PUBLIC_FOLDERS", "" }, { 0x8c51, 0x001e, "PR_EMS_AB_LABELEDURI", "" }, { 0x8c52, 0x000b, "PR_EMS_AB_RETURN_EXACT_MSG_SIZE", "" }, { 0x8c53, 0x001e, "PR_EMS_AB_GENERATION_QUALIFIER", "" }, { 0x8c54, 0x001e, "PR_EMS_AB_HOUSE_IDENTIFIER", "" }, { 0x8c55, 0x0102, "PR_EMS_AB_SUPPORTED_ALGORITHMS", "" }, { 0x8c56, 0x001e, "PR_EMS_AB_DMD_NAME", "" }, { 0x8c57, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_11", "" }, { 0x8c58, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_12", "" }, { 0x8c59, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_13", "" }, { 0x8c60, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_14", "" }, { 0x8c61, 0x001e, "PR_EMS_AB_EXTENSION_ATTRIBUTE_15", "" }, { 0x8c62, 0x0003, "PR_EMS_AB_REPLICATED_OBJECT_VERSION", "" }, { 0x8c63, 0x001e, "PR_EMS_AB_MAIL_DROP", "" }, { 0x8c64, 0x001e, "PR_EMS_AB_FORWARDING_ADDRESS", "" }, { 0x8c65, 0x0102, "PR_EMS_AB_FORM_DATA", "" }, { 0x8c66, 0x001e, "PR_EMS_AB_OWA_SERVER", "" }, { 0x8c67, 0x001e, "PR_EMS_AB_EMPLOYEE_NUMBER", "" }, { 0x8c68, 0x001e, "PR_EMS_AB_TELEPHONE_PERSONAL_PAGER", "" }, { 0x8c69, 0x001e, "PR_EMS_AB_EMPLOYEE_TYPE", "" }, { 0x8c6a, 0x1102, "PR_EMS_AB_TAGGED_X509_CERT", "" }, { 0x8c6b, 0x001e, "PR_EMS_AB_PERSONAL_TITLE", "" }, { 0x8c6c, 0x001e, "PR_EMS_AB_LANGUAGE_ISO639", "" }, { 0x8c6d, 0x001e, "PR_EMS_AB_OBJECT_GUID", "" }, { 0x8c8e, 0x001e, "PR_EMS_AB_PHONETIC_GIVEN_NAME", "" }, { 0x8c8f, 0x001e, "PR_EMS_AB_PHONETIC_SURNAME", "" }, { 0x8c90, 0x001e, "PR_EMS_AB_PHONETIC_DEPARTMENT_NAME", "" }, { 0x8c91, 0x001e, "PR_EMS_AB_PHONETIC_COMPANY_NAME", "" }, { 0x8c92, 0x001e, "PR_EMS_AB_PHONETIC_DISPLAY_NAME", "" }, { 0x8c96, 0x001e, "PR_EMS_AB_ROOM_CONTAINERS", "" }, { 0xf000, 0x000d, "PR_EMS_AB_OTHER_RECIPS", "" }, { 0xfff8, 0x101e, "PR_EMS_AB_CHILD_RDNS", "" }, { 0xfff9, 0x001e, "PR_EMS_AB_HIERARCHY_PATH", "" }, { 0xfffa, 0x0102, "PR_EMS_AB_OBJECT_OID", "" }, { 0xfffb, 0x000b, "PR_EMS_AB_IS_MASTER", "" }, { 0xfffc, 0x0102, "PR_EMS_AB_PARENT_ENTRYID", "" }, { 0xfffd, 0x0003, "PR_EMS_AB_CONTAINERID", "" }, { 0xfffe, 0x001e, "PR_EMS_AB_SERVER", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The calendar long property types * Class identifier: 6ed8da90-450b-101b-98da-00aa003f1305 (PSETID_Meeting) */ libfmapi_property_type_t libfmapi_calendar_long_properties[ ] = { { 0x00000001, 0x0040, "LID_ATTENDEE_CRITICAL_CHANGE", "Attendee critical change" }, { 0x00000002, 0x001e, "LID_WHERE", "Location" }, { 0x00000003, 0x0102, "LID_GLOBAL_OBJID", "Global object identifier" }, { 0x00000004, 0x000b, "LID_IS_SILENT", "Is silent" }, { 0x00000005, 0x000b, "PidLidIsRecurring", "Is recurring" }, { 0x00000006, 0x001e, "LID_REQUIRED_ATTENDEES", "Required attendees" }, { 0x00000007, 0x001e, "LID_OPTIONAL_ATTENDEES", "Optional attendees" }, { 0x00000008, 0x001e, "LID_RESOURCE_ATTENDEES", "Resource attendees" }, { 0x00000009, 0x000b, "LID_DELEGATE_MAIL", "Delegate mail" }, { 0x0000000a, 0x000b, "LID_IS_EXCEPTION", "Is exception" }, { 0x0000000b, 0x000b, "LID_SINGLE_INVITE", "Single invite" }, { 0x0000000c, 0x0003, "LID_TIME_ZONE", "Time zone" }, { 0x00000011, 0x0002, "LID_DAY_INTERVAL", "Day interval" }, { 0x00000012, 0x0002, "LID_WEEK_INTERVAL", "Week interval" }, { 0x00000013, 0x0002, "LID_MONTH_INTERVAL", "Month interval" }, { 0x00000014, 0x0002, "LID_YEAR_INTERVAL", "Year interval" }, { 0x0000001a, 0x0040, "LID_OWNER_CRITICAL_CHANGE", "Owner critical change" }, { 0x0000001c, 0x0003, "LID_CALENDAR_TYPE", "Calendar type" }, { 0x0000001d, 0x001e, "LID_ALL_ATTENDEES_LIST", "Resource attendees" }, { 0x00000023, 0x0102, "PidLidCleanGlobalObjId", "Clean global object identifier" }, { 0x00000024, 0x001e, "PidLidApptMessageClass", "Appointment message class" }, { 0x00000026, 0x0003, "PidLidMeetingType", "Meeting type" }, { 0x00000028, 0x001e, "PidLidOldLocation", "Location before update" }, { 0x00000029, 0x0040, "PidLidOldWhenStartWhole", "Start time before update" }, { 0x0000002a, 0x0040, "PidLidOldWhenEndWhole", "End time before update" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The address long property types * Class identifier: 00062004-0000-0000-c000-000000000046 (PSETID_Address) */ libfmapi_property_type_t libfmapi_address_long_properties[ ] = { { 0x00008002, 0x001e, "PidLidYomiCompanyName", "" }, { 0x00008005, 0x001e, "PidLidFileUnder", "File under" }, { 0x00008006, 0x0003, "PidLidFileUnderID", "File under identifier" }, { 0x00008007, 0x1003, "PidLidContactItemData", "" }, { 0x0000800e, 0x001f, "", "" }, { 0x00008010, 0x001e, "PidLidDepartment", "" }, { 0x00008015, 0x000b, "PidLidHasPicture", "" }, { 0x0000801a, 0x001e, "PidLidHomeAddress", "Home address" }, { 0x0000801b, 0x001e, "PidLidWorkAddress", "Business address" }, { 0x0000801c, 0x001e, "PidLidOtherAddress", "Other address" }, { 0x00008022, 0x001e, "PidLidPostalAddressId", "Selected mailing address" }, { 0x00008023, 0x0003, "PidLidContactCharacterSet", "" }, { 0x00008025, 0x000b, "PidLidAutoLog", "Journal" }, { 0x00008026, 0x1003, "PidLidFileUnderList", "" }, { 0x00008027, 0x1003, "PidLidEmailList", "" }, { 0x00008028, 0x1003, "PidLidAddressBookProviderEmailList", "" }, { 0x00008029, 0x0003, "PidLidAddressBookProviderArrayType", "" }, { 0x0000802b, 0x001e, "PidLidHtml", "Webpage" }, { 0x0000802c, 0x001e, "PidLidYomiFirstName", "" }, { 0x0000802d, 0x001e, "PidLidYomiLastName", "" }, { 0x00008040, 0x0102, "PidLidBusinessCardDisplayDefinition", "" }, { 0x00008041, 0x0102, "PidLidBusinessCardCardPicture", "" }, { 0x00008045, 0x001e, "PidLidWorkAddressStreet", "Business address city" }, { 0x00008046, 0x001e, "PidLidWorkAddressCity", "Business address street" }, { 0x00008047, 0x001e, "PidLidWorkAddressState", "Business address state" }, { 0x00008048, 0x001e, "PidLidWorkAddressPostalCode", "Business address postal code" }, { 0x00008049, 0x001e, "PidLidWorkAddressCountry", "Business address country" }, { 0x0000804a, 0x001e, "PidLidWorkAddressPostOfficeBox", "" }, { 0x0000804c, 0x0003, "PidLidDistributionListChecksum", "" }, { 0x0000804d, 0x0102, "PidLidBirthdayEventEntryId", "" }, { 0x0000804e, 0x0102, "PidLidAnniversaryEventEntryId", "" }, { 0x0000804f, 0x001e, "PidLidContactUserField1", "" }, { 0x00008050, 0x001e, "PidLidContactUserField2", "" }, { 0x00008051, 0x001e, "PidLidContactUserField3", "" }, { 0x00008052, 0x001e, "PidLidContactUserField4", "" }, { 0x00008053, 0x001e, "PidLidDistributionListName", "" }, { 0x00008054, 0x1102, "PidLidDistributionListOneOffMembers", "" }, { 0x00008055, 0x1102, "PidLidDistributionListMembers", "" }, { 0x00008062, 0x001e, "PidLidInstantMessagingAddress", "IM Address" }, { 0x00008080, 0x001e, "PidLidEmail1DisplayName", "E-mail1 Display Name" }, { 0x00008081, 0x0102, "PidLidEmail1EntryId", "E-mail1 entry identifier" }, { 0x00008082, 0x001e, "PidLidEmail1AddressType", "E-mail1 Address Type" }, { 0x00008083, 0x001e, "PidLidEmail1EmailAddress", "E-mail1 Address" }, { 0x00008084, 0x001e, "PidLidEmail1OriginalDisplayName", "E-mail1 Display Name" }, { 0x00008085, 0x0102, "PidLidEmail1OriginalEntryId", "E-mail1 original entry identifier" }, { 0x00008087, 0x001e, "PidLidEmail1EmailType", "E-mail1 type" }, { 0x00008090, 0x001e, "PidLidEmail2DisplayName", "E-mail2 display name" }, { 0x00008091, 0x0102, "PidLidEmail2EntryId", "E-mail2 entry identifier" }, { 0x00008092, 0x001e, "PidLidEmail2AddressType", "E-mail2 address type" }, { 0x00008093, 0x001e, "PidLidEmail2EmailAddress", "E-mail2 e-mail address" }, { 0x00008094, 0x001e, "PidLidEmail2OriginalDisplayName", "E-mail2 original display name" }, { 0x00008095, 0x0102, "PidLidEmail2OriginalEntryId", "E-mail2 original entry identifier" }, { 0x000080a0, 0x001e, "PidLidEmail3DisplayName", "E-mail3 display name" }, { 0x000080a1, 0x0102, "PidLidEmail3EntryId", "E-mail3 entry identifier" }, { 0x000080a2, 0x001e, "PidLidEmail3AddressType", "E-mail3 address type" }, { 0x000080a3, 0x001e, "PidLidEmail3EmailAddress", "E-mail3 e-mail address" }, { 0x000080a4, 0x001e, "PidLidEmail3OriginalDisplayName", "E-mail3 original display name" }, { 0x000080a5, 0x0102, "PidLidEmail3OriginalEntryId", "E-mail3 original entry identifier" }, { 0x000080b2, 0x001e, "PidLidFax1AddressType", "Fax1 Address Type" }, { 0x000080b3, 0x001e, "PidLidFax1EmailAddress", "Fax1 Email Address" }, { 0x000080b4, 0x001e, "PidLidFax1OriginalDisplayName", "Fax1 Original Display Name" }, { 0x000080b5, 0x0102, "PidLidFax1OriginalEntryId", "Fax1 Original Entry ID" }, { 0x000080c2, 0x001e, "PidLidFax2AddressType", "Fax2 Address Type" }, { 0x000080c3, 0x001e, "PidLidFax2EmailAddress", "Fax2 Email Address" }, { 0x000080c4, 0x001e, "PidLidFax2OriginalDisplayName", "Fax2 Original Display Name" }, { 0x000080c5, 0x0102, "PidLidFax2OriginalEntryId", "Fax2 Original Entry ID" }, { 0x000080d2, 0x001e, "PidLidFax3AddressType", "Fax3 Address Type" }, { 0x000080d3, 0x001e, "PidLidFax3EmailAddress", "Fax3 Email Address" }, { 0x000080d4, 0x001e, "PidLidFax3OriginalDisplayName", "Fax3 Original Display Name" }, { 0x000080d5, 0x0102, "PidLidFax3OriginalEntryId", "Fax3 Original Entry ID" }, { 0x000080d8, 0x001e, "PidLidFreeBusyLocation", "" }, { 0x000080da, 0x001e, "PidLidHomeAddressCountryCode", "" }, { 0x000080db, 0x001e, "PidLidWorkAddressCountryCode", "" }, { 0x000080dc, 0x001e, "PidLidOtherAddressCountryCode", "" }, { 0x000080dd, 0x001e, "PidLidAddressCountryCode", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The task long property types * Class identifier: 00062003-0000-0000-c000-000000000046 (PSETID_Task) */ libfmapi_property_type_t libfmapi_task_long_properties[ ] = { { 0x00008101, 0x0003, "PidLidTaskStatus", "Status" }, { 0x00008102, 0x0005, "PidLidPercentComplete", "Percent complete" }, { 0x00008103, 0x000b, "PidLidTeamTask", "Is team task" }, { 0x00008104, 0x0040, "PidLidTaskStartDate", "Start date" }, { 0x00008105, 0x0040, "PidLidTaskDueDate", "Due date" }, { 0x00008107, 0x000b, "PidLidTaskResetReminder", "" }, { 0x00008108, 0x000b, "PidLidTaskAccepted", "" }, { 0x00008109, 0x000b, "PidLidTaskDeadOccurrence", "" }, { 0x0000810f, 0x0040, "PidLidTaskDateCompleted", "Date completed" }, { 0x00008110, 0x0003, "PidLidTaskActualEffort", "Actual effort in minutes" }, { 0x00008111, 0x0003, "PidLidTaskEstimatedEffort", "Total effort in minutes" }, { 0x00008112, 0x0003, "PidLidTaskVersion", "" }, { 0x00008113, 0x0003, "PidLidTaskState", "" }, { 0x00008115, 0x0040, "PidLidTaskLastUpdate", "" }, { 0x00008116, 0x0102, "PidLidTaskRecurrence", "" }, { 0x00008117, 0x0102, "PidLidTaskAssigners", "" }, { 0x00008119, 0x000b, "PidLidTaskStatusOnComplete", "" }, { 0x0000811a, 0x0003, "PidLidTaskHistory", "" }, { 0x0000811b, 0x000b, "PidLidTaskUpdates", "" }, { 0x0000811c, 0x000b, "PidLidTaskComplete", "Is complete" }, { 0x0000811e, 0x000b, "PidLidTaskFCreator", "" }, { 0x0000811f, 0x001e, "PidLidTaskOwner", "Owner" }, { 0x00008120, 0x0003, "PidLidTaskMultipleRecipients", "" }, { 0x00008121, 0x001e, "PidLidTaskAssigner", "Delegator" }, { 0x00008122, 0x001e, "PidLidTaskLastUser", "" }, { 0x00008123, 0x0003, "PidLidTaskOrdinal", "Ordinal" }, { 0x00008124, 0x000b, "PidLidTaskNoCompute", "" }, { 0x00008125, 0x001e, "PidLidTaskLastDelegate", "" }, { 0x00008126, 0x000b, "PidLidTaskFRecurring", "Is recurring" }, { 0x00008127, 0x001e, "PidLidTaskRole", "Role" }, { 0x00008129, 0x0003, "PidLidTaskOwnership", "Ownership" }, { 0x0000812a, 0x0003, "PidLidAcceptanceState", "Delegation State" }, { 0x0000812c, 0x000b, "PidLidTaskFFixOffline", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The appointment long property types * Class identifier: 00062002-0000-0000-c000-000000000046 (PSETID_Appointment) */ libfmapi_property_type_t libfmapi_appointment_long_properties[ ] = { { 0x00008200, 0x000b, "PidLidSendMeetingAsIcal", "Send as ICAL" }, { 0x00008201, 0x0003, "PidLidAppointmentSequence", "Appointment sequence" }, { 0x00008202, 0x0040, "PidLidAppointmentSequenceTime", "Appointment sequence last modification date and time" }, { 0x00008203, 0x0003, "PidLidAppointmentLastSequence", "Appointment last sequence number" }, { 0x00008204, 0x0003, "PidLidChangeHighlight", "" }, { 0x00008205, 0x0003, "PidLidBusyStatus", "Busy status" }, { 0x00008206, 0x000b, "PidLidFExceptionalBody", "" }, { 0x00008207, 0x0003, "PidLidAppointmentAuxiliaryFlags", "" }, { 0x00008208, 0x001e, "PidLidLocation", "Location" }, { 0x00008209, 0x001e, "PidLidMeetingWorkspaceUrl", "" }, { 0x0000820a, 0x000b, "PidLidForwardInstance", "" }, { 0x0000820c, 0x1102, "PidLidLinkedTaskItems", "" }, { 0x0000820d, 0x0040, "PidLidAppointmentStartWhole", "Start time" }, { 0x0000820e, 0x0040, "PidLidAppointmentEndWhole", "End time" }, { 0x00008213, 0x0003, "PidLidAppointmentDuration", "Duration in minutes" }, { 0x00008214, 0x0003, "PidLidAppointmentColor", "Color" }, { 0x00008215, 0x000b, "PidLidAppointmentSubType", "Sub type" }, { 0x00008216, 0x0102, "PidLidAppointmentRecur", "" }, { 0x00008217, 0x0003, "PidLidAppointmentStateFlags", "Meeting status" }, { 0x00008218, 0x0003, "PidLidResponseStatus", "Response status" }, { 0x00008220, 0x0040, "PidLidAppointmentReplyTime", "" }, { 0x00008223, 0x000b, "PidLidRecurring", "Is recurrent" }, { 0x00008224, 0x0003, "PidLidIntendedBusyStatus", "" }, { 0x00008228, 0x0040, "PidLidExceptionReplaceTime", "Recurrence Base" }, { 0x00008229, 0x000b, "PidLidFInvited", "" }, { 0x0000822b, 0x000b, "PidLidFExceptionalAttendees", "" }, { 0x00008230, 0x001e, "PidLidAppointmentReplyName", "" }, { 0x00008231, 0x0003, "PidLidRecurrenceType", "Recurrence Type" }, { 0x00008232, 0x001e, "PidLidRecurrencePattern", "Recurrence Pattern" }, { 0x00008233, 0x0102, "PidLidTimeZoneStruct", "" }, { 0x00008234, 0x001e, "PidLidTimeZoneDescription", "Time zone" }, { 0x00008235, 0x0040, "PidLidClipStart", "First effective time" }, { 0x00008236, 0x0040, "PidLidClipEnd", "Last effective time" }, { 0x00008237, 0x0102, "PidLidOriginalStoreEntryId", "" }, { 0x00008238, 0x001e, "PidLidAllAttendeesString", "All Attendees" }, { 0x0000823a, 0x000b, "PidLidAutoFillLocation", "" }, { 0x0000823b, 0x001e, "PidLidToAttendeesString", "To Attendees" }, { 0x0000823c, 0x001e, "PidLidCcAttendeesString", "CC Attendees" }, { 0x0000823d, 0x0003, "PidLidAppointmentUnsendableRecipients", "" }, { 0x00008240, 0x000b, "PidLidConferencingCheck", "Is an online meeting" }, { 0x00008241, 0x0003, "PidLidConferencingType", "Net meeting type" }, { 0x00008242, 0x001e, "PidLidDirectory", "Net meeting server" }, { 0x00008243, 0x001e, "PidLidOrganizerAlias", "Net meeting organizer alias" }, { 0x00008244, 0x000b, "PidLidAutoStartCheck", "Net meeting auto start" }, { 0x00008245, 0x0003, "PidLidAutoStartWhen", "" }, { 0x00008246, 0x000b, "PidLidAllowExternalCheck", "Conference server allow external" }, { 0x00008247, 0x001e, "PidLidCollaborateDoc", "Net meeting document path name" }, { 0x00008248, 0x001e, "PidLidNetShowUrl", "Net show URL" }, { 0x00008249, 0x001e, "PidLidOnlinePassword", "Conference server password" }, { 0x00008250, 0x0040, "PidLidAppointmentProposedStartWhole", "" }, { 0x00008251, 0x0040, "PidLidAppointmentProposedEndWhole", "" }, { 0x00008256, 0x0003, "PidLidAppointmentProposedDuration", "" }, { 0x00008257, 0x000b, "PidLidAppointmentCounterProposal", "Appointment counter proposal" }, { 0x00008259, 0x0003, "PidLidAppointmentProposalNumber", "" }, { 0x0000825a, 0x000b, "PidLidAppointmentNotAllowPropose", "" }, { 0x0000825e, 0x0102, "PidLidAppointmentTimeZoneDefinitionStartDisplay", "Appointment start time time zone" }, { 0x0000825f, 0x0102, "PidLidAppointmentTimeZoneDefinitionEndDisplay", "Appointment end time time zone" }, { 0x00008260, 0x0102, "PidLidAppointmentTimeZoneDefinitionRecur", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The common long property types * Class identifier: 0062008-0000-0000-c000-000000000046 (PSETID_Common) */ libfmapi_property_type_t libfmapi_common_long_properties[ ] = { { 0x00008501, 0x0003, "PidLidReminderDelta", "Reminder minutes before start" }, { 0x00008502, 0x0040, "PidLidReminderTime", "Reminder time" }, { 0x00008503, 0x000b, "PidLidReminderSet", "Is reminder" }, { 0x00008506, 0x000b, "PidLidPrivate", "Is private" }, { 0x0000850e, 0x000b, "PidLidAgingDontAgeMe", "No aging" }, { 0x00008510, 0x0003, "PidLidSideEffects", "" }, { 0x00008514, 0x000b, "PidLidSmartNoAttach", "" }, { 0x00008516, 0x0040, "PidLidCommonStart", "Common start time" }, { 0x00008517, 0x0040, "PidLidCommonEnd", "Common end time" }, { 0x00008518, 0x0003, "PidLidTaskMode", "" }, { 0x00008519, 0x0102, "PidLidTaskGlobalId", "" }, { 0x0000851a, 0x0003, "PidLidAutoProcessState", "" }, { 0x0000851c, 0x000b, "PidLidReminderOverride", "" }, { 0x0000851d, 0x0003, "PidLidReminderType", "" }, { 0x0000851e, 0x000b, "PidLidReminderPlaySound", "" }, { 0x0000851f, 0x001e, "PidLidReminderFileParameter", "Reminder sound filename" }, { 0x00008520, 0x0102, "PidLidVerbStream", "" }, { 0x00008524, 0x001e, "PidLidVerbResponse", "" }, { 0x00008530, 0x001e, "PidLidFlagRequest", "" }, { 0x00008534, 0x001e, "PidLidMileage", "Mileage" }, { 0x00008535, 0x001e, "PidLidBillingInformation", "Billing information" }, { 0x00008536, 0x001e, "PidLidNonSendtableTo", "" }, { 0x00008537, 0x001e, "PidLidNonSendableCc", "" }, { 0x00008538, 0x001e, "PidLidNonSendableBcc", "" }, { 0x00008539, 0x101e, "PidLidCompanies", "Companies" }, { 0x0000853a, 0x101e, "PidLidContacts", "Contacts" }, { 0x00008543, 0x1003, "PidLidNonSendToTrackStatus", "" }, { 0x00008544, 0x1003, "PidLidNonSendCcTrackStatus", "" }, { 0x00008545, 0x1003, "PidLidNonSendBccTrackStatus", "" }, { 0x00008552, 0x0003, "PidLidCurrentVersion", "Outlook internal version" }, { 0x00008554, 0x001e, "PidLidCurrentVersionName", "Outlook version" }, { 0x00008560, 0x0040, "PidLidReminderSignalTime", "Reminder signal time" }, { 0x00008580, 0x001e, "PidLidInternetAccountName", "" }, { 0x00008581, 0x001e, "PidLidInternetAccountStamp", "" }, { 0x00008582, 0x000b, "PidLidUseTnef", "Use TNEF" }, { 0x00008584, 0x0102, "PidLidContactLinkSearchKey", "" }, { 0x00008585, 0x0102, "PidLidContactLinkEntry", "" }, { 0x00008586, 0x001e, "PidLidContactLinkName", "" }, { 0x0000859c, 0x0102, "PidLidSpamOriginalFolder", "" }, { 0x000085a0, 0x0040, "PidLidToDoOrdinalDate", "" }, { 0x000085a1, 0x001e, "PidLidToDoSubOrdinal", "" }, { 0x000085a4, 0x001e, "PidLidToDoTitle", "" }, { 0x000085b1, 0x001e, "PidLidInfoPathFormName", "" }, { 0x000085b5, 0x000b, "PidLidClassified", "" }, { 0x000085b6, 0x001e, "PidLidClassification", "" }, { 0x000085b7, 0x001e, "PidLidClassificationDescription", "" }, { 0x000085b8, 0x001e, "PidLidClassificationGuid", "" }, { 0x000085ba, 0x000b, "PidLidClassificationKeep", "" }, { 0x000085bd, 0x0102, "PidLidReferenceEntryId", "" }, { 0x000085bf, 0x0040, "PidLidValidFlagStringProof", "" }, { 0x000085c0, 0x0003, "PidLidFlagString", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The journal long property types * Class identifier: 0006200a-0000-0000-c000-000000000046 (PSETID_Log) */ libfmapi_property_type_t libfmapi_journal_long_properties[ ] = { { 0x00008700, 0x001e, "PidLidLogType", "Type" }, { 0x00008706, 0x0040, "PidLidLogStart", "Start" }, { 0x00008707, 0x0003, "PidLidLogDuration", "Duration" }, { 0x00008708, 0x0040, "PidLidLogEnd", "End" }, { 0x0000870c, 0x0003, "PidLidLogFlags", "LogFlags" }, { 0x0000870e, 0x000b, "PidLidDocumentPrinted", "DocPrinted" }, { 0x0000870f, 0x000b, "PidLidDocumentSaved", "DocSaved" }, { 0x00008710, 0x000b, "PidLidDocumentRouted", "DocRouted" }, { 0x00008711, 0x000b, "PidLidDocumentPosted", "DocPosted" }, { 0x00008712, 0x001e, "PidLidLogTypeDesc", "TypeDescription" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The RSS feed long property types * Class identifier: 00062041-0000-0000-c000-000000000046 (PSETID_PostRSS) */ libfmapi_property_type_t libfmapi_rss_feed_long_properties[ ] = { { 0x00008900, 0x001e, "PidLidPostRssChannelLink", "Channel" }, { 0x00008901, 0x001e, "PidLidPostRssItemLink", "Item link" }, { 0x00008902, 0x0003, "PidLidPostRssItemHash", "Item Hash" }, { 0x00008903, 0x001e, "PidLidPostRssItemGuid", "Item GUID" }, { 0x00008904, 0x001e, "PidLidPostRssChannel", "Channel GUID" }, { 0x00008905, 0x001e, "PidLidPostRssItemXml", "Item XML" }, { 0x00008906, 0x001e, "PidLidPostRssSubscription", "Subscription" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Sharing long property types * Class identifier: 0062040-0000-0000-c000-000000000046 (PSETID_Sharing) */ libfmapi_property_type_t libfmapi_sharing_long_properties[ ] = { { 0x00008a00, 0x0003, "PidLidSharingStatus", "" }, { 0x00008a01, 0x0102, "PidLidSharingProviderGuid", "" }, { 0x00008a02, 0x001e, "PidLidSharingProviderName", "" }, { 0x00008a03, 0x001e, "PidLidSharingProviderUrl", "" }, { 0x00008a04, 0x001e, "PidLidSharingRemotePath", "" }, { 0x00008a05, 0x001e, "PidLidSharingRemoteName", "" }, { 0x00008a06, 0x001e, "PidLidSharingRemoteUid", "" }, { 0x00008a07, 0x001e, "PidLidSharingInitiatorName", "" }, { 0x00008a08, 0x001e, "PidLidSharingInitiatorSmtp", "" }, { 0x00008a09, 0x0102, "PidLidSharingInitiatorEntryId", "" }, { 0x00008a0a, 0x0003, "PidLidSharingFlags", "" }, { 0x00008a0b, 0x001e, "PidLidSharingProviderExtension", "" }, { 0x00008a0c, 0x001e, "PidLidSharingRemoteUser", "" }, { 0x00008a0d, 0x001e, "PidLidSharingRemotePass", "" }, { 0x00008a0e, 0x001e, "PidLidSharingLocalPath", "" }, { 0x00008a0f, 0x001e, "PidLidSharingLocalName", "" }, { 0x00008a10, 0x001e, "PidLidSharingLocalUid", "" }, { 0x00008a13, 0x0102, "PidLidSharingFilter", "" }, { 0x00008a14, 0x001e, "PidLidSharingLocalType", "" }, { 0x00008a15, 0x0102, "PidLidSharingFolderEntryId", "" }, { 0x00008a17, 0x0003, "PidLidSharingCapabilities", "" }, { 0x00008a18, 0x0003, "PidLidSharingFlavor", "" }, { 0x00008a19, 0x0003, "PidLidSharingAnonymity", "" }, { 0x00008a1a, 0x0003, "PidLidSharingReciprocation", "" }, { 0x00008a1b, 0x0003, "PidLidSharingPermissions", "" }, { 0x00008a1c, 0x0102, "PidLidSharingInstanceGuid", "" }, { 0x00008a1d, 0x001e, "PidLidSharingRemoteType", "" }, { 0x00008a1e, 0x001e, "PidLidSharingParticipants", "" }, { 0x00008a1f, 0x0040, "PidLidSharingLastSyncTime", "" }, { 0x00008a21, 0x001e, "PidLidSharingExtensionXml", "" }, { 0x00008a22, 0x0040, "PidLidSharingRemoteLastModificationTime", "" }, { 0x00008a23, 0x0040, "PidLidSharingLocalLastModificationTime", "" }, { 0x00008a24, 0x001e, "PidLidSharingConfigurationUrl", "" }, { 0x00008a25, 0x0040, "PidLidSharingStart", "" }, { 0x00008a26, 0x0040, "PidLidSharingStop", "" }, { 0x00008a27, 0x0003, "PidLidSharingResponseType", "" }, { 0x00008a28, 0x0040, "PidLidSharingResponseTime", "" }, { 0x00008a29, 0x0102, "PidLidSharingOriginalMessageEntryId", "" }, { 0x00008a2a, 0x0003, "PidLidSharingSyncInterval", "" }, { 0x00008a2b, 0x0003, "PidLidSharingDetail", "" }, { 0x00008a2c, 0x0003, "PidLidSharingTimeToLive", "" }, { 0x00008a2d, 0x0102, "PidLidSharingBindingEntryId", "" }, { 0x00008a2e, 0x0102, "PidLidSharingIndexEntryId", "" }, { 0x00008a2f, 0x001e, "PidLidSharingRemoteComment", "" }, { 0x00008a40, 0x0040, "PidLidSharingWorkingHoursStart", "" }, { 0x00008a41, 0x0040, "PidLidSharingWorkingHoursEnd", "" }, { 0x00008a42, 0x0003, "PidLidSharingWorkingHoursDay", "" }, { 0x00008a43, 0x0102, "PidLidSharingWorkingHoursTimeZone", "" }, { 0x00008a44, 0x0040, "PidLidSharingDataRangeStart", "" }, { 0x00008a45, 0x0040, "PidLidSharingDataRangeEnd", "" }, { 0x00008a46, 0x0003, "PidLidSharingRangeStart", "" }, { 0x00008a47, 0x0003, "PidLidSharingRangeEnd", "" }, { 0x00008a48, 0x001e, "PidLidSharingRemoteStoreUid", "" }, { 0x00008a49, 0x001e, "PidLidSharingLocalStoreUid", "" }, { 0x00008a4b, 0x0003, "PidLidSharingRemoteByteSize", "" }, { 0x00008a4c, 0x0003, "PidLidSharingRemoteCrc", "" }, { 0x00008a4d, 0x001e, "PidLidSharingLocalComment", "" }, { 0x00008a4e, 0x0003, "PidLidSharingRoamLog", "" }, { 0x00008a4f, 0x0003, "PidLidSharingRemoteMessageCount", "" }, { 0x00008a51, 0x001e, "PidLidSharingBrowseUrl", "" }, { 0x00008a55, 0x0040, "PidLidSharingLastAutoSyncTime", "" }, { 0x00008a56, 0x0003, "PidLidSharingTimeToLiveAuto", "" }, { 0x00008a5b, 0x001e, "PidLidSharingRemoteVersion", "" }, { 0x00008a5c, 0x0102, "PidLidSharingParentBindingEntryId", "" }, { 0x00008a60, 0x0003, "PidLidSharingSyncFlags", "" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Sticky note long property types * Class identifier: 0006200e-0000-0000-c000-000000000046 (PSETID_Note) */ libfmapi_property_type_t libfmapi_sticky_note_long_properties[ ] = { { 0x00008b00, 0x0003, "PidLidNoteColor", "Color" }, { 0x00008b02, 0x0003, "PidLidNoteWidth", "Width" }, { 0x00008b03, 0x0003, "PidLidNoteHeight", "Height" }, { 0x00008b04, 0x0003, "PidLidNoteX", "Left" }, { 0x00008b05, 0x0003, "PidLidNoteY", "Top" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Public strings long property types * Class identifier: 0020329-0000-0000-c000-000000000046 (PS_PUBLIC_STRINGS) */ libfmapi_property_type_t libfmapi_public_strings_long_properties[ ] = { { 0x00002328, 0x101e, "PidLidCategories", "Categories" }, { (uint32_t) -1, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Public strings named property types * Class identifier: 0020329-0000-0000-c000-000000000046 (PS_PUBLIC_STRINGS) */ libfmapi_named_property_type_t libfmapi_public_strings_named_properties[ ] = { { 8, "AppName", 0x001e, "PidNameApplicationName", "Application name" }, { 7, "Author", 0x001e, "PidNameAuthor", "Author" }, { 10, "ByteCount", 0x0003, "PidNameByteCount", "Byte size" }, { 9, "Category", 0x001e, "PidNameCategory", "Category" }, { 10, "CharCount", 0x0003, "PidNameCharacterCount", "Number of characters" }, { 9, "Comments", 0x001e, "PidNameComments", "Comments" }, { 8, "Company", 0x001e, "PidNameCompany", "Company" }, { 12, "CreateDtmRo", 0x0040, "PidNameCreateDateTimeReadOnly", "Read only creation time" }, { 11, "DRMLicense", 0x1102, "PidNameRightsManagementLicense", "Digital rights management license" }, { 9, "EditTime", 0x001e, "PidNameEditTime", "" }, { 57, "http://schemas.microsoft.com/exchange/junkemailmovestamp", 0x0003, "PidNameJunkEmailMoveStamp", "" }, { 12, "HiddenCount", 0x0003, "PidNameHiddenCount", "" }, { 9, "Keywords", 0x101e, "PidNameKeywords", "Keywords" }, { 11, "LastAuthor", 0x001e, "PidNameLastAuthor", "" }, { 12, "LastPrinted", 0x0040, "PidNameLastPrinted", "" }, { 12, "LastSaveDtm", 0x0040, "PidNameLastSaveDateTime", "" }, { 10, "LineCount", 0x0003, "PidNameLineCount", "" }, { 8, "Manager", 0x001e, "PidNameManager", "" }, { 12, "MMClipCount", 0x0003, "PidNameMultimediaClipCount", "" }, { 10, "NoteCount", 0x0003, "PidNameNoteCount", "" }, { 15, "OMSAccountGuid", 0x001e, "PidNameOMSAccountGuid", "" }, { 15, "OMSMobileModel", 0x001e, "PidNameOMSMobileModel", "" }, { 16, "OMSScheduleTime", 0x0040, "PidNameOMSGScheduleTime", "" }, { 15, "OMSServiceType", 0x0003, "PidNameOMSServiceType", "" }, { 14, "OMSSourceType", 0x0003, "PidNameOMSSourceType", "" }, { 51, "http://schemas.microsoft.com/outlook/phishingstamp", 0x0003, "PidNamePhishingStamp", "" }, { 10, "PageCount", 0x0003, "PidNamePageCount", "" }, { 9, "ParCount", 0x0003, "PidNameParagraphCount", "" }, { 11, "PresFormat", 0x001e, "PidNamePresentationFormat", "" }, { 9, "Security", 0x0003, "PidNameSecurity", "" }, { 11, "SlideCount", 0x0003, "PidNameSlideCount", "" }, { 8, "Subject", 0x001e, "PidNameSubject", "" }, { 9, "Template", 0x001e, "PidNameTemplate", "" }, { 6, "Title", 0x001e, "PidNameTitle", "" }, { 10, "WordCount", 0x0003, "PidNameWordCount", "" }, { (size_t) -1, NULL, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Internet headers named property types * Class identifier: 00020386-0000-0000-c000-000000000046 (PS_INTERNET_HEADERS) */ libfmapi_named_property_type_t libfmapi_internet_headers_named_properties[ ] = { { 17, "Accept-Language", 0x001e, "PidNameAcceptLanguage", "Accept language" }, { 13, "Content-Base", 0x001e, "PidNameBodyContentBase", "Body content base" }, { 14, "Content-Class", 0x001e, "PidNameContentClass", "Content class" }, { 27, "Content-Transfer-Encoding", 0x001e, "PidNameContentTransferEncoding", "Content transfer encoding" }, { 14, "Content-Type", 0x001e, "PidNameContentType", "Content type" }, { 5, "Xref", 0x001e, "PidNameCrossReference", "Cross reference (Xref)" }, { 21, "X-Sharing-Browse-Url", 0x001e, "PidNameXSharingBrowseUrl", "Sharing browse URL" }, { 23, "X-Sharing-Capabilities", 0x001e, "PidNameXSharingCapabilities", "Sharing capabilities" }, { 21, "X-Sharing-Config-Url", 0x001e, "PidNameXSharingConfigUrl", "Sharing configuration URL" }, { 24, "X-Sharing-Extended-Caps", 0x001e, "PidNameXSharingExtendedCaps", "" }, { 17, "X-Sharing-Flavor", 0x001e, "PidNameXSharingFlavor", "" }, { 24, "X-Sharing-Instance-Guid", 0x001e, "PidNameXSharingInstanceGuid", "" }, { 21, "X-Sharing-Local-Type", 0x001e, "PidNameXSharingLocalType", "" }, { 24, "X-Sharing-Provider-Guid", 0x001e, "PidNameXSharingProviderGuid", "" }, { 24, "X-Sharing-Provider-Name", 0x001e, "PidNameXSharingProviderName", "" }, { 23, "X-Sharing-Provider-Url", 0x001e, "PidNameXSharingProviderUrl", "" }, { 22, "X-Sharing-Remote-Name", 0x001e, "PidNameXSharingRemoteName", "" }, { 22, "X-Sharing-Remote-Path", 0x001e, "PidNameXSharingRemotePath", "" }, { 27, "X-Sharing-Remote-Store-Uid", 0x001e, "PidNameXSharingRemoteStoreUid", "" }, { 22, "X-Sharing-Remote-Type", 0x001e, "PidNameXSharingRemoteType", "" }, { 21, "X-Sharing-Remote-Uid", 0x001e, "PidNameXSharingRemoteUid", "" }, { (size_t) -1, NULL, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Attachment named property types * Class identifier: 96357f7f-59e1-47d0-99a7-46515c183b54 (PSETID_Attachment) */ libfmapi_named_property_type_t libfmapi_attachment_named_properties[ ] = { { 25, "AttachmentMacContentType", 0x001e, "PidNameAttachmentMacContentType", "Attachment content type for Apple Macintosh" }, { 18, "AttachmentMacInfo", 0x0102, "PidNameAttachmentMacInfo", "Attachment information for Apple Macintosh" }, { (size_t) -1, NULL, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* The Unified messaging named property types * Class identifier: 442858e-a9e3-4e80-b900-317a210cc15b (PSETID_UnifiedMessaging) */ libfmapi_named_property_type_t libfmapi_unified_messaging_named_properties[ ] = { { 13, "UMAudioNotes", 0x001e, "PidNameAudioNotes", "Audio notes" }, { (size_t) -1, NULL, (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* Retrieves a string containing the property type identifier */ const char *libfmapi_property_types_get_identifier( libfmapi_property_type_t libfmapi_property_types[], uint32_t entry_type, uint32_t value_type ) { int iterator = 0; if( value_type == 0x001f ) { value_type = 0x001e; } else if( value_type == 0x101f ) { value_type = 0x101e; } while( ( libfmapi_property_types[ iterator ] ).entry_type != (uint32_t) -1 ) { if( ( ( libfmapi_property_types[ iterator ] ).entry_type == entry_type ) && ( ( libfmapi_property_types[ iterator ] ).value_type == value_type ) ) { break; } iterator++; } return( ( libfmapi_property_types[ iterator ] ).identifier ); } /* Retrieves a string containing the property type identifier */ const char *libfmapi_property_type_get_identifier( uint8_t *class_identifier, uint32_t entry_type, uint32_t value_type ) { if( class_identifier == NULL ) { if( entry_type == 0x0000 ) { return( "PidTagNull" ); } else if( ( entry_type >= 0x0001 ) && ( entry_type <= 0x0bff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_message_envelope_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x0c00 ) && ( entry_type <= 0x0dff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_recipient_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x0e00 ) && ( entry_type <= 0x0fff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_non_transmittable_message_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x1000 ) && ( entry_type <= 0x2fff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_message_content_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3000 ) && ( entry_type <= 0x32ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_common_object_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3300 ) && ( entry_type <= 0x33ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_form_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3400 ) && ( entry_type <= 0x35ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_message_store_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3600 ) && ( entry_type <= 0x36ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_folder_and_address_book_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3700 ) && ( entry_type <= 0x38ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_attachment_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3900 ) && ( entry_type <= 0x39ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_address_book_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3a00 ) && ( entry_type <= 0x3bff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_messaging_user_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3c00 ) && ( entry_type <= 0x3cff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_distribution_list_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3d00 ) && ( entry_type <= 0x3dff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_profile_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3e00 ) && ( entry_type <= 0x3fff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_status_object_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x4000 ) && ( entry_type <= 0x57ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_transport_provider_message_envelope_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x5800 ) && ( entry_type <= 0x5fff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_transport_provider_recipient_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x6000 ) && ( entry_type <= 0x65ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_client_non_transmittable_message_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x6600 ) && ( entry_type <= 0x67ef ) ) { return( libfmapi_property_types_get_identifier( libfmapi_service_provider_non_transmittable_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x67f0 ) && ( entry_type <= 0x67ff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_secure_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x6800 ) && ( entry_type <= 0x7bff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_custom_message_content_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x7c00 ) && ( entry_type <= 0x7fff ) ) { return( libfmapi_property_types_get_identifier( libfmapi_custom_message_non_transmittable_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x8000 ) && ( entry_type <= 0xfffe ) ) { return( libfmapi_property_types_get_identifier( libfmapi_custom_named_property_types, entry_type, value_type ) ); } else if( entry_type == 0xffff ) { return( "PROP_ID_INVALID" ); } } else if( memory_compare( class_identifier, libfmapi_class_identifier_calendar, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_calendar_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_address, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_address_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_task, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_task_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_appointment, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_appointment_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_common, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_common_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_journal, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_journal_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_rss_feed, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_rss_feed_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_sharing, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_sharing_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_sticky_note, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_sticky_note_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_public_strings, 16 ) == 0 ) { return( libfmapi_property_types_get_identifier( libfmapi_public_strings_long_properties, entry_type, value_type ) ); } return( "_UNKNOWN_" ); } /* Retrieves a string containing the property type description */ const char *libfmapi_property_types_get_description( libfmapi_property_type_t libfmapi_property_types[], uint32_t entry_type, uint32_t value_type ) { int iterator = 0; if( value_type == 0x001f ) { value_type = 0x001e; } else if( value_type == 0x101f ) { value_type = 0x101e; } while( ( libfmapi_property_types[ iterator ] ).entry_type != (uint32_t) -1 ) { if( ( ( libfmapi_property_types[ iterator ] ).entry_type == entry_type ) && ( ( libfmapi_property_types[ iterator ] ).value_type == value_type ) ) { break; } iterator++; } return( ( libfmapi_property_types[ iterator ] ).description ); } /* Retrieves a string containing the property type description */ const char *libfmapi_property_type_get_description( uint8_t *class_identifier, uint32_t entry_type, uint32_t value_type ) { if( class_identifier == NULL ) { if( entry_type == 0x0000 ) { return( "NULL" ); } else if( ( entry_type >= 0x0001 ) && ( entry_type <= 0x0bff ) ) { return( libfmapi_property_types_get_description( libfmapi_message_envelope_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x0c00 ) && ( entry_type <= 0x0dff ) ) { return( libfmapi_property_types_get_description( libfmapi_recipient_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x0e00 ) && ( entry_type <= 0x0fff ) ) { return( libfmapi_property_types_get_description( libfmapi_non_transmittable_message_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x1000 ) && ( entry_type <= 0x2fff ) ) { return( libfmapi_property_types_get_description( libfmapi_message_content_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3000 ) && ( entry_type <= 0x33ff ) ) { return( libfmapi_property_types_get_description( libfmapi_common_object_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3400 ) && ( entry_type <= 0x35ff ) ) { return( libfmapi_property_types_get_description( libfmapi_message_store_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3600 ) && ( entry_type <= 0x36ff ) ) { return( libfmapi_property_types_get_description( libfmapi_folder_and_address_book_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3700 ) && ( entry_type <= 0x38ff ) ) { return( libfmapi_property_types_get_description( libfmapi_attachment_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3900 ) && ( entry_type <= 0x39ff ) ) { return( libfmapi_property_types_get_description( libfmapi_address_book_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3a00 ) && ( entry_type <= 0x3bff ) ) { return( libfmapi_property_types_get_description( libfmapi_messaging_user_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3c00 ) && ( entry_type <= 0x3cff ) ) { return( libfmapi_property_types_get_description( libfmapi_distribution_list_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3d00 ) && ( entry_type <= 0x3dff ) ) { return( libfmapi_property_types_get_description( libfmapi_profile_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x3e00 ) && ( entry_type <= 0x3fff ) ) { return( libfmapi_property_types_get_description( libfmapi_status_object_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x4000 ) && ( entry_type <= 0x57ff ) ) { return( libfmapi_property_types_get_description( libfmapi_transport_provider_message_envelope_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x5800 ) && ( entry_type <= 0x5fff ) ) { return( libfmapi_property_types_get_description( libfmapi_transport_provider_recipient_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x6000 ) && ( entry_type <= 0x65ff ) ) { return( libfmapi_property_types_get_description( libfmapi_client_non_transmittable_message_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x6600 ) && ( entry_type <= 0x67ef ) ) { return( libfmapi_property_types_get_description( libfmapi_service_provider_non_transmittable_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x67f0 ) && ( entry_type <= 0x67ff ) ) { return( libfmapi_property_types_get_description( libfmapi_secure_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x6800 ) && ( entry_type <= 0x7bff ) ) { return( libfmapi_property_types_get_description( libfmapi_custom_message_content_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x7c00 ) && ( entry_type <= 0x7fff ) ) { return( libfmapi_property_types_get_description( libfmapi_custom_message_non_transmittable_property_types, entry_type, value_type ) ); } else if( ( entry_type >= 0x8000 ) && ( entry_type <= 0xfffe ) ) { return( libfmapi_property_types_get_description( libfmapi_custom_named_property_types, entry_type, value_type ) ); } else if( entry_type == 0xffff ) { return( "Invalid property" ); } } else if( memory_compare( class_identifier, libfmapi_class_identifier_calendar, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_calendar_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_address, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_address_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_task, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_task_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_appointment, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_appointment_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_common, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_common_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_journal, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_journal_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_rss_feed, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_rss_feed_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_sharing, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_sharing_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_sticky_note, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_sticky_note_long_properties, entry_type, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_public_strings, 16 ) == 0 ) { return( libfmapi_property_types_get_description( libfmapi_public_strings_long_properties, entry_type, value_type ) ); } return( "Unknown" ); } /* Retrieves a string containing the named property type identifier */ const char *libfmapi_named_property_types_get_identifier( libfmapi_named_property_type_t libfmapi_named_property_types[], const char *name, size_t name_size, uint32_t value_type ) { int iterator = 0; if( value_type == 0x001f ) { value_type = 0x001e; } else if( value_type == 0x101f ) { value_type = 0x101e; } while( ( libfmapi_named_property_types[ iterator ] ).name != NULL ) { if( ( ( libfmapi_named_property_types[ iterator ] ).name_size == name_size ) && ( libcstring_narrow_string_compare_no_case( ( libfmapi_named_property_types[ iterator ] ).name, name, name_size ) == 0 ) ) { break; } iterator++; } return( ( libfmapi_named_property_types[ iterator ] ).identifier ); } /* Retrieves a string containing the named property type identifier */ const char *libfmapi_named_property_type_get_identifier( uint8_t *class_identifier, const char *name, size_t name_size, uint32_t value_type ) { if( class_identifier != NULL ) { if( memory_compare( class_identifier, libfmapi_class_identifier_public_strings, 16 ) == 0 ) { return( libfmapi_named_property_types_get_identifier( libfmapi_public_strings_named_properties, name, name_size, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_internet_headers, 16 ) == 0 ) { return( libfmapi_named_property_types_get_identifier( libfmapi_internet_headers_named_properties, name, name_size, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_attachment, 16 ) == 0 ) { return( libfmapi_named_property_types_get_identifier( libfmapi_attachment_named_properties, name, name_size, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_unified_messaging, 16 ) == 0 ) { return( libfmapi_named_property_types_get_identifier( libfmapi_unified_messaging_named_properties, name, name_size, value_type ) ); } } return( "_UNKNOWN_" ); } /* Retrieves a string containing the named property type description */ const char *libfmapi_named_property_types_get_description( libfmapi_named_property_type_t libfmapi_named_property_types[], const char *name, size_t name_size, uint32_t value_type ) { int iterator = 0; if( value_type == 0x001f ) { value_type = 0x001e; } else if( value_type == 0x101f ) { value_type = 0x101e; } while( ( libfmapi_named_property_types[ iterator ] ).name != NULL ) { if( ( ( libfmapi_named_property_types[ iterator ] ).name_size == name_size ) && ( libcstring_narrow_string_compare_no_case( ( libfmapi_named_property_types[ iterator ] ).name, name, name_size ) == 0 ) ) { break; } iterator++; } return( ( libfmapi_named_property_types[ iterator ] ).description ); } /* Retrieves a string containing the named property type description */ const char *libfmapi_named_property_type_get_description( uint8_t *class_identifier, const char *name, size_t name_size, uint32_t value_type ) { if( class_identifier != NULL ) { if( memory_compare( class_identifier, libfmapi_class_identifier_public_strings, 16 ) == 0 ) { return( libfmapi_named_property_types_get_description( libfmapi_public_strings_named_properties, name, name_size, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_internet_headers, 16 ) == 0 ) { return( libfmapi_named_property_types_get_description( libfmapi_internet_headers_named_properties, name, name_size, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_attachment, 16 ) == 0 ) { return( libfmapi_named_property_types_get_description( libfmapi_attachment_named_properties, name, name_size, value_type ) ); } else if( memory_compare( class_identifier, libfmapi_class_identifier_unified_messaging, 16 ) == 0 ) { return( libfmapi_named_property_types_get_description( libfmapi_unified_messaging_named_properties, name, name_size, value_type ) ); } } return( "_UNKNOWN_" ); } #endif libpff-20120802/libfmapi/libfmapi_libcerror.h0000644000175000017500000000262012005155705015717 00000000000000/* * The internal libcerror header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBCERROR_H ) #define _LIBFMAPI_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #elif defined( HAVE_LIBCERROR_H ) /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #else #error Missing libcerror.h #endif #endif libpff-20120802/libfmapi/libfmapi_one_off_entry_identifier.c0000644000175000017500000010645312005155705020776 00000000000000/* * One-off entry identifier functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfmapi_definitions.h" #include "libfmapi_libcerror.h" #include "libfmapi_libcnotify.h" #include "libfmapi_libuna.h" #include "libfmapi_one_off_entry_identifier.h" /* Initialize an one-off entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_initialize( libfmapi_one_off_entry_identifier_t **entry_identifier, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_initialize"; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } if( *entry_identifier != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid entry identifier value already set.", function ); return( -1 ); } internal_entry_identifier = memory_allocate_structure( libfmapi_internal_one_off_entry_identifier_t ); if( internal_entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create entry identifier.", function ); goto on_error; } if( memory_set( internal_entry_identifier, 0, sizeof( libfmapi_internal_one_off_entry_identifier_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear entry identifier.", function ); goto on_error; } *entry_identifier = (libfmapi_one_off_entry_identifier_t *) internal_entry_identifier; return( 1 ); on_error: if( internal_entry_identifier != NULL ) { memory_free( internal_entry_identifier ); } return( -1 ); } /* Frees an one-off entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_free( libfmapi_one_off_entry_identifier_t **entry_identifier, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_free"; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } if( *entry_identifier != NULL ) { internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) *entry_identifier; *entry_identifier = NULL; if( internal_entry_identifier->display_name != NULL ) { memory_free( internal_entry_identifier->display_name ); } if( internal_entry_identifier->address_type != NULL ) { memory_free( internal_entry_identifier->address_type ); } if( internal_entry_identifier->email_address != NULL ) { memory_free( internal_entry_identifier->email_address ); } memory_free( internal_entry_identifier ); } return( 1 ); } /* Converts a byte stream into an one-off entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_copy_from_byte_stream( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_copy_from_byte_stream"; size_t byte_stream_index = 0; uint16_t supported_flags = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( byte_stream, internal_entry_identifier->version ); byte_stream += 2; byte_stream_size -= 2; if( internal_entry_identifier->version != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported version: %" PRIu16 ".", function, internal_entry_identifier->version ); goto on_error; } byte_stream_copy_to_uint16_little_endian( byte_stream, internal_entry_identifier->flags ); byte_stream += 2; byte_stream_size -= 2; supported_flags = LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_NO_RICH_INFO | LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_0x1000 | LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE; if( ( internal_entry_identifier->flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%04" PRIx16 ".", function, internal_entry_identifier->flags ); goto on_error; } if( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); goto on_error; } byte_stream_index = 0; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { while( ( byte_stream_index + 1 ) < byte_stream_size ) { if( ( byte_stream[ byte_stream_index ] == 0 ) && ( byte_stream[ byte_stream_index + 1 ] == 0 ) ) { break; } byte_stream_index += 2; } if( ( byte_stream[ byte_stream_index ] != 0 ) || ( byte_stream[ byte_stream_index + 1 ] != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported display name value in byte stream.", function ); goto on_error; } byte_stream_index += 2; } else { while( byte_stream_index < byte_stream_size ) { if( byte_stream[ byte_stream_index ] == 0 ) { break; } byte_stream_index += 1; } if( byte_stream[ byte_stream_index ] != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported display name value in byte stream.", function ); return( -1 ); } byte_stream_index += 1; } internal_entry_identifier->display_name = (uint8_t *) memory_allocate( sizeof( uint8_t ) * byte_stream_index ); if( internal_entry_identifier->display_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create display name.", function ); goto on_error; } if( memory_copy( internal_entry_identifier->display_name, byte_stream, byte_stream_index ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy display name.", function ); goto on_error; } internal_entry_identifier->display_name_size = byte_stream_index; byte_stream += byte_stream_index; byte_stream_size -= byte_stream_index; if( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); goto on_error; } byte_stream_index = 0; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { while( ( byte_stream_index + 1 ) < byte_stream_size ) { if( ( byte_stream[ byte_stream_index ] == 0 ) && ( byte_stream[ byte_stream_index + 1 ] == 0 ) ) { break; } byte_stream_index += 2; } if( ( byte_stream[ byte_stream_index ] != 0 ) || ( byte_stream[ byte_stream_index + 1 ] != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported address type value in byte stream.", function ); goto on_error; } byte_stream_index += 2; } else { while( byte_stream_index < byte_stream_size ) { if( byte_stream[ byte_stream_index ] == 0 ) { break; } byte_stream_index += 1; } if( byte_stream[ byte_stream_index ] != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported address type value in byte stream.", function ); goto on_error; } byte_stream_index += 1; } internal_entry_identifier->address_type = (uint8_t *) memory_allocate( sizeof( uint8_t ) * byte_stream_index ); if( internal_entry_identifier->address_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create address type.", function ); goto on_error; } if( memory_copy( internal_entry_identifier->address_type, byte_stream, byte_stream_index ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy address type.", function ); goto on_error; } internal_entry_identifier->address_type_size = byte_stream_index; byte_stream += byte_stream_index; byte_stream_size -= byte_stream_index; if( byte_stream_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); goto on_error; } byte_stream_index = 0; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { while( ( byte_stream_index + 1 ) < byte_stream_size ) { if( ( byte_stream[ byte_stream_index ] == 0 ) && ( byte_stream[ byte_stream_index + 1 ] == 0 ) ) { break; } byte_stream_index += 2; } if( ( byte_stream[ byte_stream_index ] != 0 ) || ( byte_stream[ byte_stream_index + 1 ] != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported email address value in byte stream.", function ); goto on_error; } byte_stream_index += 2; } else { while( byte_stream_index < byte_stream_size ) { if( byte_stream[ byte_stream_index ] == 0 ) { break; } byte_stream_index += 1; } if( byte_stream[ byte_stream_index ] != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported email address value in byte stream.", function ); goto on_error; } byte_stream_index += 1; } internal_entry_identifier->email_address = (uint8_t *) memory_allocate( sizeof( uint8_t ) * byte_stream_index ); if( internal_entry_identifier->email_address == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create email address.", function ); goto on_error; } if( memory_copy( internal_entry_identifier->email_address, byte_stream, byte_stream_index ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy email address.", function ); goto on_error; } internal_entry_identifier->email_address_size = byte_stream_index; byte_stream += byte_stream_index; byte_stream_size -= byte_stream_index; #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( byte_stream_size > 0 ) ) { libcnotify_printf( "%s: trailing data:\n", function ); libcnotify_print_data( byte_stream, byte_stream_size, 0 ); } #endif return( 1 ); on_error: if( internal_entry_identifier->email_address != NULL ) { memory_free( internal_entry_identifier->email_address ); internal_entry_identifier->email_address = NULL; } if( internal_entry_identifier->address_type != NULL ) { memory_free( internal_entry_identifier->address_type ); internal_entry_identifier->address_type = NULL; } if( internal_entry_identifier->display_name != NULL ) { memory_free( internal_entry_identifier->display_name ); internal_entry_identifier->display_name = NULL; } return( -1 ); } /* Retrieves the UTF-8 string size of the one-off entry identifier display name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf8_display_name_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf8_display_name_size"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf8_string_size_from_utf16_stream( internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ); } else { result = libuna_utf8_string_size_from_byte_stream( internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, ascii_codepage, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string of the one-off entry identifier display name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf8_display_name( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf8_display_name"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, LIBUNA_ENDIAN_LITTLE, error ); } else { result = libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size of the one-off entry identifier display name * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf16_display_name_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf16_display_name_size"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf16_string_size_from_utf16_stream( internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ); } else { result = libuna_utf16_string_size_from_byte_stream( internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, ascii_codepage, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string of the one-off entry identifier display name * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf16_display_name( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf16_display_name"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, LIBUNA_ENDIAN_LITTLE, error ); } else { result = libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, internal_entry_identifier->display_name, internal_entry_identifier->display_name_size, ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size of the one-off entry identifier address type * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf8_address_type_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf8_address_type_size"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf8_string_size_from_utf16_stream( internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ); } else { result = libuna_utf8_string_size_from_byte_stream( internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, ascii_codepage, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string of the one-off entry identifier address type * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf8_address_type( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf8_address_type"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, LIBUNA_ENDIAN_LITTLE, error ); } else { result = libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size of the one-off entry identifier address type * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf16_address_type_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf16_address_type_size"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf16_string_size_from_utf16_stream( internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ); } else { result = libuna_utf16_string_size_from_byte_stream( internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, ascii_codepage, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string of the one-off entry identifier address type * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf16_address_type( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf16_address_type"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, LIBUNA_ENDIAN_LITTLE, error ); } else { result = libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, internal_entry_identifier->address_type, internal_entry_identifier->address_type_size, ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string size of the one-off entry identifier email address * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf8_email_address_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf8_email_address_size"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf8_string_size_from_utf16_stream( internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ); } else { result = libuna_utf8_string_size_from_byte_stream( internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, ascii_codepage, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string of the one-off entry identifier email address * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf8_email_address( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf8_email_address"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, LIBUNA_ENDIAN_LITTLE, error ); } else { result = libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size of the one-off entry identifier email address * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf16_email_address_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf16_email_address_size"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf16_string_size_from_utf16_stream( internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ); } else { result = libuna_utf16_string_size_from_byte_stream( internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, ascii_codepage, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string of the one-off entry identifier email address * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libfmapi_one_off_entry_identifier_get_utf16_email_address( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_one_off_entry_identifier_get_utf16_email_address"; int result = 0; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_one_off_entry_identifier_t *) entry_identifier; if( ( internal_entry_identifier->flags & LIBFMAPI_ONE_OFF_ENTRY_IDENTIFIER_FLAG_UNICODE ) != 0 ) { result = libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, LIBUNA_ENDIAN_LITTLE, error ); } else { result = libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, internal_entry_identifier->email_address, internal_entry_identifier->email_address_size, ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-16 string.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libfmapi/libfmapi_property_type.h0000644000175000017500000000631512005155705016666 00000000000000/* * Property type functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_PROPERTY_TYPE_H ) #define _LIBFMAPI_PROPERTY_TYPE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libfmapi_property_type libfmapi_property_type_t; struct libfmapi_property_type { /* The entry type */ uint32_t entry_type; /* The value type */ uint32_t value_type; /* The identifier */ const char *identifier; /* The description */ const char *description; }; typedef struct libfmapi_named_property_type libfmapi_named_property_type_t; struct libfmapi_named_property_type { /* The name size */ size_t name_size; /* The name */ const char *name; /* The value type */ uint32_t value_type; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libfmapi_property_types_get_identifier( libfmapi_property_type_t libfmapi_property_types[], uint32_t entry_type, uint32_t value_type ); const char *libfmapi_property_type_get_identifier( uint8_t *class_identifier, uint32_t entry_type, uint32_t value_type ); const char *libfmapi_property_types_get_description( libfmapi_property_type_t libfmapi_property_types[], uint32_t entry_type, uint32_t value_type ); const char *libfmapi_property_type_get_description( uint8_t *class_identifier, uint32_t entry_type, uint32_t value_type ); const char *libfmapi_named_property_types_get_identifier( libfmapi_named_property_type_t libfmapi_named_property_types[], const char *name, size_t name_size, uint32_t value_type ); const char *libfmapi_named_property_type_get_identifier( uint8_t *class_identifier, const char *name, size_t name_size, uint32_t value_type ); const char *libfmapi_named_property_types_get_description( libfmapi_named_property_type_t libfmapi_named_property_types[], const char *name, size_t name_size, uint32_t value_type ); const char *libfmapi_named_property_type_get_description( uint8_t *class_identifier, const char *name, size_t name_size, uint32_t value_type ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_entry_identifier.c0000644000175000017500000001460712005155705017302 00000000000000/* * Entry identifier (ENTRYID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfmapi_definitions.h" #include "libfmapi_entry_identifier.h" #include "libfmapi_libcerror.h" #include "libfmapi_libfguid.h" /* Initialize an entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_entry_identifier_initialize( libfmapi_entry_identifier_t **entry_identifier, libcerror_error_t **error ) { libfmapi_internal_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_entry_identifier_initialize"; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } if( *entry_identifier != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid entry identifier value already set.", function ); return( -1 ); } internal_entry_identifier = memory_allocate_structure( libfmapi_internal_entry_identifier_t ); if( internal_entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create entry identifier.", function ); goto on_error; } if( memory_set( internal_entry_identifier, 0, sizeof( libfmapi_internal_entry_identifier_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear entry identifier.", function ); goto on_error; } if( libfguid_identifier_initialize( &( internal_entry_identifier->service_provider_identifier ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create service provider identifier.", function ); goto on_error; } *entry_identifier = (libfmapi_entry_identifier_t *) internal_entry_identifier; return( 1 ); on_error: if( internal_entry_identifier != NULL ) { memory_free( internal_entry_identifier ); } return( -1 ); } /* Frees an entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_entry_identifier_free( libfmapi_entry_identifier_t **entry_identifier, libcerror_error_t **error ) { libfmapi_internal_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_entry_identifier_free"; int result = 1; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } if( *entry_identifier != NULL ) { internal_entry_identifier = (libfmapi_internal_entry_identifier_t *) *entry_identifier; *entry_identifier = NULL; if( libfguid_identifier_free( &( internal_entry_identifier->service_provider_identifier ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free service provider identifier.", function ); result = -1; } memory_free( internal_entry_identifier ); } return( result ); } /* Converts a byte stream into an entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_entry_identifier_copy_from_byte_stream( libfmapi_entry_identifier_t *entry_identifier, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ) { libfmapi_internal_entry_identifier_t *internal_entry_identifier = NULL; static char *function = "libfmapi_entry_identifier_copy_from_byte_stream"; if( entry_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry identifier.", function ); return( -1 ); } internal_entry_identifier = (libfmapi_internal_entry_identifier_t *) entry_identifier; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size < 20 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: byte stream size exceeds maximum.", function ); return( -1 ); } if( memory_copy( internal_entry_identifier->flags, byte_stream, 4 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy flags.", function ); return( -1 ); } byte_stream += 4; if( libfguid_identifier_copy_from_byte_stream( internal_entry_identifier->service_provider_identifier, byte_stream, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy service provider identifier from byte stream.", function ); return( -1 ); } byte_stream += 16; return( 1 ); } libpff-20120802/libfmapi/libfmapi_lzfu.c0000644000175000017500000004126212005155705014714 00000000000000/* * LZFu (un)compression functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfmapi_crc.h" #include "libfmapi_libcerror.h" #include "libfmapi_libcnotify.h" #include "libfmapi_lzfu.h" #define LIBFMAPI_LZFU_SIGNATURE_COMPRESSED 0x75465a4c #define LIBFMAPI_LZFU_SIGNATURE_UNCOMPRESSED 0x414c454d const char *libfmapi_lzfu_rtf_dictionary = \ "{\\rtf1\\ansi\\mac\\deff0\\deftab720" "{\\fonttbl;}" "{\\f0\\fnil \\froman \\fswiss \\fmodern \\fscript \\fdecor MS Sans SerifSymbolArialTimes New RomanCourier" "{\\colortbl\\red0\\green0\\blue0\r\n\\par \\pard\\plain\\f0\\fs20\\b\\i\\u\\tab\\tx"; /* Determines the uncompressed data size from the LZFu header in the compressed data * Returns 1 on success or -1 on error */ int libfmapi_lzfu_get_uncompressed_data_size( uint8_t *compressed_data, size_t compressed_data_size, size_t *uncompressed_data_size, libcerror_error_t **error ) { libfmapi_lzfu_header_t lzfu_header; uint8_t *lzfu_data = 0; static char *function = "libfmapi_lzfu_get_uncompressed_data_size"; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t lz_buffer[ 4096 ]; uint8_t *lzfu_reference_data = 0; size_t compressed_data_iterator = 0; size_t uncompressed_data_iterator = 0; uint16_t lz_buffer_iterator = 0; uint16_t reference_offset = 0; uint16_t reference_size = 0; uint16_t reference_iterator = 0; uint8_t flag_byte_bit_mask = 0; uint8_t flag_byte = 0; #endif if( compressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid compressed data.", function ); return( -1 ); } if( compressed_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid compressed data size value exceeds maximum.", function ); return( -1 ); } if( uncompressed_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data size.", function ); return( -1 ); } lzfu_data = compressed_data; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.compressed_data_size ); lzfu_data += 4; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.uncompressed_data_size ); lzfu_data += 4; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.signature ); lzfu_data += 8; if( ( lzfu_header.signature != LIBFMAPI_LZFU_SIGNATURE_COMPRESSED ) && ( lzfu_header.signature != LIBFMAPI_LZFU_SIGNATURE_UNCOMPRESSED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported compression signature: 0x%08" PRIx32 ".", function, lzfu_header.signature ); return( -1 ); } compressed_data_size -= sizeof( libfmapi_lzfu_header_t ); /* The compressed data size includes 12 bytes of the header */ lzfu_header.compressed_data_size -= 12; if( (size_t) lzfu_header.compressed_data_size != compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in compressed data size (%" PRIu32 " != %" PRIzd ").", function, lzfu_header.compressed_data_size, compressed_data_size ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( memory_copy( lz_buffer, libfmapi_lzfu_rtf_dictionary, 207 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to initialize lz buffer.", function ); return( -1 ); } lz_buffer_iterator = 207; if( memory_set( &( lz_buffer[ lz_buffer_iterator ] ), 0, 4096 - lz_buffer_iterator ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear lz buffer.", function ); return( -1 ); } while( compressed_data_iterator < (size_t) lzfu_header.compressed_data_size ) { flag_byte = lzfu_data[ compressed_data_iterator++ ]; /* Check every bit in the chunk flag byte from LSB to MSB */ for( flag_byte_bit_mask = 0x01; flag_byte_bit_mask != 0x00; flag_byte_bit_mask <<= 1 ) { if( compressed_data_iterator == (size_t) lzfu_header.compressed_data_size ) { break; } /* Check if the byte value is a literal or a reference */ if( ( flag_byte & flag_byte_bit_mask ) == 0 ) { lz_buffer[ lz_buffer_iterator++ ] = lzfu_data[ compressed_data_iterator ]; uncompressed_data_iterator++; compressed_data_iterator++; /* Make sure the lz buffer iterator wraps around */ lz_buffer_iterator %= 4096; lz_buffer[ lz_buffer_iterator ] = 0; } else { lzfu_reference_data = &( lzfu_data[ compressed_data_iterator ] ); compressed_data_iterator += 2; byte_stream_copy_to_uint16_big_endian( lzfu_reference_data, reference_offset ); reference_size = ( reference_offset & 0x000f ) + 2; reference_offset >>= 4; for( reference_iterator = 0; reference_iterator < reference_size; reference_iterator++ ) { lz_buffer[ lz_buffer_iterator++ ] = lz_buffer[ reference_offset ]; uncompressed_data_iterator++; reference_offset++; /* Make sure the lz buffer iterator and reference offset wrap around */ lz_buffer_iterator %= 4096; reference_offset %= 4096; lz_buffer[ lz_buffer_iterator ] = 0; } } } } if( (size_t) ( lzfu_header.uncompressed_data_size + 2 ) != uncompressed_data_iterator ) { libcnotify_printf( "%s: mismatch in uncompressed data size (in header: %" PRIu32 " != required: %" PRIzd ").\n", function, lzfu_header.uncompressed_data_size + 2, uncompressed_data_iterator ); } } #endif /* Compensate for the 2 trailing zero bytes */ *uncompressed_data_size = lzfu_header.uncompressed_data_size + 2; return( 1 ); } /* Compresses data using LZFu compression * Returns 1 on success or -1 on error */ int libfmapi_lzfu_compress( uint8_t *compressed_data, size_t *compressed_data_size, uint8_t *uncompressed_data, size_t uncompressed_data_size, libcerror_error_t **error ) { static char *function = "libfmapi_lzfu_compress"; if( compressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid compressed data.", function ); return( -1 ); } if( compressed_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid compressed data size.", function ); return( -1 ); } if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data.", function ); return( -1 ); } if( uncompressed_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid uncompressed data size value exceeds maximum.", function ); return( -1 ); } /* TODO implement */ libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: NOT IMPLEMENTED YET", function ); return( -1 ); } /* Decompresses data using LZFu compression * Returns 1 on success or -1 on error */ int libfmapi_lzfu_decompress( uint8_t *uncompressed_data, size_t *uncompressed_data_size, uint8_t *compressed_data, size_t compressed_data_size, libcerror_error_t **error ) { libfmapi_lzfu_header_t lzfu_header; uint8_t lz_buffer[ 4096 ]; uint8_t *lzfu_data = 0; uint8_t *lzfu_reference_data = 0; static char *function = "libfmapi_lzfu_decompress"; size_t compressed_data_iterator = 0; size_t uncompressed_data_iterator = 0; uint32_t calculated_crc = 0; uint16_t lz_buffer_iterator = 0; uint16_t reference_offset = 0; uint16_t reference_size = 0; uint16_t reference_iterator = 0; uint8_t flag_byte_bit_mask = 0; uint8_t flag_byte = 0; if( uncompressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data.", function ); return( -1 ); } if( uncompressed_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid uncompressed data size.", function ); return( -1 ); } if( compressed_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid compressed data.", function ); return( -1 ); } if( compressed_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid compressed data size value exceeds maximum.", function ); return( -1 ); } if( memory_copy( lz_buffer, libfmapi_lzfu_rtf_dictionary, 207 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to initialize lz buffer.", function ); return( -1 ); } lz_buffer_iterator = 207; if( memory_set( &( lz_buffer[ lz_buffer_iterator ] ), 0, 4096 - lz_buffer_iterator ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear lz buffer.", function ); return( -1 ); } lzfu_data = compressed_data; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.compressed_data_size ); lzfu_data += 4; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.uncompressed_data_size ); lzfu_data += 4; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.signature ); lzfu_data += 4; byte_stream_copy_to_uint32_little_endian( lzfu_data, lzfu_header.crc ); lzfu_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: lzfu header compressed data size\t: %" PRIu32 "\n", function, lzfu_header.compressed_data_size ); libcnotify_printf( "%s: lzfu header uncompressed data size\t: %" PRIu32 "\n", function, lzfu_header.uncompressed_data_size ); libcnotify_printf( "%s: lzfu header signature\t\t\t: 0x08%" PRIx32 "\n", function, lzfu_header.signature ); libcnotify_printf( "%s: lzfu header crc\t\t\t: %" PRIu32 "\n", function, lzfu_header.crc ); } #endif if( ( lzfu_header.signature != LIBFMAPI_LZFU_SIGNATURE_COMPRESSED ) && ( lzfu_header.signature != LIBFMAPI_LZFU_SIGNATURE_UNCOMPRESSED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported compression signature: 0x%08" PRIx32 ".", function, lzfu_header.signature ); return( -1 ); } compressed_data_size -= sizeof( libfmapi_lzfu_header_t ); /* The compressed data size includes 12 bytes of the header */ lzfu_header.compressed_data_size -= 12; if( lzfu_header.compressed_data_size != compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in compressed data size (%" PRIu32 " != %" PRIzd ").", function, lzfu_header.compressed_data_size, compressed_data_size ); return( -1 ); } /* Make sure the uncompressed buffer is large enough */ if( *uncompressed_data_size < lzfu_header.uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data too small.", function ); *uncompressed_data_size = lzfu_header.uncompressed_data_size; return( -1 ); } if( libfmapi_crc32_weak_calculate( &calculated_crc, lzfu_data, (size_t) lzfu_header.compressed_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to calculate weak CRC.", function ); return( -1 ); } if( lzfu_header.crc != calculated_crc ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in checksum ( %" PRIu32 " != %" PRIu32 " ).", function, lzfu_header.crc, calculated_crc ); return( -1 ); } while( compressed_data_iterator < (size_t) lzfu_header.compressed_data_size ) { flag_byte = lzfu_data[ compressed_data_iterator++ ]; /* Check every bit in the chunk flag byte from LSB to MSB */ for( flag_byte_bit_mask = 0x01; flag_byte_bit_mask != 0x00; flag_byte_bit_mask <<= 1 ) { if( compressed_data_iterator == (size_t) lzfu_header.compressed_data_size ) { break; } /* Check if the byte value is a literal or a reference */ if( ( flag_byte & flag_byte_bit_mask ) == 0 ) { if( compressed_data_iterator >= (size_t) lzfu_header.compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing compressed data.", function ); *uncompressed_data_size = 0; return( -1 ); } if( uncompressed_data_iterator >= *uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data too small.", function ); *uncompressed_data_size = uncompressed_data_iterator; return( -1 ); } lz_buffer[ lz_buffer_iterator++ ] = lzfu_data[ compressed_data_iterator ]; uncompressed_data[ uncompressed_data_iterator++ ] = lzfu_data[ compressed_data_iterator ]; compressed_data_iterator++; /* Make sure the lz buffer iterator wraps around */ lz_buffer_iterator %= 4096; lz_buffer[ lz_buffer_iterator ] = 0; } else { if( ( compressed_data_iterator + 1 ) >= (size_t) lzfu_header.compressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing compressed data.", function ); *uncompressed_data_size = 0; return( -1 ); } lzfu_reference_data = &( lzfu_data[ compressed_data_iterator ] ); compressed_data_iterator += 2; byte_stream_copy_to_uint16_big_endian( lzfu_reference_data, reference_offset ); reference_size = ( reference_offset & 0x000f ) + 2; reference_offset >>= 4; if( ( uncompressed_data_iterator + reference_size - 1 ) >= *uncompressed_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: uncompressed data too small.", function ); *uncompressed_data_size = uncompressed_data_iterator + reference_size; return( -1 ); } for( reference_iterator = 0; reference_iterator < reference_size; reference_iterator++ ) { lz_buffer[ lz_buffer_iterator++ ] = lz_buffer[ reference_offset ]; uncompressed_data[ uncompressed_data_iterator++ ] = lz_buffer[ reference_offset ]; reference_offset++; /* Make sure the lz buffer iterator and reference offset wrap around */ lz_buffer_iterator %= 4096; reference_offset %= 4096; lz_buffer[ lz_buffer_iterator ] = 0; } } } } *uncompressed_data_size = uncompressed_data_iterator; return( 1 ); } libpff-20120802/libfmapi/libfmapi_types.h0000644000175000017500000000243312005155705015102 00000000000000/* * The internal type definitions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_INTERNAL_TYPES_H ) #define _LIBFMAPI_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFMAPI for local use of libfmapi * The definitions in are copied here * for local use of libfmapi */ #if defined( HAVE_LOCAL_LIBFMAPI ) /* The following type definitions hide internal data structures */ typedef intptr_t libfmapi_entry_identifier_t; typedef intptr_t libfmapi_one_off_entry_identifier_t; #endif #endif libpff-20120802/libfmapi/libfmapi_service_provider_identifier.h0000644000175000017500000000254512005155705021516 00000000000000/* * Service provider identifier functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_SERVICE_PROVIDER_IDENTIFIER_H ) #define _LIBFMAPI_SERVICE_PROVIDER_IDENTIFIER_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern uint8_t libfmapi_service_provider_identifier_one_off_entry_identifier[ 16 ]; extern uint8_t libfmapi_service_provider_identifier_x500_address[ 16 ]; #if defined( HAVE_DEBUG_OUTPUT ) const char *libfmapi_service_provider_identifier_get_name( uint8_t *service_provider_identifier ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_codepage.h0000644000175000017500000000267012005155705015510 00000000000000/* * Codepage functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_INTERNAL_CODEPAGE_H ) #define _LIBFMAPI_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) typedef struct libfmapi_codepage libfmapi_codepage_t; struct libfmapi_codepage { /* The codepage */ uint32_t codepage; /* The identifier */ const char *identifier; /* The description */ const char *description; }; const char *libfmapi_codepage_get_identifier( uint32_t codepage ); const char *libfmapi_codepage_get_description( uint32_t codepage ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_libcnotify.h0000644000175000017500000000264212005155705016102 00000000000000/* * The internal libcnotify header * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBCNOTIFY_H ) #define _LIBFMAPI_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #elif defined( HAVE_LIBCNOTIFY_H ) /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #else #error Missing libcnotify.h #endif #endif libpff-20120802/libfmapi/libfmapi_guid.h0000644000175000017500000000203412005155705014663 00000000000000/* * GUID functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_GUID_H ) #define _LIBFMAPI_GUID_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern uint8_t libfmapi_guid_public_strings[ 16 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/Makefile.in0000664000175000017500000006756512006536016014011 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfmapi DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfmapi_la_LIBADD = am__libfmapi_la_SOURCES_DIST = libfmapi_class_identifier.c \ libfmapi_class_identifier.h libfmapi_codepage.c \ libfmapi_codepage.h libfmapi_crc.c libfmapi_crc.h \ libfmapi_debug.c libfmapi_debug.h libfmapi_definitions.h \ libfmapi_entry_identifier.c libfmapi_entry_identifier.h \ libfmapi_extern.h libfmapi_guid.c libfmapi_guid.h \ libfmapi_libcerror.h libfmapi_libcnotify.h \ libfmapi_libcstring.h libfmapi_libfdatetime.h \ libfmapi_libfguid.h libfmapi_libfwnt.h libfmapi_libuna.h \ libfmapi_lzfu.c libfmapi_lzfu.h \ libfmapi_one_off_entry_identifier.c \ libfmapi_one_off_entry_identifier.h libfmapi_property_type.c \ libfmapi_property_type.h \ libfmapi_service_provider_identifier.c \ libfmapi_service_provider_identifier.h libfmapi_types.h \ libfmapi_value_type.c libfmapi_value_type.h \ libfmapi_x400_object_identifier.h @HAVE_LOCAL_LIBFMAPI_TRUE@am_libfmapi_la_OBJECTS = \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_class_identifier.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_codepage.lo libfmapi_crc.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_debug.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_entry_identifier.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_guid.lo libfmapi_lzfu.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_one_off_entry_identifier.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_property_type.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_service_provider_identifier.lo \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_value_type.lo libfmapi_la_OBJECTS = $(am_libfmapi_la_OBJECTS) @HAVE_LOCAL_LIBFMAPI_TRUE@am_libfmapi_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfmapi_la_SOURCES) DIST_SOURCES = $(am__libfmapi_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFMAPI_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFMAPI_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFMAPI_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBFDATETIME_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBFGUID_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBFWNT_CPPFLAGS@ \ @HAVE_LOCAL_LIBFMAPI_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFMAPI_TRUE@noinst_LTLIBRARIES = libfmapi.la @HAVE_LOCAL_LIBFMAPI_TRUE@libfmapi_la_SOURCES = \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_class_identifier.c libfmapi_class_identifier.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_codepage.c libfmapi_codepage.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_crc.c libfmapi_crc.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_debug.c libfmapi_debug.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_definitions.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_entry_identifier.c libfmapi_entry_identifier.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_extern.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_guid.c libfmapi_guid.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcerror.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcnotify.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcstring.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libfdatetime.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libfguid.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libfwnt.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libuna.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_lzfu.c libfmapi_lzfu.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_one_off_entry_identifier.c libfmapi_one_off_entry_identifier.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_property_type.c libfmapi_property_type.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_service_provider_identifier.c libfmapi_service_provider_identifier.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_types.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_value_type.c libfmapi_value_type.h \ @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_x400_object_identifier.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfmapi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfmapi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfmapi.la: $(libfmapi_la_OBJECTS) $(libfmapi_la_DEPENDENCIES) $(LINK) $(am_libfmapi_la_rpath) $(libfmapi_la_OBJECTS) $(libfmapi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_class_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_codepage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_crc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_entry_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_guid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_lzfu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_one_off_entry_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_property_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_service_provider_identifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_value_type.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfmapi ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfmapi_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfmapi/libfmapi_one_off_entry_identifier.h0000644000175000017500000001221612005155705020774 00000000000000/* * One-off entry identifier functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_INTERNAL_ONE_OFF_ENTRY_IDENTIFIER_H ) #define _LIBFMAPI_INTERNAL_ONE_OFF_ENTRY_IDENTIFIER_H #include #include #include "libfmapi_extern.h" #include "libfmapi_libcerror.h" #include "libfmapi_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfmapi_internal_one_off_entry_identifier libfmapi_internal_one_off_entry_identifier_t; struct libfmapi_internal_one_off_entry_identifier { /* The version */ uint16_t version; /* The flags */ uint16_t flags; /* The display name */ uint8_t *display_name; /* The display name size */ size_t display_name_size; /* The address type */ uint8_t *address_type; /* The address type size */ size_t address_type_size; /* The email address */ uint8_t *email_address; /* The email address size */ size_t email_address_size; }; LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_initialize( libfmapi_one_off_entry_identifier_t **entry_identifier, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_free( libfmapi_one_off_entry_identifier_t **entry_identifier, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_copy_from_byte_stream( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf8_display_name_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf8_display_name( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf16_display_name_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf16_display_name( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf8_address_type_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf8_address_type( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf16_address_type_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf16_address_type( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf8_email_address_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf8_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf8_email_address( libfmapi_one_off_entry_identifier_t *entry_identifier, uint8_t *utf8_string, size_t utf8_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf16_email_address_size( libfmapi_one_off_entry_identifier_t *entry_identifier, size_t *utf16_string_size, int ascii_codepage, libcerror_error_t **error ); LIBFMAPI_EXTERN \ int libfmapi_one_off_entry_identifier_get_utf16_email_address( libfmapi_one_off_entry_identifier_t *entry_identifier, uint16_t *utf16_string, size_t utf16_string_size, int ascii_codepage, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_debug.c0000644000175000017500000035354312005155705015032 00000000000000/* * Debug functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfmapi_class_identifier.h" #include "libfmapi_codepage.h" #include "libfmapi_definitions.h" #include "libfmapi_debug.h" #include "libfmapi_entry_identifier.h" #include "libfmapi_libcerror.h" #include "libfmapi_libcnotify.h" #include "libfmapi_libcstring.h" #include "libfmapi_libfdatetime.h" #include "libfmapi_libfguid.h" #include "libfmapi_libfwnt.h" #include "libfmapi_libuna.h" #include "libfmapi_lzfu.h" #include "libfmapi_one_off_entry_identifier.h" #include "libfmapi_service_provider_identifier.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Function to determine if there are zero bytes in a string * Trailing zero bytes not included * Returns 1 if the buffer contains zero bytes, 0 if not or -1 on error */ int libfmapi_debug_string_contains_zero_bytes( uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { static char *function = "libfmapi_debug_string_contains_zero_bytes"; size_t buffer_iterator = 0; uint8_t zero_byte_found = 0; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( buffer_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid buffer size value exceeds maximum.", function ); return( -1 ); } for( buffer_iterator = 0; buffer_iterator < buffer_size; buffer_iterator++ ) { if( zero_byte_found == 0 ) { if( buffer[ buffer_iterator ] == 0 ) { zero_byte_found = 1; } } else { if( buffer[ buffer_iterator ] != 0 ) { return( 1 ); } } } return( 0 ); } /* Prints the entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_entry_identifier( uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { libcstring_system_character_t guid_string[ 48 ]; libfmapi_internal_entry_identifier_t *entry_identifier = NULL; uint8_t *service_provider_identifier = NULL; static char *function = "libfmapi_debug_print_entry_identifier"; uint32_t value_32bit = 0; int result = 0; if( libfmapi_entry_identifier_initialize( (libfmapi_entry_identifier_t **) &entry_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create entry identifier.", function ); return( -1 ); } if( libfmapi_entry_identifier_copy_from_byte_stream( (libfmapi_entry_identifier_t *) entry_identifier, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry identifier.", function ); libfmapi_entry_identifier_free( (libfmapi_entry_identifier_t **) &entry_identifier, NULL ); return( -1 ); } service_provider_identifier = &( value_data[ 4 ] ); value_data += 20; value_data_size -= 20; libcnotify_printf( "Entry identifier:\n" ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( entry_identifier->service_provider_identifier, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( entry_identifier->service_provider_identifier, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); return( -1 ); } libcnotify_printf( "Flags\t\t\t\t: 0x%02" PRIx8 ", 0x%02" PRIx8 ", 0x%02" PRIx8 ", 0x%02" PRIx8 "\n", entry_identifier->flags[ 0 ], entry_identifier->flags[ 1 ], entry_identifier->flags[ 2 ], entry_identifier->flags[ 3 ] ); libcnotify_printf( "Service provider identifier\t: %" PRIs_LIBCSTRING_SYSTEM " (%s)\n", guid_string, libfmapi_service_provider_identifier_get_name( service_provider_identifier ) ); libcnotify_printf( "Object identifier data:\n" ); if( memory_compare( service_provider_identifier, &libfmapi_service_provider_identifier_one_off_entry_identifier, 16 ) == 0 ) { if( libfmapi_debug_print_one_off_entry_identifier( value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print one-off entry identifier.", function ); return( -1 ); } } else if( memory_compare( service_provider_identifier, &libfmapi_service_provider_identifier_x500_address, 16 ) == 0 ) { libcnotify_print_data( value_data, value_data_size, 0 ); } else if( value_data_size == 4 ) { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); libcnotify_printf( "Descriptor identifier\t\t: %" PRIu32 "\n", value_32bit ); libcnotify_printf( "\n" ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } if( libfmapi_entry_identifier_free( (libfmapi_entry_identifier_t **) &entry_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free entry identifier.", function ); return( -1 ); } return( 1 ); } /* Prints the one-off entry identifier * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_one_off_entry_identifier( uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { libfmapi_internal_one_off_entry_identifier_t *one_off_entry_identifier = NULL; libcstring_system_character_t *value_string = NULL; static char *function = "libfmapi_debug_print_one_off_entry_identifier"; size_t value_string_size = 0; int result = 0; libcnotify_printf( "One-off entry identifier:\n" ); if( libfmapi_one_off_entry_identifier_initialize( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create one-off entry identifier.", function ); return( -1 ); } if( libfmapi_one_off_entry_identifier_copy_from_byte_stream( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry identifier.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } libcnotify_printf( "Version\t\t\t\t: %" PRIu16 "\n", one_off_entry_identifier->version ); libcnotify_printf( "Flags\t\t\t\t: 0x%04" PRIx16 "\n", one_off_entry_identifier->flags ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfmapi_one_off_entry_identifier_get_utf16_display_name_size( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, &value_string_size, ascii_codepage, error ); #else result = libfmapi_one_off_entry_identifier_get_utf8_display_name_size( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, &value_string_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfmapi_one_off_entry_identifier_get_utf16_display_name( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, (uint16_t *) value_string, value_string_size, ascii_codepage, error ); #else result = libfmapi_one_off_entry_identifier_get_utf8_display_name( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, (uint8_t *) value_string, value_string_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } libcnotify_printf( "Display name\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", value_string ); memory_free( value_string ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfmapi_one_off_entry_identifier_get_utf16_address_type_size( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, &value_string_size, ascii_codepage, error ); #else result = libfmapi_one_off_entry_identifier_get_utf8_address_type_size( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, &value_string_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfmapi_one_off_entry_identifier_get_utf16_address_type( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, (uint16_t *) value_string, value_string_size, ascii_codepage, error ); #else result = libfmapi_one_off_entry_identifier_get_utf8_address_type( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, (uint8_t *) value_string, value_string_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } libcnotify_printf( "Address type\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", value_string ); memory_free( value_string ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfmapi_one_off_entry_identifier_get_utf16_email_address_size( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, &value_string_size, ascii_codepage, error ); #else result = libfmapi_one_off_entry_identifier_get_utf8_email_address_size( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, &value_string_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfmapi_one_off_entry_identifier_get_utf16_email_address( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, (uint16_t *) value_string, value_string_size, ascii_codepage, error ); #else result = libfmapi_one_off_entry_identifier_get_utf8_email_address( (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier, (uint8_t *) value_string, value_string_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, NULL ); return( -1 ); } libcnotify_printf( "Email address\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", value_string ); memory_free( value_string ); libcnotify_printf( "\n" ); if( libfmapi_one_off_entry_identifier_free( (libfmapi_one_off_entry_identifier_t **) &one_off_entry_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free one-off entry identifier.", function ); return( -1 ); } return( 1 ); } /* Prints the MAPI value * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { libcstring_system_character_t filetime_string[ 32 ]; libcstring_system_character_t guid_string[ 48 ]; libfdatetime_filetime_t *filetime = NULL; libfguid_identifier_t *guid = NULL; libcstring_system_character_t *value_string = NULL; static char *function = "libfmapi_debug_print_value"; size_t value_string_size = 0; double value_double = 0.0; float value_float = 0.0; uint64_t value_64bit = 0; uint32_t value_32bit = 0; uint8_t is_ascii_string = 0; int result = 0; switch( value_type ) { case 0x0003: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( libfmapi_debug_print_integer_32bit_value( entry_type, value_type, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print 32-bit integer MAPI value.", function ); return( -1 ); } break; case 0x0004: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); if( memory_copy( &value_float, &value_32bit, sizeof( uint32_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to convert 32-bit value into float.", function ); return( -1 ); } libcnotify_printf( "Floating point single precision value\t: %f\n\n", value_float ); break; case 0x0005: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } byte_stream_copy_to_uint64_little_endian( value_data, value_64bit ); if( memory_copy( &value_double, &value_64bit, sizeof( uint64_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to convert 64-bit value into double.", function ); return( -1 ); } libcnotify_printf( "Floating point double precision value\t: %f\n\n", value_double ); break; case 0x000b: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } libcnotify_printf( "Boolean\t: " ); if( value_data[ 0 ] == 0 ) { libcnotify_printf( "false" ); } else { libcnotify_printf( "true" ); } libcnotify_printf( "\n\n" ); break; case 0x000d: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_data_size == 8 ) { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); value_data += 4; value_data_size -= 4; libcnotify_printf( "local descriptor identifier\t: %" PRIu32 "\n", value_32bit ); byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); value_data += 4; value_data_size -= 4; libcnotify_printf( "unknown\t\t\t\t: %" PRIu32 "\n", value_32bit ); libcnotify_printf( "\n" ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x0014: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } byte_stream_copy_to_uint64_little_endian( value_data, value_64bit ); libcnotify_printf( "integer 64-bit signed\t: %" PRId64 " (0x%" PRIx64 ")\n\n", (int64_t) value_64bit, value_64bit ); break; case 0x0040: if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( libfdatetime_filetime_initialize( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create filetime.", function ); return( -1 ); } if( libfdatetime_filetime_copy_from_byte_stream( filetime, value_data, value_data_size, LIBFDATETIME_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to filetime.", function ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_filetime_copy_to_utf16_string( filetime, (uint16_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #else result = libfdatetime_filetime_copy_to_utf8_string( filetime, (uint8_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to string.", function ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } if( libfdatetime_filetime_free( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free filetime.", function ); return( -1 ); } libcnotify_printf( "Filetime\t: %" PRIs_LIBCSTRING_SYSTEM " UTC\n\n", filetime_string ); break; case 0x0048: if( value_data == NULL ) { libcnotify_printf( "GUID\t: \n\n" ); } else if( value_data_size == 16 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } libcnotify_printf( "GUID\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n", guid_string ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x001e: if( value_data == NULL ) { libcnotify_printf( "ASCII string\t: \n\n" ); } else { is_ascii_string = 1; /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ascii_codepage == 1200 ) { result = libfmapi_debug_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #endif } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf7_stream( value_data, value_data_size, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf7_stream( value_data, value_data_size, &value_string_size, error ); #endif } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf8_stream( value_data, value_data_size, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf8_stream( value_data, value_data_size, &value_string_size, error ); #endif } else { /* TODO currently libuna uses the same numeric values for the codepages as libfmapi * add a mapping function if this implementation changes */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( value_data, value_data_size, ascii_codepage, &value_string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( value_data, value_data_size, ascii_codepage, &value_string_size, error ); #endif } /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); return( -1 ); } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf7_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, error ); #else result = libuna_utf8_string_copy_from_utf7_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, error ); #endif } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf8_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, error ); #else result = libuna_utf8_string_copy_from_utf8_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, error ); #endif } else { /* TODO currently libuna uses the same numeric values for the codepages as libfmapi * add a mapping function if this implementation changes */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, (int) ascii_codepage, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, (int) ascii_codepage, error ); #endif } /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); return( -1 ); } libcnotify_printf( "ASCII string\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n", value_string ); memory_free( value_string ); } break; case 0x001f: if( value_data == NULL ) { libcnotify_printf( "Unicode string\t: \n\n" ); } else { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #else result = libuna_utf8_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, &value_string_size, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); return( -1 ); } libcnotify_printf( "Unicode string\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n", value_string ); memory_free( value_string ); } break; case 0x0102: if( value_data == NULL ) { libcnotify_printf( "Binary data\t: \n\n" ); } else if( libfmapi_debug_print_binary_data_value( entry_type, value_type, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print binary data MAPI value.", function ); return( -1 ); } break; case 0x1002: case 0x1003: case 0x1014: case 0x1040: case 0x1048: if( libfmapi_debug_print_array_multi_value( entry_type, value_type, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print MAPI array multi value.", function ); return( -1 ); } break; case 0x101e: case 0x101f: case 0x1102: if( libfmapi_debug_print_element_multi_value( entry_type, value_type, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print MAPI element multi value.", function ); return( -1 ); } break; default: libcnotify_print_data( value_data, value_data_size, 0 ); break; }; return( 1 ); } /* Prints the 32-bit signed integer MAPI value * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_integer_32bit_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, libcerror_error_t **error ) { static char *function = "libfmapi_debug_print_integer_32bit_value"; uint32_t value_32bit = 0; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_type != 0x0003 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } if( value_data_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value data size.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); switch( entry_type ) { case 0x0001: libcnotify_printf( "Acknowledgment mode\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "Manual" ); break; case 1: libcnotify_printf( "Automatic" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x0017: libcnotify_printf( "Importance\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "Low (IMPORTANCE_LOW)" ); break; case 1: libcnotify_printf( "Normal (IMPORTANCE_NORMAL)" ); break; case 2: libcnotify_printf( "High (IMPORTANCE_HIGH)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x0026: libcnotify_printf( "Priority\t: " ); switch( value_32bit ) { case (uint32_t) -1: libcnotify_printf( "Non urgent (PRIO_NONURGENT)" ); break; case 0: libcnotify_printf( "Normal (PRIO_NORMAL)" ); break; case 1: libcnotify_printf( "Urgent (PRIO_URGENT)" ); break; default: libcnotify_printf( "%" PRId32 "", (int32_t) value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x002e: case 0x0036: libcnotify_printf( "Sensitivity\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "None (SENSITIVITY_NONE)" ); break; case 1: libcnotify_printf( "Personal (SENSITIVITY_PERSONAL)" ); break; case 2: libcnotify_printf( "Private (SENSITIVITY_PRIVATE)" ); break; case 3: libcnotify_printf( "Company confidential (SENSITIVITY_COMPANY_CONFIDENTIAL)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x0c15: libcnotify_printf( "Recipient type\t: " ); switch( value_32bit & 0x0fffffff ) { case 0: libcnotify_printf( "Originator (MAPI_ORIG)" ); break; case 1: libcnotify_printf( "To (MAPI_TO)" ); break; case 2: libcnotify_printf( "CC (MAPI_CC)" ); break; case 3: libcnotify_printf( "BCC (MAPI_BCC)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); if( ( value_32bit & 0x10000000L ) != 0 ) { libcnotify_printf( "\tResend (MAPI_P1)\n" ); } if( ( value_32bit & 0x80000000L ) != 0 ) { libcnotify_printf( "\tAlready processed (MAPI_SUBMITTED)\n" ); } break; case 0x0e07: libcnotify_printf( "Message flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tRead (MSGFLAG_READ)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tUnmodified (MSGFLAG_UNMODIFIED)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tSubmit (MSGFLAG_SUBMIT)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tUnsent (MSGFLAG_UNSENT)\n" ); } if( ( value_32bit & 0x000000010 ) != 0 ) { libcnotify_printf( "\tHas attachment(s) (MSGFLAG_HASATTACH)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\tFrom me (MSGFLAG_FROMME)\n" ); } if( ( value_32bit & 0x000000040 ) != 0 ) { libcnotify_printf( "\tAssociated (MSGFLAG_ASSOCIATED)\n" ); } if( ( value_32bit & 0x000000080 ) != 0 ) { libcnotify_printf( "\tResend (MSGFLAG_RESEND)\n" ); } if( ( value_32bit & 0x000000100 ) != 0 ) { libcnotify_printf( "\tRead notification pending (MSGFLAG_RN_PENDING)\n" ); } if( ( value_32bit & 0x000000200 ) != 0 ) { libcnotify_printf( "\tNon-Read notification pending (MSGFLAG_NRN_PENDING)\n" ); } if( ( value_32bit & 0x000001000 ) != 0 ) { libcnotify_printf( "\tOrigin X.400 (MSGFLAG_ORIGIN_X400)\n" ); } if( ( value_32bit & 0x000002000 ) != 0 ) { libcnotify_printf( "\tOrigin Internet (MSGFLAG_ORIGIN_INTERNET)\n" ); } if( ( value_32bit & 0x000008000 ) != 0 ) { libcnotify_printf( "\tOrigin external (MSGFLAG_ORIGIN_MISC_EXT)\n" ); } break; case 0x0e14: libcnotify_printf( "Message submit flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tLocked by MAPI spooler (SUBMITFLAG_LOCKED)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tPreprocessing needed (SUBMITFLAG_PREPROCESS)\n" ); } break; case 0x0e17: libcnotify_printf( "Message status flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tHighlighted (MSGSTATUS_HIGHLIGHTED)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tTagged (MSGSTATUS_TAGGED)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tHidden (MSGSTATUS_HIDDEN)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tMarked for deletion (MSGSTATUS_DELMARKED)\n" ); } if( ( value_32bit & 0x000000100 ) != 0 ) { libcnotify_printf( "\tDraft (MSGSTATUS_DRAFT)\n" ); } if( ( value_32bit & 0x000000200 ) != 0 ) { libcnotify_printf( "\tHas been answered (MSGSTATUS_ANSWERED)\n" ); } if( ( value_32bit & 0x000001000 ) != 0 ) { libcnotify_printf( "\tMarked for download from server (MSGSTATUS_REMOTE_DOWNLOAD)\n" ); } if( ( value_32bit & 0x000002000 ) != 0 ) { libcnotify_printf( "\tMarked for deletion on server (MSGSTATUS_REMOTE_DELETE)\n" ); } break; case 0x0ff4: libcnotify_printf( "Access flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tWrite (MAPI_ACCESS_MODIFY)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tRead (MAPI_ACCESS_READ)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tDeletion (MAPI_ACCESS_DELETE)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tCreate folder (MAPI_ACCESS_CREATE_HIERARCHY)\n" ); } if( ( value_32bit & 0x000000010 ) != 0 ) { libcnotify_printf( "\tCreate message (MAPI_ACCESS_CREATE_CONTENTS)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\tCreate associated item (MAPI_ACCESS_CREATE_ASSOCIATED)\n" ); } break; case 0x0ffe: libcnotify_printf( "Object type\t: " ); switch( value_32bit ) { case 1: libcnotify_printf( "Message store (MAPI_STORE)" ); break; case 2: libcnotify_printf( "Address book (MAPI_ADDRBOOK)" ); break; case 3: libcnotify_printf( "Folder (MAPI_FOLDER)" ); break; case 4: libcnotify_printf( "Address book container (MAPI_ABCONT)" ); break; case 5: libcnotify_printf( "Message (MAPI_MESSAGE)" ); break; case 6: libcnotify_printf( "Recipient (MAPI_MAILUSER)" ); break; case 7: libcnotify_printf( "Attachment (MAPI_ATTACH)" ); break; case 8: libcnotify_printf( "Distribution list (MAPI_DISTLIST)" ); break; case 9: libcnotify_printf( "Profile section (MAPI_PROFSECT)" ); break; case 10: libcnotify_printf( "Status object (MAPI_STATUS)" ); break; case 11: libcnotify_printf( "Session (MAPI_SESSION)" ); break; case 12: libcnotify_printf( "Form information (MAPI_FORMINFO)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x3009: /* TODO determine difference between message service and service provider, but how ? */ libcnotify_printf( "Resource flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\t(SERVICE_DEFAULT_STORE or STATUS_DEFAULT_OUTBOUND)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\t(SERVICE_SINGLE_COPY or STATUS_DEFAULT_STORE)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\t(SERVICE_CREATE_WITH_STORE or STATUS_PRIMARY_IDENTITY)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\t(SERVICE_PRIMARY_IDENTITY or STATUS_SIMPLE_STORE)\n" ); } if( ( value_32bit & 0x000000010 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_XP_PREFER_LAST)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\t(SERVICE_NO_PRIMARY_IDENTITY or STATUS_NO_PRIMARY_IDENTITY)\n" ); } if( ( value_32bit & 0x000000040 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_NO_DEFAULT_STORE)\n" ); } if( ( value_32bit & 0x000000080 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_TEMP_SECTION)\n" ); } if( ( value_32bit & 0x000000100 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_OWN_STORE)\n" ); } if( ( value_32bit & 0x000000200 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or HOOK_INBOUND)\n" ); } if( ( value_32bit & 0x000000400 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or HOOK_OUTBOUND)\n" ); } if( ( value_32bit & 0x000000800 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_NEED_IPM_TREE)\n" ); } if( ( value_32bit & 0x000001000 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_PRIMARY_STORE)\n" ); } if( ( value_32bit & 0x000002000 ) != 0 ) { libcnotify_printf( "\t(_UNKNOWN_ or STATUS_SECONDARY_STORE)\n" ); } break; case 0x340d: case 0x6611: libcnotify_printf( "Message store characteristics flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tEntry identifiers are unique, not reused (STORE_ENTRYID_UNIQUE)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tRead-only (STORE_READONLY)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tSearch-result folders support (STORE_SEARCH_OK)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tMessage modification support (STORE_MODIFY_OK)\n" ); } if( ( value_32bit & 0x000000010 ) != 0 ) { libcnotify_printf( "\tMessage creation support (STORE_CREATE_OK)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\tAttachment support (STORE_ATTACH_OK)\n" ); } if( ( value_32bit & 0x000000040 ) != 0 ) { libcnotify_printf( "\tOLE attachment support (STORE_OLE_OK)\n" ); } if( ( value_32bit & 0x000000080 ) != 0 ) { libcnotify_printf( "\tMessage submission marking support (STORE_SUBMIT_OK)\n" ); } if( ( value_32bit & 0x000000100 ) != 0 ) { libcnotify_printf( "\tNotification support (STORE_NOTIFY_OK)\n" ); } if( ( value_32bit & 0x000000200 ) != 0 ) { libcnotify_printf( "\tMulti-value property support (STORE_MV_PROPS_OK)\n" ); } if( ( value_32bit & 0x000000400 ) != 0 ) { libcnotify_printf( "\tCategorized view support (STORE_CATEGORIZE_OK)\n" ); } if( ( value_32bit & 0x000000800 ) != 0 ) { libcnotify_printf( "\tCompressed RTF message support (STORE_RTF_OK)\n" ); } if( ( value_32bit & 0x000001000 ) != 0 ) { libcnotify_printf( "\tRestriction support (STORE_RESTRICTION_OK)\n" ); } if( ( value_32bit & 0x000002000 ) != 0 ) { libcnotify_printf( "\tSorting view support (STORE_SORT_OK)\n" ); } if( ( value_32bit & 0x000004000 ) != 0 ) { libcnotify_printf( "\tFolders are public, multi-user accessible (STORE_PUBLIC_FOLDERS)\n" ); } if( ( value_32bit & 0x000008000 ) != 0 ) { libcnotify_printf( "\tUncompressed RTF message support (STORE_UNCOMPRESSED_RTF)\n" ); } if( ( value_32bit & 0x000010000 ) != 0 ) { libcnotify_printf( "\tHTML message support (STORE_HTML_OK)\n" ); } if( ( value_32bit & 0x000020000 ) != 0 ) { libcnotify_printf( "\t8-bit extended ASCII string support (STORE_ANSI_OK)\n" ); } if( ( value_32bit & 0x000040000 ) != 0 ) { libcnotify_printf( "\tUTF-16 little-endian string support (STORE_UNICODE_OK)\n" ); } if( ( value_32bit & 0x000080000 ) != 0 ) { libcnotify_printf( "\tReserved (STORE_LOCALSTORE)\n" ); } if( ( value_32bit & 0x000200000 ) != 0 ) { libcnotify_printf( "\tItem processing support (STORE_ITEMPROC)\n" ); } if( ( value_32bit & 0x000800000 ) != 0 ) { libcnotify_printf( "\tChange push support, no index crawling (STORE_PUSHER_OK)\n" ); } break; case 0x35df: libcnotify_printf( "Valid folder mask\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tSubtree (FOLDER_IPM_SUBTREE_VALID)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tInbox (FOLDER_IPM_INBOX_VALID)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tOutbox (FOLDER_IPM_OUTBOX_VALID)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tDeleted Items (FOLDER_IPM_WASTEBOX_VALID)\n" ); } if( ( value_32bit & 0x000000010 ) != 0 ) { libcnotify_printf( "\tSent Items (FOLDER_IPM_SENTMAIL_VALID)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\tViews (FOLDER_VIEWS_VALID)\n" ); } if( ( value_32bit & 0x000000040 ) != 0 ) { libcnotify_printf( "\tCommon views (FOLDER_COMMON_VIEWS_VALID)\n" ); } if( ( value_32bit & 0x000000080 ) != 0 ) { libcnotify_printf( "\tFinder (FOLDER_FINDER_VALID)\n" ); } break; case 0x3600: libcnotify_printf( "Containter flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tCan have recipients (AB_RECIPIENTS)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tCan have sub containers (AB_SUBCONTAINERS)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tCan be modified (AB_MODIFIABLE)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tCannot be modified (AB_UNMODIFIABLE)\n" ); } if( ( value_32bit & 0x000000010 ) != 0 ) { libcnotify_printf( "\tRequest restriction (AB_FIND_ON_OPEN)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\tIs default (AB_NOT_DEFAULT)\n" ); } break; case 0x3601: libcnotify_printf( "Folder type\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "Root (FOLDER_ROOT)" ); break; case 1: libcnotify_printf( "Generic (FOLDER_GENERIC)" ); break; case 2: libcnotify_printf( "Search (FOLDER_SEARCH)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x3705: libcnotify_printf( "Attachment method\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "None (NO_ATTACHMENT)" ); break; case 1: libcnotify_printf( "By value (ATTACH_BY_VALUE)" ); break; case 2: libcnotify_printf( "By reference (ATTACH_BY_REFERENCE)" ); break; case 3: libcnotify_printf( "By reference resolve (ATTACH_BY_REF_RESOLVE)" ); break; case 4: libcnotify_printf( "By reference only (ATTACH_BY_REF_ONLY)" ); break; case 5: libcnotify_printf( "Embedded message (ATTACH_EMBEDDED_MSG)" ); break; case 6: libcnotify_printf( "OLE (ATTACH_OLE)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x3a4d: libcnotify_printf( "Gender\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "Unspecified (genderUnspecified)" ); break; case 1: libcnotify_printf( "Female (genderFemale)" ); break; case 2: libcnotify_printf( "Male (genderMale)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x3fde: case 0x3ffd: libcnotify_printf( "Codepage\t: %s (%s)\n", libfmapi_codepage_get_description( value_32bit ), libfmapi_codepage_get_identifier( value_32bit ) ); break; case 0x5909: libcnotify_printf( "Message editor format\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "Unknown editor (EDITOR_FORMAT_DONTKNOW)" ); break; case 1: libcnotify_printf( "Plain text editor (EDITOR_FORMAT_PLAINTEXT)" ); break; case 2: libcnotify_printf( "HTML editor (EDITOR_FORMAT_HTML)" ); break; case 3: libcnotify_printf( "Rich text (RTF) editor (EDITOR_FORMAT_RTF)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; case 0x6623: libcnotify_printf( "RPC over HTTP (ROH) flags\t: 0x%08" PRIx32 "\n", value_32bit ); if( ( value_32bit & 0x000000001 ) != 0 ) { libcnotify_printf( "\tUse RPC over HTTP (ROHFLAGS_USE_ROH)\n" ); } if( ( value_32bit & 0x000000002 ) != 0 ) { libcnotify_printf( "\tOnly use SSL (ROHFLAGS_SSL_ONLY)\n" ); } if( ( value_32bit & 0x000000004 ) != 0 ) { libcnotify_printf( "\tUse SSL mutual authentication (ROHFLAGS_MUTUAL_AUTH)\n" ); } if( ( value_32bit & 0x000000008 ) != 0 ) { libcnotify_printf( "\tOn fast networks use HTTP first (ROHFLAGS_HTTP_FIRST_ON_FAST)\n" ); } if( ( value_32bit & 0x000000020 ) != 0 ) { libcnotify_printf( "\tOn slow networks use HTTP first (ROHFLAGS_HTTP_FIRST_ON_SLOW)\n" ); } break; case 0x6627: libcnotify_printf( "RPC over HTTP (ROH) authentication scheme\t: " ); switch( value_32bit ) { case 0: libcnotify_printf( "Basic authentication (ROHAUTH_BASIC)" ); break; case 1: libcnotify_printf( "NTLM authentication (ROHAUTH_NTLM)" ); break; default: libcnotify_printf( "%" PRIu32 "", value_32bit ); break; } libcnotify_printf( "\n" ); break; /* TODO Appointment color 0x00008214 */ /* TODO Appointment response status 0x00008218 */ default: libcnotify_printf( "Integer 32-bit signed\t: %" PRId32 "\n", (int32_t) value_32bit ); break; } libcnotify_printf( "\n" ); return( 1 ); } /* Prints the binary data MAPI value * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_binary_data_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { uint8_t filetime_buffer[ 8 ]; libcstring_system_character_t filetime_string[ 32 ]; libcstring_system_character_t guid_string[ 48 ]; libcstring_system_character_t sid_string[ 128 ]; libfdatetime_filetime_t *delta_filetime = NULL; libfdatetime_filetime_t *filetime = NULL; libfguid_identifier_t *guid = NULL; libfwnt_security_identifier_t *sid = NULL; libcstring_system_character_t *value_string = NULL; uint8_t *rtf_value_string = NULL; uint8_t *value_data_pointer = NULL; static char *function = "libfmapi_debug_print_binary_data_value"; size_t rtf_value_string_size = 0; size_t sid_string_size = 0; size_t value_data_iterator = 0; size_t value_string_size = 0; uint64_t value_64bit = 0; uint32_t entries_size = 0; uint32_t number_of_values = 0; uint32_t value_32bit = 0; uint32_t value_iterator = 0; uint16_t value_16bit = 0; uint8_t data_size = 0; int list_iterator = 0; int result = 0; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_type != 0x0102 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } if( value_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: value data size exceeds maximum.", function ); return( -1 ); } switch( entry_type ) { case 0x000b: case 0x0025: case 0x0e30: case 0x0ff9: case 0x300b: case 0x683f: case 0x6842: if( value_data == NULL ) { libcnotify_printf( "GUID\t: \n\n" ); } else if( value_data_size == 16 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } libcnotify_printf( "GUID\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n", guid_string ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x003b: case 0x0051: case 0x0052: case 0x0c1d: libcnotify_printf( "ASCII string\t: " ); for( value_data_iterator = 0; value_data_iterator < value_data_size; value_data_iterator++ ) { if( value_data[ value_data_iterator ] != 0 ) { libcnotify_printf( "%c", (char) value_data[ value_data_iterator ] ); } } libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); break; case 0x003f: case 0x0041: case 0x0043: case 0x0045: case 0x0046: case 0x004c: case 0x0c19: case 0x0e34: case 0x0e0a: case 0x0fff: case 0x3ff9: case 0x3ffb: case 0x3416: case 0x35e0: case 0x35e2: case 0x35e3: case 0x35e4: case 0x35e5: case 0x35e6: case 0x35e7: case 0x36d0: case 0x36d1: case 0x36d2: case 0x36d3: case 0x36d4: case 0x36d5: case 0x36d6: case 0x36d7: case 0x3ff0: case 0x5ff7: case 0x7c07: /* 0x1102 */ case 0x36d8: case 0x36e4: if( value_data_size >= 20 ) { if( libfmapi_debug_print_entry_identifier( value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print entry identifier.", function ); return( -1 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x004f: if( value_data_size >= 8 ) { value_data_pointer = value_data; byte_stream_copy_to_uint32_little_endian( value_data_pointer, number_of_values ); value_data_pointer += 4; byte_stream_copy_to_uint32_little_endian( value_data_pointer, entries_size ); value_data_pointer += 4; if( entries_size < ( value_data_size - 8 ) ) { value_data_size -= 8; libcnotify_printf( "Number of entries\t: %" PRIu32 "\n", number_of_values ); libcnotify_printf( "Size of entries\t\t: %" PRIu32 "\n", entries_size ); for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { byte_stream_copy_to_uint32_little_endian( value_data_pointer, value_32bit ); value_data_pointer += 4; value_data_size -= 4; entries_size -= 4; if( ( value_32bit > entries_size ) || ( value_32bit > value_data_size ) ) { libcnotify_printf( "Entry: %02" PRIu32 " size\t\t: %" PRIu32 " \n", value_iterator, value_32bit ); break; } libcnotify_printf( "Entry: %02" PRIu32 " size\t\t: %" PRIu32 "\n", value_iterator, value_32bit ); libcnotify_printf( "Entry: %02" PRIu32 " data:\n", value_iterator ); libcnotify_print_data( value_data_pointer, value_32bit, 0 ); value_data_pointer += value_32bit; value_data_size -= value_32bit; entries_size -= value_32bit; } if( value_data_size > 0 ) { libcnotify_printf( "trailing data:\n" ); libcnotify_print_data( value_data_pointer, value_data_size, 0 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x0071: if( value_data_size >= 22 ) { /* According to MSDN the first byte is reserved * and should always be 0x01 however it makes * more sense that it's the most significant * part of the current system filetime data */ if( value_data[ 0 ] == 0x01 ) { if( libfdatetime_filetime_initialize( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create filetime.", function ); return( -1 ); } if( libfdatetime_filetime_initialize( &delta_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create delta filetime.", function ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } libcnotify_printf( "Header block:\n" ); /* The current system file data is in big-endian */ filetime_buffer[ 0 ] = 0; filetime_buffer[ 1 ] = 0; filetime_buffer[ 2 ] = value_data[ 5 ]; filetime_buffer[ 3 ] = value_data[ 4 ]; filetime_buffer[ 4 ] = value_data[ 3 ]; filetime_buffer[ 5 ] = value_data[ 2 ]; filetime_buffer[ 6 ] = value_data[ 1 ]; filetime_buffer[ 7 ] = value_data[ 0 ]; if( libfdatetime_filetime_copy_from_byte_stream( filetime, filetime_buffer, 8, LIBFDATETIME_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to filetime.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_filetime_copy_to_utf16_string( filetime, (uint16_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #else result = libfdatetime_filetime_copy_to_utf8_string( filetime, (uint8_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to string.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } libcnotify_printf( "\tFiletime\t: %" PRIs_LIBCSTRING_SYSTEM " UTC\n", filetime_string ); if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } /* Currently it is assumed that the GUID is in big-endian */ if( libfguid_identifier_copy_from_byte_stream( guid, &( value_data[ 6 ] ), 16, LIBFGUID_ENDIAN_BIG, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } /* TODO value_data += 16; value_data_size -= 16; */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } libcnotify_printf( "\tGUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", guid_string ); list_iterator = 1; for( value_data_iterator = 22; value_data_iterator < value_data_size; value_data_iterator += 5 ) { libcnotify_printf( "Child block: %d\n", list_iterator ); value_data_pointer = &( value_data[ value_data_iterator ] ); libcnotify_print_data( value_data_pointer, 5, 0 ); /* Use a 64-bit value to be able to shift the bits in the right position * current system time delta is in big-endian */ byte_stream_copy_to_uint32_big_endian( value_data_pointer, value_64bit ); /* Make sure only 31-bits are set and the rest is cleared */ value_64bit &= 0x07fffffffUL; /* Check if the highest bit is set */ if( ( value_data[ value_data_iterator ] & 0x80 ) == 0 ) { /* Discard the highest 15-bits and the lowest 18-bits */ value_64bit <<= 18; } else { /* Discard the highest 10-bits and the lowest 23-bits */ value_64bit <<= 23; } if( libfdatetime_filetime_copy_from_64bit( delta_filetime, value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy delta filetime from 64-bit value.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } /* The next child block uses the previous filetime as its base * not the filetime in the header block as MSDN states * so the filetime is updated */ if( libfdatetime_filetime_add( filetime, delta_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to create filetime.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_filetime_copy_to_utf16_string( filetime, (uint16_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #else result = libfdatetime_filetime_copy_to_utf8_string( filetime, (uint8_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to string.", function ); libfdatetime_filetime_free( &delta_filetime, NULL ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } libcnotify_printf( "\tFiletime\t: %" PRIs_LIBCSTRING_SYSTEM " UTC\n", filetime_string ); libcnotify_printf( "\tRandom number\t: %" PRIu8 "\n", ( value_data[ value_data_iterator + 4 ] & 0xf0 ) >> 4 ); libcnotify_printf( "\tSequence count\t: %" PRIu8 "\n", value_data[ value_data_iterator + 4 ] & 0x0f ); list_iterator++; } libcnotify_printf( "\n" ); if( value_data_iterator < value_data_size ) { libcnotify_print_data( &( value_data[ value_data_iterator ] ), value_data_size - value_data_iterator, 0 ); } if( libfdatetime_filetime_free( &delta_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free delta filetime.", function ); libfdatetime_filetime_free( &filetime, NULL ); return( -1 ); } if( libfdatetime_filetime_free( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free filetime.", function ); return( -1 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x0e27: case 0x3d21: if( value_data_size >= 100 ) { if( libfwnt_security_identifier_initialize( &sid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create SID.", function ); return( -1 ); } libcnotify_printf( "Unknown1:\n" ); libcnotify_print_data( value_data, 8, 0 ); libcnotify_printf( "Security descriptor:\n" ); libcnotify_printf( "\tRevision number:\t\t%" PRIu8 "\n", value_data[ 8 ] ); libcnotify_printf( "\tPadding:\t\t\t0x%02" PRIx8 "\n", value_data[ 9 ] ); value_data_pointer = &( value_data[ 10 ] ); byte_stream_copy_to_uint16_little_endian( value_data_pointer, value_16bit ); libcnotify_printf( "\tControl flags:\t\t\t0x%04" PRIx16 "\n", value_16bit ); value_data_pointer = &( value_data[ 12 ] ); byte_stream_copy_to_uint32_little_endian( value_data_pointer, value_32bit ); libcnotify_printf( "\tOwner SID reference:\t\t%" PRIu32 "\n", value_32bit ); value_data_iterator = value_32bit + 8; if( ( value_data_iterator > 0 ) && ( value_data_iterator < value_data_size ) ) { if( libfwnt_security_identifier_copy_from_byte_stream( sid, &( value_data[ value_data_iterator ] ), value_data_size - value_data_iterator, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to SID.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } result = libfwnt_security_identifier_get_string_size( sid, &sid_string_size, 0, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve SID string size.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } /* It is assumed that the SID string cannot be larger than 127 characters * otherwise using dynamic allocation is more appropriate */ if( sid_string_size > 128 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: SID string size value exceeds maximum.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( sid, (uint16_t *) sid_string, 128, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( sid, (uint8_t *) sid_string, 128, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy SID to string.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } libcnotify_printf( "\t\tOwner SID:\t\t%" PRIs_LIBCSTRING_SYSTEM "\n", sid_string ); } value_data_pointer = &( value_data[ 16 ] ); byte_stream_copy_to_uint32_little_endian( value_data_pointer, value_32bit ); libcnotify_printf( "\tGroup SID reference:\t\t%" PRIu32 "\n", value_32bit ); value_data_iterator = value_32bit + 8; if( ( value_data_iterator > 0 ) && ( value_data_iterator < value_data_size ) ) { if( libfwnt_security_identifier_copy_from_byte_stream( sid, &( value_data[ value_data_iterator ] ), value_data_size - value_data_iterator, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to SID.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } result = libfwnt_security_identifier_get_string_size( sid, &sid_string_size, 0, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve SID string size.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } /* It is assumed that the SID string cannot be larger than 127 characters * otherwise using dynamic allocation is more appropriate */ if( sid_string_size > 128 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: SID string size value exceeds maximum.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( sid, (uint16_t *) sid_string, 128, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( sid, (uint8_t *) sid_string, 128, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy SID to string.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } libcnotify_printf( "\t\tGroup SID:\t\t%" PRIs_LIBCSTRING_SYSTEM "\n", sid_string ); } value_data_pointer = &( value_data[ 20 ] ); byte_stream_copy_to_uint32_little_endian( value_data_pointer, value_32bit ); libcnotify_printf( "\tDACL reference:\t\t\t%" PRIu32 "\n", value_32bit ); value_data_pointer = &( value_data[ 24 ] ); byte_stream_copy_to_uint32_little_endian( value_data_pointer, value_32bit ); libcnotify_printf( "\tSACL reference:\t\t\t%" PRIu32 "\n", value_32bit ); value_data_iterator = value_32bit + 8; if( ( value_data_iterator > 0 ) && ( value_data_iterator < value_data_size ) ) { libcnotify_printf( "\t\tAccess control list (ACL):\n" ); libcnotify_printf( "\t\tRevision number:\t%" PRIu8 "\n", value_data[ value_data_iterator ] ); libcnotify_printf( "\t\tPadding1:\t\t%" PRIu8 "\n", value_data[ value_data_iterator + 1 ] ); value_data_pointer = &( value_data[ value_data_iterator + 2 ] ); byte_stream_copy_to_uint16_little_endian( value_data_pointer, value_16bit ); libcnotify_printf( "\t\tSize:\t\t\t%" PRIu16 "\n", value_16bit ); value_data_pointer = &( value_data[ value_data_iterator + 4 ] ); byte_stream_copy_to_uint16_little_endian( value_data_pointer, value_16bit ); libcnotify_printf( "\t\tCount:\t\t\t%" PRIu16 "\n", value_16bit ); number_of_values = (uint32_t) value_16bit; value_data_pointer = &( value_data[ value_data_iterator + 6 ] ); byte_stream_copy_to_uint16_little_endian( value_data_pointer, value_16bit ); libcnotify_printf( "\t\tPadding2:\t\t0x%04" PRIx16 "\n", value_16bit ); value_data_iterator += 8; for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { libcnotify_printf( "\t\tAccess control entry (ACE):\n" ); libcnotify_printf( "\t\tType:\t\t\t%" PRIu8 "\n", value_data[ value_data_iterator ] ); libcnotify_printf( "\t\tFlags:\t\t\t%" PRIu8 "\n", value_data[ value_data_iterator + 1 ] ); value_data_pointer = &( value_data[ value_data_iterator + 2 ] ); byte_stream_copy_to_uint16_little_endian( value_data_pointer, value_16bit ); libcnotify_printf( "\t\tSize:\t\t\t%" PRIu16 "\n", value_16bit ); libcnotify_printf( "\t\tACE data:\n" ); if( ( value_data[ value_data_iterator ] <= 0x03 ) || ( value_data[ value_data_iterator ] == 0x09 ) || ( value_data[ value_data_iterator ] == 0x0a ) || ( value_data[ value_data_iterator ] == 0x0d ) || ( value_data[ value_data_iterator ] == 0x0e ) || ( value_data[ value_data_iterator ] == 0x11 ) ) { value_data_pointer = &( value_data[ value_data_iterator + 4 ] ); byte_stream_copy_to_uint16_little_endian( value_data_pointer, value_32bit ); libcnotify_printf( "\t\tAccess rights flags:\t0x%08" PRIx32 "\n", value_32bit ); if( libfwnt_security_identifier_copy_from_byte_stream( sid, &( value_data[ value_data_iterator + 8 ] ), value_data_size - value_data_iterator, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to SID.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } result = libfwnt_security_identifier_get_string_size( sid, &sid_string_size, 0, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve SID string size.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } /* It is assumed that the SID string cannot be larger than 127 characters * otherwise using dynamic allocation is more appropriate */ if( sid_string_size > 128 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: SID string size value exceeds maximum.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( sid, (uint16_t *) sid_string, 128, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( sid, (uint8_t *) sid_string, 128, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy SID to string.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } libcnotify_printf( "\t\tSID:\t\t\t%" PRIs_LIBCSTRING_SYSTEM "\n", sid_string ); libcnotify_printf( "\n" ); } else { libcnotify_print_data( &( value_data[ value_32bit + 4 ] ), value_16bit - 4, 0 ); } } } libcnotify_printf( "\n" ); if( libfwnt_security_identifier_free( &sid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free SID.", function ); return( -1 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x0e58: case 0x0e59: if( libfwnt_security_identifier_initialize( &sid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create SID.", function ); return( -1 ); } if( libfwnt_security_identifier_copy_from_byte_stream( sid, value_data, value_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to SID.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } result = libfwnt_security_identifier_get_string_size( sid, &sid_string_size, 0, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve SID string size.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } /* It is assumed that the SID string cannot be larger than 127 characters * otherwise using dynamic allocation is more appropriate */ if( sid_string_size > 128 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: SID string size value exceeds maximum.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfwnt_security_identifier_copy_to_utf16_string( sid, (uint16_t *) sid_string, 128, 0, error ); #else result = libfwnt_security_identifier_copy_to_utf8_string( sid, (uint8_t *) sid_string, 128, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy SID to string.", function ); libfwnt_security_identifier_free( &sid, NULL ); return( -1 ); } libcnotify_printf( "SID:\t%" PRIs_LIBCSTRING_SYSTEM "\n", sid_string ); libcnotify_printf( "\n" ); if( libfwnt_security_identifier_free( &sid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free SID.", function ); return( -1 ); } break; case 0x1009: if( ( value_data_size >= 16 ) && ( value_data[ 8 ] == (uint8_t) 'L' ) && ( value_data[ 9 ] == (uint8_t) 'Z' ) && ( value_data[ 10 ] == (uint8_t) 'F' ) && ( value_data[ 11 ] == (uint8_t) 'u' ) ) { value_data_pointer = &( value_data[ 4 ] ); byte_stream_copy_to_uint32_little_endian( value_data_pointer, rtf_value_string_size ); rtf_value_string_size += 2; rtf_value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * rtf_value_string_size ); if( rtf_value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable create rtf value string.", function ); return( -1 ); } if( libfmapi_lzfu_decompress( (uint8_t *) rtf_value_string, &rtf_value_string_size, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable to decompress LZFu compressed RTF data.", function ); memory_free( rtf_value_string ); return( -1 ); } libcnotify_printf( "uncompressed RTF data\t: " ); for( value_data_iterator = 0; value_data_iterator < rtf_value_string_size; value_data_iterator++ ) { libcnotify_printf( "%c", rtf_value_string[ value_data_iterator ] ); } libcnotify_printf( "\n\n" ); memory_free( rtf_value_string ); rtf_value_string = NULL; } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x1013: if( value_data == NULL ) { libcnotify_printf( "ASCII string\t: \n\n" ); } else { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( value_data, value_data_size, LIBUNA_CODEPAGE_ASCII, &value_string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( value_data, value_data_size, LIBUNA_CODEPAGE_ASCII, &value_string_size, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, LIBUNA_CODEPAGE_ASCII, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, LIBUNA_CODEPAGE_ASCII, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); return( -1 ); } libcnotify_printf( "ASCII string\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n", value_string ); memory_free( value_string ); } break; case 0x300c: case 0x3615: if( value_data == NULL ) { libcnotify_printf( "MAPI UID\t: \n\n" ); } else if( value_data_size == 16 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } libcnotify_printf( "MAPI UID\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n", guid_string ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x3702: case 0x370a: if( value_data_size >= 9 ) { value_data_iterator = 9; /* Check if the object identifier has the MAPI prefix */ if( ( value_data[ 0 ] == 0x2a ) && ( value_data[ 1 ] == 0x86 ) && ( value_data[ 2 ] == 0x48 ) && ( value_data[ 3 ] == 0x86 ) && ( value_data[ 4 ] == 0xf7 ) && ( value_data[ 5 ] == 0x14 ) && ( value_data[ 6 ] == 0x03 ) ) { libcnotify_printf( "MAPI X.400 object identifier\t:" ); if( value_data[ 7 ] == 0x0a ) { libcnotify_printf( "tag (0x%02" PRIx8 ")", value_data[ 7 ] ); if( value_data[ 8 ] == 0x01 ) { libcnotify_printf( " TNEF (0x%02" PRIx8")", value_data[ 8 ] ); } else if( value_data[ 8 ] == 0x03 ) { if( value_data_size >= 11 ) { value_data_iterator = 11; if( ( value_data[ 9 ] == 0x01 ) && ( value_data[ 10 ] == 0x01 ) ) { libcnotify_printf( " OLE1 storage (0x%02" PRIx8 " 0x%02" PRIx8 " 0x%02" PRIx8 ")", value_data[ 8 ], value_data[ 9 ], value_data[ 10 ] ); } else if( ( value_data[ 9 ] == 0x02 ) && ( value_data[ 10 ] == 0x01 ) ) { libcnotify_printf( " OLE2 storage (0x%02" PRIx8 " 0x%02" PRIx8 " 0x%02" PRIx8 ")", value_data[ 8 ], value_data[ 9 ], value_data[ 10 ] ); } else { libcnotify_printf( " OLE unknown (0x%02" PRIx8 " 0x%02" PRIx8 " 0x%02" PRIx8 ")", value_data[ 8 ], value_data[ 9 ], value_data[ 10 ] ); } } else if( value_data_size >= 10 ) { value_data_iterator = 10; if( value_data[ 9 ] == 0x01 ) { libcnotify_printf( " OLE1 (0x%02" PRIx8 " 0x%02" PRIx8 ")", value_data[ 8 ], value_data[ 9 ] ); } else if( value_data[ 9 ] == 0x02 ) { libcnotify_printf( " OLE2 (0x%02" PRIx8 " 0x%02" PRIx8 ")", value_data[ 8 ], value_data[ 9 ] ); } else { libcnotify_printf( " OLE unknown (0x%02" PRIx8 " 0x%02" PRIx8 ")", value_data[ 8 ], value_data[ 9 ] ); } } else { libcnotify_printf( " OLE (0x%02" PRIx8 ")", value_data[ 8 ] ); } } else if( value_data[ 8 ] == 0x04 ) { libcnotify_printf( " MIME (0x%02" PRIx8 ")", value_data[ 8 ] ); } else { libcnotify_printf( " unknown (0x%02" PRIx8 ")", value_data[ 8 ] ); } } else if( value_data[ 7 ] == 0x0b ) { libcnotify_printf( " encoding (0x%02" PRIx8 ")", value_data[ 7 ] ); if( value_data[ 8 ] == 0x01 ) { libcnotify_printf( " MacBinary (0x%02" PRIx8 ")", value_data[ 8 ] ); } else { libcnotify_printf( " unknown (0x%02" PRIx8 ")", value_data[ 8 ] ); } } else { libcnotify_printf( " unknown (0x%02" PRIx8 ")", value_data[ 7 ] ); } libcnotify_printf( "\n" ); if( value_data_iterator < value_data_size ) { libcnotify_print_data( &( value_data[ value_data_iterator ] ), value_data_size - value_data_iterator, 0 ); } else { libcnotify_printf( "\n" ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x65e2: if( value_data_size > 16 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } if( libfguid_identifier_copy_from_byte_stream( guid, value_data, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } libcnotify_printf( "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", guid_string ); libcnotify_printf( "Unknown1:\n" ); libcnotify_print_data( value_data, value_data_size, 0 ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x65e3: if( value_data_size > 1 ) { /* TODO */ libcnotify_print_data( value_data, value_data_size, 0 ); if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } while( value_data_size > 0 ) { data_size = *value_data; value_data += 1; value_data_size -= 1; if( data_size < value_data_size ) { libcnotify_printf( "Size\t\t: 0x%02x\n", data_size ); } else { libcnotify_printf( "Size\t\t: 0x%02x \n", data_size ); break; } if( data_size >= 16 ) { if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } libcnotify_printf( "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", guid_string ); } libcnotify_printf( "Unknown:\n" ); libcnotify_print_data( value_data, data_size, 0 ); value_data += data_size; value_data_size -= data_size; } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x683c: #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_byte_stream( value_data, value_data_size, ascii_codepage, &value_string_size, error ); #else result = libuna_utf8_string_size_from_byte_stream( value_data, value_data_size, ascii_codepage, &value_string_size, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine value string size.", function ); return( -1 ); } value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) value_string, value_string_size, value_data, value_data_size, ascii_codepage, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) value_string, value_string_size, value_data, value_data_size, ascii_codepage, error ); #endif /* TODO error tollerance required ? */ if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value string.", function ); memory_free( value_string ); return( -1 ); } libcnotify_printf( "ASCII string\t: %" PRIs_LIBCSTRING_SYSTEM "\n", value_string ); memory_free( value_string ); libcnotify_printf( "\n" ); break; case 0x7c04: if( value_data_size == 20 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } libcnotify_printf( "GUID\t: %" PRIs_LIBCSTRING_SYSTEM "\n", guid_string ); libcnotify_printf( "Unknown1:\n" ); libcnotify_print_data( value_data, value_data_size, 0 ); libcnotify_printf( "\n" ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; case 0x859c: if( value_data_size >= 46 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); return( -1 ); } libcnotify_printf( "Unknown1:\n" ); libcnotify_print_data( value_data, 4, 0 ); value_data += 4; value_data_size -= 4; if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } libcnotify_printf( "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", guid_string ); libcnotify_printf( "Unknown2:\n" ); libcnotify_print_data( value_data, 2, 0 ); value_data += 2; value_data_size -= 2; if( libfguid_identifier_copy_from_byte_stream( guid, value_data, value_data_size, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } value_data += 16; value_data_size -= 16; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); libfguid_identifier_free( &guid, NULL ); return( -1 ); } libcnotify_printf( "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", guid_string ); libcnotify_printf( "Unknown3:\n" ); libcnotify_print_data( value_data, value_data_size, 0 ); libcnotify_printf( "\n" ); if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); return( -1 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } break; default: libcnotify_print_data( value_data, value_data_size, 0 ); break; } return( 1 ); } /* Prints the MAPI array multi value * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_array_multi_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libfmapi_debug_print_array_multi_value"; size_t value_size = 0; uint32_t number_of_values = 0; uint32_t value_iterator = 0; uint32_t value_offset = 0; if( ( value_type != 0x1002 ) && ( value_type != 0x1003 ) && ( value_type != 0x1014 ) && ( value_type != 0x1040 ) && ( value_type != 0x1048 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } if( value_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: value data size exceeds maximum.", function ); return( -1 ); } if( value_data == NULL ) { switch( value_type ) { case 0x1002: libcnotify_printf( "Integer 16-bit signed multi value\t: \n\n" ); break; case 0x1003: libcnotify_printf( "Integer 32-bit signed multi value\t: \n\n" ); break; case 0x1014: libcnotify_printf( "Integer 64-bit signed multi value\t: \n\n" ); break; case 0x1040: libcnotify_printf( "Filetime multi value\t: \n\n" ); break; case 0x1048: libcnotify_printf( "GUID multi value\t: \n\n" ); break; } } else { switch( value_type ) { case 0x1002: value_size = 2; break; case 0x1003: value_size = 4; break; case 0x1014: case 0x1040: value_size = 8; break; case 0x1048: value_size = 16; break; } if( value_size != 0 ) { if( ( value_data_size % value_size ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: value data size: %" PRIzd " not a multitude of value size: %" PRIzd ".", function, value_data_size, value_size ); return( -1 ); } number_of_values = value_data_size / value_size; } libcnotify_printf( "Number of entries\t\t: %" PRIu32 "\n", number_of_values ); for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { libcnotify_printf( "Entry: %02" PRIu32 " identifier offset\t: %" PRIu32 "\n", value_iterator, value_offset ); if( libfmapi_debug_print_value( entry_type, value_type & 0x0fff, &( value_data[ value_offset ] ), value_size, ascii_codepage, error ) != 1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); libcnotify_print_data( &( value_data[ value_offset ] ), value_size, 0 ); } value_offset += value_size; } } return( 1 ); } /* Prints the MAPI element multi value * The type of multi value is used by ASCII and Unicode string and binary data values * Returns 1 if successful or -1 on error */ int libfmapi_debug_print_element_multi_value( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { uint8_t *value_data_pointer = NULL; static char *function = "libfmapi_debug_print_element_multi_value"; uint32_t number_of_values = 0; uint32_t value_32bit = 0; uint32_t last_value_32bit = 0; uint32_t value_iterator = 0; int unsupported_data = 0; if( ( value_type != 0x101e ) && ( value_type != 0x101f ) && ( value_type != 0x1102 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type.", function ); return( -1 ); } if( value_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: value data size exceeds maximum.", function ); return( -1 ); } if( value_data == NULL ) { switch( value_type ) { case 0x101e: libcnotify_printf( "ASCII string multi value\t: \n\n" ); break; case 0x101f: libcnotify_printf( "Unicode string multi value\t: \n\n" ); break; case 0x1102: libcnotify_printf( "Binary data multi value\t: \n\n" ); break; } } else { value_data_pointer = value_data; byte_stream_copy_to_uint32_little_endian( value_data_pointer, number_of_values ); value_data_pointer += 4; /* Read the first identifier offset */ byte_stream_copy_to_uint32_little_endian( value_data_pointer, last_value_32bit ); value_data_pointer += 4; /* Check if number of values makes sense */ if( number_of_values >= value_data_size ) { unsupported_data = 1; } /* Check if first idendifier offset makes sense */ else if( last_value_32bit >= value_data_size ) { unsupported_data = 1; } else { libcnotify_printf( "Number of values\t\t: %" PRIu32 "\n", number_of_values ); for( value_iterator = 1; value_iterator < number_of_values; value_iterator++ ) { /* Read the next identifier offset */ byte_stream_copy_to_uint32_little_endian( value_data_pointer, value_32bit ); value_data_pointer += 4; libcnotify_printf( "Value: %02" PRIu32 " identifier offset\t: %" PRIu32 "\n", value_iterator - 1, last_value_32bit ); if( last_value_32bit < value_32bit ) { if( libfmapi_debug_print_value( entry_type, value_type & 0x0fff, &( value_data[ last_value_32bit ] ), value_32bit - last_value_32bit, ascii_codepage, error ) != 1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); libcnotify_print_data( &( value_data[ last_value_32bit ] ), value_32bit - last_value_32bit, 0 ); } } else { libcnotify_printf( "\n\n" ); } last_value_32bit = value_32bit; } libcnotify_printf( "Value: %02" PRIu32 " identifier offset\t: %" PRIu32 "\n", value_iterator - 1, last_value_32bit ); /* A multi value can contain a single value */ if( ( last_value_32bit < value_32bit ) || ( number_of_values == 1 ) ) { if( libfmapi_debug_print_value( entry_type, value_type & 0x0fff, &( value_data[ last_value_32bit ] ), value_data_size - last_value_32bit, ascii_codepage, error ) != 1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); libcnotify_print_data( &( value_data[ last_value_32bit ] ), value_data_size - last_value_32bit, 0 ); } } else { libcnotify_printf( "\n\n" ); } } } if( unsupported_data != 0 ) { libcnotify_print_data( value_data, value_data_size, 0 ); } return( 1 ); } #endif libpff-20120802/libfmapi/libfmapi_libfwnt.h0000644000175000017500000000261012005155705015400 00000000000000/* * The libfwnt header wrapper * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_LIBFWNT_H ) #define _LIBFMAPI_LIBFWNT_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) #include #include #include #include #elif defined( HAVE_LIBFWNT_H ) /* If libtool DLL support is enabled set LIBFWNT_DLL_IMPORT * before including libfwnt.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFWNT_DLL_IMPORT #endif #include #else #error Missing libfwnt.h #endif #endif libpff-20120802/libfmapi/libfmapi_class_identifier.h0000644000175000017500000000465212005155705017252 00000000000000/* * Class identifier (CLSID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_CLASS_IDENTIFIER_H ) #define _LIBFMAPI_CLASS_IDENTIFIER_H #include #include #include "libfmapi_definitions.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) /* The CLSID is stored as a little endian GUID */ typedef struct libfmapi_class_identifier_definition libfmapi_class_identifier_definition_t; struct libfmapi_class_identifier_definition { /* The class identifier */ uint8_t *identifier; /* The class name */ const char *name; }; #endif extern uint8_t libfmapi_class_identifier_mapi[ 16 ]; extern uint8_t libfmapi_class_identifier_public_strings[ 16 ]; extern uint8_t libfmapi_class_identifier_internet_headers[ 16 ]; extern uint8_t libfmapi_class_identifier_appointment[ 16 ]; extern uint8_t libfmapi_class_identifier_task[ 16 ]; extern uint8_t libfmapi_class_identifier_address[ 16 ]; extern uint8_t libfmapi_class_identifier_common[ 16 ]; extern uint8_t libfmapi_class_identifier_journal[ 16 ]; extern uint8_t libfmapi_class_identifier_sticky_note[ 16 ]; extern uint8_t libfmapi_class_identifier_sharing[ 16 ]; extern uint8_t libfmapi_class_identifier_rss_feed[ 16 ]; extern uint8_t libfmapi_class_identifier_unified_messaging[ 16 ]; extern uint8_t libfmapi_class_identifier_calendar[ 16 ]; extern uint8_t libfmapi_class_identifier_air_sync[ 16 ]; extern uint8_t libfmapi_class_identifier_attachment[ 16 ]; extern uint8_t libfmapi_class_identifier_unknown[ 16 ]; #if defined( HAVE_DEBUG_OUTPUT ) const char *libfmapi_class_identifier_get_name( uint8_t *class_identifier ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_codepage.c0000644000175000017500000000647512005155705015512 00000000000000/* * Codepage functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfmapi_codepage.h" #if defined( HAVE_DEBUG_OUTPUT ) libfmapi_codepage_t libfmapi_codepages[ ] = { { 874, "windows-874", "Thai" }, { 932, "iso-2022-jp", "Japanese (Shift-JIS)" }, { 936, "gb2312", "Chinese Simplified" }, { 949, "ks_c_5601-1987", "Korean" }, { 950, "big5", "Chinese Traditional" }, { 1200, "unicode", "Unicode" }, { 1250, "windows-1250", "Central European" }, { 1251, "windows-1251", "Cyrillic" }, { 1252, "windows-1252", "Western European" }, { 1253, "windows-1253", "Greek" }, { 1254, "windows-1254", "Turkish" }, { 1255, "windows-1255", "Hebrew" }, { 1256, "windows-1256", "Arabic" }, { 1257, "windows-1257", "Baltic" }, { 1258, "windows-1258", "Vietnamese" }, { 20127, "us-ascii", "7-bit American Standard Code for Information Interchange (ASCII)" }, { 20866, "koi8-r", "Cyrillic" }, { 21866, "koi8-u", "Cyrillic" }, { 28591, "iso-8859-1", "Western European" }, { 28592, "iso-8859-2", "Central European" }, { 28593, "iso-8859-3", "Latin 3 " }, { 28594, "iso-8859-4", "Baltic" }, { 28595, "iso-8859-5", "Cyrillic" }, { 28596, "iso-8859-6", "Arabic" }, { 28597, "iso-8859-7", "Greek" }, { 28598, "iso-8859-8-i", "Hebrew" }, { 28599, "iso-8859-7", "Turkish" }, { 28605, "iso-8859-15", "Latin 9 " }, { 50220, "iso-2022-jp", "Japanese (JIS)" }, { 50221, "csISO2022JP", "Japanese (JIS-Allow 1 byte Kana)" }, { 51932, "euc-jp", "Japanese" }, { 51949, "euc-kr", "Korean" }, { 52936, "hz-gb-2312", "Chinese Simplified" }, { 65000, "utf-7", "7-bit Unicode Transformation Format (UTF-7)" }, { 65001, "utf-8", "8-bit Unicode Transformation Format (UTF-8)" }, { (uint32_t) -1, "_UNKNOWN_", "Unknown" } }; /* Retrieves a string containing the codepage identifier */ const char *libfmapi_codepage_get_identifier( uint32_t codepage ) { int iterator = 0; while( ( libfmapi_codepages[ iterator ] ).codepage != (uint32_t) -1 ) { if( ( libfmapi_codepages[ iterator ] ).codepage == codepage ) { break; } iterator++; } return( ( libfmapi_codepages[ iterator ] ).identifier ); } /* Retrieves a string containing the codepage description */ const char *libfmapi_codepage_get_description( uint32_t codepage ) { int iterator = 0; while( ( libfmapi_codepages[ iterator ] ).codepage != (uint32_t) -1 ) { if( ( libfmapi_codepages[ iterator ] ).codepage == codepage ) { break; } iterator++; } return( ( libfmapi_codepages[ iterator ] ).description ); } #endif libpff-20120802/libfmapi/libfmapi_service_provider_identifier.c0000644000175000017500000000467612005155705021520 00000000000000/* * Sevice provider functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfmapi_class_identifier.h" uint8_t libfmapi_service_provider_identifier_one_off_entry_identifier[ 16 ] = \ { 0x81, 0x2b, 0x1f, 0xa4, 0xbe, 0xa3, 0x10, 0x19, 0x9d, 0x6e, 0x00, 0xdd, 0x01, 0x0f, 0x54, 0x02 }; uint8_t libfmapi_service_provider_identifier_x500_address[ 16 ] = \ { 0xdc, 0xa7, 0x40, 0xc8, 0xc0, 0x42, 0x10, 0x1a, 0xb4, 0xb9, 0x08, 0x00, 0x2b, 0x2f, 0xe1, 0x82 }; #if defined( HAVE_DEBUG_OUTPUT ) /* The service provider identifiers */ libfmapi_class_identifier_definition_t libfmapi_service_provider_identifier_definitions[ ] = { { libfmapi_service_provider_identifier_one_off_entry_identifier, "One-off entry identifier" }, { libfmapi_service_provider_identifier_x500_address, "X500 address" }, { libfmapi_class_identifier_unknown, "Unknown" } }; #endif #if defined( HAVE_DEBUG_OUTPUT ) /* Retrieves a string containing the name of the service provider identifier */ const char *libfmapi_service_provider_identifier_get_name( uint8_t *service_provider_identifier ) { int iterator = 0; if( service_provider_identifier == NULL ) { return( "Invalid service provider identifier" ); } while( memory_compare( ( libfmapi_service_provider_identifier_definitions[ iterator ] ).identifier, libfmapi_class_identifier_unknown, 16 ) != 0 ) { if( memory_compare( ( libfmapi_service_provider_identifier_definitions[ iterator ] ).identifier, service_provider_identifier, 16 ) == 0 ) { break; } iterator++; } return( ( libfmapi_service_provider_identifier_definitions[ iterator ] ).name ); } #endif libpff-20120802/libfmapi/libfmapi_crc.h0000644000175000017500000000262012005155705014503 00000000000000/* * CRC-32 functions * Based on RFC 1952 * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_CRC_H ) #define _LIBFMAPI_CRC_H #include #include #include "libfmapi_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif void libfmapi_initialize_crc32_table( void ); int libfmapi_crc32_calculate( uint32_t *crc32, uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ); int libfmapi_crc32_weak_calculate( uint32_t *crc32, uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfmapi/libfmapi_crc.c0000644000175000017500000001077212005155705014505 00000000000000/* * CRC-32 functions * Based on RFC 1952 * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfmapi_libcerror.h" /* Table of CRC-32 values of 8-bit values */ uint32_t libfmapi_crc32_table[ 256 ]; /* Value to indicate the CRC-32 table been computed */ int libfmapi_crc32_table_computed = 0; /* Initializes the internal CRC-32 table * The table speeds up the CRC-32 calculation */ void libfmapi_initialize_crc32_table( void ) { uint32_t crc32 = 0; uint32_t crc32_table_index = 0; uint8_t bit_iterator = 0; for( crc32_table_index = 0; crc32_table_index < 256; crc32_table_index++ ) { crc32 = (uint32_t) crc32_table_index; for( bit_iterator = 0; bit_iterator < 8; bit_iterator++ ) { if( crc32 & 1 ) { crc32 = (uint32_t) 0xedb88320UL ^ ( crc32 >> 1 ); } else { crc32 = crc32 >> 1; } } libfmapi_crc32_table[ crc32_table_index ] = crc32; } libfmapi_crc32_table_computed = 1; } /* Calculates the CRC-32 of a buffer * Returns 1 if successful or -1 on error */ int libfmapi_crc32_calculate( uint32_t *crc32, uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ) { static char *function = "libfmapi_crc32_calculate"; size_t buffer_offset = 0; uint32_t crc32_table_index = 0; if( crc32 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid CRC-32.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } *crc32 = initial_value ^ (uint32_t) 0xffffffffUL; if( libfmapi_crc32_table_computed == 0 ) { libfmapi_initialize_crc32_table(); } for( buffer_offset = 0; buffer_offset < size; buffer_offset++ ) { crc32_table_index = ( *crc32 ^ buffer[ buffer_offset ] ) & 0x000000ffUL; *crc32 = libfmapi_crc32_table[ crc32_table_index ] ^ ( *crc32 >> 8 ); } *crc32 ^= 0xffffffffUL; return( 1 ); } /* Calculates the weak CRC-32 of a buffer * Returns 1 if successful or -1 on error */ int libfmapi_crc32_weak_calculate( uint32_t *crc32, uint8_t *buffer, size_t size, uint32_t initial_value, libcerror_error_t **error ) { static char *function = "libfmapi_crc32_weak_calculate"; size_t buffer_offset = 0; uint32_t crc32_table_index = 0; if( crc32 == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid CRC-32.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } *crc32 = initial_value; if( libfmapi_crc32_table_computed == 0 ) { libfmapi_initialize_crc32_table(); } for( buffer_offset = 0; buffer_offset < size; buffer_offset++ ) { crc32_table_index = ( *crc32 ^ buffer[ buffer_offset ] ) & 0x000000ffUL; *crc32 = libfmapi_crc32_table[ crc32_table_index ] ^ ( *crc32 >> 8 ); } return( 1 ); } libpff-20120802/libfmapi/libfmapi_guid.c0000644000175000017500000000175412005155705014666 00000000000000/* * GUID functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include uint8_t libfmapi_guid_public_strings[ 16 ] = \ { 0x29, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }; libpff-20120802/libfmapi/libfmapi_x400_object_identifier.h0000644000175000017500000000351012005155705020156 00000000000000/* * X.400 object identifier (MAPIOID) functions * * Copyright (c) 2009-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFMAPI_X400_OBJECT_IDENTIFIER_H ) #define _LIBFMAPI_X400_OBJECT_IDENTIFIER_H #include #include #if defined( __cplusplus ) extern "C" { #endif /* A runtime version of the X.400 object identifier (MAPIOID) */ typedef struct libfmapi_x400_object_identifier libfmapi_x400_object_identifier_t; struct libfmapi_x400_object_identifier { /* The MAPI prefix * Consists of 7 bytes * Contains 0x2a 0x86 0x48 0x86 0xf7 0x14 0x03 * */ uint8_t prefix[ 7 ]; /* The object identifier type * 0x0a => tag * 0x0b => encodign */ uint8_t type; /* The object identifier data * Variable of size * Known tags (0x0a) * 0x01 => TNEF * 0x03 => OLE * 0x03 0x01 => OLE1 * 0x03 0x01 0x01 => OLE1 storage * 0x03 0x02 => OLE2 * 0x03 0x02 0x01 => OLE2 storage * 0x04 => Unknown * Known encodings (0x0b) * 0x01 => MacBinary * 0x04 => Mime Tag */ uint8_t *data; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcstring/0000775000175000017500000000000012006536212012354 500000000000000libpff-20120802/libcstring/libcstring_support.h0000644000175000017500000000231411753434025016406 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_SUPPORT_H ) #define _LIBCSTRING_SUPPORT_H #include #include #include #include "libcstring_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCSTRING ) LIBCSTRING_EXTERN \ const char *libcstring_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCSTRING ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcstring/libcstring_wide_string.h0000644000175000017500000001211611753434025017211 00000000000000/* * Wide character string functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_WIDE_STRING_H ) #define _LIBCSTRING_WIDE_STRING_H #include #include #include #if defined( HAVE_WCHAR_H ) || defined( WINAPI ) #include #endif #include "libcstring_extern.h" #include "libcstring_types.h" #if defined( __cplusplus ) extern "C" { #endif /* String allocation */ #define libcstring_wide_string_allocate( size ) \ (wchar_t *) memory_allocate( sizeof( wchar_t ) * ( size ) ) /* String reallocation */ #define libcstring_wide_string_reallocate( string, size ) \ (wchar_t *) memory_reallocate( string, ( sizeof( wchar_t ) * ( size ) ) ) /* String length */ #if defined( HAVE_WCSLEN ) || defined( WINAPI ) #define libcstring_wide_string_length( string ) \ wcslen( string ) #endif /* String compare */ #if defined( HAVE_WMEMCMP ) #define libcstring_wide_string_compare( string1, string2, size ) \ wmemcmp( (void *) string1, (void *) string2, size ) #elif defined( HAVE_WCSNCMP ) || defined( WINAPI ) #define libcstring_wide_string_compare( string1, string2, size ) \ wcsncmp( string1, string2, size ) #endif /* Caseless string compare */ #if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ >= 0x0560 ) ) #define libcstring_wide_string_compare_no_case( string1, string2, size ) \ _wcsnicmp( string1, string2, size ) #elif defined( WINAPI ) #define libcstring_wide_string_compare_no_case( string1, string2, size ) \ wcsnicmp( string1, string2, size ) #elif defined( HAVE_WCSNCASECMP ) #define libcstring_wide_string_compare_no_case( string1, string2, size ) \ wcsncasecmp( string1, string2, size ) #elif defined( HAVE_WCSCASECMP ) #define libcstring_wide_string_compare_no_case( string1, string2, size ) \ wcscasecmp( string1, string2 ) #elif defined( HAVE_TOWLOWER ) LIBCSTRING_EXTERN \ int libcstring_wide_string_compare_no_case( const wchar_t *string1, const wchar_t *string2, size_t comparision_length ); #endif /* String copy */ #if defined( HAVE_WMEMCPY ) #define libcstring_wide_string_copy( destination, source, size ) \ (wchar_t *) wmemcpy( (void *) destination, (void *) source, size ) #elif defined( HAVE_WCSNCPY ) || defined( WINAPI ) #define libcstring_wide_string_copy( destination, source, size ) \ wcsncpy( destination, source, size ) #endif /* String character search */ #if defined( HAVE_WMEMCHR ) #define libcstring_wide_string_search_character( string, character, size ) \ (wchar_t *) wmemchr( (void *) string, (wchar_t) character, size ) #elif defined( HAVE_WCSCHR ) || defined( WINAPI ) #define libcstring_wide_string_search_character( string, character, size ) \ wcschr( string, (wchar_t) character ) #endif /* String reverse character search */ #if defined( HAVE_WMEMRCHR ) #define libcstring_wide_string_search_character_reverse( string, character, size ) \ (wchar_t *) wmemrchr( (void *) string, (wchar_t) character, size ) #elif defined( HAVE_WCSRCHR ) || defined( WINAPI ) #define libcstring_wide_string_search_character_reverse( string, character, size ) \ wcsrchr( string, (wchar_t) character ) #endif /* String sub-string search */ #if defined( HAVE_WCSSTR ) || defined( WINAPI ) #define libcstring_wide_string_search_string( string, substring, size ) \ wcsstr( string, substring ) #endif /* String formatted print (snwprintf) */ #if defined( _MSC_VER ) #define libcstring_wide_string_snwprintf( target, size, ... ) \ swprintf_s( target, size, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_wide_string_snwprintf \ snwprintf #elif defined( WINAPI ) #define libcstring_wide_string_snwprintf( target, size, ... ) \ snwprintf( target, size, __VA_ARGS__ ) #elif defined( HAVE_SWPRINTF ) #define libcstring_wide_string_snwprintf( target, size, ... ) \ swprintf( target, size, __VA_ARGS__ ) #endif /* Variable arguments formatted print to string function (vsnwprintf) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_wide_string_vsnwprintf \ _vsnwprintf #elif defined( WINAPI ) #define libcstring_wide_string_vsnwprintf( string, size, format, ... ) \ _vsnwprintf( string, size, format, __VA_ARGS__ ) #elif defined( HAVE_VSWPRINTF ) #define libcstring_wide_string_vsnwprintf( string, size, format, ... ) \ vswprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcstring/libcstring_system_string.h0000644000175000017500000001216611753434025017612 00000000000000/* * System character type string functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_SYSTEM_STRING_H ) #define _LIBCSTRING_SYSTEM_STRING_H #include #include #include "libcstring_definitions.h" #include "libcstring_narrow_string.h" #include "libcstring_types.h" #include "libcstring_wide_string.h" #if defined( _cplusplus ) extern "C" { #endif #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if SIZEOF_WCHAR_T != 2 #error Unsupported wide system character size #endif /* Intermediate version of the macro required * for correct evaluation predefined string */ #define _LIBCSTRING_SYSTEM_STRING_INTERMEDIATE( string ) \ L ## string #define _LIBCSTRING_SYSTEM_STRING( string ) \ _LIBCSTRING_SYSTEM_STRING_INTERMEDIATE( string ) #define libcstring_system_string_allocate( size ) \ libcstring_wide_string_allocate( size ) #define libcstring_system_string_reallocate( string, size ) \ libcstring_wide_string_reallocate( string, size ) #define libcstring_system_string_compare( destination, source, size ) \ libcstring_wide_string_compare( destination, source, size ) #define libcstring_system_string_compare_no_case( destination, source, size ) \ libcstring_wide_string_compare_no_case( destination, source, size ) #define libcstring_system_string_copy( destination, source, size ) \ libcstring_wide_string_copy( destination, source, size ) #define libcstring_system_string_length( string ) \ libcstring_wide_string_length( string ) #define libcstring_system_string_search_character( string, character, size ) \ libcstring_wide_string_search_character( string, character, size ) #define libcstring_system_string_search_character_reverse( string, character, size ) \ libcstring_wide_string_search_character_reverse( string, character, size ) #define libcstring_system_string_search_string( string, substring, size ) \ libcstring_wide_string_search_string( string, substring, size ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_system_string_sprintf \ libcstring_wide_string_snwprintf #else #define libcstring_system_string_sprintf( string, size, format, ... ) \ libcstring_wide_string_snwprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_system_string_vsprintf \ libcstring_wide_string_vsnwprintf #else #define libcstring_system_string_vsprintf( string, size, format, ... ) \ libcstring_wide_string_vsnwprintf( string, size, format, __VA_ARGS__ ) #endif #else #define _LIBCSTRING_SYSTEM_STRING( string ) \ string #define libcstring_system_string_allocate( size ) \ libcstring_narrow_string_allocate( size ) #define libcstring_system_string_reallocate( string, size ) \ libcstring_narrow_string_reallocate( string, size ) #define libcstring_system_string_compare( destination, source, size ) \ libcstring_narrow_string_compare( destination, source, size ) #define libcstring_system_string_compare_no_case( destination, source, size ) \ libcstring_narrow_string_compare_no_case( destination, source, size ) #define libcstring_system_string_copy( destination, source, size ) \ libcstring_narrow_string_copy( destination, source, size ) #define libcstring_system_string_length( string ) \ libcstring_narrow_string_length( string ) #define libcstring_system_string_search_character( string, character, size ) \ libcstring_narrow_string_search_character( string, character, size ) #define libcstring_system_string_search_character_reverse( string, character, size ) \ libcstring_narrow_string_search_character_reverse( string, character, size ) #define libcstring_system_string_search_string( string, substring, size ) \ libcstring_narrow_string_search_string( string, substring, size ) #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_system_string_sprintf \ libcstring_narrow_string_snprintf #else #define libcstring_system_string_sprintf( string, size, format, ... ) \ libcstring_narrow_string_snprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_system_string_vsprintf \ libcstring_narrow_string_vsnprintf #else #define libcstring_system_string_vsprintf( string, size, format, ... ) \ libcstring_narrow_string_vsnprintf( string, size, format, __VA_ARGS__ ) #endif #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ #if defined( _cplusplus ) } #endif #endif libpff-20120802/libcstring/Makefile.am0000644000175000017500000000124111745432125014333 00000000000000if HAVE_LOCAL_LIBCSTRING AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcstring.la libcstring_la_SOURCES = \ libcstring_definitions.h \ libcstring_extern.h \ libcstring_narrow_string.h \ libcstring_support.c libcstring_support.h \ libcstring_system_string.h \ libcstring_types.h \ libcstring_unused.h \ libcstring_wide_string.c libcstring_wide_string.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcstring ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcstring_la_SOURCES) libpff-20120802/libcstring/libcstring_narrow_string.h0000644000175000017500000001272511753434025017577 00000000000000/* * Narrow character string functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_NARROW_STRING_H ) #define _LIBCSTRING_NARROW_STRING_H #include #include #include #if defined( HAVE_GLIB_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STRING_H ) || defined( WINAPI ) #include #endif #include "libcstring_types.h" #if defined( __cplusplus ) extern "C" { #endif /* String allocation */ #define libcstring_narrow_string_allocate( size ) \ (char *) memory_allocate( sizeof( char ) * ( size ) ) /* String reallocation */ #define libcstring_narrow_string_reallocate( string, size ) \ (char *) memory_reallocate( string, ( sizeof( char ) * ( size ) ) ) /* String length */ #if defined( HAVE_STRLEN ) || defined( WINAPI ) #define libcstring_narrow_string_length( string ) \ strlen( string ) #endif /* String compare */ #if defined( HAVE_MEMCMP ) || defined( WINAPI ) #define libcstring_narrow_string_compare( string1, string2, size ) \ memcmp( (void *) string1, (void *) string2, size ) #elif defined( HAVE_STRNCMP ) #define libcstring_narrow_string_compare( string1, string2, size ) \ strncmp( string1, string2, size ) #endif /* Caseless string compare */ #if defined( HAVE_GLIB_H ) #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \ g_ascii_strncasecmp( string1, string2, size ) #elif defined( _MSC_VER ) #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \ _strnicmp( string1, string2, size ) #elif defined( WINAPI ) #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \ strnicmp( string1, string2, size ) #elif defined( HAVE_STRNCASECMP ) #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \ strncasecmp( string1, string2, size ) #elif defined( HAVE_STRCASECMP ) #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \ strcasecmp( string1, string2 ) #endif /* String copy */ #if defined( HAVE_MEMCPY ) || defined( WINAPI ) #define libcstring_narrow_string_copy( destination, source, size ) \ (char *) memcpy( (void *) destination, (void *) source, size ) #elif defined( HAVE_STRNCPY ) #define libcstring_narrow_string_copy( destination, source, size ) \ strncpy( destination, source, size ) #endif /* String character search */ #if defined( HAVE_MEMCHR ) || defined( WINAPI ) #define libcstring_narrow_string_search_character( string, character, size ) \ (char *) memchr( (void *) string, (int) character, size ) #elif defined( HAVE_STRCHR ) #define libcstring_narrow_string_search_character( string, character, size ) \ strchr( string, (int) character ) #endif /* String reverse character search */ #if defined( HAVE_MEMRCHR ) && ( HAVE_DECL_MEMRCHR == 1 ) #define libcstring_narrow_string_search_character_reverse( string, character, size ) \ (char *) memrchr( (void *) string, (int) character, size ) #elif defined( HAVE_STRRCHR ) || defined( WINAPI ) #define libcstring_narrow_string_search_character_reverse( string, character, size ) \ strrchr( string, (int) character ) #endif /* String sub-string search */ #if defined( HAVE_STRSTR ) || defined( WINAPI ) #define libcstring_narrow_string_search_string( string, substring, size ) \ strstr( string, substring ) #endif /* String formatted print (snprintf) */ #if defined( HAVE_GLIB_H ) #define libcstring_narrow_string_snprintf( target, size, ... ) \ g_snprintf( target, size, __VA_ARGS__ ) #elif defined( _MSC_VER ) #define libcstring_narrow_string_snprintf( target, size, ... ) \ sprintf_s( target, size, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_narrow_string_snprintf \ snprintf #elif defined( HAVE_SNPRINTF ) || defined( WINAPI ) #define libcstring_narrow_string_snprintf( target, size, ... ) \ snprintf( target, size, __VA_ARGS__ ) #endif /* String input conversion (sscanf) */ #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_narrow_string_sscanf \ sscanf #elif defined( HAVE_SSCANF ) || defined( WINAPI ) #define libcstring_narrow_string_sscanf( string, format, ... ) \ sscanf( string, format, __VA_ARGS__ ) #endif /* Variable arguments formatted print to string function (vsnprintf) */ #if defined( HAVE_GLIB_H ) #define libcstring_narrow_string_vsnprintf( string, size, format, ... ) \ g_vsnprintf( string, size, format, __VA_ARGS__ ) #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 ) #define libcstring_narrow_string_vsnprintf \ vsnprintf #elif defined( HAVE_VSNPRINTF ) || defined( WINAPI ) #define libcstring_narrow_string_vsnprintf( string, size, format, ... ) \ vsnprintf( string, size, format, __VA_ARGS__ ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcstring/libcstring_types.h0000644000175000017500000000322011753434025016033 00000000000000/* * Type definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_TYPES_H ) #define _LIBCSTRING_TYPES_H #include #include #if defined( _cplusplus ) extern "C" { #endif /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring * The definitions in are copied here * for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) /* The system character type is wide * A system string contains either UTF-16 or UTF-32 */ typedef wchar_t libcstring_system_character_t; typedef wint_t libcstring_system_integer_t; #else /* The system character type is narrow * A system string contains either UTF-8 or extended ASCII with a codepage */ typedef char libcstring_system_character_t; typedef int libcstring_system_integer_t; #endif #endif #if defined( _cplusplus ) } #endif #endif libpff-20120802/libcstring/libcstring_definitions.h0000644000175000017500000000335211753434025017210 00000000000000/* * The internal definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_INTERNAL_DEFINITIONS_H ) #define _LIBCSTRING_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if !defined( HAVE_LOCAL_LIBCSTRING ) #include /* The definitions in are copied here * for local use of libcstring */ #else /* Detect if the code is being compiled with Windows Unicode support */ #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) #define LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER 1 #endif #define LIBCSTRING_VERSION 20120507 /* The libcstring version string */ #define LIBCSTRING_VERSION_STRING "20120507" #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) #define PRIc_LIBCSTRING_SYSTEM "lc" #define PRIs_LIBCSTRING_SYSTEM "ls" #else #define PRIc_LIBCSTRING_SYSTEM "c" #define PRIs_LIBCSTRING_SYSTEM "s" #endif #endif #endif libpff-20120802/libcstring/libcstring_extern.h0000644000175000017500000000243711753434025016205 00000000000000/* * The internal extern definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_INTERNAL_EXTERN_H ) #define _LIBCSTRING_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if !defined( HAVE_LOCAL_LIBCSTRING ) /* If libtool DLL support is enabled set LIBCSTRING_DLL_EXPORT * before including libcstring/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCSTRING_DLL_EXPORT #endif #include #else #define LIBCSTRING_EXTERN extern #endif #endif libpff-20120802/libcstring/Makefile.in0000664000175000017500000006172512006536015014355 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcstring DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcstring_la_LIBADD = am__libcstring_la_SOURCES_DIST = libcstring_definitions.h \ libcstring_extern.h libcstring_narrow_string.h \ libcstring_support.c libcstring_support.h \ libcstring_system_string.h libcstring_types.h \ libcstring_unused.h libcstring_wide_string.c \ libcstring_wide_string.h @HAVE_LOCAL_LIBCSTRING_TRUE@am_libcstring_la_OBJECTS = \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_support.lo \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_wide_string.lo libcstring_la_OBJECTS = $(am_libcstring_la_OBJECTS) @HAVE_LOCAL_LIBCSTRING_TRUE@am_libcstring_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcstring_la_SOURCES) DIST_SOURCES = $(am__libcstring_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCSTRING_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCSTRING_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCSTRING_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCSTRING_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCSTRING_TRUE@noinst_LTLIBRARIES = libcstring.la @HAVE_LOCAL_LIBCSTRING_TRUE@libcstring_la_SOURCES = \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_definitions.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_extern.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_narrow_string.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_support.c libcstring_support.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_system_string.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_types.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_unused.h \ @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_wide_string.c libcstring_wide_string.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcstring/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcstring/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcstring.la: $(libcstring_la_OBJECTS) $(libcstring_la_DEPENDENCIES) $(LINK) $(am_libcstring_la_rpath) $(libcstring_la_OBJECTS) $(libcstring_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcstring_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcstring_wide_string.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcstring ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcstring_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcstring/libcstring_unused.h0000644000175000017500000000250611753434025016200 00000000000000/* * The internal unused definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSTRING_INTERNAL_UNUSED_H ) #define _LIBCSTRING_INTERNAL_UNUSED_H #include #if !defined( LIBCSTRING_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCSTRING_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCSTRING_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCSTRING_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCSTRING_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libcstring/libcstring_wide_string.c0000644000175000017500000000372111753434025017206 00000000000000/* * Wide character string functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_WCTYPE_H ) #include #endif #include "libcstring_types.h" #include "libcstring_wide_string.h" #if defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) /* Replacement for missing: wcsncasecmp * Compares no more than a specified number of wide characters of string1 and string2, * ignoring case, returning less than, equal to or greater than zero if string1 is * less than, equal to or greater than string. */ int libcstring_wide_string_compare_no_case( const wchar_t *string1, const wchar_t *string2, size_t comparision_length ) { wint_t character1 = 0; wint_t character2 = 0; if( string1 == string2 ) { return( 0 ); } while( comparision_length > 0 ) { character1 = towlower( *string1 ); character2 = towlower( *string2 ); if( ( character1 == 0 ) || ( character1 != character2 ) ) { return( character1 - character2 ); } string1++; string2++; comparision_length--; } return( 0 ); } #endif /* defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) */ libpff-20120802/libcstring/libcstring_support.c0000644000175000017500000000221611753434025016402 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcstring_definitions.h" #include "libcstring_support.h" #if !defined( HAVE_LOCAL_LIBCSTRING ) /* Returns the library version as a string */ const char *libcstring_get_version( void ) { return( (const char *) LIBCSTRING_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCSTRING ) */ libpff-20120802/NEWS0000644000175000017500000000000011011553564010623 00000000000000libpff-20120802/configure0000754000175000017500000455360412006536013012060 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for libpff 20120802. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: joachim.metz@gmail.com about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpff' PACKAGE_TARNAME='libpff' PACKAGE_VERSION='20120802' PACKAGE_STRING='libpff 20120802' PACKAGE_BUGREPORT='joachim.metz@gmail.com' PACKAGE_URL='' ac_unique_file="include/libpff.h.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS DATE libpff_tools_spec_build_requires libpff_spec_build_requires libpff_spec_requires HAVE_MEMWATCH_FALSE HAVE_MEMWATCH_TRUE MEMWATCH_LIBADD MEMWATCH_CPPFLAGS LIBPFF_DLL_IMPORT HAVE_PYTHON_FALSE HAVE_PYTHON_TRUE PYTHON_EXTRA_LIBS PYTHON_SITE_PKG PYTHON_LDFLAGS PYTHON_CPPFLAGS pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON HAVE_JAVA_FALSE HAVE_JAVA_TRUE JNI_LIBRARY_DIR JAR_PACKAGE_DIR JAVA_CPPFLAGS JAR JAVAH JAVAC JAVA READLINK BASENAME STATIC_LDFLAGS ax_libcsystem_spec_build_requires ax_libcsystem_spec_requires ax_libcsystem_pc_libs_private LIBCSYSTEM_LIBADD LIBCSYSTEM_CPPFLAGS HAVE_LOCAL_LIBCSYSTEM_FALSE HAVE_LOCAL_LIBCSYSTEM_TRUE HAVE_LOCAL_LIBCSYSTEM HAVE_LIBCSYSTEM libcsystem_LIBS libcsystem_CFLAGS ax_libfmapi_spec_build_requires ax_libfmapi_spec_requires ax_libfmapi_pc_libs_private LIBFMAPI_LIBADD LIBFMAPI_CPPFLAGS HAVE_LOCAL_LIBFMAPI_FALSE HAVE_LOCAL_LIBFMAPI_TRUE HAVE_LOCAL_LIBFMAPI HAVE_LIBFMAPI libfmapi_LIBS libfmapi_CFLAGS ax_libfwnt_spec_build_requires ax_libfwnt_spec_requires ax_libfwnt_pc_libs_private LIBFWNT_LIBADD LIBFWNT_CPPFLAGS HAVE_LOCAL_LIBFWNT_FALSE HAVE_LOCAL_LIBFWNT_TRUE HAVE_LOCAL_LIBFWNT HAVE_LIBFWNT libfwnt_LIBS libfwnt_CFLAGS ax_libfvalue_spec_build_requires ax_libfvalue_spec_requires ax_libfvalue_pc_libs_private LIBFVALUE_LIBADD LIBFVALUE_CPPFLAGS HAVE_LOCAL_LIBFVALUE_FALSE HAVE_LOCAL_LIBFVALUE_TRUE HAVE_LOCAL_LIBFVALUE HAVE_LIBFVALUE libfvalue_LIBS libfvalue_CFLAGS ax_libfguid_spec_build_requires ax_libfguid_spec_requires ax_libfguid_pc_libs_private LIBFGUID_LIBADD LIBFGUID_CPPFLAGS HAVE_LOCAL_LIBFGUID_FALSE HAVE_LOCAL_LIBFGUID_TRUE HAVE_LOCAL_LIBFGUID HAVE_LIBFGUID libfguid_LIBS libfguid_CFLAGS ax_libfdatetime_spec_build_requires ax_libfdatetime_spec_requires ax_libfdatetime_pc_libs_private LIBFDATETIME_LIBADD LIBFDATETIME_CPPFLAGS HAVE_LOCAL_LIBFDATETIME_FALSE HAVE_LOCAL_LIBFDATETIME_TRUE HAVE_LOCAL_LIBFDATETIME HAVE_LIBFDATETIME libfdatetime_LIBS libfdatetime_CFLAGS ax_libfdata_spec_build_requires ax_libfdata_spec_requires ax_libfdata_pc_libs_private LIBFDATA_LIBADD LIBFDATA_CPPFLAGS HAVE_LOCAL_LIBFDATA_FALSE HAVE_LOCAL_LIBFDATA_TRUE HAVE_LOCAL_LIBFDATA HAVE_LIBFDATA libfdata_LIBS libfdata_CFLAGS ax_libfcache_spec_build_requires ax_libfcache_spec_requires ax_libfcache_pc_libs_private LIBFCACHE_LIBADD LIBFCACHE_CPPFLAGS HAVE_LOCAL_LIBFCACHE_FALSE HAVE_LOCAL_LIBFCACHE_TRUE HAVE_LOCAL_LIBFCACHE HAVE_LIBFCACHE libfcache_LIBS libfcache_CFLAGS ax_libbfio_spec_build_requires ax_libbfio_spec_requires ax_libbfio_pc_libs_private LIBBFIO_LIBADD LIBBFIO_CPPFLAGS HAVE_LOCAL_LIBBFIO_FALSE HAVE_LOCAL_LIBBFIO_TRUE HAVE_LOCAL_LIBBFIO HAVE_LIBBFIO libbfio_LIBS libbfio_CFLAGS ax_libcpath_spec_build_requires ax_libcpath_spec_requires ax_libcpath_pc_libs_private LIBCPATH_LIBADD LIBCPATH_CPPFLAGS HAVE_LOCAL_LIBCPATH_FALSE HAVE_LOCAL_LIBCPATH_TRUE HAVE_LOCAL_LIBCPATH HAVE_LIBCPATH libcpath_LIBS libcpath_CFLAGS ax_libcfile_spec_build_requires ax_libcfile_spec_requires ax_libcfile_pc_libs_private LIBCFILE_LIBADD LIBCFILE_CPPFLAGS HAVE_LOCAL_LIBCFILE_FALSE HAVE_LOCAL_LIBCFILE_TRUE HAVE_LOCAL_LIBCFILE HAVE_LIBCFILE libcfile_LIBS libcfile_CFLAGS ax_libuna_spec_build_requires ax_libuna_spec_requires ax_libuna_pc_libs_private LIBUNA_LIBADD LIBUNA_CPPFLAGS HAVE_LOCAL_LIBUNA_FALSE HAVE_LOCAL_LIBUNA_TRUE HAVE_LOCAL_LIBUNA HAVE_LIBUNA libuna_LIBS libuna_CFLAGS ax_libcsplit_spec_build_requires ax_libcsplit_spec_requires ax_libcsplit_pc_libs_private LIBCSPLIT_LIBADD LIBCSPLIT_CPPFLAGS HAVE_LOCAL_LIBCSPLIT_FALSE HAVE_LOCAL_LIBCSPLIT_TRUE HAVE_LOCAL_LIBCSPLIT HAVE_LIBCSPLIT libcsplit_LIBS libcsplit_CFLAGS ax_libcnotify_spec_build_requires ax_libcnotify_spec_requires ax_libcnotify_pc_libs_private LIBCNOTIFY_LIBADD LIBCNOTIFY_CPPFLAGS HAVE_LOCAL_LIBCNOTIFY_FALSE HAVE_LOCAL_LIBCNOTIFY_TRUE HAVE_LOCAL_LIBCNOTIFY HAVE_LIBCNOTIFY libcnotify_LIBS libcnotify_CFLAGS ax_libclocale_spec_build_requires ax_libclocale_spec_requires ax_libclocale_pc_libs_private LIBCLOCALE_LIBADD LIBCLOCALE_CPPFLAGS HAVE_LOCAL_LIBCLOCALE_FALSE HAVE_LOCAL_LIBCLOCALE_TRUE HAVE_LOCAL_LIBCLOCALE HAVE_LIBCLOCALE libclocale_LIBS libclocale_CFLAGS ax_libcerror_spec_build_requires ax_libcerror_spec_requires ax_libcerror_pc_libs_private LIBCERROR_LIBADD LIBCERROR_CPPFLAGS HAVE_LOCAL_LIBCERROR_FALSE HAVE_LOCAL_LIBCERROR_TRUE HAVE_LOCAL_LIBCERROR HAVE_LIBCERROR libcerror_LIBS libcerror_CFLAGS ax_libcstring_spec_build_requires ax_libcstring_spec_requires ax_libcstring_pc_libs_private LIBCSTRING_LIBADD LIBCSTRING_CPPFLAGS HAVE_LOCAL_LIBCSTRING_FALSE HAVE_LOCAL_LIBCSTRING_TRUE HAVE_LOCAL_LIBCSTRING HAVE_LIBCSTRING libcstring_LIBS libcstring_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_OFF64_T HAVE_SSIZE64_T HAVE_SIZE64_T HAVE_SSIZE32_T HAVE_SIZE32_T HAVE_STDINT_H HAVE_INTTYPES_H HAVE_SYS_TYPES_H HAVE_WCHAR_H HAVE_WIDE_CHARACTER_TYPE POSUB LTLIBINTL LIBINTL INTLLIBS LTLIBICONV LIBICONV INTL_MACOSX_LIBS XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION USE_NLS PKGCONFIG LIBTOOL_DEPS OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL EGREP GREP CPP OBJDUMP DLLTOOL AS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_largefile enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_nls enable_rpath with_libiconv_prefix with_libintl_prefix enable_winapi enable_wide_character_type with_libcstring with_libcerror with_libclocale with_libcnotify with_libcsplit with_libuna with_libcfile with_libcpath with_libbfio with_libfcache with_libfdata with_libfdatetime with_libfguid with_libfvalue with_libfwnt with_libfmapi with_libcsystem enable_static_executables enable_verbose_output enable_debug_output enable_java with_jdk enable_python ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR libcstring_CFLAGS libcstring_LIBS libcerror_CFLAGS libcerror_LIBS libclocale_CFLAGS libclocale_LIBS libcnotify_CFLAGS libcnotify_LIBS libcsplit_CFLAGS libcsplit_LIBS libuna_CFLAGS libuna_LIBS libcfile_CFLAGS libcfile_LIBS libcpath_CFLAGS libcpath_LIBS libbfio_CFLAGS libbfio_LIBS libfcache_CFLAGS libfcache_LIBS libfdata_CFLAGS libfdata_LIBS libfdatetime_CFLAGS libfdatetime_LIBS libfguid_CFLAGS libfguid_LIBS libfvalue_CFLAGS libfvalue_LIBS libfwnt_CFLAGS libfwnt_LIBS libfmapi_CFLAGS libfmapi_LIBS libcsystem_CFLAGS libcsystem_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libpff 20120802 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libpff] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libpff 20120802:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-largefile omit support for large files --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nls do not use Native Language Support --disable-rpath do not hardcode runtime library paths --enable-winapi enable WINAPI support for cross-compilation [default=auto-detect] --enable-wide-character-type enable wide character type support [default=no] --enable-static-executables build static executables (binaries) [default=no] --enable-verbose-output enable verbose output [default=no] --enable-debug-output enable debug output [default=no] --enable-java build Java bindings [default=no] --enable-python build Python bindings [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib --without-libintl-prefix don't search for libintl in includedir and libdir --with-libcstring[=DIR] search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcerror[=DIR] search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libclocale[=DIR] search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcnotify[=DIR] search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcsplit[=DIR] search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libuna[=DIR] search for libuna in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcfile[=DIR] search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcpath[=DIR] search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libbfio[=DIR] search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfcache[=DIR] search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfdata[=DIR] search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfdatetime[=DIR] search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfguid[=DIR] search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfvalue[=DIR] search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfwnt[=DIR] search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libfmapi[=DIR] search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-libcsystem[=DIR] search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version [default=auto-detect] --with-jdk[=] search for JDK in includedir and libdir or in the specified DIR [default=DIR] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path libcstring_CFLAGS C compiler flags for libcstring, overriding pkg-config libcstring_LIBS linker flags for libcstring, overriding pkg-config libcerror_CFLAGS C compiler flags for libcerror, overriding pkg-config libcerror_LIBS linker flags for libcerror, overriding pkg-config libclocale_CFLAGS C compiler flags for libclocale, overriding pkg-config libclocale_LIBS linker flags for libclocale, overriding pkg-config libcnotify_CFLAGS C compiler flags for libcnotify, overriding pkg-config libcnotify_LIBS linker flags for libcnotify, overriding pkg-config libcsplit_CFLAGS C compiler flags for libcsplit, overriding pkg-config libcsplit_LIBS linker flags for libcsplit, overriding pkg-config libuna_CFLAGS C compiler flags for libuna, overriding pkg-config libuna_LIBS linker flags for libuna, overriding pkg-config libcfile_CFLAGS C compiler flags for libcfile, overriding pkg-config libcfile_LIBS linker flags for libcfile, overriding pkg-config libcpath_CFLAGS C compiler flags for libcpath, overriding pkg-config libcpath_LIBS linker flags for libcpath, overriding pkg-config libbfio_CFLAGS C compiler flags for libbfio, overriding pkg-config libbfio_LIBS linker flags for libbfio, overriding pkg-config libfcache_CFLAGS C compiler flags for libfcache, overriding pkg-config libfcache_LIBS linker flags for libfcache, overriding pkg-config libfdata_CFLAGS C compiler flags for libfdata, overriding pkg-config libfdata_LIBS linker flags for libfdata, overriding pkg-config libfdatetime_CFLAGS C compiler flags for libfdatetime, overriding pkg-config libfdatetime_LIBS linker flags for libfdatetime, overriding pkg-config libfguid_CFLAGS C compiler flags for libfguid, overriding pkg-config libfguid_LIBS linker flags for libfguid, overriding pkg-config libfvalue_CFLAGS C compiler flags for libfvalue, overriding pkg-config libfvalue_LIBS linker flags for libfvalue, overriding pkg-config libfwnt_CFLAGS C compiler flags for libfwnt, overriding pkg-config libfwnt_LIBS linker flags for libfwnt, overriding pkg-config libfmapi_CFLAGS C compiler flags for libfmapi, overriding pkg-config libfmapi_LIBS linker flags for libfmapi, overriding pkg-config libcsystem_CFLAGS C compiler flags for libcsystem, overriding pkg-config libcsystem_LIBS linker flags for libcsystem, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libpff configure 20120802 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to joachim.metz@gmail.com ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libpff $as_me 20120802, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi gt_needs="$gt_needs " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='libpff' VERSION='20120802' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" if test $ac_cv_c_compiler_gnu = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 $as_echo_n "checking whether $CC needs -traditional... " >&6; } if ${ac_cv_prog_gcc_traditional+:} false; then : $as_echo_n "(cached) " >&6 else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi rm -f conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 $as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKGCONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKGCONFIG=$ac_cv_path_PKGCONFIG if test -n "$PKGCONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 $as_echo "$PKGCONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } GETTEXT_MACRO_VERSION=0.17 # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GMSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f messages.po case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&5 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" ;; esac fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$localedir" || localedir='${datadir}/locale' test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= ac_config_commands="$ac_config_commands po-directories" if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 $as_echo_n "checking for ld used by GCC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 $as_echo "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 $as_echo_n "checking for shared library run path origin... " >&6; } if ${acl_cv_rpath+:} false; then : $as_echo_n "(cached) " >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 $as_echo "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBICONV_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFPreferencesCopyAppValue=yes else gt_cv_func_CFPreferencesCopyAppValue=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { CFLocaleCopyCurrent(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_CFLocaleCopyCurrent=yes else gt_cv_func_CFLocaleCopyCurrent=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi LIBINTL= LTLIBINTL= POSUB= case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 $as_echo_n "checking for GNU gettext in libc... " >&6; } if eval \${$gt_func_gnugettext_libc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings; int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libc=yes" else eval "$gt_func_gnugettext_libc=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 $as_echo_n "checking for iconv... " >&6; } if ${am_cv_func_iconv+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 $as_echo "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 $as_echo_n "checking for working iconv... " >&6; } if ${am_cv_func_iconv_works+:} false; then : $as_echo_n "(cached) " >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : am_cv_func_iconv_works=yes else am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 $as_echo "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then $as_echo "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 $as_echo_n "checking how to link with libiconv... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 $as_echo "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libintl-prefix was given. if test "${with_libintl_prefix+set}" = set; then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBINTL= LTLIBINTL= INCINTL= LIBINTL_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='intl ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" else LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBINTL_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBINTL; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" ;; esac done fi else LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$gt_func_gnugettext_libintl=yes" else eval "$gt_func_gnugettext_libintl=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *); int main () { bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= LTLIBINTL= INCINTL= fi if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 $as_echo_n "checking whether to use NLS... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 $as_echo_n "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 $as_echo "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 $as_echo_n "checking how to link with libintl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 $as_echo "$LIBINTL" >&6; } for element in $INCINTL; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done fi $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h fi POSUB=po fi INTLLIBS="$LIBINTL" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi # Check whether --enable-winapi was given. if test "${enable_winapi+set}" = set; then : enableval=$enable_winapi; ac_cv_enable_winapi=$enableval else ac_cv_enable_winapi=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5 $as_echo_n "checking whether to enable enable WINAPI support for cross-compilation... " >&6; } if ${ac_cv_enable_winapi+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_winapi=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_winapi" >&5 $as_echo "$ac_cv_enable_winapi" >&6; } if test "x$ac_cv_enable_winapi" = xauto-detect; then : ac_common_check_winapi_target_string="$target" if test "x$ac_common_check_winapi_target_string" = x; then : ac_common_check_winapi_target_string="$host" fi case $ac_common_check_winapi_target_string in #( *mingw*) : { $as_echo "$as_me:${as_lineno-$LINENO}: detected MinGW enabling WINAPI support for cross-compilation" >&5 $as_echo "$as_me: detected MinGW enabling WINAPI support for cross-compilation" >&6;} ac_cv_enable_winapi=yes ;; #( *) : ac_cv_enable_winapi=no ;; #( *) : ;; esac fi # Check whether --enable-wide-character-type was given. if test "${enable_wide_character_type+set}" = set; then : enableval=$enable_wide_character_type; ac_cv_enable_wide_character_type=$enableval else ac_cv_enable_wide_character_type=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5 $as_echo_n "checking whether to enable enable wide character type support... " >&6; } if ${ac_cv_enable_wide_character_type+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_wide_character_type=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_wide_character_type" >&5 $as_echo "$ac_cv_enable_wide_character_type" >&6; } if test "x$ac_cv_enable_winapi" = xyes; then : ac_cv_enable_wide_character_type=yes fi if test "x$ac_cv_enable_wide_character_type" = xyes; then : $as_echo "#define HAVE_WIDE_CHARACTER_TYPE 1" >>confdefs.h HAVE_WIDE_CHARACTER_TYPE=1 else HAVE_WIDE_CHARACTER_TYPE=0 HAVE_WCHAR_H=0 fi for ac_header in sys/types.h inttypes.h stdint.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_sys_types_h" = xyes; then : HAVE_SYS_TYPES_H=1 else HAVE_SYS_TYPES_H=0 fi if test "x$ac_cv_header_inttypes_h" = xyes; then : HAVE_INTTYPES_H=1 else HAVE_INTTYPES_H=0 fi if test "x$ac_cv_header_stdint_h" = xyes; then : HAVE_STDINT_H=1 else HAVE_STDINT_H=0 fi ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "size32_t" "ac_cv_type_size32_t" "$ac_includes_default" if test "x$ac_cv_type_size32_t" = xyes; then : HAVE_SIZE32_T=1 else HAVE_SIZE32_T=0 fi ac_fn_c_check_type "$LINENO" "ssize32_t" "ac_cv_type_ssize32_t" "$ac_includes_default" if test "x$ac_cv_type_ssize32_t" = xyes; then : HAVE_SSIZE32_T=1 else HAVE_SSIZE32_T=0 fi ac_fn_c_check_type "$LINENO" "size64_t" "ac_cv_type_size64_t" "$ac_includes_default" if test "x$ac_cv_type_size64_t" = xyes; then : HAVE_SIZE64_T=1 else HAVE_SIZE64_T=0 fi ac_fn_c_check_type "$LINENO" "ssize64_t" "ac_cv_type_ssize64_t" "$ac_includes_default" if test "x$ac_cv_type_ssize64_t" = xyes; then : HAVE_SSIZE64_T=1 else HAVE_SSIZE64_T=0 fi ac_fn_c_check_type "$LINENO" "off64_t" "ac_cv_type_off64_t" "$ac_includes_default" if test "x$ac_cv_type_off64_t" = xyes; then : HAVE_OFF64_T=1 else HAVE_OFF64_T=0 fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : fi ac_fn_c_check_type "$LINENO" "u64" "ac_cv_type_u64" "$ac_includes_default" if test "x$ac_cv_type_u64" = xyes; then : fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : else if test "$ac_cv_type_off_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 $as_echo "$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_header in wchar.h do : ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" if test "x$ac_cv_header_wchar_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCHAR_H 1 _ACEOF $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h HAVE_WCHAR_H=1 else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing header: wchar.h See \`config.log' for more details" "$LINENO" 5; } fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 $as_echo_n "checking size of wchar_t... " >&6; } if ${ac_cv_sizeof_wchar_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default"; then : else if test "$ac_cv_type_wchar_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (wchar_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_wchar_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 $as_echo "$ac_cv_sizeof_wchar_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t _ACEOF fi if test "x$ac_cv_enable_winapi" = xyes; then : for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF fi done if test "x$ac_cv_header_windows_h" = xno; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing header: windows.h header is required to compile with winapi support See \`config.log' for more details" "$LINENO" 5; } fi fi if test "x$ac_cv_enable_winapi" = xno; then : for ac_header in libintl.h do : ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINTL_H 1 _ACEOF fi done fi for ac_header in limits.h do : ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIMITS_H 1 _ACEOF fi done for ac_header in stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fclose" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fclose See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_feof" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: feof See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fgets" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgets See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fopen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fopen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fread" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fread See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fseeko and fseeko64 See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fwrite" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fwrite See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_vfprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: vfprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_func in fgetws do : ac_fn_c_check_func "$LINENO" "fgetws" "ac_cv_func_fgetws" if test "x$ac_cv_func_fgetws" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FGETWS 1 _ACEOF fi done if test "x$ac_cv_func_fgetws" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgetws See \`config.log' for more details" "$LINENO" 5; } fi fi for ac_func in free malloc memcmp memcpy memset realloc do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_free" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: free See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_malloc" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: malloc See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memcmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcpy" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memcpy See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memset" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: memset See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_realloc" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: realloc See \`config.log' for more details" "$LINENO" 5; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%jd\"" >&5 $as_echo_n "checking whether printf supports the conversion specifier \"%jd\"... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { printf( "%jd" ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_jd=no else ac_cv_cv_have_printf_jd=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_have_printf_jd" = xyes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf( "%jd", (off_t) 10 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_jd=yes else ac_cv_cv_have_printf_jd=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_cv_have_printf_jd" = xyes; then : if test "$cross_compiling" = yes; then : ac_cv_cv_have_printf_jd=undetermined else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { char string[ 3 ]; if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_cv_have_printf_jd=yes else ac_cv_cv_have_printf_jd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_cv_have_printf_jd" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PRINTF_JD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_jd" >&5 $as_echo "$ac_cv_cv_have_printf_jd" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5 $as_echo_n "checking whether printf supports the conversion specifier \"%zd\"... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { printf( "%zd" ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_zd=no else ac_cv_cv_have_printf_zd=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_have_printf_zd" = xyes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { printf( "%zd", (size_t) 10 ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_have_printf_zd=yes else ac_cv_cv_have_printf_zd=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_cv_have_printf_zd" = xyes; then : if test "$cross_compiling" = yes; then : ac_cv_cv_have_printf_zd=undetermined else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { char string[ 3 ]; if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_cv_have_printf_zd=yes else ac_cv_cv_have_printf_zd=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_cv_have_printf_zd" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PRINTF_ZD 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_zd" >&5 $as_echo "$ac_cv_cv_have_printf_zd" >&6; } fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi # Check whether --with-libcstring was given. if test "${with_libcstring+set}" = set; then : withval=$with_libcstring; ac_cv_with_libcstring=$withval else ac_cv_with_libcstring=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcstring+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcstring=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcstring" >&5 $as_echo "$ac_cv_with_libcstring" >&6; } if test "x$ac_cv_with_libcstring" != x && test "x$ac_cv_with_libcstring" != xno && test "x$ac_cv_with_libcstring" != xauto-detect; then : if test -d "$ac_cv_with_libcstring"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcstring}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcstring}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcstring" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcstring" >&2;} fi fi if test "x$ac_cv_with_libcstring" = xno; then : ac_cv_libcstring=no else if test "x$ac_cv_header_libcstring_h" = xno; then : ac_cv_libcstring=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcstring" >&5 $as_echo_n "checking for libcstring... " >&6; } if test -n "$libcstring_CFLAGS"; then pkg_cv_libcstring_CFLAGS="$libcstring_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcstring >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcstring >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcstring_CFLAGS=`$PKG_CONFIG --cflags "libcstring >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcstring_LIBS"; then pkg_cv_libcstring_LIBS="$libcstring_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcstring >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcstring >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcstring_LIBS=`$PKG_CONFIG --libs "libcstring >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcstring_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcstring >= 20120425" 2>&1` else libcstring_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcstring >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcstring_PKG_ERRORS" >&5 ac_cv_libcstring=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcstring=no else libcstring_CFLAGS=$pkg_cv_libcstring_CFLAGS libcstring_LIBS=$pkg_cv_libcstring_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcstring=yes fi fi fi if test "x$ac_cv_libcstring" = xyes; then : ac_cv_libcstring_CPPFLAGS="$pkg_cv_libcstring_CFLAGS" ac_cv_libcstring_LIBADD="$pkg_cv_libcstring_LIBS" else for ac_header in libcstring.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcstring.h" "ac_cv_header_libcstring_h" "$ac_includes_default" if test "x$ac_cv_header_libcstring_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCSTRING_H 1 _ACEOF fi done if test "x$ac_cv_with_libcstring" = xno; then : ac_cv_libcstring=no else ac_cv_libcstring=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcstring_get_version in -lcstring" >&5 $as_echo_n "checking for libcstring_get_version in -lcstring... " >&6; } if ${ac_cv_lib_cstring_libcstring_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcstring $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcstring_get_version (); int main () { return libcstring_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cstring_libcstring_get_version=yes else ac_cv_lib_cstring_libcstring_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cstring_libcstring_get_version" >&5 $as_echo "$ac_cv_lib_cstring_libcstring_get_version" >&6; } if test "x$ac_cv_lib_cstring_libcstring_get_version" = xyes; then : ac_cv_libcstring_dummy=yes else ac_cv_libcstring=no fi ac_cv_libcstring_LIBADD="-lcstring" fi fi fi if test "x$ac_cv_libcstring" = xyes; then : $as_echo "#define HAVE_LIBCSTRING 1" >>confdefs.h fi if test "x$ac_cv_libcstring" = xyes; then : HAVE_LIBCSTRING=1 else HAVE_LIBCSTRING=0 fi if test "x$ac_cv_libcstring" != xyes; then : for ac_header in stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fgets memchr memcmp memcpy memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strrchr strstr vsnprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fgets" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgets See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memchr and strchr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memcmp and strncmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: memcpy and strncpy See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_memrchr" = xyes; then : ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" if test "x$ac_cv_have_decl_memrchr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MEMRCHR $ac_have_decl _ACEOF if test "x$ac_cv_decl_memrchr" != xyes; then : ac_cv_func_memrchr=no fi fi if test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strrchr and memrchr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_snprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: snprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_sscanf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: sscanf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strlen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: strlen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strncasecmp and strcasecmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strstr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: strstr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_strstr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: vsnprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_func in swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_swprintf" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: swprintf See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemchr and wcschr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemcmp and wcsncmp See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemcpy and wcsncpy See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wmemrchr and wcsrchr See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcslen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcslen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcsncasecmp" != xyes && test "x$ac_cv_func_wcscasecmp" != xyes && test "x$ac_cv_func_towlower" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: wcsncasecmp, wcscasecmp and towlower See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_wcsstr" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcsstr See \`config.log' for more details" "$LINENO" 5; } fi fi ac_cv_libcstring_CPPFLAGS="-I../libcstring"; ac_cv_libcstring_LIBADD="../libcstring/libcstring.la"; ac_cv_libcstring=local $as_echo "#define HAVE_LOCAL_LIBCSTRING 1" >>confdefs.h HAVE_LOCAL_LIBCSTRING=1 fi if test "x$ac_cv_libcstring" = xlocal; then HAVE_LOCAL_LIBCSTRING_TRUE= HAVE_LOCAL_LIBCSTRING_FALSE='#' else HAVE_LOCAL_LIBCSTRING_TRUE='#' HAVE_LOCAL_LIBCSTRING_FALSE= fi if test "x$ac_cv_libcstring_CPPFLAGS" != "x"; then : LIBCSTRING_CPPFLAGS=$ac_cv_libcstring_CPPFLAGS fi if test "x$ac_cv_libcstring_LIBADD" != "x"; then : LIBCSTRING_LIBADD=$ac_cv_libcstring_LIBADD fi if test "x$ac_cv_libcstring" = xyes; then : ax_libcstring_pc_libs_private=-lcstring fi if test "x$ac_cv_libcstring" = xyes; then : ax_libcstring_spec_requires=libcstring ax_libcstring_spec_build_requires=libcstring-devel fi # Check whether --with-libcerror was given. if test "${with_libcerror+set}" = set; then : withval=$with_libcerror; ac_cv_with_libcerror=$withval else ac_cv_with_libcerror=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcerror=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcerror" >&5 $as_echo "$ac_cv_with_libcerror" >&6; } if test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xno && test "x$ac_cv_with_libcerror" != xauto-detect; then : if test -d "$ac_cv_with_libcerror"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcerror" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcerror" >&2;} fi fi if test "x$ac_cv_with_libcerror" = xno; then : ac_cv_libcerror=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror" >&5 $as_echo_n "checking for libcerror... " >&6; } if test -n "$libcerror_CFLAGS"; then pkg_cv_libcerror_CFLAGS="$libcerror_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcerror_CFLAGS=`$PKG_CONFIG --cflags "libcerror >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcerror_LIBS"; then pkg_cv_libcerror_LIBS="$libcerror_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcerror >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcerror >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcerror_LIBS=`$PKG_CONFIG --libs "libcerror >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcerror_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcerror >= 20120425" 2>&1` else libcerror_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcerror >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcerror_PKG_ERRORS" >&5 ac_cv_libcerror=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcerror=no else libcerror_CFLAGS=$pkg_cv_libcerror_CFLAGS libcerror_LIBS=$pkg_cv_libcerror_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcerror=yes fi fi if test "x$ac_cv_libcerror" = xyes; then : ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS" ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS" else for ac_header in libcerror.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcerror.h" "ac_cv_header_libcerror_h" "$ac_includes_default" if test "x$ac_cv_header_libcerror_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCERROR_H 1 _ACEOF fi done if test "x$ac_cv_header_libcerror_h" = xno; then : ac_cv_libcerror=no else ac_cv_libcerror=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_get_version in -lcerror" >&5 $as_echo_n "checking for libcerror_get_version in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_get_version (); int main () { return libcerror_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_get_version=yes else ac_cv_lib_cerror_libcerror_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_get_version" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_get_version" >&6; } if test "x$ac_cv_lib_cerror_libcerror_get_version" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_free in -lcerror" >&5 $as_echo_n "checking for libcerror_error_free in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_free (); int main () { return libcerror_error_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_free=yes else ac_cv_lib_cerror_libcerror_error_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_free" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_free" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_free" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_set in -lcerror" >&5 $as_echo_n "checking for libcerror_error_set in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_set (); int main () { return libcerror_error_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_set=yes else ac_cv_lib_cerror_libcerror_error_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_set" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_set" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_set" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_matches in -lcerror" >&5 $as_echo_n "checking for libcerror_error_matches in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_matches+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_matches (); int main () { return libcerror_error_matches (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_matches=yes else ac_cv_lib_cerror_libcerror_error_matches=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_matches" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_matches" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_matches" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_fprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_fprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_fprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_fprint (); int main () { return libcerror_error_fprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_fprint=yes else ac_cv_lib_cerror_libcerror_error_fprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_fprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_fprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_fprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_sprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_sprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_sprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_sprint (); int main () { return libcerror_error_sprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_sprint=yes else ac_cv_lib_cerror_libcerror_error_sprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_sprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_sprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_sprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_fprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_backtrace_fprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_backtrace_fprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_backtrace_fprint (); int main () { return libcerror_error_backtrace_fprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_backtrace_fprint=yes else ac_cv_lib_cerror_libcerror_error_backtrace_fprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_fprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_error_backtrace_sprint in -lcerror" >&5 $as_echo_n "checking for libcerror_error_backtrace_sprint in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_error_backtrace_sprint+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_error_backtrace_sprint (); int main () { return libcerror_error_backtrace_sprint (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_error_backtrace_sprint=yes else ac_cv_lib_cerror_libcerror_error_backtrace_sprint=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" >&6; } if test "x$ac_cv_lib_cerror_libcerror_error_backtrace_sprint" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcerror_system_set_error in -lcerror" >&5 $as_echo_n "checking for libcerror_system_set_error in -lcerror... " >&6; } if ${ac_cv_lib_cerror_libcerror_system_set_error+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcerror $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcerror_system_set_error (); int main () { return libcerror_system_set_error (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cerror_libcerror_system_set_error=yes else ac_cv_lib_cerror_libcerror_system_set_error=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cerror_libcerror_system_set_error" >&5 $as_echo "$ac_cv_lib_cerror_libcerror_system_set_error" >&6; } if test "x$ac_cv_lib_cerror_libcerror_system_set_error" = xyes; then : ac_cv_libcerror_dummy=yes else ac_cv_libcerror=no fi ac_cv_libcerror_LIBADD="-lcerror" fi fi fi if test "x$ac_cv_libcerror" = xyes; then : $as_echo "#define HAVE_LIBCERROR 1" >>confdefs.h fi if test "x$ac_cv_libcerror" = xyes; then : HAVE_LIBCERROR=1 else HAVE_LIBCERROR=0 fi if test "x$ac_cv_libcerror" != xyes; then : for ac_header in stdarg.h varargs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_wide_character_type" != xno; then : for ac_func in wcstombs do : ac_fn_c_check_func "$LINENO" "wcstombs" "ac_cv_func_wcstombs" if test "x$ac_cv_func_wcstombs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WCSTOMBS 1 _ACEOF fi done if test "x$ac_cv_func_wcstombs" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: wcstombs See \`config.log' for more details" "$LINENO" 5; } fi fi ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" if test "x$ac_cv_have_decl_strerror_r" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_STRERROR_R $ac_have_decl _ACEOF for ac_func in strerror_r do : ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" if test "x$ac_cv_func_strerror_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR_R 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 $as_echo_n "checking whether strerror_r returns char *... " >&6; } if ${ac_cv_func_strerror_r_char_p+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); return !p || x; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default extern char *strerror_r (); int main () { char buf[100]; char x = *strerror_r (0, buf, sizeof buf); return ! isalpha (x); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_strerror_r_char_p=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; } if test $ac_cv_func_strerror_r_char_p = yes; then $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h fi if test "x$ac_cv_have_decl_strerror_r" != xyes; then : for ac_func in strerror do : ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRERROR 1 _ACEOF fi done if test "x$ac_cv_func_strerror" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: strerror_r and strerror See \`config.log' for more details" "$LINENO" 5; } fi fi ac_cv_libcerror_CPPFLAGS="-I../libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local $as_echo "#define HAVE_LOCAL_LIBCERROR 1" >>confdefs.h HAVE_LOCAL_LIBCERROR=1 fi if test "x$ac_cv_libcerror" = xlocal; then HAVE_LOCAL_LIBCERROR_TRUE= HAVE_LOCAL_LIBCERROR_FALSE='#' else HAVE_LOCAL_LIBCERROR_TRUE='#' HAVE_LOCAL_LIBCERROR_FALSE= fi if test "x$ac_cv_libcerror_CPPFLAGS" != "x"; then : LIBCERROR_CPPFLAGS=$ac_cv_libcerror_CPPFLAGS fi if test "x$ac_cv_libcerror_LIBADD" != "x"; then : LIBCERROR_LIBADD=$ac_cv_libcerror_LIBADD fi if test "x$ac_cv_libcerror" = xyes; then : ax_libcerror_pc_libs_private=-lcerror fi if test "x$ac_cv_libcerror" = xyes; then : ax_libcerror_spec_requires=libcerror ax_libcerror_spec_build_requires=libcerror-devel fi # Check whether --with-libclocale was given. if test "${with_libclocale+set}" = set; then : withval=$with_libclocale; ac_cv_with_libclocale=$withval else ac_cv_with_libclocale=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libclocale+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libclocale=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libclocale" >&5 $as_echo "$ac_cv_with_libclocale" >&6; } if test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xno && test "x$ac_cv_with_libclocale" != xauto-detect; then : if test -d "$ac_cv_with_libclocale"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libclocale}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libclocale" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libclocale" >&2;} fi fi if test "x$ac_cv_with_libclocale" = xno; then : ac_cv_libclocale=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale" >&5 $as_echo_n "checking for libclocale... " >&6; } if test -n "$libclocale_CFLAGS"; then pkg_cv_libclocale_CFLAGS="$libclocale_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libclocale_CFLAGS=`$PKG_CONFIG --cflags "libclocale >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libclocale_LIBS"; then pkg_cv_libclocale_LIBS="$libclocale_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libclocale >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libclocale >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libclocale_LIBS=`$PKG_CONFIG --libs "libclocale >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libclocale_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libclocale >= 20120425" 2>&1` else libclocale_PKG_ERRORS=`$PKG_CONFIG --print-errors "libclocale >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libclocale_PKG_ERRORS" >&5 ac_cv_libclocale=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libclocale=no else libclocale_CFLAGS=$pkg_cv_libclocale_CFLAGS libclocale_LIBS=$pkg_cv_libclocale_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libclocale=yes fi fi if test "x$ac_cv_libclocale" = xyes; then : ac_cv_libclocale_CPPFLAGS="$pkg_cv_libclocale_CFLAGS" ac_cv_libclocale_LIBADD="$pkg_cv_libclocale_LIBS" else for ac_header in libclocale.h do : ac_fn_c_check_header_mongrel "$LINENO" "libclocale.h" "ac_cv_header_libclocale_h" "$ac_includes_default" if test "x$ac_cv_header_libclocale_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCLOCALE_H 1 _ACEOF fi done if test "x$ac_cv_header_libclocale_h" = xno; then : ac_cv_libclocale=no else ac_cv_libclocale=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_get_version in -lclocale" >&5 $as_echo_n "checking for libclocale_get_version in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_get_version (); int main () { return libclocale_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_get_version=yes else ac_cv_lib_clocale_libclocale_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_get_version" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_get_version" >&6; } if test "x$ac_cv_lib_clocale_libclocale_get_version" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage (); int main () { return libclocale_codepage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage=yes else ac_cv_lib_clocale_libclocale_codepage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_get in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_get in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_get (); int main () { return libclocale_codepage_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_get=yes else ac_cv_lib_clocale_libclocale_codepage_get=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_get" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_get" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_get" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_set in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_set in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_set (); int main () { return libclocale_codepage_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_set=yes else ac_cv_lib_clocale_libclocale_codepage_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_set" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_set" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_set" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_copy_from_string in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_copy_from_string (); int main () { return libclocale_codepage_copy_from_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_copy_from_string=yes else ac_cv_lib_clocale_libclocale_codepage_copy_from_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_codepage_copy_from_string_wide in -lclocale" >&5 $as_echo_n "checking for libclocale_codepage_copy_from_string_wide in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_codepage_copy_from_string_wide (); int main () { return libclocale_codepage_copy_from_string_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=yes else ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" >&6; } if test "x$ac_cv_lib_clocale_libclocale_codepage_copy_from_string_wide" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_codepage in -lclocale" >&5 $as_echo_n "checking for libclocale_locale_get_codepage in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_locale_get_codepage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_locale_get_codepage (); int main () { return libclocale_locale_get_codepage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_locale_get_codepage=yes else ac_cv_lib_clocale_libclocale_locale_get_codepage=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_codepage" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_locale_get_codepage" >&6; } if test "x$ac_cv_lib_clocale_libclocale_locale_get_codepage" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_locale_get_decimal_point in -lclocale" >&5 $as_echo_n "checking for libclocale_locale_get_decimal_point in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_locale_get_decimal_point+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_locale_get_decimal_point (); int main () { return libclocale_locale_get_decimal_point (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_locale_get_decimal_point=yes else ac_cv_lib_clocale_libclocale_locale_get_decimal_point=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" >&6; } if test "x$ac_cv_lib_clocale_libclocale_locale_get_decimal_point" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libclocale_initialize in -lclocale" >&5 $as_echo_n "checking for libclocale_initialize in -lclocale... " >&6; } if ${ac_cv_lib_clocale_libclocale_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lclocale $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libclocale_initialize (); int main () { return libclocale_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_clocale_libclocale_initialize=yes else ac_cv_lib_clocale_libclocale_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clocale_libclocale_initialize" >&5 $as_echo "$ac_cv_lib_clocale_libclocale_initialize" >&6; } if test "x$ac_cv_lib_clocale_libclocale_initialize" = xyes; then : ac_cv_libclocale_dummy=yes else ac_cv_libclocale=no fi ac_cv_libclocale_LIBADD="-lclocale" fi fi fi if test "x$ac_cv_libclocale" = xyes; then : $as_echo "#define HAVE_LIBCLOCALE 1" >>confdefs.h fi if test "x$ac_cv_libclocale" = xyes; then : HAVE_LIBCLOCALE=1 else HAVE_LIBCLOCALE=0 fi if test "x$ac_cv_libclocale" != xyes; then : for ac_header in langinfo.h locale.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getenv do : ac_fn_c_check_func "$LINENO" "getenv" "ac_cv_func_getenv" if test "x$ac_cv_func_getenv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETENV 1 _ACEOF fi done if test "x$ac_cv_func_getenv" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: getenv See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_enable_winapi" = xno; then : for ac_func in localeconv do : ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" if test "x$ac_cv_func_localeconv" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALECONV 1 _ACEOF fi done if test "x$ac_cv_func_localeconv" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: localeconv See \`config.log' for more details" "$LINENO" 5; } fi fi for ac_func in setlocale do : ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETLOCALE 1 _ACEOF fi done if test "x$ac_cv_func_setlocale" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: setlocale See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in nl_langinfo do : ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NL_LANGINFO 1 _ACEOF fi done if test "x$ac_cv_func_nl_langinfo" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo CODESET support" >&5 $as_echo_n "checking for nl_langinfo CODESET support... " >&6; } if ${ac_cv_cv_langinfo_codeset+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char* charset = nl_langinfo( CODESET ); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_cv_langinfo_codeset=yes else ac_cv_cv_langinfo_codeset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_langinfo_codeset" >&5 $as_echo "$ac_cv_cv_langinfo_codeset" >&6; } else ac_cv_cv_langinfo_codeset=no fi if test "x$ac_cv_cv_langinfo_codeset" = xyes; then : $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi ac_cv_libclocale_CPPFLAGS="-I../libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local $as_echo "#define HAVE_LOCAL_LIBCLOCALE 1" >>confdefs.h HAVE_LOCAL_LIBCLOCALE=1 fi if test "x$ac_cv_libclocale" = xlocal; then HAVE_LOCAL_LIBCLOCALE_TRUE= HAVE_LOCAL_LIBCLOCALE_FALSE='#' else HAVE_LOCAL_LIBCLOCALE_TRUE='#' HAVE_LOCAL_LIBCLOCALE_FALSE= fi if test "x$ac_cv_libclocale_CPPFLAGS" != "x"; then : LIBCLOCALE_CPPFLAGS=$ac_cv_libclocale_CPPFLAGS fi if test "x$ac_cv_libclocale_LIBADD" != "x"; then : LIBCLOCALE_LIBADD=$ac_cv_libclocale_LIBADD fi if test "x$ac_cv_libclocale" = xyes; then : ax_libclocale_pc_libs_private=-lclocale fi if test "x$ac_cv_libclocale" = xyes; then : ax_libclocale_spec_requires=libclocale ax_libclocale_spec_build_requires=libclocale-devel fi # Check whether --with-libcnotify was given. if test "${with_libcnotify+set}" = set; then : withval=$with_libcnotify; ac_cv_with_libcnotify=$withval else ac_cv_with_libcnotify=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcnotify+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcnotify=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcnotify" >&5 $as_echo "$ac_cv_with_libcnotify" >&6; } if test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xno && test "x$ac_cv_with_libcnotify" != xauto-detect; then : if test -d "$ac_cv_with_libcnotify"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcnotify}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcnotify" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcnotify" >&2;} fi fi if test "x$ac_cv_with_libcnotify" = xno; then : ac_cv_libcnotify=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify" >&5 $as_echo_n "checking for libcnotify... " >&6; } if test -n "$libcnotify_CFLAGS"; then pkg_cv_libcnotify_CFLAGS="$libcnotify_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcnotify_CFLAGS=`$PKG_CONFIG --cflags "libcnotify >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcnotify_LIBS"; then pkg_cv_libcnotify_LIBS="$libcnotify_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcnotify >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcnotify >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcnotify_LIBS=`$PKG_CONFIG --libs "libcnotify >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcnotify_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcnotify >= 20120425" 2>&1` else libcnotify_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcnotify >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcnotify_PKG_ERRORS" >&5 ac_cv_libcnotify=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcnotify=no else libcnotify_CFLAGS=$pkg_cv_libcnotify_CFLAGS libcnotify_LIBS=$pkg_cv_libcnotify_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcnotify=yes fi fi if test "x$ac_cv_libcnotify" = xyes; then : ac_cv_libcnotify_CPPFLAGS="$pkg_cv_libcnotify_CFLAGS" ac_cv_libcnotify_LIBADD="$pkg_cv_libcnotify_LIBS" else for ac_header in libcnotify.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcnotify.h" "ac_cv_header_libcnotify_h" "$ac_includes_default" if test "x$ac_cv_header_libcnotify_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCNOTIFY_H 1 _ACEOF fi done if test "x$ac_cv_header_libcnotify_h" = xno; then : ac_cv_libcnotify=no else ac_cv_libcnotify=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_get_version in -lcnotify" >&5 $as_echo_n "checking for libcnotify_get_version in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_get_version (); int main () { return libcnotify_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_get_version=yes else ac_cv_lib_cnotify_libcnotify_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_get_version" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_get_version" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_get_version" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_printf in -lcnotify" >&5 $as_echo_n "checking for libcnotify_printf in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_printf (); int main () { return libcnotify_printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_printf=yes else ac_cv_lib_cnotify_libcnotify_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_printf" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_printf" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_printf" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_data in -lcnotify" >&5 $as_echo_n "checking for libcnotify_print_data in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_print_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_print_data (); int main () { return libcnotify_print_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_print_data=yes else ac_cv_lib_cnotify_libcnotify_print_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_data" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_print_data" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_print_data" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_print_error_backtrace in -lcnotify" >&5 $as_echo_n "checking for libcnotify_print_error_backtrace in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_print_error_backtrace+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_print_error_backtrace (); int main () { return libcnotify_print_error_backtrace (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_print_error_backtrace=yes else ac_cv_lib_cnotify_libcnotify_print_error_backtrace=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_print_error_backtrace" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_set in -lcnotify" >&5 $as_echo_n "checking for libcnotify_stream_set in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_stream_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_stream_set (); int main () { return libcnotify_stream_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_stream_set=yes else ac_cv_lib_cnotify_libcnotify_stream_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_set" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_stream_set" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_stream_set" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_open in -lcnotify" >&5 $as_echo_n "checking for libcnotify_stream_open in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_stream_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_stream_open (); int main () { return libcnotify_stream_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_stream_open=yes else ac_cv_lib_cnotify_libcnotify_stream_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_open" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_stream_open" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_stream_open" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_stream_close in -lcnotify" >&5 $as_echo_n "checking for libcnotify_stream_close in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_stream_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_stream_close (); int main () { return libcnotify_stream_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_stream_close=yes else ac_cv_lib_cnotify_libcnotify_stream_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_stream_close" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_stream_close" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_stream_close" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcnotify_verbose_set in -lcnotify" >&5 $as_echo_n "checking for libcnotify_verbose_set in -lcnotify... " >&6; } if ${ac_cv_lib_cnotify_libcnotify_verbose_set+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcnotify $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcnotify_verbose_set (); int main () { return libcnotify_verbose_set (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cnotify_libcnotify_verbose_set=yes else ac_cv_lib_cnotify_libcnotify_verbose_set=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cnotify_libcnotify_verbose_set" >&5 $as_echo "$ac_cv_lib_cnotify_libcnotify_verbose_set" >&6; } if test "x$ac_cv_lib_cnotify_libcnotify_verbose_set" = xyes; then : ac_cv_libcnotify_dummy=yes else ac_cv_libcnotify=no fi ac_cv_libcnotify_LIBADD="-lcnotify" fi fi fi if test "x$ac_cv_libcnotify" = xyes; then : $as_echo "#define HAVE_LIBCNOTIFY 1" >>confdefs.h fi if test "x$ac_cv_libcnotify" = xyes; then : HAVE_LIBCNOTIFY=1 else HAVE_LIBCNOTIFY=0 fi if test "x$ac_cv_libcnotify" != xyes; then : for ac_header in stdarg.h varargs.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing headers: stdarg.h and varargs.h See \`config.log' for more details" "$LINENO" 5; } fi for ac_header in errno.h do : ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ERRNO_H 1 _ACEOF fi done ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local $as_echo "#define HAVE_LOCAL_LIBCNOTIFY 1" >>confdefs.h HAVE_LOCAL_LIBCNOTIFY=1 fi if test "x$ac_cv_libcnotify" = xlocal; then HAVE_LOCAL_LIBCNOTIFY_TRUE= HAVE_LOCAL_LIBCNOTIFY_FALSE='#' else HAVE_LOCAL_LIBCNOTIFY_TRUE='#' HAVE_LOCAL_LIBCNOTIFY_FALSE= fi if test "x$ac_cv_libcnotify_CPPFLAGS" != "x"; then : LIBCNOTIFY_CPPFLAGS=$ac_cv_libcnotify_CPPFLAGS fi if test "x$ac_cv_libcnotify_LIBADD" != "x"; then : LIBCNOTIFY_LIBADD=$ac_cv_libcnotify_LIBADD fi if test "x$ac_cv_libcnotify" = xyes; then : ax_libcnotify_pc_libs_private=-lcnotify fi if test "x$ac_cv_libcnotify" = xyes; then : ax_libcnotify_spec_requires=libcnotify ax_libcnotify_spec_build_requires=libcnotify-devel fi # Check whether --with-libcsplit was given. if test "${with_libcsplit+set}" = set; then : withval=$with_libcsplit; ac_cv_with_libcsplit=$withval else ac_cv_with_libcsplit=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcsplit+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcsplit=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsplit" >&5 $as_echo "$ac_cv_with_libcsplit" >&6; } if test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xno && test "x$ac_cv_with_libcsplit" != xauto-detect; then : if test -d "$ac_cv_with_libcsplit"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcsplit}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsplit}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcsplit" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcsplit" >&2;} fi fi if test "x$ac_cv_with_libcsplit" = xno; then : ac_cv_libcsplit=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit" >&5 $as_echo_n "checking for libcsplit... " >&6; } if test -n "$libcsplit_CFLAGS"; then pkg_cv_libcsplit_CFLAGS="$libcsplit_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsplit_CFLAGS=`$PKG_CONFIG --cflags "libcsplit >= 20120701" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcsplit_LIBS"; then pkg_cv_libcsplit_LIBS="$libcsplit_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsplit >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsplit >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsplit_LIBS=`$PKG_CONFIG --libs "libcsplit >= 20120701" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcsplit_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcsplit >= 20120701" 2>&1` else libcsplit_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcsplit >= 20120701" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcsplit_PKG_ERRORS" >&5 ac_cv_libcsplit=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcsplit=no else libcsplit_CFLAGS=$pkg_cv_libcsplit_CFLAGS libcsplit_LIBS=$pkg_cv_libcsplit_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcsplit=yes fi fi if test "x$ac_cv_libcsplit" = xyes; then : ac_cv_libcsplit_CPPFLAGS="$pkg_cv_libcsplit_CFLAGS" ac_cv_libcsplit_LIBADD="$pkg_cv_libcsplit_LIBS" else for ac_header in libcsplit.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcsplit.h" "ac_cv_header_libcsplit_h" "$ac_includes_default" if test "x$ac_cv_header_libcsplit_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCSPLIT_H 1 _ACEOF fi done if test "x$ac_cv_header_libcsplit_h" = xno; then : ac_cv_libcsplit=no else ac_cv_libcsplit=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_get_version in -lcsplit" >&5 $as_echo_n "checking for libcsplit_get_version in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_get_version (); int main () { return libcsplit_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_get_version=yes else ac_cv_lib_csplit_libcsplit_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_get_version" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_get_version" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_get_version" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_string_split in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_string_split in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_string_split (); int main () { return libcsplit_narrow_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_string_split=yes else ac_cv_lib_csplit_libcsplit_narrow_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_string_split" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_string_split" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_string_split" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_free in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_free in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_free (); int main () { return libcsplit_narrow_split_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_free=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_free" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_string in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_get_string in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_get_string (); int main () { return libcsplit_narrow_split_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_string" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_get_number_of_segments in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_get_number_of_segments (); int main () { return libcsplit_narrow_split_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_number_of_segments" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_get_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_get_segment_by_index (); int main () { return libcsplit_narrow_split_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_get_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_narrow_split_string_set_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_narrow_split_string_set_segment_by_index (); int main () { return libcsplit_narrow_split_string_set_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_narrow_split_string_set_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_string_split in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_string_split in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_string_split (); int main () { return libcsplit_wide_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_string_split=yes else ac_cv_lib_csplit_libcsplit_wide_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_string_split" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_string_split" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_string_split" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_free in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_free in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_free (); int main () { return libcsplit_wide_split_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_free=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_free" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_free" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_string in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_get_string in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_get_string (); int main () { return libcsplit_wide_split_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_string" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_get_number_of_segments in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_get_number_of_segments (); int main () { return libcsplit_wide_split_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_number_of_segments" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_get_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_get_segment_by_index (); int main () { return libcsplit_wide_split_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_get_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit" >&5 $as_echo_n "checking for libcsplit_wide_split_string_set_segment_by_index in -lcsplit... " >&6; } if ${ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsplit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsplit_wide_split_string_set_segment_by_index (); int main () { return libcsplit_wide_split_string_set_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=yes else ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&5 $as_echo "$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" >&6; } if test "x$ac_cv_lib_csplit_libcsplit_wide_split_string_set_segment_by_index" = xyes; then : ac_cv_libcsplit_dummy=yes else ac_cv_libcsplit=no fi fi ac_cv_libcsplit_LIBADD="-lcsplit" fi fi fi if test "x$ac_cv_libcsplit" = xyes; then : $as_echo "#define HAVE_LIBCSPLIT 1" >>confdefs.h fi if test "x$ac_cv_libcsplit" = xyes; then : HAVE_LIBCSPLIT=1 else HAVE_LIBCSPLIT=0 fi if test "x$ac_cv_libcsplit" != xyes; then : $as_echo "#define HAVE_LOCAL_LIBCSPLIT 1" >>confdefs.h HAVE_LOCAL_LIBCSPLIT=1 ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local fi if test "x$ac_cv_libcsplit" = xlocal; then HAVE_LOCAL_LIBCSPLIT_TRUE= HAVE_LOCAL_LIBCSPLIT_FALSE='#' else HAVE_LOCAL_LIBCSPLIT_TRUE='#' HAVE_LOCAL_LIBCSPLIT_FALSE= fi if test "x$ac_cv_libcsplit_CPPFLAGS" != "x"; then : LIBCSPLIT_CPPFLAGS=$ac_cv_libcsplit_CPPFLAGS fi if test "x$ac_cv_libcsplit_LIBADD" != "x"; then : LIBCSPLIT_LIBADD=$ac_cv_libcsplit_LIBADD fi if test "x$ac_cv_libcsplit" = xyes; then : ax_libcsplit_pc_libs_private=-lcsplit fi if test "x$ac_cv_libcsplit" = xyes; then : ax_libcsplit_spec_requires=libcsplit ax_libcsplit_spec_build_requires=libcsplit-devel fi # Check whether --with-libuna was given. if test "${with_libuna+set}" = set; then : withval=$with_libuna; ac_cv_with_libuna=$withval else ac_cv_with_libuna=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libuna in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libuna+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libuna=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libuna" >&5 $as_echo "$ac_cv_with_libuna" >&6; } if test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xno && test "x$ac_cv_with_libuna" != xauto-detect; then : if test -d "$ac_cv_with_libuna"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libuna}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libuna}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libuna" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libuna" >&2;} fi fi if test "x$ac_cv_with_libuna" = xno; then : ac_cv_libuna=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna" >&5 $as_echo_n "checking for libuna... " >&6; } if test -n "$libuna_CFLAGS"; then pkg_cv_libuna_CFLAGS="$libuna_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libuna >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libuna_CFLAGS=`$PKG_CONFIG --cflags "libuna >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libuna_LIBS"; then pkg_cv_libuna_LIBS="$libuna_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libuna >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libuna >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libuna_LIBS=`$PKG_CONFIG --libs "libuna >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libuna_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libuna >= 20120425" 2>&1` else libuna_PKG_ERRORS=`$PKG_CONFIG --print-errors "libuna >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libuna_PKG_ERRORS" >&5 ac_cv_libuna=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libuna=no else libuna_CFLAGS=$pkg_cv_libuna_CFLAGS libuna_LIBS=$pkg_cv_libuna_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libuna=yes fi fi if test "x$ac_cv_libuna" = xyes; then : ac_cv_libuna_CPPFLAGS="$pkg_cv_libuna_CFLAGS" ac_cv_libuna_LIBADD="$pkg_cv_libuna_LIBS" else for ac_header in libuna.h do : ac_fn_c_check_header_mongrel "$LINENO" "libuna.h" "ac_cv_header_libuna_h" "$ac_includes_default" if test "x$ac_cv_header_libuna_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUNA_H 1 _ACEOF fi done if test "x$ac_cv_header_libuna_h" = xno; then : ac_cv_libuna=no else ac_cv_libuna=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_get_version in -luna" >&5 $as_echo_n "checking for libuna_get_version in -luna... " >&6; } if ${ac_cv_lib_una_libuna_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_get_version (); int main () { return libuna_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_get_version=yes else ac_cv_lib_una_libuna_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_get_version" >&5 $as_echo "$ac_cv_lib_una_libuna_get_version" >&6; } if test "x$ac_cv_lib_una_libuna_get_version" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_size_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_size_to_byte_stream (); int main () { return libuna_base16_stream_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_size_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_copy_to_byte_stream (); int main () { return libuna_base16_stream_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_size_from_byte_stream (); int main () { return libuna_base16_stream_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_copy_from_byte_stream (); int main () { return libuna_base16_stream_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base16_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base16_stream_with_index_copy_from_byte_stream (); int main () { return libuna_base16_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base16_stream_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_from_base32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_from_base32_stream (); int main () { return libuna_base32_quintuplet_copy_from_base32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_base32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_to_base32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_to_base32_stream (); int main () { return libuna_base32_quintuplet_copy_to_base32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_base32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_from_byte_stream (); int main () { return libuna_base32_quintuplet_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_quintuplet_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_quintuplet_copy_to_byte_stream (); int main () { return libuna_base32_quintuplet_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_quintuplet_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_size_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_size_to_byte_stream (); int main () { return libuna_base32_stream_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_size_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_copy_to_byte_stream (); int main () { return libuna_base32_stream_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_size_from_byte_stream (); int main () { return libuna_base32_stream_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_copy_from_byte_stream (); int main () { return libuna_base32_stream_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base32_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base32_stream_with_index_copy_from_byte_stream (); int main () { return libuna_base32_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base32_stream_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_base64_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_from_base64_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_from_base64_stream (); int main () { return libuna_base64_triplet_copy_from_base64_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_base64_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_base64_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_to_base64_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_to_base64_stream (); int main () { return libuna_base64_triplet_copy_to_base64_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_base64_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_from_byte_stream (); int main () { return libuna_base64_triplet_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_triplet_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_triplet_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_triplet_copy_to_byte_stream (); int main () { return libuna_base64_triplet_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_triplet_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_size_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_size_to_byte_stream (); int main () { return libuna_base64_stream_size_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_size_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_to_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_copy_to_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_copy_to_byte_stream (); int main () { return libuna_base64_stream_copy_to_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_copy_to_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_size_from_byte_stream (); int main () { return libuna_base64_stream_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_copy_from_byte_stream (); int main () { return libuna_base64_stream_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_base64_stream_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_base64_stream_with_index_copy_from_byte_stream (); int main () { return libuna_base64_stream_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_base64_stream_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_size_from_utf8 (); int main () { return libuna_byte_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_byte_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_copy_from_utf8 (); int main () { return libuna_byte_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_byte_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_size_from_utf16 (); int main () { return libuna_byte_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_byte_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_copy_from_utf16 (); int main () { return libuna_byte_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_byte_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_size_from_utf32 (); int main () { return libuna_byte_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_byte_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_byte_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_byte_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_byte_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_byte_stream_copy_from_utf32 (); int main () { return libuna_byte_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_byte_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_byte_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_size_from_utf8 (); int main () { return libuna_utf8_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_utf8_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_copy_from_utf8 (); int main () { return libuna_utf8_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_size_from_utf16 (); int main () { return libuna_utf8_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_utf8_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_copy_from_utf16 (); int main () { return libuna_utf8_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_size_from_utf32 (); int main () { return libuna_utf8_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_utf8_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_stream_copy_from_utf32 (); int main () { return libuna_utf8_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_size_from_utf8 (); int main () { return libuna_utf16_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_utf16_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_copy_from_utf8 (); int main () { return libuna_utf16_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_size_from_utf16 (); int main () { return libuna_utf16_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_utf16_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_copy_from_utf16 (); int main () { return libuna_utf16_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_size_from_utf32 (); int main () { return libuna_utf16_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_utf16_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_stream_copy_from_utf32 (); int main () { return libuna_utf16_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_size_from_utf8 (); int main () { return libuna_utf32_stream_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=yes else ac_cv_lib_una_libuna_utf32_stream_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_copy_from_utf8 (); int main () { return libuna_utf32_stream_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_size_from_utf16 (); int main () { return libuna_utf32_stream_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=yes else ac_cv_lib_una_libuna_utf32_stream_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_copy_from_utf16 (); int main () { return libuna_utf32_stream_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_size_from_utf32 (); int main () { return libuna_utf32_stream_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=yes else ac_cv_lib_una_libuna_utf32_stream_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_stream_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf32_stream_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_stream_copy_from_utf32 (); int main () { return libuna_utf32_stream_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_stream_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_byte_stream (); int main () { return libuna_utf8_string_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_byte_stream (); int main () { return libuna_utf8_string_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_byte_stream (); int main () { return libuna_utf8_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf7_stream (); int main () { return libuna_utf8_string_size_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf7_stream (); int main () { return libuna_utf8_string_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf7_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf8_stream (); int main () { return libuna_utf8_string_size_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf8_stream (); int main () { return libuna_utf8_string_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf8_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf16_stream (); int main () { return libuna_utf8_string_size_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf16_stream (); int main () { return libuna_utf8_string_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf16_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf32_stream (); int main () { return libuna_utf8_string_size_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf32_stream (); int main () { return libuna_utf8_string_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf32_stream (); int main () { return libuna_utf8_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf16 (); int main () { return libuna_utf8_string_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf16=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf16 (); int main () { return libuna_utf8_string_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf16 (); int main () { return libuna_utf8_string_with_index_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_size_from_utf32 (); int main () { return libuna_utf8_string_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_size_from_utf32=yes else ac_cv_lib_una_libuna_utf8_string_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_copy_from_utf32 (); int main () { return libuna_utf8_string_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf8_string_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf8_string_with_index_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf8_string_with_index_copy_from_utf32 (); int main () { return libuna_utf8_string_with_index_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf8_string_with_index_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_byte_stream (); int main () { return libuna_utf16_string_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_byte_stream (); int main () { return libuna_utf16_string_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_byte_stream (); int main () { return libuna_utf16_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf7_stream (); int main () { return libuna_utf16_string_size_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf7_stream (); int main () { return libuna_utf16_string_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf7_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf8_stream (); int main () { return libuna_utf16_string_size_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf8_stream (); int main () { return libuna_utf16_string_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf8_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf16_stream (); int main () { return libuna_utf16_string_size_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf16_stream (); int main () { return libuna_utf16_string_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf16_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf32_stream (); int main () { return libuna_utf16_string_size_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf32_stream (); int main () { return libuna_utf16_string_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf32_stream (); int main () { return libuna_utf16_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf8 (); int main () { return libuna_utf16_string_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf8=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf8 (); int main () { return libuna_utf16_string_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf8 (); int main () { return libuna_utf16_string_with_index_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_size_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_size_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_size_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_size_from_utf32 (); int main () { return libuna_utf16_string_size_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_size_from_utf32=yes else ac_cv_lib_una_libuna_utf16_string_size_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_size_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_copy_from_utf32 (); int main () { return libuna_utf16_string_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf16_string_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna" >&5 $as_echo_n "checking for libuna_utf16_string_with_index_copy_from_utf32 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf16_string_with_index_copy_from_utf32 (); int main () { return libuna_utf16_string_with_index_copy_from_utf32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=yes else ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&5 $as_echo "$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" >&6; } if test "x$ac_cv_lib_una_libuna_utf16_string_with_index_copy_from_utf32" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_byte_stream (); int main () { return libuna_utf32_string_size_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_byte_stream (); int main () { return libuna_utf32_string_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_byte_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_byte_stream (); int main () { return libuna_utf32_string_with_index_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_byte_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf7_stream (); int main () { return libuna_utf32_string_size_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf7_stream (); int main () { return libuna_utf32_string_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf7_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf7_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf7_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf7_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf8_stream (); int main () { return libuna_utf32_string_size_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf8_stream (); int main () { return libuna_utf32_string_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf8_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf8_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf8_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf8_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf16_stream (); int main () { return libuna_utf32_string_size_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf16_stream (); int main () { return libuna_utf32_string_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf16_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf16_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf16_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf32_stream (); int main () { return libuna_utf32_string_size_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf32_stream (); int main () { return libuna_utf32_string_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf32_stream in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf32_stream (); int main () { return libuna_utf32_string_with_index_copy_from_utf32_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf32_stream" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf8 (); int main () { return libuna_utf32_string_size_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf8=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf8 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf8 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf8+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf8 (); int main () { return libuna_utf32_string_copy_from_utf8 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf8" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi as_ac_Lib=`$as_echo "ac_cv_lib_libuna_utf32_string_with_index_copy_from_utf8_ac_cv_libuna_dummy=yes" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8" >&5 $as_echo_n "checking for ac_cv_libuna_dummy=yes in -llibuna_utf32_string_with_index_copy_from_utf8... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llibuna_utf32_string_with_index_copy_from_utf8 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ac_cv_libuna_dummy=yes (); int main () { return ac_cv_libuna_dummy=yes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_size_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_size_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_size_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_size_from_utf16 (); int main () { return libuna_utf32_string_size_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_size_from_utf16=yes else ac_cv_lib_una_libuna_utf32_string_size_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_size_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_copy_from_utf16 (); int main () { return libuna_utf32_string_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf32_string_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna" >&5 $as_echo_n "checking for libuna_utf32_string_with_index_copy_from_utf16 in -luna... " >&6; } if ${ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luna $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libuna_utf32_string_with_index_copy_from_utf16 (); int main () { return libuna_utf32_string_with_index_copy_from_utf16 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=yes else ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&5 $as_echo "$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" >&6; } if test "x$ac_cv_lib_una_libuna_utf32_string_with_index_copy_from_utf16" = xyes; then : ac_cv_libuna_dummy=yes else ac_cv_libuna=no fi ac_cv_libuna_LIBADD="-luna" fi fi fi if test "x$ac_cv_libuna" = xyes; then : $as_echo "#define HAVE_LIBUNA 1" >>confdefs.h fi if test "x$ac_cv_libuna" = xyes; then : HAVE_LIBUNA=1 else HAVE_LIBUNA=0 fi if test "x$ac_cv_libuna" != xyes; then : ac_cv_libuna_CPPFLAGS="-I../libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local $as_echo "#define HAVE_LOCAL_LIBUNA 1" >>confdefs.h HAVE_LOCAL_LIBUNA=1 fi if test "x$ac_cv_libuna" = xlocal; then HAVE_LOCAL_LIBUNA_TRUE= HAVE_LOCAL_LIBUNA_FALSE='#' else HAVE_LOCAL_LIBUNA_TRUE='#' HAVE_LOCAL_LIBUNA_FALSE= fi if test "x$ac_cv_libuna_CPPFLAGS" != "x"; then : LIBUNA_CPPFLAGS=$ac_cv_libuna_CPPFLAGS fi if test "x$ac_cv_libuna_LIBADD" != "x"; then : LIBUNA_LIBADD=$ac_cv_libuna_LIBADD fi if test "x$ac_cv_libuna" = xyes; then : ax_libuna_pc_libs_private=-luna fi if test "x$ac_cv_libuna" = xyes; then : ax_libuna_spec_requires=libuna ax_libuna_spec_build_requires=libuna-devel fi # Check whether --with-libcfile was given. if test "${with_libcfile+set}" = set; then : withval=$with_libcfile; ac_cv_with_libcfile=$withval else ac_cv_with_libcfile=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcfile+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcfile=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcfile" >&5 $as_echo "$ac_cv_with_libcfile" >&6; } if test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xno && test "x$ac_cv_with_libcfile" != xauto-detect; then : if test -d "$ac_cv_with_libcfile"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcfile" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcfile" >&2;} fi fi if test "x$ac_cv_with_libcfile" = xno; then : ac_cv_libcfile=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile" >&5 $as_echo_n "checking for libcfile... " >&6; } if test -n "$libcfile_CFLAGS"; then pkg_cv_libcfile_CFLAGS="$libcfile_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20120526\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20120526") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_CFLAGS=`$PKG_CONFIG --cflags "libcfile >= 20120526" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcfile_LIBS"; then pkg_cv_libcfile_LIBS="$libcfile_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcfile >= 20120526\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcfile >= 20120526") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcfile_LIBS=`$PKG_CONFIG --libs "libcfile >= 20120526" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcfile_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcfile >= 20120526" 2>&1` else libcfile_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcfile >= 20120526" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcfile_PKG_ERRORS" >&5 ac_cv_libcfile=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcfile=no else libcfile_CFLAGS=$pkg_cv_libcfile_CFLAGS libcfile_LIBS=$pkg_cv_libcfile_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcfile=yes fi fi if test "x$ac_cv_libcfile" = xyes; then : ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS" ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS" else for ac_header in libcfile.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcfile.h" "ac_cv_header_libcfile_h" "$ac_includes_default" if test "x$ac_cv_header_libcfile_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCFILE_H 1 _ACEOF fi done if test "x$ac_cv_header_libcfile_h" = xno; then : ac_cv_libcfile=no else ac_cv_libcfile=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_get_version in -lcfile" >&5 $as_echo_n "checking for libcfile_get_version in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_get_version (); int main () { return libcfile_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_get_version=yes else ac_cv_lib_cfile_libcfile_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_get_version" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_get_version" >&6; } if test "x$ac_cv_lib_cfile_libcfile_get_version" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_initialize in -lcfile" >&5 $as_echo_n "checking for libcfile_file_initialize in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_initialize (); int main () { return libcfile_file_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_initialize=yes else ac_cv_lib_cfile_libcfile_file_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_initialize" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_initialize" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_initialize" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_free in -lcfile" >&5 $as_echo_n "checking for libcfile_file_free in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_free (); int main () { return libcfile_file_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_free=yes else ac_cv_lib_cfile_libcfile_file_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_free" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_free" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_free" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open in -lcfile" >&5 $as_echo_n "checking for libcfile_file_open in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_open (); int main () { return libcfile_file_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_open=yes else ac_cv_lib_cfile_libcfile_file_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_open" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_open" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_close in -lcfile" >&5 $as_echo_n "checking for libcfile_file_close in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_close (); int main () { return libcfile_file_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_close=yes else ac_cv_lib_cfile_libcfile_file_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_close" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_close" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_close" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_read_buffer in -lcfile" >&5 $as_echo_n "checking for libcfile_file_read_buffer in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_read_buffer (); int main () { return libcfile_file_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_read_buffer=yes else ac_cv_lib_cfile_libcfile_file_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_read_buffer" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_read_buffer" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_read_buffer" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_write_buffer in -lcfile" >&5 $as_echo_n "checking for libcfile_file_write_buffer in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_write_buffer (); int main () { return libcfile_file_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_write_buffer=yes else ac_cv_lib_cfile_libcfile_file_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_write_buffer" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_write_buffer" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_write_buffer" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_seek_offset in -lcfile" >&5 $as_echo_n "checking for libcfile_file_seek_offset in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_seek_offset (); int main () { return libcfile_file_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_seek_offset=yes else ac_cv_lib_cfile_libcfile_file_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_seek_offset" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_seek_offset" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_seek_offset" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_resize in -lcfile" >&5 $as_echo_n "checking for libcfile_file_resize in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_resize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_resize (); int main () { return libcfile_file_resize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_resize=yes else ac_cv_lib_cfile_libcfile_file_resize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_resize" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_resize" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_resize" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_is_open in -lcfile" >&5 $as_echo_n "checking for libcfile_file_is_open in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_is_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_is_open (); int main () { return libcfile_file_is_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_is_open=yes else ac_cv_lib_cfile_libcfile_file_is_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_is_open" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_is_open" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_is_open" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_offset in -lcfile" >&5 $as_echo_n "checking for libcfile_file_get_offset in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_get_offset (); int main () { return libcfile_file_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_get_offset=yes else ac_cv_lib_cfile_libcfile_file_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_offset" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_get_offset" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_get_offset" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_get_size in -lcfile" >&5 $as_echo_n "checking for libcfile_file_get_size in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_get_size (); int main () { return libcfile_file_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_get_size=yes else ac_cv_lib_cfile_libcfile_file_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_get_size" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_get_size" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_get_size" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_open_wide in -lcfile" >&5 $as_echo_n "checking for libcfile_file_open_wide in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_open_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_open_wide (); int main () { return libcfile_file_open_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_open_wide=yes else ac_cv_lib_cfile_libcfile_file_open_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_open_wide" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_open_wide" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_open_wide" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_initialize in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_initialize in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_initialize (); int main () { return libcfile_stream_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_initialize=yes else ac_cv_lib_cfile_libcfile_stream_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_initialize" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_initialize" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_initialize" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_free in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_free in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_free (); int main () { return libcfile_stream_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_free=yes else ac_cv_lib_cfile_libcfile_stream_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_free" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_free" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_free" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_open in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_open in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_open (); int main () { return libcfile_stream_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_open=yes else ac_cv_lib_cfile_libcfile_stream_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_open" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_open" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_open" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_close in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_close in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_close (); int main () { return libcfile_stream_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_close=yes else ac_cv_lib_cfile_libcfile_stream_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_close" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_close" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_close" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_read_buffer in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_read_buffer in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_read_buffer (); int main () { return libcfile_stream_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_read_buffer=yes else ac_cv_lib_cfile_libcfile_stream_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_read_buffer" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_read_buffer" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_read_buffer" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_write_buffer in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_write_buffer in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_write_buffer (); int main () { return libcfile_stream_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_write_buffer=yes else ac_cv_lib_cfile_libcfile_stream_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_write_buffer" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_write_buffer" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_write_buffer" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_seek_offset in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_seek_offset in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_seek_offset (); int main () { return libcfile_stream_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_seek_offset=yes else ac_cv_lib_cfile_libcfile_stream_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_seek_offset" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_seek_offset" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_seek_offset" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_get_offset in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_get_offset in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_get_offset (); int main () { return libcfile_stream_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_get_offset=yes else ac_cv_lib_cfile_libcfile_stream_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_get_offset" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_get_offset" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_get_offset" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_get_size in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_get_size in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_get_size (); int main () { return libcfile_stream_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_get_size=yes else ac_cv_lib_cfile_libcfile_stream_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_get_size" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_get_size" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_get_size" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_stream_open_wide in -lcfile" >&5 $as_echo_n "checking for libcfile_stream_open_wide in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_stream_open_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_stream_open_wide (); int main () { return libcfile_stream_open_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_stream_open_wide=yes else ac_cv_lib_cfile_libcfile_stream_open_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_stream_open_wide" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_stream_open_wide" >&6; } if test "x$ac_cv_lib_cfile_libcfile_stream_open_wide" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists in -lcfile" >&5 $as_echo_n "checking for libcfile_file_exists in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_exists+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_exists (); int main () { return libcfile_file_exists (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_exists=yes else ac_cv_lib_cfile_libcfile_file_exists=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_exists" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_exists" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcfile_file_exists_wide in -lcfile" >&5 $as_echo_n "checking for libcfile_file_exists_wide in -lcfile... " >&6; } if ${ac_cv_lib_cfile_libcfile_file_exists_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcfile_file_exists_wide (); int main () { return libcfile_file_exists_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cfile_libcfile_file_exists_wide=yes else ac_cv_lib_cfile_libcfile_file_exists_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cfile_libcfile_file_exists_wide" >&5 $as_echo "$ac_cv_lib_cfile_libcfile_file_exists_wide" >&6; } if test "x$ac_cv_lib_cfile_libcfile_file_exists_wide" = xyes; then : ac_cv_libcfile_dummy=yes else ac_cv_libcfile=no fi fi ac_cv_libcfile_LIBADD="-lcfile" fi fi fi if test "x$ac_cv_libcfile" = xyes; then : $as_echo "#define HAVE_LIBCFILE 1" >>confdefs.h fi if test "x$ac_cv_libcfile" = xyes; then : HAVE_LIBCFILE=1 else HAVE_LIBCFILE=0 fi if test "x$ac_cv_libcfile" != xyes; then : for ac_header in errno.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fcntl.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in close fstat ftruncate lseek open read write do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_close" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fstat" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fstat See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_ftruncate" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ftruncate See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_lseek" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: lseek See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_open" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: open See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_read" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: read See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_write" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: write See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in fclose feof fopen fread fseeko fseeko64 ftello ftello64 fwrite do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fclose" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fclose See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_feof" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: feof See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fgets" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fgets See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fopen" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fopen See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fread" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fread See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fseeko and fseeko64 See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_ftello" != xyes && test "x$ac_cv_func_ftello64" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ftello and ftello64 See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fwrite" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fwrite See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in stat do : ac_fn_c_check_func "$LINENO" "stat" "ac_cv_func_stat" if test "x$ac_cv_func_stat" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STAT 1 _ACEOF fi done if test "x$ac_cv_func_stat" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: stat See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libcfile_CPPFLAGS="-I../libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local $as_echo "#define HAVE_LOCAL_LIBCFILE 1" >>confdefs.h HAVE_LOCAL_LIBCFILE=1 fi if test "x$ac_cv_libcfile" = xlocal; then HAVE_LOCAL_LIBCFILE_TRUE= HAVE_LOCAL_LIBCFILE_FALSE='#' else HAVE_LOCAL_LIBCFILE_TRUE='#' HAVE_LOCAL_LIBCFILE_FALSE= fi if test "x$ac_cv_libcfile_CPPFLAGS" != "x"; then : LIBCFILE_CPPFLAGS=$ac_cv_libcfile_CPPFLAGS fi if test "x$ac_cv_libcfile_LIBADD" != "x"; then : LIBCFILE_LIBADD=$ac_cv_libcfile_LIBADD fi if test "x$ac_cv_libcfile" = xyes; then : ax_libcfile_pc_libs_private=-lcfile fi if test "x$ac_cv_libcfile" = xyes; then : ax_libcfile_spec_requires=libcfile ax_libcfile_spec_build_requires=libcfile-devel fi # Check whether --with-libcpath was given. if test "${with_libcpath+set}" = set; then : withval=$with_libcpath; ac_cv_with_libcpath=$withval else ac_cv_with_libcpath=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcpath+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcpath=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcpath" >&5 $as_echo "$ac_cv_with_libcpath" >&6; } if test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xno && test "x$ac_cv_with_libcpath" != xauto-detect; then : if test -d "$ac_cv_with_libcpath"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcpath}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcpath}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcpath" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcpath" >&2;} fi fi if test "x$ac_cv_with_libcpath" = xno; then : ac_cv_libcpath=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath" >&5 $as_echo_n "checking for libcpath... " >&6; } if test -n "$libcpath_CFLAGS"; then pkg_cv_libcpath_CFLAGS="$libcpath_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_CFLAGS=`$PKG_CONFIG --cflags "libcpath >= 20120701" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcpath_LIBS"; then pkg_cv_libcpath_LIBS="$libcpath_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcpath >= 20120701\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcpath >= 20120701") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcpath_LIBS=`$PKG_CONFIG --libs "libcpath >= 20120701" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcpath_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcpath >= 20120701" 2>&1` else libcpath_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcpath >= 20120701" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcpath_PKG_ERRORS" >&5 ac_cv_libcpath=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcpath=no else libcpath_CFLAGS=$pkg_cv_libcpath_CFLAGS libcpath_LIBS=$pkg_cv_libcpath_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcpath=yes fi fi if test "x$ac_cv_libcpath" = xyes; then : ac_cv_libcpath_CPPFLAGS="$pkg_cv_libcpath_CFLAGS" ac_cv_libcpath_LIBADD="$pkg_cv_libcpath_LIBS" else for ac_header in libcpath.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcpath.h" "ac_cv_header_libcpath_h" "$ac_includes_default" if test "x$ac_cv_header_libcpath_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCPATH_H 1 _ACEOF fi done if test "x$ac_cv_header_libcpath_h" = xno; then : ac_cv_libcpath=no else ac_cv_libcpath=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_get_version in -lcpath" >&5 $as_echo_n "checking for libcpath_get_version in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_get_version (); int main () { return libcpath_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_get_version=yes else ac_cv_lib_cpath_libcpath_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_get_version" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_get_version" >&6; } if test "x$ac_cv_lib_cpath_libcpath_get_version" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory in -lcpath" >&5 $as_echo_n "checking for libcpath_path_change_directory in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_change_directory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_change_directory (); int main () { return libcpath_path_change_directory (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_change_directory=yes else ac_cv_lib_cpath_libcpath_path_change_directory=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_change_directory" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_change_directory" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_current_working_directory in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_current_working_directory (); int main () { return libcpath_path_get_current_working_directory (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_current_working_directory=yes else ac_cv_lib_cpath_libcpath_path_get_current_working_directory=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_full_path in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_full_path+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_full_path (); int main () { return libcpath_path_get_full_path (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_full_path=yes else ac_cv_lib_cpath_libcpath_path_get_full_path=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_full_path" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join in -lcpath" >&5 $as_echo_n "checking for libcpath_path_join in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_join (); int main () { return libcpath_path_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_join=yes else ac_cv_lib_cpath_libcpath_path_join=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_join" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_join" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory in -lcpath" >&5 $as_echo_n "checking for libcpath_path_make_directory in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_make_directory+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_make_directory (); int main () { return libcpath_path_make_directory (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_make_directory=yes else ac_cv_lib_cpath_libcpath_path_make_directory=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_make_directory" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_make_directory" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize (); int main () { return libcpath_path_sanitize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize=yes else ac_cv_lib_cpath_libcpath_path_sanitize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize_filename in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize_filename in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize_filename+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize_filename (); int main () { return libcpath_path_sanitize_filename (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize_filename=yes else ac_cv_lib_cpath_libcpath_path_sanitize_filename=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize_filename" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize_filename" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize_filename" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_change_directory_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_change_directory_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_change_directory_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_change_directory_wide (); int main () { return libcpath_path_change_directory_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_change_directory_wide=yes else ac_cv_lib_cpath_libcpath_path_change_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_change_directory_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_change_directory_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_current_working_directory_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_current_working_directory_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_current_working_directory_wide (); int main () { return libcpath_path_get_current_working_directory_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=yes else ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_current_working_directory_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_get_full_path_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_get_full_path_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_get_full_path_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_get_full_path_wide (); int main () { return libcpath_path_get_full_path_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_get_full_path_wide=yes else ac_cv_lib_cpath_libcpath_path_get_full_path_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_get_full_path_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_join_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_join_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_join_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_join_wide (); int main () { return libcpath_path_join_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_join_wide=yes else ac_cv_lib_cpath_libcpath_path_join_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_join_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_join_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_join_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_make_directory_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_make_directory_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_make_directory_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_make_directory_wide (); int main () { return libcpath_path_make_directory_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_make_directory_wide=yes else ac_cv_lib_cpath_libcpath_path_make_directory_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_make_directory_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_make_directory_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize_wide (); int main () { return libcpath_path_sanitize_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize_wide=yes else ac_cv_lib_cpath_libcpath_path_sanitize_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcpath_path_sanitize_filename_wide in -lcpath" >&5 $as_echo_n "checking for libcpath_path_sanitize_filename_wide in -lcpath... " >&6; } if ${ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpath $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcpath_path_sanitize_filename_wide (); int main () { return libcpath_path_sanitize_filename_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide=yes else ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide" >&5 $as_echo "$ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide" >&6; } if test "x$ac_cv_lib_cpath_libcpath_path_sanitize_filename_wide" = xyes; then : ac_cv_libcpath_dummy=yes else ac_cv_libcpath=no fi fi ac_cv_libcpath_LIBADD="-lcpath" fi fi fi if test "x$ac_cv_libcpath" = xyes; then : $as_echo "#define HAVE_LIBCPATH 1" >>confdefs.h fi if test "x$ac_cv_libcpath" = xyes; then : HAVE_LIBCPATH=1 else HAVE_LIBCPATH=0 fi if test "x$ac_cv_libcpath" != xyes; then : for ac_header in errno.h sys/stat.h sys/syslimits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in chdir getcwd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_chdir" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: chdir See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_getcwd" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: getcwd See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in mkdir do : ac_fn_c_check_func "$LINENO" "mkdir" "ac_cv_func_mkdir" if test "x$ac_cv_func_mkdir" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MKDIR 1 _ACEOF fi done if test "x$ac_cv_func_mkdir" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use mkdir" >&5 $as_echo_n "checking how to use mkdir... " >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { mkdir( "", 0 ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with additional mode argument" >&5 $as_echo "with additional mode argument" >&6; } ac_cv_cv_mkdir_mode=yes else ac_cv_cv_mkdir_mode=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_mkdir_mode" = xno; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { mkdir( "" ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with single argument" >&5 $as_echo "with single argument" >&6; } ac_cv_cv_mkdir=yes else ac_cv_cv_mkdir=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS="$SAVE_CFLAGS" if test "x$ac_cv_cv_mkdir_mode" = xno && test "x$ac_cv_cv_mkdir" = xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown" >&5 $as_echo "$as_me: WARNING: unknown" >&2;} ac_cv_func_mkdir=no fi if test "x$ac_cv_func_mkdir" = xyes; then : $as_echo "#define HAVE_MKDIR 1" >>confdefs.h fi if test "x$ac_cv_cv_mkdir_mode" = xyes; then : $as_echo "#define HAVE_MKDIR_MODE 1" >>confdefs.h fi fi if test "x$ac_cv_func_mkdir" = xno; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: mkdir See \`config.log' for more details" "$LINENO" 5; } fi ac_cv_libcpath_CPPFLAGS="-I../libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local $as_echo "#define HAVE_LOCAL_LIBCPATH 1" >>confdefs.h HAVE_LOCAL_LIBCPATH=1 fi if test "x$ac_cv_libcpath" = xlocal; then HAVE_LOCAL_LIBCPATH_TRUE= HAVE_LOCAL_LIBCPATH_FALSE='#' else HAVE_LOCAL_LIBCPATH_TRUE='#' HAVE_LOCAL_LIBCPATH_FALSE= fi if test "x$ac_cv_libcpath_CPPFLAGS" != "x"; then : LIBCPATH_CPPFLAGS=$ac_cv_libcpath_CPPFLAGS fi if test "x$ac_cv_libcpath_LIBADD" != "x"; then : LIBCPATH_LIBADD=$ac_cv_libcpath_LIBADD fi if test "x$ac_cv_libcpath" = xyes; then : ax_libcpath_pc_libs_private=-lcpath fi if test "x$ac_cv_libcpath" = xyes; then : ax_libcpath_spec_requires=libcpath ax_libcpath_spec_build_requires=libcpath-devel fi # Check whether --with-libbfio was given. if test "${with_libbfio+set}" = set; then : withval=$with_libbfio; ac_cv_with_libbfio=$withval else ac_cv_with_libbfio=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libbfio+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libbfio=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libbfio" >&5 $as_echo "$ac_cv_with_libbfio" >&6; } if test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xno && test "x$ac_cv_with_libbfio" != xauto-detect; then : if test -d "$ac_cv_with_libbfio"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libbfio" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libbfio" >&2;} fi fi if test "x$ac_cv_with_libbfio" = xno; then : ac_cv_libbfio=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio" >&5 $as_echo_n "checking for libbfio... " >&6; } if test -n "$libbfio_CFLAGS"; then pkg_cv_libbfio_CFLAGS="$libbfio_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbfio >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libbfio_CFLAGS=`$PKG_CONFIG --cflags "libbfio >= 20120426" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libbfio_LIBS"; then pkg_cv_libbfio_LIBS="$libbfio_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbfio >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbfio >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libbfio_LIBS=`$PKG_CONFIG --libs "libbfio >= 20120426" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libbfio_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libbfio >= 20120426" 2>&1` else libbfio_PKG_ERRORS=`$PKG_CONFIG --print-errors "libbfio >= 20120426" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libbfio_PKG_ERRORS" >&5 ac_cv_libbfio=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libbfio=no else libbfio_CFLAGS=$pkg_cv_libbfio_CFLAGS libbfio_LIBS=$pkg_cv_libbfio_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libbfio=yes fi fi if test "x$ac_cv_libbfio" = xyes; then : ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS" ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS" else for ac_header in libbfio.h do : ac_fn_c_check_header_mongrel "$LINENO" "libbfio.h" "ac_cv_header_libbfio_h" "$ac_includes_default" if test "x$ac_cv_header_libbfio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBBFIO_H 1 _ACEOF fi done if test "x$ac_cv_header_libbfio_h" = xno; then : ac_cv_libbfio=no else ac_cv_libbfio=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_get_version in -lbfio" >&5 $as_echo_n "checking for libbfio_get_version in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_get_version (); int main () { return libbfio_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_get_version=yes else ac_cv_lib_bfio_libbfio_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_get_version" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_get_version" >&6; } if test "x$ac_cv_lib_bfio_libbfio_get_version" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_free in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_free in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_free (); int main () { return libbfio_handle_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_free=yes else ac_cv_lib_bfio_libbfio_handle_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_free" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_free" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_free" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_open in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_open in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_open (); int main () { return libbfio_handle_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_open=yes else ac_cv_lib_bfio_libbfio_handle_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_open" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_open" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_close in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_close in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_close (); int main () { return libbfio_handle_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_close=yes else ac_cv_lib_bfio_libbfio_handle_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_close" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_close" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_close" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_exists in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_exists in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_exists+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_exists (); int main () { return libbfio_handle_exists (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_exists=yes else ac_cv_lib_bfio_libbfio_handle_exists=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_exists" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_exists" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_exists" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_read_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_read_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_read_buffer (); int main () { return libbfio_handle_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_read_buffer=yes else ac_cv_lib_bfio_libbfio_handle_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_read_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_read_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_read_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_write_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_write_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_write_buffer (); int main () { return libbfio_handle_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_write_buffer=yes else ac_cv_lib_bfio_libbfio_handle_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_write_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_write_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_write_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_seek_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_seek_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_seek_offset (); int main () { return libbfio_handle_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_seek_offset=yes else ac_cv_lib_bfio_libbfio_handle_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_seek_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_seek_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_seek_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_is_open in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_is_open in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_is_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_is_open (); int main () { return libbfio_handle_is_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_is_open=yes else ac_cv_lib_bfio_libbfio_handle_is_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_is_open" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_is_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_is_open" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_offset (); int main () { return libbfio_handle_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_offset=yes else ac_cv_lib_bfio_libbfio_handle_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_size in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_size in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_size (); int main () { return libbfio_handle_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_size=yes else ac_cv_lib_bfio_libbfio_handle_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_size" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_size" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_size" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_set_track_offsets_read in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_set_track_offsets_read in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_set_track_offsets_read (); int main () { return libbfio_handle_set_track_offsets_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=yes else ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_set_track_offsets_read" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_number_of_offsets_read in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_number_of_offsets_read in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_number_of_offsets_read (); int main () { return libbfio_handle_get_number_of_offsets_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=yes else ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_number_of_offsets_read" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_handle_get_offset_read in -lbfio" >&5 $as_echo_n "checking for libbfio_handle_get_offset_read in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_handle_get_offset_read+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_handle_get_offset_read (); int main () { return libbfio_handle_get_offset_read (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_handle_get_offset_read=yes else ac_cv_lib_bfio_libbfio_handle_get_offset_read=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_handle_get_offset_read" >&6; } if test "x$ac_cv_lib_bfio_libbfio_handle_get_offset_read" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_initialize in -lbfio" >&5 $as_echo_n "checking for libbfio_file_initialize in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_initialize (); int main () { return libbfio_file_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_initialize=yes else ac_cv_lib_bfio_libbfio_file_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_initialize" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_initialize" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_initialize" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name_size in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name_size (); int main () { return libbfio_file_get_name_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name_size=yes else ac_cv_lib_bfio_libbfio_file_get_name_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_size" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name (); int main () { return libbfio_file_get_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name=yes else ac_cv_lib_bfio_libbfio_file_get_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name in -lbfio" >&5 $as_echo_n "checking for libbfio_file_set_name in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_set_name+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_set_name (); int main () { return libbfio_file_set_name (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_set_name=yes else ac_cv_lib_bfio_libbfio_file_set_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_set_name" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_set_name" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi if test "x$ac_cv_enable_wide_character_type" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_size_wide in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name_size_wide in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name_size_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name_size_wide (); int main () { return libbfio_file_get_name_size_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name_size_wide=yes else ac_cv_lib_bfio_libbfio_file_get_name_size_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name_size_wide" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_get_name_wide in -lbfio" >&5 $as_echo_n "checking for libbfio_file_get_name_wide in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_get_name_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_get_name_wide (); int main () { return libbfio_file_get_name_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_get_name_wide=yes else ac_cv_lib_bfio_libbfio_file_get_name_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_get_name_wide" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_get_name_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_get_name_wide" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_file_set_name_wide in -lbfio" >&5 $as_echo_n "checking for libbfio_file_set_name_wide in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_file_set_name_wide+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_file_set_name_wide (); int main () { return libbfio_file_set_name_wide (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_file_set_name_wide=yes else ac_cv_lib_bfio_libbfio_file_set_name_wide=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_file_set_name_wide" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_file_set_name_wide" >&6; } if test "x$ac_cv_lib_bfio_libbfio_file_set_name_wide" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_initialize in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_initialize in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_initialize (); int main () { return libbfio_pool_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_initialize=yes else ac_cv_lib_bfio_libbfio_pool_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_initialize" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_initialize" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_initialize" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_free in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_free in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_free (); int main () { return libbfio_pool_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_free=yes else ac_cv_lib_bfio_libbfio_pool_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_free" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_free" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_free" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_clone in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_clone in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_clone (); int main () { return libbfio_pool_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_clone=yes else ac_cv_lib_bfio_libbfio_pool_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_clone" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_clone" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_clone" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_open in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_open in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_open (); int main () { return libbfio_pool_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_open=yes else ac_cv_lib_bfio_libbfio_pool_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_open" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_open" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_open" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_reopen in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_reopen in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_reopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_reopen (); int main () { return libbfio_pool_reopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_reopen=yes else ac_cv_lib_bfio_libbfio_pool_reopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_reopen" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_reopen" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_reopen" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_close in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_close (); int main () { return libbfio_pool_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_close=yes else ac_cv_lib_bfio_libbfio_pool_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_close" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_close" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_close_all in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_close_all in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_close_all+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_close_all (); int main () { return libbfio_pool_close_all (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_close_all=yes else ac_cv_lib_bfio_libbfio_pool_close_all=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_close_all" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_close_all" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_close_all" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_read_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_read_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_read_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_read_buffer (); int main () { return libbfio_pool_read_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_read_buffer=yes else ac_cv_lib_bfio_libbfio_pool_read_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_read_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_read_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_read_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_write_buffer in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_write_buffer in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_write_buffer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_write_buffer (); int main () { return libbfio_pool_write_buffer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_write_buffer=yes else ac_cv_lib_bfio_libbfio_pool_write_buffer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_write_buffer" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_write_buffer" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_write_buffer" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_seek_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_seek_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_seek_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_seek_offset (); int main () { return libbfio_pool_seek_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_seek_offset=yes else ac_cv_lib_bfio_libbfio_pool_seek_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_seek_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_seek_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_seek_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_number_of_handles in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_number_of_handles in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_number_of_handles+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_number_of_handles (); int main () { return libbfio_pool_get_number_of_handles (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=yes else ac_cv_lib_bfio_libbfio_pool_get_number_of_handles=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_number_of_handles" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_handle (); int main () { return libbfio_pool_get_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_handle=yes else ac_cv_lib_bfio_libbfio_pool_get_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_handle" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_handle" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_set_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_set_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_set_handle (); int main () { return libbfio_pool_set_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_set_handle=yes else ac_cv_lib_bfio_libbfio_pool_set_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_handle" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_set_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_set_handle" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_append_handle in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_append_handle in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_append_handle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_append_handle (); int main () { return libbfio_pool_append_handle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_append_handle=yes else ac_cv_lib_bfio_libbfio_pool_append_handle=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_append_handle" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_append_handle" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_append_handle" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_offset in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_offset in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_offset+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_offset (); int main () { return libbfio_pool_get_offset (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_offset=yes else ac_cv_lib_bfio_libbfio_pool_get_offset=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_offset" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_offset" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_offset" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_get_size in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_get_size in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_get_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_get_size (); int main () { return libbfio_pool_get_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_get_size=yes else ac_cv_lib_bfio_libbfio_pool_get_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_get_size" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_get_size" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_get_size" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio" >&5 $as_echo_n "checking for libbfio_pool_set_maximum_number_of_open_handles in -lbfio... " >&6; } if ${ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfio $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libbfio_pool_set_maximum_number_of_open_handles (); int main () { return libbfio_pool_set_maximum_number_of_open_handles (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=yes else ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&5 $as_echo "$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" >&6; } if test "x$ac_cv_lib_bfio_libbfio_pool_set_maximum_number_of_open_handles" = xyes; then : ac_cv_libbfio_dummy=yes else ac_cv_libbfio=no fi ac_cv_libbfio_LIBADD="-lbfio" fi fi fi if test "x$ac_cv_libbfio" = xyes; then : $as_echo "#define HAVE_LIBBFIO 1" >>confdefs.h fi if test "x$ac_cv_libbfio" = xyes; then : HAVE_LIBBFIO=1 else HAVE_LIBBFIO=0 fi if test "x$ac_cv_libbfio" != xyes; then : $as_echo "#define HAVE_LOCAL_LIBBFIO 1" >>confdefs.h HAVE_LOCAL_LIBBFIO=1 ac_cv_libbfio_CPPFLAGS="-I../libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local fi if test "x$ac_cv_libbfio" = xlocal; then HAVE_LOCAL_LIBBFIO_TRUE= HAVE_LOCAL_LIBBFIO_FALSE='#' else HAVE_LOCAL_LIBBFIO_TRUE='#' HAVE_LOCAL_LIBBFIO_FALSE= fi if test "x$ac_cv_libbfio_CPPFLAGS" != "x"; then : LIBBFIO_CPPFLAGS=$ac_cv_libbfio_CPPFLAGS fi if test "x$ac_cv_libbfio_LIBADD" != "x"; then : LIBBFIO_LIBADD=$ac_cv_libbfio_LIBADD fi if test "x$ac_cv_libbfio" = xyes; then : ax_libbfio_pc_libs_private=-lbfio fi if test "x$ac_cv_libbfio" = xyes; then : ax_libbfio_spec_requires=libbfio ax_libbfio_spec_build_requires=libbfio-devel fi # Check whether --with-libfcache was given. if test "${with_libfcache+set}" = set; then : withval=$with_libfcache; ac_cv_with_libfcache=$withval else ac_cv_with_libfcache=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfcache+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfcache=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfcache" >&5 $as_echo "$ac_cv_with_libfcache" >&6; } if test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xno && test "x$ac_cv_with_libfcache" != xauto-detect; then : if test -d "$ac_cv_with_libfcache"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfcache}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfcache}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfcache" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfcache" >&2;} fi fi if test "x$ac_cv_with_libfcache" = xno; then : ac_cv_libfcache=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache" >&5 $as_echo_n "checking for libfcache... " >&6; } if test -n "$libfcache_CFLAGS"; then pkg_cv_libfcache_CFLAGS="$libfcache_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_CFLAGS=`$PKG_CONFIG --cflags "libfcache >= 20120405" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfcache_LIBS"; then pkg_cv_libfcache_LIBS="$libfcache_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfcache >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfcache >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfcache_LIBS=`$PKG_CONFIG --libs "libfcache >= 20120405" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfcache_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfcache >= 20120405" 2>&1` else libfcache_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfcache >= 20120405" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfcache_PKG_ERRORS" >&5 ac_cv_libfcache=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfcache=no else libfcache_CFLAGS=$pkg_cv_libfcache_CFLAGS libfcache_LIBS=$pkg_cv_libfcache_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfcache=yes fi fi if test "x$ac_cv_libfcache" = xyes; then : ac_cv_libfcache_CPPFLAGS="$pkg_cv_libfcache_CFLAGS" ac_cv_libfcache_LIBADD="$pkg_cv_libfcache_LIBS" else for ac_header in libfcache.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfcache.h" "ac_cv_header_libfcache_h" "$ac_includes_default" if test "x$ac_cv_header_libfcache_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFCACHE_H 1 _ACEOF fi done if test "x$ac_cv_header_libfcache_h" = xno; then : ac_cv_libfcache=no else ac_cv_libfcache=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfcache_get_version in -lfcache" >&5 $as_echo_n "checking for libfcache_get_version in -lfcache... " >&6; } if ${ac_cv_lib_fcache_libfcache_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfcache_get_version (); int main () { return libfcache_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fcache_libfcache_get_version=yes else ac_cv_lib_fcache_libfcache_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fcache_libfcache_get_version" >&5 $as_echo "$ac_cv_lib_fcache_libfcache_get_version" >&6; } if test "x$ac_cv_lib_fcache_libfcache_get_version" = xyes; then : ac_cv_libfcache_dummy=yes else ac_cv_libfcache=no fi ac_cv_libfcache_LIBADD="-lfcache" fi fi fi if test "x$ac_cv_libfcache" = xyes; then : $as_echo "#define HAVE_LIBFCACHE 1" >>confdefs.h fi if test "x$ac_cv_libfcache" = xyes; then : HAVE_LIBFCACHE=1 else HAVE_LIBFCACHE=0 fi if test "x$ac_cv_libfcache" != xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_func in time do : ac_fn_c_check_func "$LINENO" "time" "ac_cv_func_time" if test "x$ac_cv_func_time" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TIME 1 _ACEOF else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: time See \`config.log' for more details" "$LINENO" 5; } fi done ac_cv_libfcache_CPPFLAGS="-I../libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local $as_echo "#define HAVE_LOCAL_LIBFCACHE 1" >>confdefs.h HAVE_LOCAL_LIBFCACHE=1 fi if test "x$ac_cv_libfcache" = xlocal; then HAVE_LOCAL_LIBFCACHE_TRUE= HAVE_LOCAL_LIBFCACHE_FALSE='#' else HAVE_LOCAL_LIBFCACHE_TRUE='#' HAVE_LOCAL_LIBFCACHE_FALSE= fi if test "x$ac_cv_libfcache_CPPFLAGS" != "x"; then : LIBFCACHE_CPPFLAGS=$ac_cv_libfcache_CPPFLAGS fi if test "x$ac_cv_libfcache_LIBADD" != "x"; then : LIBFCACHE_LIBADD=$ac_cv_libfcache_LIBADD fi if test "x$ac_cv_libfcache" = xyes; then : ax_libfcache_pc_libs_private=-lfcache fi if test "x$ac_cv_libfcache" = xyes; then : ax_libfcache_spec_requires=libfcache ax_libfcache_spec_build_requires=libfcache-devel fi # Check whether --with-libfdata was given. if test "${with_libfdata+set}" = set; then : withval=$with_libfdata; ac_cv_with_libfdata=$withval else ac_cv_with_libfdata=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfdata+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfdata=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdata" >&5 $as_echo "$ac_cv_with_libfdata" >&6; } if test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xno && test "x$ac_cv_with_libfdata" != xauto-detect; then : if test -d "$ac_cv_with_libfdata"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdata}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfdata" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfdata" >&2;} fi fi if test "x$ac_cv_with_libfdata" = xno; then : ac_cv_libfdata=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata" >&5 $as_echo_n "checking for libfdata... " >&6; } if test -n "$libfdata_CFLAGS"; then pkg_cv_libfdata_CFLAGS="$libfdata_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdata >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdata_CFLAGS=`$PKG_CONFIG --cflags "libfdata >= 20120405" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfdata_LIBS"; then pkg_cv_libfdata_LIBS="$libfdata_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdata >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdata >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdata_LIBS=`$PKG_CONFIG --libs "libfdata >= 20120405" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfdata_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfdata >= 20120405" 2>&1` else libfdata_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfdata >= 20120405" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfdata_PKG_ERRORS" >&5 ac_cv_libfdata=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfdata=no else libfdata_CFLAGS=$pkg_cv_libfdata_CFLAGS libfdata_LIBS=$pkg_cv_libfdata_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfdata=yes fi fi if test "x$ac_cv_libfdata" = xyes; then : ac_cv_libfdata_CPPFLAGS="$pkg_cv_libfdata_CFLAGS" ac_cv_libfdata_LIBADD="$pkg_cv_libfdata_LIBS" else for ac_header in libfdata.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfdata.h" "ac_cv_header_libfdata_h" "$ac_includes_default" if test "x$ac_cv_header_libfdata_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFDATA_H 1 _ACEOF fi done if test "x$ac_cv_header_libfdata_h" = xno; then : ac_cv_libfdata=no else ac_cv_libfdata=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdata_get_version in -lfdata" >&5 $as_echo_n "checking for libfdata_get_version in -lfdata... " >&6; } if ${ac_cv_lib_fdata_libfdata_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdata $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdata_get_version (); int main () { return libfdata_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdata_libfdata_get_version=yes else ac_cv_lib_fdata_libfdata_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdata_libfdata_get_version" >&5 $as_echo "$ac_cv_lib_fdata_libfdata_get_version" >&6; } if test "x$ac_cv_lib_fdata_libfdata_get_version" = xyes; then : ac_cv_libfdata_dummy=yes else ac_cv_libfdata=no fi ac_cv_libfdata_LIBADD="-lfdata" fi fi fi if test "x$ac_cv_libfdata" = xyes; then : $as_echo "#define HAVE_LIBFDATA 1" >>confdefs.h fi if test "x$ac_cv_libfdata" = xyes; then : HAVE_LIBFDATA=1 else HAVE_LIBFDATA=0 fi if test "x$ac_cv_libfdata" != xyes; then : ac_cv_libfdata_CPPFLAGS="-I../libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local $as_echo "#define HAVE_LOCAL_LIBFDATA 1" >>confdefs.h HAVE_LOCAL_LIBFDATA=1 fi if test "x$ac_cv_libfdata" = xlocal; then HAVE_LOCAL_LIBFDATA_TRUE= HAVE_LOCAL_LIBFDATA_FALSE='#' else HAVE_LOCAL_LIBFDATA_TRUE='#' HAVE_LOCAL_LIBFDATA_FALSE= fi if test "x$ac_cv_libfdata_CPPFLAGS" != "x"; then : LIBFDATA_CPPFLAGS=$ac_cv_libfdata_CPPFLAGS fi if test "x$ac_cv_libfdata_LIBADD" != "x"; then : LIBFDATA_LIBADD=$ac_cv_libfdata_LIBADD fi if test "x$ac_cv_libfdata" = xyes; then : ax_libfdata_pc_libs_private=-lfdata fi if test "x$ac_cv_libfdata" = xyes; then : ax_libfdata_spec_requires=libfdata ax_libfdata_spec_build_requires=libfdata-devel fi # Check whether --with-libfdatetime was given. if test "${with_libfdatetime+set}" = set; then : withval=$with_libfdatetime; ac_cv_with_libfdatetime=$withval else ac_cv_with_libfdatetime=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfdatetime+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfdatetime=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfdatetime" >&5 $as_echo "$ac_cv_with_libfdatetime" >&6; } if test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xno && test "x$ac_cv_with_libfdatetime" != xauto-detect; then : if test -d "$ac_cv_with_libfdatetime"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfdatetime}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdatetime}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfdatetime" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfdatetime" >&2;} fi fi if test "x$ac_cv_with_libfdatetime" = xno; then : ac_cv_libfdatetime=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime" >&5 $as_echo_n "checking for libfdatetime... " >&6; } if test -n "$libfdatetime_CFLAGS"; then pkg_cv_libfdatetime_CFLAGS="$libfdatetime_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20120522\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20120522") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_CFLAGS=`$PKG_CONFIG --cflags "libfdatetime >= 20120522" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfdatetime_LIBS"; then pkg_cv_libfdatetime_LIBS="$libfdatetime_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfdatetime >= 20120522\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfdatetime >= 20120522") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfdatetime_LIBS=`$PKG_CONFIG --libs "libfdatetime >= 20120522" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfdatetime_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfdatetime >= 20120522" 2>&1` else libfdatetime_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfdatetime >= 20120522" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfdatetime_PKG_ERRORS" >&5 ac_cv_libfdatetime=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfdatetime=no else libfdatetime_CFLAGS=$pkg_cv_libfdatetime_CFLAGS libfdatetime_LIBS=$pkg_cv_libfdatetime_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfdatetime=yes fi fi if test "x$ac_cv_libfdatetime" = xyes; then : ac_cv_libfdatetime_CPPFLAGS="$pkg_cv_libfdatetime_CFLAGS" ac_cv_libfdatetime_LIBADD="$pkg_cv_libfdatetime_LIBS" else for ac_header in libfdatetime.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfdatetime.h" "ac_cv_header_libfdatetime_h" "$ac_includes_default" if test "x$ac_cv_header_libfdatetime_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFDATETIME_H 1 _ACEOF fi done if test "x$ac_cv_header_libfdatetime_h" = xno; then : ac_cv_libfdatetime=no else ac_cv_libfdatetime=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_get_version in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_get_version in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_get_version (); int main () { return libfdatetime_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_get_version=yes else ac_cv_lib_fdatetime_libfdatetime_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_get_version" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_get_version" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_get_version" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_initialize (); int main () { return libfdatetime_fat_date_time_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_free (); int main () { return libfdatetime_fat_date_time_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_from_byte_stream (); int main () { return libfdatetime_fat_date_time_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_from_uint32 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_from_uint32 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_uint32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_from_uint32 (); int main () { return libfdatetime_fat_date_time_copy_from_uint32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_uint32=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_uint32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_uint32" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_uint32" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_from_uint32" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf8_string (); int main () { return libfdatetime_fat_date_time_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); int main () { return libfdatetime_fat_date_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf16_string (); int main () { return libfdatetime_fat_date_time_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); int main () { return libfdatetime_fat_date_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf32_string (); int main () { return libfdatetime_fat_date_time_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_fat_date_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); int main () { return libfdatetime_fat_date_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_fat_date_time_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_initialize (); int main () { return libfdatetime_filetime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_free (); int main () { return libfdatetime_filetime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_free=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_from_byte_stream (); int main () { return libfdatetime_filetime_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_from_uint64 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_from_uint64 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_uint64+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_from_uint64 (); int main () { return libfdatetime_filetime_copy_from_uint64 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_uint64=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_uint64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_uint64" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_uint64" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_from_uint64" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf8_string (); int main () { return libfdatetime_filetime_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf8_string_with_index (); int main () { return libfdatetime_filetime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf16_string (); int main () { return libfdatetime_filetime_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf16_string_with_index (); int main () { return libfdatetime_filetime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf32_string (); int main () { return libfdatetime_filetime_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_copy_to_utf32_string_with_index (); int main () { return libfdatetime_filetime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_filetime_add in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_filetime_add in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_filetime_add+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_filetime_add (); int main () { return libfdatetime_filetime_add (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_filetime_add=yes else ac_cv_lib_fdatetime_libfdatetime_filetime_add=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_filetime_add" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_filetime_add" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_initialize (); int main () { return libfdatetime_floatingtime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_free (); int main () { return libfdatetime_floatingtime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_from_byte_stream (); int main () { return libfdatetime_floatingtime_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_from_uint64 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_from_uint64 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_uint64+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_from_uint64 (); int main () { return libfdatetime_floatingtime_copy_from_uint64 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_uint64=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_uint64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_uint64" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_uint64" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_from_uint64" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf8_string (); int main () { return libfdatetime_floatingtime_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf8_string_with_index (); int main () { return libfdatetime_floatingtime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf16_string (); int main () { return libfdatetime_floatingtime_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf16_string_with_index (); int main () { return libfdatetime_floatingtime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf32_string (); int main () { return libfdatetime_floatingtime_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_floatingtime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_floatingtime_copy_to_utf32_string_with_index (); int main () { return libfdatetime_floatingtime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_floatingtime_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_initialize (); int main () { return libfdatetime_nsf_timedate_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_free (); int main () { return libfdatetime_nsf_timedate_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_from_byte_stream (); int main () { return libfdatetime_nsf_timedate_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_from_uint64 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_from_uint64 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_uint64+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_from_uint64 (); int main () { return libfdatetime_nsf_timedate_copy_from_uint64 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_uint64=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_uint64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_uint64" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_uint64" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_from_uint64" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf8_string (); int main () { return libfdatetime_nsf_timedate_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); int main () { return libfdatetime_nsf_timedate_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf16_string (); int main () { return libfdatetime_nsf_timedate_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); int main () { return libfdatetime_nsf_timedate_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf32_string (); int main () { return libfdatetime_nsf_timedate_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_nsf_timedate_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); int main () { return libfdatetime_nsf_timedate_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_nsf_timedate_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_initialize (); int main () { return libfdatetime_posix_time_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_free (); int main () { return libfdatetime_posix_time_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_free=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_from_byte_stream (); int main () { return libfdatetime_posix_time_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_uint32 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_from_uint32 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint32+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_from_uint32 (); int main () { return libfdatetime_posix_time_copy_from_uint32 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint32=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint32=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint32" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint32" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint32" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_from_uint64 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_from_uint64 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint64+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_from_uint64 (); int main () { return libfdatetime_posix_time_copy_from_uint64 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint64=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint64" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint64" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_from_uint64" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf8_string (); int main () { return libfdatetime_posix_time_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf8_string_with_index (); int main () { return libfdatetime_posix_time_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf16_string (); int main () { return libfdatetime_posix_time_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf16_string_with_index (); int main () { return libfdatetime_posix_time_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf32_string (); int main () { return libfdatetime_posix_time_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_posix_time_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_posix_time_copy_to_utf32_string_with_index (); int main () { return libfdatetime_posix_time_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_posix_time_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_initialize in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_initialize in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_initialize (); int main () { return libfdatetime_systemetime_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_initialize" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_free in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_free in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_free (); int main () { return libfdatetime_systemetime_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_free=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_free" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_from_byte_stream in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_from_byte_stream (); int main () { return libfdatetime_systemetime_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_byte_stream" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_from_uint64 in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_from_uint64 in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_uint64+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_from_uint64 (); int main () { return libfdatetime_systemetime_copy_from_uint64 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_uint64=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_uint64=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_uint64" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_uint64" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_from_uint64" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf8_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf8_string (); int main () { return libfdatetime_systemetime_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf8_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf8_string_with_index (); int main () { return libfdatetime_systemetime_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf16_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf16_string (); int main () { return libfdatetime_systemetime_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf16_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf16_string_with_index (); int main () { return libfdatetime_systemetime_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf32_string in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf32_string (); int main () { return libfdatetime_systemetime_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime" >&5 $as_echo_n "checking for libfdatetime_systemetime_copy_to_utf32_string_with_index in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfdatetime_systemetime_copy_to_utf32_string_with_index (); int main () { return libfdatetime_systemetime_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=yes else ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fdatetime_libfdatetime_systemetime_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfdatetime_dummy=yes else ac_cv_libfdatetime=no fi ac_cv_libfdatetime_LIBADD="-lfdatetime" fi fi fi if test "x$ac_cv_libfdatetime" = xyes; then : $as_echo "#define HAVE_LIBFDATETIME 1" >>confdefs.h fi if test "x$ac_cv_libfdatetime" = xyes; then : HAVE_LIBFDATETIME=1 else HAVE_LIBFDATETIME=0 fi if test "x$ac_cv_libfdatetime" != xyes; then : ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local $as_echo "#define HAVE_LOCAL_LIBFDATETIME 1" >>confdefs.h HAVE_LOCAL_LIBFDATETIME=1 fi if test "x$ac_cv_libfdatetime" = xlocal; then HAVE_LOCAL_LIBFDATETIME_TRUE= HAVE_LOCAL_LIBFDATETIME_FALSE='#' else HAVE_LOCAL_LIBFDATETIME_TRUE='#' HAVE_LOCAL_LIBFDATETIME_FALSE= fi if test "x$ac_cv_libfdatetime_CPPFLAGS" != "x"; then : LIBFDATETIME_CPPFLAGS=$ac_cv_libfdatetime_CPPFLAGS fi if test "x$ac_cv_libfdatetime_LIBADD" != "x"; then : LIBFDATETIME_LIBADD=$ac_cv_libfdatetime_LIBADD fi if test "x$ac_cv_libfdatetime" = xyes; then : ax_libfdatetime_pc_libs_private=-lfdatetime fi if test "x$ac_cv_libfdatetime" = xyes; then : ax_libfdatetime_spec_requires=libfdatetime ax_libfdatetime_spec_build_requires=libfdatetime-devel fi # Check whether --with-libfguid was given. if test "${with_libfguid+set}" = set; then : withval=$with_libfguid; ac_cv_with_libfguid=$withval else ac_cv_with_libfguid=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfguid+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfguid=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfguid" >&5 $as_echo "$ac_cv_with_libfguid" >&6; } if test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xno && test "x$ac_cv_with_libfguid" != xauto-detect; then : if test -d "$ac_cv_with_libfguid"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfguid}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfguid" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfguid" >&2;} fi fi if test "x$ac_cv_with_libfguid" = xno; then : ac_cv_libfguid=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid" >&5 $as_echo_n "checking for libfguid... " >&6; } if test -n "$libfguid_CFLAGS"; then pkg_cv_libfguid_CFLAGS="$libfguid_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfguid_CFLAGS=`$PKG_CONFIG --cflags "libfguid >= 20120426" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfguid_LIBS"; then pkg_cv_libfguid_LIBS="$libfguid_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfguid >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfguid >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfguid_LIBS=`$PKG_CONFIG --libs "libfguid >= 20120426" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfguid_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfguid >= 20120426" 2>&1` else libfguid_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfguid >= 20120426" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfguid_PKG_ERRORS" >&5 ac_cv_libfguid=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfguid=no else libfguid_CFLAGS=$pkg_cv_libfguid_CFLAGS libfguid_LIBS=$pkg_cv_libfguid_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfguid=yes fi fi if test "x$ac_cv_libfguid" = xyes; then : ac_cv_libfguid_CPPFLAGS="$pkg_cv_libfguid_CFLAGS" ac_cv_libfguid_LIBADD="$pkg_cv_libfguid_LIBS" else for ac_header in libfguid.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfguid.h" "ac_cv_header_libfguid_h" "$ac_includes_default" if test "x$ac_cv_header_libfguid_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFGUID_H 1 _ACEOF fi done if test "x$ac_cv_header_libfguid_h" = xno; then : ac_cv_libfguid=no else ac_cv_libfguid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_get_version in -lfguid" >&5 $as_echo_n "checking for libfguid_get_version in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_get_version (); int main () { return libfguid_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_get_version=yes else ac_cv_lib_fguid_libfguid_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_get_version" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_get_version" >&6; } if test "x$ac_cv_lib_fguid_libfguid_get_version" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_initialize in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_initialize in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_initialize (); int main () { return libfguid_identifier_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_initialize=yes else ac_cv_lib_fguid_libfguid_identifier_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_initialize" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_initialize" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_initialize" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_free in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_free in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_free (); int main () { return libfguid_identifier_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_free=yes else ac_cv_lib_fguid_libfguid_identifier_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_free" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_free" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_free" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_from_byte_stream in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_from_byte_stream in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_from_byte_stream (); int main () { return libfguid_identifier_copy_from_byte_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=yes else ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_from_byte_stream" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_get_string_size in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_get_string_size in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_get_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_get_string_size (); int main () { return libfguid_identifier_get_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_get_string_size=yes else ac_cv_lib_fguid_libfguid_identifier_get_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_get_string_size" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_get_string_size" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf8_string in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf8_string (); int main () { return libfguid_identifier_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf8_string_with_index in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf8_string_with_index (); int main () { return libfguid_identifier_copy_to_utf8_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf8_string_with_index" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf16_string in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf16_string (); int main () { return libfguid_identifier_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf16_string_with_index in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf16_string_with_index (); int main () { return libfguid_identifier_copy_to_utf16_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf16_string_with_index" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf32_string in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf32_string (); int main () { return libfguid_identifier_copy_to_utf32_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid" >&5 $as_echo_n "checking for libfguid_identifier_copy_to_utf32_string_with_index in -lfguid... " >&6; } if ${ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfguid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfguid_identifier_copy_to_utf32_string_with_index (); int main () { return libfguid_identifier_copy_to_utf32_string_with_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=yes else ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&5 $as_echo "$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" >&6; } if test "x$ac_cv_lib_fguid_libfguid_identifier_copy_to_utf32_string_with_index" = xyes; then : ac_cv_libfguid_dummy=yes else ac_cv_libfguid=no fi ac_cv_libfguid_LIBADD="-lfguid" fi fi fi if test "x$ac_cv_libfguid" = xyes; then : $as_echo "#define HAVE_LIBFGUID 1" >>confdefs.h fi if test "x$ac_cv_libfguid" = xyes; then : HAVE_LIBFGUID=1 else HAVE_LIBFGUID=0 fi if test "x$ac_cv_libfguid" != xyes; then : ac_cv_libfguid_CPPFLAGS="-I../libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local $as_echo "#define HAVE_LOCAL_LIBFGUID 1" >>confdefs.h HAVE_LOCAL_LIBFGUID=1 fi if test "x$ac_cv_libfguid" = xlocal; then HAVE_LOCAL_LIBFGUID_TRUE= HAVE_LOCAL_LIBFGUID_FALSE='#' else HAVE_LOCAL_LIBFGUID_TRUE='#' HAVE_LOCAL_LIBFGUID_FALSE= fi if test "x$ac_cv_libfguid_CPPFLAGS" != "x"; then : LIBFGUID_CPPFLAGS=$ac_cv_libfguid_CPPFLAGS fi if test "x$ac_cv_libfguid_LIBADD" != "x"; then : LIBFGUID_LIBADD=$ac_cv_libfguid_LIBADD fi if test "x$ac_cv_libfguid" = xyes; then : ax_libfguid_pc_libs_private=-lfguid fi if test "x$ac_cv_libfguid" = xyes; then : ax_libfguid_spec_requires=libfguid ax_libfguid_spec_build_requires=libfguid-devel fi # Check whether --with-libfvalue was given. if test "${with_libfvalue+set}" = set; then : withval=$with_libfvalue; ac_cv_with_libfvalue=$withval else ac_cv_with_libfvalue=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfvalue+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfvalue=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfvalue" >&5 $as_echo "$ac_cv_with_libfvalue" >&6; } if test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xno && test "x$ac_cv_with_libfvalue" != xauto-detect; then : if test -d "$ac_cv_with_libfvalue"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfvalue}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfvalue" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfvalue" >&2;} fi fi if test "x$ac_cv_with_libfvalue" = xno; then : ac_cv_libfvalue=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue" >&5 $as_echo_n "checking for libfvalue... " >&6; } if test -n "$libfvalue_CFLAGS"; then pkg_cv_libfvalue_CFLAGS="$libfvalue_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfvalue >= 20120428\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfvalue >= 20120428") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfvalue_CFLAGS=`$PKG_CONFIG --cflags "libfvalue >= 20120428" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfvalue_LIBS"; then pkg_cv_libfvalue_LIBS="$libfvalue_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfvalue >= 20120428\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfvalue >= 20120428") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfvalue_LIBS=`$PKG_CONFIG --libs "libfvalue >= 20120428" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfvalue_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfvalue >= 20120428" 2>&1` else libfvalue_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfvalue >= 20120428" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfvalue_PKG_ERRORS" >&5 ac_cv_libfvalue=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfvalue=no else libfvalue_CFLAGS=$pkg_cv_libfvalue_CFLAGS libfvalue_LIBS=$pkg_cv_libfvalue_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfvalue=yes fi fi if test "x$ac_cv_libfvalue" = xyes; then : ac_cv_libfvalue_CPPFLAGS="$pkg_cv_libfvalue_CFLAGS" ac_cv_libfvalue_LIBADD="$pkg_cv_libfvalue_LIBS" else for ac_header in libfvalue.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfvalue.h" "ac_cv_header_libfvalue_h" "$ac_includes_default" if test "x$ac_cv_header_libfvalue_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFVALUE_H 1 _ACEOF fi done if test "x$ac_cv_header_libfvalue_h" = xno; then : ac_cv_libfvalue=no else ac_cv_libfvalue=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_get_version in -lfvalue" >&5 $as_echo_n "checking for libfvalue_get_version in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_get_version (); int main () { return libfvalue_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_get_version=yes else ac_cv_lib_fvalue_libfvalue_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_get_version" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_get_version" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_get_version" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_string_size_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_string_size_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_string_size_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_string_size_from_integer (); int main () { return libfvalue_string_size_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_string_size_from_integer=yes else ac_cv_lib_fvalue_libfvalue_string_size_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_string_size_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_string_size_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_string_size_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_copy_from_integer (); int main () { return libfvalue_utf8_string_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_with_index_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_with_index_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_with_index_copy_from_integer (); int main () { return libfvalue_utf8_string_with_index_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_copy_to_integer (); int main () { return libfvalue_utf8_string_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_with_index_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_with_index_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_with_index_copy_to_integer (); int main () { return libfvalue_utf8_string_with_index_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_with_index_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_copy_from_integer (); int main () { return libfvalue_utf16_string_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_with_index_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_with_index_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_with_index_copy_from_integer (); int main () { return libfvalue_utf16_string_with_index_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_copy_to_integer (); int main () { return libfvalue_utf16_string_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_with_index_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_with_index_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_with_index_copy_to_integer (); int main () { return libfvalue_utf16_string_with_index_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_with_index_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_copy_from_integer (); int main () { return libfvalue_utf32_string_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_with_index_copy_from_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_with_index_copy_from_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_with_index_copy_from_integer (); int main () { return libfvalue_utf32_string_with_index_copy_from_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_from_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_copy_to_integer (); int main () { return libfvalue_utf32_string_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf32_string_with_index_copy_to_integer in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf32_string_with_index_copy_to_integer in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf32_string_with_index_copy_to_integer (); int main () { return libfvalue_utf32_string_with_index_copy_to_integer (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer=yes else ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf32_string_with_index_copy_to_integer" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf8_string_split in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf8_string_split in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf8_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf8_string_split (); int main () { return libfvalue_utf8_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf8_string_split=yes else ac_cv_lib_fvalue_libfvalue_utf8_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf8_string_split" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf8_string_split" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf8_string_split" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_utf16_string_split in -lfvalue" >&5 $as_echo_n "checking for libfvalue_utf16_string_split in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_utf16_string_split+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_utf16_string_split (); int main () { return libfvalue_utf16_string_split (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_utf16_string_split=yes else ac_cv_lib_fvalue_libfvalue_utf16_string_split=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_utf16_string_split" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_utf16_string_split" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_utf16_string_split" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_free (); int main () { return libfvalue_split_utf8_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_free=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_get_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_get_string (); int main () { return libfvalue_split_utf8_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_number_of_segments in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_get_number_of_segments in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_get_number_of_segments (); int main () { return libfvalue_split_utf8_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_number_of_segments" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf8_string_get_segment_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf8_string_get_segment_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf8_string_get_segment_by_index (); int main () { return libfvalue_split_utf8_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index=yes else ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf8_string_get_segment_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_free (); int main () { return libfvalue_split_utf16_string_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_free=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_get_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_get_string (); int main () { return libfvalue_split_utf16_string_get_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_number_of_segments in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_get_number_of_segments in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_get_number_of_segments (); int main () { return libfvalue_split_utf16_string_get_number_of_segments (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_number_of_segments" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_split_utf16_string_get_segment_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_split_utf16_string_get_segment_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_split_utf16_string_get_segment_by_index (); int main () { return libfvalue_split_utf16_string_get_segment_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index=yes else ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_split_utf16_string_get_segment_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_initialize (); int main () { return libfvalue_table_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_initialize=yes else ac_cv_lib_fvalue_libfvalue_table_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_initialize" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_initialize" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_free (); int main () { return libfvalue_table_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_free=yes else ac_cv_lib_fvalue_libfvalue_table_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_clone in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_clone in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_clone (); int main () { return libfvalue_table_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_clone=yes else ac_cv_lib_fvalue_libfvalue_table_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_clone" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_clone" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_clone" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_number_of_values in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_number_of_values in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_number_of_values+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_number_of_values (); int main () { return libfvalue_table_get_number_of_values (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_get_number_of_values=yes else ac_cv_lib_fvalue_libfvalue_table_get_number_of_values=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_number_of_values" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_value_by_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_value_by_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_value_by_identifier (); int main () { return libfvalue_table_get_value_by_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier=yes else ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_value_by_identifier" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_get_value_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_get_value_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_get_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_get_value_by_index (); int main () { return libfvalue_table_get_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_get_value_by_index=yes else ac_cv_lib_fvalue_libfvalue_table_get_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_get_value_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_set_value in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_set_value in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_set_value+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_set_value (); int main () { return libfvalue_table_set_value (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_set_value=yes else ac_cv_lib_fvalue_libfvalue_table_set_value=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_set_value" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_set_value" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_set_value" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_set_value_by_index in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_set_value_by_index in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_set_value_by_index+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_set_value_by_index (); int main () { return libfvalue_table_set_value_by_index (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_set_value_by_index=yes else ac_cv_lib_fvalue_libfvalue_table_set_value_by_index=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_set_value_by_index" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_table_copy_from_utf8_xml_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_table_copy_from_utf8_xml_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_table_copy_from_utf8_xml_string (); int main () { return libfvalue_table_copy_from_utf8_xml_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string=yes else ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_table_copy_from_utf8_xml_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_initialize (); int main () { return libfvalue_value_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_initialize=yes else ac_cv_lib_fvalue_libfvalue_value_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_initialize" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_initialize" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_free in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_free in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_free (); int main () { return libfvalue_value_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_free=yes else ac_cv_lib_fvalue_libfvalue_value_free=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_free" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_free" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_free" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_clone in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_clone in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_clone+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_clone (); int main () { return libfvalue_value_clone (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_clone=yes else ac_cv_lib_fvalue_libfvalue_value_clone=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_clone" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_clone" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_clone" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_identifier (); int main () { return libfvalue_value_get_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_identifier=yes else ac_cv_lib_fvalue_libfvalue_value_get_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_identifier" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_identifier" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_identifier in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_identifier in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_identifier+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_identifier (); int main () { return libfvalue_value_set_identifier (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_set_identifier=yes else ac_cv_lib_fvalue_libfvalue_value_set_identifier=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_identifier" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_set_identifier" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_identifier" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_data (); int main () { return libfvalue_value_get_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_data=yes else ac_cv_lib_fvalue_libfvalue_value_get_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_data" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_data" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_data (); int main () { return libfvalue_value_set_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_set_data=yes else ac_cv_lib_fvalue_libfvalue_value_set_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_data" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_set_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_data" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_has_data in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_has_data in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_has_data+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_has_data (); int main () { return libfvalue_value_has_data (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_has_data=yes else ac_cv_lib_fvalue_libfvalue_value_has_data=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_has_data" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_has_data" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_has_data" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_number_of_value_entries in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_number_of_value_entries in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_number_of_value_entries (); int main () { return libfvalue_value_get_number_of_value_entries (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries=yes else ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_number_of_value_entries" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_value_entry (); int main () { return libfvalue_value_get_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_value_entry=yes else ac_cv_lib_fvalue_libfvalue_value_get_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_value_entry" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_value_entry" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_set_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_set_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_set_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_set_value_entry (); int main () { return libfvalue_value_set_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_set_value_entry=yes else ac_cv_lib_fvalue_libfvalue_value_set_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_set_value_entry" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_set_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_set_value_entry" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_append_value_entry in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_append_value_entry in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_append_value_entry+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_append_value_entry (); int main () { return libfvalue_value_append_value_entry (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_append_value_entry=yes else ac_cv_lib_fvalue_libfvalue_value_append_value_entry=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_append_value_entry" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_append_value_entry" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_append_value_entry" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_64bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_64bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_64bit (); int main () { return libfvalue_value_copy_from_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit=yes else ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_64bit" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_64bit in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_64bit in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_64bit (); int main () { return libfvalue_value_copy_to_64bit (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit=yes else ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_64bit" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf8_string_size in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_utf8_string_size in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_utf8_string_size (); int main () { return libfvalue_value_get_utf8_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size=yes else ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_utf8_string_size" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf8_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_utf8_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_utf8_string (); int main () { return libfvalue_value_copy_from_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf8_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf8_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf8_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf8_string (); int main () { return libfvalue_value_copy_to_utf8_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf8_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_get_utf16_string_size in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_get_utf16_string_size in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_get_utf16_string_size (); int main () { return libfvalue_value_get_utf16_string_size (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size=yes else ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_get_utf16_string_size" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_from_utf16_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_from_utf16_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_from_utf16_string (); int main () { return libfvalue_value_copy_from_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_from_utf16_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_copy_to_utf16_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_copy_to_utf16_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_copy_to_utf16_string (); int main () { return libfvalue_value_copy_to_utf16_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string=yes else ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_copy_to_utf16_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_write_to_file_stream in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_write_to_file_stream in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_write_to_file_stream (); int main () { return libfvalue_value_write_to_file_stream (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream=yes else ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_write_to_file_stream" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_initialize in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_initialize in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_initialize (); int main () { return libfvalue_value_type_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_type_initialize=yes else ac_cv_lib_fvalue_libfvalue_value_type_initialize=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_initialize" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_type_initialize" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_initialize" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_set_data_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_set_data_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_set_data_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_set_data_string (); int main () { return libfvalue_value_type_set_data_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_type_set_data_string=yes else ac_cv_lib_fvalue_libfvalue_value_type_set_data_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_set_data_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfvalue_value_type_append_data_string in -lfvalue" >&5 $as_echo_n "checking for libfvalue_value_type_append_data_string in -lfvalue... " >&6; } if ${ac_cv_lib_fvalue_libfvalue_value_type_append_data_string+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfvalue $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfvalue_value_type_append_data_string (); int main () { return libfvalue_value_type_append_data_string (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fvalue_libfvalue_value_type_append_data_string=yes else ac_cv_lib_fvalue_libfvalue_value_type_append_data_string=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" >&5 $as_echo "$ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" >&6; } if test "x$ac_cv_lib_fvalue_libfvalue_value_type_append_data_string" = xyes; then : ac_cv_libfvalue_dummy=yes else ac_cv_libfvalue=no fi ac_cv_libfvalue_LIBADD="-lfvalue" fi fi fi if test "x$ac_cv_libfvalue" = xyes; then : $as_echo "#define HAVE_LIBFVALUE 1" >>confdefs.h fi if test "x$ac_cv_libfvalue" = xyes; then : HAVE_LIBFVALUE=1 else HAVE_LIBFVALUE=0 fi if test "x$ac_cv_libfvalue" != xyes; then : ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local $as_echo "#define HAVE_LOCAL_LIBFVALUE 1" >>confdefs.h HAVE_LOCAL_LIBFVALUE=1 fi if test "x$ac_cv_libfvalue" = xlocal; then HAVE_LOCAL_LIBFVALUE_TRUE= HAVE_LOCAL_LIBFVALUE_FALSE='#' else HAVE_LOCAL_LIBFVALUE_TRUE='#' HAVE_LOCAL_LIBFVALUE_FALSE= fi if test "x$ac_cv_libfvalue_CPPFLAGS" != "x"; then : LIBFVALUE_CPPFLAGS=$ac_cv_libfvalue_CPPFLAGS fi if test "x$ac_cv_libfvalue_LIBADD" != "x"; then : LIBFVALUE_LIBADD=$ac_cv_libfvalue_LIBADD fi if test "x$ac_cv_libfvalue" = xyes; then : ax_libfvalue_pc_libs_private=-lfvalue fi if test "x$ac_cv_libfvalue" = xyes; then : ax_libfvalue_spec_requires=libfvalue ax_libfvalue_spec_build_requires=libfvalue-devel fi # Check whether --with-libfwnt was given. if test "${with_libfwnt+set}" = set; then : withval=$with_libfwnt; ac_cv_with_libfwnt=$withval else ac_cv_with_libfwnt=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfwnt+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfwnt=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfwnt" >&5 $as_echo "$ac_cv_with_libfwnt" >&6; } if test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xno && test "x$ac_cv_with_libfwnt" != xauto-detect; then : if test -d "$ac_cv_with_libfwnt"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfwnt}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwnt}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfwnt" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfwnt" >&2;} fi fi if test "x$ac_cv_with_libfwnt" = xno; then : ac_cv_libfwnt=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt" >&5 $as_echo_n "checking for libfwnt... " >&6; } if test -n "$libfwnt_CFLAGS"; then pkg_cv_libfwnt_CFLAGS="$libfwnt_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwnt_CFLAGS=`$PKG_CONFIG --cflags "libfwnt >= 20120426" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfwnt_LIBS"; then pkg_cv_libfwnt_LIBS="$libfwnt_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20120426\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20120426") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfwnt_LIBS=`$PKG_CONFIG --libs "libfwnt >= 20120426" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfwnt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfwnt >= 20120426" 2>&1` else libfwnt_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfwnt >= 20120426" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfwnt_PKG_ERRORS" >&5 ac_cv_libfwnt=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfwnt=no else libfwnt_CFLAGS=$pkg_cv_libfwnt_CFLAGS libfwnt_LIBS=$pkg_cv_libfwnt_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfwnt=yes fi fi if test "x$ac_cv_libfwnt" = xyes; then : ac_cv_libfwnt_CPPFLAGS="$pkg_cv_libfwnt_CFLAGS" ac_cv_libfwnt_LIBADD="$pkg_cv_libfwnt_LIBS" else for ac_header in libfwnt.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfwnt.h" "ac_cv_header_libfwnt_h" "$ac_includes_default" if test "x$ac_cv_header_libfwnt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFWNT_H 1 _ACEOF fi done if test "x$ac_cv_header_libfwnt_h" = xno; then : ac_cv_libfwnt=no else ac_cv_libfwnt=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_get_version in -lfwnt" >&5 $as_echo_n "checking for libfwnt_get_version in -lfwnt... " >&6; } if ${ac_cv_lib_fwnt_libfwnt_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfwnt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfwnt_get_version (); int main () { return libfwnt_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fwnt_libfwnt_get_version=yes else ac_cv_lib_fwnt_libfwnt_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_get_version" >&5 $as_echo "$ac_cv_lib_fwnt_libfwnt_get_version" >&6; } if test "x$ac_cv_lib_fwnt_libfwnt_get_version" = xyes; then : ac_cv_libfwnt_dummy=yes else ac_cv_libfwnt=no fi ac_cv_libfwnt_LIBADD="-lfwnt" fi fi fi if test "x$ac_cv_libfwnt" = xyes; then : $as_echo "#define HAVE_LIBFWNT 1" >>confdefs.h fi if test "x$ac_cv_libfwnt" = xyes; then : HAVE_LIBFWNT=1 else HAVE_LIBFWNT=0 fi if test "x$ac_cv_libfwnt" != xyes; then : ac_cv_libfwnt_CPPFLAGS="-I../libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local $as_echo "#define HAVE_LOCAL_LIBFWNT 1" >>confdefs.h HAVE_LOCAL_LIBFWNT=1 fi if test "x$ac_cv_libfwnt" = xlocal; then HAVE_LOCAL_LIBFWNT_TRUE= HAVE_LOCAL_LIBFWNT_FALSE='#' else HAVE_LOCAL_LIBFWNT_TRUE='#' HAVE_LOCAL_LIBFWNT_FALSE= fi if test "x$ac_cv_libfwnt_CPPFLAGS" != "x"; then : LIBFWNT_CPPFLAGS=$ac_cv_libfwnt_CPPFLAGS fi if test "x$ac_cv_libfwnt_LIBADD" != "x"; then : LIBFWNT_LIBADD=$ac_cv_libfwnt_LIBADD fi if test "x$ac_cv_libfwnt" = xyes; then : ax_libfwnt_pc_libs_private=-lfwnt fi if test "x$ac_cv_libfwnt" = xyes; then : ax_libfwnt_spec_requires=libfwnt ax_libfwnt_spec_build_requires=libfwnt-devel fi # Check whether --with-libfmapi was given. if test "${with_libfmapi+set}" = set; then : withval=$with_libfmapi; ac_cv_with_libfmapi=$withval else ac_cv_with_libfmapi=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libfmapi+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libfmapi=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libfmapi" >&5 $as_echo "$ac_cv_with_libfmapi" >&6; } if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfmapi" >&5 $as_echo_n "checking for libfmapi... " >&6; } if test -n "$libfmapi_CFLAGS"; then pkg_cv_libfmapi_CFLAGS="$libfmapi_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfmapi >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfmapi >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfmapi_CFLAGS=`$PKG_CONFIG --cflags "libfmapi >= 20120405" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libfmapi_LIBS"; then pkg_cv_libfmapi_LIBS="$libfmapi_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfmapi >= 20120405\""; } >&5 ($PKG_CONFIG --exists --print-errors "libfmapi >= 20120405") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libfmapi_LIBS=`$PKG_CONFIG --libs "libfmapi >= 20120405" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libfmapi_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libfmapi >= 20120405" 2>&1` else libfmapi_PKG_ERRORS=`$PKG_CONFIG --print-errors "libfmapi >= 20120405" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libfmapi_PKG_ERRORS" >&5 ac_cv_libfmapi=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libfmapi=no else libfmapi_CFLAGS=$pkg_cv_libfmapi_CFLAGS libfmapi_LIBS=$pkg_cv_libfmapi_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libfmapi=yes fi ac_cv_libfmapi_CPPFLAGS="$pkg_cv_libfmapi_CFLAGS" ac_cv_libfmapi_LIBADD="$pkg_cv_libfmapi_LIBS" fi if test "x$ac_cv_libfmapi" != xyes; then : if test "x$ac_cv_with_libfmapi" != x && test "x$ac_cv_with_libfmapi" != xno && test "x$ac_cv_with_libfmapi" != xauto-detect; then : if test -d "$ac_cv_with_libfmapi"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libfmapi}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfmapi}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libfmapi" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libfmapi" >&2;} fi fi if test "x$ac_cv_with_libfmapi" = xno; then : ac_cv_libfmapi=no else for ac_header in libfmapi.h do : ac_fn_c_check_header_mongrel "$LINENO" "libfmapi.h" "ac_cv_header_libfmapi_h" "$ac_includes_default" if test "x$ac_cv_header_libfmapi_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBFMAPI_H 1 _ACEOF fi done if test "x$ac_cv_header_libfmapi_h" = xno; then : ac_cv_libfmapi=no else ac_cv_libfmapi=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfmapi_get_version in -lfdatetime" >&5 $as_echo_n "checking for libfmapi_get_version in -lfdatetime... " >&6; } if ${ac_cv_lib_fdatetime_libfmapi_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfdatetime $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libfmapi_get_version (); int main () { return libfmapi_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fdatetime_libfmapi_get_version=yes else ac_cv_lib_fdatetime_libfmapi_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fdatetime_libfmapi_get_version" >&5 $as_echo "$ac_cv_lib_fdatetime_libfmapi_get_version" >&6; } if test "x$ac_cv_lib_fdatetime_libfmapi_get_version" = xyes; then : ac_cv_libfmapi_dummy=yes else ac_cv_libfmapi=no fi fi fi if test "x$ac_cv_libfmapi" = xyes; then : $as_echo "#define HAVE_LIBFMAPI 1" >>confdefs.h ac_cv_libfmapi_LIBADD="-lfmapi" fi if test "x$ac_cv_libfmapi" = xyes; then : HAVE_LIBFMAPI=1 else HAVE_LIBFMAPI=0 fi fi if test "x$ac_cv_libfmapi" != xyes; then : ac_cv_libfmapi_CPPFLAGS="-I../libfmapi"; ac_cv_libfmapi_LIBADD="../libfmapi/libfmapi.la"; ac_cv_libfmapi=local $as_echo "#define HAVE_LOCAL_LIBFMAPI 1" >>confdefs.h HAVE_LOCAL_LIBFMAPI=1 fi if test "x$ac_cv_libfmapi" = xlocal; then HAVE_LOCAL_LIBFMAPI_TRUE= HAVE_LOCAL_LIBFMAPI_FALSE='#' else HAVE_LOCAL_LIBFMAPI_TRUE='#' HAVE_LOCAL_LIBFMAPI_FALSE= fi if test "x$ac_cv_libfmapi_CPPFLAGS" != "x"; then : LIBFMAPI_CPPFLAGS=$ac_cv_libfmapi_CPPFLAGS fi if test "x$ac_cv_libfmapi_LIBADD" != "x"; then : LIBFMAPI_LIBADD=$ac_cv_libfmapi_LIBADD fi if test "x$ac_cv_libfmapi" = xyes; then : ax_libfmapi_pc_libs_private=-lfmapi fi if test "x$ac_cv_libfmapi" = xyes; then : ax_libfmapi_spec_requires=libfmapi ax_libfmapi_spec_build_requires=libfmapi-devel fi AX_LIBPFF_CHECK_LOCAL # Check whether --with-libcsystem was given. if test "${with_libcsystem+set}" = set; then : withval=$with_libcsystem; ac_cv_with_libcsystem=$withval else ac_cv_with_libcsystem=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version" >&5 $as_echo_n "checking whether to use search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; } if ${ac_cv_with_libcsystem+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_libcsystem=auto-detect fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsystem" >&5 $as_echo "$ac_cv_with_libcsystem" >&6; } if test "x$ac_cv_with_libcsystem" != x && test "x$ac_cv_with_libcsystem" != xno && test "x$ac_cv_with_libcsystem" != xauto-detect; then : if test -d "$ac_cv_with_libcsystem"; then : CFLAGS="$CFLAGS -I${ac_cv_with_libcsystem}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsystem}/lib" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcsystem" >&5 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcsystem" >&2;} fi fi if test "x$ac_cv_with_libcsystem" = xno; then : ac_cv_libcsystem=no else if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsystem" >&5 $as_echo_n "checking for libcsystem... " >&6; } if test -n "$libcsystem_CFLAGS"; then pkg_cv_libcsystem_CFLAGS="$libcsystem_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsystem >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsystem >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsystem_CFLAGS=`$PKG_CONFIG --cflags "libcsystem >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libcsystem_LIBS"; then pkg_cv_libcsystem_LIBS="$libcsystem_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsystem >= 20120425\""; } >&5 ($PKG_CONFIG --exists --print-errors "libcsystem >= 20120425") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libcsystem_LIBS=`$PKG_CONFIG --libs "libcsystem >= 20120425" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libcsystem_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libcsystem >= 20120425" 2>&1` else libcsystem_PKG_ERRORS=`$PKG_CONFIG --print-errors "libcsystem >= 20120425" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libcsystem_PKG_ERRORS" >&5 ac_cv_libcsystem=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_libcsystem=no else libcsystem_CFLAGS=$pkg_cv_libcsystem_CFLAGS libcsystem_LIBS=$pkg_cv_libcsystem_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_libcsystem=yes fi fi if test "x$ac_cv_libcsystem" = xyes; then : ac_cv_libcsystem_CPPFLAGS="$pkg_cv_libcsystem_CFLAGS" ac_cv_libcsystem_LIBADD="$pkg_cv_libcsystem_LIBS" else for ac_header in libcsystem.h do : ac_fn_c_check_header_mongrel "$LINENO" "libcsystem.h" "ac_cv_header_libcsystem_h" "$ac_includes_default" if test "x$ac_cv_header_libcsystem_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCSYSTEM_H 1 _ACEOF fi done if test "x$ac_cv_header_libcsystem_h" = xno; then : ac_cv_libcsystem=no else ac_cv_libcsystem=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsystem_get_version in -lcsystem" >&5 $as_echo_n "checking for libcsystem_get_version in -lcsystem... " >&6; } if ${ac_cv_lib_csystem_libcsystem_get_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcsystem $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libcsystem_get_version (); int main () { return libcsystem_get_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_csystem_libcsystem_get_version=yes else ac_cv_lib_csystem_libcsystem_get_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csystem_libcsystem_get_version" >&5 $as_echo "$ac_cv_lib_csystem_libcsystem_get_version" >&6; } if test "x$ac_cv_lib_csystem_libcsystem_get_version" = xyes; then : ac_cv_libcsystem_dummy=yes else ac_cv_libcsystem=no fi ac_cv_libcsystem_LIBADD="-lcsystem" fi fi fi if test "x$ac_cv_libcsystem" = xyes; then : $as_echo "#define HAVE_LIBCSYSTEM 1" >>confdefs.h fi if test "x$ac_cv_libcsystem" = xyes; then : HAVE_LIBCSYSTEM=1 else HAVE_LIBCSYSTEM=0 fi if test "x$ac_cv_libcsystem" != xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi for ac_header in errno.h do : ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ERRNO_H 1 _ACEOF fi done for ac_header in fcntl.h unistd.h sys/stat.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_header in glob.h do : ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default" if test "x$ac_cv_header_glob_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GLOB_H 1 _ACEOF fi done if test "x$ac_cv_header_glob_h" = xno; then : for ac_header in io.h do : ac_fn_c_check_header_mongrel "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default" if test "x$ac_cv_header_io_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IO_H 1 _ACEOF fi done fi for ac_header in signal.h sys/signal.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in close fstat ftruncate lseek open read stat write do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_close" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: close See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_fstat" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: fstat See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_ftruncate" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ftruncate See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_lseek" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: lseek See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_open" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: open See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_read" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: read See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_stat" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: stat See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_write" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: write See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in localtime localtime_r mktime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_localtime" != xyes && test "x$ac_cv_func_localtime_r" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: localtime and localtime_r See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_mktime" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: mktime See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in ctime_r do : ac_fn_c_check_func "$LINENO" "ctime_r" "ac_cv_func_ctime_r" if test "x$ac_cv_func_ctime_r" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CTIME_R 1 _ACEOF fi done if test "x$ac_cv_func_ctime_r" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use ctime_r" >&5 $as_echo_n "checking how to use ctime_r... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ctime_r( NULL, NULL, 0 ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with additional size argument" >&5 $as_echo "with additional size argument" >&6; } ac_cv_cv_ctime_r_size=yes else ac_cv_cv_ctime_r_size=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x$ac_cv_cv_ctime_r_size" = xno; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ctime_r( NULL, NULL ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with two arguments" >&5 $as_echo "with two arguments" >&6; } ac_cv_cv_ctime_r_posix=yes else ac_cv_cv_ctime_r_posix=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$ac_cv_cv_ctime_r_posix" = xno; then : CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { ctime_r( NULL, NULL ) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: with two arguments and definition _POSIX_PTHREAD_SEMANTICS" >&5 $as_echo "with two arguments and definition _POSIX_PTHREAD_SEMANTICS" >&6; } ac_cv_cv_ctime_r_posix=yes else ac_cv_cv_ctime_r_posix=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "x$ac_cv_cv_ctime_r_size" = xno && test "x$ac_cv_cv_ctime_r_posix" = xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown" >&5 $as_echo "$as_me: WARNING: unknown" >&2;} ac_cv_func_ctime_r=no fi if test "x$ac_cv_func_ctime_r" = xyes; then : $as_echo "#define HAVE_CTIME_R 1" >>confdefs.h fi if test "x$ac_cv_cv_ctime_r_size" = xyes; then : $as_echo "#define HAVE_CTIME_R_SIZE 1" >>confdefs.h fi fi if test "x$ac_cv_func_ctime_r" = xno; then : for ac_func in ctime do : ac_fn_c_check_func "$LINENO" "ctime" "ac_cv_func_ctime" if test "x$ac_cv_func_ctime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CTIME 1 _ACEOF fi done if test "x$ac_cv_func_ctime" = xno; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: ctime_r and ctime See \`config.log' for more details" "$LINENO" 5; } fi fi for ac_func in gmtime gmtime_r time do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_gmtime" != xyes && test "x$ac_cv_func_gmtime_r" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing functions: gmtime_r and gmtime See \`config.log' for more details" "$LINENO" 5; } fi if test "x$ac_cv_func_time" != xyes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 1 "Missing function: time See \`config.log' for more details" "$LINENO" 5; } fi for ac_func in getopt do : ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt" if test "x$ac_cv_func_getopt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT 1 _ACEOF fi done for ac_func in setvbuf do : ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" if test "x$ac_cv_func_setvbuf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETVBUF 1 _ACEOF fi done for ac_func in bindtextdomain textdomain do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_cv_libcsystem_CPPFLAGS="-I../libcsystem"; ac_cv_libcsystem_LIBADD="../libcsystem/libcsystem.la"; ac_cv_libcsystem=local $as_echo "#define HAVE_LOCAL_LIBCSYSTEM 1" >>confdefs.h HAVE_LOCAL_LIBCSYSTEM=1 fi if test "x$ac_cv_libcsystem" = xlocal; then HAVE_LOCAL_LIBCSYSTEM_TRUE= HAVE_LOCAL_LIBCSYSTEM_FALSE='#' else HAVE_LOCAL_LIBCSYSTEM_TRUE='#' HAVE_LOCAL_LIBCSYSTEM_FALSE= fi if test "x$ac_cv_libcsystem_CPPFLAGS" != "x"; then : LIBCSYSTEM_CPPFLAGS=$ac_cv_libcsystem_CPPFLAGS fi if test "x$ac_cv_libcsystem_LIBADD" != "x"; then : LIBCSYSTEM_LIBADD=$ac_cv_libcsystem_LIBADD fi if test "x$ac_cv_libcsystem" = xyes; then : ax_libcsystem_pc_libs_private=-lstring fi if test "x$ac_cv_libcsystem" = xyes; then : ax_libcsystem_spec_requires=libcsystem ax_libcsystem_spec_build_requires=libcsystem-devel fi # Check whether --enable-static-executables was given. if test "${enable_static_executables+set}" = set; then : enableval=$enable_static_executables; ac_cv_enable_static_executables=$enableval else ac_cv_enable_static_executables=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5 $as_echo_n "checking whether to enable build static executables (binaries)... " >&6; } if ${ac_cv_enable_static_executables+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_static_executables=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_static_executables" >&5 $as_echo "$ac_cv_enable_static_executables" >&6; } if test "x$ac_cv_enable_static_executables" != xno; then : STATIC_LDFLAGS="-all-static"; ac_cv_enable_static_executables=yes fi # Check whether --enable-verbose-output was given. if test "${enable_verbose_output+set}" = set; then : enableval=$enable_verbose_output; ac_cv_enable_verbose_output=$enableval else ac_cv_enable_verbose_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5 $as_echo_n "checking whether to enable enable verbose output... " >&6; } if ${ac_cv_enable_verbose_output+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_verbose_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5 $as_echo "$ac_cv_enable_verbose_output" >&6; } if test "x$ac_cv_enable_verbose_output" != xno ; then : $as_echo "#define HAVE_VERBOSE_OUTPUT 1" >>confdefs.h ac_cv_enable_verbose_output=yes fi # Check whether --enable-debug-output was given. if test "${enable_debug_output+set}" = set; then : enableval=$enable_debug_output; ac_cv_enable_debug_output=$enableval else ac_cv_enable_debug_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5 $as_echo_n "checking whether to enable enable debug output... " >&6; } if ${ac_cv_enable_debug_output+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_debug_output=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5 $as_echo "$ac_cv_enable_debug_output" >&6; } if test "x$ac_cv_enable_debug_output" != xno ; then : $as_echo "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h ac_cv_enable_debug_output=yes fi # Check whether --enable-java was given. if test "${enable_java+set}" = set; then : enableval=$enable_java; ac_cv_enable_java=$enableval else ac_cv_enable_java=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Java bindings" >&5 $as_echo_n "checking whether to enable build Java bindings... " >&6; } if ${ac_cv_enable_java+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_java=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_java" >&5 $as_echo "$ac_cv_enable_java" >&6; } if test "x$ac_cv_enable_java" != xno; then : # Check whether --with-jdk was given. if test "${with_jdk+set}" = set; then : withval=$with_jdk; ac_cv_with_jdk=$withval else ac_cv_with_jdk=DIR fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for JDK in includedir and libdir or in the specified DIR" >&5 $as_echo_n "checking whether to use search for JDK in includedir and libdir or in the specified DIR... " >&6; } if ${ac_cv_with_jdk+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_with_jdk=DIR fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_jdk" >&5 $as_echo "$ac_cv_with_jdk" >&6; } # Extract the first word of "basename", so it can be a program name with args. set dummy basename; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_BASENAME+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BASENAME"; then ac_cv_prog_BASENAME="$BASENAME" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_BASENAME="basename" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi BASENAME=$ac_cv_prog_BASENAME if test -n "$BASENAME"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5 $as_echo "$BASENAME" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "readlink", so it can be a program name with args. set dummy readlink; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_READLINK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$READLINK"; then ac_cv_prog_READLINK="$READLINK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_READLINK="readlink" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi READLINK=$ac_cv_prog_READLINK if test -n "$READLINK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5 $as_echo "$READLINK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$JAVA" = x; then : if test x"$ac_cv_with_jdk" = x; then : for ac_prog in java$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVA in [\\/]* | ?:[\\/]*) ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVA=$ac_cv_path_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVA" && break done else echo $ac_cv_with_jdk for ac_prog in java$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVA+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVA in [\\/]* | ?:[\\/]*) ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVA=$ac_cv_path_JAVA if test -n "$JAVA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5 $as_echo "$JAVA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVA" && break done fi if test x"$JAVA" = x; then : as_fn_error $? "Cannot find java$EXEEXT specify the location of the JDK with --with-jdk" "$LINENO" 5 fi JAVA=$JAVA fi if test x"$JAVAC" = x; then : if test x"$ac_cv_with_jdk" = x; then : for ac_prog in javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAC in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAC=$ac_cv_path_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done else for ac_prog in javac$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAC in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAC=$ac_cv_path_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done fi if test x"$JAVA" = x; then : as_fn_error $? "Cannot find javac$EXEEXT specify the location of the JDK with --with-jdk" "$LINENO" 5 fi JAVAC=$JAVAC fi if test x"$JAVAH" = x; then : if test x"$ac_cv_with_jdk" = x; then : for ac_prog in javah$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAH+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAH in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAH=$ac_cv_path_JAVAH if test -n "$JAVAH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5 $as_echo "$JAVAH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAH" && break done else for ac_prog in javah$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAVAH+:} false; then : $as_echo_n "(cached) " >&6 else case $JAVAH in [\\/]* | ?:[\\/]*) ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAVAH=$ac_cv_path_JAVAH if test -n "$JAVAH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5 $as_echo "$JAVAH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAH" && break done fi if test x"$JAVA" = x; then : as_fn_error $? "Cannot find javah$EXEEXT specify the location of the JDK with --with-jdk" "$LINENO" 5 fi JAVAH=$JAVAH fi if test x"$JAR" = x; then : if test x"$ac_cv_with_jdk" = x; then : for ac_prog in jar$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAR+:} false; then : $as_echo_n "(cached) " >&6 else case $JAR in [\\/]* | ?:[\\/]*) ac_cv_path_JAR="$JAR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAR=$ac_cv_path_JAR if test -n "$JAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5 $as_echo "$JAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAR" && break done else for ac_prog in jar$EXEEXT do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_JAR+:} false; then : $as_echo_n "(cached) " >&6 else case $JAR in [\\/]* | ?:[\\/]*) ac_cv_path_JAR="$JAR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi JAR=$ac_cv_path_JAR if test -n "$JAR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5 $as_echo "$JAR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAR" && break done fi if test x"$JAVA" = x; then : as_fn_error $? "Cannot find jar$EXEEXT specify the location of the JDK with --with-jdk" "$LINENO" 5 fi JAR=$JAR fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI include path" >&5 $as_echo_n "checking for JNI include path... " >&6; } if test -n $READLINK; then : JRE_ROOT_DIR=`$READLINK -f $JAVA` fi JRE_ROOT_DIR=`$as_dirname -- $JRE_ROOT_DIR || $as_expr X$JRE_ROOT_DIR : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$JRE_ROOT_DIR : 'X\(//\)[^/]' \| \ X$JRE_ROOT_DIR : 'X\(//\)$' \| \ X$JRE_ROOT_DIR : 'X\(/\)' \| . 2>/dev/null || $as_echo X$JRE_ROOT_DIR | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`; JRE_ROOT_DIR=`$as_dirname -- $JRE_ROOT_DIR || $as_expr X$JRE_ROOT_DIR : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$JRE_ROOT_DIR : 'X\(//\)[^/]' \| \ X$JRE_ROOT_DIR : 'X\(//\)$' \| \ X$JRE_ROOT_DIR : 'X\(/\)' \| . 2>/dev/null || $as_echo X$JRE_ROOT_DIR | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`; JNI_INCLUDE_DIR=$JRE_ROOT_DIR; if test -n $BASENAME && test `$BASENAME $JNI_INCLUDE_DIR` = "jre"; then : JNI_INCLUDE_DIR=`$as_dirname -- $JNI_INCLUDE_DIR || $as_expr X$JNI_INCLUDE_DIR : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$JNI_INCLUDE_DIR : 'X\(//\)[^/]' \| \ X$JNI_INCLUDE_DIR : 'X\(//\)$' \| \ X$JNI_INCLUDE_DIR : 'X\(/\)' \| . 2>/dev/null || $as_echo X$JNI_INCLUDE_DIR | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`; fi JNI_INCLUDE_DIR="$JNI_INCLUDE_DIR/include"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNI_INCLUDE_DIR" >&5 $as_echo "$JNI_INCLUDE_DIR" >&6; } ac_java_target_string="$target"; if test "x$ac_java_target_string" = x; then : ac_java_target_string="$build" fi case $ac_java_target_string in #( *bsdi*) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/bsdos"; ;; #( *linux*) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/linux"; ;; #( *osf*) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/alpha"; ;; #( *solaris*) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/solaris"; ;; #( *cygwin*) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/win32"; ;; #( *mingw*) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/win32"; ;; #( *) : JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/genunix"; ;; #( *) : ;; esac JAVA_CPPFLAGS="-I$JNI_INCLUDE_DIR -I$JNI_PLATFORM_INCLUDE_DIR" if test ! -r $JNI_INCLUDE_DIR/jni.h; then : as_fn_error $? "Missing JNI include file" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR package path" >&5 $as_echo_n "checking for JAR package path... " >&6; } JAR_PACKAGE_DIR="$JRE_ROOT_DIR/lib/ext"; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR_PACKAGE_DIR" >&5 $as_echo "$JAR_PACKAGE_DIR" >&6; } JAR_PACKAGE_DIR=$JAR_PACKAGE_DIR { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JNI library path" >&5 $as_echo_n "checking for JNI library path... " >&6; } ac_java_target_cpu_string="$target_cpu"; if test "x$ac_java_target_cpu_string" = x; then : ac_java_target_cpu_string="$build_cpu" fi case $ac_java_target_cpu_string in #( i3-686*) : JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/i386"; ;; #( x86_64) : if test -d "$JRE_ROOT_DIR/lib/amd64"; then : JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/amd64"; else JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/$ac_java_target_cpu_string"; fi ;; #( *) : JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/$ac_java_target_cpu_string"; ;; #( *) : ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNI_LIBRARY_DIR" >&5 $as_echo "$JNI_LIBRARY_DIR" >&6; } JNI_LIBRARY_DIR=$JNI_LIBRARY_DIR $as_echo "#define HAVE_JAVA 1" >>confdefs.h ac_cv_enable_java=yes fi if test "x$ac_cv_enable_java" != xno; then HAVE_JAVA_TRUE= HAVE_JAVA_FALSE='#' else HAVE_JAVA_TRUE='#' HAVE_JAVA_FALSE= fi # Check whether --enable-python was given. if test "${enable_python+set}" = set; then : enableval=$enable_python; ac_cv_enable_python=$enableval else ac_cv_enable_python=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5 $as_echo_n "checking whether to enable build Python bindings... " >&6; } if ${ac_cv_enable_python+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_enable_python=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python" >&5 $as_echo "$ac_cv_enable_python" >&6; } if test "x$ac_cv_enable_python" != xno; then : if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version >= 2.5" >&5 $as_echo_n "checking whether $PYTHON version >= 2.5... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.5" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.5... " >&6; } if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.5'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null || echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python include path" >&5 $as_echo_n "checking for Python include path... " >&6; } PYTHON_INCLUDE_DIR=`$PYTHON -c "import distutils.sysconfig;print distutils.sysconfig.get_python_inc() "`; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_INCLUDE_DIR" >&5 $as_echo "$PYTHON_INCLUDE_DIR" >&6; } PYTHON_CPPFLAGS=-I$PYTHON_INCLUDE_DIR if test ! -r $PYTHON_INCLUDE_DIR/Python.h; then : as_fn_error $? "Missing Python include file" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python library path" >&5 $as_echo_n "checking for Python library path... " >&6; } python_path=`$PYTHON -c "import distutils.sysconfig;print distutils.sysconfig.get_python_lib() "`; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_path" >&5 $as_echo "$python_path" >&6; } PYTHON_LDFLAGS="-L$python_path -lpython$PYTHON_VERSION" python_site=`echo $python_path | sed "s/config/site-packages/"`; PYTHON_SITE_PKG=$python_site { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python extra libraries" >&5 $as_echo_n "checking for Python extra libraries... " >&6; } PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig;conf = distutils.sysconfig.get_config_var;print conf('LOCALMODLIBS')+' '+conf('LIBS')"`; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_EXTRA_LIBS" >&5 $as_echo "$PYTHON_EXTRA_LIBS" >&6; } ac_cv_enable_python=yes fi if test "x$ac_cv_enable_python" = xyes; then : $as_echo "#define HAVE_PYTHON 1" >>confdefs.h fi if test "x$ac_cv_enable_python" = xyes; then HAVE_PYTHON_TRUE= HAVE_PYTHON_FALSE='#' else HAVE_PYTHON_TRUE='#' HAVE_PYTHON_FALSE= fi if test x"$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno; then : case $host in #( *cygwin* | *mingw*) : LIBPFF_DLL_IMPORT="-DLIBPFF_DLL_IMPORT" ;; #( *) : ;; esac fi CFLAGS="$CFLAGS -Wall"; ac_cv_enable_memwatch=no if test "x$ac_cv_enable_memwatch" != xno ; then : MEMWATCH_CPPFLAGS="-DMEMWATCH -DMEMWATCH_STDIO" MEMWATCH_LIBADD=../common/libmemwatch.la fi if test "x$ac_cv_enable_memwatch" != xno; then HAVE_MEMWATCH_TRUE= HAVE_MEMWATCH_FALSE='#' else HAVE_MEMWATCH_TRUE='#' HAVE_MEMWATCH_FALSE= fi if test "x$ac_cv_libcstring" = xyes || test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfguid" = xyes || test "x$ac_cv_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes || test "x$ac_cv_libfmapi" = xyes; then : libpff_spec_requires=Requires: libpff_spec_build_requires=BuildRequires: fi if test "x$ac_cv_libcsystem" = xyes; then : libpff_tools_spec_build_requires=BuildRequires: fi DATE=`date -R 2> /dev/null` ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files include/Makefile" ac_config_files="$ac_config_files common/Makefile" ac_config_files="$ac_config_files libcstring/Makefile" ac_config_files="$ac_config_files libcerror/Makefile" ac_config_files="$ac_config_files libclocale/Makefile" ac_config_files="$ac_config_files libcnotify/Makefile" ac_config_files="$ac_config_files libcsplit/Makefile" ac_config_files="$ac_config_files libuna/Makefile" ac_config_files="$ac_config_files libcfile/Makefile" ac_config_files="$ac_config_files libcpath/Makefile" ac_config_files="$ac_config_files libbfio/Makefile" ac_config_files="$ac_config_files libfcache/Makefile" ac_config_files="$ac_config_files libfdata/Makefile" ac_config_files="$ac_config_files libfdatetime/Makefile" ac_config_files="$ac_config_files libfguid/Makefile" ac_config_files="$ac_config_files libfvalue/Makefile" ac_config_files="$ac_config_files libfwnt/Makefile" ac_config_files="$ac_config_files libfmapi/Makefile" ac_config_files="$ac_config_files libpff/Makefile" ac_config_files="$ac_config_files libcsystem/Makefile" ac_config_files="$ac_config_files pfftools/Makefile" ac_config_files="$ac_config_files jpff/Makefile" ac_config_files="$ac_config_files pypff/Makefile" ac_config_files="$ac_config_files po/Makefile.in" ac_config_files="$ac_config_files po/Makevars" ac_config_files="$ac_config_files manuals/Makefile" ac_config_files="$ac_config_files tests/Makefile" ac_config_files="$ac_config_files examples/Makefile" ac_config_files="$ac_config_files macosx/Makefile" ac_config_files="$ac_config_files msvscpp/Makefile" ac_config_files="$ac_config_files contrib/Makefile" ac_config_files="$ac_config_files include/libpff.h" ac_config_files="$ac_config_files include/libpff/definitions.h" ac_config_files="$ac_config_files include/libpff/features.h" ac_config_files="$ac_config_files include/libpff/types.h" ac_config_files="$ac_config_files libpff/libpff_definitions.h" ac_config_files="$ac_config_files common/types.h" ac_config_files="$ac_config_files dpkg/changelog" ac_config_files="$ac_config_files dpkg/copyright" ac_config_files="$ac_config_files libpff/libpff.rc" ac_config_files="$ac_config_files macosx/Introduction.rtf" ac_config_files="$ac_config_files libpff.pc" ac_config_files="$ac_config_files libpff.spec" ac_config_headers="$ac_config_headers common/config.h" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCSTRING_TRUE}" && test -z "${HAVE_LOCAL_LIBCSTRING_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCSTRING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCERROR_TRUE}" && test -z "${HAVE_LOCAL_LIBCERROR_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCERROR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCLOCALE_TRUE}" && test -z "${HAVE_LOCAL_LIBCLOCALE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCLOCALE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCNOTIFY_TRUE}" && test -z "${HAVE_LOCAL_LIBCNOTIFY_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCNOTIFY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCSPLIT_TRUE}" && test -z "${HAVE_LOCAL_LIBCSPLIT_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCSPLIT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBUNA_TRUE}" && test -z "${HAVE_LOCAL_LIBUNA_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBUNA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCFILE_TRUE}" && test -z "${HAVE_LOCAL_LIBCFILE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCFILE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCPATH_TRUE}" && test -z "${HAVE_LOCAL_LIBCPATH_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCPATH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBBFIO_TRUE}" && test -z "${HAVE_LOCAL_LIBBFIO_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBBFIO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFCACHE_TRUE}" && test -z "${HAVE_LOCAL_LIBFCACHE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFCACHE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFDATA_TRUE}" && test -z "${HAVE_LOCAL_LIBFDATA_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFDATA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFDATETIME_TRUE}" && test -z "${HAVE_LOCAL_LIBFDATETIME_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFDATETIME\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFGUID_TRUE}" && test -z "${HAVE_LOCAL_LIBFGUID_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFGUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFVALUE_TRUE}" && test -z "${HAVE_LOCAL_LIBFVALUE_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFVALUE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFWNT_TRUE}" && test -z "${HAVE_LOCAL_LIBFWNT_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFWNT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBFMAPI_TRUE}" && test -z "${HAVE_LOCAL_LIBFMAPI_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBFMAPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LOCAL_LIBCSYSTEM_TRUE}" && test -z "${HAVE_LOCAL_LIBCSYSTEM_FALSE}"; then as_fn_error $? "conditional \"HAVE_LOCAL_LIBCSYSTEM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_JAVA_TRUE}" && test -z "${HAVE_JAVA_FALSE}"; then as_fn_error $? "conditional \"HAVE_JAVA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_MEMWATCH_TRUE}" && test -z "${HAVE_MEMWATCH_FALSE}"; then as_fn_error $? "conditional \"HAVE_MEMWATCH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libpff $as_me 20120802, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ libpff config.status 20120802 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' # Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "libcstring/Makefile") CONFIG_FILES="$CONFIG_FILES libcstring/Makefile" ;; "libcerror/Makefile") CONFIG_FILES="$CONFIG_FILES libcerror/Makefile" ;; "libclocale/Makefile") CONFIG_FILES="$CONFIG_FILES libclocale/Makefile" ;; "libcnotify/Makefile") CONFIG_FILES="$CONFIG_FILES libcnotify/Makefile" ;; "libcsplit/Makefile") CONFIG_FILES="$CONFIG_FILES libcsplit/Makefile" ;; "libuna/Makefile") CONFIG_FILES="$CONFIG_FILES libuna/Makefile" ;; "libcfile/Makefile") CONFIG_FILES="$CONFIG_FILES libcfile/Makefile" ;; "libcpath/Makefile") CONFIG_FILES="$CONFIG_FILES libcpath/Makefile" ;; "libbfio/Makefile") CONFIG_FILES="$CONFIG_FILES libbfio/Makefile" ;; "libfcache/Makefile") CONFIG_FILES="$CONFIG_FILES libfcache/Makefile" ;; "libfdata/Makefile") CONFIG_FILES="$CONFIG_FILES libfdata/Makefile" ;; "libfdatetime/Makefile") CONFIG_FILES="$CONFIG_FILES libfdatetime/Makefile" ;; "libfguid/Makefile") CONFIG_FILES="$CONFIG_FILES libfguid/Makefile" ;; "libfvalue/Makefile") CONFIG_FILES="$CONFIG_FILES libfvalue/Makefile" ;; "libfwnt/Makefile") CONFIG_FILES="$CONFIG_FILES libfwnt/Makefile" ;; "libfmapi/Makefile") CONFIG_FILES="$CONFIG_FILES libfmapi/Makefile" ;; "libpff/Makefile") CONFIG_FILES="$CONFIG_FILES libpff/Makefile" ;; "libcsystem/Makefile") CONFIG_FILES="$CONFIG_FILES libcsystem/Makefile" ;; "pfftools/Makefile") CONFIG_FILES="$CONFIG_FILES pfftools/Makefile" ;; "jpff/Makefile") CONFIG_FILES="$CONFIG_FILES jpff/Makefile" ;; "pypff/Makefile") CONFIG_FILES="$CONFIG_FILES pypff/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/Makevars") CONFIG_FILES="$CONFIG_FILES po/Makevars" ;; "manuals/Makefile") CONFIG_FILES="$CONFIG_FILES manuals/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "macosx/Makefile") CONFIG_FILES="$CONFIG_FILES macosx/Makefile" ;; "msvscpp/Makefile") CONFIG_FILES="$CONFIG_FILES msvscpp/Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "include/libpff.h") CONFIG_FILES="$CONFIG_FILES include/libpff.h" ;; "include/libpff/definitions.h") CONFIG_FILES="$CONFIG_FILES include/libpff/definitions.h" ;; "include/libpff/features.h") CONFIG_FILES="$CONFIG_FILES include/libpff/features.h" ;; "include/libpff/types.h") CONFIG_FILES="$CONFIG_FILES include/libpff/types.h" ;; "libpff/libpff_definitions.h") CONFIG_FILES="$CONFIG_FILES libpff/libpff_definitions.h" ;; "common/types.h") CONFIG_FILES="$CONFIG_FILES common/types.h" ;; "dpkg/changelog") CONFIG_FILES="$CONFIG_FILES dpkg/changelog" ;; "dpkg/copyright") CONFIG_FILES="$CONFIG_FILES dpkg/copyright" ;; "libpff/libpff.rc") CONFIG_FILES="$CONFIG_FILES libpff/libpff.rc" ;; "macosx/Introduction.rtf") CONFIG_FILES="$CONFIG_FILES macosx/Introduction.rtf" ;; "libpff.pc") CONFIG_FILES="$CONFIG_FILES libpff.pc" ;; "libpff.spec") CONFIG_FILES="$CONFIG_FILES libpff.spec" ;; "common/config.h") CONFIG_HEADERS="$CONFIG_HEADERS common/config.h" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "po-directories":C) for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: Building: libcstring support: $ac_cv_libcstring libcerror support: $ac_cv_libcerror libclocale support: $ac_cv_libclocale libcnotify support: $ac_cv_libcnotify libcsplit support: $ac_cv_libcsplit libuna support: $ac_cv_libuna libcfile support: $ac_cv_libcfile libcpath support: $ac_cv_libcpath libbfio support: $ac_cv_libbfio libfcache support: $ac_cv_libfcache libfdata support: $ac_cv_libfdata libfdatetime support: $ac_cv_libfdatetime libfguid support: $ac_cv_libfguid libfvalue support: $ac_cv_libfvalue libfwnt support: $ac_cv_libfwnt libfmapi support: $ac_cv_libfmapi libcsystem support: $ac_cv_libcsystem Features: Wide character type support: $ac_cv_enable_wide_character_type pfftools are build as static executables: $ac_cv_enable_static_executables Java (jpff) support: $ac_cv_enable_java Python (pypff) support: $ac_cv_enable_python Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&5 $as_echo "$as_me: Building: libcstring support: $ac_cv_libcstring libcerror support: $ac_cv_libcerror libclocale support: $ac_cv_libclocale libcnotify support: $ac_cv_libcnotify libcsplit support: $ac_cv_libcsplit libuna support: $ac_cv_libuna libcfile support: $ac_cv_libcfile libcpath support: $ac_cv_libcpath libbfio support: $ac_cv_libbfio libfcache support: $ac_cv_libfcache libfdata support: $ac_cv_libfdata libfdatetime support: $ac_cv_libfdatetime libfguid support: $ac_cv_libfguid libfvalue support: $ac_cv_libfvalue libfwnt support: $ac_cv_libfwnt libfmapi support: $ac_cv_libfmapi libcsystem support: $ac_cv_libcsystem Features: Wide character type support: $ac_cv_enable_wide_character_type pfftools are build as static executables: $ac_cv_enable_static_executables Java (jpff) support: $ac_cv_enable_java Python (pypff) support: $ac_cv_enable_python Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output " >&6;}; libpff-20120802/libuna/0000775000175000017500000000000012006536212011466 500000000000000libpff-20120802/libuna/libuna_url_stream.c0000644000175000017500000003630112005152763015266 00000000000000/* * Percent or URL encoded stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_url_stream.h" /* Determines the size of a url stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_url_stream_size_from_byte_stream( uint8_t *byte_stream, size_t byte_stream_size, size_t *url_stream_size, libcerror_error_t **error ) { static char *function = "libuna_url_stream_size_from_byte_stream"; size_t byte_stream_index = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( url_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid url stream size.", function ); return( -1 ); } /* TODO what about end of string character */ *url_stream_size = 0; /* Check if the byte stream contains * reserved or non-allowed characters that need to be decoded */ while( byte_stream_index < byte_stream_size ) { /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'A' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'I' ) ) { *url_stream_size += 1; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'J' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'R' ) ) { *url_stream_size += 1; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'S' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'Z' ) ) { *url_stream_size += 1; } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'a' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'i' ) ) { *url_stream_size += 1; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'j' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'r' ) ) { *url_stream_size += 1; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 's' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'z' ) ) { *url_stream_size += 1; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) '0' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) '9' ) ) { *url_stream_size += 1; } else if( ( byte_stream[ byte_stream_index ] == (uint8_t) '-' ) || ( byte_stream[ byte_stream_index ] == (uint8_t) '_' ) || ( byte_stream[ byte_stream_index ] == (uint8_t) '.' ) || ( byte_stream[ byte_stream_index ] == (uint8_t) '`' ) ) { *url_stream_size += 1; } else { *url_stream_size += 3; } byte_stream_index++; } return( 1 ); } /* Copies a url stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_url_stream_copy_from_byte_stream( uint8_t *url_stream, size_t url_stream_size, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_url_stream_copy_from_byte_stream"; size_t url_stream_index = 0; size_t byte_stream_index = 0; uint8_t byte_value = 0; if( url_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid url stream.", function ); return( -1 ); } if( url_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid url stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* TODO what about end of string character */ /* Check if the byte stream contains * reserved or non-allowed characters that need to be decoded */ while( byte_stream_index < byte_stream_size ) { if( url_stream_index >= url_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: url stream is too small.", function ); return( -1 ); } /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'A' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'I' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'J' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'R' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'S' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'Z' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'a' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'i' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 'j' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'r' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) 's' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) 'z' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else if( ( byte_stream[ byte_stream_index ] >= (uint8_t) '0' ) && ( byte_stream[ byte_stream_index ] <= (uint8_t) '9' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else if( ( byte_stream[ byte_stream_index ] == (uint8_t) '-' ) || ( byte_stream[ byte_stream_index ] == (uint8_t) '_' ) || ( byte_stream[ byte_stream_index ] == (uint8_t) '.' ) || ( byte_stream[ byte_stream_index ] == (uint8_t) '`' ) ) { url_stream[ url_stream_index++ ] = byte_stream[ byte_stream_index ]; } else { if( ( url_stream_index + 2 ) >= url_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: url stream is too small.", function ); return( -1 ); } url_stream[ url_stream_index++ ] = (uint8_t) '%'; byte_value = byte_stream[ byte_stream_index ] >> 4; if( byte_value <= 9 ) { url_stream[ url_stream_index++ ] = (uint8_t) '0' + byte_value; } else { url_stream[ url_stream_index++ ] = (uint8_t) 'A' + byte_value; } byte_value = byte_stream[ byte_stream_index ] & 0x0f; if( byte_value < 9 ) { url_stream[ url_stream_index++ ] = (uint8_t) '0' + byte_value; } else { url_stream[ url_stream_index++ ] = (uint8_t) 'A' + byte_value; } } byte_stream_index++; } return( 1 ); } /* Determines the size of a byte stream from a url stream * Returns 1 if successful or -1 on error */ int libuna_url_stream_size_to_byte_stream( uint8_t *url_stream, size_t url_stream_size, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_url_stream_size_to_byte_stream"; size_t url_stream_index = 0; if( url_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid url stream.", function ); return( -1 ); } if( url_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid url stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( url_stream_index < url_stream_size ) { if( url_stream[ url_stream_index ] == (uint8_t) '%' ) { url_stream_index++; if( ( url_stream_index + 1 ) >= url_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: url stream is too small.", function ); return( -1 ); } if( ( url_stream[ url_stream_index ] >= (uint8_t) 'A' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'F' ) ) { } else if( ( url_stream[ url_stream_index ] >= (uint8_t) 'a' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'f' ) ) { } else if( ( url_stream[ url_stream_index ] >= (uint8_t) '0' ) && ( url_stream[ url_stream_index ] <= (uint8_t) '9' ) ) { } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid URL encoded character.", function ); return( -1 ); } url_stream_index++; if( ( url_stream[ url_stream_index ] >= (uint8_t) 'A' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'F' ) ) { } else if( ( url_stream[ url_stream_index ] >= (uint8_t) 'a' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'f' ) ) { } else if( ( url_stream[ url_stream_index ] >= (uint8_t) '0' ) && ( url_stream[ url_stream_index ] <= (uint8_t) '9' ) ) { } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid URL encoded character.", function ); return( -1 ); } url_stream_index++; } else { url_stream_index++; } *byte_stream_size += 1; } return( 1 ); } /* Copies a byte stream from a url stream * Returns 1 if successful or -1 on error */ int libuna_url_stream_copy_to_byte_stream( uint8_t *url_stream, size_t url_stream_size, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_url_stream_copy_to_byte_stream"; size_t url_stream_index = 0; size_t byte_stream_index = 0; uint8_t byte_value = 0; if( url_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid url stream.", function ); return( -1 ); } if( url_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid url stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } while( url_stream_index < url_stream_size ) { if( byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } if( url_stream[ url_stream_index ] == (uint8_t) '%' ) { url_stream_index++; if( ( url_stream_index + 1 ) >= url_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: url stream is too small.", function ); return( -1 ); } byte_value = 0; if( ( url_stream[ url_stream_index ] >= (uint8_t) 'A' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'F' ) ) { byte_value = url_stream[ url_stream_index ] - (uint8_t) 'A'; } else if( ( url_stream[ url_stream_index ] >= (uint8_t) 'a' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'f' ) ) { byte_value = url_stream[ url_stream_index ] - (uint8_t) 'a'; } else if( ( url_stream[ url_stream_index ] >= (uint8_t) '0' ) && ( url_stream[ url_stream_index ] <= (uint8_t) '9' ) ) { byte_value = url_stream[ url_stream_index ] - (uint8_t) '0'; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid URL encoded character.", function ); return( -1 ); } byte_value <<= 4; url_stream_index++; if( ( url_stream[ url_stream_index ] >= (uint8_t) 'A' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'F' ) ) { byte_value += url_stream[ url_stream_index ] - (uint8_t) 'A'; } else if( ( url_stream[ url_stream_index ] >= (uint8_t) 'a' ) && ( url_stream[ url_stream_index ] <= (uint8_t) 'f' ) ) { byte_value += url_stream[ url_stream_index ] - (uint8_t) 'a'; } else if( ( url_stream[ url_stream_index ] >= (uint8_t) '0' ) && ( url_stream[ url_stream_index ] <= (uint8_t) '9' ) ) { byte_value += url_stream[ url_stream_index ] - (uint8_t) '0'; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid URL encoded character.", function ); return( -1 ); } url_stream_index++; byte_stream[ byte_stream_index++ ] = byte_value; } else { byte_stream[ byte_stream_index++ ] = url_stream[ url_stream_index++ ]; } } return( 1 ); } libpff-20120802/libuna/libuna_support.c0000644000175000017500000000216612005152763014627 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_support.h" #if !defined( HAVE_LOCAL_LIBUNA ) /* Returns the library version as a string */ const char *libuna_get_version( void ) { return( (const char *) LIBUNA_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ libpff-20120802/libuna/libuna_codepage_iso_8859_5.c0000644000175000017500000000526412005152763016457 00000000000000/* * ISO 8859-5 codepage (Cyrillic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_5.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-5 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f }; /* Unicode to ASCII character lookup table for ISO 8859-5 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x1a, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0xfe, 0xff }; libpff-20120802/libuna/libuna_codepage_iso_8859_2.c0000644000175000017500000000703412005152764016452 00000000000000/* * ISO 8859-2 codepage (Central European) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_2.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-2 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x02d8, 0x0141, 0x00a4, 0x013d, 0x015a, 0x00a7, 0x00a8, 0x0160, 0x015e, 0x0164, 0x0179, 0x00ad, 0x017d, 0x017b, 0x00b0, 0x0105, 0x02db, 0x0142, 0x00b4, 0x013e, 0x015b, 0x02c7, 0x00b8, 0x0161, 0x015f, 0x0165, 0x017a, 0x02dd, 0x017e, 0x017c, 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 }; /* Unicode to ASCII character lookup table for ISO 8859-2 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ 128 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0x1a, 0xa7, 0xa8, 0x1a, 0x1a, 0x1a, 0x1a, 0xad, 0x1a, 0x1a, 0xb0, 0x1a, 0x1a, 0x1a, 0xb4, 0x1a, 0x1a, 0x1a, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0x1a, 0xc7, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0x1a, 0x1a, 0xda, 0x1a, 0xdc, 0xdd, 0x1a, 0xdf, 0x1a, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0x1a, 0xe7, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0x1a, 0x1a, 0xfa, 0x1a, 0xfc, 0xfd, 0x1a, 0x1a, 0x1a, 0x1a, 0xc3, 0xe3, 0xa1, 0xb1, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0xcf, 0xef, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ 72 ] = { 0x1a, 0xc5, 0xe5, 0x1a, 0x1a, 0xa5, 0xb5, 0x1a, 0x1a, 0xa3, 0xb3, 0xd1, 0xf1, 0x1a, 0x1a, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd5, 0xf5, 0x1a, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xd8, 0xf8, 0xa6, 0xb6, 0x1a, 0x1a, 0xaa, 0xba, 0xa9, 0xb9, 0xde, 0xfe, 0xab, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0xbc, 0xaf, 0xbf, 0xae, 0xbe, 0x1a }; const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ 8 ] = { 0xa2, 0xff, 0x1a, 0xb2, 0x1a, 0xbd, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_codepage_windows_1253.c0000644000175000017500000000656012005152764017111 00000000000000/* * Windows 1253 codepage (Greek) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1253.h" /* Extended ASCII to Unicode character lookup table for Windows 1253 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0xfffd, 0x2030, 0xfffd, 0x2039, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0xfffd, 0x203a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x00a0, 0x0385, 0x0386, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0xfffd, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x2015, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x00b5, 0x00b6, 0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0xfffd, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 1253 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0x1a, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0xbd, 0x1a, 0x1a, }; const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ 80 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xb4, 0xa1, 0xa2, 0x1a, 0xb8, 0xb9, 0xba, 0x1a, 0xbc, 0x1a, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x1a, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a, }; const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0xaf, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_codepage_koi8_u.h0000644000175000017500000000243412005152764016144 00000000000000/* * KOI8-U codepage (Ukrainian Cyrillic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_KOI8_U_H ) #define _LIBUNA_CODEPAGE_KOI8_U_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ 64 ]; extern const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ 32 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1252.c0000644000175000017500000000342012005152764017100 00000000000000/* * Windows 1252 codepage (Western European/Latin 1) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1252.h" /* Extended ASCII to Unicode character lookup table for Windows 1252 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ 32 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfffd, 0x017d, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0x017e, 0x0178 }; /* Unicode to ASCII character lookup table for Windows 1252 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_utf32_stream.c0000644000175000017500000004507712005152764015442 00000000000000/* * UTF-32 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf32_stream.h" /* Copies an UTF-32 stream byte order mark (BOM) * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_utf32_stream_copy_byte_order_mark( uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_byte_order_mark"; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream index.", function ); return( -1 ); } if( ( *utf32_stream_index + 3 ) >= utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf32_stream[ *utf32_stream_index ] = 0x00; utf32_stream[ *utf32_stream_index + 1 ] = 0x00; utf32_stream[ *utf32_stream_index + 2 ] = 0xfe; utf32_stream[ *utf32_stream_index + 3 ] = 0xff; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf32_stream[ *utf32_stream_index ] = 0xff; utf32_stream[ *utf32_stream_index + 1 ] = 0xfe; utf32_stream[ *utf32_stream_index + 2 ] = 0x00; utf32_stream[ *utf32_stream_index + 3 ] = 0x00; } *utf32_stream_index += 4; return( 1 ); } /* Determines the size of an UTF-32 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf32_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf32_stream_size = 1; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf32_stream_size *= 4; return( 1 ); } /* Copies an UTF-32 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_copy_from_utf8( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_from_utf8"; size_t utf8_string_index = 0; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf32_stream_copy_byte_order_mark( utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-32 byte order mark.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 stream bytes */ if( libuna_unicode_character_copy_to_utf32_stream( unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf32_stream_size = 1; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf32_stream_size *= 4; return( 1 ); } /* Copies an UTF-32 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_copy_from_utf16( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_from_utf16"; size_t utf16_string_index = 0; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf32_stream_copy_byte_order_mark( utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-32 byte order mark.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 stream bytes */ if( libuna_unicode_character_copy_to_utf32_stream( unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_size_from_utf32"; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream size.", function ); return( -1 ); } /* Add the byte order mark * Assumes the UTF-32 string is santized */ *utf32_stream_size = 1 + utf32_string_size; /* Convert the number of characters into bytes */ *utf32_stream_size *= 4; return( 1 ); } /* Copies an UTF-32 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf32_stream_copy_from_utf32( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_stream_copy_from_utf32"; size_t utf32_string_index = 0; size_t utf32_stream_index = 0; libuna_utf32_character_t utf32_character = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf32_stream_copy_byte_order_mark( utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-32 byte order mark.", function ); return( -1 ); } /* Assumes the UTF-32 string is santized */ while( utf32_string_index < utf32_string_size ) { if( ( utf32_stream_index + 4 ) >= utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } utf32_character = utf32_string[ utf32_string_index++ ]; if( byte_order == LIBUNA_ENDIAN_BIG ) { utf32_stream[ utf32_stream_index + 2 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 3 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 1 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index ] = (uint8_t) ( utf32_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf32_stream[ utf32_stream_index ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 1 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 2 ] = (uint8_t) ( utf32_character & 0xff ); utf32_character >>= 8; utf32_stream[ utf32_stream_index + 3 ] = (uint8_t) ( utf32_character & 0xff ); } utf32_stream_index += 4; } return( 1 ); } libpff-20120802/libuna/libuna_codepage_windows_1257.h0000644000175000017500000000246512005152764017122 00000000000000/* * Windows 1257 codepage (Baltic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1257_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1257_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ 224 ]; extern const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf32_string.c0000644000175000017500000021413712005152764015450 00000000000000/* * UTF-32 string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf32_string.h" /* Determines the size of an UTF-32 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if the byte stream is terminated with a zero byte */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { *utf32_string_size += 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Determine how many UTF-32 character byte double words are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_byte_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_byte_stream( utf32_string, utf32_string_size, &utf32_string_index, byte_stream, byte_stream_size, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character byte double words */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with a byte stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_byte_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_byte_stream"; size_t byte_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t byte_stream_unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] == 0 ) { byte_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( byte_stream_index < byte_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &byte_stream_unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } if( utf32_unicode_character != byte_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( byte_stream_index != byte_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if the UTF-7 stream is terminated with a zero byte */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { *utf32_string_size += 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf7_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf7_stream( utf32_string, utf32_string_size, &utf32_string_index, utf7_stream, utf7_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-7 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; uint8_t zero_byte = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-7 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf7_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf7_stream"; size_t utf32_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf7_stream_unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] == 0 ) { utf7_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( utf7_stream_index < utf7_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-7 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &utf7_stream_unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf7_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf7_stream_index != utf7_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf8"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf8( utf32_string, utf32_string_size, &utf32_string_index, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with a zero byte */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { *utf32_string_size += 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf8_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf8_stream( utf32_string, utf32_string_size, &utf32_string_index, utf8_stream, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-8 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-8 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf8_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf8_stream"; size_t utf32_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf8_stream_unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] == 0 ) { utf8_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( utf8_stream_index < utf8_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_stream_unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf8_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf8_stream_index != utf8_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf16"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf16( utf32_string, utf32_string_size, &utf32_string_index, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { *utf32_string_size += 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf16_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf16_stream( utf32_string, utf32_string_size, &utf32_string_index, utf16_stream, utf16_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-16 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf16_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf16_stream"; size_t utf16_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] == 0 ) && ( utf16_stream[ utf16_stream_size - 1 ] == 0 ) ) { utf16_stream_size -= 2; } while( ( utf32_string_index < utf32_string_size ) && ( utf16_stream_index < utf16_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &utf16_stream_unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf16_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf16_stream_index != utf16_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-32 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_size_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 0; /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { *utf32_string_size += 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Determine how many UTF-32 character bytes are required */ if( libuna_unicode_character_size_to_utf32( unicode_character, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-32.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_copy_from_utf32_stream"; size_t utf32_string_index = 0; if( libuna_utf32_string_with_index_copy_from_utf32_stream( utf32_string, utf32_string_size, &utf32_string_index, utf32_stream, utf32_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf32_string_with_index_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_with_index_copy_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-32 character bytes */ if( libuna_unicode_character_copy_to_utf32( unicode_character, utf32_string, utf32_string_size, utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-32.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } return( 1 ); } /* Compares an UTF-32 string with an UTF-32 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf32_string_compare_with_utf32_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf32_string_compare_with_utf32_stream"; size_t utf32_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf32_unicode_character = 0; libuna_unicode_character_t utf32_stream_unicode_character = 0; int read_byte_order = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 3 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 2 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 1 ] == 0 ) ) { utf32_stream_size -= 1; } while( ( utf32_string_index < utf32_string_size ) && ( utf32_stream_index < utf32_stream_size ) ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &utf32_stream_unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } if( utf32_unicode_character != utf32_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf32_string_index != utf32_string_size ) || ( utf32_stream_index != utf32_stream_size ) ) { return( 0 ); } return( 1 ); } libpff-20120802/libuna/libuna_codepage_windows_874.c0000644000175000017500000000610612005152764017035 00000000000000/* * Windows 874 codepage (Thai) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_874.h" /* Extended ASCII to Unicode character lookup table for Windows 874 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2026, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x00a0, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07, 0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f, 0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17, 0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f, 0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27, 0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f, 0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37, 0x0e38, 0x0e39, 0x0e3a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0e3f, 0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47, 0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f, 0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57, 0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 874 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ 96 ] = { 0x1a, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ 8 ] = { 0x91, 0x92, 0x1a, 0x1a, 0x93, 0x94, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_codepage_windows_1251.h0000644000175000017500000000262212005152764017107 00000000000000/* * Windows 1251 codepage (Cyrillic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1251_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1251_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ 96 ]; extern const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_libcerror.h0000644000175000017500000000251712005152764015104 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_LIBCERROR_H ) #define _LIBUNA_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libuna/libuna_codepage_windows_949.c0000644000175000017500000166264712005152764017063 00000000000000/* * Windows 949 codepage (Korean) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_949.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 949 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ 192 ] = { 0xfffd, 0xac02, 0xac03, 0xac05, 0xac06, 0xac0b, 0xac0c, 0xac0d, 0xac0e, 0xac0f, 0xac18, 0xac1e, 0xac1f, 0xac21, 0xac22, 0xac23, 0xac25, 0xac26, 0xac27, 0xac28, 0xac29, 0xac2a, 0xac2b, 0xac2e, 0xac32, 0xac33, 0xac34, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xac35, 0xac36, 0xac37, 0xac3a, 0xac3b, 0xac3d, 0xac3e, 0xac3f, 0xac41, 0xac42, 0xac43, 0xac44, 0xac45, 0xac46, 0xac47, 0xac48, 0xac49, 0xac4a, 0xac4c, 0xac4e, 0xac4f, 0xac50, 0xac51, 0xac52, 0xac53, 0xac55, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xac56, 0xac57, 0xac59, 0xac5a, 0xac5b, 0xac5d, 0xac5e, 0xac5f, 0xac60, 0xac61, 0xac62, 0xac63, 0xac64, 0xac65, 0xac66, 0xac67, 0xac68, 0xac69, 0xac6a, 0xac6b, 0xac6c, 0xac6d, 0xac6e, 0xac6f, 0xac72, 0xac73, 0xac75, 0xac76, 0xac79, 0xac7b, 0xac7c, 0xac7d, 0xac7e, 0xac7f, 0xac82, 0xac87, 0xac88, 0xac8d, 0xac8e, 0xac8f, 0xac91, 0xac92, 0xac93, 0xac95, 0xac96, 0xac97, 0xac98, 0xac99, 0xac9a, 0xac9b, 0xac9e, 0xaca2, 0xaca3, 0xaca4, 0xaca5, 0xaca6, 0xaca7, 0xacab, 0xacad, 0xacae, 0xacb1, 0xacb2, 0xacb3, 0xacb4, 0xacb5, 0xacb6, 0xacb7, 0xacba, 0xacbe, 0xacbf, 0xacc0, 0xacc2, 0xacc3, 0xacc5, 0xacc6, 0xacc7, 0xacc9, 0xacca, 0xaccb, 0xaccd, 0xacce, 0xaccf, 0xacd0, 0xacd1, 0xacd2, 0xacd3, 0xacd4, 0xacd6, 0xacd8, 0xacd9, 0xacda, 0xacdb, 0xacdc, 0xacdd, 0xacde, 0xacdf, 0xace2, 0xace3, 0xace5, 0xace6, 0xace9, 0xaceb, 0xaced, 0xacee, 0xacf2, 0xacf4, 0xacf7, 0xacf8, 0xacf9, 0xacfa, 0xacfb, 0xacfe, 0xacff, 0xad01, 0xad02, 0xad03, 0xad05, 0xad07, 0xad08, 0xad09, 0xad0a, 0xad0b, 0xad0e, 0xad10, 0xad12, 0xad13, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ 192 ] = { 0xfffd, 0xad14, 0xad15, 0xad16, 0xad17, 0xad19, 0xad1a, 0xad1b, 0xad1d, 0xad1e, 0xad1f, 0xad21, 0xad22, 0xad23, 0xad24, 0xad25, 0xad26, 0xad27, 0xad28, 0xad2a, 0xad2b, 0xad2e, 0xad2f, 0xad30, 0xad31, 0xad32, 0xad33, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xad36, 0xad37, 0xad39, 0xad3a, 0xad3b, 0xad3d, 0xad3e, 0xad3f, 0xad40, 0xad41, 0xad42, 0xad43, 0xad46, 0xad48, 0xad4a, 0xad4b, 0xad4c, 0xad4d, 0xad4e, 0xad4f, 0xad51, 0xad52, 0xad53, 0xad55, 0xad56, 0xad57, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xad59, 0xad5a, 0xad5b, 0xad5c, 0xad5d, 0xad5e, 0xad5f, 0xad60, 0xad62, 0xad64, 0xad65, 0xad66, 0xad67, 0xad68, 0xad69, 0xad6a, 0xad6b, 0xad6e, 0xad6f, 0xad71, 0xad72, 0xad77, 0xad78, 0xad79, 0xad7a, 0xad7e, 0xad80, 0xad83, 0xad84, 0xad85, 0xad86, 0xad87, 0xad8a, 0xad8b, 0xad8d, 0xad8e, 0xad8f, 0xad91, 0xad92, 0xad93, 0xad94, 0xad95, 0xad96, 0xad97, 0xad98, 0xad99, 0xad9a, 0xad9b, 0xad9e, 0xad9f, 0xada0, 0xada1, 0xada2, 0xada3, 0xada5, 0xada6, 0xada7, 0xada8, 0xada9, 0xadaa, 0xadab, 0xadac, 0xadad, 0xadae, 0xadaf, 0xadb0, 0xadb1, 0xadb2, 0xadb3, 0xadb4, 0xadb5, 0xadb6, 0xadb8, 0xadb9, 0xadba, 0xadbb, 0xadbc, 0xadbd, 0xadbe, 0xadbf, 0xadc2, 0xadc3, 0xadc5, 0xadc6, 0xadc7, 0xadc9, 0xadca, 0xadcb, 0xadcc, 0xadcd, 0xadce, 0xadcf, 0xadd2, 0xadd4, 0xadd5, 0xadd6, 0xadd7, 0xadd8, 0xadd9, 0xadda, 0xaddb, 0xaddd, 0xadde, 0xaddf, 0xade1, 0xade2, 0xade3, 0xade5, 0xade6, 0xade7, 0xade8, 0xade9, 0xadea, 0xadeb, 0xadec, 0xaded, 0xadee, 0xadef, 0xadf0, 0xadf1, 0xadf2, 0xadf3, 0xadf4, 0xadf5, 0xadf6, 0xadf7, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ 192 ] = { 0xfffd, 0xadfa, 0xadfb, 0xadfd, 0xadfe, 0xae02, 0xae03, 0xae04, 0xae05, 0xae06, 0xae07, 0xae0a, 0xae0c, 0xae0e, 0xae0f, 0xae10, 0xae11, 0xae12, 0xae13, 0xae15, 0xae16, 0xae17, 0xae18, 0xae19, 0xae1a, 0xae1b, 0xae1c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xae1d, 0xae1e, 0xae1f, 0xae20, 0xae21, 0xae22, 0xae23, 0xae24, 0xae25, 0xae26, 0xae27, 0xae28, 0xae29, 0xae2a, 0xae2b, 0xae2c, 0xae2d, 0xae2e, 0xae2f, 0xae32, 0xae33, 0xae35, 0xae36, 0xae39, 0xae3b, 0xae3c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xae3d, 0xae3e, 0xae3f, 0xae42, 0xae44, 0xae47, 0xae48, 0xae49, 0xae4b, 0xae4f, 0xae51, 0xae52, 0xae53, 0xae55, 0xae57, 0xae58, 0xae59, 0xae5a, 0xae5b, 0xae5e, 0xae62, 0xae63, 0xae64, 0xae66, 0xae67, 0xae6a, 0xae6b, 0xae6d, 0xae6e, 0xae6f, 0xae71, 0xae72, 0xae73, 0xae74, 0xae75, 0xae76, 0xae77, 0xae7a, 0xae7e, 0xae7f, 0xae80, 0xae81, 0xae82, 0xae83, 0xae86, 0xae87, 0xae88, 0xae89, 0xae8a, 0xae8b, 0xae8d, 0xae8e, 0xae8f, 0xae90, 0xae91, 0xae92, 0xae93, 0xae94, 0xae95, 0xae96, 0xae97, 0xae98, 0xae99, 0xae9a, 0xae9b, 0xae9c, 0xae9d, 0xae9e, 0xae9f, 0xaea0, 0xaea1, 0xaea2, 0xaea3, 0xaea4, 0xaea5, 0xaea6, 0xaea7, 0xaea8, 0xaea9, 0xaeaa, 0xaeab, 0xaeac, 0xaead, 0xaeae, 0xaeaf, 0xaeb0, 0xaeb1, 0xaeb2, 0xaeb3, 0xaeb4, 0xaeb5, 0xaeb6, 0xaeb7, 0xaeb8, 0xaeb9, 0xaeba, 0xaebb, 0xaebf, 0xaec1, 0xaec2, 0xaec3, 0xaec5, 0xaec6, 0xaec7, 0xaec8, 0xaec9, 0xaeca, 0xaecb, 0xaece, 0xaed2, 0xaed3, 0xaed4, 0xaed5, 0xaed6, 0xaed7, 0xaeda, 0xaedb, 0xaedd, 0xaede, 0xaedf, 0xaee0, 0xaee1, 0xaee2, 0xaee3, 0xaee4, 0xaee5, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ 192 ] = { 0xfffd, 0xaee6, 0xaee7, 0xaee9, 0xaeea, 0xaeec, 0xaeee, 0xaeef, 0xaef0, 0xaef1, 0xaef2, 0xaef3, 0xaef5, 0xaef6, 0xaef7, 0xaef9, 0xaefa, 0xaefb, 0xaefd, 0xaefe, 0xaeff, 0xaf00, 0xaf01, 0xaf02, 0xaf03, 0xaf04, 0xaf05, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xaf06, 0xaf09, 0xaf0a, 0xaf0b, 0xaf0c, 0xaf0e, 0xaf0f, 0xaf11, 0xaf12, 0xaf13, 0xaf14, 0xaf15, 0xaf16, 0xaf17, 0xaf18, 0xaf19, 0xaf1a, 0xaf1b, 0xaf1c, 0xaf1d, 0xaf1e, 0xaf1f, 0xaf20, 0xaf21, 0xaf22, 0xaf23, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xaf24, 0xaf25, 0xaf26, 0xaf27, 0xaf28, 0xaf29, 0xaf2a, 0xaf2b, 0xaf2e, 0xaf2f, 0xaf31, 0xaf33, 0xaf35, 0xaf36, 0xaf37, 0xaf38, 0xaf39, 0xaf3a, 0xaf3b, 0xaf3e, 0xaf40, 0xaf44, 0xaf45, 0xaf46, 0xaf47, 0xaf4a, 0xaf4b, 0xaf4c, 0xaf4d, 0xaf4e, 0xaf4f, 0xaf51, 0xaf52, 0xaf53, 0xaf54, 0xaf55, 0xaf56, 0xaf57, 0xaf58, 0xaf59, 0xaf5a, 0xaf5b, 0xaf5e, 0xaf5f, 0xaf60, 0xaf61, 0xaf62, 0xaf63, 0xaf66, 0xaf67, 0xaf68, 0xaf69, 0xaf6a, 0xaf6b, 0xaf6c, 0xaf6d, 0xaf6e, 0xaf6f, 0xaf70, 0xaf71, 0xaf72, 0xaf73, 0xaf74, 0xaf75, 0xaf76, 0xaf77, 0xaf78, 0xaf7a, 0xaf7b, 0xaf7c, 0xaf7d, 0xaf7e, 0xaf7f, 0xaf81, 0xaf82, 0xaf83, 0xaf85, 0xaf86, 0xaf87, 0xaf89, 0xaf8a, 0xaf8b, 0xaf8c, 0xaf8d, 0xaf8e, 0xaf8f, 0xaf92, 0xaf93, 0xaf94, 0xaf96, 0xaf97, 0xaf98, 0xaf99, 0xaf9a, 0xaf9b, 0xaf9d, 0xaf9e, 0xaf9f, 0xafa0, 0xafa1, 0xafa2, 0xafa3, 0xafa4, 0xafa5, 0xafa6, 0xafa7, 0xafa8, 0xafa9, 0xafaa, 0xafab, 0xafac, 0xafad, 0xafae, 0xafaf, 0xafb0, 0xafb1, 0xafb2, 0xafb3, 0xafb4, 0xafb5, 0xafb6, 0xafb7, 0xafba, 0xafbb, 0xafbd, 0xafbe, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ 192 ] = { 0xfffd, 0xafbf, 0xafc1, 0xafc2, 0xafc3, 0xafc4, 0xafc5, 0xafc6, 0xafca, 0xafcc, 0xafcf, 0xafd0, 0xafd1, 0xafd2, 0xafd3, 0xafd5, 0xafd6, 0xafd7, 0xafd8, 0xafd9, 0xafda, 0xafdb, 0xafdd, 0xafde, 0xafdf, 0xafe0, 0xafe1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xafe2, 0xafe3, 0xafe4, 0xafe5, 0xafe6, 0xafe7, 0xafea, 0xafeb, 0xafec, 0xafed, 0xafee, 0xafef, 0xaff2, 0xaff3, 0xaff5, 0xaff6, 0xaff7, 0xaff9, 0xaffa, 0xaffb, 0xaffc, 0xaffd, 0xaffe, 0xafff, 0xb002, 0xb003, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb005, 0xb006, 0xb007, 0xb008, 0xb009, 0xb00a, 0xb00b, 0xb00d, 0xb00e, 0xb00f, 0xb011, 0xb012, 0xb013, 0xb015, 0xb016, 0xb017, 0xb018, 0xb019, 0xb01a, 0xb01b, 0xb01e, 0xb01f, 0xb020, 0xb021, 0xb022, 0xb023, 0xb024, 0xb025, 0xb026, 0xb027, 0xb029, 0xb02a, 0xb02b, 0xb02c, 0xb02d, 0xb02e, 0xb02f, 0xb030, 0xb031, 0xb032, 0xb033, 0xb034, 0xb035, 0xb036, 0xb037, 0xb038, 0xb039, 0xb03a, 0xb03b, 0xb03c, 0xb03d, 0xb03e, 0xb03f, 0xb040, 0xb041, 0xb042, 0xb043, 0xb046, 0xb047, 0xb049, 0xb04b, 0xb04d, 0xb04f, 0xb050, 0xb051, 0xb052, 0xb056, 0xb058, 0xb05a, 0xb05b, 0xb05c, 0xb05e, 0xb05f, 0xb060, 0xb061, 0xb062, 0xb063, 0xb064, 0xb065, 0xb066, 0xb067, 0xb068, 0xb069, 0xb06a, 0xb06b, 0xb06c, 0xb06d, 0xb06e, 0xb06f, 0xb070, 0xb071, 0xb072, 0xb073, 0xb074, 0xb075, 0xb076, 0xb077, 0xb078, 0xb079, 0xb07a, 0xb07b, 0xb07e, 0xb07f, 0xb081, 0xb082, 0xb083, 0xb085, 0xb086, 0xb087, 0xb088, 0xb089, 0xb08a, 0xb08b, 0xb08e, 0xb090, 0xb092, 0xb093, 0xb094, 0xb095, 0xb096, 0xb097, 0xb09b, 0xb09d, 0xb09e, 0xb0a3, 0xb0a4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ 192 ] = { 0xfffd, 0xb0a5, 0xb0a6, 0xb0a7, 0xb0aa, 0xb0b0, 0xb0b2, 0xb0b6, 0xb0b7, 0xb0b9, 0xb0ba, 0xb0bb, 0xb0bd, 0xb0be, 0xb0bf, 0xb0c0, 0xb0c1, 0xb0c2, 0xb0c3, 0xb0c6, 0xb0ca, 0xb0cb, 0xb0cc, 0xb0cd, 0xb0ce, 0xb0cf, 0xb0d2, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb0d3, 0xb0d5, 0xb0d6, 0xb0d7, 0xb0d9, 0xb0da, 0xb0db, 0xb0dc, 0xb0dd, 0xb0de, 0xb0df, 0xb0e1, 0xb0e2, 0xb0e3, 0xb0e4, 0xb0e6, 0xb0e7, 0xb0e8, 0xb0e9, 0xb0ea, 0xb0eb, 0xb0ec, 0xb0ed, 0xb0ee, 0xb0ef, 0xb0f0, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb0f1, 0xb0f2, 0xb0f3, 0xb0f4, 0xb0f5, 0xb0f6, 0xb0f7, 0xb0f8, 0xb0f9, 0xb0fa, 0xb0fb, 0xb0fc, 0xb0fd, 0xb0fe, 0xb0ff, 0xb100, 0xb101, 0xb102, 0xb103, 0xb104, 0xb105, 0xb106, 0xb107, 0xb10a, 0xb10d, 0xb10e, 0xb10f, 0xb111, 0xb114, 0xb115, 0xb116, 0xb117, 0xb11a, 0xb11e, 0xb11f, 0xb120, 0xb121, 0xb122, 0xb126, 0xb127, 0xb129, 0xb12a, 0xb12b, 0xb12d, 0xb12e, 0xb12f, 0xb130, 0xb131, 0xb132, 0xb133, 0xb136, 0xb13a, 0xb13b, 0xb13c, 0xb13d, 0xb13e, 0xb13f, 0xb142, 0xb143, 0xb145, 0xb146, 0xb147, 0xb149, 0xb14a, 0xb14b, 0xb14c, 0xb14d, 0xb14e, 0xb14f, 0xb152, 0xb153, 0xb156, 0xb157, 0xb159, 0xb15a, 0xb15b, 0xb15d, 0xb15e, 0xb15f, 0xb161, 0xb162, 0xb163, 0xb164, 0xb165, 0xb166, 0xb167, 0xb168, 0xb169, 0xb16a, 0xb16b, 0xb16c, 0xb16d, 0xb16e, 0xb16f, 0xb170, 0xb171, 0xb172, 0xb173, 0xb174, 0xb175, 0xb176, 0xb177, 0xb17a, 0xb17b, 0xb17d, 0xb17e, 0xb17f, 0xb181, 0xb183, 0xb184, 0xb185, 0xb186, 0xb187, 0xb18a, 0xb18c, 0xb18e, 0xb18f, 0xb190, 0xb191, 0xb195, 0xb196, 0xb197, 0xb199, 0xb19a, 0xb19b, 0xb19d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ 192 ] = { 0xfffd, 0xb19e, 0xb19f, 0xb1a0, 0xb1a1, 0xb1a2, 0xb1a3, 0xb1a4, 0xb1a5, 0xb1a6, 0xb1a7, 0xb1a9, 0xb1aa, 0xb1ab, 0xb1ac, 0xb1ad, 0xb1ae, 0xb1af, 0xb1b0, 0xb1b1, 0xb1b2, 0xb1b3, 0xb1b4, 0xb1b5, 0xb1b6, 0xb1b7, 0xb1b8, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb1b9, 0xb1ba, 0xb1bb, 0xb1bc, 0xb1bd, 0xb1be, 0xb1bf, 0xb1c0, 0xb1c1, 0xb1c2, 0xb1c3, 0xb1c4, 0xb1c5, 0xb1c6, 0xb1c7, 0xb1c8, 0xb1c9, 0xb1ca, 0xb1cb, 0xb1cd, 0xb1ce, 0xb1cf, 0xb1d1, 0xb1d2, 0xb1d3, 0xb1d5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb1d6, 0xb1d7, 0xb1d8, 0xb1d9, 0xb1da, 0xb1db, 0xb1de, 0xb1e0, 0xb1e1, 0xb1e2, 0xb1e3, 0xb1e4, 0xb1e5, 0xb1e6, 0xb1e7, 0xb1ea, 0xb1eb, 0xb1ed, 0xb1ee, 0xb1ef, 0xb1f1, 0xb1f2, 0xb1f3, 0xb1f4, 0xb1f5, 0xb1f6, 0xb1f7, 0xb1f8, 0xb1fa, 0xb1fc, 0xb1fe, 0xb1ff, 0xb200, 0xb201, 0xb202, 0xb203, 0xb206, 0xb207, 0xb209, 0xb20a, 0xb20d, 0xb20e, 0xb20f, 0xb210, 0xb211, 0xb212, 0xb213, 0xb216, 0xb218, 0xb21a, 0xb21b, 0xb21c, 0xb21d, 0xb21e, 0xb21f, 0xb221, 0xb222, 0xb223, 0xb224, 0xb225, 0xb226, 0xb227, 0xb228, 0xb229, 0xb22a, 0xb22b, 0xb22c, 0xb22d, 0xb22e, 0xb22f, 0xb230, 0xb231, 0xb232, 0xb233, 0xb235, 0xb236, 0xb237, 0xb238, 0xb239, 0xb23a, 0xb23b, 0xb23d, 0xb23e, 0xb23f, 0xb240, 0xb241, 0xb242, 0xb243, 0xb244, 0xb245, 0xb246, 0xb247, 0xb248, 0xb249, 0xb24a, 0xb24b, 0xb24c, 0xb24d, 0xb24e, 0xb24f, 0xb250, 0xb251, 0xb252, 0xb253, 0xb254, 0xb255, 0xb256, 0xb257, 0xb259, 0xb25a, 0xb25b, 0xb25d, 0xb25e, 0xb25f, 0xb261, 0xb262, 0xb263, 0xb264, 0xb265, 0xb266, 0xb267, 0xb26a, 0xb26b, 0xb26c, 0xb26d, 0xb26e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ 192 ] = { 0xfffd, 0xb26f, 0xb270, 0xb271, 0xb272, 0xb273, 0xb276, 0xb277, 0xb278, 0xb279, 0xb27a, 0xb27b, 0xb27d, 0xb27e, 0xb27f, 0xb280, 0xb281, 0xb282, 0xb283, 0xb286, 0xb287, 0xb288, 0xb28a, 0xb28b, 0xb28c, 0xb28d, 0xb28e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb28f, 0xb292, 0xb293, 0xb295, 0xb296, 0xb297, 0xb29b, 0xb29c, 0xb29d, 0xb29e, 0xb29f, 0xb2a2, 0xb2a4, 0xb2a7, 0xb2a8, 0xb2a9, 0xb2ab, 0xb2ad, 0xb2ae, 0xb2af, 0xb2b1, 0xb2b2, 0xb2b3, 0xb2b5, 0xb2b6, 0xb2b7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb2b8, 0xb2b9, 0xb2ba, 0xb2bb, 0xb2bc, 0xb2bd, 0xb2be, 0xb2bf, 0xb2c0, 0xb2c1, 0xb2c2, 0xb2c3, 0xb2c4, 0xb2c5, 0xb2c6, 0xb2c7, 0xb2ca, 0xb2cb, 0xb2cd, 0xb2ce, 0xb2cf, 0xb2d1, 0xb2d3, 0xb2d4, 0xb2d5, 0xb2d6, 0xb2d7, 0xb2da, 0xb2dc, 0xb2de, 0xb2df, 0xb2e0, 0xb2e1, 0xb2e3, 0xb2e7, 0xb2e9, 0xb2ea, 0xb2f0, 0xb2f1, 0xb2f2, 0xb2f6, 0xb2fc, 0xb2fd, 0xb2fe, 0xb302, 0xb303, 0xb305, 0xb306, 0xb307, 0xb309, 0xb30a, 0xb30b, 0xb30c, 0xb30d, 0xb30e, 0xb30f, 0xb312, 0xb316, 0xb317, 0xb318, 0xb319, 0xb31a, 0xb31b, 0xb31d, 0xb31e, 0xb31f, 0xb320, 0xb321, 0xb322, 0xb323, 0xb324, 0xb325, 0xb326, 0xb327, 0xb328, 0xb329, 0xb32a, 0xb32b, 0xb32c, 0xb32d, 0xb32e, 0xb32f, 0xb330, 0xb331, 0xb332, 0xb333, 0xb334, 0xb335, 0xb336, 0xb337, 0xb338, 0xb339, 0xb33a, 0xb33b, 0xb33c, 0xb33d, 0xb33e, 0xb33f, 0xb340, 0xb341, 0xb342, 0xb343, 0xb344, 0xb345, 0xb346, 0xb347, 0xb348, 0xb349, 0xb34a, 0xb34b, 0xb34c, 0xb34d, 0xb34e, 0xb34f, 0xb350, 0xb351, 0xb352, 0xb353, 0xb357, 0xb359, 0xb35a, 0xb35d, 0xb360, 0xb361, 0xb362, 0xb363, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ 192 ] = { 0xfffd, 0xb366, 0xb368, 0xb36a, 0xb36c, 0xb36d, 0xb36f, 0xb372, 0xb373, 0xb375, 0xb376, 0xb377, 0xb379, 0xb37a, 0xb37b, 0xb37c, 0xb37d, 0xb37e, 0xb37f, 0xb382, 0xb386, 0xb387, 0xb388, 0xb389, 0xb38a, 0xb38b, 0xb38d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb38e, 0xb38f, 0xb391, 0xb392, 0xb393, 0xb395, 0xb396, 0xb397, 0xb398, 0xb399, 0xb39a, 0xb39b, 0xb39c, 0xb39d, 0xb39e, 0xb39f, 0xb3a2, 0xb3a3, 0xb3a4, 0xb3a5, 0xb3a6, 0xb3a7, 0xb3a9, 0xb3aa, 0xb3ab, 0xb3ad, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb3ae, 0xb3af, 0xb3b0, 0xb3b1, 0xb3b2, 0xb3b3, 0xb3b4, 0xb3b5, 0xb3b6, 0xb3b7, 0xb3b8, 0xb3b9, 0xb3ba, 0xb3bb, 0xb3bc, 0xb3bd, 0xb3be, 0xb3bf, 0xb3c0, 0xb3c1, 0xb3c2, 0xb3c3, 0xb3c6, 0xb3c7, 0xb3c9, 0xb3ca, 0xb3cd, 0xb3cf, 0xb3d1, 0xb3d2, 0xb3d3, 0xb3d6, 0xb3d8, 0xb3da, 0xb3dc, 0xb3de, 0xb3df, 0xb3e1, 0xb3e2, 0xb3e3, 0xb3e5, 0xb3e6, 0xb3e7, 0xb3e9, 0xb3ea, 0xb3eb, 0xb3ec, 0xb3ed, 0xb3ee, 0xb3ef, 0xb3f0, 0xb3f1, 0xb3f2, 0xb3f3, 0xb3f4, 0xb3f5, 0xb3f6, 0xb3f7, 0xb3f8, 0xb3f9, 0xb3fa, 0xb3fb, 0xb3fd, 0xb3fe, 0xb3ff, 0xb400, 0xb401, 0xb402, 0xb403, 0xb404, 0xb405, 0xb406, 0xb407, 0xb408, 0xb409, 0xb40a, 0xb40b, 0xb40c, 0xb40d, 0xb40e, 0xb40f, 0xb411, 0xb412, 0xb413, 0xb414, 0xb415, 0xb416, 0xb417, 0xb419, 0xb41a, 0xb41b, 0xb41d, 0xb41e, 0xb41f, 0xb421, 0xb422, 0xb423, 0xb424, 0xb425, 0xb426, 0xb427, 0xb42a, 0xb42c, 0xb42d, 0xb42e, 0xb42f, 0xb430, 0xb431, 0xb432, 0xb433, 0xb435, 0xb436, 0xb437, 0xb438, 0xb439, 0xb43a, 0xb43b, 0xb43c, 0xb43d, 0xb43e, 0xb43f, 0xb440, 0xb441, 0xb442, 0xb443, 0xb444, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ 192 ] = { 0xfffd, 0xb445, 0xb446, 0xb447, 0xb448, 0xb449, 0xb44a, 0xb44b, 0xb44c, 0xb44d, 0xb44e, 0xb44f, 0xb452, 0xb453, 0xb455, 0xb456, 0xb457, 0xb459, 0xb45a, 0xb45b, 0xb45c, 0xb45d, 0xb45e, 0xb45f, 0xb462, 0xb464, 0xb466, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb467, 0xb468, 0xb469, 0xb46a, 0xb46b, 0xb46d, 0xb46e, 0xb46f, 0xb470, 0xb471, 0xb472, 0xb473, 0xb474, 0xb475, 0xb476, 0xb477, 0xb478, 0xb479, 0xb47a, 0xb47b, 0xb47c, 0xb47d, 0xb47e, 0xb47f, 0xb481, 0xb482, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb483, 0xb484, 0xb485, 0xb486, 0xb487, 0xb489, 0xb48a, 0xb48b, 0xb48c, 0xb48d, 0xb48e, 0xb48f, 0xb490, 0xb491, 0xb492, 0xb493, 0xb494, 0xb495, 0xb496, 0xb497, 0xb498, 0xb499, 0xb49a, 0xb49b, 0xb49c, 0xb49e, 0xb49f, 0xb4a0, 0xb4a1, 0xb4a2, 0xb4a3, 0xb4a5, 0xb4a6, 0xb4a7, 0xb4a9, 0xb4aa, 0xb4ab, 0xb4ad, 0xb4ae, 0xb4af, 0xb4b0, 0xb4b1, 0xb4b2, 0xb4b3, 0xb4b4, 0xb4b6, 0xb4b8, 0xb4ba, 0xb4bb, 0xb4bc, 0xb4bd, 0xb4be, 0xb4bf, 0xb4c1, 0xb4c2, 0xb4c3, 0xb4c5, 0xb4c6, 0xb4c7, 0xb4c9, 0xb4ca, 0xb4cb, 0xb4cc, 0xb4cd, 0xb4ce, 0xb4cf, 0xb4d1, 0xb4d2, 0xb4d3, 0xb4d4, 0xb4d6, 0xb4d7, 0xb4d8, 0xb4d9, 0xb4da, 0xb4db, 0xb4de, 0xb4df, 0xb4e1, 0xb4e2, 0xb4e5, 0xb4e7, 0xb4e8, 0xb4e9, 0xb4ea, 0xb4eb, 0xb4ee, 0xb4f0, 0xb4f2, 0xb4f3, 0xb4f4, 0xb4f5, 0xb4f6, 0xb4f7, 0xb4f9, 0xb4fa, 0xb4fb, 0xb4fc, 0xb4fd, 0xb4fe, 0xb4ff, 0xb500, 0xb501, 0xb502, 0xb503, 0xb504, 0xb505, 0xb506, 0xb507, 0xb508, 0xb509, 0xb50a, 0xb50b, 0xb50c, 0xb50d, 0xb50e, 0xb50f, 0xb510, 0xb511, 0xb512, 0xb513, 0xb516, 0xb517, 0xb519, 0xb51a, 0xb51d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ 192 ] = { 0xfffd, 0xb51e, 0xb51f, 0xb520, 0xb521, 0xb522, 0xb523, 0xb526, 0xb52b, 0xb52c, 0xb52d, 0xb52e, 0xb52f, 0xb532, 0xb533, 0xb535, 0xb536, 0xb537, 0xb539, 0xb53a, 0xb53b, 0xb53c, 0xb53d, 0xb53e, 0xb53f, 0xb542, 0xb546, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb547, 0xb548, 0xb549, 0xb54a, 0xb54e, 0xb54f, 0xb551, 0xb552, 0xb553, 0xb555, 0xb556, 0xb557, 0xb558, 0xb559, 0xb55a, 0xb55b, 0xb55e, 0xb562, 0xb563, 0xb564, 0xb565, 0xb566, 0xb567, 0xb568, 0xb569, 0xb56a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb56b, 0xb56c, 0xb56d, 0xb56e, 0xb56f, 0xb570, 0xb571, 0xb572, 0xb573, 0xb574, 0xb575, 0xb576, 0xb577, 0xb578, 0xb579, 0xb57a, 0xb57b, 0xb57c, 0xb57d, 0xb57e, 0xb57f, 0xb580, 0xb581, 0xb582, 0xb583, 0xb584, 0xb585, 0xb586, 0xb587, 0xb588, 0xb589, 0xb58a, 0xb58b, 0xb58c, 0xb58d, 0xb58e, 0xb58f, 0xb590, 0xb591, 0xb592, 0xb593, 0xb594, 0xb595, 0xb596, 0xb597, 0xb598, 0xb599, 0xb59a, 0xb59b, 0xb59c, 0xb59d, 0xb59e, 0xb59f, 0xb5a2, 0xb5a3, 0xb5a5, 0xb5a6, 0xb5a7, 0xb5a9, 0xb5ac, 0xb5ad, 0xb5ae, 0xb5af, 0xb5b2, 0xb5b6, 0xb5b7, 0xb5b8, 0xb5b9, 0xb5ba, 0xb5be, 0xb5bf, 0xb5c1, 0xb5c2, 0xb5c3, 0xb5c5, 0xb5c6, 0xb5c7, 0xb5c8, 0xb5c9, 0xb5ca, 0xb5cb, 0xb5ce, 0xb5d2, 0xb5d3, 0xb5d4, 0xb5d5, 0xb5d6, 0xb5d7, 0xb5d9, 0xb5da, 0xb5db, 0xb5dc, 0xb5dd, 0xb5de, 0xb5df, 0xb5e0, 0xb5e1, 0xb5e2, 0xb5e3, 0xb5e4, 0xb5e5, 0xb5e6, 0xb5e7, 0xb5e8, 0xb5e9, 0xb5ea, 0xb5eb, 0xb5ed, 0xb5ee, 0xb5ef, 0xb5f0, 0xb5f1, 0xb5f2, 0xb5f3, 0xb5f4, 0xb5f5, 0xb5f6, 0xb5f7, 0xb5f8, 0xb5f9, 0xb5fa, 0xb5fb, 0xb5fc, 0xb5fd, 0xb5fe, 0xb5ff, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ 192 ] = { 0xfffd, 0xb600, 0xb601, 0xb602, 0xb603, 0xb604, 0xb605, 0xb606, 0xb607, 0xb608, 0xb609, 0xb60a, 0xb60b, 0xb60c, 0xb60d, 0xb60e, 0xb60f, 0xb612, 0xb613, 0xb615, 0xb616, 0xb617, 0xb619, 0xb61a, 0xb61b, 0xb61c, 0xb61d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb61e, 0xb61f, 0xb620, 0xb621, 0xb622, 0xb623, 0xb624, 0xb626, 0xb627, 0xb628, 0xb629, 0xb62a, 0xb62b, 0xb62d, 0xb62e, 0xb62f, 0xb630, 0xb631, 0xb632, 0xb633, 0xb635, 0xb636, 0xb637, 0xb638, 0xb639, 0xb63a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb63b, 0xb63c, 0xb63d, 0xb63e, 0xb63f, 0xb640, 0xb641, 0xb642, 0xb643, 0xb644, 0xb645, 0xb646, 0xb647, 0xb649, 0xb64a, 0xb64b, 0xb64c, 0xb64d, 0xb64e, 0xb64f, 0xb650, 0xb651, 0xb652, 0xb653, 0xb654, 0xb655, 0xb656, 0xb657, 0xb658, 0xb659, 0xb65a, 0xb65b, 0xb65c, 0xb65d, 0xb65e, 0xb65f, 0xb660, 0xb661, 0xb662, 0xb663, 0xb665, 0xb666, 0xb667, 0xb669, 0xb66a, 0xb66b, 0xb66c, 0xb66d, 0xb66e, 0xb66f, 0xb670, 0xb671, 0xb672, 0xb673, 0xb674, 0xb675, 0xb676, 0xb677, 0xb678, 0xb679, 0xb67a, 0xb67b, 0xb67c, 0xb67d, 0xb67e, 0xb67f, 0xb680, 0xb681, 0xb682, 0xb683, 0xb684, 0xb685, 0xb686, 0xb687, 0xb688, 0xb689, 0xb68a, 0xb68b, 0xb68c, 0xb68d, 0xb68e, 0xb68f, 0xb690, 0xb691, 0xb692, 0xb693, 0xb694, 0xb695, 0xb696, 0xb697, 0xb698, 0xb699, 0xb69a, 0xb69b, 0xb69e, 0xb69f, 0xb6a1, 0xb6a2, 0xb6a3, 0xb6a5, 0xb6a6, 0xb6a7, 0xb6a8, 0xb6a9, 0xb6aa, 0xb6ad, 0xb6ae, 0xb6af, 0xb6b0, 0xb6b2, 0xb6b3, 0xb6b4, 0xb6b5, 0xb6b6, 0xb6b7, 0xb6b8, 0xb6b9, 0xb6ba, 0xb6bb, 0xb6bc, 0xb6bd, 0xb6be, 0xb6bf, 0xb6c0, 0xb6c1, 0xb6c2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ 192 ] = { 0xfffd, 0xb6c3, 0xb6c4, 0xb6c5, 0xb6c6, 0xb6c7, 0xb6c8, 0xb6c9, 0xb6ca, 0xb6cb, 0xb6cc, 0xb6cd, 0xb6ce, 0xb6cf, 0xb6d0, 0xb6d1, 0xb6d2, 0xb6d3, 0xb6d5, 0xb6d6, 0xb6d7, 0xb6d8, 0xb6d9, 0xb6da, 0xb6db, 0xb6dc, 0xb6dd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb6de, 0xb6df, 0xb6e0, 0xb6e1, 0xb6e2, 0xb6e3, 0xb6e4, 0xb6e5, 0xb6e6, 0xb6e7, 0xb6e8, 0xb6e9, 0xb6ea, 0xb6eb, 0xb6ec, 0xb6ed, 0xb6ee, 0xb6ef, 0xb6f1, 0xb6f2, 0xb6f3, 0xb6f5, 0xb6f6, 0xb6f7, 0xb6f9, 0xb6fa, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb6fb, 0xb6fc, 0xb6fd, 0xb6fe, 0xb6ff, 0xb702, 0xb703, 0xb704, 0xb706, 0xb707, 0xb708, 0xb709, 0xb70a, 0xb70b, 0xb70c, 0xb70d, 0xb70e, 0xb70f, 0xb710, 0xb711, 0xb712, 0xb713, 0xb714, 0xb715, 0xb716, 0xb717, 0xb718, 0xb719, 0xb71a, 0xb71b, 0xb71c, 0xb71d, 0xb71e, 0xb71f, 0xb720, 0xb721, 0xb722, 0xb723, 0xb724, 0xb725, 0xb726, 0xb727, 0xb72a, 0xb72b, 0xb72d, 0xb72e, 0xb731, 0xb732, 0xb733, 0xb734, 0xb735, 0xb736, 0xb737, 0xb73a, 0xb73c, 0xb73d, 0xb73e, 0xb73f, 0xb740, 0xb741, 0xb742, 0xb743, 0xb745, 0xb746, 0xb747, 0xb749, 0xb74a, 0xb74b, 0xb74d, 0xb74e, 0xb74f, 0xb750, 0xb751, 0xb752, 0xb753, 0xb756, 0xb757, 0xb758, 0xb759, 0xb75a, 0xb75b, 0xb75c, 0xb75d, 0xb75e, 0xb75f, 0xb761, 0xb762, 0xb763, 0xb765, 0xb766, 0xb767, 0xb769, 0xb76a, 0xb76b, 0xb76c, 0xb76d, 0xb76e, 0xb76f, 0xb772, 0xb774, 0xb776, 0xb777, 0xb778, 0xb779, 0xb77a, 0xb77b, 0xb77e, 0xb77f, 0xb781, 0xb782, 0xb783, 0xb785, 0xb786, 0xb787, 0xb788, 0xb789, 0xb78a, 0xb78b, 0xb78e, 0xb793, 0xb794, 0xb795, 0xb79a, 0xb79b, 0xb79d, 0xb79e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ 192 ] = { 0xfffd, 0xb79f, 0xb7a1, 0xb7a2, 0xb7a3, 0xb7a4, 0xb7a5, 0xb7a6, 0xb7a7, 0xb7aa, 0xb7ae, 0xb7af, 0xb7b0, 0xb7b1, 0xb7b2, 0xb7b3, 0xb7b6, 0xb7b7, 0xb7b9, 0xb7ba, 0xb7bb, 0xb7bc, 0xb7bd, 0xb7be, 0xb7bf, 0xb7c0, 0xb7c1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb7c2, 0xb7c3, 0xb7c4, 0xb7c5, 0xb7c6, 0xb7c8, 0xb7ca, 0xb7cb, 0xb7cc, 0xb7cd, 0xb7ce, 0xb7cf, 0xb7d0, 0xb7d1, 0xb7d2, 0xb7d3, 0xb7d4, 0xb7d5, 0xb7d6, 0xb7d7, 0xb7d8, 0xb7d9, 0xb7da, 0xb7db, 0xb7dc, 0xb7dd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb7de, 0xb7df, 0xb7e0, 0xb7e1, 0xb7e2, 0xb7e3, 0xb7e4, 0xb7e5, 0xb7e6, 0xb7e7, 0xb7e8, 0xb7e9, 0xb7ea, 0xb7eb, 0xb7ee, 0xb7ef, 0xb7f1, 0xb7f2, 0xb7f3, 0xb7f5, 0xb7f6, 0xb7f7, 0xb7f8, 0xb7f9, 0xb7fa, 0xb7fb, 0xb7fe, 0xb802, 0xb803, 0xb804, 0xb805, 0xb806, 0xb80a, 0xb80b, 0xb80d, 0xb80e, 0xb80f, 0xb811, 0xb812, 0xb813, 0xb814, 0xb815, 0xb816, 0xb817, 0xb81a, 0xb81c, 0xb81e, 0xb81f, 0xb820, 0xb821, 0xb822, 0xb823, 0xb826, 0xb827, 0xb829, 0xb82a, 0xb82b, 0xb82d, 0xb82e, 0xb82f, 0xb830, 0xb831, 0xb832, 0xb833, 0xb836, 0xb83a, 0xb83b, 0xb83c, 0xb83d, 0xb83e, 0xb83f, 0xb841, 0xb842, 0xb843, 0xb845, 0xb846, 0xb847, 0xb848, 0xb849, 0xb84a, 0xb84b, 0xb84c, 0xb84d, 0xb84e, 0xb84f, 0xb850, 0xb852, 0xb854, 0xb855, 0xb856, 0xb857, 0xb858, 0xb859, 0xb85a, 0xb85b, 0xb85e, 0xb85f, 0xb861, 0xb862, 0xb863, 0xb865, 0xb866, 0xb867, 0xb868, 0xb869, 0xb86a, 0xb86b, 0xb86e, 0xb870, 0xb872, 0xb873, 0xb874, 0xb875, 0xb876, 0xb877, 0xb879, 0xb87a, 0xb87b, 0xb87d, 0xb87e, 0xb87f, 0xb880, 0xb881, 0xb882, 0xb883, 0xb884, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ 192 ] = { 0xfffd, 0xb885, 0xb886, 0xb887, 0xb888, 0xb889, 0xb88a, 0xb88b, 0xb88c, 0xb88e, 0xb88f, 0xb890, 0xb891, 0xb892, 0xb893, 0xb894, 0xb895, 0xb896, 0xb897, 0xb898, 0xb899, 0xb89a, 0xb89b, 0xb89c, 0xb89d, 0xb89e, 0xb89f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb8a0, 0xb8a1, 0xb8a2, 0xb8a3, 0xb8a4, 0xb8a5, 0xb8a6, 0xb8a7, 0xb8a9, 0xb8aa, 0xb8ab, 0xb8ac, 0xb8ad, 0xb8ae, 0xb8af, 0xb8b1, 0xb8b2, 0xb8b3, 0xb8b5, 0xb8b6, 0xb8b7, 0xb8b9, 0xb8ba, 0xb8bb, 0xb8bc, 0xb8bd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb8be, 0xb8bf, 0xb8c2, 0xb8c4, 0xb8c6, 0xb8c7, 0xb8c8, 0xb8c9, 0xb8ca, 0xb8cb, 0xb8cd, 0xb8ce, 0xb8cf, 0xb8d1, 0xb8d2, 0xb8d3, 0xb8d5, 0xb8d6, 0xb8d7, 0xb8d8, 0xb8d9, 0xb8da, 0xb8db, 0xb8dc, 0xb8de, 0xb8e0, 0xb8e2, 0xb8e3, 0xb8e4, 0xb8e5, 0xb8e6, 0xb8e7, 0xb8ea, 0xb8eb, 0xb8ed, 0xb8ee, 0xb8ef, 0xb8f1, 0xb8f2, 0xb8f3, 0xb8f4, 0xb8f5, 0xb8f6, 0xb8f7, 0xb8fa, 0xb8fc, 0xb8fe, 0xb8ff, 0xb900, 0xb901, 0xb902, 0xb903, 0xb905, 0xb906, 0xb907, 0xb908, 0xb909, 0xb90a, 0xb90b, 0xb90c, 0xb90d, 0xb90e, 0xb90f, 0xb910, 0xb911, 0xb912, 0xb913, 0xb914, 0xb915, 0xb916, 0xb917, 0xb919, 0xb91a, 0xb91b, 0xb91c, 0xb91d, 0xb91e, 0xb91f, 0xb921, 0xb922, 0xb923, 0xb924, 0xb925, 0xb926, 0xb927, 0xb928, 0xb929, 0xb92a, 0xb92b, 0xb92c, 0xb92d, 0xb92e, 0xb92f, 0xb930, 0xb931, 0xb932, 0xb933, 0xb934, 0xb935, 0xb936, 0xb937, 0xb938, 0xb939, 0xb93a, 0xb93b, 0xb93e, 0xb93f, 0xb941, 0xb942, 0xb943, 0xb945, 0xb946, 0xb947, 0xb948, 0xb949, 0xb94a, 0xb94b, 0xb94d, 0xb94e, 0xb950, 0xb952, 0xb953, 0xb954, 0xb955, 0xb956, 0xb957, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ 192 ] = { 0xfffd, 0xb95a, 0xb95b, 0xb95d, 0xb95e, 0xb95f, 0xb961, 0xb962, 0xb963, 0xb964, 0xb965, 0xb966, 0xb967, 0xb96a, 0xb96c, 0xb96e, 0xb96f, 0xb970, 0xb971, 0xb972, 0xb973, 0xb976, 0xb977, 0xb979, 0xb97a, 0xb97b, 0xb97d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb97e, 0xb97f, 0xb980, 0xb981, 0xb982, 0xb983, 0xb986, 0xb988, 0xb98b, 0xb98c, 0xb98f, 0xb990, 0xb991, 0xb992, 0xb993, 0xb994, 0xb995, 0xb996, 0xb997, 0xb998, 0xb999, 0xb99a, 0xb99b, 0xb99c, 0xb99d, 0xb99e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xb99f, 0xb9a0, 0xb9a1, 0xb9a2, 0xb9a3, 0xb9a4, 0xb9a5, 0xb9a6, 0xb9a7, 0xb9a8, 0xb9a9, 0xb9aa, 0xb9ab, 0xb9ae, 0xb9af, 0xb9b1, 0xb9b2, 0xb9b3, 0xb9b5, 0xb9b6, 0xb9b7, 0xb9b8, 0xb9b9, 0xb9ba, 0xb9bb, 0xb9be, 0xb9c0, 0xb9c2, 0xb9c3, 0xb9c4, 0xb9c5, 0xb9c6, 0xb9c7, 0xb9ca, 0xb9cb, 0xb9cd, 0xb9d3, 0xb9d4, 0xb9d5, 0xb9d6, 0xb9d7, 0xb9da, 0xb9dc, 0xb9df, 0xb9e0, 0xb9e2, 0xb9e6, 0xb9e7, 0xb9e9, 0xb9ea, 0xb9eb, 0xb9ed, 0xb9ee, 0xb9ef, 0xb9f0, 0xb9f1, 0xb9f2, 0xb9f3, 0xb9f6, 0xb9fb, 0xb9fc, 0xb9fd, 0xb9fe, 0xb9ff, 0xba02, 0xba03, 0xba04, 0xba05, 0xba06, 0xba07, 0xba09, 0xba0a, 0xba0b, 0xba0c, 0xba0d, 0xba0e, 0xba0f, 0xba10, 0xba11, 0xba12, 0xba13, 0xba14, 0xba16, 0xba17, 0xba18, 0xba19, 0xba1a, 0xba1b, 0xba1c, 0xba1d, 0xba1e, 0xba1f, 0xba20, 0xba21, 0xba22, 0xba23, 0xba24, 0xba25, 0xba26, 0xba27, 0xba28, 0xba29, 0xba2a, 0xba2b, 0xba2c, 0xba2d, 0xba2e, 0xba2f, 0xba30, 0xba31, 0xba32, 0xba33, 0xba34, 0xba35, 0xba36, 0xba37, 0xba3a, 0xba3b, 0xba3d, 0xba3e, 0xba3f, 0xba41, 0xba43, 0xba44, 0xba45, 0xba46, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ 192 ] = { 0xfffd, 0xba47, 0xba4a, 0xba4c, 0xba4f, 0xba50, 0xba51, 0xba52, 0xba56, 0xba57, 0xba59, 0xba5a, 0xba5b, 0xba5d, 0xba5e, 0xba5f, 0xba60, 0xba61, 0xba62, 0xba63, 0xba66, 0xba6a, 0xba6b, 0xba6c, 0xba6d, 0xba6e, 0xba6f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xba72, 0xba73, 0xba75, 0xba76, 0xba77, 0xba79, 0xba7a, 0xba7b, 0xba7c, 0xba7d, 0xba7e, 0xba7f, 0xba80, 0xba81, 0xba82, 0xba86, 0xba88, 0xba89, 0xba8a, 0xba8b, 0xba8d, 0xba8e, 0xba8f, 0xba90, 0xba91, 0xba92, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xba93, 0xba94, 0xba95, 0xba96, 0xba97, 0xba98, 0xba99, 0xba9a, 0xba9b, 0xba9c, 0xba9d, 0xba9e, 0xba9f, 0xbaa0, 0xbaa1, 0xbaa2, 0xbaa3, 0xbaa4, 0xbaa5, 0xbaa6, 0xbaa7, 0xbaaa, 0xbaad, 0xbaae, 0xbaaf, 0xbab1, 0xbab3, 0xbab4, 0xbab5, 0xbab6, 0xbab7, 0xbaba, 0xbabc, 0xbabe, 0xbabf, 0xbac0, 0xbac1, 0xbac2, 0xbac3, 0xbac5, 0xbac6, 0xbac7, 0xbac9, 0xbaca, 0xbacb, 0xbacc, 0xbacd, 0xbace, 0xbacf, 0xbad0, 0xbad1, 0xbad2, 0xbad3, 0xbad4, 0xbad5, 0xbad6, 0xbad7, 0xbada, 0xbadb, 0xbadc, 0xbadd, 0xbade, 0xbadf, 0xbae0, 0xbae1, 0xbae2, 0xbae3, 0xbae4, 0xbae5, 0xbae6, 0xbae7, 0xbae8, 0xbae9, 0xbaea, 0xbaeb, 0xbaec, 0xbaed, 0xbaee, 0xbaef, 0xbaf0, 0xbaf1, 0xbaf2, 0xbaf3, 0xbaf4, 0xbaf5, 0xbaf6, 0xbaf7, 0xbaf8, 0xbaf9, 0xbafa, 0xbafb, 0xbafd, 0xbafe, 0xbaff, 0xbb01, 0xbb02, 0xbb03, 0xbb05, 0xbb06, 0xbb07, 0xbb08, 0xbb09, 0xbb0a, 0xbb0b, 0xbb0c, 0xbb0e, 0xbb10, 0xbb12, 0xbb13, 0xbb14, 0xbb15, 0xbb16, 0xbb17, 0xbb19, 0xbb1a, 0xbb1b, 0xbb1d, 0xbb1e, 0xbb1f, 0xbb21, 0xbb22, 0xbb23, 0xbb24, 0xbb25, 0xbb26, 0xbb27, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ 192 ] = { 0xfffd, 0xbb28, 0xbb2a, 0xbb2c, 0xbb2d, 0xbb2e, 0xbb2f, 0xbb30, 0xbb31, 0xbb32, 0xbb33, 0xbb37, 0xbb39, 0xbb3a, 0xbb3f, 0xbb40, 0xbb41, 0xbb42, 0xbb43, 0xbb46, 0xbb48, 0xbb4a, 0xbb4b, 0xbb4c, 0xbb4e, 0xbb51, 0xbb52, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbb53, 0xbb55, 0xbb56, 0xbb57, 0xbb59, 0xbb5a, 0xbb5b, 0xbb5c, 0xbb5d, 0xbb5e, 0xbb5f, 0xbb60, 0xbb62, 0xbb64, 0xbb65, 0xbb66, 0xbb67, 0xbb68, 0xbb69, 0xbb6a, 0xbb6b, 0xbb6d, 0xbb6e, 0xbb6f, 0xbb70, 0xbb71, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbb72, 0xbb73, 0xbb74, 0xbb75, 0xbb76, 0xbb77, 0xbb78, 0xbb79, 0xbb7a, 0xbb7b, 0xbb7c, 0xbb7d, 0xbb7e, 0xbb7f, 0xbb80, 0xbb81, 0xbb82, 0xbb83, 0xbb84, 0xbb85, 0xbb86, 0xbb87, 0xbb89, 0xbb8a, 0xbb8b, 0xbb8d, 0xbb8e, 0xbb8f, 0xbb91, 0xbb92, 0xbb93, 0xbb94, 0xbb95, 0xbb96, 0xbb97, 0xbb98, 0xbb99, 0xbb9a, 0xbb9b, 0xbb9c, 0xbb9d, 0xbb9e, 0xbb9f, 0xbba0, 0xbba1, 0xbba2, 0xbba3, 0xbba5, 0xbba6, 0xbba7, 0xbba9, 0xbbaa, 0xbbab, 0xbbad, 0xbbae, 0xbbaf, 0xbbb0, 0xbbb1, 0xbbb2, 0xbbb3, 0xbbb5, 0xbbb6, 0xbbb8, 0xbbb9, 0xbbba, 0xbbbb, 0xbbbc, 0xbbbd, 0xbbbe, 0xbbbf, 0xbbc1, 0xbbc2, 0xbbc3, 0xbbc5, 0xbbc6, 0xbbc7, 0xbbc9, 0xbbca, 0xbbcb, 0xbbcc, 0xbbcd, 0xbbce, 0xbbcf, 0xbbd1, 0xbbd2, 0xbbd4, 0xbbd5, 0xbbd6, 0xbbd7, 0xbbd8, 0xbbd9, 0xbbda, 0xbbdb, 0xbbdc, 0xbbdd, 0xbbde, 0xbbdf, 0xbbe0, 0xbbe1, 0xbbe2, 0xbbe3, 0xbbe4, 0xbbe5, 0xbbe6, 0xbbe7, 0xbbe8, 0xbbe9, 0xbbea, 0xbbeb, 0xbbec, 0xbbed, 0xbbee, 0xbbef, 0xbbf0, 0xbbf1, 0xbbf2, 0xbbf3, 0xbbf4, 0xbbf5, 0xbbf6, 0xbbf7, 0xbbfa, 0xbbfb, 0xbbfd, 0xbbfe, 0xbc01, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ 192 ] = { 0xfffd, 0xbc03, 0xbc04, 0xbc05, 0xbc06, 0xbc07, 0xbc0a, 0xbc0e, 0xbc10, 0xbc12, 0xbc13, 0xbc19, 0xbc1a, 0xbc20, 0xbc21, 0xbc22, 0xbc23, 0xbc26, 0xbc28, 0xbc2a, 0xbc2b, 0xbc2c, 0xbc2e, 0xbc2f, 0xbc32, 0xbc33, 0xbc35, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbc36, 0xbc37, 0xbc39, 0xbc3a, 0xbc3b, 0xbc3c, 0xbc3d, 0xbc3e, 0xbc3f, 0xbc42, 0xbc46, 0xbc47, 0xbc48, 0xbc4a, 0xbc4b, 0xbc4e, 0xbc4f, 0xbc51, 0xbc52, 0xbc53, 0xbc54, 0xbc55, 0xbc56, 0xbc57, 0xbc58, 0xbc59, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbc5a, 0xbc5b, 0xbc5c, 0xbc5e, 0xbc5f, 0xbc60, 0xbc61, 0xbc62, 0xbc63, 0xbc64, 0xbc65, 0xbc66, 0xbc67, 0xbc68, 0xbc69, 0xbc6a, 0xbc6b, 0xbc6c, 0xbc6d, 0xbc6e, 0xbc6f, 0xbc70, 0xbc71, 0xbc72, 0xbc73, 0xbc74, 0xbc75, 0xbc76, 0xbc77, 0xbc78, 0xbc79, 0xbc7a, 0xbc7b, 0xbc7c, 0xbc7d, 0xbc7e, 0xbc7f, 0xbc80, 0xbc81, 0xbc82, 0xbc83, 0xbc86, 0xbc87, 0xbc89, 0xbc8a, 0xbc8d, 0xbc8f, 0xbc90, 0xbc91, 0xbc92, 0xbc93, 0xbc96, 0xbc98, 0xbc9b, 0xbc9c, 0xbc9d, 0xbc9e, 0xbc9f, 0xbca2, 0xbca3, 0xbca5, 0xbca6, 0xbca9, 0xbcaa, 0xbcab, 0xbcac, 0xbcad, 0xbcae, 0xbcaf, 0xbcb2, 0xbcb6, 0xbcb7, 0xbcb8, 0xbcb9, 0xbcba, 0xbcbb, 0xbcbe, 0xbcbf, 0xbcc1, 0xbcc2, 0xbcc3, 0xbcc5, 0xbcc6, 0xbcc7, 0xbcc8, 0xbcc9, 0xbcca, 0xbccb, 0xbccc, 0xbcce, 0xbcd2, 0xbcd3, 0xbcd4, 0xbcd6, 0xbcd7, 0xbcd9, 0xbcda, 0xbcdb, 0xbcdd, 0xbcde, 0xbcdf, 0xbce0, 0xbce1, 0xbce2, 0xbce3, 0xbce4, 0xbce5, 0xbce6, 0xbce7, 0xbce8, 0xbce9, 0xbcea, 0xbceb, 0xbcec, 0xbced, 0xbcee, 0xbcef, 0xbcf0, 0xbcf1, 0xbcf2, 0xbcf3, 0xbcf7, 0xbcf9, 0xbcfa, 0xbcfb, 0xbcfd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ 192 ] = { 0xfffd, 0xbcfe, 0xbcff, 0xbd00, 0xbd01, 0xbd02, 0xbd03, 0xbd06, 0xbd08, 0xbd0a, 0xbd0b, 0xbd0c, 0xbd0d, 0xbd0e, 0xbd0f, 0xbd11, 0xbd12, 0xbd13, 0xbd15, 0xbd16, 0xbd17, 0xbd18, 0xbd19, 0xbd1a, 0xbd1b, 0xbd1c, 0xbd1d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbd1e, 0xbd1f, 0xbd20, 0xbd21, 0xbd22, 0xbd23, 0xbd25, 0xbd26, 0xbd27, 0xbd28, 0xbd29, 0xbd2a, 0xbd2b, 0xbd2d, 0xbd2e, 0xbd2f, 0xbd30, 0xbd31, 0xbd32, 0xbd33, 0xbd34, 0xbd35, 0xbd36, 0xbd37, 0xbd38, 0xbd39, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbd3a, 0xbd3b, 0xbd3c, 0xbd3d, 0xbd3e, 0xbd3f, 0xbd41, 0xbd42, 0xbd43, 0xbd44, 0xbd45, 0xbd46, 0xbd47, 0xbd4a, 0xbd4b, 0xbd4d, 0xbd4e, 0xbd4f, 0xbd51, 0xbd52, 0xbd53, 0xbd54, 0xbd55, 0xbd56, 0xbd57, 0xbd5a, 0xbd5b, 0xbd5c, 0xbd5d, 0xbd5e, 0xbd5f, 0xbd60, 0xbd61, 0xbd62, 0xbd63, 0xbd65, 0xbd66, 0xbd67, 0xbd69, 0xbd6a, 0xbd6b, 0xbd6c, 0xbd6d, 0xbd6e, 0xbd6f, 0xbd70, 0xbd71, 0xbd72, 0xbd73, 0xbd74, 0xbd75, 0xbd76, 0xbd77, 0xbd78, 0xbd79, 0xbd7a, 0xbd7b, 0xbd7c, 0xbd7d, 0xbd7e, 0xbd7f, 0xbd82, 0xbd83, 0xbd85, 0xbd86, 0xbd8b, 0xbd8c, 0xbd8d, 0xbd8e, 0xbd8f, 0xbd92, 0xbd94, 0xbd96, 0xbd97, 0xbd98, 0xbd9b, 0xbd9d, 0xbd9e, 0xbd9f, 0xbda0, 0xbda1, 0xbda2, 0xbda3, 0xbda5, 0xbda6, 0xbda7, 0xbda8, 0xbda9, 0xbdaa, 0xbdab, 0xbdac, 0xbdad, 0xbdae, 0xbdaf, 0xbdb1, 0xbdb2, 0xbdb3, 0xbdb4, 0xbdb5, 0xbdb6, 0xbdb7, 0xbdb9, 0xbdba, 0xbdbb, 0xbdbc, 0xbdbd, 0xbdbe, 0xbdbf, 0xbdc0, 0xbdc1, 0xbdc2, 0xbdc3, 0xbdc4, 0xbdc5, 0xbdc6, 0xbdc7, 0xbdc8, 0xbdc9, 0xbdca, 0xbdcb, 0xbdcc, 0xbdcd, 0xbdce, 0xbdcf, 0xbdd0, 0xbdd1, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ 192 ] = { 0xfffd, 0xbdd2, 0xbdd3, 0xbdd6, 0xbdd7, 0xbdd9, 0xbdda, 0xbddb, 0xbddd, 0xbdde, 0xbddf, 0xbde0, 0xbde1, 0xbde2, 0xbde3, 0xbde4, 0xbde5, 0xbde6, 0xbde7, 0xbde8, 0xbdea, 0xbdeb, 0xbdec, 0xbded, 0xbdee, 0xbdef, 0xbdf1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbdf2, 0xbdf3, 0xbdf5, 0xbdf6, 0xbdf7, 0xbdf9, 0xbdfa, 0xbdfb, 0xbdfc, 0xbdfd, 0xbdfe, 0xbdff, 0xbe01, 0xbe02, 0xbe04, 0xbe06, 0xbe07, 0xbe08, 0xbe09, 0xbe0a, 0xbe0b, 0xbe0e, 0xbe0f, 0xbe11, 0xbe12, 0xbe13, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbe15, 0xbe16, 0xbe17, 0xbe18, 0xbe19, 0xbe1a, 0xbe1b, 0xbe1e, 0xbe20, 0xbe21, 0xbe22, 0xbe23, 0xbe24, 0xbe25, 0xbe26, 0xbe27, 0xbe28, 0xbe29, 0xbe2a, 0xbe2b, 0xbe2c, 0xbe2d, 0xbe2e, 0xbe2f, 0xbe30, 0xbe31, 0xbe32, 0xbe33, 0xbe34, 0xbe35, 0xbe36, 0xbe37, 0xbe38, 0xbe39, 0xbe3a, 0xbe3b, 0xbe3c, 0xbe3d, 0xbe3e, 0xbe3f, 0xbe40, 0xbe41, 0xbe42, 0xbe43, 0xbe46, 0xbe47, 0xbe49, 0xbe4a, 0xbe4b, 0xbe4d, 0xbe4f, 0xbe50, 0xbe51, 0xbe52, 0xbe53, 0xbe56, 0xbe58, 0xbe5c, 0xbe5d, 0xbe5e, 0xbe5f, 0xbe62, 0xbe63, 0xbe65, 0xbe66, 0xbe67, 0xbe69, 0xbe6b, 0xbe6c, 0xbe6d, 0xbe6e, 0xbe6f, 0xbe72, 0xbe76, 0xbe77, 0xbe78, 0xbe79, 0xbe7a, 0xbe7e, 0xbe7f, 0xbe81, 0xbe82, 0xbe83, 0xbe85, 0xbe86, 0xbe87, 0xbe88, 0xbe89, 0xbe8a, 0xbe8b, 0xbe8e, 0xbe92, 0xbe93, 0xbe94, 0xbe95, 0xbe96, 0xbe97, 0xbe9a, 0xbe9b, 0xbe9c, 0xbe9d, 0xbe9e, 0xbe9f, 0xbea0, 0xbea1, 0xbea2, 0xbea3, 0xbea4, 0xbea5, 0xbea6, 0xbea7, 0xbea9, 0xbeaa, 0xbeab, 0xbeac, 0xbead, 0xbeae, 0xbeaf, 0xbeb0, 0xbeb1, 0xbeb2, 0xbeb3, 0xbeb4, 0xbeb5, 0xbeb6, 0xbeb7, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ 192 ] = { 0xfffd, 0xbeb8, 0xbeb9, 0xbeba, 0xbebb, 0xbebc, 0xbebd, 0xbebe, 0xbebf, 0xbec0, 0xbec1, 0xbec2, 0xbec3, 0xbec4, 0xbec5, 0xbec6, 0xbec7, 0xbec8, 0xbec9, 0xbeca, 0xbecb, 0xbecc, 0xbecd, 0xbece, 0xbecf, 0xbed2, 0xbed3, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbed5, 0xbed6, 0xbed9, 0xbeda, 0xbedb, 0xbedc, 0xbedd, 0xbede, 0xbedf, 0xbee1, 0xbee2, 0xbee6, 0xbee7, 0xbee8, 0xbee9, 0xbeea, 0xbeeb, 0xbeed, 0xbeee, 0xbeef, 0xbef0, 0xbef1, 0xbef2, 0xbef3, 0xbef4, 0xbef5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbef6, 0xbef7, 0xbef8, 0xbef9, 0xbefa, 0xbefb, 0xbefc, 0xbefd, 0xbefe, 0xbeff, 0xbf00, 0xbf02, 0xbf03, 0xbf04, 0xbf05, 0xbf06, 0xbf07, 0xbf0a, 0xbf0b, 0xbf0c, 0xbf0d, 0xbf0e, 0xbf0f, 0xbf10, 0xbf11, 0xbf12, 0xbf13, 0xbf14, 0xbf15, 0xbf16, 0xbf17, 0xbf1a, 0xbf1e, 0xbf1f, 0xbf20, 0xbf21, 0xbf22, 0xbf23, 0xbf24, 0xbf25, 0xbf26, 0xbf27, 0xbf28, 0xbf29, 0xbf2a, 0xbf2b, 0xbf2c, 0xbf2d, 0xbf2e, 0xbf2f, 0xbf30, 0xbf31, 0xbf32, 0xbf33, 0xbf34, 0xbf35, 0xbf36, 0xbf37, 0xbf38, 0xbf39, 0xbf3a, 0xbf3b, 0xbf3c, 0xbf3d, 0xbf3e, 0xbf3f, 0xbf42, 0xbf43, 0xbf45, 0xbf46, 0xbf47, 0xbf49, 0xbf4a, 0xbf4b, 0xbf4c, 0xbf4d, 0xbf4e, 0xbf4f, 0xbf52, 0xbf53, 0xbf54, 0xbf56, 0xbf57, 0xbf58, 0xbf59, 0xbf5a, 0xbf5b, 0xbf5c, 0xbf5d, 0xbf5e, 0xbf5f, 0xbf60, 0xbf61, 0xbf62, 0xbf63, 0xbf64, 0xbf65, 0xbf66, 0xbf67, 0xbf68, 0xbf69, 0xbf6a, 0xbf6b, 0xbf6c, 0xbf6d, 0xbf6e, 0xbf6f, 0xbf70, 0xbf71, 0xbf72, 0xbf73, 0xbf74, 0xbf75, 0xbf76, 0xbf77, 0xbf78, 0xbf79, 0xbf7a, 0xbf7b, 0xbf7c, 0xbf7d, 0xbf7e, 0xbf7f, 0xbf80, 0xbf81, 0xbf82, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ 192 ] = { 0xfffd, 0xbf83, 0xbf84, 0xbf85, 0xbf86, 0xbf87, 0xbf88, 0xbf89, 0xbf8a, 0xbf8b, 0xbf8c, 0xbf8d, 0xbf8e, 0xbf8f, 0xbf90, 0xbf91, 0xbf92, 0xbf93, 0xbf95, 0xbf96, 0xbf97, 0xbf98, 0xbf99, 0xbf9a, 0xbf9b, 0xbf9c, 0xbf9d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbf9e, 0xbf9f, 0xbfa0, 0xbfa1, 0xbfa2, 0xbfa3, 0xbfa4, 0xbfa5, 0xbfa6, 0xbfa7, 0xbfa8, 0xbfa9, 0xbfaa, 0xbfab, 0xbfac, 0xbfad, 0xbfae, 0xbfaf, 0xbfb1, 0xbfb2, 0xbfb3, 0xbfb4, 0xbfb5, 0xbfb6, 0xbfb7, 0xbfb8, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xbfb9, 0xbfba, 0xbfbb, 0xbfbc, 0xbfbd, 0xbfbe, 0xbfbf, 0xbfc0, 0xbfc1, 0xbfc2, 0xbfc3, 0xbfc4, 0xbfc6, 0xbfc7, 0xbfc8, 0xbfc9, 0xbfca, 0xbfcb, 0xbfce, 0xbfcf, 0xbfd1, 0xbfd2, 0xbfd3, 0xbfd5, 0xbfd6, 0xbfd7, 0xbfd8, 0xbfd9, 0xbfda, 0xbfdb, 0xbfdd, 0xbfde, 0xbfe0, 0xbfe2, 0xbfe3, 0xbfe4, 0xbfe5, 0xbfe6, 0xbfe7, 0xbfe8, 0xbfe9, 0xbfea, 0xbfeb, 0xbfec, 0xbfed, 0xbfee, 0xbfef, 0xbff0, 0xbff1, 0xbff2, 0xbff3, 0xbff4, 0xbff5, 0xbff6, 0xbff7, 0xbff8, 0xbff9, 0xbffa, 0xbffb, 0xbffc, 0xbffd, 0xbffe, 0xbfff, 0xc000, 0xc001, 0xc002, 0xc003, 0xc004, 0xc005, 0xc006, 0xc007, 0xc008, 0xc009, 0xc00a, 0xc00b, 0xc00c, 0xc00d, 0xc00e, 0xc00f, 0xc010, 0xc011, 0xc012, 0xc013, 0xc014, 0xc015, 0xc016, 0xc017, 0xc018, 0xc019, 0xc01a, 0xc01b, 0xc01c, 0xc01d, 0xc01e, 0xc01f, 0xc020, 0xc021, 0xc022, 0xc023, 0xc024, 0xc025, 0xc026, 0xc027, 0xc028, 0xc029, 0xc02a, 0xc02b, 0xc02c, 0xc02d, 0xc02e, 0xc02f, 0xc030, 0xc031, 0xc032, 0xc033, 0xc034, 0xc035, 0xc036, 0xc037, 0xc038, 0xc039, 0xc03a, 0xc03b, 0xc03d, 0xc03e, 0xc03f, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ 192 ] = { 0xfffd, 0xc040, 0xc041, 0xc042, 0xc043, 0xc044, 0xc045, 0xc046, 0xc047, 0xc048, 0xc049, 0xc04a, 0xc04b, 0xc04c, 0xc04d, 0xc04e, 0xc04f, 0xc050, 0xc052, 0xc053, 0xc054, 0xc055, 0xc056, 0xc057, 0xc059, 0xc05a, 0xc05b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc05d, 0xc05e, 0xc05f, 0xc061, 0xc062, 0xc063, 0xc064, 0xc065, 0xc066, 0xc067, 0xc06a, 0xc06b, 0xc06c, 0xc06d, 0xc06e, 0xc06f, 0xc070, 0xc071, 0xc072, 0xc073, 0xc074, 0xc075, 0xc076, 0xc077, 0xc078, 0xc079, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc07a, 0xc07b, 0xc07c, 0xc07d, 0xc07e, 0xc07f, 0xc080, 0xc081, 0xc082, 0xc083, 0xc084, 0xc085, 0xc086, 0xc087, 0xc088, 0xc089, 0xc08a, 0xc08b, 0xc08c, 0xc08d, 0xc08e, 0xc08f, 0xc092, 0xc093, 0xc095, 0xc096, 0xc097, 0xc099, 0xc09a, 0xc09b, 0xc09c, 0xc09d, 0xc09e, 0xc09f, 0xc0a2, 0xc0a4, 0xc0a6, 0xc0a7, 0xc0a8, 0xc0a9, 0xc0aa, 0xc0ab, 0xc0ae, 0xc0b1, 0xc0b2, 0xc0b7, 0xc0b8, 0xc0b9, 0xc0ba, 0xc0bb, 0xc0be, 0xc0c2, 0xc0c3, 0xc0c4, 0xc0c6, 0xc0c7, 0xc0ca, 0xc0cb, 0xc0cd, 0xc0ce, 0xc0cf, 0xc0d1, 0xc0d2, 0xc0d3, 0xc0d4, 0xc0d5, 0xc0d6, 0xc0d7, 0xc0da, 0xc0de, 0xc0df, 0xc0e0, 0xc0e1, 0xc0e2, 0xc0e3, 0xc0e6, 0xc0e7, 0xc0e9, 0xc0ea, 0xc0eb, 0xc0ed, 0xc0ee, 0xc0ef, 0xc0f0, 0xc0f1, 0xc0f2, 0xc0f3, 0xc0f6, 0xc0f8, 0xc0fa, 0xc0fb, 0xc0fc, 0xc0fd, 0xc0fe, 0xc0ff, 0xc101, 0xc102, 0xc103, 0xc105, 0xc106, 0xc107, 0xc109, 0xc10a, 0xc10b, 0xc10c, 0xc10d, 0xc10e, 0xc10f, 0xc111, 0xc112, 0xc113, 0xc114, 0xc116, 0xc117, 0xc118, 0xc119, 0xc11a, 0xc11b, 0xc121, 0xc122, 0xc125, 0xc128, 0xc129, 0xc12a, 0xc12b, 0xc12e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ 192 ] = { 0xfffd, 0xc132, 0xc133, 0xc134, 0xc135, 0xc137, 0xc13a, 0xc13b, 0xc13d, 0xc13e, 0xc13f, 0xc141, 0xc142, 0xc143, 0xc144, 0xc145, 0xc146, 0xc147, 0xc14a, 0xc14e, 0xc14f, 0xc150, 0xc151, 0xc152, 0xc153, 0xc156, 0xc157, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc159, 0xc15a, 0xc15b, 0xc15d, 0xc15e, 0xc15f, 0xc160, 0xc161, 0xc162, 0xc163, 0xc166, 0xc16a, 0xc16b, 0xc16c, 0xc16d, 0xc16e, 0xc16f, 0xc171, 0xc172, 0xc173, 0xc175, 0xc176, 0xc177, 0xc179, 0xc17a, 0xc17b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc17c, 0xc17d, 0xc17e, 0xc17f, 0xc180, 0xc181, 0xc182, 0xc183, 0xc184, 0xc186, 0xc187, 0xc188, 0xc189, 0xc18a, 0xc18b, 0xc18f, 0xc191, 0xc192, 0xc193, 0xc195, 0xc197, 0xc198, 0xc199, 0xc19a, 0xc19b, 0xc19e, 0xc1a0, 0xc1a2, 0xc1a3, 0xc1a4, 0xc1a6, 0xc1a7, 0xc1aa, 0xc1ab, 0xc1ad, 0xc1ae, 0xc1af, 0xc1b1, 0xc1b2, 0xc1b3, 0xc1b4, 0xc1b5, 0xc1b6, 0xc1b7, 0xc1b8, 0xc1b9, 0xc1ba, 0xc1bb, 0xc1bc, 0xc1be, 0xc1bf, 0xc1c0, 0xc1c1, 0xc1c2, 0xc1c3, 0xc1c5, 0xc1c6, 0xc1c7, 0xc1c9, 0xc1ca, 0xc1cb, 0xc1cd, 0xc1ce, 0xc1cf, 0xc1d0, 0xc1d1, 0xc1d2, 0xc1d3, 0xc1d5, 0xc1d6, 0xc1d9, 0xc1da, 0xc1db, 0xc1dc, 0xc1dd, 0xc1de, 0xc1df, 0xc1e1, 0xc1e2, 0xc1e3, 0xc1e5, 0xc1e6, 0xc1e7, 0xc1e9, 0xc1ea, 0xc1eb, 0xc1ec, 0xc1ed, 0xc1ee, 0xc1ef, 0xc1f2, 0xc1f4, 0xc1f5, 0xc1f6, 0xc1f7, 0xc1f8, 0xc1f9, 0xc1fa, 0xc1fb, 0xc1fe, 0xc1ff, 0xc201, 0xc202, 0xc203, 0xc205, 0xc206, 0xc207, 0xc208, 0xc209, 0xc20a, 0xc20b, 0xc20e, 0xc210, 0xc212, 0xc213, 0xc214, 0xc215, 0xc216, 0xc217, 0xc21a, 0xc21b, 0xc21d, 0xc21e, 0xc221, 0xc222, 0xc223, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ 192 ] = { 0xfffd, 0xc224, 0xc225, 0xc226, 0xc227, 0xc22a, 0xc22c, 0xc22e, 0xc230, 0xc233, 0xc235, 0xc236, 0xc237, 0xc238, 0xc239, 0xc23a, 0xc23b, 0xc23c, 0xc23d, 0xc23e, 0xc23f, 0xc240, 0xc241, 0xc242, 0xc243, 0xc244, 0xc245, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc246, 0xc247, 0xc249, 0xc24a, 0xc24b, 0xc24c, 0xc24d, 0xc24e, 0xc24f, 0xc252, 0xc253, 0xc255, 0xc256, 0xc257, 0xc259, 0xc25a, 0xc25b, 0xc25c, 0xc25d, 0xc25e, 0xc25f, 0xc261, 0xc262, 0xc263, 0xc264, 0xc266, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc267, 0xc268, 0xc269, 0xc26a, 0xc26b, 0xc26e, 0xc26f, 0xc271, 0xc272, 0xc273, 0xc275, 0xc276, 0xc277, 0xc278, 0xc279, 0xc27a, 0xc27b, 0xc27e, 0xc280, 0xc282, 0xc283, 0xc284, 0xc285, 0xc286, 0xc287, 0xc28a, 0xc28b, 0xc28c, 0xc28d, 0xc28e, 0xc28f, 0xc291, 0xc292, 0xc293, 0xc294, 0xc295, 0xc296, 0xc297, 0xc299, 0xc29a, 0xc29c, 0xc29e, 0xc29f, 0xc2a0, 0xc2a1, 0xc2a2, 0xc2a3, 0xc2a6, 0xc2a7, 0xc2a9, 0xc2aa, 0xc2ab, 0xc2ae, 0xc2af, 0xc2b0, 0xc2b1, 0xc2b2, 0xc2b3, 0xc2b6, 0xc2b8, 0xc2ba, 0xc2bb, 0xc2bc, 0xc2bd, 0xc2be, 0xc2bf, 0xc2c0, 0xc2c1, 0xc2c2, 0xc2c3, 0xc2c4, 0xc2c5, 0xc2c6, 0xc2c7, 0xc2c8, 0xc2c9, 0xc2ca, 0xc2cb, 0xc2cc, 0xc2cd, 0xc2ce, 0xc2cf, 0xc2d0, 0xc2d1, 0xc2d2, 0xc2d3, 0xc2d4, 0xc2d5, 0xc2d6, 0xc2d7, 0xc2d8, 0xc2d9, 0xc2da, 0xc2db, 0xc2de, 0xc2df, 0xc2e1, 0xc2e2, 0xc2e5, 0xc2e6, 0xc2e7, 0xc2e8, 0xc2e9, 0xc2ea, 0xc2ee, 0xc2f0, 0xc2f2, 0xc2f3, 0xc2f4, 0xc2f5, 0xc2f7, 0xc2fa, 0xc2fd, 0xc2fe, 0xc2ff, 0xc301, 0xc302, 0xc303, 0xc304, 0xc305, 0xc306, 0xc307, 0xc30a, 0xc30b, 0xc30e, 0xc30f, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ 192 ] = { 0xfffd, 0xc310, 0xc311, 0xc312, 0xc316, 0xc317, 0xc319, 0xc31a, 0xc31b, 0xc31d, 0xc31e, 0xc31f, 0xc320, 0xc321, 0xc322, 0xc323, 0xc326, 0xc327, 0xc32a, 0xc32b, 0xc32c, 0xc32d, 0xc32e, 0xc32f, 0xc330, 0xc331, 0xc332, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc333, 0xc334, 0xc335, 0xc336, 0xc337, 0xc338, 0xc339, 0xc33a, 0xc33b, 0xc33c, 0xc33d, 0xc33e, 0xc33f, 0xc340, 0xc341, 0xc342, 0xc343, 0xc344, 0xc346, 0xc347, 0xc348, 0xc349, 0xc34a, 0xc34b, 0xc34c, 0xc34d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc34e, 0xc34f, 0xc350, 0xc351, 0xc352, 0xc353, 0xc354, 0xc355, 0xc356, 0xc357, 0xc358, 0xc359, 0xc35a, 0xc35b, 0xc35c, 0xc35d, 0xc35e, 0xc35f, 0xc360, 0xc361, 0xc362, 0xc363, 0xc364, 0xc365, 0xc366, 0xc367, 0xc36a, 0xc36b, 0xc36d, 0xc36e, 0xc36f, 0xc371, 0xc373, 0xc374, 0xc375, 0xc376, 0xc377, 0xc37a, 0xc37b, 0xc37e, 0xc37f, 0xc380, 0xc381, 0xc382, 0xc383, 0xc385, 0xc386, 0xc387, 0xc389, 0xc38a, 0xc38b, 0xc38d, 0xc38e, 0xc38f, 0xc390, 0xc391, 0xc392, 0xc393, 0xc394, 0xc395, 0xc396, 0xc397, 0xc398, 0xc399, 0xc39a, 0xc39b, 0xc39c, 0xc39d, 0xc39e, 0xc39f, 0xc3a0, 0xc3a1, 0xc3a2, 0xc3a3, 0xc3a4, 0xc3a5, 0xc3a6, 0xc3a7, 0xc3a8, 0xc3a9, 0xc3aa, 0xc3ab, 0xc3ac, 0xc3ad, 0xc3ae, 0xc3af, 0xc3b0, 0xc3b1, 0xc3b2, 0xc3b3, 0xc3b4, 0xc3b5, 0xc3b6, 0xc3b7, 0xc3b8, 0xc3b9, 0xc3ba, 0xc3bb, 0xc3bc, 0xc3bd, 0xc3be, 0xc3bf, 0xc3c1, 0xc3c2, 0xc3c3, 0xc3c4, 0xc3c5, 0xc3c6, 0xc3c7, 0xc3c8, 0xc3c9, 0xc3ca, 0xc3cb, 0xc3cc, 0xc3cd, 0xc3ce, 0xc3cf, 0xc3d0, 0xc3d1, 0xc3d2, 0xc3d3, 0xc3d4, 0xc3d5, 0xc3d6, 0xc3d7, 0xc3da, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ 192 ] = { 0xfffd, 0xc3db, 0xc3dd, 0xc3de, 0xc3e1, 0xc3e3, 0xc3e4, 0xc3e5, 0xc3e6, 0xc3e7, 0xc3ea, 0xc3eb, 0xc3ec, 0xc3ee, 0xc3ef, 0xc3f0, 0xc3f1, 0xc3f2, 0xc3f3, 0xc3f6, 0xc3f7, 0xc3f9, 0xc3fa, 0xc3fb, 0xc3fc, 0xc3fd, 0xc3fe, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc3ff, 0xc400, 0xc401, 0xc402, 0xc403, 0xc404, 0xc405, 0xc406, 0xc407, 0xc409, 0xc40a, 0xc40b, 0xc40c, 0xc40d, 0xc40e, 0xc40f, 0xc411, 0xc412, 0xc413, 0xc414, 0xc415, 0xc416, 0xc417, 0xc418, 0xc419, 0xc41a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc41b, 0xc41c, 0xc41d, 0xc41e, 0xc41f, 0xc420, 0xc421, 0xc422, 0xc423, 0xc425, 0xc426, 0xc427, 0xc428, 0xc429, 0xc42a, 0xc42b, 0xc42d, 0xc42e, 0xc42f, 0xc431, 0xc432, 0xc433, 0xc435, 0xc436, 0xc437, 0xc438, 0xc439, 0xc43a, 0xc43b, 0xc43e, 0xc43f, 0xc440, 0xc441, 0xc442, 0xc443, 0xc444, 0xc445, 0xc446, 0xc447, 0xc449, 0xc44a, 0xc44b, 0xc44c, 0xc44d, 0xc44e, 0xc44f, 0xc450, 0xc451, 0xc452, 0xc453, 0xc454, 0xc455, 0xc456, 0xc457, 0xc458, 0xc459, 0xc45a, 0xc45b, 0xc45c, 0xc45d, 0xc45e, 0xc45f, 0xc460, 0xc461, 0xc462, 0xc463, 0xc466, 0xc467, 0xc469, 0xc46a, 0xc46b, 0xc46d, 0xc46e, 0xc46f, 0xc470, 0xc471, 0xc472, 0xc473, 0xc476, 0xc477, 0xc478, 0xc47a, 0xc47b, 0xc47c, 0xc47d, 0xc47e, 0xc47f, 0xc481, 0xc482, 0xc483, 0xc484, 0xc485, 0xc486, 0xc487, 0xc488, 0xc489, 0xc48a, 0xc48b, 0xc48c, 0xc48d, 0xc48e, 0xc48f, 0xc490, 0xc491, 0xc492, 0xc493, 0xc495, 0xc496, 0xc497, 0xc498, 0xc499, 0xc49a, 0xc49b, 0xc49d, 0xc49e, 0xc49f, 0xc4a0, 0xc4a1, 0xc4a2, 0xc4a3, 0xc4a4, 0xc4a5, 0xc4a6, 0xc4a7, 0xc4a8, 0xc4a9, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ 192 ] = { 0xfffd, 0xc4aa, 0xc4ab, 0xc4ac, 0xc4ad, 0xc4ae, 0xc4af, 0xc4b0, 0xc4b1, 0xc4b2, 0xc4b3, 0xc4b4, 0xc4b5, 0xc4b6, 0xc4b7, 0xc4b9, 0xc4ba, 0xc4bb, 0xc4bd, 0xc4be, 0xc4bf, 0xc4c0, 0xc4c1, 0xc4c2, 0xc4c3, 0xc4c4, 0xc4c5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc4c6, 0xc4c7, 0xc4c8, 0xc4c9, 0xc4ca, 0xc4cb, 0xc4cc, 0xc4cd, 0xc4ce, 0xc4cf, 0xc4d0, 0xc4d1, 0xc4d2, 0xc4d3, 0xc4d4, 0xc4d5, 0xc4d6, 0xc4d7, 0xc4d8, 0xc4d9, 0xc4da, 0xc4db, 0xc4dc, 0xc4dd, 0xc4de, 0xc4df, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc4e0, 0xc4e1, 0xc4e2, 0xc4e3, 0xc4e4, 0xc4e5, 0xc4e6, 0xc4e7, 0xc4e8, 0xc4ea, 0xc4eb, 0xc4ec, 0xc4ed, 0xc4ee, 0xc4ef, 0xc4f2, 0xc4f3, 0xc4f5, 0xc4f6, 0xc4f7, 0xc4f9, 0xc4fb, 0xc4fc, 0xc4fd, 0xc4fe, 0xc502, 0xc503, 0xc504, 0xc505, 0xc506, 0xc507, 0xc508, 0xc509, 0xc50a, 0xc50b, 0xc50d, 0xc50e, 0xc50f, 0xc511, 0xc512, 0xc513, 0xc515, 0xc516, 0xc517, 0xc518, 0xc519, 0xc51a, 0xc51b, 0xc51d, 0xc51e, 0xc51f, 0xc520, 0xc521, 0xc522, 0xc523, 0xc524, 0xc525, 0xc526, 0xc527, 0xc52a, 0xc52b, 0xc52d, 0xc52e, 0xc52f, 0xc531, 0xc532, 0xc533, 0xc534, 0xc535, 0xc536, 0xc537, 0xc53a, 0xc53c, 0xc53e, 0xc53f, 0xc540, 0xc541, 0xc542, 0xc543, 0xc546, 0xc547, 0xc54b, 0xc54f, 0xc550, 0xc551, 0xc552, 0xc556, 0xc55a, 0xc55b, 0xc55c, 0xc55f, 0xc562, 0xc563, 0xc565, 0xc566, 0xc567, 0xc569, 0xc56a, 0xc56b, 0xc56c, 0xc56d, 0xc56e, 0xc56f, 0xc572, 0xc576, 0xc577, 0xc578, 0xc579, 0xc57a, 0xc57b, 0xc57e, 0xc57f, 0xc581, 0xc582, 0xc583, 0xc585, 0xc586, 0xc588, 0xc589, 0xc58a, 0xc58b, 0xc58e, 0xc590, 0xc592, 0xc593, 0xc594, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ 192 ] = { 0xfffd, 0xc596, 0xc599, 0xc59a, 0xc59b, 0xc59d, 0xc59e, 0xc59f, 0xc5a1, 0xc5a2, 0xc5a3, 0xc5a4, 0xc5a5, 0xc5a6, 0xc5a7, 0xc5a8, 0xc5aa, 0xc5ab, 0xc5ac, 0xc5ad, 0xc5ae, 0xc5af, 0xc5b0, 0xc5b1, 0xc5b2, 0xc5b3, 0xc5b6, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc5b7, 0xc5ba, 0xc5bf, 0xc5c0, 0xc5c1, 0xc5c2, 0xc5c3, 0xc5cb, 0xc5cd, 0xc5cf, 0xc5d2, 0xc5d3, 0xc5d5, 0xc5d6, 0xc5d7, 0xc5d9, 0xc5da, 0xc5db, 0xc5dc, 0xc5dd, 0xc5de, 0xc5df, 0xc5e2, 0xc5e4, 0xc5e6, 0xc5e7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc5e8, 0xc5e9, 0xc5ea, 0xc5eb, 0xc5ef, 0xc5f1, 0xc5f2, 0xc5f3, 0xc5f5, 0xc5f8, 0xc5f9, 0xc5fa, 0xc5fb, 0xc602, 0xc603, 0xc604, 0xc609, 0xc60a, 0xc60b, 0xc60d, 0xc60e, 0xc60f, 0xc611, 0xc612, 0xc613, 0xc614, 0xc615, 0xc616, 0xc617, 0xc61a, 0xc61d, 0xc61e, 0xc61f, 0xc620, 0xc621, 0xc622, 0xc623, 0xc626, 0xc627, 0xc629, 0xc62a, 0xc62b, 0xc62f, 0xc631, 0xc632, 0xc636, 0xc638, 0xc63a, 0xc63c, 0xc63d, 0xc63e, 0xc63f, 0xc642, 0xc643, 0xc645, 0xc646, 0xc647, 0xc649, 0xc64a, 0xc64b, 0xc64c, 0xc64d, 0xc64e, 0xc64f, 0xc652, 0xc656, 0xc657, 0xc658, 0xc659, 0xc65a, 0xc65b, 0xc65e, 0xc65f, 0xc661, 0xc662, 0xc663, 0xc664, 0xc665, 0xc666, 0xc667, 0xc668, 0xc669, 0xc66a, 0xc66b, 0xc66d, 0xc66e, 0xc670, 0xc672, 0xc673, 0xc674, 0xc675, 0xc676, 0xc677, 0xc67a, 0xc67b, 0xc67d, 0xc67e, 0xc67f, 0xc681, 0xc682, 0xc683, 0xc684, 0xc685, 0xc686, 0xc687, 0xc68a, 0xc68c, 0xc68e, 0xc68f, 0xc690, 0xc691, 0xc692, 0xc693, 0xc696, 0xc697, 0xc699, 0xc69a, 0xc69b, 0xc69d, 0xc69e, 0xc69f, 0xc6a0, 0xc6a1, 0xc6a2, 0xc6a3, 0xc6a6, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ 192 ] = { 0xfffd, 0xc6a8, 0xc6aa, 0xc6ab, 0xc6ac, 0xc6ad, 0xc6ae, 0xc6af, 0xc6b2, 0xc6b3, 0xc6b5, 0xc6b6, 0xc6b7, 0xc6bb, 0xc6bc, 0xc6bd, 0xc6be, 0xc6bf, 0xc6c2, 0xc6c4, 0xc6c6, 0xc6c7, 0xc6c8, 0xc6c9, 0xc6ca, 0xc6cb, 0xc6ce, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc6cf, 0xc6d1, 0xc6d2, 0xc6d3, 0xc6d5, 0xc6d6, 0xc6d7, 0xc6d8, 0xc6d9, 0xc6da, 0xc6db, 0xc6de, 0xc6df, 0xc6e2, 0xc6e3, 0xc6e4, 0xc6e5, 0xc6e6, 0xc6e7, 0xc6ea, 0xc6eb, 0xc6ed, 0xc6ee, 0xc6ef, 0xc6f1, 0xc6f2, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc6f3, 0xc6f4, 0xc6f5, 0xc6f6, 0xc6f7, 0xc6fa, 0xc6fb, 0xc6fc, 0xc6fe, 0xc6ff, 0xc700, 0xc701, 0xc702, 0xc703, 0xc706, 0xc707, 0xc709, 0xc70a, 0xc70b, 0xc70d, 0xc70e, 0xc70f, 0xc710, 0xc711, 0xc712, 0xc713, 0xc716, 0xc718, 0xc71a, 0xc71b, 0xc71c, 0xc71d, 0xc71e, 0xc71f, 0xc722, 0xc723, 0xc725, 0xc726, 0xc727, 0xc729, 0xc72a, 0xc72b, 0xc72c, 0xc72d, 0xc72e, 0xc72f, 0xc732, 0xc734, 0xc736, 0xc738, 0xc739, 0xc73a, 0xc73b, 0xc73e, 0xc73f, 0xc741, 0xc742, 0xc743, 0xc745, 0xc746, 0xc747, 0xc748, 0xc749, 0xc74b, 0xc74e, 0xc750, 0xc759, 0xc75a, 0xc75b, 0xc75d, 0xc75e, 0xc75f, 0xc761, 0xc762, 0xc763, 0xc764, 0xc765, 0xc766, 0xc767, 0xc769, 0xc76a, 0xc76c, 0xc76d, 0xc76e, 0xc76f, 0xc770, 0xc771, 0xc772, 0xc773, 0xc776, 0xc777, 0xc779, 0xc77a, 0xc77b, 0xc77f, 0xc780, 0xc781, 0xc782, 0xc786, 0xc78b, 0xc78c, 0xc78d, 0xc78f, 0xc792, 0xc793, 0xc795, 0xc799, 0xc79b, 0xc79c, 0xc79d, 0xc79e, 0xc79f, 0xc7a2, 0xc7a7, 0xc7a8, 0xc7a9, 0xc7aa, 0xc7ab, 0xc7ae, 0xc7af, 0xc7b1, 0xc7b2, 0xc7b3, 0xc7b5, 0xc7b6, 0xc7b7, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ 192 ] = { 0xfffd, 0xc7b8, 0xc7b9, 0xc7ba, 0xc7bb, 0xc7be, 0xc7c2, 0xc7c3, 0xc7c4, 0xc7c5, 0xc7c6, 0xc7c7, 0xc7ca, 0xc7cb, 0xc7cd, 0xc7cf, 0xc7d1, 0xc7d2, 0xc7d3, 0xc7d4, 0xc7d5, 0xc7d6, 0xc7d7, 0xc7d9, 0xc7da, 0xc7db, 0xc7dc, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc7de, 0xc7df, 0xc7e0, 0xc7e1, 0xc7e2, 0xc7e3, 0xc7e5, 0xc7e6, 0xc7e7, 0xc7e9, 0xc7ea, 0xc7eb, 0xc7ed, 0xc7ee, 0xc7ef, 0xc7f0, 0xc7f1, 0xc7f2, 0xc7f3, 0xc7f4, 0xc7f5, 0xc7f6, 0xc7f7, 0xc7f8, 0xc7f9, 0xc7fa, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc7fb, 0xc7fc, 0xc7fd, 0xc7fe, 0xc7ff, 0xc802, 0xc803, 0xc805, 0xc806, 0xc807, 0xc809, 0xc80b, 0xc80c, 0xc80d, 0xc80e, 0xc80f, 0xc812, 0xc814, 0xc817, 0xc818, 0xc819, 0xc81a, 0xc81b, 0xc81e, 0xc81f, 0xc821, 0xc822, 0xc823, 0xc825, 0xc826, 0xc827, 0xc828, 0xc829, 0xc82a, 0xc82b, 0xc82e, 0xc830, 0xc832, 0xc833, 0xc834, 0xc835, 0xc836, 0xc837, 0xc839, 0xc83a, 0xc83b, 0xc83d, 0xc83e, 0xc83f, 0xc841, 0xc842, 0xc843, 0xc844, 0xc845, 0xc846, 0xc847, 0xc84a, 0xc84b, 0xc84e, 0xc84f, 0xc850, 0xc851, 0xc852, 0xc853, 0xc855, 0xc856, 0xc857, 0xc858, 0xc859, 0xc85a, 0xc85b, 0xc85c, 0xc85d, 0xc85e, 0xc85f, 0xc860, 0xc861, 0xc862, 0xc863, 0xc864, 0xc865, 0xc866, 0xc867, 0xc868, 0xc869, 0xc86a, 0xc86b, 0xc86c, 0xc86d, 0xc86e, 0xc86f, 0xc872, 0xc873, 0xc875, 0xc876, 0xc877, 0xc879, 0xc87b, 0xc87c, 0xc87d, 0xc87e, 0xc87f, 0xc882, 0xc884, 0xc888, 0xc889, 0xc88a, 0xc88e, 0xc88f, 0xc890, 0xc891, 0xc892, 0xc893, 0xc895, 0xc896, 0xc897, 0xc898, 0xc899, 0xc89a, 0xc89b, 0xc89c, 0xc89e, 0xc8a0, 0xc8a2, 0xc8a3, 0xc8a4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ 192 ] = { 0xfffd, 0xc8a5, 0xc8a6, 0xc8a7, 0xc8a9, 0xc8aa, 0xc8ab, 0xc8ac, 0xc8ad, 0xc8ae, 0xc8af, 0xc8b0, 0xc8b1, 0xc8b2, 0xc8b3, 0xc8b4, 0xc8b5, 0xc8b6, 0xc8b7, 0xc8b8, 0xc8b9, 0xc8ba, 0xc8bb, 0xc8be, 0xc8bf, 0xc8c0, 0xc8c1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc8c2, 0xc8c3, 0xc8c5, 0xc8c6, 0xc8c7, 0xc8c9, 0xc8ca, 0xc8cb, 0xc8cd, 0xc8ce, 0xc8cf, 0xc8d0, 0xc8d1, 0xc8d2, 0xc8d3, 0xc8d6, 0xc8d8, 0xc8da, 0xc8db, 0xc8dc, 0xc8dd, 0xc8de, 0xc8df, 0xc8e2, 0xc8e3, 0xc8e5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc8e6, 0xc8e7, 0xc8e8, 0xc8e9, 0xc8ea, 0xc8eb, 0xc8ec, 0xc8ed, 0xc8ee, 0xc8ef, 0xc8f0, 0xc8f1, 0xc8f2, 0xc8f3, 0xc8f4, 0xc8f6, 0xc8f7, 0xc8f8, 0xc8f9, 0xc8fa, 0xc8fb, 0xc8fe, 0xc8ff, 0xc901, 0xc902, 0xc903, 0xc907, 0xc908, 0xc909, 0xc90a, 0xc90b, 0xc90e, 0x3000, 0x3001, 0x3002, 0x00b7, 0x2025, 0x2026, 0x00a8, 0x3003, 0x00ad, 0x2015, 0x2225, 0xff3c, 0x223c, 0x2018, 0x2019, 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0x00b1, 0x00d7, 0x00f7, 0x2260, 0x2264, 0x2265, 0x221e, 0x2234, 0x00b0, 0x2032, 0x2033, 0x2103, 0x212b, 0xffe0, 0xffe1, 0xffe5, 0x2642, 0x2640, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x00a7, 0x203b, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x2192, 0x2190, 0x2191, 0x2193, 0x2194, 0x3013, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b, 0x222c, 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229, 0x2227, 0x2228, 0xffe2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ 168 ] = { 0xfffd, 0xc910, 0xc912, 0xc913, 0xc914, 0xc915, 0xc916, 0xc917, 0xc919, 0xc91a, 0xc91b, 0xc91c, 0xc91d, 0xc91e, 0xc91f, 0xc920, 0xc921, 0xc922, 0xc923, 0xc924, 0xc925, 0xc926, 0xc927, 0xc928, 0xc929, 0xc92a, 0xc92b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc92d, 0xc92e, 0xc92f, 0xc930, 0xc931, 0xc932, 0xc933, 0xc935, 0xc936, 0xc937, 0xc938, 0xc939, 0xc93a, 0xc93b, 0xc93c, 0xc93d, 0xc93e, 0xc93f, 0xc940, 0xc941, 0xc942, 0xc943, 0xc944, 0xc945, 0xc946, 0xc947, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc948, 0xc949, 0xc94a, 0xc94b, 0xc94c, 0xc94d, 0xc94e, 0xc94f, 0xc952, 0xc953, 0xc955, 0xc956, 0xc957, 0xc959, 0xc95a, 0xc95b, 0xc95c, 0xc95d, 0xc95e, 0xc95f, 0xc962, 0xc964, 0xc965, 0xc966, 0xc967, 0xc968, 0xc969, 0xc96a, 0xc96b, 0xc96d, 0xc96e, 0xc96f, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x00b4, 0xff5e, 0x02c7, 0x02d8, 0x02dd, 0x02da, 0x02d9, 0x00b8, 0x02db, 0x00a1, 0x00bf, 0x02d0, 0x222e, 0x2211, 0x220f, 0x00a4, 0x2109, 0x2030, 0x25c1, 0x25c0, 0x25b7, 0x25b6, 0x2664, 0x2660, 0x2661, 0x2665, 0x2667, 0x2663, 0x2299, 0x25c8, 0x25a3, 0x25d0, 0x25d1, 0x2592, 0x25a4, 0x25a5, 0x25a8, 0x25a7, 0x25a6, 0x25a9, 0x2668, 0x260f, 0x260e, 0x261c, 0x261e, 0x00b6, 0x2020, 0x2021, 0x2195, 0x2197, 0x2199, 0x2196, 0x2198, 0x266d, 0x2669, 0x266a, 0x266c, 0x327f, 0x321c, 0x2116, 0x33c7, 0x2122, 0x33c2, 0x33d8, 0x2121, 0x20ac, 0x00ae }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ 192 ] = { 0xfffd, 0xc971, 0xc972, 0xc973, 0xc975, 0xc976, 0xc977, 0xc978, 0xc979, 0xc97a, 0xc97b, 0xc97d, 0xc97e, 0xc97f, 0xc980, 0xc981, 0xc982, 0xc983, 0xc984, 0xc985, 0xc986, 0xc987, 0xc98a, 0xc98b, 0xc98d, 0xc98e, 0xc98f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc991, 0xc992, 0xc993, 0xc994, 0xc995, 0xc996, 0xc997, 0xc99a, 0xc99c, 0xc99e, 0xc99f, 0xc9a0, 0xc9a1, 0xc9a2, 0xc9a3, 0xc9a4, 0xc9a5, 0xc9a6, 0xc9a7, 0xc9a8, 0xc9a9, 0xc9aa, 0xc9ab, 0xc9ac, 0xc9ad, 0xc9ae, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xc9af, 0xc9b0, 0xc9b1, 0xc9b2, 0xc9b3, 0xc9b4, 0xc9b5, 0xc9b6, 0xc9b7, 0xc9b8, 0xc9b9, 0xc9ba, 0xc9bb, 0xc9bc, 0xc9bd, 0xc9be, 0xc9bf, 0xc9c2, 0xc9c3, 0xc9c5, 0xc9c6, 0xc9c9, 0xc9cb, 0xc9cc, 0xc9cd, 0xc9ce, 0xc9cf, 0xc9d2, 0xc9d4, 0xc9d7, 0xc9d8, 0xc9db, 0xff01, 0xff02, 0xff03, 0xff04, 0xff05, 0xff06, 0xff07, 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff3b, 0xffe6, 0xff3d, 0xff3e, 0xff3f, 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ 192 ] = { 0xfffd, 0xc9de, 0xc9df, 0xc9e1, 0xc9e3, 0xc9e5, 0xc9e6, 0xc9e8, 0xc9e9, 0xc9ea, 0xc9eb, 0xc9ee, 0xc9f2, 0xc9f3, 0xc9f4, 0xc9f5, 0xc9f6, 0xc9f7, 0xc9fa, 0xc9fb, 0xc9fd, 0xc9fe, 0xc9ff, 0xca01, 0xca02, 0xca03, 0xca04, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca05, 0xca06, 0xca07, 0xca0a, 0xca0e, 0xca0f, 0xca10, 0xca11, 0xca12, 0xca13, 0xca15, 0xca16, 0xca17, 0xca19, 0xca1a, 0xca1b, 0xca1c, 0xca1d, 0xca1e, 0xca1f, 0xca20, 0xca21, 0xca22, 0xca23, 0xca24, 0xca25, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca26, 0xca27, 0xca28, 0xca2a, 0xca2b, 0xca2c, 0xca2d, 0xca2e, 0xca2f, 0xca30, 0xca31, 0xca32, 0xca33, 0xca34, 0xca35, 0xca36, 0xca37, 0xca38, 0xca39, 0xca3a, 0xca3b, 0xca3c, 0xca3d, 0xca3e, 0xca3f, 0xca40, 0xca41, 0xca42, 0xca43, 0xca44, 0xca45, 0xca46, 0x3131, 0x3132, 0x3133, 0x3134, 0x3135, 0x3136, 0x3137, 0x3138, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d, 0x313e, 0x313f, 0x3140, 0x3141, 0x3142, 0x3143, 0x3144, 0x3145, 0x3146, 0x3147, 0x3148, 0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e, 0x314f, 0x3150, 0x3151, 0x3152, 0x3153, 0x3154, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159, 0x315a, 0x315b, 0x315c, 0x315d, 0x315e, 0x315f, 0x3160, 0x3161, 0x3162, 0x3163, 0x3164, 0x3165, 0x3166, 0x3167, 0x3168, 0x3169, 0x316a, 0x316b, 0x316c, 0x316d, 0x316e, 0x316f, 0x3170, 0x3171, 0x3172, 0x3173, 0x3174, 0x3175, 0x3176, 0x3177, 0x3178, 0x3179, 0x317a, 0x317b, 0x317c, 0x317d, 0x317e, 0x317f, 0x3180, 0x3181, 0x3182, 0x3183, 0x3184, 0x3185, 0x3186, 0x3187, 0x3188, 0x3189, 0x318a, 0x318b, 0x318c, 0x318d, 0x318e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ 192 ] = { 0xfffd, 0xca47, 0xca48, 0xca49, 0xca4a, 0xca4b, 0xca4e, 0xca4f, 0xca51, 0xca52, 0xca53, 0xca55, 0xca56, 0xca57, 0xca58, 0xca59, 0xca5a, 0xca5b, 0xca5e, 0xca62, 0xca63, 0xca64, 0xca65, 0xca66, 0xca67, 0xca69, 0xca6a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca6b, 0xca6c, 0xca6d, 0xca6e, 0xca6f, 0xca70, 0xca71, 0xca72, 0xca73, 0xca74, 0xca75, 0xca76, 0xca77, 0xca78, 0xca79, 0xca7a, 0xca7b, 0xca7c, 0xca7e, 0xca7f, 0xca80, 0xca81, 0xca82, 0xca83, 0xca85, 0xca86, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xca87, 0xca88, 0xca89, 0xca8a, 0xca8b, 0xca8c, 0xca8d, 0xca8e, 0xca8f, 0xca90, 0xca91, 0xca92, 0xca93, 0xca94, 0xca95, 0xca96, 0xca97, 0xca99, 0xca9a, 0xca9b, 0xca9c, 0xca9d, 0xca9e, 0xca9f, 0xcaa0, 0xcaa1, 0xcaa2, 0xcaa3, 0xcaa4, 0xcaa5, 0xcaa6, 0xcaa7, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ 168 ] = { 0xfffd, 0xcaa8, 0xcaa9, 0xcaaa, 0xcaab, 0xcaac, 0xcaad, 0xcaae, 0xcaaf, 0xcab0, 0xcab1, 0xcab2, 0xcab3, 0xcab4, 0xcab5, 0xcab6, 0xcab7, 0xcab8, 0xcab9, 0xcaba, 0xcabb, 0xcabe, 0xcabf, 0xcac1, 0xcac2, 0xcac3, 0xcac5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcac6, 0xcac7, 0xcac8, 0xcac9, 0xcaca, 0xcacb, 0xcace, 0xcad0, 0xcad2, 0xcad4, 0xcad5, 0xcad6, 0xcad7, 0xcada, 0xcadb, 0xcadc, 0xcadd, 0xcade, 0xcadf, 0xcae1, 0xcae2, 0xcae3, 0xcae4, 0xcae5, 0xcae6, 0xcae7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcae8, 0xcae9, 0xcaea, 0xcaeb, 0xcaed, 0xcaee, 0xcaef, 0xcaf0, 0xcaf1, 0xcaf2, 0xcaf3, 0xcaf5, 0xcaf6, 0xcaf7, 0xcaf8, 0xcaf9, 0xcafa, 0xcafb, 0xcafc, 0xcafd, 0xcafe, 0xcaff, 0xcb00, 0xcb01, 0xcb02, 0xcb03, 0xcb04, 0xcb05, 0xcb06, 0xcb07, 0xcb09, 0xcb0a, 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542, 0x2512, 0x2511, 0x251a, 0x2519, 0x2516, 0x2515, 0x250e, 0x250d, 0x251e, 0x251f, 0x2521, 0x2522, 0x2526, 0x2527, 0x2529, 0x252a, 0x252d, 0x252e, 0x2531, 0x2532, 0x2535, 0x2536, 0x2539, 0x253a, 0x253d, 0x253e, 0x2540, 0x2541, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ 176 ] = { 0xfffd, 0xcb0b, 0xcb0c, 0xcb0d, 0xcb0e, 0xcb0f, 0xcb11, 0xcb12, 0xcb13, 0xcb15, 0xcb16, 0xcb17, 0xcb19, 0xcb1a, 0xcb1b, 0xcb1c, 0xcb1d, 0xcb1e, 0xcb1f, 0xcb22, 0xcb23, 0xcb24, 0xcb25, 0xcb26, 0xcb27, 0xcb28, 0xcb29, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcb2a, 0xcb2b, 0xcb2c, 0xcb2d, 0xcb2e, 0xcb2f, 0xcb30, 0xcb31, 0xcb32, 0xcb33, 0xcb34, 0xcb35, 0xcb36, 0xcb37, 0xcb38, 0xcb39, 0xcb3a, 0xcb3b, 0xcb3c, 0xcb3d, 0xcb3e, 0xcb3f, 0xcb40, 0xcb42, 0xcb43, 0xcb44, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcb45, 0xcb46, 0xcb47, 0xcb4a, 0xcb4b, 0xcb4d, 0xcb4e, 0xcb4f, 0xcb51, 0xcb52, 0xcb53, 0xcb54, 0xcb55, 0xcb56, 0xcb57, 0xcb5a, 0xcb5b, 0xcb5c, 0xcb5e, 0xcb5f, 0xcb60, 0xcb61, 0xcb62, 0xcb63, 0xcb65, 0xcb66, 0xcb67, 0xcb68, 0xcb69, 0xcb6a, 0xcb6b, 0xcb6c, 0x3395, 0x3396, 0x3397, 0x2113, 0x3398, 0x33c4, 0x33a3, 0x33a4, 0x33a5, 0x33a6, 0x3399, 0x339a, 0x339b, 0x339c, 0x339d, 0x339e, 0x339f, 0x33a0, 0x33a1, 0x33a2, 0x33ca, 0x338d, 0x338e, 0x338f, 0x33cf, 0x3388, 0x3389, 0x33c8, 0x33a7, 0x33a8, 0x33b0, 0x33b1, 0x33b2, 0x33b3, 0x33b4, 0x33b5, 0x33b6, 0x33b7, 0x33b8, 0x33b9, 0x3380, 0x3381, 0x3382, 0x3383, 0x3384, 0x33ba, 0x33bb, 0x33bc, 0x33bd, 0x33be, 0x33bf, 0x3390, 0x3391, 0x3392, 0x3393, 0x3394, 0x2126, 0x33c0, 0x33c1, 0x338a, 0x338b, 0x338c, 0x33d6, 0x33c5, 0x33ad, 0x33ae, 0x33af, 0x33db, 0x33a9, 0x33aa, 0x33ab, 0x33ac, 0x33dd, 0x33d0, 0x33d3, 0x33c3, 0x33c9, 0x33dc, 0x33c6 }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ 192 ] = { 0xfffd, 0xcb6d, 0xcb6e, 0xcb6f, 0xcb70, 0xcb71, 0xcb72, 0xcb73, 0xcb74, 0xcb75, 0xcb76, 0xcb77, 0xcb7a, 0xcb7b, 0xcb7c, 0xcb7d, 0xcb7e, 0xcb7f, 0xcb80, 0xcb81, 0xcb82, 0xcb83, 0xcb84, 0xcb85, 0xcb86, 0xcb87, 0xcb88, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcb89, 0xcb8a, 0xcb8b, 0xcb8c, 0xcb8d, 0xcb8e, 0xcb8f, 0xcb90, 0xcb91, 0xcb92, 0xcb93, 0xcb94, 0xcb95, 0xcb96, 0xcb97, 0xcb98, 0xcb99, 0xcb9a, 0xcb9b, 0xcb9d, 0xcb9e, 0xcb9f, 0xcba0, 0xcba1, 0xcba2, 0xcba3, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcba4, 0xcba5, 0xcba6, 0xcba7, 0xcba8, 0xcba9, 0xcbaa, 0xcbab, 0xcbac, 0xcbad, 0xcbae, 0xcbaf, 0xcbb0, 0xcbb1, 0xcbb2, 0xcbb3, 0xcbb4, 0xcbb5, 0xcbb6, 0xcbb7, 0xcbb9, 0xcbba, 0xcbbb, 0xcbbc, 0xcbbd, 0xcbbe, 0xcbbf, 0xcbc0, 0xcbc1, 0xcbc2, 0xcbc3, 0xcbc4, 0x00c6, 0x00d0, 0x00aa, 0x0126, 0xfffd, 0x0132, 0xfffd, 0x013f, 0x0141, 0x00d8, 0x0152, 0x00ba, 0x00de, 0x0166, 0x014a, 0xfffd, 0x3260, 0x3261, 0x3262, 0x3263, 0x3264, 0x3265, 0x3266, 0x3267, 0x3268, 0x3269, 0x326a, 0x326b, 0x326c, 0x326d, 0x326e, 0x326f, 0x3270, 0x3271, 0x3272, 0x3273, 0x3274, 0x3275, 0x3276, 0x3277, 0x3278, 0x3279, 0x327a, 0x327b, 0x24d0, 0x24d1, 0x24d2, 0x24d3, 0x24d4, 0x24d5, 0x24d6, 0x24d7, 0x24d8, 0x24d9, 0x24da, 0x24db, 0x24dc, 0x24dd, 0x24de, 0x24df, 0x24e0, 0x24e1, 0x24e2, 0x24e3, 0x24e4, 0x24e5, 0x24e6, 0x24e7, 0x24e8, 0x24e9, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0x246a, 0x246b, 0x246c, 0x246d, 0x246e, 0x00bd, 0x2153, 0x2154, 0x00bc, 0x00be, 0x215b, 0x215c, 0x215d, 0x215e, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ 192 ] = { 0xfffd, 0xcbc5, 0xcbc6, 0xcbc7, 0xcbc8, 0xcbc9, 0xcbca, 0xcbcb, 0xcbcc, 0xcbcd, 0xcbce, 0xcbcf, 0xcbd0, 0xcbd1, 0xcbd2, 0xcbd3, 0xcbd5, 0xcbd6, 0xcbd7, 0xcbd8, 0xcbd9, 0xcbda, 0xcbdb, 0xcbdc, 0xcbdd, 0xcbde, 0xcbdf, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcbe0, 0xcbe1, 0xcbe2, 0xcbe3, 0xcbe5, 0xcbe6, 0xcbe8, 0xcbea, 0xcbeb, 0xcbec, 0xcbed, 0xcbee, 0xcbef, 0xcbf0, 0xcbf1, 0xcbf2, 0xcbf3, 0xcbf4, 0xcbf5, 0xcbf6, 0xcbf7, 0xcbf8, 0xcbf9, 0xcbfa, 0xcbfb, 0xcbfc, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcbfd, 0xcbfe, 0xcbff, 0xcc00, 0xcc01, 0xcc02, 0xcc03, 0xcc04, 0xcc05, 0xcc06, 0xcc07, 0xcc08, 0xcc09, 0xcc0a, 0xcc0b, 0xcc0e, 0xcc0f, 0xcc11, 0xcc12, 0xcc13, 0xcc15, 0xcc16, 0xcc17, 0xcc18, 0xcc19, 0xcc1a, 0xcc1b, 0xcc1e, 0xcc1f, 0xcc20, 0xcc23, 0xcc24, 0x00e6, 0x0111, 0x00f0, 0x0127, 0x0131, 0x0133, 0x0138, 0x0140, 0x0142, 0x00f8, 0x0153, 0x00df, 0x00fe, 0x0167, 0x014b, 0x0149, 0x3200, 0x3201, 0x3202, 0x3203, 0x3204, 0x3205, 0x3206, 0x3207, 0x3208, 0x3209, 0x320a, 0x320b, 0x320c, 0x320d, 0x320e, 0x320f, 0x3210, 0x3211, 0x3212, 0x3213, 0x3214, 0x3215, 0x3216, 0x3217, 0x3218, 0x3219, 0x321a, 0x321b, 0x249c, 0x249d, 0x249e, 0x249f, 0x24a0, 0x24a1, 0x24a2, 0x24a3, 0x24a4, 0x24a5, 0x24a6, 0x24a7, 0x24a8, 0x24a9, 0x24aa, 0x24ab, 0x24ac, 0x24ad, 0x24ae, 0x24af, 0x24b0, 0x24b1, 0x24b2, 0x24b3, 0x24b4, 0x24b5, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x00b9, 0x00b2, 0x00b3, 0x2074, 0x207f, 0x2081, 0x2082, 0x2083, 0x2084, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ 184 ] = { 0xfffd, 0xcc25, 0xcc26, 0xcc2a, 0xcc2b, 0xcc2d, 0xcc2f, 0xcc31, 0xcc32, 0xcc33, 0xcc34, 0xcc35, 0xcc36, 0xcc37, 0xcc3a, 0xcc3f, 0xcc40, 0xcc41, 0xcc42, 0xcc43, 0xcc46, 0xcc47, 0xcc49, 0xcc4a, 0xcc4b, 0xcc4d, 0xcc4e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcc4f, 0xcc50, 0xcc51, 0xcc52, 0xcc53, 0xcc56, 0xcc5a, 0xcc5b, 0xcc5c, 0xcc5d, 0xcc5e, 0xcc5f, 0xcc61, 0xcc62, 0xcc63, 0xcc65, 0xcc67, 0xcc69, 0xcc6a, 0xcc6b, 0xcc6c, 0xcc6d, 0xcc6e, 0xcc6f, 0xcc71, 0xcc72, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcc73, 0xcc74, 0xcc76, 0xcc77, 0xcc78, 0xcc79, 0xcc7a, 0xcc7b, 0xcc7c, 0xcc7d, 0xcc7e, 0xcc7f, 0xcc80, 0xcc81, 0xcc82, 0xcc83, 0xcc84, 0xcc85, 0xcc86, 0xcc87, 0xcc88, 0xcc89, 0xcc8a, 0xcc8b, 0xcc8c, 0xcc8d, 0xcc8e, 0xcc8f, 0xcc90, 0xcc91, 0xcc92, 0xcc93, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ 184 ] = { 0xfffd, 0xcc94, 0xcc95, 0xcc96, 0xcc97, 0xcc9a, 0xcc9b, 0xcc9d, 0xcc9e, 0xcc9f, 0xcca1, 0xcca2, 0xcca3, 0xcca4, 0xcca5, 0xcca6, 0xcca7, 0xccaa, 0xccae, 0xccaf, 0xccb0, 0xccb1, 0xccb2, 0xccb3, 0xccb6, 0xccb7, 0xccb9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xccba, 0xccbb, 0xccbd, 0xccbe, 0xccbf, 0xccc0, 0xccc1, 0xccc2, 0xccc3, 0xccc6, 0xccc8, 0xccca, 0xcccb, 0xcccc, 0xcccd, 0xccce, 0xcccf, 0xccd1, 0xccd2, 0xccd3, 0xccd5, 0xccd6, 0xccd7, 0xccd8, 0xccd9, 0xccda, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xccdb, 0xccdc, 0xccdd, 0xccde, 0xccdf, 0xcce0, 0xcce1, 0xcce2, 0xcce3, 0xcce5, 0xcce6, 0xcce7, 0xcce8, 0xcce9, 0xccea, 0xcceb, 0xcced, 0xccee, 0xccef, 0xccf1, 0xccf2, 0xccf3, 0xccf4, 0xccf5, 0xccf6, 0xccf7, 0xccf8, 0xccf9, 0xccfa, 0xccfb, 0xccfc, 0xccfd, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xac40[ 136 ] = { 0xfffd, 0xccfe, 0xccff, 0xcd00, 0xcd02, 0xcd03, 0xcd04, 0xcd05, 0xcd06, 0xcd07, 0xcd0a, 0xcd0b, 0xcd0d, 0xcd0e, 0xcd0f, 0xcd11, 0xcd12, 0xcd13, 0xcd14, 0xcd15, 0xcd16, 0xcd17, 0xcd1a, 0xcd1c, 0xcd1e, 0xcd1f, 0xcd20, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcd21, 0xcd22, 0xcd23, 0xcd25, 0xcd26, 0xcd27, 0xcd29, 0xcd2a, 0xcd2b, 0xcd2d, 0xcd2e, 0xcd2f, 0xcd30, 0xcd31, 0xcd32, 0xcd33, 0xcd34, 0xcd35, 0xcd36, 0xcd37, 0xcd38, 0xcd3a, 0xcd3b, 0xcd3c, 0xcd3d, 0xcd3e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcd3f, 0xcd40, 0xcd41, 0xcd42, 0xcd43, 0xcd44, 0xcd45, 0xcd46, 0xcd47, 0xcd48, 0xcd49, 0xcd4a, 0xcd4b, 0xcd4c, 0xcd4d, 0xcd4e, 0xcd4f, 0xcd50, 0xcd51, 0xcd52, 0xcd53, 0xcd54, 0xcd55, 0xcd56, 0xcd57, 0xcd58, 0xcd59, 0xcd5a, 0xcd5b, 0xcd5d, 0xcd5e, 0xcd5f, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ 40 ] = { 0xfffd, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ 96 ] = { 0xfffd, 0xcd61, 0xcd62, 0xcd63, 0xcd65, 0xcd66, 0xcd67, 0xcd68, 0xcd69, 0xcd6a, 0xcd6b, 0xcd6e, 0xcd70, 0xcd72, 0xcd73, 0xcd74, 0xcd75, 0xcd76, 0xcd77, 0xcd79, 0xcd7a, 0xcd7b, 0xcd7c, 0xcd7d, 0xcd7e, 0xcd7f, 0xcd80, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcd81, 0xcd82, 0xcd83, 0xcd84, 0xcd85, 0xcd86, 0xcd87, 0xcd89, 0xcd8a, 0xcd8b, 0xcd8c, 0xcd8d, 0xcd8e, 0xcd8f, 0xcd90, 0xcd91, 0xcd92, 0xcd93, 0xcd96, 0xcd97, 0xcd99, 0xcd9a, 0xcd9b, 0xcd9d, 0xcd9e, 0xcd9f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcda0, 0xcda1, 0xcda2, 0xcda3, 0xcda6, 0xcda8, 0xcdaa, 0xcdab, 0xcdac, 0xcdad, 0xcdae, 0xcdaf, 0xcdb1, 0xcdb2, 0xcdb3, 0xcdb4, 0xcdb5, 0xcdb6, 0xcdb7, 0xcdb8, 0xcdb9, 0xcdba, 0xcdbb, 0xcdbc, 0xcdbd, 0xcdbe, 0xcdbf, 0xcdc0, 0xcdc1, 0xcdc2, 0xcdc3 }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ 96 ] = { 0xfffd, 0xcdc6, 0xcdc7, 0xcdc8, 0xcdc9, 0xcdca, 0xcdcb, 0xcdcd, 0xcdce, 0xcdcf, 0xcdd1, 0xcdd2, 0xcdd3, 0xcdd4, 0xcdd5, 0xcdd6, 0xcdd7, 0xcdd8, 0xcdd9, 0xcdda, 0xcddb, 0xcddc, 0xcddd, 0xcdde, 0xcddf, 0xcde0, 0xcde1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcde2, 0xcde3, 0xcde4, 0xcde5, 0xcde6, 0xcde7, 0xcde9, 0xcdea, 0xcdeb, 0xcded, 0xcdee, 0xcdef, 0xcdf1, 0xcdf2, 0xcdf3, 0xcdf4, 0xcdf5, 0xcdf6, 0xcdf7, 0xcdfa, 0xcdfc, 0xcdfe, 0xcdff, 0xce00, 0xce01, 0xce02, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xce03, 0xce05, 0xce06, 0xce07, 0xce09, 0xce0a, 0xce0b, 0xce0d, 0xce0e, 0xce0f, 0xce10, 0xce11, 0xce12, 0xce13, 0xce15, 0xce16, 0xce17, 0xce18, 0xce1a, 0xce1b, 0xce1c, 0xce1d, 0xce1e, 0xce1f, 0xce22, 0xce23, 0xce25, 0xce26, 0xce27, 0xce29, 0xce2a }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ 96 ] = { 0xfffd, 0xce2c, 0xce2d, 0xce2e, 0xce2f, 0xce32, 0xce34, 0xce36, 0xce37, 0xce38, 0xce39, 0xce3a, 0xce3b, 0xce3c, 0xce3d, 0xce3e, 0xce3f, 0xce40, 0xce41, 0xce42, 0xce43, 0xce44, 0xce45, 0xce46, 0xce47, 0xce48, 0xce49, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xce4a, 0xce4b, 0xce4c, 0xce4d, 0xce4e, 0xce4f, 0xce50, 0xce51, 0xce52, 0xce53, 0xce54, 0xce55, 0xce56, 0xce57, 0xce5a, 0xce5b, 0xce5d, 0xce5e, 0xce62, 0xce63, 0xce64, 0xce65, 0xce66, 0xce67, 0xce6a, 0xce6c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xce6e, 0xce6f, 0xce70, 0xce71, 0xce72, 0xce73, 0xce76, 0xce77, 0xce79, 0xce7a, 0xce7b, 0xce7d, 0xce7e, 0xce7f, 0xce80, 0xce81, 0xce82, 0xce83, 0xce86, 0xce88, 0xce8a, 0xce8b, 0xce8c, 0xce8d, 0xce8e, 0xce8f, 0xce92, 0xce93, 0xce95, 0xce96, 0xce97 }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ 192 ] = { 0xfffd, 0xce9a, 0xce9b, 0xce9c, 0xce9d, 0xce9e, 0xce9f, 0xcea2, 0xcea6, 0xcea7, 0xcea8, 0xcea9, 0xceaa, 0xceab, 0xceae, 0xceaf, 0xceb0, 0xceb1, 0xceb2, 0xceb3, 0xceb4, 0xceb5, 0xceb6, 0xceb7, 0xceb8, 0xceb9, 0xceba, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcebb, 0xcebc, 0xcebd, 0xcebe, 0xcebf, 0xcec0, 0xcec2, 0xcec3, 0xcec4, 0xcec5, 0xcec6, 0xcec7, 0xcec8, 0xcec9, 0xceca, 0xcecb, 0xcecc, 0xcecd, 0xcece, 0xcecf, 0xced0, 0xced1, 0xced2, 0xced3, 0xced4, 0xced5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xced6, 0xced7, 0xced8, 0xced9, 0xceda, 0xcedb, 0xcedc, 0xcedd, 0xcede, 0xcedf, 0xcee0, 0xcee1, 0xcee2, 0xcee3, 0xcee6, 0xcee7, 0xcee9, 0xceea, 0xceed, 0xceee, 0xceef, 0xcef0, 0xcef1, 0xcef2, 0xcef3, 0xcef6, 0xcefa, 0xcefb, 0xcefc, 0xcefd, 0xcefe, 0xceff, 0xac00, 0xac01, 0xac04, 0xac07, 0xac08, 0xac09, 0xac0a, 0xac10, 0xac11, 0xac12, 0xac13, 0xac14, 0xac15, 0xac16, 0xac17, 0xac19, 0xac1a, 0xac1b, 0xac1c, 0xac1d, 0xac20, 0xac24, 0xac2c, 0xac2d, 0xac2f, 0xac30, 0xac31, 0xac38, 0xac39, 0xac3c, 0xac40, 0xac4b, 0xac4d, 0xac54, 0xac58, 0xac5c, 0xac70, 0xac71, 0xac74, 0xac77, 0xac78, 0xac7a, 0xac80, 0xac81, 0xac83, 0xac84, 0xac85, 0xac86, 0xac89, 0xac8a, 0xac8b, 0xac8c, 0xac90, 0xac94, 0xac9c, 0xac9d, 0xac9f, 0xaca0, 0xaca1, 0xaca8, 0xaca9, 0xacaa, 0xacac, 0xacaf, 0xacb0, 0xacb8, 0xacb9, 0xacbb, 0xacbc, 0xacbd, 0xacc1, 0xacc4, 0xacc8, 0xaccc, 0xacd5, 0xacd7, 0xace0, 0xace1, 0xace4, 0xace7, 0xace8, 0xacea, 0xacec, 0xacef, 0xacf0, 0xacf1, 0xacf3, 0xacf5, 0xacf6, 0xacfc, 0xacfd, 0xad00, 0xad04, 0xad06, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ 192 ] = { 0xfffd, 0xcf02, 0xcf03, 0xcf05, 0xcf06, 0xcf07, 0xcf09, 0xcf0a, 0xcf0b, 0xcf0c, 0xcf0d, 0xcf0e, 0xcf0f, 0xcf12, 0xcf14, 0xcf16, 0xcf17, 0xcf18, 0xcf19, 0xcf1a, 0xcf1b, 0xcf1d, 0xcf1e, 0xcf1f, 0xcf21, 0xcf22, 0xcf23, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcf25, 0xcf26, 0xcf27, 0xcf28, 0xcf29, 0xcf2a, 0xcf2b, 0xcf2e, 0xcf32, 0xcf33, 0xcf34, 0xcf35, 0xcf36, 0xcf37, 0xcf39, 0xcf3a, 0xcf3b, 0xcf3c, 0xcf3d, 0xcf3e, 0xcf3f, 0xcf40, 0xcf41, 0xcf42, 0xcf43, 0xcf44, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcf45, 0xcf46, 0xcf47, 0xcf48, 0xcf49, 0xcf4a, 0xcf4b, 0xcf4c, 0xcf4d, 0xcf4e, 0xcf4f, 0xcf50, 0xcf51, 0xcf52, 0xcf53, 0xcf56, 0xcf57, 0xcf59, 0xcf5a, 0xcf5b, 0xcf5d, 0xcf5e, 0xcf5f, 0xcf60, 0xcf61, 0xcf62, 0xcf63, 0xcf66, 0xcf68, 0xcf6a, 0xcf6b, 0xcf6c, 0xad0c, 0xad0d, 0xad0f, 0xad11, 0xad18, 0xad1c, 0xad20, 0xad29, 0xad2c, 0xad2d, 0xad34, 0xad35, 0xad38, 0xad3c, 0xad44, 0xad45, 0xad47, 0xad49, 0xad50, 0xad54, 0xad58, 0xad61, 0xad63, 0xad6c, 0xad6d, 0xad70, 0xad73, 0xad74, 0xad75, 0xad76, 0xad7b, 0xad7c, 0xad7d, 0xad7f, 0xad81, 0xad82, 0xad88, 0xad89, 0xad8c, 0xad90, 0xad9c, 0xad9d, 0xada4, 0xadb7, 0xadc0, 0xadc1, 0xadc4, 0xadc8, 0xadd0, 0xadd1, 0xadd3, 0xaddc, 0xade0, 0xade4, 0xadf8, 0xadf9, 0xadfc, 0xadff, 0xae00, 0xae01, 0xae08, 0xae09, 0xae0b, 0xae0d, 0xae14, 0xae30, 0xae31, 0xae34, 0xae37, 0xae38, 0xae3a, 0xae40, 0xae41, 0xae43, 0xae45, 0xae46, 0xae4a, 0xae4c, 0xae4d, 0xae4e, 0xae50, 0xae54, 0xae56, 0xae5c, 0xae5d, 0xae5f, 0xae60, 0xae61, 0xae65, 0xae68, 0xae69, 0xae6c, 0xae70, 0xae78, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ 192 ] = { 0xfffd, 0xcf6d, 0xcf6e, 0xcf6f, 0xcf72, 0xcf73, 0xcf75, 0xcf76, 0xcf77, 0xcf79, 0xcf7a, 0xcf7b, 0xcf7c, 0xcf7d, 0xcf7e, 0xcf7f, 0xcf81, 0xcf82, 0xcf83, 0xcf84, 0xcf86, 0xcf87, 0xcf88, 0xcf89, 0xcf8a, 0xcf8b, 0xcf8d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcf8e, 0xcf8f, 0xcf90, 0xcf91, 0xcf92, 0xcf93, 0xcf94, 0xcf95, 0xcf96, 0xcf97, 0xcf98, 0xcf99, 0xcf9a, 0xcf9b, 0xcf9c, 0xcf9d, 0xcf9e, 0xcf9f, 0xcfa0, 0xcfa2, 0xcfa3, 0xcfa4, 0xcfa5, 0xcfa6, 0xcfa7, 0xcfa9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcfaa, 0xcfab, 0xcfac, 0xcfad, 0xcfae, 0xcfaf, 0xcfb1, 0xcfb2, 0xcfb3, 0xcfb4, 0xcfb5, 0xcfb6, 0xcfb7, 0xcfb8, 0xcfb9, 0xcfba, 0xcfbb, 0xcfbc, 0xcfbd, 0xcfbe, 0xcfbf, 0xcfc0, 0xcfc1, 0xcfc2, 0xcfc3, 0xcfc5, 0xcfc6, 0xcfc7, 0xcfc8, 0xcfc9, 0xcfca, 0xcfcb, 0xae79, 0xae7b, 0xae7c, 0xae7d, 0xae84, 0xae85, 0xae8c, 0xaebc, 0xaebd, 0xaebe, 0xaec0, 0xaec4, 0xaecc, 0xaecd, 0xaecf, 0xaed0, 0xaed1, 0xaed8, 0xaed9, 0xaedc, 0xaee8, 0xaeeb, 0xaeed, 0xaef4, 0xaef8, 0xaefc, 0xaf07, 0xaf08, 0xaf0d, 0xaf10, 0xaf2c, 0xaf2d, 0xaf30, 0xaf32, 0xaf34, 0xaf3c, 0xaf3d, 0xaf3f, 0xaf41, 0xaf42, 0xaf43, 0xaf48, 0xaf49, 0xaf50, 0xaf5c, 0xaf5d, 0xaf64, 0xaf65, 0xaf79, 0xaf80, 0xaf84, 0xaf88, 0xaf90, 0xaf91, 0xaf95, 0xaf9c, 0xafb8, 0xafb9, 0xafbc, 0xafc0, 0xafc7, 0xafc8, 0xafc9, 0xafcb, 0xafcd, 0xafce, 0xafd4, 0xafdc, 0xafe8, 0xafe9, 0xaff0, 0xaff1, 0xaff4, 0xaff8, 0xb000, 0xb001, 0xb004, 0xb00c, 0xb010, 0xb014, 0xb01c, 0xb01d, 0xb028, 0xb044, 0xb045, 0xb048, 0xb04a, 0xb04c, 0xb04e, 0xb053, 0xb054, 0xb055, 0xb057, 0xb059, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ 192 ] = { 0xfffd, 0xcfcc, 0xcfcd, 0xcfce, 0xcfcf, 0xcfd0, 0xcfd1, 0xcfd2, 0xcfd3, 0xcfd4, 0xcfd5, 0xcfd6, 0xcfd7, 0xcfd8, 0xcfd9, 0xcfda, 0xcfdb, 0xcfdc, 0xcfdd, 0xcfde, 0xcfdf, 0xcfe2, 0xcfe3, 0xcfe5, 0xcfe6, 0xcfe7, 0xcfe9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xcfea, 0xcfeb, 0xcfec, 0xcfed, 0xcfee, 0xcfef, 0xcff2, 0xcff4, 0xcff6, 0xcff7, 0xcff8, 0xcff9, 0xcffa, 0xcffb, 0xcffd, 0xcffe, 0xcfff, 0xd001, 0xd002, 0xd003, 0xd005, 0xd006, 0xd007, 0xd008, 0xd009, 0xd00a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd00b, 0xd00c, 0xd00d, 0xd00e, 0xd00f, 0xd010, 0xd012, 0xd013, 0xd014, 0xd015, 0xd016, 0xd017, 0xd019, 0xd01a, 0xd01b, 0xd01c, 0xd01d, 0xd01e, 0xd01f, 0xd020, 0xd021, 0xd022, 0xd023, 0xd024, 0xd025, 0xd026, 0xd027, 0xd028, 0xd029, 0xd02a, 0xd02b, 0xd02c, 0xb05d, 0xb07c, 0xb07d, 0xb080, 0xb084, 0xb08c, 0xb08d, 0xb08f, 0xb091, 0xb098, 0xb099, 0xb09a, 0xb09c, 0xb09f, 0xb0a0, 0xb0a1, 0xb0a2, 0xb0a8, 0xb0a9, 0xb0ab, 0xb0ac, 0xb0ad, 0xb0ae, 0xb0af, 0xb0b1, 0xb0b3, 0xb0b4, 0xb0b5, 0xb0b8, 0xb0bc, 0xb0c4, 0xb0c5, 0xb0c7, 0xb0c8, 0xb0c9, 0xb0d0, 0xb0d1, 0xb0d4, 0xb0d8, 0xb0e0, 0xb0e5, 0xb108, 0xb109, 0xb10b, 0xb10c, 0xb110, 0xb112, 0xb113, 0xb118, 0xb119, 0xb11b, 0xb11c, 0xb11d, 0xb123, 0xb124, 0xb125, 0xb128, 0xb12c, 0xb134, 0xb135, 0xb137, 0xb138, 0xb139, 0xb140, 0xb141, 0xb144, 0xb148, 0xb150, 0xb151, 0xb154, 0xb155, 0xb158, 0xb15c, 0xb160, 0xb178, 0xb179, 0xb17c, 0xb180, 0xb182, 0xb188, 0xb189, 0xb18b, 0xb18d, 0xb192, 0xb193, 0xb194, 0xb198, 0xb19c, 0xb1a8, 0xb1cc, 0xb1d0, 0xb1d4, 0xb1dc, 0xb1dd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ 192 ] = { 0xfffd, 0xd02e, 0xd02f, 0xd030, 0xd031, 0xd032, 0xd033, 0xd036, 0xd037, 0xd039, 0xd03a, 0xd03b, 0xd03d, 0xd03e, 0xd03f, 0xd040, 0xd041, 0xd042, 0xd043, 0xd046, 0xd048, 0xd04a, 0xd04b, 0xd04c, 0xd04d, 0xd04e, 0xd04f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd051, 0xd052, 0xd053, 0xd055, 0xd056, 0xd057, 0xd059, 0xd05a, 0xd05b, 0xd05c, 0xd05d, 0xd05e, 0xd05f, 0xd061, 0xd062, 0xd063, 0xd064, 0xd065, 0xd066, 0xd067, 0xd068, 0xd069, 0xd06a, 0xd06b, 0xd06e, 0xd06f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd071, 0xd072, 0xd073, 0xd075, 0xd076, 0xd077, 0xd078, 0xd079, 0xd07a, 0xd07b, 0xd07e, 0xd07f, 0xd080, 0xd082, 0xd083, 0xd084, 0xd085, 0xd086, 0xd087, 0xd088, 0xd089, 0xd08a, 0xd08b, 0xd08c, 0xd08d, 0xd08e, 0xd08f, 0xd090, 0xd091, 0xd092, 0xd093, 0xd094, 0xb1df, 0xb1e8, 0xb1e9, 0xb1ec, 0xb1f0, 0xb1f9, 0xb1fb, 0xb1fd, 0xb204, 0xb205, 0xb208, 0xb20b, 0xb20c, 0xb214, 0xb215, 0xb217, 0xb219, 0xb220, 0xb234, 0xb23c, 0xb258, 0xb25c, 0xb260, 0xb268, 0xb269, 0xb274, 0xb275, 0xb27c, 0xb284, 0xb285, 0xb289, 0xb290, 0xb291, 0xb294, 0xb298, 0xb299, 0xb29a, 0xb2a0, 0xb2a1, 0xb2a3, 0xb2a5, 0xb2a6, 0xb2aa, 0xb2ac, 0xb2b0, 0xb2b4, 0xb2c8, 0xb2c9, 0xb2cc, 0xb2d0, 0xb2d2, 0xb2d8, 0xb2d9, 0xb2db, 0xb2dd, 0xb2e2, 0xb2e4, 0xb2e5, 0xb2e6, 0xb2e8, 0xb2eb, 0xb2ec, 0xb2ed, 0xb2ee, 0xb2ef, 0xb2f3, 0xb2f4, 0xb2f5, 0xb2f7, 0xb2f8, 0xb2f9, 0xb2fa, 0xb2fb, 0xb2ff, 0xb300, 0xb301, 0xb304, 0xb308, 0xb310, 0xb311, 0xb313, 0xb314, 0xb315, 0xb31c, 0xb354, 0xb355, 0xb356, 0xb358, 0xb35b, 0xb35c, 0xb35e, 0xb35f, 0xb364, 0xb365, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ 192 ] = { 0xfffd, 0xd095, 0xd096, 0xd097, 0xd098, 0xd099, 0xd09a, 0xd09b, 0xd09c, 0xd09d, 0xd09e, 0xd09f, 0xd0a0, 0xd0a1, 0xd0a2, 0xd0a3, 0xd0a6, 0xd0a7, 0xd0a9, 0xd0aa, 0xd0ab, 0xd0ad, 0xd0ae, 0xd0af, 0xd0b0, 0xd0b1, 0xd0b2, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd0b3, 0xd0b6, 0xd0b8, 0xd0ba, 0xd0bb, 0xd0bc, 0xd0bd, 0xd0be, 0xd0bf, 0xd0c2, 0xd0c3, 0xd0c5, 0xd0c6, 0xd0c7, 0xd0ca, 0xd0cb, 0xd0cc, 0xd0cd, 0xd0ce, 0xd0cf, 0xd0d2, 0xd0d6, 0xd0d7, 0xd0d8, 0xd0d9, 0xd0da, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd0db, 0xd0de, 0xd0df, 0xd0e1, 0xd0e2, 0xd0e3, 0xd0e5, 0xd0e6, 0xd0e7, 0xd0e8, 0xd0e9, 0xd0ea, 0xd0eb, 0xd0ee, 0xd0f2, 0xd0f3, 0xd0f4, 0xd0f5, 0xd0f6, 0xd0f7, 0xd0f9, 0xd0fa, 0xd0fb, 0xd0fc, 0xd0fd, 0xd0fe, 0xd0ff, 0xd100, 0xd101, 0xd102, 0xd103, 0xd104, 0xb367, 0xb369, 0xb36b, 0xb36e, 0xb370, 0xb371, 0xb374, 0xb378, 0xb380, 0xb381, 0xb383, 0xb384, 0xb385, 0xb38c, 0xb390, 0xb394, 0xb3a0, 0xb3a1, 0xb3a8, 0xb3ac, 0xb3c4, 0xb3c5, 0xb3c8, 0xb3cb, 0xb3cc, 0xb3ce, 0xb3d0, 0xb3d4, 0xb3d5, 0xb3d7, 0xb3d9, 0xb3db, 0xb3dd, 0xb3e0, 0xb3e4, 0xb3e8, 0xb3fc, 0xb410, 0xb418, 0xb41c, 0xb420, 0xb428, 0xb429, 0xb42b, 0xb434, 0xb450, 0xb451, 0xb454, 0xb458, 0xb460, 0xb461, 0xb463, 0xb465, 0xb46c, 0xb480, 0xb488, 0xb49d, 0xb4a4, 0xb4a8, 0xb4ac, 0xb4b5, 0xb4b7, 0xb4b9, 0xb4c0, 0xb4c4, 0xb4c8, 0xb4d0, 0xb4d5, 0xb4dc, 0xb4dd, 0xb4e0, 0xb4e3, 0xb4e4, 0xb4e6, 0xb4ec, 0xb4ed, 0xb4ef, 0xb4f1, 0xb4f8, 0xb514, 0xb515, 0xb518, 0xb51b, 0xb51c, 0xb524, 0xb525, 0xb527, 0xb528, 0xb529, 0xb52a, 0xb530, 0xb531, 0xb534, 0xb538, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ 192 ] = { 0xfffd, 0xd105, 0xd106, 0xd107, 0xd108, 0xd109, 0xd10a, 0xd10b, 0xd10c, 0xd10e, 0xd10f, 0xd110, 0xd111, 0xd112, 0xd113, 0xd114, 0xd115, 0xd116, 0xd117, 0xd118, 0xd119, 0xd11a, 0xd11b, 0xd11c, 0xd11d, 0xd11e, 0xd11f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd120, 0xd121, 0xd122, 0xd123, 0xd124, 0xd125, 0xd126, 0xd127, 0xd128, 0xd129, 0xd12a, 0xd12b, 0xd12c, 0xd12d, 0xd12e, 0xd12f, 0xd132, 0xd133, 0xd135, 0xd136, 0xd137, 0xd139, 0xd13b, 0xd13c, 0xd13d, 0xd13e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd13f, 0xd142, 0xd146, 0xd147, 0xd148, 0xd149, 0xd14a, 0xd14b, 0xd14e, 0xd14f, 0xd151, 0xd152, 0xd153, 0xd155, 0xd156, 0xd157, 0xd158, 0xd159, 0xd15a, 0xd15b, 0xd15e, 0xd160, 0xd162, 0xd163, 0xd164, 0xd165, 0xd166, 0xd167, 0xd169, 0xd16a, 0xd16b, 0xd16d, 0xb540, 0xb541, 0xb543, 0xb544, 0xb545, 0xb54b, 0xb54c, 0xb54d, 0xb550, 0xb554, 0xb55c, 0xb55d, 0xb55f, 0xb560, 0xb561, 0xb5a0, 0xb5a1, 0xb5a4, 0xb5a8, 0xb5aa, 0xb5ab, 0xb5b0, 0xb5b1, 0xb5b3, 0xb5b4, 0xb5b5, 0xb5bb, 0xb5bc, 0xb5bd, 0xb5c0, 0xb5c4, 0xb5cc, 0xb5cd, 0xb5cf, 0xb5d0, 0xb5d1, 0xb5d8, 0xb5ec, 0xb610, 0xb611, 0xb614, 0xb618, 0xb625, 0xb62c, 0xb634, 0xb648, 0xb664, 0xb668, 0xb69c, 0xb69d, 0xb6a0, 0xb6a4, 0xb6ab, 0xb6ac, 0xb6b1, 0xb6d4, 0xb6f0, 0xb6f4, 0xb6f8, 0xb700, 0xb701, 0xb705, 0xb728, 0xb729, 0xb72c, 0xb72f, 0xb730, 0xb738, 0xb739, 0xb73b, 0xb744, 0xb748, 0xb74c, 0xb754, 0xb755, 0xb760, 0xb764, 0xb768, 0xb770, 0xb771, 0xb773, 0xb775, 0xb77c, 0xb77d, 0xb780, 0xb784, 0xb78c, 0xb78d, 0xb78f, 0xb790, 0xb791, 0xb792, 0xb796, 0xb797, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ 192 ] = { 0xfffd, 0xd16e, 0xd16f, 0xd170, 0xd171, 0xd172, 0xd173, 0xd174, 0xd175, 0xd176, 0xd177, 0xd178, 0xd179, 0xd17a, 0xd17b, 0xd17d, 0xd17e, 0xd17f, 0xd180, 0xd181, 0xd182, 0xd183, 0xd185, 0xd186, 0xd187, 0xd189, 0xd18a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd18b, 0xd18c, 0xd18d, 0xd18e, 0xd18f, 0xd190, 0xd191, 0xd192, 0xd193, 0xd194, 0xd195, 0xd196, 0xd197, 0xd198, 0xd199, 0xd19a, 0xd19b, 0xd19c, 0xd19d, 0xd19e, 0xd19f, 0xd1a2, 0xd1a3, 0xd1a5, 0xd1a6, 0xd1a7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd1a9, 0xd1aa, 0xd1ab, 0xd1ac, 0xd1ad, 0xd1ae, 0xd1af, 0xd1b2, 0xd1b4, 0xd1b6, 0xd1b7, 0xd1b8, 0xd1b9, 0xd1bb, 0xd1bd, 0xd1be, 0xd1bf, 0xd1c1, 0xd1c2, 0xd1c3, 0xd1c4, 0xd1c5, 0xd1c6, 0xd1c7, 0xd1c8, 0xd1c9, 0xd1ca, 0xd1cb, 0xd1cc, 0xd1cd, 0xd1ce, 0xd1cf, 0xb798, 0xb799, 0xb79c, 0xb7a0, 0xb7a8, 0xb7a9, 0xb7ab, 0xb7ac, 0xb7ad, 0xb7b4, 0xb7b5, 0xb7b8, 0xb7c7, 0xb7c9, 0xb7ec, 0xb7ed, 0xb7f0, 0xb7f4, 0xb7fc, 0xb7fd, 0xb7ff, 0xb800, 0xb801, 0xb807, 0xb808, 0xb809, 0xb80c, 0xb810, 0xb818, 0xb819, 0xb81b, 0xb81d, 0xb824, 0xb825, 0xb828, 0xb82c, 0xb834, 0xb835, 0xb837, 0xb838, 0xb839, 0xb840, 0xb844, 0xb851, 0xb853, 0xb85c, 0xb85d, 0xb860, 0xb864, 0xb86c, 0xb86d, 0xb86f, 0xb871, 0xb878, 0xb87c, 0xb88d, 0xb8a8, 0xb8b0, 0xb8b4, 0xb8b8, 0xb8c0, 0xb8c1, 0xb8c3, 0xb8c5, 0xb8cc, 0xb8d0, 0xb8d4, 0xb8dd, 0xb8df, 0xb8e1, 0xb8e8, 0xb8e9, 0xb8ec, 0xb8f0, 0xb8f8, 0xb8f9, 0xb8fb, 0xb8fd, 0xb904, 0xb918, 0xb920, 0xb93c, 0xb93d, 0xb940, 0xb944, 0xb94c, 0xb94f, 0xb951, 0xb958, 0xb959, 0xb95c, 0xb960, 0xb968, 0xb969, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ 192 ] = { 0xfffd, 0xd1d0, 0xd1d1, 0xd1d2, 0xd1d3, 0xd1d4, 0xd1d5, 0xd1d6, 0xd1d7, 0xd1d9, 0xd1da, 0xd1db, 0xd1dc, 0xd1dd, 0xd1de, 0xd1df, 0xd1e0, 0xd1e1, 0xd1e2, 0xd1e3, 0xd1e4, 0xd1e5, 0xd1e6, 0xd1e7, 0xd1e8, 0xd1e9, 0xd1ea, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd1eb, 0xd1ec, 0xd1ed, 0xd1ee, 0xd1ef, 0xd1f0, 0xd1f1, 0xd1f2, 0xd1f3, 0xd1f5, 0xd1f6, 0xd1f7, 0xd1f9, 0xd1fa, 0xd1fb, 0xd1fc, 0xd1fd, 0xd1fe, 0xd1ff, 0xd200, 0xd201, 0xd202, 0xd203, 0xd204, 0xd205, 0xd206, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd208, 0xd20a, 0xd20b, 0xd20c, 0xd20d, 0xd20e, 0xd20f, 0xd211, 0xd212, 0xd213, 0xd214, 0xd215, 0xd216, 0xd217, 0xd218, 0xd219, 0xd21a, 0xd21b, 0xd21c, 0xd21d, 0xd21e, 0xd21f, 0xd220, 0xd221, 0xd222, 0xd223, 0xd224, 0xd225, 0xd226, 0xd227, 0xd228, 0xd229, 0xb96b, 0xb96d, 0xb974, 0xb975, 0xb978, 0xb97c, 0xb984, 0xb985, 0xb987, 0xb989, 0xb98a, 0xb98d, 0xb98e, 0xb9ac, 0xb9ad, 0xb9b0, 0xb9b4, 0xb9bc, 0xb9bd, 0xb9bf, 0xb9c1, 0xb9c8, 0xb9c9, 0xb9cc, 0xb9ce, 0xb9cf, 0xb9d0, 0xb9d1, 0xb9d2, 0xb9d8, 0xb9d9, 0xb9db, 0xb9dd, 0xb9de, 0xb9e1, 0xb9e3, 0xb9e4, 0xb9e5, 0xb9e8, 0xb9ec, 0xb9f4, 0xb9f5, 0xb9f7, 0xb9f8, 0xb9f9, 0xb9fa, 0xba00, 0xba01, 0xba08, 0xba15, 0xba38, 0xba39, 0xba3c, 0xba40, 0xba42, 0xba48, 0xba49, 0xba4b, 0xba4d, 0xba4e, 0xba53, 0xba54, 0xba55, 0xba58, 0xba5c, 0xba64, 0xba65, 0xba67, 0xba68, 0xba69, 0xba70, 0xba71, 0xba74, 0xba78, 0xba83, 0xba84, 0xba85, 0xba87, 0xba8c, 0xbaa8, 0xbaa9, 0xbaab, 0xbaac, 0xbab0, 0xbab2, 0xbab8, 0xbab9, 0xbabb, 0xbabd, 0xbac4, 0xbac8, 0xbad8, 0xbad9, 0xbafc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ 192 ] = { 0xfffd, 0xd22a, 0xd22b, 0xd22e, 0xd22f, 0xd231, 0xd232, 0xd233, 0xd235, 0xd236, 0xd237, 0xd238, 0xd239, 0xd23a, 0xd23b, 0xd23e, 0xd240, 0xd242, 0xd243, 0xd244, 0xd245, 0xd246, 0xd247, 0xd249, 0xd24a, 0xd24b, 0xd24c, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd24d, 0xd24e, 0xd24f, 0xd250, 0xd251, 0xd252, 0xd253, 0xd254, 0xd255, 0xd256, 0xd257, 0xd258, 0xd259, 0xd25a, 0xd25b, 0xd25d, 0xd25e, 0xd25f, 0xd260, 0xd261, 0xd262, 0xd263, 0xd265, 0xd266, 0xd267, 0xd268, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd269, 0xd26a, 0xd26b, 0xd26c, 0xd26d, 0xd26e, 0xd26f, 0xd270, 0xd271, 0xd272, 0xd273, 0xd274, 0xd275, 0xd276, 0xd277, 0xd278, 0xd279, 0xd27a, 0xd27b, 0xd27c, 0xd27d, 0xd27e, 0xd27f, 0xd282, 0xd283, 0xd285, 0xd286, 0xd287, 0xd289, 0xd28a, 0xd28b, 0xd28c, 0xbb00, 0xbb04, 0xbb0d, 0xbb0f, 0xbb11, 0xbb18, 0xbb1c, 0xbb20, 0xbb29, 0xbb2b, 0xbb34, 0xbb35, 0xbb36, 0xbb38, 0xbb3b, 0xbb3c, 0xbb3d, 0xbb3e, 0xbb44, 0xbb45, 0xbb47, 0xbb49, 0xbb4d, 0xbb4f, 0xbb50, 0xbb54, 0xbb58, 0xbb61, 0xbb63, 0xbb6c, 0xbb88, 0xbb8c, 0xbb90, 0xbba4, 0xbba8, 0xbbac, 0xbbb4, 0xbbb7, 0xbbc0, 0xbbc4, 0xbbc8, 0xbbd0, 0xbbd3, 0xbbf8, 0xbbf9, 0xbbfc, 0xbbff, 0xbc00, 0xbc02, 0xbc08, 0xbc09, 0xbc0b, 0xbc0c, 0xbc0d, 0xbc0f, 0xbc11, 0xbc14, 0xbc15, 0xbc16, 0xbc17, 0xbc18, 0xbc1b, 0xbc1c, 0xbc1d, 0xbc1e, 0xbc1f, 0xbc24, 0xbc25, 0xbc27, 0xbc29, 0xbc2d, 0xbc30, 0xbc31, 0xbc34, 0xbc38, 0xbc40, 0xbc41, 0xbc43, 0xbc44, 0xbc45, 0xbc49, 0xbc4c, 0xbc4d, 0xbc50, 0xbc5d, 0xbc84, 0xbc85, 0xbc88, 0xbc8b, 0xbc8c, 0xbc8e, 0xbc94, 0xbc95, 0xbc97, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ 192 ] = { 0xfffd, 0xd28d, 0xd28e, 0xd28f, 0xd292, 0xd293, 0xd294, 0xd296, 0xd297, 0xd298, 0xd299, 0xd29a, 0xd29b, 0xd29d, 0xd29e, 0xd29f, 0xd2a1, 0xd2a2, 0xd2a3, 0xd2a5, 0xd2a6, 0xd2a7, 0xd2a8, 0xd2a9, 0xd2aa, 0xd2ab, 0xd2ad, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd2ae, 0xd2af, 0xd2b0, 0xd2b2, 0xd2b3, 0xd2b4, 0xd2b5, 0xd2b6, 0xd2b7, 0xd2ba, 0xd2bb, 0xd2bd, 0xd2be, 0xd2c1, 0xd2c3, 0xd2c4, 0xd2c5, 0xd2c6, 0xd2c7, 0xd2ca, 0xd2cc, 0xd2cd, 0xd2ce, 0xd2cf, 0xd2d0, 0xd2d1, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd2d2, 0xd2d3, 0xd2d5, 0xd2d6, 0xd2d7, 0xd2d9, 0xd2da, 0xd2db, 0xd2dd, 0xd2de, 0xd2df, 0xd2e0, 0xd2e1, 0xd2e2, 0xd2e3, 0xd2e6, 0xd2e7, 0xd2e8, 0xd2e9, 0xd2ea, 0xd2eb, 0xd2ec, 0xd2ed, 0xd2ee, 0xd2ef, 0xd2f2, 0xd2f3, 0xd2f5, 0xd2f6, 0xd2f7, 0xd2f9, 0xd2fa, 0xbc99, 0xbc9a, 0xbca0, 0xbca1, 0xbca4, 0xbca7, 0xbca8, 0xbcb0, 0xbcb1, 0xbcb3, 0xbcb4, 0xbcb5, 0xbcbc, 0xbcbd, 0xbcc0, 0xbcc4, 0xbccd, 0xbccf, 0xbcd0, 0xbcd1, 0xbcd5, 0xbcd8, 0xbcdc, 0xbcf4, 0xbcf5, 0xbcf6, 0xbcf8, 0xbcfc, 0xbd04, 0xbd05, 0xbd07, 0xbd09, 0xbd10, 0xbd14, 0xbd24, 0xbd2c, 0xbd40, 0xbd48, 0xbd49, 0xbd4c, 0xbd50, 0xbd58, 0xbd59, 0xbd64, 0xbd68, 0xbd80, 0xbd81, 0xbd84, 0xbd87, 0xbd88, 0xbd89, 0xbd8a, 0xbd90, 0xbd91, 0xbd93, 0xbd95, 0xbd99, 0xbd9a, 0xbd9c, 0xbda4, 0xbdb0, 0xbdb8, 0xbdd4, 0xbdd5, 0xbdd8, 0xbddc, 0xbde9, 0xbdf0, 0xbdf4, 0xbdf8, 0xbe00, 0xbe03, 0xbe05, 0xbe0c, 0xbe0d, 0xbe10, 0xbe14, 0xbe1c, 0xbe1d, 0xbe1f, 0xbe44, 0xbe45, 0xbe48, 0xbe4c, 0xbe4e, 0xbe54, 0xbe55, 0xbe57, 0xbe59, 0xbe5a, 0xbe5b, 0xbe60, 0xbe61, 0xbe64, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ 192 ] = { 0xfffd, 0xd2fb, 0xd2fc, 0xd2fd, 0xd2fe, 0xd2ff, 0xd302, 0xd304, 0xd306, 0xd307, 0xd308, 0xd309, 0xd30a, 0xd30b, 0xd30f, 0xd311, 0xd312, 0xd313, 0xd315, 0xd317, 0xd318, 0xd319, 0xd31a, 0xd31b, 0xd31e, 0xd322, 0xd323, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd324, 0xd326, 0xd327, 0xd32a, 0xd32b, 0xd32d, 0xd32e, 0xd32f, 0xd331, 0xd332, 0xd333, 0xd334, 0xd335, 0xd336, 0xd337, 0xd33a, 0xd33e, 0xd33f, 0xd340, 0xd341, 0xd342, 0xd343, 0xd346, 0xd347, 0xd348, 0xd349, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd34a, 0xd34b, 0xd34c, 0xd34d, 0xd34e, 0xd34f, 0xd350, 0xd351, 0xd352, 0xd353, 0xd354, 0xd355, 0xd356, 0xd357, 0xd358, 0xd359, 0xd35a, 0xd35b, 0xd35c, 0xd35d, 0xd35e, 0xd35f, 0xd360, 0xd361, 0xd362, 0xd363, 0xd364, 0xd365, 0xd366, 0xd367, 0xd368, 0xd369, 0xbe68, 0xbe6a, 0xbe70, 0xbe71, 0xbe73, 0xbe74, 0xbe75, 0xbe7b, 0xbe7c, 0xbe7d, 0xbe80, 0xbe84, 0xbe8c, 0xbe8d, 0xbe8f, 0xbe90, 0xbe91, 0xbe98, 0xbe99, 0xbea8, 0xbed0, 0xbed1, 0xbed4, 0xbed7, 0xbed8, 0xbee0, 0xbee3, 0xbee4, 0xbee5, 0xbeec, 0xbf01, 0xbf08, 0xbf09, 0xbf18, 0xbf19, 0xbf1b, 0xbf1c, 0xbf1d, 0xbf40, 0xbf41, 0xbf44, 0xbf48, 0xbf50, 0xbf51, 0xbf55, 0xbf94, 0xbfb0, 0xbfc5, 0xbfcc, 0xbfcd, 0xbfd0, 0xbfd4, 0xbfdc, 0xbfdf, 0xbfe1, 0xc03c, 0xc051, 0xc058, 0xc05c, 0xc060, 0xc068, 0xc069, 0xc090, 0xc091, 0xc094, 0xc098, 0xc0a0, 0xc0a1, 0xc0a3, 0xc0a5, 0xc0ac, 0xc0ad, 0xc0af, 0xc0b0, 0xc0b3, 0xc0b4, 0xc0b5, 0xc0b6, 0xc0bc, 0xc0bd, 0xc0bf, 0xc0c0, 0xc0c1, 0xc0c5, 0xc0c8, 0xc0c9, 0xc0cc, 0xc0d0, 0xc0d8, 0xc0d9, 0xc0db, 0xc0dc, 0xc0dd, 0xc0e4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ 192 ] = { 0xfffd, 0xd36a, 0xd36b, 0xd36c, 0xd36d, 0xd36e, 0xd36f, 0xd370, 0xd371, 0xd372, 0xd373, 0xd374, 0xd375, 0xd376, 0xd377, 0xd378, 0xd379, 0xd37a, 0xd37b, 0xd37e, 0xd37f, 0xd381, 0xd382, 0xd383, 0xd385, 0xd386, 0xd387, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd388, 0xd389, 0xd38a, 0xd38b, 0xd38e, 0xd392, 0xd393, 0xd394, 0xd395, 0xd396, 0xd397, 0xd39a, 0xd39b, 0xd39d, 0xd39e, 0xd39f, 0xd3a1, 0xd3a2, 0xd3a3, 0xd3a4, 0xd3a5, 0xd3a6, 0xd3a7, 0xd3aa, 0xd3ac, 0xd3ae, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd3af, 0xd3b0, 0xd3b1, 0xd3b2, 0xd3b3, 0xd3b5, 0xd3b6, 0xd3b7, 0xd3b9, 0xd3ba, 0xd3bb, 0xd3bd, 0xd3be, 0xd3bf, 0xd3c0, 0xd3c1, 0xd3c2, 0xd3c3, 0xd3c6, 0xd3c7, 0xd3ca, 0xd3cb, 0xd3cc, 0xd3cd, 0xd3ce, 0xd3cf, 0xd3d1, 0xd3d2, 0xd3d3, 0xd3d4, 0xd3d5, 0xd3d6, 0xc0e5, 0xc0e8, 0xc0ec, 0xc0f4, 0xc0f5, 0xc0f7, 0xc0f9, 0xc100, 0xc104, 0xc108, 0xc110, 0xc115, 0xc11c, 0xc11d, 0xc11e, 0xc11f, 0xc120, 0xc123, 0xc124, 0xc126, 0xc127, 0xc12c, 0xc12d, 0xc12f, 0xc130, 0xc131, 0xc136, 0xc138, 0xc139, 0xc13c, 0xc140, 0xc148, 0xc149, 0xc14b, 0xc14c, 0xc14d, 0xc154, 0xc155, 0xc158, 0xc15c, 0xc164, 0xc165, 0xc167, 0xc168, 0xc169, 0xc170, 0xc174, 0xc178, 0xc185, 0xc18c, 0xc18d, 0xc18e, 0xc190, 0xc194, 0xc196, 0xc19c, 0xc19d, 0xc19f, 0xc1a1, 0xc1a5, 0xc1a8, 0xc1a9, 0xc1ac, 0xc1b0, 0xc1bd, 0xc1c4, 0xc1c8, 0xc1cc, 0xc1d4, 0xc1d7, 0xc1d8, 0xc1e0, 0xc1e4, 0xc1e8, 0xc1f0, 0xc1f1, 0xc1f3, 0xc1fc, 0xc1fd, 0xc200, 0xc204, 0xc20c, 0xc20d, 0xc20f, 0xc211, 0xc218, 0xc219, 0xc21c, 0xc21f, 0xc220, 0xc228, 0xc229, 0xc22b, 0xc22d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ 192 ] = { 0xfffd, 0xd3d7, 0xd3d9, 0xd3da, 0xd3db, 0xd3dc, 0xd3dd, 0xd3de, 0xd3df, 0xd3e0, 0xd3e2, 0xd3e4, 0xd3e5, 0xd3e6, 0xd3e7, 0xd3e8, 0xd3e9, 0xd3ea, 0xd3eb, 0xd3ee, 0xd3ef, 0xd3f1, 0xd3f2, 0xd3f3, 0xd3f5, 0xd3f6, 0xd3f7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd3f8, 0xd3f9, 0xd3fa, 0xd3fb, 0xd3fe, 0xd400, 0xd402, 0xd403, 0xd404, 0xd405, 0xd406, 0xd407, 0xd409, 0xd40a, 0xd40b, 0xd40c, 0xd40d, 0xd40e, 0xd40f, 0xd410, 0xd411, 0xd412, 0xd413, 0xd414, 0xd415, 0xd416, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd417, 0xd418, 0xd419, 0xd41a, 0xd41b, 0xd41c, 0xd41e, 0xd41f, 0xd420, 0xd421, 0xd422, 0xd423, 0xd424, 0xd425, 0xd426, 0xd427, 0xd428, 0xd429, 0xd42a, 0xd42b, 0xd42c, 0xd42d, 0xd42e, 0xd42f, 0xd430, 0xd431, 0xd432, 0xd433, 0xd434, 0xd435, 0xd436, 0xd437, 0xc22f, 0xc231, 0xc232, 0xc234, 0xc248, 0xc250, 0xc251, 0xc254, 0xc258, 0xc260, 0xc265, 0xc26c, 0xc26d, 0xc270, 0xc274, 0xc27c, 0xc27d, 0xc27f, 0xc281, 0xc288, 0xc289, 0xc290, 0xc298, 0xc29b, 0xc29d, 0xc2a4, 0xc2a5, 0xc2a8, 0xc2ac, 0xc2ad, 0xc2b4, 0xc2b5, 0xc2b7, 0xc2b9, 0xc2dc, 0xc2dd, 0xc2e0, 0xc2e3, 0xc2e4, 0xc2eb, 0xc2ec, 0xc2ed, 0xc2ef, 0xc2f1, 0xc2f6, 0xc2f8, 0xc2f9, 0xc2fb, 0xc2fc, 0xc300, 0xc308, 0xc309, 0xc30c, 0xc30d, 0xc313, 0xc314, 0xc315, 0xc318, 0xc31c, 0xc324, 0xc325, 0xc328, 0xc329, 0xc345, 0xc368, 0xc369, 0xc36c, 0xc370, 0xc372, 0xc378, 0xc379, 0xc37c, 0xc37d, 0xc384, 0xc388, 0xc38c, 0xc3c0, 0xc3d8, 0xc3d9, 0xc3dc, 0xc3df, 0xc3e0, 0xc3e2, 0xc3e8, 0xc3e9, 0xc3ed, 0xc3f4, 0xc3f5, 0xc3f8, 0xc408, 0xc410, 0xc424, 0xc42c, 0xc430, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ 192 ] = { 0xfffd, 0xd438, 0xd439, 0xd43a, 0xd43b, 0xd43c, 0xd43d, 0xd43e, 0xd43f, 0xd441, 0xd442, 0xd443, 0xd445, 0xd446, 0xd447, 0xd448, 0xd449, 0xd44a, 0xd44b, 0xd44c, 0xd44d, 0xd44e, 0xd44f, 0xd450, 0xd451, 0xd452, 0xd453, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd454, 0xd455, 0xd456, 0xd457, 0xd458, 0xd459, 0xd45a, 0xd45b, 0xd45d, 0xd45e, 0xd45f, 0xd461, 0xd462, 0xd463, 0xd465, 0xd466, 0xd467, 0xd468, 0xd469, 0xd46a, 0xd46b, 0xd46c, 0xd46e, 0xd470, 0xd471, 0xd472, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd473, 0xd474, 0xd475, 0xd476, 0xd477, 0xd47a, 0xd47b, 0xd47d, 0xd47e, 0xd481, 0xd483, 0xd484, 0xd485, 0xd486, 0xd487, 0xd48a, 0xd48c, 0xd48e, 0xd48f, 0xd490, 0xd491, 0xd492, 0xd493, 0xd495, 0xd496, 0xd497, 0xd498, 0xd499, 0xd49a, 0xd49b, 0xd49c, 0xd49d, 0xc434, 0xc43c, 0xc43d, 0xc448, 0xc464, 0xc465, 0xc468, 0xc46c, 0xc474, 0xc475, 0xc479, 0xc480, 0xc494, 0xc49c, 0xc4b8, 0xc4bc, 0xc4e9, 0xc4f0, 0xc4f1, 0xc4f4, 0xc4f8, 0xc4fa, 0xc4ff, 0xc500, 0xc501, 0xc50c, 0xc510, 0xc514, 0xc51c, 0xc528, 0xc529, 0xc52c, 0xc530, 0xc538, 0xc539, 0xc53b, 0xc53d, 0xc544, 0xc545, 0xc548, 0xc549, 0xc54a, 0xc54c, 0xc54d, 0xc54e, 0xc553, 0xc554, 0xc555, 0xc557, 0xc558, 0xc559, 0xc55d, 0xc55e, 0xc560, 0xc561, 0xc564, 0xc568, 0xc570, 0xc571, 0xc573, 0xc574, 0xc575, 0xc57c, 0xc57d, 0xc580, 0xc584, 0xc587, 0xc58c, 0xc58d, 0xc58f, 0xc591, 0xc595, 0xc597, 0xc598, 0xc59c, 0xc5a0, 0xc5a9, 0xc5b4, 0xc5b5, 0xc5b8, 0xc5b9, 0xc5bb, 0xc5bc, 0xc5bd, 0xc5be, 0xc5c4, 0xc5c5, 0xc5c6, 0xc5c7, 0xc5c8, 0xc5c9, 0xc5ca, 0xc5cc, 0xc5ce, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ 192 ] = { 0xfffd, 0xd49e, 0xd49f, 0xd4a0, 0xd4a1, 0xd4a2, 0xd4a3, 0xd4a4, 0xd4a5, 0xd4a6, 0xd4a7, 0xd4a8, 0xd4aa, 0xd4ab, 0xd4ac, 0xd4ad, 0xd4ae, 0xd4af, 0xd4b0, 0xd4b1, 0xd4b2, 0xd4b3, 0xd4b4, 0xd4b5, 0xd4b6, 0xd4b7, 0xd4b8, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd4b9, 0xd4ba, 0xd4bb, 0xd4bc, 0xd4bd, 0xd4be, 0xd4bf, 0xd4c0, 0xd4c1, 0xd4c2, 0xd4c3, 0xd4c4, 0xd4c5, 0xd4c6, 0xd4c7, 0xd4c8, 0xd4c9, 0xd4ca, 0xd4cb, 0xd4cd, 0xd4ce, 0xd4cf, 0xd4d1, 0xd4d2, 0xd4d3, 0xd4d5, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd4d6, 0xd4d7, 0xd4d8, 0xd4d9, 0xd4da, 0xd4db, 0xd4dd, 0xd4de, 0xd4e0, 0xd4e1, 0xd4e2, 0xd4e3, 0xd4e4, 0xd4e5, 0xd4e6, 0xd4e7, 0xd4e9, 0xd4ea, 0xd4eb, 0xd4ed, 0xd4ee, 0xd4ef, 0xd4f1, 0xd4f2, 0xd4f3, 0xd4f4, 0xd4f5, 0xd4f6, 0xd4f7, 0xd4f9, 0xd4fa, 0xd4fc, 0xc5d0, 0xc5d1, 0xc5d4, 0xc5d8, 0xc5e0, 0xc5e1, 0xc5e3, 0xc5e5, 0xc5ec, 0xc5ed, 0xc5ee, 0xc5f0, 0xc5f4, 0xc5f6, 0xc5f7, 0xc5fc, 0xc5fd, 0xc5fe, 0xc5ff, 0xc600, 0xc601, 0xc605, 0xc606, 0xc607, 0xc608, 0xc60c, 0xc610, 0xc618, 0xc619, 0xc61b, 0xc61c, 0xc624, 0xc625, 0xc628, 0xc62c, 0xc62d, 0xc62e, 0xc630, 0xc633, 0xc634, 0xc635, 0xc637, 0xc639, 0xc63b, 0xc640, 0xc641, 0xc644, 0xc648, 0xc650, 0xc651, 0xc653, 0xc654, 0xc655, 0xc65c, 0xc65d, 0xc660, 0xc66c, 0xc66f, 0xc671, 0xc678, 0xc679, 0xc67c, 0xc680, 0xc688, 0xc689, 0xc68b, 0xc68d, 0xc694, 0xc695, 0xc698, 0xc69c, 0xc6a4, 0xc6a5, 0xc6a7, 0xc6a9, 0xc6b0, 0xc6b1, 0xc6b4, 0xc6b8, 0xc6b9, 0xc6ba, 0xc6c0, 0xc6c1, 0xc6c3, 0xc6c5, 0xc6cc, 0xc6cd, 0xc6d0, 0xc6d4, 0xc6dc, 0xc6dd, 0xc6e0, 0xc6e1, 0xc6e8, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ 192 ] = { 0xfffd, 0xd4fe, 0xd4ff, 0xd500, 0xd501, 0xd502, 0xd503, 0xd505, 0xd506, 0xd507, 0xd509, 0xd50a, 0xd50b, 0xd50d, 0xd50e, 0xd50f, 0xd510, 0xd511, 0xd512, 0xd513, 0xd516, 0xd518, 0xd519, 0xd51a, 0xd51b, 0xd51c, 0xd51d, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd51e, 0xd51f, 0xd520, 0xd521, 0xd522, 0xd523, 0xd524, 0xd525, 0xd526, 0xd527, 0xd528, 0xd529, 0xd52a, 0xd52b, 0xd52c, 0xd52d, 0xd52e, 0xd52f, 0xd530, 0xd531, 0xd532, 0xd533, 0xd534, 0xd535, 0xd536, 0xd537, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd538, 0xd539, 0xd53a, 0xd53b, 0xd53e, 0xd53f, 0xd541, 0xd542, 0xd543, 0xd545, 0xd546, 0xd547, 0xd548, 0xd549, 0xd54a, 0xd54b, 0xd54e, 0xd550, 0xd552, 0xd553, 0xd554, 0xd555, 0xd556, 0xd557, 0xd55a, 0xd55b, 0xd55d, 0xd55e, 0xd55f, 0xd561, 0xd562, 0xd563, 0xc6e9, 0xc6ec, 0xc6f0, 0xc6f8, 0xc6f9, 0xc6fd, 0xc704, 0xc705, 0xc708, 0xc70c, 0xc714, 0xc715, 0xc717, 0xc719, 0xc720, 0xc721, 0xc724, 0xc728, 0xc730, 0xc731, 0xc733, 0xc735, 0xc737, 0xc73c, 0xc73d, 0xc740, 0xc744, 0xc74a, 0xc74c, 0xc74d, 0xc74f, 0xc751, 0xc752, 0xc753, 0xc754, 0xc755, 0xc756, 0xc757, 0xc758, 0xc75c, 0xc760, 0xc768, 0xc76b, 0xc774, 0xc775, 0xc778, 0xc77c, 0xc77d, 0xc77e, 0xc783, 0xc784, 0xc785, 0xc787, 0xc788, 0xc789, 0xc78a, 0xc78e, 0xc790, 0xc791, 0xc794, 0xc796, 0xc797, 0xc798, 0xc79a, 0xc7a0, 0xc7a1, 0xc7a3, 0xc7a4, 0xc7a5, 0xc7a6, 0xc7ac, 0xc7ad, 0xc7b0, 0xc7b4, 0xc7bc, 0xc7bd, 0xc7bf, 0xc7c0, 0xc7c1, 0xc7c8, 0xc7c9, 0xc7cc, 0xc7ce, 0xc7d0, 0xc7d8, 0xc7dd, 0xc7e4, 0xc7e8, 0xc7ec, 0xc800, 0xc801, 0xc804, 0xc808, 0xc80a, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ 192 ] = { 0xfffd, 0xd564, 0xd566, 0xd567, 0xd56a, 0xd56c, 0xd56e, 0xd56f, 0xd570, 0xd571, 0xd572, 0xd573, 0xd576, 0xd577, 0xd579, 0xd57a, 0xd57b, 0xd57d, 0xd57e, 0xd57f, 0xd580, 0xd581, 0xd582, 0xd583, 0xd586, 0xd58a, 0xd58b, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd58c, 0xd58d, 0xd58e, 0xd58f, 0xd591, 0xd592, 0xd593, 0xd594, 0xd595, 0xd596, 0xd597, 0xd598, 0xd599, 0xd59a, 0xd59b, 0xd59c, 0xd59d, 0xd59e, 0xd59f, 0xd5a0, 0xd5a1, 0xd5a2, 0xd5a3, 0xd5a4, 0xd5a6, 0xd5a7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd5a8, 0xd5a9, 0xd5aa, 0xd5ab, 0xd5ac, 0xd5ad, 0xd5ae, 0xd5af, 0xd5b0, 0xd5b1, 0xd5b2, 0xd5b3, 0xd5b4, 0xd5b5, 0xd5b6, 0xd5b7, 0xd5b8, 0xd5b9, 0xd5ba, 0xd5bb, 0xd5bc, 0xd5bd, 0xd5be, 0xd5bf, 0xd5c0, 0xd5c1, 0xd5c2, 0xd5c3, 0xd5c4, 0xd5c5, 0xd5c6, 0xd5c7, 0xc810, 0xc811, 0xc813, 0xc815, 0xc816, 0xc81c, 0xc81d, 0xc820, 0xc824, 0xc82c, 0xc82d, 0xc82f, 0xc831, 0xc838, 0xc83c, 0xc840, 0xc848, 0xc849, 0xc84c, 0xc84d, 0xc854, 0xc870, 0xc871, 0xc874, 0xc878, 0xc87a, 0xc880, 0xc881, 0xc883, 0xc885, 0xc886, 0xc887, 0xc88b, 0xc88c, 0xc88d, 0xc894, 0xc89d, 0xc89f, 0xc8a1, 0xc8a8, 0xc8bc, 0xc8bd, 0xc8c4, 0xc8c8, 0xc8cc, 0xc8d4, 0xc8d5, 0xc8d7, 0xc8d9, 0xc8e0, 0xc8e1, 0xc8e4, 0xc8f5, 0xc8fc, 0xc8fd, 0xc900, 0xc904, 0xc905, 0xc906, 0xc90c, 0xc90d, 0xc90f, 0xc911, 0xc918, 0xc92c, 0xc934, 0xc950, 0xc951, 0xc954, 0xc958, 0xc960, 0xc961, 0xc963, 0xc96c, 0xc970, 0xc974, 0xc97c, 0xc988, 0xc989, 0xc98c, 0xc990, 0xc998, 0xc999, 0xc99b, 0xc99d, 0xc9c0, 0xc9c1, 0xc9c4, 0xc9c7, 0xc9c8, 0xc9ca, 0xc9d0, 0xc9d1, 0xc9d3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ 192 ] = { 0xfffd, 0xd5ca, 0xd5cb, 0xd5cd, 0xd5ce, 0xd5cf, 0xd5d1, 0xd5d3, 0xd5d4, 0xd5d5, 0xd5d6, 0xd5d7, 0xd5da, 0xd5dc, 0xd5de, 0xd5df, 0xd5e0, 0xd5e1, 0xd5e2, 0xd5e3, 0xd5e6, 0xd5e7, 0xd5e9, 0xd5ea, 0xd5eb, 0xd5ed, 0xd5ee, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd5ef, 0xd5f0, 0xd5f1, 0xd5f2, 0xd5f3, 0xd5f6, 0xd5f8, 0xd5fa, 0xd5fb, 0xd5fc, 0xd5fd, 0xd5fe, 0xd5ff, 0xd602, 0xd603, 0xd605, 0xd606, 0xd607, 0xd609, 0xd60a, 0xd60b, 0xd60c, 0xd60d, 0xd60e, 0xd60f, 0xd612, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd616, 0xd617, 0xd618, 0xd619, 0xd61a, 0xd61b, 0xd61d, 0xd61e, 0xd61f, 0xd621, 0xd622, 0xd623, 0xd625, 0xd626, 0xd627, 0xd628, 0xd629, 0xd62a, 0xd62b, 0xd62c, 0xd62e, 0xd62f, 0xd630, 0xd631, 0xd632, 0xd633, 0xd634, 0xd635, 0xd636, 0xd637, 0xd63a, 0xd63b, 0xc9d5, 0xc9d6, 0xc9d9, 0xc9da, 0xc9dc, 0xc9dd, 0xc9e0, 0xc9e2, 0xc9e4, 0xc9e7, 0xc9ec, 0xc9ed, 0xc9ef, 0xc9f0, 0xc9f1, 0xc9f8, 0xc9f9, 0xc9fc, 0xca00, 0xca08, 0xca09, 0xca0b, 0xca0c, 0xca0d, 0xca14, 0xca18, 0xca29, 0xca4c, 0xca4d, 0xca50, 0xca54, 0xca5c, 0xca5d, 0xca5f, 0xca60, 0xca61, 0xca68, 0xca7d, 0xca84, 0xca98, 0xcabc, 0xcabd, 0xcac0, 0xcac4, 0xcacc, 0xcacd, 0xcacf, 0xcad1, 0xcad3, 0xcad8, 0xcad9, 0xcae0, 0xcaec, 0xcaf4, 0xcb08, 0xcb10, 0xcb14, 0xcb18, 0xcb20, 0xcb21, 0xcb41, 0xcb48, 0xcb49, 0xcb4c, 0xcb50, 0xcb58, 0xcb59, 0xcb5d, 0xcb64, 0xcb78, 0xcb79, 0xcb9c, 0xcbb8, 0xcbd4, 0xcbe4, 0xcbe7, 0xcbe9, 0xcc0c, 0xcc0d, 0xcc10, 0xcc14, 0xcc1c, 0xcc1d, 0xcc21, 0xcc22, 0xcc27, 0xcc28, 0xcc29, 0xcc2c, 0xcc2e, 0xcc30, 0xcc38, 0xcc39, 0xcc3b, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ 192 ] = { 0xfffd, 0xd63d, 0xd63e, 0xd63f, 0xd641, 0xd642, 0xd643, 0xd644, 0xd646, 0xd647, 0xd64a, 0xd64c, 0xd64e, 0xd64f, 0xd650, 0xd652, 0xd653, 0xd656, 0xd657, 0xd659, 0xd65a, 0xd65b, 0xd65d, 0xd65e, 0xd65f, 0xd660, 0xd661, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd662, 0xd663, 0xd664, 0xd665, 0xd666, 0xd668, 0xd66a, 0xd66b, 0xd66c, 0xd66d, 0xd66e, 0xd66f, 0xd672, 0xd673, 0xd675, 0xd676, 0xd677, 0xd678, 0xd679, 0xd67a, 0xd67b, 0xd67c, 0xd67d, 0xd67e, 0xd67f, 0xd680, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd681, 0xd682, 0xd684, 0xd686, 0xd687, 0xd688, 0xd689, 0xd68a, 0xd68b, 0xd68e, 0xd68f, 0xd691, 0xd692, 0xd693, 0xd695, 0xd696, 0xd697, 0xd698, 0xd699, 0xd69a, 0xd69b, 0xd69c, 0xd69e, 0xd6a0, 0xd6a2, 0xd6a3, 0xd6a4, 0xd6a5, 0xd6a6, 0xd6a7, 0xd6a9, 0xd6aa, 0xcc3c, 0xcc3d, 0xcc3e, 0xcc44, 0xcc45, 0xcc48, 0xcc4c, 0xcc54, 0xcc55, 0xcc57, 0xcc58, 0xcc59, 0xcc60, 0xcc64, 0xcc66, 0xcc68, 0xcc70, 0xcc75, 0xcc98, 0xcc99, 0xcc9c, 0xcca0, 0xcca8, 0xcca9, 0xccab, 0xccac, 0xccad, 0xccb4, 0xccb5, 0xccb8, 0xccbc, 0xccc4, 0xccc5, 0xccc7, 0xccc9, 0xccd0, 0xccd4, 0xcce4, 0xccec, 0xccf0, 0xcd01, 0xcd08, 0xcd09, 0xcd0c, 0xcd10, 0xcd18, 0xcd19, 0xcd1b, 0xcd1d, 0xcd24, 0xcd28, 0xcd2c, 0xcd39, 0xcd5c, 0xcd60, 0xcd64, 0xcd6c, 0xcd6d, 0xcd6f, 0xcd71, 0xcd78, 0xcd88, 0xcd94, 0xcd95, 0xcd98, 0xcd9c, 0xcda4, 0xcda5, 0xcda7, 0xcda9, 0xcdb0, 0xcdc4, 0xcdcc, 0xcdd0, 0xcde8, 0xcdec, 0xcdf0, 0xcdf8, 0xcdf9, 0xcdfb, 0xcdfd, 0xce04, 0xce08, 0xce0c, 0xce14, 0xce19, 0xce20, 0xce21, 0xce24, 0xce28, 0xce30, 0xce31, 0xce33, 0xce35, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ 192 ] = { 0xfffd, 0xd6ab, 0xd6ad, 0xd6ae, 0xd6af, 0xd6b1, 0xd6b2, 0xd6b3, 0xd6b4, 0xd6b5, 0xd6b6, 0xd6b7, 0xd6b8, 0xd6ba, 0xd6bc, 0xd6bd, 0xd6be, 0xd6bf, 0xd6c0, 0xd6c1, 0xd6c2, 0xd6c3, 0xd6c6, 0xd6c7, 0xd6c9, 0xd6ca, 0xd6cb, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd6cd, 0xd6ce, 0xd6cf, 0xd6d0, 0xd6d2, 0xd6d3, 0xd6d5, 0xd6d6, 0xd6d8, 0xd6da, 0xd6db, 0xd6dc, 0xd6dd, 0xd6de, 0xd6df, 0xd6e1, 0xd6e2, 0xd6e3, 0xd6e5, 0xd6e6, 0xd6e7, 0xd6e9, 0xd6ea, 0xd6eb, 0xd6ec, 0xd6ed, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd6ee, 0xd6ef, 0xd6f1, 0xd6f2, 0xd6f3, 0xd6f4, 0xd6f6, 0xd6f7, 0xd6f8, 0xd6f9, 0xd6fa, 0xd6fb, 0xd6fe, 0xd6ff, 0xd701, 0xd702, 0xd703, 0xd705, 0xd706, 0xd707, 0xd708, 0xd709, 0xd70a, 0xd70b, 0xd70c, 0xd70d, 0xd70e, 0xd70f, 0xd710, 0xd712, 0xd713, 0xd714, 0xce58, 0xce59, 0xce5c, 0xce5f, 0xce60, 0xce61, 0xce68, 0xce69, 0xce6b, 0xce6d, 0xce74, 0xce75, 0xce78, 0xce7c, 0xce84, 0xce85, 0xce87, 0xce89, 0xce90, 0xce91, 0xce94, 0xce98, 0xcea0, 0xcea1, 0xcea3, 0xcea4, 0xcea5, 0xceac, 0xcead, 0xcec1, 0xcee4, 0xcee5, 0xcee8, 0xceeb, 0xceec, 0xcef4, 0xcef5, 0xcef7, 0xcef8, 0xcef9, 0xcf00, 0xcf01, 0xcf04, 0xcf08, 0xcf10, 0xcf11, 0xcf13, 0xcf15, 0xcf1c, 0xcf20, 0xcf24, 0xcf2c, 0xcf2d, 0xcf2f, 0xcf30, 0xcf31, 0xcf38, 0xcf54, 0xcf55, 0xcf58, 0xcf5c, 0xcf64, 0xcf65, 0xcf67, 0xcf69, 0xcf70, 0xcf71, 0xcf74, 0xcf78, 0xcf80, 0xcf85, 0xcf8c, 0xcfa1, 0xcfa8, 0xcfb0, 0xcfc4, 0xcfe0, 0xcfe1, 0xcfe4, 0xcfe8, 0xcff0, 0xcff1, 0xcff3, 0xcff5, 0xcffc, 0xd000, 0xd004, 0xd011, 0xd018, 0xd02d, 0xd034, 0xd035, 0xd038, 0xd03c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ 192 ] = { 0xfffd, 0xd715, 0xd716, 0xd717, 0xd71a, 0xd71b, 0xd71d, 0xd71e, 0xd71f, 0xd721, 0xd722, 0xd723, 0xd724, 0xd725, 0xd726, 0xd727, 0xd72a, 0xd72c, 0xd72e, 0xd72f, 0xd730, 0xd731, 0xd732, 0xd733, 0xd736, 0xd737, 0xd739, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd73a, 0xd73b, 0xd73d, 0xd73e, 0xd73f, 0xd740, 0xd741, 0xd742, 0xd743, 0xd745, 0xd746, 0xd748, 0xd74a, 0xd74b, 0xd74c, 0xd74d, 0xd74e, 0xd74f, 0xd752, 0xd753, 0xd755, 0xd75a, 0xd75b, 0xd75c, 0xd75d, 0xd75e, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xd75f, 0xd762, 0xd764, 0xd766, 0xd767, 0xd768, 0xd76a, 0xd76b, 0xd76d, 0xd76e, 0xd76f, 0xd771, 0xd772, 0xd773, 0xd775, 0xd776, 0xd777, 0xd778, 0xd779, 0xd77a, 0xd77b, 0xd77e, 0xd77f, 0xd780, 0xd782, 0xd783, 0xd784, 0xd785, 0xd786, 0xd787, 0xd78a, 0xd78b, 0xd044, 0xd045, 0xd047, 0xd049, 0xd050, 0xd054, 0xd058, 0xd060, 0xd06c, 0xd06d, 0xd070, 0xd074, 0xd07c, 0xd07d, 0xd081, 0xd0a4, 0xd0a5, 0xd0a8, 0xd0ac, 0xd0b4, 0xd0b5, 0xd0b7, 0xd0b9, 0xd0c0, 0xd0c1, 0xd0c4, 0xd0c8, 0xd0c9, 0xd0d0, 0xd0d1, 0xd0d3, 0xd0d4, 0xd0d5, 0xd0dc, 0xd0dd, 0xd0e0, 0xd0e4, 0xd0ec, 0xd0ed, 0xd0ef, 0xd0f0, 0xd0f1, 0xd0f8, 0xd10d, 0xd130, 0xd131, 0xd134, 0xd138, 0xd13a, 0xd140, 0xd141, 0xd143, 0xd144, 0xd145, 0xd14c, 0xd14d, 0xd150, 0xd154, 0xd15c, 0xd15d, 0xd15f, 0xd161, 0xd168, 0xd16c, 0xd17c, 0xd184, 0xd188, 0xd1a0, 0xd1a1, 0xd1a4, 0xd1a8, 0xd1b0, 0xd1b1, 0xd1b3, 0xd1b5, 0xd1ba, 0xd1bc, 0xd1c0, 0xd1d8, 0xd1f4, 0xd1f8, 0xd207, 0xd209, 0xd210, 0xd22c, 0xd22d, 0xd230, 0xd234, 0xd23c, 0xd23d, 0xd23f, 0xd241, 0xd248, 0xd25c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ 24 ] = { 0xfffd, 0xd78d, 0xd78e, 0xd78f, 0xd791, 0xd792, 0xd793, 0xd794, 0xd795, 0xd796, 0xd797, 0xd79a, 0xd79c, 0xd79e, 0xd79f, 0xd7a0, 0xd7a1, 0xd7a2, 0xd7a3, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ 96 ] = { 0xfffd, 0xd264, 0xd280, 0xd281, 0xd284, 0xd288, 0xd290, 0xd291, 0xd295, 0xd29c, 0xd2a0, 0xd2a4, 0xd2ac, 0xd2b1, 0xd2b8, 0xd2b9, 0xd2bc, 0xd2bf, 0xd2c0, 0xd2c2, 0xd2c8, 0xd2c9, 0xd2cb, 0xd2d4, 0xd2d8, 0xd2dc, 0xd2e4, 0xd2e5, 0xd2f0, 0xd2f1, 0xd2f4, 0xd2f8, 0xd300, 0xd301, 0xd303, 0xd305, 0xd30c, 0xd30d, 0xd30e, 0xd310, 0xd314, 0xd316, 0xd31c, 0xd31d, 0xd31f, 0xd320, 0xd321, 0xd325, 0xd328, 0xd329, 0xd32c, 0xd330, 0xd338, 0xd339, 0xd33b, 0xd33c, 0xd33d, 0xd344, 0xd345, 0xd37c, 0xd37d, 0xd380, 0xd384, 0xd38c, 0xd38d, 0xd38f, 0xd390, 0xd391, 0xd398, 0xd399, 0xd39c, 0xd3a0, 0xd3a8, 0xd3a9, 0xd3ab, 0xd3ad, 0xd3b4, 0xd3b8, 0xd3bc, 0xd3c4, 0xd3c5, 0xd3c8, 0xd3c9, 0xd3d0, 0xd3d8, 0xd3e1, 0xd3e3, 0xd3ec, 0xd3ed, 0xd3f0, 0xd3f4, 0xd3fc, 0xd3fd, 0xd3ff, 0xd401, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ 96 ] = { 0xfffd, 0xd408, 0xd41d, 0xd440, 0xd444, 0xd45c, 0xd460, 0xd464, 0xd46d, 0xd46f, 0xd478, 0xd479, 0xd47c, 0xd47f, 0xd480, 0xd482, 0xd488, 0xd489, 0xd48b, 0xd48d, 0xd494, 0xd4a9, 0xd4cc, 0xd4d0, 0xd4d4, 0xd4dc, 0xd4df, 0xd4e8, 0xd4ec, 0xd4f0, 0xd4f8, 0xd4fb, 0xd4fd, 0xd504, 0xd508, 0xd50c, 0xd514, 0xd515, 0xd517, 0xd53c, 0xd53d, 0xd540, 0xd544, 0xd54c, 0xd54d, 0xd54f, 0xd551, 0xd558, 0xd559, 0xd55c, 0xd560, 0xd565, 0xd568, 0xd569, 0xd56b, 0xd56d, 0xd574, 0xd575, 0xd578, 0xd57c, 0xd584, 0xd585, 0xd587, 0xd588, 0xd589, 0xd590, 0xd5a5, 0xd5c8, 0xd5c9, 0xd5cc, 0xd5d0, 0xd5d2, 0xd5d8, 0xd5d9, 0xd5db, 0xd5dd, 0xd5e4, 0xd5e5, 0xd5e8, 0xd5ec, 0xd5f4, 0xd5f5, 0xd5f7, 0xd5f9, 0xd600, 0xd601, 0xd604, 0xd608, 0xd610, 0xd611, 0xd613, 0xd614, 0xd615, 0xd61c, 0xd620, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ 96 ] = { 0xfffd, 0xd624, 0xd62d, 0xd638, 0xd639, 0xd63c, 0xd640, 0xd645, 0xd648, 0xd649, 0xd64b, 0xd64d, 0xd651, 0xd654, 0xd655, 0xd658, 0xd65c, 0xd667, 0xd669, 0xd670, 0xd671, 0xd674, 0xd683, 0xd685, 0xd68c, 0xd68d, 0xd690, 0xd694, 0xd69d, 0xd69f, 0xd6a1, 0xd6a8, 0xd6ac, 0xd6b0, 0xd6b9, 0xd6bb, 0xd6c4, 0xd6c5, 0xd6c8, 0xd6cc, 0xd6d1, 0xd6d4, 0xd6d7, 0xd6d9, 0xd6e0, 0xd6e4, 0xd6e8, 0xd6f0, 0xd6f5, 0xd6fc, 0xd6fd, 0xd700, 0xd704, 0xd711, 0xd718, 0xd719, 0xd71c, 0xd720, 0xd728, 0xd729, 0xd72b, 0xd72d, 0xd734, 0xd735, 0xd738, 0xd73c, 0xd744, 0xd747, 0xd749, 0xd750, 0xd751, 0xd754, 0xd756, 0xd757, 0xd758, 0xd759, 0xd760, 0xd761, 0xd763, 0xd765, 0xd769, 0xd76c, 0xd770, 0xd774, 0xd77c, 0xd77d, 0xd781, 0xd788, 0xd789, 0xd78c, 0xd790, 0xd798, 0xd799, 0xd79b, 0xd79d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ 96 ] = { 0xfffd, 0x4f3d, 0x4f73, 0x5047, 0x50f9, 0x52a0, 0x53ef, 0x5475, 0x54e5, 0x5609, 0x5ac1, 0x5bb6, 0x6687, 0x67b6, 0x67b7, 0x67ef, 0x6b4c, 0x73c2, 0x75c2, 0x7a3c, 0x82db, 0x8304, 0x8857, 0x8888, 0x8a36, 0x8cc8, 0x8dcf, 0x8efb, 0x8fe6, 0x99d5, 0x523b, 0x5374, 0x5404, 0x606a, 0x6164, 0x6bbc, 0x73cf, 0x811a, 0x89ba, 0x89d2, 0x95a3, 0x4f83, 0x520a, 0x58be, 0x5978, 0x59e6, 0x5e72, 0x5e79, 0x61c7, 0x63c0, 0x6746, 0x67ec, 0x687f, 0x6f97, 0x764e, 0x770b, 0x78f5, 0x7a08, 0x7aff, 0x7c21, 0x809d, 0x826e, 0x8271, 0x8aeb, 0x9593, 0x4e6b, 0x559d, 0x66f7, 0x6e34, 0x78a3, 0x7aed, 0x845b, 0x8910, 0x874e, 0x97a8, 0x52d8, 0x574e, 0x582a, 0x5d4c, 0x611f, 0x61be, 0x6221, 0x6562, 0x67d1, 0x6a44, 0x6e1b, 0x7518, 0x75b3, 0x76e3, 0x77b0, 0x7d3a, 0x90af, 0x9451, 0x9452, 0x9f95, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ 96 ] = { 0xfffd, 0x5323, 0x5cac, 0x7532, 0x80db, 0x9240, 0x9598, 0x525b, 0x5808, 0x59dc, 0x5ca1, 0x5d17, 0x5eb7, 0x5f3a, 0x5f4a, 0x6177, 0x6c5f, 0x757a, 0x7586, 0x7ce0, 0x7d73, 0x7db1, 0x7f8c, 0x8154, 0x8221, 0x8591, 0x8941, 0x8b1b, 0x92fc, 0x964d, 0x9c47, 0x4ecb, 0x4ef7, 0x500b, 0x51f1, 0x584f, 0x6137, 0x613e, 0x6168, 0x6539, 0x69ea, 0x6f11, 0x75a5, 0x7686, 0x76d6, 0x7b87, 0x82a5, 0x84cb, 0xf900, 0x93a7, 0x958b, 0x5580, 0x5ba2, 0x5751, 0xf901, 0x7cb3, 0x7fb9, 0x91b5, 0x5028, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x636e, 0x64da, 0x64e7, 0x6e20, 0x70ac, 0x795b, 0x8ddd, 0x8e1e, 0xf902, 0x907d, 0x9245, 0x92f8, 0x4e7e, 0x4ef6, 0x5065, 0x5dfe, 0x5efa, 0x6106, 0x6957, 0x8171, 0x8654, 0x8e47, 0x9375, 0x9a2b, 0x4e5e, 0x5091, 0x6770, 0x6840, 0x5109, 0x528d, 0x5292, 0x6aa2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ 96 ] = { 0xfffd, 0x77bc, 0x9210, 0x9ed4, 0x52ab, 0x602f, 0x8ff2, 0x5048, 0x61a9, 0x63ed, 0x64ca, 0x683c, 0x6a84, 0x6fc0, 0x8188, 0x89a1, 0x9694, 0x5805, 0x727d, 0x72ac, 0x7504, 0x7d79, 0x7e6d, 0x80a9, 0x898b, 0x8b74, 0x9063, 0x9d51, 0x6289, 0x6c7a, 0x6f54, 0x7d50, 0x7f3a, 0x8a23, 0x517c, 0x614a, 0x7b9d, 0x8b19, 0x9257, 0x938c, 0x4eac, 0x4fd3, 0x501e, 0x50be, 0x5106, 0x52c1, 0x52cd, 0x537f, 0x5770, 0x5883, 0x5e9a, 0x5f91, 0x6176, 0x61ac, 0x64ce, 0x656c, 0x666f, 0x66bb, 0x66f4, 0x6897, 0x6d87, 0x7085, 0x70f1, 0x749f, 0x74a5, 0x74ca, 0x75d9, 0x786c, 0x78ec, 0x7adf, 0x7af6, 0x7d45, 0x7d93, 0x8015, 0x803f, 0x811b, 0x8396, 0x8b66, 0x8f15, 0x9015, 0x93e1, 0x9803, 0x9838, 0x9a5a, 0x9be8, 0x4fc2, 0x5553, 0x583a, 0x5951, 0x5b63, 0x5c46, 0x60b8, 0x6212, 0x6842, 0x68b0, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ 96 ] = { 0xfffd, 0x68e8, 0x6eaa, 0x754c, 0x7678, 0x78ce, 0x7a3d, 0x7cfb, 0x7e6b, 0x7e7c, 0x8a08, 0x8aa1, 0x8c3f, 0x968e, 0x9dc4, 0x53e4, 0x53e9, 0x544a, 0x5471, 0x56fa, 0x59d1, 0x5b64, 0x5c3b, 0x5eab, 0x62f7, 0x6537, 0x6545, 0x6572, 0x66a0, 0x67af, 0x69c1, 0x6cbd, 0x75fc, 0x7690, 0x777e, 0x7a3f, 0x7f94, 0x8003, 0x80a1, 0x818f, 0x82e6, 0x82fd, 0x83f0, 0x85c1, 0x8831, 0x88b4, 0x8aa5, 0xf903, 0x8f9c, 0x932e, 0x96c7, 0x9867, 0x9ad8, 0x9f13, 0x54ed, 0x659b, 0x66f2, 0x688f, 0x7a40, 0x8c37, 0x9d60, 0x56f0, 0x5764, 0x5d11, 0x6606, 0x68b1, 0x68cd, 0x6efe, 0x7428, 0x889e, 0x9be4, 0x6c68, 0xf904, 0x9aa8, 0x4f9b, 0x516c, 0x5171, 0x529f, 0x5b54, 0x5de5, 0x6050, 0x606d, 0x62f1, 0x63a7, 0x653b, 0x73d9, 0x7a7a, 0x86a3, 0x8ca2, 0x978f, 0x4e32, 0x5be1, 0x6208, 0x679c, 0x74dc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ 96 ] = { 0xfffd, 0x79d1, 0x83d3, 0x8a87, 0x8ab2, 0x8de8, 0x904e, 0x934b, 0x9846, 0x5ed3, 0x69e8, 0x85ff, 0x90ed, 0xf905, 0x51a0, 0x5b98, 0x5bec, 0x6163, 0x68fa, 0x6b3e, 0x704c, 0x742f, 0x74d8, 0x7ba1, 0x7f50, 0x83c5, 0x89c0, 0x8cab, 0x95dc, 0x9928, 0x522e, 0x605d, 0x62ec, 0x9002, 0x4f8a, 0x5149, 0x5321, 0x58d9, 0x5ee3, 0x66e0, 0x6d38, 0x709a, 0x72c2, 0x73d6, 0x7b50, 0x80f1, 0x945b, 0x5366, 0x639b, 0x7f6b, 0x4e56, 0x5080, 0x584a, 0x58de, 0x602a, 0x6127, 0x62d0, 0x69d0, 0x9b41, 0x5b8f, 0x7d18, 0x80b1, 0x8f5f, 0x4ea4, 0x50d1, 0x54ac, 0x55ac, 0x5b0c, 0x5da0, 0x5de7, 0x652a, 0x654e, 0x6821, 0x6a4b, 0x72e1, 0x768e, 0x77ef, 0x7d5e, 0x7ff9, 0x81a0, 0x854e, 0x86df, 0x8f03, 0x8f4e, 0x90ca, 0x9903, 0x9a55, 0x9bab, 0x4e18, 0x4e45, 0x4e5d, 0x4ec7, 0x4ff1, 0x5177, 0x52fe, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ 96 ] = { 0xfffd, 0x5340, 0x53e3, 0x53e5, 0x548e, 0x5614, 0x5775, 0x57a2, 0x5bc7, 0x5d87, 0x5ed0, 0x61fc, 0x62d8, 0x6551, 0x67b8, 0x67e9, 0x69cb, 0x6b50, 0x6bc6, 0x6bec, 0x6c42, 0x6e9d, 0x7078, 0x72d7, 0x7396, 0x7403, 0x77bf, 0x77e9, 0x7a76, 0x7d7f, 0x8009, 0x81fc, 0x8205, 0x820a, 0x82df, 0x8862, 0x8b33, 0x8cfc, 0x8ec0, 0x9011, 0x90b1, 0x9264, 0x92b6, 0x99d2, 0x9a45, 0x9ce9, 0x9dd7, 0x9f9c, 0x570b, 0x5c40, 0x83ca, 0x97a0, 0x97ab, 0x9eb4, 0x541b, 0x7a98, 0x7fa4, 0x88d9, 0x8ecd, 0x90e1, 0x5800, 0x5c48, 0x6398, 0x7a9f, 0x5bae, 0x5f13, 0x7a79, 0x7aae, 0x828e, 0x8eac, 0x5026, 0x5238, 0x52f8, 0x5377, 0x5708, 0x62f3, 0x6372, 0x6b0a, 0x6dc3, 0x7737, 0x53a5, 0x7357, 0x8568, 0x8e76, 0x95d5, 0x673a, 0x6ac3, 0x6f70, 0x8a6d, 0x8ecc, 0x994b, 0xf906, 0x6677, 0x6b78, 0x8cb4, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ 96 ] = { 0xfffd, 0x9b3c, 0xf907, 0x53eb, 0x572d, 0x594e, 0x63c6, 0x69fb, 0x73ea, 0x7845, 0x7aba, 0x7ac5, 0x7cfe, 0x8475, 0x898f, 0x8d73, 0x9035, 0x95a8, 0x52fb, 0x5747, 0x7547, 0x7b60, 0x83cc, 0x921e, 0xf908, 0x6a58, 0x514b, 0x524b, 0x5287, 0x621f, 0x68d8, 0x6975, 0x9699, 0x50c5, 0x52a4, 0x52e4, 0x61c3, 0x65a4, 0x6839, 0x69ff, 0x747e, 0x7b4b, 0x82b9, 0x83eb, 0x89b2, 0x8b39, 0x8fd1, 0x9949, 0xf909, 0x4eca, 0x5997, 0x64d2, 0x6611, 0x6a8e, 0x7434, 0x7981, 0x79bd, 0x82a9, 0x887e, 0x887f, 0x895f, 0xf90a, 0x9326, 0x4f0b, 0x53ca, 0x6025, 0x6271, 0x6c72, 0x7d1a, 0x7d66, 0x4e98, 0x5162, 0x77dc, 0x80af, 0x4f01, 0x4f0e, 0x5176, 0x5180, 0x55dc, 0x5668, 0x573b, 0x57fa, 0x57fc, 0x5914, 0x5947, 0x5993, 0x5bc4, 0x5c90, 0x5d0e, 0x5df1, 0x5e7e, 0x5fcc, 0x6280, 0x65d7, 0x65e3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ 96 ] = { 0xfffd, 0x671e, 0x671f, 0x675e, 0x68cb, 0x68c4, 0x6a5f, 0x6b3a, 0x6c23, 0x6c7d, 0x6c82, 0x6dc7, 0x7398, 0x7426, 0x742a, 0x7482, 0x74a3, 0x7578, 0x757f, 0x7881, 0x78ef, 0x7941, 0x7947, 0x7948, 0x797a, 0x7b95, 0x7d00, 0x7dba, 0x7f88, 0x8006, 0x802d, 0x808c, 0x8a18, 0x8b4f, 0x8c48, 0x8d77, 0x9321, 0x9324, 0x98e2, 0x9951, 0x9a0e, 0x9a0f, 0x9a65, 0x9e92, 0x7dca, 0x4f76, 0x5409, 0x62ee, 0x6854, 0x91d1, 0x55ab, 0x513a, 0xf90b, 0xf90c, 0x5a1c, 0x61e6, 0xf90d, 0x62cf, 0x62ff, 0xf90e, 0xf90f, 0xf910, 0xf911, 0xf912, 0xf913, 0x90a3, 0xf914, 0xf915, 0xf916, 0xf917, 0xf918, 0x8afe, 0xf919, 0xf91a, 0xf91b, 0xf91c, 0x6696, 0xf91d, 0x7156, 0xf91e, 0xf91f, 0x96e3, 0xf920, 0x634f, 0x637a, 0x5357, 0xf921, 0x678f, 0x6960, 0x6e73, 0xf922, 0x7537, 0xf923, 0xf924, 0xf925, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ 96 ] = { 0xfffd, 0x7d0d, 0xf926, 0xf927, 0x8872, 0x56ca, 0x5a18, 0xf928, 0xf929, 0xf92a, 0xf92b, 0xf92c, 0x4e43, 0xf92d, 0x5167, 0x5948, 0x67f0, 0x8010, 0xf92e, 0x5973, 0x5e74, 0x649a, 0x79ca, 0x5ff5, 0x606c, 0x62c8, 0x637b, 0x5be7, 0x5bd7, 0x52aa, 0xf92f, 0x5974, 0x5f29, 0x6012, 0xf930, 0xf931, 0xf932, 0x7459, 0xf933, 0xf934, 0xf935, 0xf936, 0xf937, 0xf938, 0x99d1, 0xf939, 0xf93a, 0xf93b, 0xf93c, 0xf93d, 0xf93e, 0xf93f, 0xf940, 0xf941, 0xf942, 0xf943, 0x6fc3, 0xf944, 0xf945, 0x81bf, 0x8fb2, 0x60f1, 0xf946, 0xf947, 0x8166, 0xf948, 0xf949, 0x5c3f, 0xf94a, 0xf94b, 0xf94c, 0xf94d, 0xf94e, 0xf94f, 0xf950, 0xf951, 0x5ae9, 0x8a25, 0x677b, 0x7d10, 0xf952, 0xf953, 0xf954, 0xf955, 0xf956, 0xf957, 0x80fd, 0xf958, 0xf959, 0x5c3c, 0x6ce5, 0x533f, 0x6eba, 0x591a, 0x8336, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ 96 ] = { 0xfffd, 0x4e39, 0x4eb6, 0x4f46, 0x55ae, 0x5718, 0x58c7, 0x5f56, 0x65b7, 0x65e6, 0x6a80, 0x6bb5, 0x6e4d, 0x77ed, 0x7aef, 0x7c1e, 0x7dde, 0x86cb, 0x8892, 0x9132, 0x935b, 0x64bb, 0x6fbe, 0x737a, 0x75b8, 0x9054, 0x5556, 0x574d, 0x61ba, 0x64d4, 0x66c7, 0x6de1, 0x6e5b, 0x6f6d, 0x6fb9, 0x75f0, 0x8043, 0x81bd, 0x8541, 0x8983, 0x8ac7, 0x8b5a, 0x931f, 0x6c93, 0x7553, 0x7b54, 0x8e0f, 0x905d, 0x5510, 0x5802, 0x5858, 0x5e62, 0x6207, 0x649e, 0x68e0, 0x7576, 0x7cd6, 0x87b3, 0x9ee8, 0x4ee3, 0x5788, 0x576e, 0x5927, 0x5c0d, 0x5cb1, 0x5e36, 0x5f85, 0x6234, 0x64e1, 0x73b3, 0x81fa, 0x888b, 0x8cb8, 0x968a, 0x9edb, 0x5b85, 0x5fb7, 0x60b3, 0x5012, 0x5200, 0x5230, 0x5716, 0x5835, 0x5857, 0x5c0e, 0x5c60, 0x5cf6, 0x5d8b, 0x5ea6, 0x5f92, 0x60bc, 0x6311, 0x6389, 0x6417, 0x6843, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ 96 ] = { 0xfffd, 0x68f9, 0x6ac2, 0x6dd8, 0x6e21, 0x6ed4, 0x6fe4, 0x71fe, 0x76dc, 0x7779, 0x79b1, 0x7a3b, 0x8404, 0x89a9, 0x8ced, 0x8df3, 0x8e48, 0x9003, 0x9014, 0x9053, 0x90fd, 0x934d, 0x9676, 0x97dc, 0x6bd2, 0x7006, 0x7258, 0x72a2, 0x7368, 0x7763, 0x79bf, 0x7be4, 0x7e9b, 0x8b80, 0x58a9, 0x60c7, 0x6566, 0x65fd, 0x66be, 0x6c8c, 0x711e, 0x71c9, 0x8c5a, 0x9813, 0x4e6d, 0x7a81, 0x4edd, 0x51ac, 0x51cd, 0x52d5, 0x540c, 0x61a7, 0x6771, 0x6850, 0x68df, 0x6d1e, 0x6f7c, 0x75bc, 0x77b3, 0x7ae5, 0x80f4, 0x8463, 0x9285, 0x515c, 0x6597, 0x675c, 0x6793, 0x75d8, 0x7ac7, 0x8373, 0xf95a, 0x8c46, 0x9017, 0x982d, 0x5c6f, 0x81c0, 0x829a, 0x9041, 0x906f, 0x920d, 0x5f97, 0x5d9d, 0x6a59, 0x71c8, 0x767b, 0x7b49, 0x85e4, 0x8b04, 0x9127, 0x9a30, 0x5587, 0x61f6, 0xf95b, 0x7669, 0x7f85, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ 96 ] = { 0xfffd, 0x863f, 0x87ba, 0x88f8, 0x908f, 0xf95c, 0x6d1b, 0x70d9, 0x73de, 0x7d61, 0x843d, 0xf95d, 0x916a, 0x99f1, 0xf95e, 0x4e82, 0x5375, 0x6b04, 0x6b12, 0x703e, 0x721b, 0x862d, 0x9e1e, 0x524c, 0x8fa3, 0x5d50, 0x64e5, 0x652c, 0x6b16, 0x6feb, 0x7c43, 0x7e9c, 0x85cd, 0x8964, 0x89bd, 0x62c9, 0x81d8, 0x881f, 0x5eca, 0x6717, 0x6d6a, 0x72fc, 0x7405, 0x746f, 0x8782, 0x90de, 0x4f86, 0x5d0d, 0x5fa0, 0x840a, 0x51b7, 0x63a0, 0x7565, 0x4eae, 0x5006, 0x5169, 0x51c9, 0x6881, 0x6a11, 0x7cae, 0x7cb1, 0x7ce7, 0x826f, 0x8ad2, 0x8f1b, 0x91cf, 0x4fb6, 0x5137, 0x52f5, 0x5442, 0x5eec, 0x616e, 0x623e, 0x65c5, 0x6ada, 0x6ffe, 0x792a, 0x85dc, 0x8823, 0x95ad, 0x9a62, 0x9a6a, 0x9e97, 0x9ece, 0x529b, 0x66c6, 0x6b77, 0x701d, 0x792b, 0x8f62, 0x9742, 0x6190, 0x6200, 0x6523, 0x6f23, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ 96 ] = { 0xfffd, 0x7149, 0x7489, 0x7df4, 0x806f, 0x84ee, 0x8f26, 0x9023, 0x934a, 0x51bd, 0x5217, 0x52a3, 0x6d0c, 0x70c8, 0x88c2, 0x5ec9, 0x6582, 0x6bae, 0x6fc2, 0x7c3e, 0x7375, 0x4ee4, 0x4f36, 0x56f9, 0xf95f, 0x5cba, 0x5dba, 0x601c, 0x73b2, 0x7b2d, 0x7f9a, 0x7fce, 0x8046, 0x901e, 0x9234, 0x96f6, 0x9748, 0x9818, 0x9f61, 0x4f8b, 0x6fa7, 0x79ae, 0x91b4, 0x96b7, 0x52de, 0xf960, 0x6488, 0x64c4, 0x6ad3, 0x6f5e, 0x7018, 0x7210, 0x76e7, 0x8001, 0x8606, 0x865c, 0x8def, 0x8f05, 0x9732, 0x9b6f, 0x9dfa, 0x9e75, 0x788c, 0x797f, 0x7da0, 0x83c9, 0x9304, 0x9e7f, 0x9e93, 0x8ad6, 0x58df, 0x5f04, 0x6727, 0x7027, 0x74cf, 0x7c60, 0x807e, 0x5121, 0x7028, 0x7262, 0x78ca, 0x8cc2, 0x8cda, 0x8cf4, 0x96f7, 0x4e86, 0x50da, 0x5bee, 0x5ed6, 0x6599, 0x71ce, 0x7642, 0x77ad, 0x804a, 0x84fc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ 96 ] = { 0xfffd, 0x907c, 0x9b27, 0x9f8d, 0x58d8, 0x5a41, 0x5c62, 0x6a13, 0x6dda, 0x6f0f, 0x763b, 0x7d2f, 0x7e37, 0x851e, 0x8938, 0x93e4, 0x964b, 0x5289, 0x65d2, 0x67f3, 0x69b4, 0x6d41, 0x6e9c, 0x700f, 0x7409, 0x7460, 0x7559, 0x7624, 0x786b, 0x8b2c, 0x985e, 0x516d, 0x622e, 0x9678, 0x4f96, 0x502b, 0x5d19, 0x6dea, 0x7db8, 0x8f2a, 0x5f8b, 0x6144, 0x6817, 0xf961, 0x9686, 0x52d2, 0x808b, 0x51dc, 0x51cc, 0x695e, 0x7a1c, 0x7dbe, 0x83f1, 0x9675, 0x4fda, 0x5229, 0x5398, 0x540f, 0x550e, 0x5c65, 0x60a7, 0x674e, 0x68a8, 0x6d6c, 0x7281, 0x72f8, 0x7406, 0x7483, 0xf962, 0x75e2, 0x7c6c, 0x7f79, 0x7fb8, 0x8389, 0x88cf, 0x88e1, 0x91cc, 0x91d0, 0x96e2, 0x9bc9, 0x541d, 0x6f7e, 0x71d0, 0x7498, 0x85fa, 0x8eaa, 0x96a3, 0x9c57, 0x9e9f, 0x6797, 0x6dcb, 0x7433, 0x81e8, 0x9716, 0x782c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ 96 ] = { 0xfffd, 0x7acb, 0x7b20, 0x7c92, 0x6469, 0x746a, 0x75f2, 0x78bc, 0x78e8, 0x99ac, 0x9b54, 0x9ebb, 0x5bde, 0x5e55, 0x6f20, 0x819c, 0x83ab, 0x9088, 0x4e07, 0x534d, 0x5a29, 0x5dd2, 0x5f4e, 0x6162, 0x633d, 0x6669, 0x66fc, 0x6eff, 0x6f2b, 0x7063, 0x779e, 0x842c, 0x8513, 0x883b, 0x8f13, 0x9945, 0x9c3b, 0x551c, 0x62b9, 0x672b, 0x6cab, 0x8309, 0x896a, 0x977a, 0x4ea1, 0x5984, 0x5fd8, 0x5fd9, 0x671b, 0x7db2, 0x7f54, 0x8292, 0x832b, 0x83bd, 0x8f1e, 0x9099, 0x57cb, 0x59b9, 0x5a92, 0x5bd0, 0x6627, 0x679a, 0x6885, 0x6bcf, 0x7164, 0x7f75, 0x8cb7, 0x8ce3, 0x9081, 0x9b45, 0x8108, 0x8c8a, 0x964c, 0x9a40, 0x9ea5, 0x5b5f, 0x6c13, 0x731b, 0x76f2, 0x76df, 0x840c, 0x51aa, 0x8993, 0x514d, 0x5195, 0x52c9, 0x68c9, 0x6c94, 0x7704, 0x7720, 0x7dbf, 0x7dec, 0x9762, 0x9eb5, 0x6ec5, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ 96 ] = { 0xfffd, 0x8511, 0x51a5, 0x540d, 0x547d, 0x660e, 0x669d, 0x6927, 0x6e9f, 0x76bf, 0x7791, 0x8317, 0x84c2, 0x879f, 0x9169, 0x9298, 0x9cf4, 0x8882, 0x4fae, 0x5192, 0x52df, 0x59c6, 0x5e3d, 0x6155, 0x6478, 0x6479, 0x66ae, 0x67d0, 0x6a21, 0x6bcd, 0x6bdb, 0x725f, 0x7261, 0x7441, 0x7738, 0x77db, 0x8017, 0x82bc, 0x8305, 0x8b00, 0x8b28, 0x8c8c, 0x6728, 0x6c90, 0x7267, 0x76ee, 0x7766, 0x7a46, 0x9da9, 0x6b7f, 0x6c92, 0x5922, 0x6726, 0x8499, 0x536f, 0x5893, 0x5999, 0x5edf, 0x63cf, 0x6634, 0x6773, 0x6e3a, 0x732b, 0x7ad7, 0x82d7, 0x9328, 0x52d9, 0x5deb, 0x61ae, 0x61cb, 0x620a, 0x62c7, 0x64ab, 0x65e0, 0x6959, 0x6b66, 0x6bcb, 0x7121, 0x73f7, 0x755d, 0x7e46, 0x821e, 0x8302, 0x856a, 0x8aa3, 0x8cbf, 0x9727, 0x9d61, 0x58a8, 0x9ed8, 0x5011, 0x520e, 0x543b, 0x554f, 0x6587, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ 96 ] = { 0xfffd, 0x6c76, 0x7d0a, 0x7d0b, 0x805e, 0x868a, 0x9580, 0x96ef, 0x52ff, 0x6c95, 0x7269, 0x5473, 0x5a9a, 0x5c3e, 0x5d4b, 0x5f4c, 0x5fae, 0x672a, 0x68b6, 0x6963, 0x6e3c, 0x6e44, 0x7709, 0x7c73, 0x7f8e, 0x8587, 0x8b0e, 0x8ff7, 0x9761, 0x9ef4, 0x5cb7, 0x60b6, 0x610d, 0x61ab, 0x654f, 0x65fb, 0x65fc, 0x6c11, 0x6cef, 0x739f, 0x73c9, 0x7de1, 0x9594, 0x5bc6, 0x871c, 0x8b10, 0x525d, 0x535a, 0x62cd, 0x640f, 0x64b2, 0x6734, 0x6a38, 0x6cca, 0x73c0, 0x749e, 0x7b94, 0x7c95, 0x7e1b, 0x818a, 0x8236, 0x8584, 0x8feb, 0x96f9, 0x99c1, 0x4f34, 0x534a, 0x53cd, 0x53db, 0x62cc, 0x642c, 0x6500, 0x6591, 0x69c3, 0x6cee, 0x6f58, 0x73ed, 0x7554, 0x7622, 0x76e4, 0x76fc, 0x78d0, 0x78fb, 0x792c, 0x7d46, 0x822c, 0x87e0, 0x8fd4, 0x9812, 0x98ef, 0x52c3, 0x62d4, 0x64a5, 0x6e24, 0x6f51, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ 96 ] = { 0xfffd, 0x767c, 0x8dcb, 0x91b1, 0x9262, 0x9aee, 0x9b43, 0x5023, 0x508d, 0x574a, 0x59a8, 0x5c28, 0x5e47, 0x5f77, 0x623f, 0x653e, 0x65b9, 0x65c1, 0x6609, 0x678b, 0x699c, 0x6ec2, 0x78c5, 0x7d21, 0x80aa, 0x8180, 0x822b, 0x82b3, 0x84a1, 0x868c, 0x8a2a, 0x8b17, 0x90a6, 0x9632, 0x9f90, 0x500d, 0x4ff3, 0xf963, 0x57f9, 0x5f98, 0x62dc, 0x6392, 0x676f, 0x6e43, 0x7119, 0x76c3, 0x80cc, 0x80da, 0x88f4, 0x88f5, 0x8919, 0x8ce0, 0x8f29, 0x914d, 0x966a, 0x4f2f, 0x4f70, 0x5e1b, 0x67cf, 0x6822, 0x767d, 0x767e, 0x9b44, 0x5e61, 0x6a0a, 0x7169, 0x71d4, 0x756a, 0xf964, 0x7e41, 0x8543, 0x85e9, 0x98dc, 0x4f10, 0x7b4f, 0x7f70, 0x95a5, 0x51e1, 0x5e06, 0x68b5, 0x6c3e, 0x6c4e, 0x6cdb, 0x72af, 0x7bc4, 0x8303, 0x6cd5, 0x743a, 0x50fb, 0x5288, 0x58c1, 0x64d8, 0x6a97, 0x74a7, 0x7656, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ 96 ] = { 0xfffd, 0x78a7, 0x8617, 0x95e2, 0x9739, 0xf965, 0x535e, 0x5f01, 0x8b8a, 0x8fa8, 0x8faf, 0x908a, 0x5225, 0x77a5, 0x9c49, 0x9f08, 0x4e19, 0x5002, 0x5175, 0x5c5b, 0x5e77, 0x661e, 0x663a, 0x67c4, 0x68c5, 0x70b3, 0x7501, 0x75c5, 0x79c9, 0x7add, 0x8f27, 0x9920, 0x9a08, 0x4fdd, 0x5821, 0x5831, 0x5bf6, 0x666e, 0x6b65, 0x6d11, 0x6e7a, 0x6f7d, 0x73e4, 0x752b, 0x83e9, 0x88dc, 0x8913, 0x8b5c, 0x8f14, 0x4f0f, 0x50d5, 0x5310, 0x535c, 0x5b93, 0x5fa9, 0x670d, 0x798f, 0x8179, 0x832f, 0x8514, 0x8907, 0x8986, 0x8f39, 0x8f3b, 0x99a5, 0x9c12, 0x672c, 0x4e76, 0x4ff8, 0x5949, 0x5c01, 0x5cef, 0x5cf0, 0x6367, 0x68d2, 0x70fd, 0x71a2, 0x742b, 0x7e2b, 0x84ec, 0x8702, 0x9022, 0x92d2, 0x9cf3, 0x4e0d, 0x4ed8, 0x4fef, 0x5085, 0x5256, 0x526f, 0x5426, 0x5490, 0x57e0, 0x592b, 0x5a66, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ 96 ] = { 0xfffd, 0x5b5a, 0x5b75, 0x5bcc, 0x5e9c, 0xf966, 0x6276, 0x6577, 0x65a7, 0x6d6e, 0x6ea5, 0x7236, 0x7b26, 0x7c3f, 0x7f36, 0x8150, 0x8151, 0x819a, 0x8240, 0x8299, 0x83a9, 0x8a03, 0x8ca0, 0x8ce6, 0x8cfb, 0x8d74, 0x8dba, 0x90e8, 0x91dc, 0x961c, 0x9644, 0x99d9, 0x9ce7, 0x5317, 0x5206, 0x5429, 0x5674, 0x58b3, 0x5954, 0x596e, 0x5fff, 0x61a4, 0x626e, 0x6610, 0x6c7e, 0x711a, 0x76c6, 0x7c89, 0x7cde, 0x7d1b, 0x82ac, 0x8cc1, 0x96f0, 0xf967, 0x4f5b, 0x5f17, 0x5f7f, 0x62c2, 0x5d29, 0x670b, 0x68da, 0x787c, 0x7e43, 0x9d6c, 0x4e15, 0x5099, 0x5315, 0x532a, 0x5351, 0x5983, 0x5a62, 0x5e87, 0x60b2, 0x618a, 0x6249, 0x6279, 0x6590, 0x6787, 0x69a7, 0x6bd4, 0x6bd6, 0x6bd7, 0x6bd8, 0x6cb8, 0xf968, 0x7435, 0x75fa, 0x7812, 0x7891, 0x79d5, 0x79d8, 0x7c83, 0x7dcb, 0x7fe1, 0x80a5, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ 96 ] = { 0xfffd, 0x813e, 0x81c2, 0x83f2, 0x871a, 0x88e8, 0x8ab9, 0x8b6c, 0x8cbb, 0x9119, 0x975e, 0x98db, 0x9f3b, 0x56ac, 0x5b2a, 0x5f6c, 0x658c, 0x6ab3, 0x6baf, 0x6d5c, 0x6ff1, 0x7015, 0x725d, 0x73ad, 0x8ca7, 0x8cd3, 0x983b, 0x6191, 0x6c37, 0x8058, 0x9a01, 0x4e4d, 0x4e8b, 0x4e9b, 0x4ed5, 0x4f3a, 0x4f3c, 0x4f7f, 0x4fdf, 0x50ff, 0x53f2, 0x53f8, 0x5506, 0x55e3, 0x56db, 0x58eb, 0x5962, 0x5a11, 0x5beb, 0x5bfa, 0x5c04, 0x5df3, 0x5e2b, 0x5f99, 0x601d, 0x6368, 0x659c, 0x65af, 0x67f6, 0x67fb, 0x68ad, 0x6b7b, 0x6c99, 0x6cd7, 0x6e23, 0x7009, 0x7345, 0x7802, 0x793e, 0x7940, 0x7960, 0x79c1, 0x7be9, 0x7d17, 0x7d72, 0x8086, 0x820d, 0x838e, 0x84d1, 0x86c7, 0x88df, 0x8a50, 0x8a5e, 0x8b1d, 0x8cdc, 0x8d66, 0x8fad, 0x90aa, 0x98fc, 0x99df, 0x9e9d, 0x524a, 0xf969, 0x6714, 0xf96a, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ 96 ] = { 0xfffd, 0x5098, 0x522a, 0x5c71, 0x6563, 0x6c55, 0x73ca, 0x7523, 0x759d, 0x7b97, 0x849c, 0x9178, 0x9730, 0x4e77, 0x6492, 0x6bba, 0x715e, 0x85a9, 0x4e09, 0xf96b, 0x6749, 0x68ee, 0x6e17, 0x829f, 0x8518, 0x886b, 0x63f7, 0x6f81, 0x9212, 0x98af, 0x4e0a, 0x50b7, 0x50cf, 0x511f, 0x5546, 0x55aa, 0x5617, 0x5b40, 0x5c19, 0x5ce0, 0x5e38, 0x5e8a, 0x5ea0, 0x5ec2, 0x60f3, 0x6851, 0x6a61, 0x6e58, 0x723d, 0x7240, 0x72c0, 0x76f8, 0x7965, 0x7bb1, 0x7fd4, 0x88f3, 0x89f4, 0x8a73, 0x8c61, 0x8cde, 0x971c, 0x585e, 0x74bd, 0x8cfd, 0x55c7, 0xf96c, 0x7a61, 0x7d22, 0x8272, 0x7272, 0x751f, 0x7525, 0xf96d, 0x7b19, 0x5885, 0x58fb, 0x5dbc, 0x5e8f, 0x5eb6, 0x5f90, 0x6055, 0x6292, 0x637f, 0x654d, 0x6691, 0x66d9, 0x66f8, 0x6816, 0x68f2, 0x7280, 0x745e, 0x7b6e, 0x7d6e, 0x7dd6, 0x7f72, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ 96 ] = { 0xfffd, 0x80e5, 0x8212, 0x85af, 0x897f, 0x8a93, 0x901d, 0x92e4, 0x9ecd, 0x9f20, 0x5915, 0x596d, 0x5e2d, 0x60dc, 0x6614, 0x6673, 0x6790, 0x6c50, 0x6dc5, 0x6f5f, 0x77f3, 0x78a9, 0x84c6, 0x91cb, 0x932b, 0x4ed9, 0x50ca, 0x5148, 0x5584, 0x5b0b, 0x5ba3, 0x6247, 0x657e, 0x65cb, 0x6e32, 0x717d, 0x7401, 0x7444, 0x7487, 0x74bf, 0x766c, 0x79aa, 0x7dda, 0x7e55, 0x7fa8, 0x817a, 0x81b3, 0x8239, 0x861a, 0x87ec, 0x8a75, 0x8de3, 0x9078, 0x9291, 0x9425, 0x994d, 0x9bae, 0x5368, 0x5c51, 0x6954, 0x6cc4, 0x6d29, 0x6e2b, 0x820c, 0x859b, 0x893b, 0x8a2d, 0x8aaa, 0x96ea, 0x9f67, 0x5261, 0x66b9, 0x6bb2, 0x7e96, 0x87fe, 0x8d0d, 0x9583, 0x965d, 0x651d, 0x6d89, 0x71ee, 0xf96e, 0x57ce, 0x59d3, 0x5bac, 0x6027, 0x60fa, 0x6210, 0x661f, 0x665f, 0x7329, 0x73f9, 0x76db, 0x7701, 0x7b6c, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ 96 ] = { 0xfffd, 0x8056, 0x8072, 0x8165, 0x8aa0, 0x9192, 0x4e16, 0x52e2, 0x6b72, 0x6d17, 0x7a05, 0x7b39, 0x7d30, 0xf96f, 0x8cb0, 0x53ec, 0x562f, 0x5851, 0x5bb5, 0x5c0f, 0x5c11, 0x5de2, 0x6240, 0x6383, 0x6414, 0x662d, 0x68b3, 0x6cbc, 0x6d88, 0x6eaf, 0x701f, 0x70a4, 0x71d2, 0x7526, 0x758f, 0x758e, 0x7619, 0x7b11, 0x7be0, 0x7c2b, 0x7d20, 0x7d39, 0x852c, 0x856d, 0x8607, 0x8a34, 0x900d, 0x9061, 0x90b5, 0x92b7, 0x97f6, 0x9a37, 0x4fd7, 0x5c6c, 0x675f, 0x6d91, 0x7c9f, 0x7e8c, 0x8b16, 0x8d16, 0x901f, 0x5b6b, 0x5dfd, 0x640d, 0x84c0, 0x905c, 0x98e1, 0x7387, 0x5b8b, 0x609a, 0x677e, 0x6dde, 0x8a1f, 0x8aa6, 0x9001, 0x980c, 0x5237, 0xf970, 0x7051, 0x788e, 0x9396, 0x8870, 0x91d7, 0x4fee, 0x53d7, 0x55fd, 0x56da, 0x5782, 0x58fd, 0x5ac2, 0x5b88, 0x5cab, 0x5cc0, 0x5e25, 0x6101, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ 96 ] = { 0xfffd, 0x620d, 0x624b, 0x6388, 0x641c, 0x6536, 0x6578, 0x6a39, 0x6b8a, 0x6c34, 0x6d19, 0x6f31, 0x71e7, 0x72e9, 0x7378, 0x7407, 0x74b2, 0x7626, 0x7761, 0x79c0, 0x7a57, 0x7aea, 0x7cb9, 0x7d8f, 0x7dac, 0x7e61, 0x7f9e, 0x8129, 0x8331, 0x8490, 0x84da, 0x85ea, 0x8896, 0x8ab0, 0x8b90, 0x8f38, 0x9042, 0x9083, 0x916c, 0x9296, 0x92b9, 0x968b, 0x96a7, 0x96a8, 0x96d6, 0x9700, 0x9808, 0x9996, 0x9ad3, 0x9b1a, 0x53d4, 0x587e, 0x5919, 0x5b70, 0x5bbf, 0x6dd1, 0x6f5a, 0x719f, 0x7421, 0x74b9, 0x8085, 0x83fd, 0x5de1, 0x5f87, 0x5faa, 0x6042, 0x65ec, 0x6812, 0x696f, 0x6a53, 0x6b89, 0x6d35, 0x6df3, 0x73e3, 0x76fe, 0x77ac, 0x7b4d, 0x7d14, 0x8123, 0x821c, 0x8340, 0x84f4, 0x8563, 0x8a62, 0x8ac4, 0x9187, 0x931e, 0x9806, 0x99b4, 0x620c, 0x8853, 0x8ff0, 0x9265, 0x5d07, 0x5d27, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ 96 ] = { 0xfffd, 0x5d69, 0x745f, 0x819d, 0x8768, 0x6fd5, 0x62fe, 0x7fd2, 0x8936, 0x8972, 0x4e1e, 0x4e58, 0x50e7, 0x52dd, 0x5347, 0x627f, 0x6607, 0x7e69, 0x8805, 0x965e, 0x4f8d, 0x5319, 0x5636, 0x59cb, 0x5aa4, 0x5c38, 0x5c4e, 0x5c4d, 0x5e02, 0x5f11, 0x6043, 0x65bd, 0x662f, 0x6642, 0x67be, 0x67f4, 0x731c, 0x77e2, 0x793a, 0x7fc5, 0x8494, 0x84cd, 0x8996, 0x8a66, 0x8a69, 0x8ae1, 0x8c55, 0x8c7a, 0x57f4, 0x5bd4, 0x5f0f, 0x606f, 0x62ed, 0x690d, 0x6b96, 0x6e5c, 0x7184, 0x7bd2, 0x8755, 0x8b58, 0x8efe, 0x98df, 0x98fe, 0x4f38, 0x4f81, 0x4fe1, 0x547b, 0x5a20, 0x5bb8, 0x613c, 0x65b0, 0x6668, 0x71fc, 0x7533, 0x795e, 0x7d33, 0x814e, 0x81e3, 0x8398, 0x85aa, 0x85ce, 0x8703, 0x8a0a, 0x8eab, 0x8f9b, 0xf971, 0x8fc5, 0x5931, 0x5ba4, 0x5be6, 0x6089, 0x5be9, 0x5c0b, 0x5fc3, 0x6c81, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ 96 ] = { 0xfffd, 0xf972, 0x6df1, 0x700b, 0x751a, 0x82af, 0x8af6, 0x4ec0, 0x5341, 0xf973, 0x96d9, 0x6c0f, 0x4e9e, 0x4fc4, 0x5152, 0x555e, 0x5a25, 0x5ce8, 0x6211, 0x7259, 0x82bd, 0x83aa, 0x86fe, 0x8859, 0x8a1d, 0x963f, 0x96c5, 0x9913, 0x9d09, 0x9d5d, 0x580a, 0x5cb3, 0x5dbd, 0x5e44, 0x60e1, 0x6115, 0x63e1, 0x6a02, 0x6e25, 0x9102, 0x9354, 0x984e, 0x9c10, 0x9f77, 0x5b89, 0x5cb8, 0x6309, 0x664f, 0x6848, 0x773c, 0x96c1, 0x978d, 0x9854, 0x9b9f, 0x65a1, 0x8b01, 0x8ecb, 0x95bc, 0x5535, 0x5ca9, 0x5dd6, 0x5eb5, 0x6697, 0x764c, 0x83f4, 0x95c7, 0x58d3, 0x62bc, 0x72ce, 0x9d28, 0x4ef0, 0x592e, 0x600f, 0x663b, 0x6b83, 0x79e7, 0x9d26, 0x5393, 0x54c0, 0x57c3, 0x5d16, 0x611b, 0x66d6, 0x6daf, 0x788d, 0x827e, 0x9698, 0x9744, 0x5384, 0x627c, 0x6396, 0x6db2, 0x7e0a, 0x814b, 0x984d, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ 96 ] = { 0xfffd, 0x6afb, 0x7f4c, 0x9daf, 0x9e1a, 0x4e5f, 0x503b, 0x51b6, 0x591c, 0x60f9, 0x63f6, 0x6930, 0x723a, 0x8036, 0xf974, 0x91ce, 0x5f31, 0xf975, 0xf976, 0x7d04, 0x82e5, 0x846f, 0x84bb, 0x85e5, 0x8e8d, 0xf977, 0x4f6f, 0xf978, 0xf979, 0x58e4, 0x5b43, 0x6059, 0x63da, 0x6518, 0x656d, 0x6698, 0xf97a, 0x694a, 0x6a23, 0x6d0b, 0x7001, 0x716c, 0x75d2, 0x760d, 0x79b3, 0x7a70, 0xf97b, 0x7f8a, 0xf97c, 0x8944, 0xf97d, 0x8b93, 0x91c0, 0x967d, 0xf97e, 0x990a, 0x5704, 0x5fa1, 0x65bc, 0x6f01, 0x7600, 0x79a6, 0x8a9e, 0x99ad, 0x9b5a, 0x9f6c, 0x5104, 0x61b6, 0x6291, 0x6a8d, 0x81c6, 0x5043, 0x5830, 0x5f66, 0x7109, 0x8a00, 0x8afa, 0x5b7c, 0x8616, 0x4ffa, 0x513c, 0x56b4, 0x5944, 0x63a9, 0x6df9, 0x5daa, 0x696d, 0x5186, 0x4e88, 0x4f59, 0xf97f, 0xf980, 0xf981, 0x5982, 0xf982, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ 96 ] = { 0xfffd, 0xf983, 0x6b5f, 0x6c5d, 0xf984, 0x74b5, 0x7916, 0xf985, 0x8207, 0x8245, 0x8339, 0x8f3f, 0x8f5d, 0xf986, 0x9918, 0xf987, 0xf988, 0xf989, 0x4ea6, 0xf98a, 0x57df, 0x5f79, 0x6613, 0xf98b, 0xf98c, 0x75ab, 0x7e79, 0x8b6f, 0xf98d, 0x9006, 0x9a5b, 0x56a5, 0x5827, 0x59f8, 0x5a1f, 0x5bb4, 0xf98e, 0x5ef6, 0xf98f, 0xf990, 0x6350, 0x633b, 0xf991, 0x693d, 0x6c87, 0x6cbf, 0x6d8e, 0x6d93, 0x6df5, 0x6f14, 0xf992, 0x70df, 0x7136, 0x7159, 0xf993, 0x71c3, 0x71d5, 0xf994, 0x784f, 0x786f, 0xf995, 0x7b75, 0x7de3, 0xf996, 0x7e2f, 0xf997, 0x884d, 0x8edf, 0xf998, 0xf999, 0xf99a, 0x925b, 0xf99b, 0x9cf6, 0xf99c, 0xf99d, 0xf99e, 0x6085, 0x6d85, 0xf99f, 0x71b1, 0xf9a0, 0xf9a1, 0x95b1, 0x53ad, 0xf9a2, 0xf9a3, 0xf9a4, 0x67d3, 0xf9a5, 0x708e, 0x7130, 0x7430, 0x8276, 0x82d2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ 96 ] = { 0xfffd, 0xf9a6, 0x95bb, 0x9ae5, 0x9e7d, 0x66c4, 0xf9a7, 0x71c1, 0x8449, 0xf9a8, 0xf9a9, 0x584b, 0xf9aa, 0xf9ab, 0x5db8, 0x5f71, 0xf9ac, 0x6620, 0x668e, 0x6979, 0x69ae, 0x6c38, 0x6cf3, 0x6e36, 0x6f41, 0x6fda, 0x701b, 0x702f, 0x7150, 0x71df, 0x7370, 0xf9ad, 0x745b, 0xf9ae, 0x74d4, 0x76c8, 0x7a4e, 0x7e93, 0xf9af, 0xf9b0, 0x82f1, 0x8a60, 0x8fce, 0xf9b1, 0x9348, 0xf9b2, 0x9719, 0xf9b3, 0xf9b4, 0x4e42, 0x502a, 0xf9b5, 0x5208, 0x53e1, 0x66f3, 0x6c6d, 0x6fca, 0x730a, 0x777f, 0x7a62, 0x82ae, 0x85dd, 0x8602, 0xf9b6, 0x88d4, 0x8a63, 0x8b7d, 0x8c6b, 0xf9b7, 0x92b3, 0xf9b8, 0x9713, 0x9810, 0x4e94, 0x4f0d, 0x4fc9, 0x50b2, 0x5348, 0x543e, 0x5433, 0x55da, 0x5862, 0x58ba, 0x5967, 0x5a1b, 0x5be4, 0x609f, 0xf9b9, 0x61ca, 0x6556, 0x65ff, 0x6664, 0x68a7, 0x6c5a, 0x6fb3, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ 96 ] = { 0xfffd, 0x70cf, 0x71ac, 0x7352, 0x7b7d, 0x8708, 0x8aa4, 0x9c32, 0x9f07, 0x5c4b, 0x6c83, 0x7344, 0x7389, 0x923a, 0x6eab, 0x7465, 0x761f, 0x7a69, 0x7e15, 0x860a, 0x5140, 0x58c5, 0x64c1, 0x74ee, 0x7515, 0x7670, 0x7fc1, 0x9095, 0x96cd, 0x9954, 0x6e26, 0x74e6, 0x7aa9, 0x7aaa, 0x81e5, 0x86d9, 0x8778, 0x8a1b, 0x5a49, 0x5b8c, 0x5b9b, 0x68a1, 0x6900, 0x6d63, 0x73a9, 0x7413, 0x742c, 0x7897, 0x7de9, 0x7feb, 0x8118, 0x8155, 0x839e, 0x8c4c, 0x962e, 0x9811, 0x66f0, 0x5f80, 0x65fa, 0x6789, 0x6c6a, 0x738b, 0x502d, 0x5a03, 0x6b6a, 0x77ee, 0x5916, 0x5d6c, 0x5dcd, 0x7325, 0x754f, 0xf9ba, 0xf9bb, 0x50e5, 0x51f9, 0x582f, 0x592d, 0x5996, 0x59da, 0x5be5, 0xf9bc, 0xf9bd, 0x5da2, 0x62d7, 0x6416, 0x6493, 0x64fe, 0xf9be, 0x66dc, 0xf9bf, 0x6a48, 0xf9c0, 0x71ff, 0x7464, 0xf9c1, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ 96 ] = { 0xfffd, 0x7a88, 0x7aaf, 0x7e47, 0x7e5e, 0x8000, 0x8170, 0xf9c2, 0x87ef, 0x8981, 0x8b20, 0x9059, 0xf9c3, 0x9080, 0x9952, 0x617e, 0x6b32, 0x6d74, 0x7e1f, 0x8925, 0x8fb1, 0x4fd1, 0x50ad, 0x5197, 0x52c7, 0x57c7, 0x5889, 0x5bb9, 0x5eb8, 0x6142, 0x6995, 0x6d8c, 0x6e67, 0x6eb6, 0x7194, 0x7462, 0x7528, 0x752c, 0x8073, 0x8338, 0x84c9, 0x8e0a, 0x9394, 0x93de, 0xf9c4, 0x4e8e, 0x4f51, 0x5076, 0x512a, 0x53c8, 0x53cb, 0x53f3, 0x5b87, 0x5bd3, 0x5c24, 0x611a, 0x6182, 0x65f4, 0x725b, 0x7397, 0x7440, 0x76c2, 0x7950, 0x7991, 0x79b9, 0x7d06, 0x7fbd, 0x828b, 0x85d5, 0x865e, 0x8fc2, 0x9047, 0x90f5, 0x91ea, 0x9685, 0x96e8, 0x96e9, 0x52d6, 0x5f67, 0x65ed, 0x6631, 0x682f, 0x715c, 0x7a36, 0x90c1, 0x980a, 0x4e91, 0xf9c5, 0x6a52, 0x6b9e, 0x6f90, 0x7189, 0x8018, 0x82b8, 0x8553, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ 96 ] = { 0xfffd, 0x904b, 0x9695, 0x96f2, 0x97fb, 0x851a, 0x9b31, 0x4e90, 0x718a, 0x96c4, 0x5143, 0x539f, 0x54e1, 0x5713, 0x5712, 0x57a3, 0x5a9b, 0x5ac4, 0x5bc3, 0x6028, 0x613f, 0x63f4, 0x6c85, 0x6d39, 0x6e72, 0x6e90, 0x7230, 0x733f, 0x7457, 0x82d1, 0x8881, 0x8f45, 0x9060, 0xf9c6, 0x9662, 0x9858, 0x9d1b, 0x6708, 0x8d8a, 0x925e, 0x4f4d, 0x5049, 0x50de, 0x5371, 0x570d, 0x59d4, 0x5a01, 0x5c09, 0x6170, 0x6690, 0x6e2d, 0x7232, 0x744b, 0x7def, 0x80c3, 0x840e, 0x8466, 0x853f, 0x875f, 0x885b, 0x8918, 0x8b02, 0x9055, 0x97cb, 0x9b4f, 0x4e73, 0x4f91, 0x5112, 0x516a, 0xf9c7, 0x552f, 0x55a9, 0x5b7a, 0x5ba5, 0x5e7c, 0x5e7d, 0x5ebe, 0x60a0, 0x60df, 0x6108, 0x6109, 0x63c4, 0x6538, 0x6709, 0xf9c8, 0x67d4, 0x67da, 0xf9c9, 0x6961, 0x6962, 0x6cb9, 0x6d27, 0xf9ca, 0x6e38, 0xf9cb, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ 96 ] = { 0xfffd, 0x6fe1, 0x7336, 0x7337, 0xf9cc, 0x745c, 0x7531, 0xf9cd, 0x7652, 0xf9ce, 0xf9cf, 0x7dad, 0x81fe, 0x8438, 0x88d5, 0x8a98, 0x8adb, 0x8aed, 0x8e30, 0x8e42, 0x904a, 0x903e, 0x907a, 0x9149, 0x91c9, 0x936e, 0xf9d0, 0xf9d1, 0x5809, 0xf9d2, 0x6bd3, 0x8089, 0x80b2, 0xf9d3, 0xf9d4, 0x5141, 0x596b, 0x5c39, 0xf9d5, 0xf9d6, 0x6f64, 0x73a7, 0x80e4, 0x8d07, 0xf9d7, 0x9217, 0x958f, 0xf9d8, 0xf9d9, 0xf9da, 0xf9db, 0x807f, 0x620e, 0x701c, 0x7d68, 0x878d, 0xf9dc, 0x57a0, 0x6069, 0x6147, 0x6bb7, 0x8abe, 0x9280, 0x96b1, 0x4e59, 0x541f, 0x6deb, 0x852d, 0x9670, 0x97f3, 0x98ee, 0x63d6, 0x6ce3, 0x9091, 0x51dd, 0x61c9, 0x81ba, 0x9df9, 0x4f9d, 0x501a, 0x5100, 0x5b9c, 0x610f, 0x61ff, 0x64ec, 0x6905, 0x6bc5, 0x7591, 0x77e3, 0x7fa9, 0x8264, 0x858f, 0x87fb, 0x8863, 0x8abc, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ 96 ] = { 0xfffd, 0x8b70, 0x91ab, 0x4e8c, 0x4ee5, 0x4f0a, 0xf9dd, 0xf9de, 0x5937, 0x59e8, 0xf9df, 0x5df2, 0x5f1b, 0x5f5b, 0x6021, 0xf9e0, 0xf9e1, 0xf9e2, 0xf9e3, 0x723e, 0x73e5, 0xf9e4, 0x7570, 0x75cd, 0xf9e5, 0x79fb, 0xf9e6, 0x800c, 0x8033, 0x8084, 0x82e1, 0x8351, 0xf9e7, 0xf9e8, 0x8cbd, 0x8cb3, 0x9087, 0xf9e9, 0xf9ea, 0x98f4, 0x990c, 0xf9eb, 0xf9ec, 0x7037, 0x76ca, 0x7fca, 0x7fcc, 0x7ffc, 0x8b1a, 0x4eba, 0x4ec1, 0x5203, 0x5370, 0xf9ed, 0x54bd, 0x56e0, 0x59fb, 0x5bc5, 0x5f15, 0x5fcd, 0x6e6e, 0xf9ee, 0xf9ef, 0x7d6a, 0x8335, 0xf9f0, 0x8693, 0x8a8d, 0xf9f1, 0x976d, 0x9777, 0xf9f2, 0xf9f3, 0x4e00, 0x4f5a, 0x4f7e, 0x58f9, 0x65e5, 0x6ea2, 0x9038, 0x93b0, 0x99b9, 0x4efb, 0x58ec, 0x598a, 0x59d9, 0x6041, 0xf9f4, 0xf9f5, 0x7a14, 0xf9f6, 0x834f, 0x8cc3, 0x5165, 0x5344, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ 96 ] = { 0xfffd, 0xf9f7, 0xf9f8, 0xf9f9, 0x4ecd, 0x5269, 0x5b55, 0x82bf, 0x4ed4, 0x523a, 0x54a8, 0x59c9, 0x59ff, 0x5b50, 0x5b57, 0x5b5c, 0x6063, 0x6148, 0x6ecb, 0x7099, 0x716e, 0x7386, 0x74f7, 0x75b5, 0x78c1, 0x7d2b, 0x8005, 0x81ea, 0x8328, 0x8517, 0x85c9, 0x8aee, 0x8cc7, 0x96cc, 0x4f5c, 0x52fa, 0x56bc, 0x65ab, 0x6628, 0x707c, 0x70b8, 0x7235, 0x7dbd, 0x828d, 0x914c, 0x96c0, 0x9d72, 0x5b71, 0x68e7, 0x6b98, 0x6f7a, 0x76de, 0x5c91, 0x66ab, 0x6f5b, 0x7bb4, 0x7c2a, 0x8836, 0x96dc, 0x4e08, 0x4ed7, 0x5320, 0x5834, 0x58bb, 0x58ef, 0x596c, 0x5c07, 0x5e33, 0x5e84, 0x5f35, 0x638c, 0x66b2, 0x6756, 0x6a1f, 0x6aa3, 0x6b0c, 0x6f3f, 0x7246, 0xf9fa, 0x7350, 0x748b, 0x7ae0, 0x7ca7, 0x8178, 0x81df, 0x81e7, 0x838a, 0x846c, 0x8523, 0x8594, 0x85cf, 0x88dd, 0x8d13, 0x91ac, 0x9577, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ 96 ] = { 0xfffd, 0x969c, 0x518d, 0x54c9, 0x5728, 0x5bb0, 0x624d, 0x6750, 0x683d, 0x6893, 0x6e3d, 0x6ed3, 0x707d, 0x7e21, 0x88c1, 0x8ca1, 0x8f09, 0x9f4b, 0x9f4e, 0x722d, 0x7b8f, 0x8acd, 0x931a, 0x4f47, 0x4f4e, 0x5132, 0x5480, 0x59d0, 0x5e95, 0x62b5, 0x6775, 0x696e, 0x6a17, 0x6cae, 0x6e1a, 0x72d9, 0x732a, 0x75bd, 0x7bb8, 0x7d35, 0x82e7, 0x83f9, 0x8457, 0x85f7, 0x8a5b, 0x8caf, 0x8e87, 0x9019, 0x90b8, 0x96ce, 0x9f5f, 0x52e3, 0x540a, 0x5ae1, 0x5bc2, 0x6458, 0x6575, 0x6ef4, 0x72c4, 0xf9fb, 0x7684, 0x7a4d, 0x7b1b, 0x7c4d, 0x7e3e, 0x7fdf, 0x837b, 0x8b2b, 0x8cca, 0x8d64, 0x8de1, 0x8e5f, 0x8fea, 0x8ff9, 0x9069, 0x93d1, 0x4f43, 0x4f7a, 0x50b3, 0x5168, 0x5178, 0x524d, 0x526a, 0x5861, 0x587c, 0x5960, 0x5c08, 0x5c55, 0x5edb, 0x609b, 0x6230, 0x6813, 0x6bbf, 0x6c08, 0x6fb1, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ 96 ] = { 0xfffd, 0x714e, 0x7420, 0x7530, 0x7538, 0x7551, 0x7672, 0x7b4c, 0x7b8b, 0x7bad, 0x7bc6, 0x7e8f, 0x8a6e, 0x8f3e, 0x8f49, 0x923f, 0x9293, 0x9322, 0x942b, 0x96fb, 0x985a, 0x986b, 0x991e, 0x5207, 0x622a, 0x6298, 0x6d59, 0x7664, 0x7aca, 0x7bc0, 0x7d76, 0x5360, 0x5cbe, 0x5e97, 0x6f38, 0x70b9, 0x7c98, 0x9711, 0x9b8e, 0x9ede, 0x63a5, 0x647a, 0x8776, 0x4e01, 0x4e95, 0x4ead, 0x505c, 0x5075, 0x5448, 0x59c3, 0x5b9a, 0x5e40, 0x5ead, 0x5ef7, 0x5f81, 0x60c5, 0x633a, 0x653f, 0x6574, 0x65cc, 0x6676, 0x6678, 0x67fe, 0x6968, 0x6a89, 0x6b63, 0x6c40, 0x6dc0, 0x6de8, 0x6e1f, 0x6e5e, 0x701e, 0x70a1, 0x738e, 0x73fd, 0x753a, 0x775b, 0x7887, 0x798e, 0x7a0b, 0x7a7d, 0x7cbe, 0x7d8e, 0x8247, 0x8a02, 0x8aea, 0x8c9e, 0x912d, 0x914a, 0x91d8, 0x9266, 0x92cc, 0x9320, 0x9706, 0x9756, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ 96 ] = { 0xfffd, 0x975c, 0x9802, 0x9f0e, 0x5236, 0x5291, 0x557c, 0x5824, 0x5e1d, 0x5f1f, 0x608c, 0x63d0, 0x68af, 0x6fdf, 0x796d, 0x7b2c, 0x81cd, 0x85ba, 0x88fd, 0x8af8, 0x8e44, 0x918d, 0x9664, 0x969b, 0x973d, 0x984c, 0x9f4a, 0x4fce, 0x5146, 0x51cb, 0x52a9, 0x5632, 0x5f14, 0x5f6b, 0x63aa, 0x64cd, 0x65e9, 0x6641, 0x66fa, 0x66f9, 0x671d, 0x689d, 0x68d7, 0x69fd, 0x6f15, 0x6f6e, 0x7167, 0x71e5, 0x722a, 0x74aa, 0x773a, 0x7956, 0x795a, 0x79df, 0x7a20, 0x7a95, 0x7c97, 0x7cdf, 0x7d44, 0x7e70, 0x8087, 0x85fb, 0x86a4, 0x8a54, 0x8abf, 0x8d99, 0x8e81, 0x9020, 0x906d, 0x91e3, 0x963b, 0x96d5, 0x9ce5, 0x65cf, 0x7c07, 0x8db3, 0x93c3, 0x5b58, 0x5c0a, 0x5352, 0x62d9, 0x731d, 0x5027, 0x5b97, 0x5f9e, 0x60b0, 0x616b, 0x68d5, 0x6dd9, 0x742e, 0x7a2e, 0x7d42, 0x7d9c, 0x7e31, 0x816b, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ 96 ] = { 0xfffd, 0x8e2a, 0x8e35, 0x937e, 0x9418, 0x4f50, 0x5750, 0x5de6, 0x5ea7, 0x632b, 0x7f6a, 0x4e3b, 0x4f4f, 0x4f8f, 0x505a, 0x59dd, 0x80c4, 0x546a, 0x5468, 0x55fe, 0x594f, 0x5b99, 0x5dde, 0x5eda, 0x665d, 0x6731, 0x67f1, 0x682a, 0x6ce8, 0x6d32, 0x6e4a, 0x6f8d, 0x70b7, 0x73e0, 0x7587, 0x7c4c, 0x7d02, 0x7d2c, 0x7da2, 0x821f, 0x86db, 0x8a3b, 0x8a85, 0x8d70, 0x8e8a, 0x8f33, 0x9031, 0x914e, 0x9152, 0x9444, 0x99d0, 0x7af9, 0x7ca5, 0x4fca, 0x5101, 0x51c6, 0x57c8, 0x5bef, 0x5cfb, 0x6659, 0x6a3d, 0x6d5a, 0x6e96, 0x6fec, 0x710c, 0x756f, 0x7ae3, 0x8822, 0x9021, 0x9075, 0x96cb, 0x99ff, 0x8301, 0x4e2d, 0x4ef2, 0x8846, 0x91cd, 0x537d, 0x6adb, 0x696b, 0x6c41, 0x847a, 0x589e, 0x618e, 0x66fe, 0x62ef, 0x70dd, 0x7511, 0x75c7, 0x7e52, 0x84b8, 0x8b49, 0x8d08, 0x4e4b, 0x53ea, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ 96 ] = { 0xfffd, 0x54ab, 0x5730, 0x5740, 0x5fd7, 0x6301, 0x6307, 0x646f, 0x652f, 0x65e8, 0x667a, 0x679d, 0x67b3, 0x6b62, 0x6c60, 0x6c9a, 0x6f2c, 0x77e5, 0x7825, 0x7949, 0x7957, 0x7d19, 0x80a2, 0x8102, 0x81f3, 0x829d, 0x82b7, 0x8718, 0x8a8c, 0xf9fc, 0x8d04, 0x8dbe, 0x9072, 0x76f4, 0x7a19, 0x7a37, 0x7e54, 0x8077, 0x5507, 0x55d4, 0x5875, 0x632f, 0x6422, 0x6649, 0x664b, 0x686d, 0x699b, 0x6b84, 0x6d25, 0x6eb1, 0x73cd, 0x7468, 0x74a1, 0x755b, 0x75b9, 0x76e1, 0x771e, 0x778b, 0x79e6, 0x7e09, 0x7e1d, 0x81fb, 0x852f, 0x8897, 0x8a3a, 0x8cd1, 0x8eeb, 0x8fb0, 0x9032, 0x93ad, 0x9663, 0x9673, 0x9707, 0x4f84, 0x53f1, 0x59ea, 0x5ac9, 0x5e19, 0x684e, 0x74c6, 0x75be, 0x79e9, 0x7a92, 0x81a3, 0x86ed, 0x8cea, 0x8dcc, 0x8fed, 0x659f, 0x6715, 0xf9fd, 0x57f7, 0x6f57, 0x7ddd, 0x8f2f, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ 96 ] = { 0xfffd, 0x93f6, 0x96c6, 0x5fb5, 0x61f2, 0x6f84, 0x4e14, 0x4f98, 0x501f, 0x53c9, 0x55df, 0x5d6f, 0x5dee, 0x6b21, 0x6b64, 0x78cb, 0x7b9a, 0xf9fe, 0x8e49, 0x8eca, 0x906e, 0x6349, 0x643e, 0x7740, 0x7a84, 0x932f, 0x947f, 0x9f6a, 0x64b0, 0x6faf, 0x71e6, 0x74a8, 0x74da, 0x7ac4, 0x7c12, 0x7e82, 0x7cb2, 0x7e98, 0x8b9a, 0x8d0a, 0x947d, 0x9910, 0x994c, 0x5239, 0x5bdf, 0x64e6, 0x672d, 0x7d2e, 0x50ed, 0x53c3, 0x5879, 0x6158, 0x6159, 0x61fa, 0x65ac, 0x7ad9, 0x8b92, 0x8b96, 0x5009, 0x5021, 0x5275, 0x5531, 0x5a3c, 0x5ee0, 0x5f70, 0x6134, 0x655e, 0x660c, 0x6636, 0x66a2, 0x69cd, 0x6ec4, 0x6f32, 0x7316, 0x7621, 0x7a93, 0x8139, 0x8259, 0x83d6, 0x84bc, 0x50b5, 0x57f0, 0x5bc0, 0x5be8, 0x5f69, 0x63a1, 0x7826, 0x7db5, 0x83dc, 0x8521, 0x91c7, 0x91f5, 0x518a, 0x67f5, 0x7b56, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ 96 ] = { 0xfffd, 0x8cac, 0x51c4, 0x59bb, 0x60bd, 0x8655, 0x501c, 0xf9ff, 0x5254, 0x5c3a, 0x617d, 0x621a, 0x62d3, 0x64f2, 0x65a5, 0x6ecc, 0x7620, 0x810a, 0x8e60, 0x965f, 0x96bb, 0x4edf, 0x5343, 0x5598, 0x5929, 0x5ddd, 0x64c5, 0x6cc9, 0x6dfa, 0x7394, 0x7a7f, 0x821b, 0x85a6, 0x8ce4, 0x8e10, 0x9077, 0x91e7, 0x95e1, 0x9621, 0x97c6, 0x51f8, 0x54f2, 0x5586, 0x5fb9, 0x64a4, 0x6f88, 0x7db4, 0x8f1f, 0x8f4d, 0x9435, 0x50c9, 0x5c16, 0x6cbe, 0x6dfb, 0x751b, 0x77bb, 0x7c3d, 0x7c64, 0x8a79, 0x8ac2, 0x581e, 0x59be, 0x5e16, 0x6377, 0x7252, 0x758a, 0x776b, 0x8adc, 0x8cbc, 0x8f12, 0x5ef3, 0x6674, 0x6df8, 0x807d, 0x83c1, 0x8acb, 0x9751, 0x9bd6, 0xfa00, 0x5243, 0x66ff, 0x6d95, 0x6eef, 0x7de0, 0x8ae6, 0x902e, 0x905e, 0x9ad4, 0x521d, 0x527f, 0x54e8, 0x6194, 0x6284, 0x62db, 0x68a2, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ 96 ] = { 0xfffd, 0x6912, 0x695a, 0x6a35, 0x7092, 0x7126, 0x785d, 0x7901, 0x790e, 0x79d2, 0x7a0d, 0x8096, 0x8278, 0x82d5, 0x8349, 0x8549, 0x8c82, 0x8d85, 0x9162, 0x918b, 0x91ae, 0x4fc3, 0x56d1, 0x71ed, 0x77d7, 0x8700, 0x89f8, 0x5bf8, 0x5fd6, 0x6751, 0x90a8, 0x53e2, 0x585a, 0x5bf5, 0x60a4, 0x6181, 0x6460, 0x7e3d, 0x8070, 0x8525, 0x9283, 0x64ae, 0x50ac, 0x5d14, 0x6700, 0x589c, 0x62bd, 0x63a8, 0x690e, 0x6978, 0x6a1e, 0x6e6b, 0x76ba, 0x79cb, 0x82bb, 0x8429, 0x8acf, 0x8da8, 0x8ffd, 0x9112, 0x914b, 0x919c, 0x9310, 0x9318, 0x939a, 0x96db, 0x9a36, 0x9c0d, 0x4e11, 0x755c, 0x795d, 0x7afa, 0x7b51, 0x7bc9, 0x7e2e, 0x84c4, 0x8e59, 0x8e74, 0x8ef8, 0x9010, 0x6625, 0x693f, 0x7443, 0x51fa, 0x672e, 0x9edc, 0x5145, 0x5fe0, 0x6c96, 0x87f2, 0x885d, 0x8877, 0x60b4, 0x81b5, 0x8403, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ 96 ] = { 0xfffd, 0x8d05, 0x53d6, 0x5439, 0x5634, 0x5a36, 0x5c31, 0x708a, 0x7fe0, 0x805a, 0x8106, 0x81ed, 0x8da3, 0x9189, 0x9a5f, 0x9df2, 0x5074, 0x4ec4, 0x53a0, 0x60fb, 0x6e2c, 0x5c64, 0x4f88, 0x5024, 0x55e4, 0x5cd9, 0x5e5f, 0x6065, 0x6894, 0x6cbb, 0x6dc4, 0x71be, 0x75d4, 0x75f4, 0x7661, 0x7a1a, 0x7a49, 0x7dc7, 0x7dfb, 0x7f6e, 0x81f4, 0x86a9, 0x8f1c, 0x96c9, 0x99b3, 0x9f52, 0x5247, 0x52c5, 0x98ed, 0x89aa, 0x4e03, 0x67d2, 0x6f06, 0x4fb5, 0x5be2, 0x6795, 0x6c88, 0x6d78, 0x741b, 0x7827, 0x91dd, 0x937c, 0x87c4, 0x79e4, 0x7a31, 0x5feb, 0x4ed6, 0x54a4, 0x553e, 0x58ae, 0x59a5, 0x60f0, 0x6253, 0x62d6, 0x6736, 0x6955, 0x8235, 0x9640, 0x99b1, 0x99dd, 0x502c, 0x5353, 0x5544, 0x577c, 0xfa01, 0x6258, 0xfa02, 0x64e2, 0x666b, 0x67dd, 0x6fc1, 0x6fef, 0x7422, 0x7438, 0x8a17, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ 96 ] = { 0xfffd, 0x9438, 0x5451, 0x5606, 0x5766, 0x5f48, 0x619a, 0x6b4e, 0x7058, 0x70ad, 0x7dbb, 0x8a95, 0x596a, 0x812b, 0x63a2, 0x7708, 0x803d, 0x8caa, 0x5854, 0x642d, 0x69bb, 0x5b95, 0x5e11, 0x6e6f, 0xfa03, 0x8569, 0x514c, 0x53f0, 0x592a, 0x6020, 0x614b, 0x6b86, 0x6c70, 0x6cf0, 0x7b1e, 0x80ce, 0x82d4, 0x8dc6, 0x90b0, 0x98b1, 0xfa04, 0x64c7, 0x6fa4, 0x6491, 0x6504, 0x514e, 0x5410, 0x571f, 0x8a0e, 0x615f, 0x6876, 0xfa05, 0x75db, 0x7b52, 0x7d71, 0x901a, 0x5806, 0x69cc, 0x817f, 0x892a, 0x9000, 0x9839, 0x5078, 0x5957, 0x59ac, 0x6295, 0x900f, 0x9b2a, 0x615d, 0x7279, 0x95d6, 0x5761, 0x5a46, 0x5df4, 0x628a, 0x64ad, 0x64fa, 0x6777, 0x6ce2, 0x6d3e, 0x722c, 0x7436, 0x7834, 0x7f77, 0x82ad, 0x8ddb, 0x9817, 0x5224, 0x5742, 0x677f, 0x7248, 0x74e3, 0x8ca9, 0x8fa6, 0x9211, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ 96 ] = { 0xfffd, 0x962a, 0x516b, 0x53ed, 0x634c, 0x4f69, 0x5504, 0x6096, 0x6557, 0x6c9b, 0x6d7f, 0x724c, 0x72fd, 0x7a17, 0x8987, 0x8c9d, 0x5f6d, 0x6f8e, 0x70f9, 0x81a8, 0x610e, 0x4fbf, 0x504f, 0x6241, 0x7247, 0x7bc7, 0x7de8, 0x7fe9, 0x904d, 0x97ad, 0x9a19, 0x8cb6, 0x576a, 0x5e73, 0x67b0, 0x840d, 0x8a55, 0x5420, 0x5b16, 0x5e63, 0x5ee2, 0x5f0a, 0x6583, 0x80ba, 0x853d, 0x9589, 0x965b, 0x4f48, 0x5305, 0x530d, 0x530f, 0x5486, 0x54fa, 0x5703, 0x5e03, 0x6016, 0x629b, 0x62b1, 0x6355, 0xfa06, 0x6ce1, 0x6d66, 0x75b1, 0x7832, 0x80de, 0x812f, 0x82de, 0x8461, 0x84b2, 0x888d, 0x8912, 0x900b, 0x92ea, 0x98fd, 0x9b91, 0x5e45, 0x66b4, 0x66dd, 0x7011, 0x7206, 0xfa07, 0x4ff5, 0x527d, 0x5f6a, 0x6153, 0x6753, 0x6a19, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8c79, 0x98c7, 0x98c4, 0x9a43, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ 96 ] = { 0xfffd, 0x54c1, 0x7a1f, 0x6953, 0x8af7, 0x8c4a, 0x98a8, 0x99ae, 0x5f7c, 0x62ab, 0x75b2, 0x76ae, 0x88ab, 0x907f, 0x9642, 0x5339, 0x5f3c, 0x5fc5, 0x6ccc, 0x73cc, 0x7562, 0x758b, 0x7b46, 0x82fe, 0x999d, 0x4e4f, 0x903c, 0x4e0b, 0x4f55, 0x53a6, 0x590f, 0x5ec8, 0x6630, 0x6cb3, 0x7455, 0x8377, 0x8766, 0x8cc0, 0x9050, 0x971e, 0x9c15, 0x58d1, 0x5b78, 0x8650, 0x8b14, 0x9db4, 0x5bd2, 0x6068, 0x608d, 0x65f1, 0x6c57, 0x6f22, 0x6fa3, 0x701a, 0x7f55, 0x7ff0, 0x9591, 0x9592, 0x9650, 0x97d3, 0x5272, 0x8f44, 0x51fd, 0x542b, 0x54b8, 0x5563, 0x558a, 0x6abb, 0x6db5, 0x7dd8, 0x8266, 0x929c, 0x9677, 0x9e79, 0x5408, 0x54c8, 0x76d2, 0x86e4, 0x95a4, 0x95d4, 0x965c, 0x4ea2, 0x4f09, 0x59ee, 0x5ae6, 0x5df7, 0x6052, 0x6297, 0x676d, 0x6841, 0x6c86, 0x6e2f, 0x7f38, 0x809b, 0x822a, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ 96 ] = { 0xfffd, 0xfa08, 0xfa09, 0x9805, 0x4ea5, 0x5055, 0x54b3, 0x5793, 0x595a, 0x5b69, 0x5bb3, 0x61c8, 0x6977, 0x6d77, 0x7023, 0x87f9, 0x89e3, 0x8a72, 0x8ae7, 0x9082, 0x99ed, 0x9ab8, 0x52be, 0x6838, 0x5016, 0x5e78, 0x674f, 0x8347, 0x884c, 0x4eab, 0x5411, 0x56ae, 0x73e6, 0x9115, 0x97ff, 0x9909, 0x9957, 0x9999, 0x5653, 0x589f, 0x865b, 0x8a31, 0x61b2, 0x6af6, 0x737b, 0x8ed2, 0x6b47, 0x96aa, 0x9a57, 0x5955, 0x7200, 0x8d6b, 0x9769, 0x4fd4, 0x5cf4, 0x5f26, 0x61f8, 0x665b, 0x6ceb, 0x70ab, 0x7384, 0x73b9, 0x73fe, 0x7729, 0x774d, 0x7d43, 0x7d62, 0x7e23, 0x8237, 0x8852, 0xfa0a, 0x8ce2, 0x9249, 0x986f, 0x5b51, 0x7a74, 0x8840, 0x9801, 0x5acc, 0x4fe0, 0x5354, 0x593e, 0x5cfd, 0x633e, 0x6d79, 0x72f9, 0x8105, 0x8107, 0x83a2, 0x92cf, 0x9830, 0x4ea8, 0x5144, 0x5211, 0x578b, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ 96 ] = { 0xfffd, 0x5f62, 0x6cc2, 0x6ece, 0x7005, 0x7050, 0x70af, 0x7192, 0x73e9, 0x7469, 0x834a, 0x87a2, 0x8861, 0x9008, 0x90a2, 0x93a3, 0x99a8, 0x516e, 0x5f57, 0x60e0, 0x6167, 0x66b3, 0x8559, 0x8e4a, 0x91af, 0x978b, 0x4e4e, 0x4e92, 0x547c, 0x58d5, 0x58fa, 0x597d, 0x5cb5, 0x5f27, 0x6236, 0x6248, 0x660a, 0x6667, 0x6beb, 0x6d69, 0x6dcf, 0x6e56, 0x6ef8, 0x6f94, 0x6fe0, 0x6fe9, 0x705d, 0x72d0, 0x7425, 0x745a, 0x74e0, 0x7693, 0x795c, 0x7cca, 0x7e1e, 0x80e1, 0x82a6, 0x846b, 0x84bf, 0x864e, 0x865f, 0x8774, 0x8b77, 0x8c6a, 0x93ac, 0x9800, 0x9865, 0x60d1, 0x6216, 0x9177, 0x5a5a, 0x660f, 0x6df7, 0x6e3e, 0x743f, 0x9b42, 0x5ffd, 0x60da, 0x7b0f, 0x54c4, 0x5f18, 0x6c5e, 0x6cd3, 0x6d2a, 0x70d8, 0x7d05, 0x8679, 0x8a0c, 0x9d3b, 0x5316, 0x548c, 0x5b05, 0x6a3a, 0x706b, 0x7575, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ 96 ] = { 0xfffd, 0x798d, 0x79be, 0x82b1, 0x83ef, 0x8a71, 0x8b41, 0x8ca8, 0x9774, 0xfa0b, 0x64f4, 0x652b, 0x78ba, 0x78bb, 0x7a6b, 0x4e38, 0x559a, 0x5950, 0x5ba6, 0x5e7b, 0x60a3, 0x63db, 0x6b61, 0x6665, 0x6853, 0x6e19, 0x7165, 0x74b0, 0x7d08, 0x9084, 0x9a69, 0x9c25, 0x6d3b, 0x6ed1, 0x733e, 0x8c41, 0x95ca, 0x51f0, 0x5e4c, 0x5fa8, 0x604d, 0x60f6, 0x6130, 0x614c, 0x6643, 0x6644, 0x69a5, 0x6cc1, 0x6e5f, 0x6ec9, 0x6f62, 0x714c, 0x749c, 0x7687, 0x7bc1, 0x7c27, 0x8352, 0x8757, 0x9051, 0x968d, 0x9ec3, 0x532f, 0x56de, 0x5efb, 0x5f8a, 0x6062, 0x6094, 0x61f7, 0x6666, 0x6703, 0x6a9c, 0x6dee, 0x6fae, 0x7070, 0x736a, 0x7e6a, 0x81be, 0x8334, 0x86d4, 0x8aa8, 0x8cc4, 0x5283, 0x7372, 0x5b96, 0x6a6b, 0x9404, 0x54ee, 0x5686, 0x5b5d, 0x6548, 0x6585, 0x66c9, 0x689f, 0x6d8d, 0x6dc6, 0xfffd }; const uint16_t libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ 96 ] = { 0xfffd, 0x723b, 0x80b4, 0x9175, 0x9a4d, 0x4faf, 0x5019, 0x539a, 0x540e, 0x543c, 0x5589, 0x55c5, 0x5e3f, 0x5f8c, 0x673d, 0x7166, 0x73dd, 0x9005, 0x52db, 0x52f3, 0x5864, 0x58ce, 0x7104, 0x718f, 0x71fb, 0x85b0, 0x8a13, 0x6688, 0x85a8, 0x55a7, 0x6684, 0x714a, 0x8431, 0x5349, 0x5599, 0x6bc1, 0x5f59, 0x5fbd, 0x63ee, 0x6689, 0x7147, 0x8af1, 0x8f1d, 0x9ebe, 0x4f11, 0x643a, 0x70cb, 0x7566, 0x8667, 0x6064, 0x8b4e, 0x9df8, 0x5147, 0x51f6, 0x5308, 0x6d36, 0x80f8, 0x9ed1, 0x6615, 0x6b23, 0x7098, 0x75d5, 0x5403, 0x5c79, 0x7d07, 0x8a16, 0x6b20, 0x6b3d, 0x6b46, 0x5438, 0x6070, 0x6d3d, 0x7fd5, 0x8208, 0x50d6, 0x51de, 0x559c, 0x566b, 0x56cd, 0x59ec, 0x5b09, 0x5e0c, 0x6199, 0x6198, 0x6231, 0x665e, 0x66e6, 0x7199, 0x71b9, 0x71ba, 0x72a7, 0x79a7, 0x7a00, 0x7fb2, 0x8a70, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 949 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ 256 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaea2, 0x001a, 0x001a, 0xb4a2, 0x001a, 0x001a, 0xd7a1, 0xa7a1, 0x001a, 0xa3a8, 0x001a, 0x001a, 0xa9a1, 0xe7a2, 0x001a, 0xc6a1, 0xbea1, 0xf7a9, 0xf8a9, 0xa5a2, 0x001a, 0xd2a2, 0xa4a1, 0xaca2, 0xf6a9, 0xaca8, 0x001a, 0xf9a8, 0xf6a8, 0xfaa8, 0xafa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfa1, 0xaaa8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xada8, 0xaca9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0a1, 0xaaa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xada9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a8, 0xa4a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5a9, 0xa6a8, 0xa6a9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a8, 0xa8a9, 0xa9a8, 0xa9a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a9, 0xafa8, 0xafa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaba8, 0xaba9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaea8, 0xaea9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x02c0[ 448 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a2, 0xaba2, 0xaaa2, 0xada2, 0x001a, 0xa9a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a5, 0xc2a5, 0xc3a5, 0xc4a5, 0xc5a5, 0xc6a5, 0xc7a5, 0xc8a5, 0xc9a5, 0xcaa5, 0xcba5, 0xcca5, 0xcda5, 0xcea5, 0xcfa5, 0xd0a5, 0xd1a5, 0x001a, 0xd2a5, 0xd3a5, 0xd4a5, 0xd5a5, 0xd6a5, 0xd7a5, 0xd8a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a5, 0xe2a5, 0xe3a5, 0xe4a5, 0xe5a5, 0xe6a5, 0xe7a5, 0xe8a5, 0xe9a5, 0xeaa5, 0xeba5, 0xeca5, 0xeda5, 0xeea5, 0xefa5, 0xf0a5, 0xf1a5, 0x001a, 0xf2a5, 0xf3a5, 0xf4a5, 0xf5a5, 0xf6a5, 0xf7a5, 0xf8a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ac, 0xa2ac, 0xa3ac, 0xa4ac, 0xa5ac, 0xa6ac, 0xa8ac, 0xa9ac, 0xaaac, 0xabac, 0xacac, 0xadac, 0xaeac, 0xafac, 0xb0ac, 0xb1ac, 0xb2ac, 0xb3ac, 0xb4ac, 0xb5ac, 0xb6ac, 0xb7ac, 0xb8ac, 0xb9ac, 0xbaac, 0xbbac, 0xbcac, 0xbdac, 0xbeac, 0xbfac, 0xc0ac, 0xc1ac, 0xd1ac, 0xd2ac, 0xd3ac, 0xd4ac, 0xd5ac, 0xd6ac, 0xd8ac, 0xd9ac, 0xdaac, 0xdbac, 0xdcac, 0xddac, 0xdeac, 0xdfac, 0xe0ac, 0xe1ac, 0xe2ac, 0xe3ac, 0xe4ac, 0xe5ac, 0xe6ac, 0xe7ac, 0xe8ac, 0xe9ac, 0xeaac, 0xebac, 0xecac, 0xedac, 0xeeac, 0xefac, 0xf0ac, 0xf1ac, 0x001a, 0xd7ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x2000[ 1664 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaa1, 0x001a, 0x001a, 0xaea1, 0xafa1, 0x001a, 0x001a, 0xb0a1, 0xb1a1, 0x001a, 0x001a, 0xd3a2, 0xd4a2, 0x001a, 0x001a, 0x001a, 0xa5a1, 0xa6a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6a2, 0x001a, 0xc7a1, 0xc8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaa9, 0x001a, 0xfba9, 0xfca9, 0xfda9, 0xfea9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a7, 0x001a, 0x001a, 0xe0a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5a2, 0xe2a2, 0x001a, 0x001a, 0x001a, 0xd9a7, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7a8, 0xf8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfba8, 0xfca8, 0xfda8, 0xfea8, 0x001a, 0xb0a5, 0xb1a5, 0xb2a5, 0xb3a5, 0xb4a5, 0xb5a5, 0xb6a5, 0xb7a5, 0xb8a5, 0xb9a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a5, 0xa2a5, 0xa3a5, 0xa4a5, 0xa5a5, 0xa6a5, 0xa7a5, 0xa8a5, 0xa9a5, 0xaaa5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7a1, 0xe8a1, 0xe6a1, 0xe9a1, 0xeaa1, 0xd5a2, 0xd8a2, 0xd6a2, 0xd9a2, 0xd7a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a2, 0x001a, 0xa2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a2, 0x001a, 0xd3a1, 0xa4a2, 0x001a, 0x001a, 0x001a, 0xd4a1, 0xf4a1, 0x001a, 0x001a, 0xf5a1, 0x001a, 0x001a, 0x001a, 0xb3a2, 0x001a, 0xb2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeea1, 0x001a, 0x001a, 0xf0a1, 0xc4a1, 0x001a, 0xd0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0xaba1, 0x001a, 0xfca1, 0xfda1, 0xfba1, 0xfaa1, 0xf2a1, 0xf3a1, 0x001a, 0xb1a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a1, 0xf1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xada1, 0xefa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a1, 0xd5a1, 0x001a, 0x001a, 0xc2a1, 0xc3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0xeca1, 0xeda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8a1, 0xf9a1, 0x001a, 0x001a, 0xf6a1, 0xf7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7a8, 0xe8a8, 0xe9a8, 0xeaa8, 0xeba8, 0xeca8, 0xeda8, 0xeea8, 0xefa8, 0xf0a8, 0xf1a8, 0xf2a8, 0xf3a8, 0xf4a8, 0xf5a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7a9, 0xe8a9, 0xe9a9, 0xeaa9, 0xeba9, 0xeca9, 0xeda9, 0xeea9, 0xefa9, 0xf0a9, 0xf1a9, 0xf2a9, 0xf3a9, 0xf4a9, 0xf5a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcda9, 0xcea9, 0xcfa9, 0xd0a9, 0xd1a9, 0xd2a9, 0xd3a9, 0xd4a9, 0xd5a9, 0xd6a9, 0xd7a9, 0xd8a9, 0xd9a9, 0xdaa9, 0xdba9, 0xdca9, 0xdda9, 0xdea9, 0xdfa9, 0xe0a9, 0xe1a9, 0xe2a9, 0xe3a9, 0xe4a9, 0xe5a9, 0xe6a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcda8, 0xcea8, 0xcfa8, 0xd0a8, 0xd1a8, 0xd2a8, 0xd3a8, 0xd4a8, 0xd5a8, 0xd6a8, 0xd7a8, 0xd8a8, 0xd9a8, 0xdaa8, 0xdba8, 0xdca8, 0xdda8, 0xdea8, 0xdfa8, 0xe0a8, 0xe1a8, 0xe2a8, 0xe3a8, 0xe4a8, 0xe5a8, 0xe6a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a6, 0xaca6, 0xa2a6, 0xada6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a6, 0xc8a6, 0xc7a6, 0xaea6, 0xa4a6, 0xc2a6, 0xc1a6, 0xafa6, 0xa6a6, 0xc6a6, 0xc5a6, 0xb1a6, 0xa5a6, 0xc4a6, 0xc3a6, 0xb0a6, 0xa7a6, 0xbca6, 0xc9a6, 0xcaa6, 0xb7a6, 0xcba6, 0xcca6, 0xb2a6, 0xa9a6, 0xbea6, 0xcda6, 0xcea6, 0xb9a6, 0xcfa6, 0xd0a6, 0xb4a6, 0xa8a6, 0xd1a6, 0xd2a6, 0xb8a6, 0xbda6, 0xd3a6, 0xd4a6, 0xb3a6, 0xaaa6, 0xd5a6, 0xd6a6, 0xbaa6, 0xbfa6, 0xd7a6, 0xd8a6, 0xb5a6, 0xaba6, 0xd9a6, 0xdaa6, 0xbba6, 0xdba6, 0xdca6, 0xc0a6, 0xdda6, 0xdea6, 0xdfa6, 0xe0a6, 0xe1a6, 0xe2a6, 0xe3a6, 0xe4a6, 0xb6a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a1, 0xe0a1, 0x001a, 0xc3a2, 0xc7a2, 0xc8a2, 0xcba2, 0xcaa2, 0xc9a2, 0xcca2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3a1, 0xe2a1, 0x001a, 0x001a, 0xbaa2, 0xb9a2, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5a1, 0xe4a1, 0x001a, 0x001a, 0xb8a2, 0xb7a2, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfa1, 0xdea1, 0xc2a2, 0x001a, 0x001a, 0xdba1, 0x001a, 0x001a, 0xdda1, 0xdca1, 0xc4a2, 0xc5a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaa1, 0xd9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfa2, 0xcea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0a2, 0x001a, 0xd1a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfa1, 0x001a, 0xcea1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbca2, 0xbda2, 0x001a, 0xc0a2, 0xbba2, 0xbea2, 0x001a, 0xbfa2, 0xcda2, 0xdba2, 0xdca2, 0x001a, 0xdda2, 0xdaa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x3000[ 1024 ] = { 0xa1a1, 0xa2a1, 0xa3a1, 0xa8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4a1, 0xb5a1, 0xb6a1, 0xb7a1, 0xb8a1, 0xb9a1, 0xbaa1, 0xbba1, 0xbca1, 0xbda1, 0x001a, 0xeba1, 0xb2a1, 0xb3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1aa, 0xa2aa, 0xa3aa, 0xa4aa, 0xa5aa, 0xa6aa, 0xa7aa, 0xa8aa, 0xa9aa, 0xaaaa, 0xabaa, 0xacaa, 0xadaa, 0xaeaa, 0xafaa, 0xb0aa, 0xb1aa, 0xb2aa, 0xb3aa, 0xb4aa, 0xb5aa, 0xb6aa, 0xb7aa, 0xb8aa, 0xb9aa, 0xbaaa, 0xbbaa, 0xbcaa, 0xbdaa, 0xbeaa, 0xbfaa, 0xc0aa, 0xc1aa, 0xc2aa, 0xc3aa, 0xc4aa, 0xc5aa, 0xc6aa, 0xc7aa, 0xc8aa, 0xc9aa, 0xcaaa, 0xcbaa, 0xccaa, 0xcdaa, 0xceaa, 0xcfaa, 0xd0aa, 0xd1aa, 0xd2aa, 0xd3aa, 0xd4aa, 0xd5aa, 0xd6aa, 0xd7aa, 0xd8aa, 0xd9aa, 0xdaaa, 0xdbaa, 0xdcaa, 0xddaa, 0xdeaa, 0xdfaa, 0xe0aa, 0xe1aa, 0xe2aa, 0xe3aa, 0xe4aa, 0xe5aa, 0xe6aa, 0xe7aa, 0xe8aa, 0xe9aa, 0xeaaa, 0xebaa, 0xecaa, 0xedaa, 0xeeaa, 0xefaa, 0xf0aa, 0xf1aa, 0xf2aa, 0xf3aa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ab, 0xa2ab, 0xa3ab, 0xa4ab, 0xa5ab, 0xa6ab, 0xa7ab, 0xa8ab, 0xa9ab, 0xaaab, 0xabab, 0xacab, 0xadab, 0xaeab, 0xafab, 0xb0ab, 0xb1ab, 0xb2ab, 0xb3ab, 0xb4ab, 0xb5ab, 0xb6ab, 0xb7ab, 0xb8ab, 0xb9ab, 0xbaab, 0xbbab, 0xbcab, 0xbdab, 0xbeab, 0xbfab, 0xc0ab, 0xc1ab, 0xc2ab, 0xc3ab, 0xc4ab, 0xc5ab, 0xc6ab, 0xc7ab, 0xc8ab, 0xc9ab, 0xcaab, 0xcbab, 0xccab, 0xcdab, 0xceab, 0xcfab, 0xd0ab, 0xd1ab, 0xd2ab, 0xd3ab, 0xd4ab, 0xd5ab, 0xd6ab, 0xd7ab, 0xd8ab, 0xd9ab, 0xdaab, 0xdbab, 0xdcab, 0xddab, 0xdeab, 0xdfab, 0xe0ab, 0xe1ab, 0xe2ab, 0xe3ab, 0xe4ab, 0xe5ab, 0xe6ab, 0xe7ab, 0xe8ab, 0xe9ab, 0xeaab, 0xebab, 0xecab, 0xedab, 0xeeab, 0xefab, 0xf0ab, 0xf1ab, 0xf2ab, 0xf3ab, 0xf4ab, 0xf5ab, 0xf6ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a4, 0xa2a4, 0xa3a4, 0xa4a4, 0xa5a4, 0xa6a4, 0xa7a4, 0xa8a4, 0xa9a4, 0xaaa4, 0xaba4, 0xaca4, 0xada4, 0xaea4, 0xafa4, 0xb0a4, 0xb1a4, 0xb2a4, 0xb3a4, 0xb4a4, 0xb5a4, 0xb6a4, 0xb7a4, 0xb8a4, 0xb9a4, 0xbaa4, 0xbba4, 0xbca4, 0xbda4, 0xbea4, 0xbfa4, 0xc0a4, 0xc1a4, 0xc2a4, 0xc3a4, 0xc4a4, 0xc5a4, 0xc6a4, 0xc7a4, 0xc8a4, 0xc9a4, 0xcaa4, 0xcba4, 0xcca4, 0xcda4, 0xcea4, 0xcfa4, 0xd0a4, 0xd1a4, 0xd2a4, 0xd3a4, 0xd4a4, 0xd5a4, 0xd6a4, 0xd7a4, 0xd8a4, 0xd9a4, 0xdaa4, 0xdba4, 0xdca4, 0xdda4, 0xdea4, 0xdfa4, 0xe0a4, 0xe1a4, 0xe2a4, 0xe3a4, 0xe4a4, 0xe5a4, 0xe6a4, 0xe7a4, 0xe8a4, 0xe9a4, 0xeaa4, 0xeba4, 0xeca4, 0xeda4, 0xeea4, 0xefa4, 0xf0a4, 0xf1a4, 0xf2a4, 0xf3a4, 0xf4a4, 0xf5a4, 0xf6a4, 0xf7a4, 0xf8a4, 0xf9a4, 0xfaa4, 0xfba4, 0xfca4, 0xfda4, 0xfea4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a9, 0xb2a9, 0xb3a9, 0xb4a9, 0xb5a9, 0xb6a9, 0xb7a9, 0xb8a9, 0xb9a9, 0xbaa9, 0xbba9, 0xbca9, 0xbda9, 0xbea9, 0xbfa9, 0xc0a9, 0xc1a9, 0xc2a9, 0xc3a9, 0xc4a9, 0xc5a9, 0xc6a9, 0xc7a9, 0xc8a9, 0xc9a9, 0xcaa9, 0xcba9, 0xcca9, 0xdfa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a8, 0xb2a8, 0xb3a8, 0xb4a8, 0xb5a8, 0xb6a8, 0xb7a8, 0xb8a8, 0xb9a8, 0xbaa8, 0xbba8, 0xbca8, 0xbda8, 0xbea8, 0xbfa8, 0xc0a8, 0xc1a8, 0xc2a8, 0xc3a8, 0xc4a8, 0xc5a8, 0xc6a8, 0xc7a8, 0xc8a8, 0xc9a8, 0xcaa8, 0xcba8, 0xcca8, 0x001a, 0x001a, 0x001a, 0xdea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9a7, 0xcaa7, 0xcba7, 0xcca7, 0xcda7, 0x001a, 0x001a, 0x001a, 0xbaa7, 0xbba7, 0xdca7, 0xdda7, 0xdea7, 0xb6a7, 0xb7a7, 0xb8a7, 0xd4a7, 0xd5a7, 0xd6a7, 0xd7a7, 0xd8a7, 0xa1a7, 0xa2a7, 0xa3a7, 0xa5a7, 0xaba7, 0xaca7, 0xada7, 0xaea7, 0xafa7, 0xb0a7, 0xb1a7, 0xb2a7, 0xb3a7, 0xb4a7, 0xa7a7, 0xa8a7, 0xa9a7, 0xaaa7, 0xbda7, 0xbea7, 0xe5a7, 0xe6a7, 0xe7a7, 0xe8a7, 0xe1a7, 0xe2a7, 0xe3a7, 0xbfa7, 0xc0a7, 0xc1a7, 0xc2a7, 0xc3a7, 0xc4a7, 0xc5a7, 0xc6a7, 0xc7a7, 0xc8a7, 0xcea7, 0xcfa7, 0xd0a7, 0xd1a7, 0xd2a7, 0xd3a7, 0xdaa7, 0xdba7, 0xe3a2, 0xeca7, 0xa6a7, 0xe0a7, 0xefa7, 0xe1a2, 0xbca7, 0xeda7, 0xb5a7, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9a7, 0xeaa7, 0x001a, 0x001a, 0xeba7, 0x001a, 0x001a, 0xdfa7, 0x001a, 0xe4a2, 0x001a, 0x001a, 0xe4a7, 0xeea7, 0xe9a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0x4e00[ 20928 ] = { 0xe9ec, 0xcbef, 0x001a, 0xd2f6, 0x001a, 0x001a, 0x001a, 0xb2d8, 0xdbed, 0xb2df, 0xbedf, 0xbbf9, 0x001a, 0xf4dc, 0x001a, 0x001a, 0x001a, 0xe4f5, 0x001a, 0x001a, 0xa6f3, 0xe0dd, 0xa6e1, 0x001a, 0xf8ce, 0xb0dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9f1, 0x001a, 0x001a, 0x001a, 0x001a, 0xfacd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaffc, 0xa1d3, 0x001a, 0xabf1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e7, 0xacd2, 0x001a, 0xf9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdf1, 0x001a, 0xbfde, 0xbafb, 0xb9f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ce, 0x001a, 0xabe3, 0xe0eb, 0x001a, 0x001a, 0x001a, 0xface, 0xf7cb, 0xa5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1ca, 0x001a, 0xccd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1ea, 0x001a, 0x001a, 0xe3dc, 0xaddf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebcb, 0x001a, 0x001a, 0x001a, 0xafd5, 0x001a, 0x001a, 0x001a, 0xf5d6, 0x001a, 0xf8e5, 0x001a, 0x001a, 0xc0de, 0xa3ec, 0x001a, 0xcde9, 0x001a, 0xa7ea, 0xf6e9, 0xbbfb, 0x001a, 0xe9e7, 0xccef, 0x001a, 0x001a, 0xe6d0, 0x001a, 0x001a, 0xc1de, 0x001a, 0x001a, 0xace4, 0x001a, 0x001a, 0xccd8, 0xf1f9, 0x001a, 0xdfce, 0xa4fa, 0xb2e6, 0x001a, 0xfbfa, 0x001a, 0x001a, 0xbdfa, 0xc8cc, 0xcdef, 0xd5d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d3, 0x001a, 0x001a, 0x001a, 0xd1ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e4, 0xd2ec, 0x001a, 0x001a, 0xb1f6, 0x001a, 0x001a, 0xfbce, 0x001a, 0x001a, 0xd1d0, 0xbfcb, 0x001a, 0xa4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8ed, 0xc2de, 0xe2f6, 0xdced, 0xf5dc, 0xb9e0, 0x001a, 0x001a, 0x001a, 0xced4, 0x001a, 0xb5f4, 0x001a, 0x001a, 0x001a, 0xdbd3, 0xb5d6, 0xa4ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e4, 0x001a, 0xeaf1, 0x001a, 0x001a, 0x001a, 0xeccb, 0xc0cb, 0x001a, 0x001a, 0x001a, 0xf2ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f9, 0xa5ec, 0xdfd0, 0x001a, 0xeae7, 0xebd0, 0xd1dc, 0xe9db, 0xccfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7db, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1da, 0x001a, 0xb6d6, 0x001a, 0xdfe3, 0x001a, 0xc3de, 0x001a, 0xc4de, 0xa1ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecee, 0x001a, 0x001a, 0xa3d3, 0xb7ee, 0xcff8, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ea, 0xb8ee, 0xacf1, 0xa5f1, 0xcee9, 0x001a, 0x001a, 0x001a, 0xbcf9, 0x001a, 0x001a, 0x001a, 0xf9e5, 0xeaec, 0xd6dd, 0xc2ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbae5, 0xd8db, 0x001a, 0x001a, 0xa2ca, 0x001a, 0x001a, 0xcdd1, 0x001a, 0x001a, 0x001a, 0xedee, 0x001a, 0x001a, 0x001a, 0xebec, 0xc5de, 0x001a, 0xe0e3, 0x001a, 0xc9ca, 0xe9f2, 0x001a, 0xced5, 0x001a, 0xb6f6, 0x001a, 0xc2ce, 0xc7d6, 0x001a, 0xb4e3, 0x001a, 0xadf1, 0x001a, 0xe2ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2d7, 0x001a, 0xa7f3, 0x001a, 0x001a, 0xeacd, 0x001a, 0xeeeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d9, 0xa5fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5f6, 0xe2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5f8, 0x001a, 0x001a, 0xf5cc, 0xb5f5, 0xade4, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe7, 0xd5f1, 0x001a, 0x001a, 0x001a, 0xbbf0, 0x001a, 0x001a, 0xb5e9, 0x001a, 0xc9cc, 0xd5fa, 0x001a, 0x001a, 0xd4e1, 0x001a, 0x001a, 0xd6d7, 0x001a, 0x001a, 0xc1dc, 0x001a, 0xc6de, 0xeffa, 0xe1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e1, 0xf6dc, 0x001a, 0xfcce, 0x001a, 0xc4db, 0x001a, 0xf1f8, 0x001a, 0x001a, 0xe4dc, 0x001a, 0xefe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1dc, 0x001a, 0x001a, 0x001a, 0xd6d5, 0x001a, 0x001a, 0xdaf3, 0x001a, 0xc1cb, 0x001a, 0xc3db, 0x001a, 0x001a, 0x001a, 0xfad9, 0xeed3, 0x001a, 0x001a, 0x001a, 0xb8fa, 0x001a, 0x001a, 0xa6fd, 0xefeb, 0x001a, 0xa6f4, 0x001a, 0xcacc, 0xa8f3, 0x001a, 0xdbf3, 0x001a, 0xa7db, 0xb7f6, 0x001a, 0xe6cf, 0xf2f0, 0xdacb, 0x001a, 0xd2e7, 0xc3d7, 0xf0f6, 0xdee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e5, 0x001a, 0x001a, 0x001a, 0xa3ca, 0xa7cc, 0xc9ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5fa, 0x001a, 0x001a, 0x001a, 0x001a, 0xaef1, 0x001a, 0xceef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f6, 0xcfef, 0xcfe9, 0x001a, 0xdef7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8db, 0x001a, 0x001a, 0x001a, 0xf8cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1df, 0xe1dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf5, 0xb6e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xece7, 0xeeee, 0x001a, 0xf0f3, 0x001a, 0xbfdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d0, 0x001a, 0x001a, 0x001a, 0xd2f4, 0xbae0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0df, 0x001a, 0xe0ce, 0x001a, 0x001a, 0x001a, 0xd2dc, 0xeafd, 0x001a, 0x001a, 0x001a, 0xf6d6, 0x001a, 0x001a, 0x001a, 0xcaea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e8, 0x001a, 0xace3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4ca, 0x001a, 0xf8db, 0x001a, 0x001a, 0x001a, 0xc7de, 0xf0eb, 0xd6f1, 0x001a, 0x001a, 0xe2e5, 0x001a, 0xcccc, 0x001a, 0x001a, 0xfbcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1df, 0x001a, 0xedd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3d5, 0x001a, 0x001a, 0xd3d1, 0x001a, 0xf0e5, 0x001a, 0x001a, 0x001a, 0xb4e8, 0xc3eb, 0x001a, 0xaaea, 0xfcfa, 0xf6f5, 0xbcf0, 0xd4fd, 0xbbe0, 0xc3ce, 0x001a, 0xbad0, 0xbaf7, 0xf3d8, 0xcdf7, 0x001a, 0x001a, 0x001a, 0xaee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d0, 0x001a, 0x001a, 0xfdec, 0x001a, 0xaed2, 0xefee, 0xd7d5, 0xe4ea, 0xa2f8, 0xebcd, 0xbfd7, 0xb1fb, 0x001a, 0x001a, 0xeccd, 0x001a, 0x001a, 0x001a, 0xb2dc, 0xecd0, 0xfdce, 0xf0ee, 0x001a, 0x001a, 0x001a, 0xc2cc, 0x001a, 0x001a, 0x001a, 0xedd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e5, 0x001a, 0x001a, 0x001a, 0xfcf3, 0x001a, 0x001a, 0xa2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d9, 0x001a, 0x001a, 0xf4d8, 0x001a, 0xb7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaece, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1d8, 0x001a, 0xcfd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e5, 0xd2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2f4, 0x001a, 0xd7f1, 0x001a, 0x001a, 0xd8d5, 0x001a, 0xbdf0, 0xd0d7, 0xd0d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd7, 0xeaeb, 0xebfd, 0x001a, 0x001a, 0xeddb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5fc, 0xc2cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5fd, 0x001a, 0xc8f4, 0xeae8, 0xf3f5, 0x001a, 0x001a, 0xdef9, 0x001a, 0x001a, 0xefd3, 0x001a, 0x001a, 0xd3ec, 0x001a, 0x001a, 0xc2dd, 0xb7ef, 0xd4e7, 0x001a, 0xcaca, 0x001a, 0x001a, 0x001a, 0xfbd9, 0x001a, 0x001a, 0xfdfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7f7, 0xacdc, 0x001a, 0x001a, 0x001a, 0xd7d7, 0xa2df, 0x001a, 0x001a, 0x001a, 0xbece, 0x001a, 0xf0d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4f0, 0xece1, 0xe7cf, 0xcbf3, 0xa9ed, 0xbeca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff4, 0x001a, 0x001a, 0x001a, 0xcef6, 0x001a, 0x001a, 0xfbde, 0xbbd0, 0xb7d5, 0xf1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8f4, 0x001a, 0xf8dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7cb, 0x001a, 0xceda, 0x001a, 0x001a, 0x001a, 0xe6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5ed, 0xf2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9dc, 0x001a, 0x001a, 0xdcf9, 0x001a, 0x001a, 0xdcf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f8, 0x001a, 0xf9f4, 0x001a, 0x001a, 0x001a, 0xf1fc, 0x001a, 0x001a, 0x001a, 0xbcd0, 0xf9db, 0xb1d7, 0x001a, 0x001a, 0x001a, 0xfccb, 0x001a, 0x001a, 0x001a, 0xa5f0, 0xfdcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4d5, 0x001a, 0x001a, 0x001a, 0xedcd, 0xa5ca, 0x001a, 0x001a, 0xabd6, 0xc2d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef0, 0xbdd2, 0xa4cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6fa, 0x001a, 0x001a, 0xcdcc, 0x001a, 0xfada, 0x001a, 0xcff6, 0x001a, 0xb8e9, 0x001a, 0xf5d8, 0x001a, 0x001a, 0x001a, 0xcecc, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd7, 0x001a, 0x001a, 0xd1d4, 0xede9, 0x001a, 0xebca, 0xe2d9, 0x001a, 0xb2fd, 0x001a, 0xade3, 0xccd6, 0xb4d9, 0x001a, 0x001a, 0xa7e1, 0xd3ee, 0xc3d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3fd, 0x001a, 0xe4d5, 0x001a, 0x001a, 0xe8cf, 0x001a, 0xc3ed, 0xb2d0, 0x001a, 0x001a, 0xfece, 0xa8da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f8, 0x001a, 0x001a, 0xd6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f8, 0x001a, 0xd2f8, 0xd3dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2dd, 0xf9fb, 0xc1dd, 0x001a, 0xb5e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdded, 0xc4ce, 0x001a, 0xa1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xddfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd2, 0xa1cf, 0xa8e4, 0x001a, 0xb6f4, 0xfeec, 0x001a, 0x001a, 0xaee3, 0xede7, 0xc1fd, 0xe2da, 0x001a, 0x001a, 0xb3d8, 0x001a, 0x001a, 0x001a, 0xe4dd, 0xeff0, 0xf1f6, 0xf0fa, 0x001a, 0x001a, 0xf5d1, 0x001a, 0x001a, 0xcfda, 0x001a, 0xd4dc, 0x001a, 0xa6dc, 0x001a, 0xbfef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfce, 0x001a, 0xd9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6d9, 0xd4ec, 0xcbea, 0x001a, 0x001a, 0xbfca, 0xb0d5, 0x001a, 0xe9cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf1, 0x001a, 0xcfcc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xede4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d7, 0x001a, 0xa7fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xabea, 0xb2f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0cf, 0xbdf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e9, 0xa9f3, 0xe0d0, 0xd2e9, 0x001a, 0xe3da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e2, 0x001a, 0xa2f6, 0xf4e1, 0x001a, 0x001a, 0x001a, 0xe4da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e7, 0xbff5, 0xa2cf, 0xafcd, 0xa3cf, 0x001a, 0x001a, 0x001a, 0xb0cd, 0xfef1, 0xa3d0, 0xafe1, 0xa3f8, 0x001a, 0xa6ca, 0xbbf7, 0xeaf2, 0xc8de, 0xd3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdefd, 0xc0ca, 0x001a, 0x001a, 0x001a, 0xeaf9, 0xced1, 0xd4ee, 0x001a, 0xd2d4, 0xa3d9, 0xa8fd, 0xd9d7, 0xcef7, 0xbefa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6cf, 0x001a, 0xf0d7, 0x001a, 0xe1eb, 0xc5f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfadc, 0x001a, 0x001a, 0xc3dd, 0x001a, 0xdff9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefe7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5fd, 0xa3f6, 0x001a, 0xfcd9, 0xa9fd, 0x001a, 0xeee7, 0x001a, 0x001a, 0x001a, 0xe5d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ef, 0x001a, 0xb1cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f1, 0x001a, 0xb1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2cd, 0x001a, 0xabda, 0x001a, 0xa7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e3, 0xbcfb, 0xa4d9, 0x001a, 0x001a, 0xbaee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfafb, 0x001a, 0xa4cf, 0x001a, 0xfbdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f6, 0x001a, 0x001a, 0x001a, 0xaaed, 0x001a, 0x001a, 0xa1f2, 0xe1ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6fa, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6ec, 0x001a, 0x001a, 0xeee4, 0xa1f9, 0x001a, 0x001a, 0xeffb, 0x001a, 0x001a, 0x001a, 0xebf9, 0xa3ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacea, 0x001a, 0x001a, 0x001a, 0xa8ca, 0x001a, 0x001a, 0xfaf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6cd, 0xf6fc, 0x001a, 0x001a, 0x001a, 0xc9f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f8, 0x001a, 0xcade, 0xc6f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad7, 0x001a, 0xd0d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6ea, 0x001a, 0xddf3, 0x001a, 0x001a, 0x001a, 0xdae4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f6, 0x001a, 0xc2df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd9, 0x001a, 0x001a, 0x001a, 0xf6cc, 0x001a, 0x001a, 0xbad3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafe4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f0, 0x001a, 0x001a, 0x001a, 0xd3cb, 0x001a, 0x001a, 0x001a, 0xbce0, 0x001a, 0xcaf4, 0xfad4, 0x001a, 0xaafd, 0xe2f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7f4, 0xc2fd, 0xb0fc, 0x001a, 0xecfd, 0xe2ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdfd, 0x001a, 0xe7ea, 0xc3df, 0xd2d1, 0xe2ce, 0x001a, 0xa4d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabfd, 0x001a, 0xe0df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e7, 0x001a, 0xeed0, 0x001a, 0x001a, 0xaaf3, 0x001a, 0x001a, 0x001a, 0xcbde, 0xb8f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e1, 0xb3f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f7, 0x001a, 0x001a, 0xa9ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5cf, 0x001a, 0x001a, 0xc4df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e1, 0x001a, 0x001a, 0xbff0, 0x001a, 0xa4f6, 0x001a, 0xb6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd0, 0x001a, 0x001a, 0xedfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadde, 0x001a, 0xbffa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d2, 0x001a, 0x001a, 0xeefd, 0x001a, 0x001a, 0x001a, 0xb6f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e1, 0xccde, 0x001a, 0x001a, 0xdefc, 0x001a, 0xd7ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d6, 0xb3cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5f8, 0xd8e5, 0x001a, 0x001a, 0x001a, 0xeacf, 0x001a, 0x001a, 0xd0cf, 0x001a, 0xccea, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeea, 0xadea, 0x001a, 0x001a, 0xf1d3, 0x001a, 0xa5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcff7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d0, 0x001a, 0x001a, 0xa2f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f2, 0x001a, 0xf8f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d0, 0x001a, 0x001a, 0xa9db, 0x001a, 0x001a, 0xbbd3, 0xecca, 0x001a, 0xa6f1, 0xd5cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f7, 0x001a, 0x001a, 0xdecd, 0x001a, 0xa4f7, 0x001a, 0x001a, 0x001a, 0xc0f8, 0x001a, 0x001a, 0x001a, 0xddd3, 0x001a, 0xd0cc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcd3, 0x001a, 0x001a, 0xfefa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9eb, 0x001a, 0xa7cf, 0xafea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefe4, 0x001a, 0x001a, 0x001a, 0xb9e9, 0xd8f1, 0x001a, 0x001a, 0xd8d8, 0x001a, 0x001a, 0xf2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e6, 0xfcdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1f3, 0x001a, 0x001a, 0x001a, 0xd0e3, 0x001a, 0x001a, 0xfbf2, 0x001a, 0xc6db, 0xf1d0, 0x001a, 0xf2d0, 0x001a, 0x001a, 0x001a, 0xdccf, 0x001a, 0xd1d3, 0x001a, 0x001a, 0xb1cc, 0xd8f7, 0x001a, 0xa8cb, 0xbceb, 0xbee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcf4, 0x001a, 0x001a, 0xc2dc, 0x001a, 0x001a, 0xa7f0, 0x001a, 0x001a, 0xc0e6, 0x001a, 0x001a, 0xedca, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe8, 0xe8e5, 0xc3dc, 0x001a, 0x001a, 0xdeed, 0xf2d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4ce, 0xabe7, 0x001a, 0x001a, 0x001a, 0xc3cb, 0x001a, 0xb1e1, 0x001a, 0x001a, 0xb2f7, 0x001a, 0x001a, 0xf3d3, 0xd2d3, 0x001a, 0xc0f5, 0x001a, 0x001a, 0x001a, 0xdddf, 0x001a, 0x001a, 0xf3ee, 0xf1e7, 0x001a, 0xb4fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8f2, 0x001a, 0x001a, 0x001a, 0xd2f3, 0x001a, 0x001a, 0xf4ee, 0x001a, 0xd3e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1cc, 0x001a, 0xeadf, 0x001a, 0x001a, 0x001a, 0xbae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf5, 0x001a, 0xf2f1, 0xc7fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8d9, 0xc2d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e7, 0xdfed, 0x001a, 0x001a, 0xcbca, 0x001a, 0x001a, 0xfadb, 0x001a, 0x001a, 0x001a, 0xb5e8, 0x001a, 0xa6d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5fd, 0x001a, 0x001a, 0xc9f9, 0x001a, 0xe2e4, 0x001a, 0xbdfb, 0x001a, 0x001a, 0xa4d7, 0xc5ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ce, 0xe6d6, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdde, 0xf3ec, 0x001a, 0x001a, 0xe0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecec, 0xbefb, 0xebdf, 0x001a, 0xf8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d0, 0xaae0, 0xe2e8, 0x001a, 0x001a, 0xd4e2, 0xfdd2, 0x001a, 0xa8e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d9, 0x001a, 0x001a, 0x001a, 0x001a, 0xded3, 0x001a, 0xb8f4, 0xbcf7, 0xfddc, 0x001a, 0xece8, 0xe7e4, 0x001a, 0x001a, 0xf7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e5, 0x001a, 0x001a, 0xf4d0, 0xafd2, 0xe5dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d0, 0xb4f1, 0xb1fc, 0xf8cc, 0x001a, 0x001a, 0xc6dd, 0xd1fa, 0x001a, 0xdff7, 0x001a, 0x001a, 0xa8fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ee, 0x001a, 0xcede, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e7, 0x001a, 0x001a, 0xacf7, 0xc4eb, 0xe1ed, 0xabe0, 0xc7dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d2, 0xbfd2, 0x001a, 0x001a, 0x001a, 0xccca, 0x001a, 0x001a, 0x001a, 0x001a, 0xbffb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde5, 0xe5dd, 0xcdd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5d0, 0x001a, 0x001a, 0xede8, 0xd2d0, 0x001a, 0xd8d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6f6, 0x001a, 0x001a, 0xaadb, 0x001a, 0x001a, 0x001a, 0xe0f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9d8, 0x001a, 0xa3f4, 0x001a, 0x001a, 0xddf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1ef, 0x001a, 0x001a, 0xb5d9, 0x001a, 0x001a, 0xabed, 0x001a, 0xb7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbee, 0xb4cd, 0x001a, 0xf3e0, 0xcdea, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ec, 0xeee8, 0x001a, 0xa9cb, 0xaff1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdca, 0x001a, 0xa9ec, 0x001a, 0xebf2, 0x001a, 0xeffd, 0x001a, 0xf3f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e6, 0x001a, 0x001a, 0xd8ec, 0x001a, 0x001a, 0x001a, 0xaced, 0x001a, 0xceea, 0x001a, 0xdfe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d2, 0x001a, 0x001a, 0xf4e7, 0xd6d1, 0x001a, 0x001a, 0xc2e6, 0xe3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e4, 0x001a, 0x001a, 0x001a, 0xb4d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f7, 0x001a, 0x001a, 0xc6e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6dd, 0x001a, 0x001a, 0x001a, 0xfedc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacda, 0xb0ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaca, 0xf9e1, 0x001a, 0xb1ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf2, 0x001a, 0x001a, 0xeefa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f9, 0x001a, 0x001a, 0xecd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbfb, 0x001a, 0x001a, 0x001a, 0xf0fd, 0x001a, 0xbde0, 0xe3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaede, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5df, 0x001a, 0x001a, 0xbee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaded, 0xeafa, 0x001a, 0x001a, 0xeecd, 0xa6ed, 0x001a, 0xaeed, 0xedf0, 0x001a, 0xa1dd, 0x001a, 0xafed, 0xf8fc, 0x001a, 0xebd8, 0x001a, 0x001a, 0x001a, 0xf9cc, 0xb5cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9fa, 0x001a, 0xdde1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e2, 0xcfed, 0x001a, 0x001a, 0x001a, 0xa2dd, 0x001a, 0x001a, 0xcaf9, 0x001a, 0xe8ea, 0x001a, 0xede5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebd3, 0x001a, 0xd4e9, 0xfae1, 0xcce4, 0x001a, 0xe4e1, 0xc7e8, 0x001a, 0x001a, 0xdbce, 0x001a, 0x001a, 0x001a, 0xd5dc, 0x001a, 0xb5f7, 0xf3fc, 0xf3f0, 0xafce, 0xb5f1, 0xd2ef, 0xc8e8, 0xf1eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4cb, 0xbee0, 0xf8e3, 0xe9ea, 0xb2fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e0, 0x001a, 0xe0cf, 0x001a, 0xa5ee, 0x001a, 0x001a, 0xaafa, 0xc3e6, 0xb2e1, 0xabca, 0x001a, 0xe4e3, 0xbbe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e2, 0xf2f3, 0x001a, 0xd6ee, 0xb2ea, 0xf6d0, 0xd9ec, 0xcbda, 0xa8cf, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3dd, 0x001a, 0x001a, 0x001a, 0xdbd8, 0x001a, 0xcef9, 0xd5e9, 0xd1e3, 0x001a, 0x001a, 0xbcd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd8, 0xccf3, 0x001a, 0xfbcd, 0xd6f6, 0x001a, 0xf5e7, 0xefe8, 0xf9e3, 0xbbd2, 0xf3f3, 0xfbe3, 0x001a, 0xd0de, 0xb0ce, 0x001a, 0xf7d6, 0xd9f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1f5, 0xc4dc, 0x001a, 0xbbf5, 0x001a, 0xd1de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6dc, 0x001a, 0x001a, 0xd2de, 0x001a, 0x001a, 0xe2ed, 0xf6ee, 0xcfea, 0xeef0, 0xfce3, 0x001a, 0xdfd3, 0xf4d3, 0xb3e1, 0x001a, 0xb4e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3f4, 0x001a, 0x001a, 0xc6df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e9, 0x001a, 0x001a, 0x001a, 0xabdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e3, 0xc5eb, 0xa9f4, 0xb6cd, 0xf9d2, 0x001a, 0xadda, 0xe3d2, 0xd1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0xdccb, 0xfacc, 0x001a, 0xddcf, 0x001a, 0x001a, 0xa9e8, 0x001a, 0xbbe3, 0xbae3, 0x001a, 0x001a, 0xdae0, 0x001a, 0x001a, 0x001a, 0xf7ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5d3, 0x001a, 0xa6d7, 0x001a, 0xb5f6, 0xdbd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e1, 0x001a, 0x001a, 0xead4, 0x001a, 0xa3df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdffd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7d0, 0xd4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaacb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe4, 0x001a, 0xfbe1, 0xa2cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d3, 0x001a, 0xbfe4, 0x001a, 0xc0fb, 0x001a, 0xbeda, 0xcde4, 0x001a, 0xb9d6, 0x001a, 0x001a, 0x001a, 0xc0ef, 0x001a, 0xfce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7dc, 0xe8dc, 0x001a, 0x001a, 0x001a, 0xd6fa, 0x001a, 0xf6d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf1, 0x001a, 0xf2fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd5, 0xf8d0, 0x001a, 0x001a, 0xdfcd, 0x001a, 0x001a, 0xcbf5, 0x001a, 0xf0e4, 0xabcb, 0x001a, 0xc4d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee2, 0x001a, 0xdadd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeda, 0xeeca, 0x001a, 0x001a, 0x001a, 0xb9d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e3, 0x001a, 0x001a, 0xe3e8, 0x001a, 0x001a, 0xabf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9cf, 0x001a, 0x001a, 0x001a, 0xf7d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1d4, 0x001a, 0x001a, 0xe4ce, 0x001a, 0xf2e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee7, 0x001a, 0xbad6, 0x001a, 0xecdf, 0xc0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d8, 0x001a, 0x001a, 0x001a, 0xdce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9f4, 0xb6f1, 0x001a, 0x001a, 0xdee2, 0xb5e1, 0x001a, 0x001a, 0xefcd, 0xa7f1, 0xe5ce, 0xddcb, 0x001a, 0x001a, 0xe3d9, 0x001a, 0x001a, 0xacf3, 0x001a, 0x001a, 0xf9d0, 0xabec, 0xd3de, 0xe9f7, 0x001a, 0x001a, 0xf5f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee1, 0xeecb, 0x001a, 0x001a, 0x001a, 0xbce3, 0xd6f8, 0x001a, 0x001a, 0xeedb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef4, 0x001a, 0x001a, 0xedf2, 0x001a, 0xd9db, 0x001a, 0xa8f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4de, 0x001a, 0xace0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3ed, 0x001a, 0x001a, 0xe1d3, 0x001a, 0xc8df, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d9, 0x001a, 0xacfd, 0xd3ef, 0x001a, 0x001a, 0x001a, 0xc1e4, 0xebf8, 0x001a, 0xacdb, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaf6, 0x001a, 0xdfdb, 0xd3d3, 0xc7f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xceca, 0xc1f8, 0xb4d2, 0x001a, 0x001a, 0xb4dc, 0xb9fa, 0xcfca, 0x001a, 0xb3fc, 0xeaea, 0xebea, 0xfad0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4ed, 0x001a, 0x001a, 0xe7dd, 0x001a, 0x001a, 0xc9df, 0x001a, 0x001a, 0x001a, 0x001a, 0xeddf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcee, 0x001a, 0xc1ef, 0x001a, 0x001a, 0xd2cc, 0x001a, 0xa4dd, 0x001a, 0x001a, 0x001a, 0xcadf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8d3, 0xa8f1, 0x001a, 0x001a, 0x001a, 0xb7cd, 0x001a, 0xd4ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde4, 0xeedf, 0xaccb, 0xbce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecea, 0x001a, 0x001a, 0x001a, 0xcbdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbff9, 0xafd6, 0xc6d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaacf, 0x001a, 0x001a, 0xa9ce, 0x001a, 0x001a, 0xf8d6, 0x001a, 0x001a, 0x001a, 0xb7f1, 0xf8ee, 0x001a, 0x001a, 0x001a, 0xd9d9, 0xdff3, 0x001a, 0xc8f8, 0xc6ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6f4, 0x001a, 0x001a, 0xc5e6, 0xd5ef, 0x001a, 0x001a, 0xefcb, 0xdffc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7dc, 0x001a, 0x001a, 0xe7d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e3, 0x001a, 0xbde3, 0x001a, 0xe1cf, 0xc0f0, 0xdaec, 0x001a, 0xd7dd, 0xf0fb, 0x001a, 0x001a, 0xacec, 0x001a, 0x001a, 0x001a, 0xa9f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7fa, 0xc1fb, 0x001a, 0xc0d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e5, 0x001a, 0x001a, 0x001a, 0xe5ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xadcb, 0x001a, 0xb0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f7, 0x001a, 0xaecb, 0x001a, 0xafda, 0x001a, 0xb6d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d3, 0xb2fb, 0x001a, 0xc4fd, 0x001a, 0xadec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1fb, 0x001a, 0x001a, 0x001a, 0xe9e5, 0xeee9, 0x001a, 0xf4f3, 0xf3f8, 0xc1f0, 0xafde, 0xb0f8, 0x001a, 0x001a, 0xe0f3, 0xafe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaddb, 0x001a, 0xb5e6, 0x001a, 0x001a, 0xa8f9, 0x001a, 0x001a, 0xd8dd, 0xd9e8, 0xd6ef, 0x001a, 0x001a, 0x001a, 0xe2d3, 0x001a, 0xdfe2, 0x001a, 0x001a, 0xe0fc, 0xc8d7, 0xadfd, 0x001a, 0x001a, 0x001a, 0xefdf, 0xd3cc, 0xf9d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d4, 0xc7db, 0xd5de, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f0, 0x001a, 0xd0d5, 0xd9e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7fc, 0xd6dc, 0xe0e2, 0x001a, 0x001a, 0x001a, 0xb0da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f3, 0x001a, 0xecd3, 0x001a, 0xcbf4, 0x001a, 0x001a, 0x001a, 0xc5fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde3, 0x001a, 0xb1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd0, 0xdbec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcf5, 0xa4f2, 0xced8, 0xcfd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecfb, 0x001a, 0xc8dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8e4, 0x001a, 0x001a, 0xc1d2, 0x001a, 0x001a, 0x001a, 0xd7f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbd6, 0xd6de, 0x001a, 0x001a, 0xbdf7, 0xaeec, 0x001a, 0x001a, 0x001a, 0xe1d0, 0x001a, 0xf5e0, 0xb3ea, 0x001a, 0xd6ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6ec, 0xe1e2, 0xbee3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8fc, 0x001a, 0x001a, 0xf0cd, 0x001a, 0xf6f9, 0x001a, 0x001a, 0xf0df, 0x001a, 0x001a, 0x001a, 0xbfe5, 0x001a, 0x001a, 0x001a, 0xbfce, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1fc, 0xb0ed, 0xd1fd, 0xbbf6, 0x001a, 0x001a, 0xcff9, 0xdaeb, 0xc1ca, 0x001a, 0xb8d2, 0xf1cd, 0x001a, 0xd3e3, 0xe6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xede6, 0x001a, 0x001a, 0x001a, 0xfae3, 0x001a, 0x001a, 0xaaf0, 0xd0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2fc, 0x001a, 0xa7f8, 0x001a, 0x001a, 0x001a, 0xe5e1, 0xf9ee, 0x001a, 0x001a, 0x001a, 0xf6e7, 0xedea, 0x001a, 0x001a, 0xb4fc, 0xc2f5, 0x001a, 0x001a, 0xdcd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f0, 0x001a, 0xe8dd, 0xedd3, 0xfcf5, 0x001a, 0xbfda, 0x001a, 0xfbcc, 0x001a, 0x001a, 0x001a, 0xfad3, 0xa4f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7ef, 0x001a, 0xc3d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedfb, 0x001a, 0xade0, 0x001a, 0x001a, 0xeeea, 0xb3fb, 0xc2e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f6, 0xddd2, 0x001a, 0xccdf, 0x001a, 0x001a, 0xc9fc, 0x001a, 0x001a, 0xa9e5, 0xf6e0, 0xb3f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0cb, 0x001a, 0xefea, 0xf0ea, 0x001a, 0x001a, 0x001a, 0xc0da, 0xb4f8, 0xf2eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7e9, 0xf1e4, 0x001a, 0x001a, 0x001a, 0xefca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcafc, 0x001a, 0x001a, 0x001a, 0xe1f3, 0x001a, 0x001a, 0xc4cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e3, 0x001a, 0xc5cb, 0xb4ea, 0x001a, 0x001a, 0xbde9, 0x001a, 0xc9d7, 0x001a, 0x001a, 0xdbeb, 0xb1ed, 0x001a, 0xc3cc, 0xbef7, 0xcbfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f8, 0x001a, 0xb7d9, 0x001a, 0x001a, 0xd3f3, 0xd4f3, 0x001a, 0x001a, 0x001a, 0xe4f7, 0x001a, 0xd1f7, 0x001a, 0x001a, 0xb7d8, 0xb1ce, 0xc2ca, 0x001a, 0x001a, 0xb4fb, 0xc6cb, 0x001a, 0x001a, 0xf6f0, 0x001a, 0x001a, 0xe7d5, 0x001a, 0xd0ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4cc, 0xafcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaf4, 0xafe9, 0x001a, 0x001a, 0xc3f5, 0xd8e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9dd, 0x001a, 0x001a, 0x001a, 0xf3f1, 0x001a, 0xfbd5, 0xbbde, 0x001a, 0x001a, 0xfbf4, 0x001a, 0x001a, 0x001a, 0xf3fd, 0xf2fd, 0xa6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9dd, 0x001a, 0x001a, 0xd3d4, 0x001a, 0xa8cc, 0x001a, 0xc1da, 0xd5cc, 0x001a, 0xe4d9, 0x001a, 0x001a, 0x001a, 0xcafa, 0x001a, 0x001a, 0x001a, 0xe3e5, 0x001a, 0x001a, 0x001a, 0xbcd3, 0x001a, 0x001a, 0x001a, 0xf0ca, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d0, 0x001a, 0x001a, 0x001a, 0xd0ca, 0xabfa, 0xebeb, 0xf8e7, 0xe5d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4f3, 0x001a, 0x001a, 0x001a, 0xfbd4, 0xe3fc, 0xd8fa, 0x001a, 0xd5f3, 0x001a, 0xabcf, 0x001a, 0x001a, 0xf3eb, 0xfcd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4d3, 0xfccd, 0x001a, 0xe6d9, 0x001a, 0xf9e2, 0xa1e2, 0xd4eb, 0x001a, 0xf7e0, 0xb2e4, 0xfccc, 0x001a, 0x001a, 0x001a, 0xe4fb, 0x001a, 0x001a, 0x001a, 0xabf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdd0, 0x001a, 0xf1ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8ef, 0x001a, 0x001a, 0x001a, 0xc0d7, 0x001a, 0xfaee, 0xf4fd, 0x001a, 0x001a, 0xe3d3, 0x001a, 0xc2fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8d5, 0xaedb, 0xb6e1, 0xb7f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfe0, 0xc3fb, 0xeadd, 0x001a, 0xa2e2, 0x001a, 0xa6ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcadd, 0x001a, 0x001a, 0xe2d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6dd, 0x001a, 0x001a, 0xebdd, 0x001a, 0x001a, 0xf9e4, 0x001a, 0x001a, 0xafe3, 0xfcd0, 0x001a, 0x001a, 0x001a, 0xfcf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xbccc, 0xeaf7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e5, 0xf1df, 0x001a, 0x001a, 0xe1f7, 0x001a, 0xf7f9, 0xb9ef, 0x001a, 0x001a, 0xd8f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9f8, 0x001a, 0x001a, 0x001a, 0xbdee, 0x001a, 0x001a, 0x001a, 0xc6d8, 0x001a, 0x001a, 0xe3e4, 0xcef5, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d9, 0xb9d2, 0xc3d5, 0x001a, 0x001a, 0xe5da, 0xd0da, 0x001a, 0xd9d1, 0xd8ce, 0x001a, 0xdecb, 0xacf4, 0xfbda, 0x001a, 0xe9f6, 0xf3e8, 0xaccf, 0xf0f0, 0x001a, 0xfdf4, 0xc8db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0ce, 0xd4e3, 0xcfd1, 0xf5f1, 0x001a, 0xf2cd, 0x001a, 0xebcf, 0x001a, 0x001a, 0x001a, 0xb8cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e3, 0xdad1, 0x001a, 0xa5f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f2, 0x001a, 0xcee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9f1, 0x001a, 0x001a, 0x001a, 0xc9f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8ef, 0xc9e6, 0x001a, 0xb8d8, 0xf3fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5f3, 0x001a, 0x001a, 0xa4f8, 0x001a, 0x001a, 0xf3d1, 0xc8e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9dc, 0xd7de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfcb, 0x001a, 0x001a, 0x001a, 0xeccf, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff4, 0x001a, 0x001a, 0xf4d1, 0xbad2, 0x001a, 0x001a, 0x001a, 0xf2df, 0x001a, 0x001a, 0x001a, 0xb7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e2, 0xfcd3, 0x001a, 0x001a, 0xe6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9db, 0x001a, 0x001a, 0x001a, 0xfae4, 0x001a, 0xdecf, 0x001a, 0x001a, 0xd0ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d5, 0xf5f3, 0xaef7, 0x001a, 0x001a, 0xc8ef, 0x001a, 0xf3cd, 0xcff5, 0xf3e5, 0xc2f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1ca, 0x001a, 0x001a, 0x001a, 0xf1ea, 0x001a, 0xa6d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad9, 0xabf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7eb, 0x001a, 0x001a, 0x001a, 0xc0e5, 0xb5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9cc, 0xc6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5ea, 0x001a, 0xaae5, 0xbadf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe1, 0x001a, 0xd1da, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e1, 0x001a, 0xf4e8, 0xfdd3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6da, 0xb3f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdfd, 0x001a, 0x001a, 0x001a, 0xb6f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d9, 0xb9d9, 0xc9ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xced6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf7, 0xaedf, 0xf5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d2, 0x001a, 0x001a, 0x001a, 0xd5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccf4, 0xfcda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8d9, 0x001a, 0xebf7, 0xc9f5, 0x001a, 0xbcf3, 0x001a, 0xd2da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e8, 0x001a, 0x001a, 0xcfd6, 0xbaf4, 0x001a, 0xc9f7, 0x001a, 0x001a, 0xaacc, 0x001a, 0x001a, 0xc3f0, 0xd6cc, 0x001a, 0x001a, 0x001a, 0xd3d0, 0x001a, 0xbdd3, 0x001a, 0x001a, 0x001a, 0xfbdb, 0x001a, 0xe0cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4d3, 0xf7f6, 0x001a, 0x001a, 0xbad5, 0xcdf3, 0xe1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadf4, 0x001a, 0xaafc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf7, 0x001a, 0x001a, 0x001a, 0xf6e8, 0x001a, 0xe7da, 0x001a, 0x001a, 0x001a, 0xccf7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6ce, 0xabfc, 0xbbd5, 0x001a, 0x001a, 0xa8f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e2, 0xb9cd, 0xf2ea, 0xc7cb, 0x001a, 0xf4cd, 0x001a, 0x001a, 0xafdb, 0xd9ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbacd, 0x001a, 0x001a, 0xf9fc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3df, 0xe7ce, 0xc2da, 0x001a, 0xadcf, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e7, 0xa8f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f3, 0x001a, 0x001a, 0x001a, 0xf2ca, 0xa4df, 0x001a, 0x001a, 0xc4d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7cc, 0xc2e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbcd, 0x001a, 0xdaef, 0xd8ee, 0x001a, 0xa7dd, 0xa6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e0, 0x001a, 0x001a, 0x001a, 0xb0d6, 0xcaf8, 0x001a, 0xfafc, 0x001a, 0xfed9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0de, 0x001a, 0x001a, 0x001a, 0xecdd, 0xe8da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d4, 0x001a, 0xf9d6, 0x001a, 0xd7cd, 0xd8de, 0x001a, 0x001a, 0xf8f2, 0x001a, 0xd6e4, 0x001a, 0x001a, 0xc5d0, 0xaef4, 0x001a, 0xa8dd, 0x001a, 0x001a, 0x001a, 0xc5ed, 0xd6f3, 0x001a, 0x001a, 0xd9de, 0xe6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d3, 0x001a, 0xb0db, 0x001a, 0x001a, 0xdae5, 0xbfe3, 0x001a, 0x001a, 0x001a, 0xb1db, 0x001a, 0x001a, 0x001a, 0xe9d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e0, 0xdbef, 0x001a, 0x001a, 0xe9f0, 0x001a, 0x001a, 0xb2d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d9, 0x001a, 0x001a, 0xfed0, 0x001a, 0xedec, 0xa9d3, 0x001a, 0xa9f2, 0xc4f0, 0x001a, 0x001a, 0xe2e2, 0xefe9, 0x001a, 0x001a, 0x001a, 0xd1f9, 0x001a, 0x001a, 0xd9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae8, 0xc3da, 0xc4da, 0xc5d4, 0x001a, 0xfae7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0cd, 0xb0e3, 0x001a, 0xb2db, 0xc4fb, 0x001a, 0xe3f3, 0x001a, 0xa5d9, 0xe7fb, 0xcbdd, 0xd4d0, 0x001a, 0xb6e6, 0xaee0, 0xdafd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5dc, 0xf8e0, 0xb1e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0f5, 0x001a, 0xdcd8, 0xc6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e1, 0x001a, 0xc0e3, 0xc0f9, 0xf0e9, 0x001a, 0x001a, 0xdbd9, 0x001a, 0xe4f3, 0x001a, 0x001a, 0x001a, 0xb6dc, 0xe9e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f0, 0xc1e3, 0xccfc, 0xcdfc, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf2, 0x001a, 0xccf2, 0x001a, 0x001a, 0x001a, 0xcfe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf1, 0x001a, 0xd9fa, 0x001a, 0xb8f1, 0xf5fd, 0xf9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe7, 0xb7fc, 0xe4fc, 0xc5fb, 0xe7e3, 0xb9d8, 0x001a, 0xf8f6, 0x001a, 0x001a, 0xc5dc, 0xd8cc, 0x001a, 0x001a, 0x001a, 0xafe0, 0xe7f4, 0x001a, 0xdcef, 0xfccf, 0xddef, 0x001a, 0xaaf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbefd, 0x001a, 0x001a, 0xacca, 0xbbfd, 0xc7fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e7, 0x001a, 0xd1ea, 0xf4df, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd1, 0xdee4, 0xc3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d9, 0x001a, 0x001a, 0xbccd, 0x001a, 0xe5f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ed, 0x001a, 0x001a, 0xbad9, 0x001a, 0x001a, 0x001a, 0xe7ed, 0xb5fb, 0xecf8, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e0, 0x001a, 0xd9cc, 0x001a, 0x001a, 0xc6d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e7, 0x001a, 0xf5d5, 0xbed3, 0x001a, 0xfbfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e4, 0x001a, 0x001a, 0xf5df, 0x001a, 0x001a, 0xf8e8, 0xedf8, 0x001a, 0x001a, 0xc7ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e8, 0x001a, 0xd8cd, 0xd6e7, 0xdacc, 0x001a, 0x001a, 0xe3ca, 0xf6df, 0xc7f0, 0xc6f0, 0x001a, 0xbad8, 0x001a, 0xf4f1, 0xf0f4, 0xccf5, 0x001a, 0x001a, 0xe5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5ea, 0xf3ea, 0x001a, 0xdbdd, 0x001a, 0xd7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdde, 0xf9f2, 0x001a, 0xc7d5, 0x001a, 0x001a, 0x001a, 0xd0d8, 0x001a, 0xc8f0, 0xa1d1, 0xa2d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4d9, 0xe8d6, 0xcad9, 0x001a, 0xb1da, 0xc7d8, 0xe2dc, 0xcef3, 0xf4f5, 0x001a, 0x001a, 0xb9f1, 0x001a, 0x001a, 0xd3da, 0x001a, 0xeaf6, 0x001a, 0x001a, 0x001a, 0xf5cf, 0x001a, 0x001a, 0xaefd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ca, 0x001a, 0x001a, 0xb4df, 0x001a, 0x001a, 0x001a, 0x001a, 0xddd7, 0xbafa, 0xa7ee, 0xbdf5, 0x001a, 0xf5f8, 0x001a, 0x001a, 0xe8ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1d4, 0x001a, 0xa3d1, 0xd6e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8f9, 0x001a, 0xcadb, 0xf9cb, 0xd4d4, 0x001a, 0xdcd9, 0x001a, 0xbeee, 0x001a, 0xedf7, 0x001a, 0x001a, 0x001a, 0xeed2, 0x001a, 0x001a, 0xe6e1, 0xf9f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeddd, 0x001a, 0xdbe8, 0x001a, 0xb3db, 0x001a, 0x001a, 0x001a, 0xf7d1, 0xb0e0, 0x001a, 0x001a, 0xe2d4, 0x001a, 0xd7f6, 0x001a, 0xf9d7, 0x001a, 0x001a, 0xddd8, 0x001a, 0xfdcd, 0xabf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdcd, 0xc2f8, 0x001a, 0x001a, 0xacf2, 0x001a, 0x001a, 0xadca, 0xaeca, 0xaecf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdadb, 0xbbd9, 0xf3ca, 0xd3f6, 0xf8e6, 0xf5ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6ea, 0x001a, 0x001a, 0xf9f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcf, 0x001a, 0x001a, 0xd3ca, 0x001a, 0x001a, 0xafca, 0xb0d2, 0xbaf1, 0x001a, 0xb3d7, 0xc3e3, 0xfdf3, 0xdade, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbde, 0x001a, 0x001a, 0xdeef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e2, 0xfbee, 0x001a, 0x001a, 0xf7df, 0xcad7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8ce, 0xdbdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7fa, 0xc6d0, 0x001a, 0x001a, 0xabcc, 0xa8ee, 0x001a, 0x001a, 0xfacb, 0xf9f9, 0xfdcc, 0xfed3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeef2, 0x001a, 0xd5d4, 0xcddf, 0x001a, 0xb8fc, 0xd0d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4ca, 0x001a, 0xd9d5, 0x001a, 0x001a, 0x001a, 0xded8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9cd, 0x001a, 0x001a, 0x001a, 0xa9ee, 0xbcf6, 0x001a, 0x001a, 0xdbcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9f0, 0x001a, 0xfcfc, 0x001a, 0xc9e8, 0xfef4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce7, 0xded7, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcde, 0x001a, 0xacf0, 0xfecc, 0xe1cd, 0x001a, 0xbae1, 0x001a, 0xefdb, 0xb2da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5d1, 0xb8dc, 0x001a, 0x001a, 0x001a, 0xf6d8, 0x001a, 0xa4d1, 0x001a, 0xe2cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xeadc, 0x001a, 0x001a, 0xf7f0, 0x001a, 0xcaf0, 0xbed0, 0x001a, 0xdcdd, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6d4, 0xd6d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ed, 0xa1cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5df, 0x001a, 0x001a, 0x001a, 0xf8df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d4, 0xb2ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e3, 0xd0f5, 0x001a, 0x001a, 0x001a, 0xa1f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe6, 0x001a, 0xf1f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f9, 0xdbe0, 0xebf6, 0x001a, 0xf1cb, 0x001a, 0xead9, 0xa2f5, 0x001a, 0x001a, 0x001a, 0xd1d7, 0x001a, 0xf8d1, 0xf8ea, 0xf9ea, 0xb3da, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfef, 0x001a, 0x001a, 0xeff1, 0x001a, 0xf6e5, 0xbfee, 0xe4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfd0, 0x001a, 0xacfa, 0xd1f5, 0xb3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcef2, 0xb4db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcefc, 0x001a, 0xeedd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbecd, 0x001a, 0xe9da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0cf, 0xd9f7, 0xe6f3, 0x001a, 0x001a, 0xd9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaace, 0x001a, 0xc8cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d0, 0x001a, 0xcbf0, 0x001a, 0xc7d0, 0x001a, 0x001a, 0xc5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad5, 0x001a, 0xa7d7, 0x001a, 0x001a, 0x001a, 0xc0ee, 0x001a, 0xf6f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f5, 0xe9ed, 0x001a, 0xbcd9, 0x001a, 0xc6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f5, 0x001a, 0x001a, 0xd4da, 0xa7e2, 0xfcfb, 0x001a, 0x001a, 0xdcf1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ca, 0x001a, 0x001a, 0x001a, 0xfae8, 0x001a, 0x001a, 0xe9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e9, 0xe5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9d0, 0xf2d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d1, 0x001a, 0xcedf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad3, 0x001a, 0x001a, 0x001a, 0xaccc, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0ef, 0x001a, 0x001a, 0x001a, 0xe5e5, 0xd5d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcdb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfecb, 0xeaed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d4, 0xf6cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead5, 0xeef1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbfa, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedcf, 0x001a, 0xebed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d5, 0x001a, 0x001a, 0x001a, 0xbcd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2fd, 0xadf3, 0x001a, 0xdbfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d1, 0x001a, 0x001a, 0xe3fd, 0xb3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4fd, 0xcefa, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0ca, 0x001a, 0xa7f7, 0x001a, 0xb1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e6, 0x001a, 0xb6fc, 0xadf2, 0xe1ef, 0xaef3, 0xc6dc, 0xebd9, 0x001a, 0x001a, 0x001a, 0xe0e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d5, 0xfdcf, 0x001a, 0x001a, 0xddde, 0x001a, 0x001a, 0x001a, 0xd1d9, 0x001a, 0x001a, 0x001a, 0xeae4, 0xcff2, 0x001a, 0xbff7, 0x001a, 0x001a, 0xe6e2, 0xa8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e3, 0x001a, 0xd1ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1d6, 0xb2de, 0x001a, 0x001a, 0xe8e0, 0x001a, 0x001a, 0xabd3, 0x001a, 0xdceb, 0x001a, 0x001a, 0xafdf, 0x001a, 0xc3ca, 0x001a, 0x001a, 0xfcee, 0x001a, 0xc3fd, 0x001a, 0x001a, 0x001a, 0xf6eb, 0xb2cf, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd9, 0x001a, 0xbdd9, 0x001a, 0xdfd8, 0x001a, 0x001a, 0xb8d4, 0xbeeb, 0xefdd, 0x001a, 0xf0dd, 0xf1dd, 0xf2dd, 0x001a, 0x001a, 0xbed9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6fb, 0xb3cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe4, 0x001a, 0xc5da, 0x001a, 0xecd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e2, 0x001a, 0x001a, 0xbcde, 0xb5e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0db, 0x001a, 0xe2ef, 0xf0f1, 0xb4cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1db, 0x001a, 0xb1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5df, 0x001a, 0xd2f9, 0x001a, 0x001a, 0xfde7, 0x001a, 0x001a, 0xa3e6, 0xf1fb, 0xb0cb, 0xaef2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7cd, 0x001a, 0xdce8, 0x001a, 0x001a, 0xd7e7, 0x001a, 0x001a, 0xc0f7, 0x001a, 0xe3d0, 0x001a, 0x001a, 0x001a, 0xa1da, 0x001a, 0x001a, 0x001a, 0xbdcc, 0x001a, 0x001a, 0xa9d1, 0xccdd, 0x001a, 0x001a, 0xfee3, 0xaad1, 0xaae8, 0x001a, 0xb6ea, 0xfaf9, 0xcce6, 0xd8f6, 0x001a, 0x001a, 0x001a, 0xc7d4, 0x001a, 0x001a, 0x001a, 0xcbd9, 0x001a, 0xd2d9, 0xcbd3, 0xf7d8, 0xa9da, 0xf8f5, 0x001a, 0x001a, 0xdede, 0xaff2, 0xa9f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d8, 0x001a, 0x001a, 0xc1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3dd, 0xfaea, 0x001a, 0xbdf6, 0xbbe1, 0xbfcd, 0xd4f4, 0xcde6, 0x001a, 0xcffc, 0xa2fb, 0x001a, 0xdce0, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf4, 0xd5da, 0x001a, 0xb2f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2fb, 0x001a, 0xf6db, 0x001a, 0xdfde, 0x001a, 0x001a, 0x001a, 0xf2db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcf8, 0xeef7, 0xe8eb, 0x001a, 0xfad2, 0x001a, 0x001a, 0xbcf1, 0x001a, 0x001a, 0xdafa, 0x001a, 0x001a, 0xeada, 0xc6da, 0xc1f7, 0x001a, 0x001a, 0xb6e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e5, 0xacd6, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e1, 0x001a, 0xaae2, 0x001a, 0xa6d5, 0x001a, 0x001a, 0xd7d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f2, 0x001a, 0xfbea, 0x001a, 0xdde0, 0xf3fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdf1, 0x001a, 0x001a, 0xe7e2, 0xd7fd, 0x001a, 0xc8ce, 0xb7ea, 0x001a, 0xc0fc, 0x001a, 0xe7fd, 0xeff7, 0x001a, 0x001a, 0xb5d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaef, 0xddf1, 0x001a, 0xb3de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe8, 0x001a, 0x001a, 0xddf8, 0x001a, 0x001a, 0xc7fb, 0xc8d5, 0x001a, 0xdfd7, 0x001a, 0xa9dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e9, 0x001a, 0x001a, 0xadfa, 0xd9f6, 0xf4fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee6, 0x001a, 0xdccc, 0xbce1, 0xefe0, 0x001a, 0x001a, 0xbfe9, 0xfdfc, 0xcee6, 0x001a, 0x001a, 0xd7e1, 0x001a, 0xcfe6, 0x001a, 0xf1f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e4, 0x001a, 0x001a, 0xfbe4, 0x001a, 0x001a, 0xe4f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3ef, 0x001a, 0x001a, 0xeecf, 0xbef6, 0xb2e0, 0xfefc, 0xabd1, 0x001a, 0x001a, 0x001a, 0xfad7, 0x001a, 0x001a, 0x001a, 0xc8fb, 0x001a, 0xd7e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d4, 0xf8f0, 0xa8d7, 0x001a, 0x001a, 0x001a, 0xe7e1, 0x001a, 0x001a, 0xbfd3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4ef, 0x001a, 0xc5d7, 0xe2eb, 0x001a, 0x001a, 0xe7fc, 0x001a, 0x001a, 0xa2e4, 0x001a, 0xe8e2, 0x001a, 0xd0e6, 0x001a, 0xe8fb, 0xe8f4, 0xf4e5, 0xbcf4, 0xd5f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6df, 0x001a, 0xb9fc, 0xc2ee, 0xf5ca, 0x001a, 0x001a, 0x001a, 0xe5ef, 0xe2cb, 0xa4d4, 0x001a, 0xe0de, 0xfdda, 0xc6e4, 0xbee8, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee0, 0xb4f6, 0xd2ea, 0x001a, 0xfbf9, 0x001a, 0x001a, 0xc2e0, 0x001a, 0xe4ca, 0x001a, 0xb7e7, 0x001a, 0xfdea, 0x001a, 0xddd9, 0x001a, 0xb4da, 0xaaee, 0xe9fb, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbdb, 0xb5da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef1, 0x001a, 0x001a, 0xacd3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9fb, 0x001a, 0xcfdf, 0x001a, 0x001a, 0xc0d3, 0xd7e3, 0x001a, 0xe6ef, 0xd0fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e9, 0x001a, 0x001a, 0x001a, 0xd3f5, 0x001a, 0x001a, 0xdcec, 0xb7f7, 0x001a, 0x001a, 0xb8ea, 0xf9d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d7, 0xb5cf, 0x001a, 0xa8d9, 0x001a, 0x001a, 0xeeec, 0x001a, 0x001a, 0xaadd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2cd, 0xaee8, 0x001a, 0x001a, 0x001a, 0xbde1, 0x001a, 0xd1f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e9, 0x001a, 0x001a, 0x001a, 0xfcd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5db, 0x001a, 0xe7f3, 0xfed8, 0x001a, 0x001a, 0x001a, 0xd1fc, 0x001a, 0xb2ed, 0xaff4, 0x001a, 0xa3fb, 0x001a, 0x001a, 0xc1fc, 0x001a, 0xabee, 0xa5d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9ee, 0x001a, 0x001a, 0x001a, 0xcafb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3cd, 0xbbd8, 0x001a, 0xdbe5, 0xf7f8, 0x001a, 0x001a, 0x001a, 0xd4f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d7, 0x001a, 0xc9cb, 0x001a, 0x001a, 0xd1e6, 0xccf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaed8, 0x001a, 0xd3f9, 0xfed5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd8, 0xb0f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe2, 0xe8f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeced, 0x001a, 0xb8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeda, 0x001a, 0x001a, 0xbecc, 0x001a, 0x001a, 0xfcf2, 0xebda, 0x001a, 0xd8e2, 0xd6ed, 0x001a, 0x001a, 0xd1d6, 0xb3e0, 0x001a, 0x001a, 0xd2fc, 0x001a, 0xc8eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d3, 0xcdf0, 0x001a, 0xf7cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ed, 0x001a, 0xd8d4, 0xc9dc, 0xf1d7, 0x001a, 0x001a, 0xbbdf, 0x001a, 0x001a, 0xa5f3, 0x001a, 0x001a, 0x001a, 0xcdf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xbff1, 0xb1f8, 0x001a, 0xfae9, 0x001a, 0x001a, 0x001a, 0xcbfb, 0x001a, 0x001a, 0xd5ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f9, 0xcaf7, 0x001a, 0x001a, 0xc8d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8fc, 0xbdf3, 0x001a, 0xfeee, 0x001a, 0xfee7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d3, 0x001a, 0xadcc, 0xfaf6, 0xb2d6, 0xd8d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xadf0, 0xccfb, 0xa1eb, 0x001a, 0x001a, 0xa6d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdfb, 0x001a, 0xbdd5, 0xdff1, 0x001a, 0x001a, 0xfbf6, 0x001a, 0xb4de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebd5, 0x001a, 0x001a, 0xc8e5, 0x001a, 0x001a, 0x001a, 0xa4fb, 0xb9d4, 0x001a, 0x001a, 0xe1de, 0x001a, 0xa3e4, 0x001a, 0x001a, 0x001a, 0xb7d7, 0x001a, 0xeef8, 0x001a, 0x001a, 0x001a, 0xb5de, 0x001a, 0x001a, 0xd2d6, 0x001a, 0xd5f9, 0xbae7, 0xd5eb, 0xf7d5, 0xe7ef, 0xbee1, 0x001a, 0x001a, 0x001a, 0xaefa, 0x001a, 0x001a, 0x001a, 0xe9d6, 0xeed6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4ce, 0x001a, 0x001a, 0x001a, 0xa5fb, 0xeee1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xcefb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdfb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6cf, 0x001a, 0x001a, 0x001a, 0xc7ed, 0xacee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddcc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7f6, 0x001a, 0x001a, 0x001a, 0xfae6, 0x001a, 0x001a, 0x001a, 0xa4f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcfd, 0xb3ed, 0xc9ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8ef, 0x001a, 0x001a, 0xbfe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbfa, 0xe3cb, 0xa9f7, 0x001a, 0xa6fb, 0x001a, 0x001a, 0x001a, 0xb9dc, 0x001a, 0x001a, 0x001a, 0xc0f1, 0xc8ed, 0xc3ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd6, 0x001a, 0x001a, 0xcefd, 0x001a, 0x001a, 0x001a, 0xa1e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4fb, 0xa7d5, 0x001a, 0x001a, 0x001a, 0xf6f1, 0x001a, 0xd3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdecc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f8, 0x001a, 0x001a, 0x001a, 0xebdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae5, 0x001a, 0x001a, 0xe0f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccdb, 0xcddd, 0x001a, 0x001a, 0x001a, 0xc8d4, 0x001a, 0x001a, 0xedd9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8fd, 0x001a, 0xa1d6, 0xbffd, 0x001a, 0xd3fc, 0x001a, 0xa1ef, 0x001a, 0xbce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed1, 0x001a, 0x001a, 0xd5e6, 0x001a, 0x001a, 0xf2e9, 0x001a, 0xb0df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d8, 0xbafc, 0xaffd, 0xcef0, 0x001a, 0xe1db, 0x001a, 0x001a, 0xc9e5, 0x001a, 0xb4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe9, 0xa8ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7fd, 0x001a, 0x001a, 0xa7fb, 0x001a, 0xc2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e2, 0x001a, 0x001a, 0xecdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8fd, 0xf9fd, 0x001a, 0x001a, 0x001a, 0xbff6, 0x001a, 0x001a, 0xa7e7, 0x001a, 0xd7e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d4, 0xc9d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfad6, 0x001a, 0xf2d7, 0x001a, 0xc0e1, 0x001a, 0xe2db, 0xd8e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcff0, 0xbef3, 0xace2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7f5, 0xf0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8fd, 0xe8e3, 0x001a, 0xa7d4, 0xfce8, 0xd2fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f0, 0x001a, 0xf0f7, 0xb3ee, 0x001a, 0x001a, 0xbaea, 0x001a, 0xd3ea, 0x001a, 0x001a, 0xc9ed, 0xabdd, 0x001a, 0x001a, 0x001a, 0xace5, 0xa1fd, 0x001a, 0xd0df, 0xb3ec, 0x001a, 0xd1df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeded, 0xb8f8, 0xfaf7, 0x001a, 0x001a, 0x001a, 0xabf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbad4, 0xb3e4, 0x001a, 0xdae9, 0x001a, 0xb6de, 0x001a, 0xbfd9, 0x001a, 0xc0d9, 0xefd6, 0x001a, 0x001a, 0x001a, 0x001a, 0xccd9, 0x001a, 0xaada, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f7, 0x001a, 0x001a, 0x001a, 0xb2cc, 0x001a, 0x001a, 0xf9df, 0xe0d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbd4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfafd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3cc, 0x001a, 0x001a, 0xf3db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2df, 0x001a, 0xcace, 0x001a, 0xdaee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e4, 0x001a, 0xcffb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7cf, 0x001a, 0xc3ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeace, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xade2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1d7, 0xf5fa, 0x001a, 0x001a, 0xc9d5, 0xacf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9f3, 0x001a, 0x001a, 0x001a, 0x001a, 0xedd8, 0xc4e3, 0xf1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e8, 0x001a, 0x001a, 0x001a, 0xfae0, 0xc4ee, 0xded9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2eb, 0xa3eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2fc, 0xbbea, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe8, 0xe2de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefed, 0x001a, 0xa3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd4, 0x001a, 0xeafc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee7, 0x001a, 0xf2fc, 0x001a, 0x001a, 0xb4d6, 0x001a, 0x001a, 0xaee2, 0x001a, 0xb7d3, 0xccfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcfa, 0x001a, 0xb5ed, 0xe3e1, 0x001a, 0xace8, 0x001a, 0xdde8, 0x001a, 0x001a, 0xe9ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdf4, 0x001a, 0xb8cf, 0xdbe9, 0xacd1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9eb, 0x001a, 0xcce8, 0x001a, 0x001a, 0x001a, 0xb7de, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd6, 0xe5d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6da, 0x001a, 0xb1ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8da, 0xa6df, 0x001a, 0xb3f9, 0xd2f2, 0x001a, 0xc4ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbce, 0x001a, 0x001a, 0xf5cd, 0x001a, 0x001a, 0x001a, 0xb0fd, 0xa8d5, 0x001a, 0xc1f1, 0x001a, 0x001a, 0xe9e2, 0xcadc, 0xb4ec, 0xc0fa, 0x001a, 0x001a, 0xa8fb, 0xa8d0, 0x001a, 0x001a, 0xecda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed9, 0x001a, 0xfbe0, 0x001a, 0x001a, 0x001a, 0xeaef, 0xdefa, 0x001a, 0x001a, 0xc4e0, 0x001a, 0xb9cf, 0x001a, 0xcad5, 0xe2d7, 0xafe2, 0x001a, 0xb8d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf6, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2ef, 0xdae2, 0xfcf6, 0x001a, 0x001a, 0xd0fb, 0xadd1, 0x001a, 0xe4cd, 0x001a, 0xaed1, 0xeddc, 0xcee8, 0x001a, 0xf9f0, 0xb5ce, 0xfce6, 0x001a, 0x001a, 0xfbd7, 0xd6d0, 0xf5dd, 0xf1f7, 0x001a, 0xfdf6, 0x001a, 0xf7db, 0x001a, 0x001a, 0x001a, 0x001a, 0xeafb, 0xdce9, 0xc1d9, 0x001a, 0xf2f5, 0xc5e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2f9, 0x001a, 0xbcea, 0x001a, 0xc5d2, 0xd1fb, 0xc0e7, 0xa5eb, 0x001a, 0xfadf, 0xa2e3, 0xb9d7, 0x001a, 0xc3e9, 0x001a, 0xfde8, 0xafe8, 0x001a, 0x001a, 0xd3f2, 0xa9fb, 0xa5d8, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d0, 0x001a, 0x001a, 0x001a, 0xafd1, 0xe3d7, 0x001a, 0x001a, 0x001a, 0xc6e0, 0x001a, 0xa2d6, 0x001a, 0xf0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d7, 0x001a, 0x001a, 0x001a, 0xd4fc, 0x001a, 0xd7da, 0xdfcc, 0x001a, 0xd4f2, 0x001a, 0xb0d1, 0x001a, 0xe0cc, 0x001a, 0xfddb, 0xbff3, 0x001a, 0xd1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbfc, 0x001a, 0xb0e2, 0x001a, 0x001a, 0xa5e6, 0x001a, 0x001a, 0x001a, 0xdbe2, 0x001a, 0x001a, 0x001a, 0xdedf, 0x001a, 0xc7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff2, 0x001a, 0x001a, 0x001a, 0xe1cc, 0x001a, 0x001a, 0x001a, 0x001a, 0xead6, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e7, 0x001a, 0x001a, 0x001a, 0xb6ce, 0x001a, 0xc0f3, 0x001a, 0xfecd, 0x001a, 0x001a, 0x001a, 0xd2fb, 0x001a, 0xf8f8, 0xfbf7, 0x001a, 0x001a, 0xbfe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbadc, 0x001a, 0x001a, 0xb4cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7f1, 0x001a, 0x001a, 0x001a, 0xb8e8, 0x001a, 0x001a, 0xf6ca, 0x001a, 0xa4e4, 0xd6f4, 0x001a, 0x001a, 0x001a, 0xe6df, 0x001a, 0x001a, 0x001a, 0xa7df, 0x001a, 0xe7df, 0xc1e1, 0x001a, 0xc4e9, 0x001a, 0x001a, 0xcbdc, 0xc5e9, 0x001a, 0x001a, 0x001a, 0xa3ef, 0xa6eb, 0xa3cb, 0xe9e3, 0x001a, 0x001a, 0x001a, 0xfbd1, 0xa4ef, 0x001a, 0xebef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3cd, 0x001a, 0x001a, 0xe6e8, 0x001a, 0xa5ef, 0x001a, 0xccd3, 0xedda, 0x001a, 0x001a, 0x001a, 0x001a, 0xbad7, 0x001a, 0xd5f2, 0xe5f5, 0xefd9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4f9, 0x001a, 0x001a, 0xd4d5, 0xcffd, 0x001a, 0x001a, 0x001a, 0xe3db, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f1, 0xb6ec, 0x001a, 0x001a, 0x001a, 0x001a, 0xfefb, 0xd7d3, 0x001a, 0xb1d1, 0x001a, 0xb1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2cb, 0xc2f1, 0x001a, 0x001a, 0xe1f4, 0xb5f9, 0x001a, 0x001a, 0xc3e1, 0xc2e1, 0x001a, 0xf7eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcacb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef8, 0xaaf9, 0xf7ca, 0x001a, 0xb7ed, 0x001a, 0x001a, 0xb8d3, 0xd6f2, 0x001a, 0x001a, 0xd9d4, 0xc5ee, 0xf0f2, 0x001a, 0x001a, 0x001a, 0xb2ca, 0x001a, 0x001a, 0xbbdc, 0x001a, 0xf8f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7ec, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae5, 0x001a, 0xc0f6, 0xddfd, 0x001a, 0x001a, 0xe3d4, 0xe2cc, 0x001a, 0xd4f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3d3, 0x001a, 0xa6d8, 0x001a, 0xc1f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6dd, 0x001a, 0xc0cd, 0x001a, 0x001a, 0x001a, 0xdce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0e8, 0xb0f4, 0xeaf3, 0xeeda, 0x001a, 0xbbd7, 0x001a, 0xb1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe4, 0x001a, 0xd6ca, 0x001a, 0x001a, 0x001a, 0xa8eb, 0x001a, 0x001a, 0x001a, 0xfedb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2f6, 0x001a, 0x001a, 0xbbef, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd4, 0x001a, 0x001a, 0xc8e0, 0x001a, 0x001a, 0x001a, 0xb9e8, 0x001a, 0xa6ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4cd, 0x001a, 0x001a, 0xf4d4, 0xa1db, 0xdcdb, 0xdddb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcee, 0x001a, 0xcbcb, 0xd5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebce, 0x001a, 0xc1cd, 0x001a, 0x001a, 0xd3fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d9, 0x001a, 0x001a, 0xdde9, 0xcddb, 0x001a, 0x001a, 0xcedd, 0x001a, 0xc3e7, 0x001a, 0xccec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf9, 0x001a, 0x001a, 0x001a, 0xcccb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce0, 0xa8d4, 0x001a, 0xd3ed, 0xefd8, 0x001a, 0xd7f2, 0x001a, 0xf8ca, 0xefda, 0x001a, 0x001a, 0xd4d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd9, 0x001a, 0x001a, 0x001a, 0xeed8, 0x001a, 0xc1f2, 0x001a, 0x001a, 0x001a, 0xd3df, 0x001a, 0x001a, 0x001a, 0xf0da, 0x001a, 0xeae2, 0x001a, 0x001a, 0xfde0, 0x001a, 0x001a, 0xf8d8, 0x001a, 0x001a, 0x001a, 0xaff7, 0xb6da, 0x001a, 0xd7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8f2, 0x001a, 0xf9d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdffa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefcf, 0xc2d9, 0x001a, 0xd2f0, 0x001a, 0xd1e4, 0x001a, 0x001a, 0x001a, 0xb7f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e2, 0x001a, 0xbdd4, 0x001a, 0x001a, 0xced9, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2cd, 0xdae7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaddc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe2, 0xfcd6, 0x001a, 0x001a, 0xf9ca, 0x001a, 0x001a, 0xdad4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7f4, 0xa1cc, 0x001a, 0x001a, 0xbacf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8f5, 0x001a, 0x001a, 0x001a, 0xc3d9, 0xe8d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e3, 0xf8eb, 0x001a, 0xb1f2, 0x001a, 0x001a, 0x001a, 0xbbcf, 0x001a, 0x001a, 0x001a, 0xadd3, 0xe1e8, 0xecce, 0x001a, 0x001a, 0x001a, 0xb4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f2, 0xf6f3, 0xdbf6, 0x001a, 0x001a, 0x001a, 0x001a, 0xfed7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff8, 0x001a, 0xf2f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcd7, 0xe3cc, 0x001a, 0x001a, 0xdbe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdddd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedef, 0x001a, 0x001a, 0x001a, 0x001a, 0xded6, 0xf4e4, 0xefe1, 0x001a, 0x001a, 0xf8dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5ca, 0x001a, 0x001a, 0x001a, 0xa1dc, 0x001a, 0xb5e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacfc, 0xadfc, 0xa7d8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8ed, 0x001a, 0x001a, 0x001a, 0xb6db, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d6, 0xaff3, 0x001a, 0x001a, 0xa5cd, 0x001a, 0xf1da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d8, 0x001a, 0x001a, 0x001a, 0xe4cc, 0x001a, 0x001a, 0xb4d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd5, 0xf8d5, 0xf3da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e3, 0x001a, 0x001a, 0x001a, 0xe4de, 0x001a, 0xe5de, 0xb5d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d1, 0xb7d1, 0xb3f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3f0, 0xb4f2, 0x001a, 0x001a, 0xd4f0, 0xe4cb, 0xd4fb, 0xe6f5, 0xeae3, 0x001a, 0xe6de, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4df, 0x001a, 0x001a, 0xf9f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xaef0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d1, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfd6, 0x001a, 0xd7d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1fc, 0xeeef, 0xd8dc, 0x001a, 0xdfe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde5, 0xfbfd, 0x001a, 0x001a, 0xc9e0, 0x001a, 0x001a, 0x001a, 0xc9d6, 0x001a, 0x001a, 0xaad4, 0x001a, 0xcce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e9, 0x001a, 0x001a, 0x001a, 0xd8d0, 0xa2fc, 0xbed4, 0xb3e2, 0xe7de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcdc, 0xb6d2, 0xd5f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ce, 0xa9f5, 0x001a, 0x001a, 0xf9dd, 0x001a, 0x001a, 0xfadd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff6, 0x001a, 0xdaf2, 0xebe4, 0x001a, 0xf1f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ec, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcfd, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae1, 0x001a, 0x001a, 0xd9ca, 0x001a, 0x001a, 0xefef, 0x001a, 0xaaf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9ec, 0x001a, 0x001a, 0xadf8, 0x001a, 0xc2f2, 0xc3f6, 0x001a, 0xd2d7, 0x001a, 0x001a, 0xa2f9, 0xd6f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf0, 0x001a, 0x001a, 0xe0f6, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e9, 0xc3f2, 0x001a, 0x001a, 0x001a, 0xabd4, 0xb3ca, 0xa6cd, 0x001a, 0xc3cd, 0xdacd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd9, 0x001a, 0x001a, 0xc4f6, 0x001a, 0x001a, 0x001a, 0xddee, 0xc4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2df, 0xdbe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e8, 0x001a, 0xaefc, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde5, 0x001a, 0x001a, 0x001a, 0xebfa, 0x001a, 0xbccf, 0x001a, 0x001a, 0xe2cf, 0xf6cd, 0x001a, 0x001a, 0xf0ef, 0x001a, 0xbef4, 0x001a, 0xcdd4, 0x001a, 0x001a, 0xb8f3, 0x001a, 0x001a, 0x001a, 0xa1e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2f2, 0xebf3, 0x001a, 0xd7f0, 0x001a, 0x001a, 0xd7cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e8, 0xc1e8, 0x001a, 0x001a, 0x001a, 0xe3cf, 0xa2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1f3, 0xabd0, 0x001a, 0xe4d4, 0x001a, 0x001a, 0xbcef, 0xa1d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfd9, 0x001a, 0xd7f3, 0x001a, 0x001a, 0x001a, 0xbddc, 0x001a, 0xe5cc, 0xf1ed, 0x001a, 0x001a, 0xe2f1, 0x001a, 0xdbd4, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5e2, 0x001a, 0x001a, 0xe6ca, 0x001a, 0xaed3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6cc, 0x001a, 0x001a, 0xd3f1, 0xe7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeefb, 0x001a, 0xc5e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9df, 0x001a, 0xdeee, 0x001a, 0x001a, 0xc2f7, 0x001a, 0xa2d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff0, 0xbdd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6f9, 0x001a, 0x001a, 0xf5d4, 0x001a, 0xc9d0, 0xa7ef, 0xece2, 0x001a, 0xeadb, 0xccce, 0xe8f5, 0xd5f7, 0x001a, 0xcdd3, 0x001a, 0xfef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee0, 0x001a, 0xfbdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdcb, 0x001a, 0x001a, 0x001a, 0xa8ef, 0x001a, 0x001a, 0x001a, 0xb4ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8da, 0xb9d1, 0x001a, 0xa9df, 0x001a, 0x001a, 0xb0f3, 0x001a, 0x001a, 0xc4cc, 0x001a, 0x001a, 0x001a, 0xb7ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9ef, 0x001a, 0x001a, 0x001a, 0xd5df, 0x001a, 0x001a, 0xd7ed, 0x001a, 0x001a, 0x001a, 0xc6ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdef, 0xd6fc, 0x001a, 0x001a, 0xf4db, 0x001a, 0xaaef, 0xb9f8, 0x001a, 0xe9f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e1, 0x001a, 0x001a, 0x001a, 0xbfd4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafd3, 0x001a, 0x001a, 0xdbca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7fc, 0x001a, 0x001a, 0xd8ed, 0xc7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8f4, 0xb3d6, 0xaddd, 0x001a, 0x001a, 0x001a, 0xbed5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3f1, 0xdfee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebd6, 0x001a, 0x001a, 0x001a, 0xd9f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d8, 0x001a, 0x001a, 0xd9da, 0x001a, 0xd8f0, 0xc4ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4f1, 0x001a, 0xf2ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbd5, 0x001a, 0x001a, 0xdcd5, 0xc4f3, 0xd7cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0dd, 0xd9f0, 0xb3cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7cd, 0x001a, 0x001a, 0xacd0, 0x001a, 0xbad1, 0x001a, 0xc4f1, 0x001a, 0xb3e5, 0xf5fb, 0xe1e9, 0xe0fd, 0xbcfc, 0x001a, 0xa2da, 0xa3da, 0x001a, 0xa1d2, 0x001a, 0x001a, 0xefd2, 0x001a, 0x001a, 0x001a, 0xede2, 0x001a, 0x001a, 0xe9de, 0xdcce, 0xb5f2, 0xe4d0, 0xd1dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e1, 0xb7db, 0xe3df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ed, 0xc5f1, 0x001a, 0xcff3, 0xabd7, 0xace1, 0x001a, 0x001a, 0xebe3, 0x001a, 0xc7ee, 0x001a, 0x001a, 0x001a, 0xc9e1, 0xfaca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf0, 0xe1fa, 0xdaf0, 0xe7cc, 0xf4da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedce, 0x001a, 0x001a, 0xa9d5, 0xe2fa, 0x001a, 0x001a, 0x001a, 0xe5d0, 0x001a, 0xd6eb, 0x001a, 0xdfec, 0x001a, 0x001a, 0x001a, 0xfcdf, 0x001a, 0x001a, 0xd6f7, 0xeade, 0xb4cb, 0x001a, 0x001a, 0xbeef, 0x001a, 0x001a, 0xb5cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2ef, 0xb7e2, 0x001a, 0x001a, 0x001a, 0xe8cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcf0, 0x001a, 0x001a, 0x001a, 0xe0d6, 0x001a, 0xc6f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e2, 0xabeb, 0x001a, 0x001a, 0x001a, 0xb5cb, 0xd1d8, 0x001a, 0xcef4, 0xf7f3, 0x001a, 0x001a, 0xc6d7, 0x001a, 0xbbd1, 0xaaf7, 0x001a, 0xcaed, 0xd3d7, 0xfad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f6, 0x001a, 0x001a, 0xccd1, 0xfcdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfddf, 0x001a, 0xe5f9, 0x001a, 0xcae0, 0x001a, 0x001a, 0xfdf2, 0xb0d3, 0x001a, 0xf3f4, 0xc9da, 0x001a, 0xdee6, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaf8, 0xd0e8, 0x001a, 0x001a, 0xfbd8, 0x001a, 0x001a, 0xd5ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf2, 0xfce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdada, 0x001a, 0xdcf2, 0xd6fb, 0xb2e9, 0x001a, 0xadee, 0x001a, 0xe3fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeedc, 0x001a, 0x001a, 0xeaf5, 0xe0e6, 0x001a, 0xfdf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f5, 0xe0ee, 0x001a, 0x001a, 0xe5db, 0x001a, 0xdedd, 0x001a, 0x001a, 0xf0d9, 0xa3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9f1, 0x001a, 0xc4f2, 0xcbe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e9, 0x001a, 0x001a, 0xb9e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e3, 0xebfc, 0xa8cd, 0x001a, 0xb6cc, 0x001a, 0x001a, 0xdbf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbae6, 0x001a, 0x001a, 0xa9cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e1, 0x001a, 0x001a, 0xabef, 0x001a, 0x001a, 0x001a, 0xc5e7, 0x001a, 0x001a, 0xe9e0, 0x001a, 0xc5f3, 0x001a, 0x001a, 0xc0d4, 0xbfd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaedd, 0x001a, 0xfcf9, 0x001a, 0xc0cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e5, 0x001a, 0x001a, 0x001a, 0xb8ce, 0x001a, 0x001a, 0x001a, 0xd2d8, 0xd6f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaf1, 0xd1ce, 0x001a, 0x001a, 0xc7f6, 0x001a, 0xebdb, 0x001a, 0xfedf, 0x001a, 0x001a, 0xe1d8, 0x001a, 0xf3f7, 0x001a, 0xe7d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfed4, 0x001a, 0x001a, 0xbcd1, 0x001a, 0xcfe5, 0x001a, 0xb6cb, 0x001a, 0xb8da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed6, 0x001a, 0x001a, 0x001a, 0xbae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8cf, 0x001a, 0x001a, 0x001a, 0xcce0, 0xf9eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8d7, 0xd8cb, 0x001a, 0x001a, 0x001a, 0xe2e9, 0x001a, 0x001a, 0x001a, 0xbae8, 0x001a, 0x001a, 0x001a, 0xc7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdec, 0x001a, 0xceec, 0x001a, 0xbfd6, 0x001a, 0x001a, 0x001a, 0xa7e3, 0x001a, 0xd6df, 0xe8fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1ee, 0xa8f6, 0xfddd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf8, 0x001a, 0xd1e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeece, 0x001a, 0x001a, 0xcfec, 0x001a, 0x001a, 0x001a, 0xa5e9, 0xd5d6, 0x001a, 0xc5cd, 0x001a, 0xbaed, 0xbdd1, 0x001a, 0x001a, 0xbecf, 0x001a, 0x001a, 0xbbec, 0x001a, 0x001a, 0x001a, 0xb1d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9cc, 0x001a, 0xc4d9, 0xfce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcec, 0x001a, 0x001a, 0xade5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f7, 0x001a, 0xeacc, 0x001a, 0x001a, 0x001a, 0xc4d3, 0x001a, 0x001a, 0xc0d6, 0x001a, 0x001a, 0x001a, 0xfdd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e1, 0x001a, 0xbdde, 0x001a, 0xa9f6, 0x001a, 0x001a, 0x001a, 0xa4da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d6, 0xc6f5, 0x001a, 0xa2e1, 0xc6e9, 0x001a, 0x001a, 0x001a, 0xc5f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9f4, 0xecd6, 0xd3eb, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdec, 0xdce2, 0xebde, 0xdcf0, 0x001a, 0xbfeb, 0x001a, 0xced7, 0xbfd1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabf5, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdf9, 0x001a, 0xdcca, 0x001a, 0x001a, 0x001a, 0xc6cd, 0xb6f2, 0x001a, 0x001a, 0xfedd, 0x001a, 0x001a, 0x001a, 0xb7cc, 0xb8db, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d0, 0x001a, 0xddce, 0xc0eb, 0x001a, 0xa2fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6ea, 0xb0f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcedb, 0x001a, 0xc3f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfdb, 0xa4cb, 0x001a, 0x001a, 0xe0f8, 0x001a, 0x001a, 0xd7fb, 0x001a, 0x001a, 0xcaeb, 0xa1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdce, 0x001a, 0x001a, 0xdcd4, 0x001a, 0x001a, 0x001a, 0xd8fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7f2, 0x001a, 0x001a, 0xf6fa, 0xaaf6, 0xf7fa, 0xe6d8, 0x001a, 0xb1f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e8, 0x001a, 0xc5ca, 0xebcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe2, 0x001a, 0xadf7, 0x001a, 0x001a, 0x001a, 0xe1f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfde4, 0x001a, 0x001a, 0xece3, 0x001a, 0xafdd, 0xb0dd, 0x001a, 0x001a, 0xb7cb, 0xd3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e1, 0xe0d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e9, 0xf2cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3ed, 0xd9dc, 0xcde0, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf7, 0xb9db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaecc, 0x001a, 0xdbda, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1dd, 0x001a, 0xafd8, 0xa3e3, 0x001a, 0x001a, 0xefce, 0x001a, 0x001a, 0xf3f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee0, 0x001a, 0xfdf5, 0x001a, 0x001a, 0x001a, 0x001a, 0xeceb, 0x001a, 0x001a, 0xc5d3, 0xecfc, 0xdbd2, 0xebd4, 0x001a, 0xa2de, 0x001a, 0x001a, 0x001a, 0xe6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ed, 0x001a, 0x001a, 0x001a, 0xede3, 0x001a, 0xc2e8, 0x001a, 0xf5ed, 0xfcd7, 0x001a, 0xbbed, 0x001a, 0x001a, 0xabf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8f2, 0xc8f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6d3, 0xddf2, 0xbfcf, 0x001a, 0xaceb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0cf, 0x001a, 0xa8e6, 0xe9fd, 0x001a, 0xc1cf, 0x001a, 0xdfe0, 0xecde, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbff4, 0xefe2, 0x001a, 0xf1d9, 0xc7f1, 0x001a, 0xb8cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef9, 0xbadb, 0xf5da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf6, 0xdcda, 0xe4fa, 0x001a, 0xcfe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e6, 0x001a, 0xf3ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaeb, 0x001a, 0xe6f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddca, 0xded5, 0x001a, 0xdeca, 0xe4df, 0x001a, 0x001a, 0x001a, 0xfde6, 0x001a, 0xacf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e9, 0x001a, 0xcbed, 0xe4cf, 0x001a, 0x001a, 0x001a, 0xd3d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3dd, 0xecd4, 0x001a, 0x001a, 0xb9f2, 0x001a, 0xb7df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcecb, 0xd8fb, 0x001a, 0x001a, 0xd9d0, 0x001a, 0x001a, 0xd2dd, 0xf4f7, 0xdce7, 0xa5e4, 0x001a, 0xa3fc, 0x001a, 0xbbdb, 0x001a, 0x001a, 0x001a, 0xbaf2, 0xfde9, 0xcad0, 0x001a, 0xd6f5, 0xc5d9, 0xb4e4, 0x001a, 0xa7ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdea, 0xfee6, 0x001a, 0xc4f7, 0xadf5, 0x001a, 0xe0d9, 0x001a, 0x001a, 0x001a, 0xb4ca, 0x001a, 0x001a, 0xe2f8, 0xc2cf, 0x001a, 0xbeec, 0x001a, 0x001a, 0x001a, 0xb4e5, 0xc8cd, 0xc8ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9cd, 0xb7f9, 0x001a, 0x001a, 0xe8f1, 0xf2d9, 0xf5db, 0xb5ca, 0xc6d9, 0x001a, 0x001a, 0x001a, 0xc9d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabd9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbced, 0x001a, 0x001a, 0xd4d8, 0x001a, 0x001a, 0x001a, 0xdadc, 0x001a, 0xbce2, 0x001a, 0x001a, 0xedfc, 0xe0ec, 0xfed2, 0x001a, 0xc7e9, 0xaae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbfa, 0x001a, 0xaef5, 0xaafb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbec, 0x001a, 0xbfec, 0xd8fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5d4, 0x001a, 0x001a, 0x001a, 0xc3f9, 0x001a, 0x001a, 0x001a, 0xe2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d7, 0xf6ed, 0x001a, 0x001a, 0x001a, 0xedde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeccc, 0x001a, 0xeee3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e8, 0x001a, 0x001a, 0x001a, 0xf8fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4dd, 0xb5e4, 0xb0d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5d8, 0x001a, 0x001a, 0x001a, 0xeaf4, 0x001a, 0x001a, 0x001a, 0xb9ce, 0x001a, 0x001a, 0x001a, 0xe1d6, 0xd2cf, 0x001a, 0xb6d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2ce, 0x001a, 0x001a, 0xeef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccdc, 0x001a, 0xcbd0, 0x001a, 0x001a, 0x001a, 0xa4fc, 0xcacd, 0xd4d7, 0xa3de, 0x001a, 0xe0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9ee, 0x001a, 0x001a, 0x001a, 0xdde2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef5, 0xacd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1d5, 0x001a, 0xf0d8, 0xc3f8, 0xd7ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7f5, 0x001a, 0x001a, 0xbfd8, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadeb, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaee, 0x001a, 0x001a, 0x001a, 0xe7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f8, 0x001a, 0xddd4, 0x001a, 0x001a, 0xd8ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9fb, 0xf7ed, 0x001a, 0x001a, 0xb5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd0, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde2, 0x001a, 0x001a, 0x001a, 0xc8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5d9, 0x001a, 0x001a, 0xaadf, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf1, 0x001a, 0x001a, 0xb6e5, 0xeff3, 0x001a, 0x001a, 0xdafb, 0xe0e1, 0x001a, 0xacd9, 0x001a, 0xebf5, 0x001a, 0xb6e0, 0x001a, 0x001a, 0xc8e9, 0x001a, 0xcfcb, 0x001a, 0xc9e3, 0x001a, 0x001a, 0x001a, 0xeede, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefdc, 0x001a, 0xa5d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfed6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d9, 0x001a, 0xc0d8, 0xdbdc, 0x001a, 0x001a, 0xbded, 0xb8df, 0x001a, 0xa5ea, 0x001a, 0x001a, 0x001a, 0xadd7, 0x001a, 0x001a, 0xf9f3, 0x001a, 0xf8ed, 0x001a, 0xc7f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae1, 0xe3eb, 0x001a, 0xdef2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccf8, 0x001a, 0xd9ea, 0x001a, 0xc6d3, 0x001a, 0xe6db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff5, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xfee9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2cf, 0xb9f7, 0xf3d9, 0x001a, 0x001a, 0xcbe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddda, 0x001a, 0x001a, 0xb9da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbeb, 0x001a, 0xb9cb, 0x001a, 0x001a, 0xf9ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0f4, 0x001a, 0xbcfd, 0xb1df, 0xefe3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e0, 0xb9fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbeed, 0x001a, 0x001a, 0x001a, 0xc0d5, 0xf0e3, 0xfaed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedd5, 0xdde7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d4, 0xb7e5, 0x001a, 0x001a, 0x001a, 0xe7db, 0xbfe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbee, 0x001a, 0x001a, 0xf4d7, 0xddf0, 0x001a, 0x001a, 0x001a, 0xabce, 0x001a, 0x001a, 0xdee7, 0x001a, 0x001a, 0x001a, 0xd6d6, 0xcce1, 0x001a, 0x001a, 0xb3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee5, 0xa2dc, 0x001a, 0x001a, 0xd0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbfb, 0x001a, 0xcbf9, 0x001a, 0x001a, 0x001a, 0xf3cb, 0xa5f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8fa, 0xd7d6, 0x001a, 0xe5e9, 0xdcfb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5da, 0x001a, 0xbddb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7cd, 0xdef0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefde, 0x001a, 0x001a, 0x001a, 0xb1d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeefc, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e8, 0x001a, 0xc8f1, 0x001a, 0x001a, 0x001a, 0xf1ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e4, 0x001a, 0xb9f5, 0x001a, 0xf0dc, 0xf1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbf2, 0x001a, 0xa4de, 0x001a, 0xccda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae3, 0x001a, 0xd9fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4f9, 0x001a, 0xa4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddfb, 0x001a, 0xcaef, 0x001a, 0xc4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd9, 0x001a, 0x001a, 0xabfb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e0, 0x001a, 0x001a, 0xa8e9, 0x001a, 0x001a, 0xf9f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaffa, 0x001a, 0xfceb, 0x001a, 0x001a, 0xeae0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5d5, 0x001a, 0x001a, 0xe3f1, 0xeed5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcccd, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d8, 0x001a, 0x001a, 0x001a, 0x001a, 0xecfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebf1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcfa, 0xe2e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5fa, 0xfae2, 0x001a, 0x001a, 0x001a, 0xb6ca, 0x001a, 0xb7e4, 0x001a, 0xdbea, 0x001a, 0xfaf5, 0x001a, 0x001a, 0x001a, 0xacfb, 0xc3cf, 0xfdeb, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf8, 0x001a, 0x001a, 0xb9df, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e1, 0x001a, 0xa4d2, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad0, 0xdbd0, 0x001a, 0xbeea, 0xb1d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7ca, 0x001a, 0x001a, 0xe7d3, 0x001a, 0xe5f8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2d3, 0x001a, 0x001a, 0x001a, 0xc0e2, 0xdff2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeee, 0xaed6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e7, 0xaeeb, 0x001a, 0x001a, 0x001a, 0xd9cf, 0x001a, 0x001a, 0xcddc, 0xfbed, 0x001a, 0xf0de, 0x001a, 0xebd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7df, 0xd0db, 0xd1db, 0x001a, 0x001a, 0xa3d5, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8ca, 0x001a, 0xe6f8, 0xcedc, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcea, 0xd2db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e3, 0x001a, 0xaed7, 0x001a, 0x001a, 0xe1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbacb, 0x001a, 0x001a, 0xd1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcd0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e0, 0x001a, 0xa9e9, 0x001a, 0xc7d3, 0x001a, 0x001a, 0xdddc, 0xaef8, 0x001a, 0x001a, 0x001a, 0xb8cc, 0x001a, 0x001a, 0x001a, 0xaed0, 0x001a, 0x001a, 0x001a, 0xf2d8, 0x001a, 0x001a, 0xcae3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadd4, 0xd1f6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ca, 0x001a, 0x001a, 0xc2d5, 0x001a, 0x001a, 0xbace, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8df, 0x001a, 0x001a, 0x001a, 0xbaf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe5, 0x001a, 0xf4ef, 0xb5dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xaacd, 0x001a, 0xf2e3, 0x001a, 0xf7fb, 0x001a, 0xd0f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xbafd, 0x001a, 0x001a, 0xe1fd, 0xfef6, 0xc0d1, 0x001a, 0x001a, 0xc5e8, 0x001a, 0xb8e4, 0x001a, 0xe8e1, 0x001a, 0x001a, 0x001a, 0xc1cc, 0x001a, 0xedd2, 0x001a, 0x001a, 0x001a, 0x001a, 0xbedb, 0x001a, 0x001a, 0xe2e0, 0x001a, 0x001a, 0x001a, 0xc9fa, 0x001a, 0x001a, 0xcde1, 0x001a, 0xb8ca, 0x001a, 0x001a, 0x001a, 0xe0f2, 0xc9f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1de, 0x001a, 0x001a, 0x001a, 0xdff0, 0xc4f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xccee, 0x001a, 0x001a, 0xf2de, 0x001a, 0xc9e7, 0x001a, 0xf3e2, 0xe1e7, 0x001a, 0x001a, 0xcbe3, 0x001a, 0x001a, 0xcce3, 0x001a, 0x001a, 0x001a, 0xf8cf, 0xacef, 0x001a, 0xfefd, 0xa5fc, 0xb1fa, 0xd9df, 0x001a, 0xd2e0, 0x001a, 0x001a, 0x001a, 0xdaf4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf1, 0x001a, 0xa3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcf2, 0xe3ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e0, 0x001a, 0xabf7, 0x001a, 0x001a, 0xafeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee5, 0x001a, 0xa4e1, 0xabcd, 0x001a, 0xf4d9, 0xa6e8, 0xcecd, 0xe9e1, 0x001a, 0xeffc, 0x001a, 0xe3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e2, 0x001a, 0xa4ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6de, 0x001a, 0x001a, 0xfeeb, 0x001a, 0xddeb, 0xe0f0, 0x001a, 0x001a, 0xdbf4, 0x001a, 0xf4e2, 0x001a, 0x001a, 0xc8d3, 0x001a, 0x001a, 0x001a, 0xebf4, 0x001a, 0xb5ee, 0x001a, 0xd8f5, 0x001a, 0x001a, 0xdfd5, 0x001a, 0x001a, 0x001a, 0xe5d6, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0eb, 0xe3f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4f4, 0xb2fa, 0x001a, 0x001a, 0xf5ef, 0xdfca, 0x001a, 0xb1eb, 0xbfed, 0x001a, 0x001a, 0xc9fd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e4, 0xa4f9, 0xb3f0, 0x001a, 0xece5, 0x001a, 0x001a, 0x001a, 0xe7d1, 0x001a, 0xc7d9, 0xd7e4, 0xddea, 0x001a, 0xf7d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbada, 0x001a, 0xcdda, 0x001a, 0x001a, 0x001a, 0xccf9, 0x001a, 0xdae1, 0xbfdb, 0x001a, 0xc5cc, 0xd0ec, 0xbbcb, 0x001a, 0xf3de, 0x001a, 0x001a, 0xaae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d9, 0x001a, 0x001a, 0xe3ee, 0xbdd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2fd, 0xc1d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe3, 0x001a, 0xc9d3, 0x001a, 0xcfdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7de, 0x001a, 0x001a, 0xbbe6, 0xa1ec, 0x001a, 0x001a, 0x001a, 0xb9cc, 0x001a, 0x001a, 0xdefb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e7, 0x001a, 0x001a, 0xc1d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e2, 0x001a, 0xd8f3, 0xd3e5, 0x001a, 0x001a, 0xd9f3, 0x001a, 0x001a, 0x001a, 0xc6f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaccd, 0x001a, 0xc3fc, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d4, 0x001a, 0xc2d1, 0x001a, 0xa5f9, 0x001a, 0xd5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee3, 0x001a, 0x001a, 0x001a, 0x001a, 0xcad4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdadf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdffb, 0xe3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf8, 0xcfe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7d8, 0x001a, 0xc9d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff8, 0xf6ef, 0x001a, 0xb6dd, 0xafee, 0xf8cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8de, 0xa7fc, 0xfcf7, 0xb1f7, 0xbbce, 0xa1f4, 0x001a, 0x001a, 0xcdee, 0xaee1, 0x001a, 0x001a, 0xc3ec, 0xfecf, 0x001a, 0xbff8, 0xe2d8, 0xe8d3, 0x001a, 0x001a, 0xa8de, 0xe4f4, 0xc2ec, 0x001a, 0xf5d9, 0xc5f9, 0xd3dd, 0xf1d6, 0xfcec, 0xf0fc, 0x001a, 0x001a, 0xc0ed, 0xb9ca, 0x001a, 0xe4ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f2, 0x001a, 0xb9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2d6, 0x001a, 0xf4de, 0x001a, 0xdbdf, 0x001a, 0xd3db, 0x001a, 0xe7fa, 0xe3d8, 0xc1f4, 0x001a, 0xb7dd, 0x001a, 0x001a, 0x001a, 0xf5f2, 0x001a, 0x001a, 0xaed4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8dd, 0xc5cf, 0xdfdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef2, 0xa1f6, 0x001a, 0xcbeb, 0xfcf1, 0x001a, 0xc7f3, 0x001a, 0x001a, 0xebe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfced, 0x001a, 0x001a, 0xdbe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5ee, 0x001a, 0xf5de, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3fa, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbf1, 0x001a, 0x001a, 0xafd0, 0xb9dd, 0x001a, 0x001a, 0xc3d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacf6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbadd, 0x001a, 0x001a, 0x001a, 0xbff2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f7, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2db, 0xf6f2, 0x001a, 0x001a, 0xbaca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f7, 0x001a, 0xe5cb, 0x001a, 0x001a, 0x001a, 0xe6ee, 0x001a, 0xd3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d6, 0x001a, 0x001a, 0x001a, 0xafd4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xced3, 0xc2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2eb, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3eb, 0x001a, 0xb4f0, 0x001a, 0x001a, 0xf4cb, 0xb0d4, 0xb2f3, 0xb7fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ee, 0xb2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf5, 0x001a, 0xf3cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xceee, 0x001a, 0x001a, 0xccf1, 0x001a, 0x001a, 0xb8e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5d7, 0xf3e3, 0xe5cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3f3, 0xd8e4, 0xf9cf, 0xdacf, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdfa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeef5, 0x001a, 0x001a, 0xbbca, 0x001a, 0x001a, 0xdce3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2ce, 0x001a, 0xd9d6, 0x001a, 0x001a, 0x001a, 0xb0ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f4, 0xc2d8, 0xd0dc, 0xeecc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0d5, 0xcaf6, 0xcafd, 0xd6d8, 0xcff4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6d6, 0xbedc, 0x001a, 0xd4db, 0xc7d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xfef2, 0x001a, 0x001a, 0x001a, 0xcdf1, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e2, 0xdedc, 0x001a, 0xdfdc, 0x001a, 0x001a, 0xadef, 0xabe6, 0x001a, 0x001a, 0x001a, 0x001a, 0xddf9, 0xbfea, 0x001a, 0x001a, 0x001a, 0xaeef, 0x001a, 0x001a, 0x001a, 0xd0f4, 0xf3ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace6, 0x001a, 0xdece, 0x001a, 0x001a, 0xf9d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e3, 0xd0cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d5, 0x001a, 0x001a, 0xfdf7, 0x001a, 0xa9dc, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6de, 0x001a, 0xaadc, 0xe3f2, 0xb4e9, 0xdcd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e9, 0x001a, 0x001a, 0xf6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae7, 0x001a, 0x001a, 0xced0, 0x001a, 0x001a, 0xf7da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcca, 0x001a, 0x001a, 0x001a, 0xe8ee, 0xdeda, 0x001a, 0xf7f2, 0x001a, 0x001a, 0xfbe2, 0x001a, 0xa6cc, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbda, 0x001a, 0xe9ee, 0x001a, 0x001a, 0x001a, 0xdaf5, 0x001a, 0x001a, 0xdcf7, 0xeae1, 0xc1ce, 0xb1d4, 0x001a, 0xb1fd, 0xbde6, 0x001a, 0xadfb, 0x001a, 0x001a, 0xe7f8, 0x001a, 0xcee1, 0x001a, 0xe2f7, 0xeff5, 0xc7cf, 0x001a, 0x001a, 0xb2d4, 0xefcc, 0x001a, 0xe8d4, 0x001a, 0xcfee, 0xd7f7, 0x001a, 0x001a, 0xa6e0, 0xc1d6, 0xdce1, 0xe3f0, 0xe4f1, 0xf1dc, 0xa7d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5f4, 0x001a, 0x001a, 0xcef1, 0xe4f2, 0x001a, 0x001a, 0xb0d0, 0x001a, 0x001a, 0xefec, 0x001a, 0x001a, 0x001a, 0xbaf9, 0x001a, 0xb5eb, 0x001a, 0x001a, 0xedd4, 0xc4e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e9, 0x001a, 0x001a, 0xb4eb, 0xa1ea, 0x001a, 0xbcf8, 0xa6ce, 0x001a, 0xc6f9, 0xdafc, 0x001a, 0xb3d4, 0xb9d3, 0xdeea, 0x001a, 0x001a, 0x001a, 0xabe9, 0x001a, 0x001a, 0xe1e1, 0xcfd3, 0xf6f4, 0x001a, 0xc0ea, 0xcfe1, 0x001a, 0xbacc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaee, 0x001a, 0x001a, 0x001a, 0xe4f0, 0xb4f3, 0xeed4, 0x001a, 0x001a, 0xc0f2, 0x001a, 0x001a, 0xe5f1, 0x001a, 0xc3f4, 0xd4e0, 0x001a, 0xb6eb, 0x001a, 0xa1d7, 0xe8cb, 0x001a, 0xadf9, 0xade9, 0xe4d8, 0xb3fa, 0xc5e2, 0xbdfc, 0x001a, 0x001a, 0xc4ec, 0xb1d8, 0x001a, 0xabdc, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4d5, 0x001a, 0xe9eb, 0x001a, 0x001a, 0x001a, 0xbbe8, 0x001a, 0x001a, 0x001a, 0xd7d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaefb, 0xe1d1, 0x001a, 0x001a, 0xc0db, 0x001a, 0xbef5, 0x001a, 0xf7de, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbca, 0xc6f7, 0xc8cf, 0x001a, 0x001a, 0x001a, 0xd0e1, 0x001a, 0x001a, 0xd0ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdd5, 0x001a, 0x001a, 0xdbcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbdd, 0x001a, 0x001a, 0x001a, 0x001a, 0xacce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf5, 0x001a, 0x001a, 0xc1fa, 0x001a, 0x001a, 0x001a, 0xa9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7ef, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7eb, 0xf8ef, 0xdcf5, 0xcced, 0xd5db, 0xcff1, 0x001a, 0x001a, 0x001a, 0xd0f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaed9, 0xacd5, 0x001a, 0xc6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3fd, 0x001a, 0xe5fb, 0xabdf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e2, 0x001a, 0xadf6, 0x001a, 0xb3f5, 0x001a, 0xb5f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddf5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2ec, 0xfded, 0x001a, 0xb4f5, 0xb8fb, 0x001a, 0xa3db, 0x001a, 0x001a, 0xcad6, 0xd9cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaf3, 0x001a, 0xb8eb, 0x001a, 0xb7e0, 0xecd7, 0xecf1, 0xafe5, 0xe1d5, 0xedd7, 0xd1d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e1, 0xf9ef, 0x001a, 0x001a, 0x001a, 0xbcdd, 0xdcf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5f0, 0x001a, 0x001a, 0x001a, 0xc4f4, 0x001a, 0x001a, 0xe9e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd4, 0x001a, 0x001a, 0xa2cc, 0xfef7, 0xbcdf, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xade8, 0x001a, 0x001a, 0x001a, 0x001a, 0xafef, 0xa5cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9cb, 0x001a, 0x001a, 0x001a, 0xe8fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6cc, 0x001a, 0x001a, 0x001a, 0xe7e6, 0x001a, 0x001a, 0xc7ea, 0x001a, 0x001a, 0x001a, 0xa4db, 0x001a, 0xc9cf, 0xfce2, 0xfaef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdeeb, 0x001a, 0x001a, 0xc8f5, 0x001a, 0xded4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e0, 0x001a, 0xb0ef, 0x001a, 0x001a, 0xc7e2, 0x001a, 0xafd9, 0x001a, 0x001a, 0x001a, 0xe7f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e7, 0x001a, 0x001a, 0xcacf, 0xd1e1, 0x001a, 0xc8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbef, 0x001a, 0x001a, 0xf9fa, 0x001a, 0x001a, 0xf2dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeacb, 0x001a, 0x001a, 0x001a, 0xbccb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdef5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdff5, 0x001a, 0xb6ee, 0x001a, 0x001a, 0x001a, 0xf6e2, 0xcad3, 0xfcef, 0xc4d1, 0xb1ef, 0x001a, 0xc5d1, 0x001a, 0xded0, 0x001a, 0xe1d9, 0x001a, 0x001a, 0xb8e0, 0x001a, 0x001a, 0xd1cd, 0xb9f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcce7, 0x001a, 0xa8d6, 0xa7ce, 0x001a, 0xb5d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddf6, 0x001a, 0xa3f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae9, 0x001a, 0xf0e1, 0x001a, 0x001a, 0x001a, 0xe0f5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaffb, 0x001a, 0x001a, 0x001a, 0xd1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0fb, 0xe5f2, 0x001a, 0x001a, 0xf0ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe9, 0x001a, 0x001a, 0xf0cc, 0x001a, 0x001a, 0xafd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f4, 0x001a, 0x001a, 0xa1f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcca, 0xfdca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcece, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8f3, 0x001a, 0xbaf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6da, 0x001a, 0x001a, 0xece0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf8, 0x001a, 0xd2cb, 0x001a, 0x001a, 0x001a, 0xceeb, 0x001a, 0xd8f9, 0xd9f9, 0xe0ca, 0xcada, 0x001a, 0x001a, 0x001a, 0xa6cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ca, 0xeef9, 0xecdb, 0x001a, 0x001a, 0xb1d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd5, 0x001a, 0x001a, 0x001a, 0xf3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e7, 0xd9e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e4, 0x001a, 0x001a, 0xc4fc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeff9, 0xf4cf, 0xe6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcce, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5f4, 0xa3dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbddd, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f8, 0x001a, 0x001a, 0x001a, 0xd6e8, 0x001a, 0x001a, 0x001a, 0xc1db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6f0, 0x001a, 0x001a, 0x001a, 0xb9e4, 0xedf6, 0x001a, 0xaef9, 0x001a, 0xbedd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0d7, 0xe8d8, 0xbdcb, 0x001a, 0x001a, 0xdaf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcef8, 0xf0f9, 0xede0, 0xb3e3, 0xb3f4, 0x001a, 0x001a, 0xc2ea, 0xe6f2, 0xb6f0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4eb, 0x001a, 0x001a, 0xe7f2, 0x001a, 0xd5d7, 0xb6d4, 0xe8f9, 0xc1d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae9, 0xccd7, 0x001a, 0x001a, 0x001a, 0xe9d3, 0xc9e2, 0x001a, 0xdbfc, 0xadcd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0cc, 0xa2ea, 0x001a, 0x001a, 0xf6e4, 0xc0d0, 0x001a, 0xb7f0, 0xa1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d7, 0x001a, 0x001a, 0x001a, 0xcae2, 0xcbe2, 0x001a, 0xcffa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfeb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbd6, 0x001a, 0x001a, 0x001a, 0xb4f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xcded, 0xd2e4, 0x001a, 0x001a, 0xa9ea, 0xbae4, 0xa2f3, 0xd2cd, 0x001a, 0xcbf6, 0x001a, 0xe6f1, 0xc1ed, 0xbce8, 0xd1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f0, 0xcce2, 0x001a, 0x001a, 0xaae4, 0x001a, 0xe1f5, 0xdaed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed7, 0xf1d1, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe9, 0xece9, 0xe4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7da, 0xd4dd, 0x001a, 0xa3ea, 0x001a, 0x001a, 0x001a, 0xc3d6, 0xf4d6, 0x001a, 0xdfda, 0x001a, 0xb3ef, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdef, 0xe8f2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5ef, 0x001a, 0xe7e7, 0x001a, 0x001a, 0xfdd7, 0x001a, 0x001a, 0xcee7, 0x001a, 0x001a, 0xdcdf, 0x001a, 0xc7f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacdf, 0x001a, 0xdad6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4dc, 0x001a, 0x001a, 0x001a, 0xb8f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfad5, 0x001a, 0xf7e4, 0x001a, 0x001a, 0x001a, 0xc4d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f0, 0x001a, 0xaade, 0x001a, 0x001a, 0xbcda, 0xfcd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4fa, 0x001a, 0x001a, 0x001a, 0xe5ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8fc, 0x001a, 0x001a, 0xe6ec, 0x001a, 0x001a, 0xcbd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9fb, 0x001a, 0xd3e4, 0x001a, 0xf9cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaca, 0x001a, 0x001a, 0xd4cf, 0x001a, 0xbdf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5eb, 0x001a, 0x001a, 0xd2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4ea, 0x001a, 0x001a, 0x001a, 0xc2fa, 0xe1fb, 0xedfa, 0xa2f0, 0xf1cc, 0x001a, 0xa3fa, 0xf7e2, 0x001a, 0xcee2, 0x001a, 0xf5e9, 0x001a, 0xebe1, 0x001a, 0x001a, 0x001a, 0xe8e7, 0xd7e8, 0xf8da, 0xcbd4, 0x001a, 0x001a, 0x001a, 0xf6f7, 0xc5d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d4, 0x001a, 0x001a, 0xfafa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2cc, 0xddf7, 0x001a, 0xbade, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9f0, 0xfee4, 0xc9e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e4, 0x001a, 0x001a, 0x001a, 0xc3ea, 0x001a, 0xb4ef, 0x001a, 0x001a, 0x001a, 0xbed7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2fb, 0x001a, 0xd3cd, 0x001a, 0x001a, 0x001a, 0xb5ef, 0x001a, 0x001a, 0x001a, 0xe9fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbddf, 0x001a, 0xc7f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdf8, 0x001a, 0x001a, 0xfcf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabde, 0xe8db, 0x001a, 0x001a, 0xdde3, 0x001a, 0xe2e1, 0xc6d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0f6, 0xe6eb, 0xf9da, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8de, 0xe9f8, 0xdee3, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3fa, 0xd7e5, 0x001a, 0xc8ec, 0x001a, 0x001a, 0x001a, 0xc9f3, 0x001a, 0x001a, 0xbbe4, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6ef, 0x001a, 0xbfdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3d8, 0x001a, 0x001a, 0x001a, 0xcfd0, 0x001a, 0xfacf, 0xcaf3, 0xd7e0, 0x001a, 0x001a, 0x001a, 0xc7d1, 0xaee9, 0x001a, 0xbde8, 0x001a, 0x001a, 0xc4fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe2, 0x001a, 0x001a, 0xc5fa, 0x001a, 0x001a, 0x001a, 0xb8f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0dc, 0x001a, 0x001a, 0xb0fb, 0x001a, 0x001a, 0x001a, 0xa9d8, 0xdfe5, 0xa7f9, 0x001a, 0x001a, 0xeef6, 0x001a, 0xccf6, 0xf8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f1, 0xccd2, 0xcbcf, 0x001a, 0x001a, 0xbdca, 0x001a, 0x001a, 0x001a, 0xbfdd, 0x001a, 0x001a, 0x001a, 0xeff6, 0x001a, 0xf9de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4fa, 0x001a, 0x001a, 0x001a, 0xadd5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7f1, 0x001a, 0xbede, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8d1, 0xc9d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbef8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6cb, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2f5, 0xd3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9d8, 0x001a, 0x001a, 0xfef8, 0x001a, 0xcccf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6ce, 0x001a, 0xd0fa, 0x001a, 0x001a, 0xf3cc, 0xbee6, 0x001a, 0x001a, 0x001a, 0xaef6, 0x001a, 0x001a, 0xf0d5, 0x001a, 0x001a, 0xcad1, 0x001a, 0x001a, 0x001a, 0xbefc, 0xf1d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5fa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e2, 0xf7f4, 0x001a, 0x001a, 0x001a, 0xd4cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2d7, 0x001a, 0x001a, 0xe3f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xdace, 0xebfb, 0xa6db, 0xdedb, 0xe5d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xaad8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ef, 0x001a, 0x001a, 0xeaf8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7ce, 0x001a, 0x001a, 0xd8e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefd7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedf4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6cd, 0x001a, 0x001a, 0x001a, 0xf4cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3f5, 0x001a, 0x001a, 0xcae4, 0x001a, 0xe1dc, 0x001a, 0x001a, 0xc8f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbffc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbecb, 0x001a, 0xaedc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8f0, 0x001a, 0xc0dd, 0x001a, 0xcdcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3dc, 0xb0d9, 0x001a, 0xe9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xece4, 0x001a, 0xe5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8fb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbcc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde4, 0x001a, 0x001a, 0xdccd, 0xf7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xceed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaecd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcecf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaff6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3fd, 0xedeb, 0xdcd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e5, 0x001a, 0x001a, 0x001a, 0xb6d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xddd6, 0x001a, 0x001a, 0x001a, 0xe9f9, 0x001a, 0x001a, 0x001a, 0xa4e7, 0x001a, 0xe3d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbd1, 0xe4d6, 0x001a, 0x001a, 0x001a, 0xf2d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfade, 0x001a, 0xf8d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xead8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5cf, 0xfdd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabd8, 0x001a, 0x001a, 0xcbfd, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcfc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e0, 0xf3d5, 0x001a, 0x001a, 0xd9fd, 0x001a, 0x001a, 0xa3cc, 0x001a, 0x001a, 0x001a, 0xf9d9, 0x001a, 0x001a, 0xead3, 0xf5f5, 0x001a, 0xc7ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdad3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e8, 0xafdc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaf0, 0xb1ee, 0x001a, 0x001a, 0xb2ee, 0x001a, 0x001a, 0x001a, 0xcdf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ee, 0x001a, 0xc6d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e0, 0x001a, 0x001a, 0xbbf3, 0x001a, 0xe1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3d7, 0x001a, 0x001a, 0xc2db, 0x001a, 0x001a, 0x001a, 0x001a, 0xfeca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfcf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0xac00[ 11172 ] = { 0xa1b0, 0xa2b0, 0x4181, 0x4281, 0xa3b0, 0x4381, 0x4481, 0xa4b0, 0xa5b0, 0xa6b0, 0xa7b0, 0x4581, 0x4681, 0x4781, 0x4881, 0x4981, 0xa8b0, 0xa9b0, 0xaab0, 0xabb0, 0xacb0, 0xadb0, 0xaeb0, 0xafb0, 0x4a81, 0xb0b0, 0xb1b0, 0xb2b0, 0xb3b0, 0xb4b0, 0x4b81, 0x4c81, 0xb5b0, 0x4d81, 0x4e81, 0x4f81, 0xb6b0, 0x5081, 0x5181, 0x5281, 0x5381, 0x5481, 0x5581, 0x5681, 0xb7b0, 0xb8b0, 0x5781, 0xb9b0, 0xbab0, 0xbbb0, 0x5881, 0x5981, 0x5a81, 0x6181, 0x6281, 0x6381, 0xbcb0, 0xbdb0, 0x6481, 0x6581, 0xbeb0, 0x6681, 0x6781, 0x6881, 0xbfb0, 0x6981, 0x6a81, 0x6b81, 0x6c81, 0x6d81, 0x6e81, 0x6f81, 0x7081, 0x7181, 0x7281, 0xc0b0, 0x7381, 0xc1b0, 0x7481, 0x7581, 0x7681, 0x7781, 0x7881, 0x7981, 0xc2b0, 0x7a81, 0x8181, 0x8281, 0xc3b0, 0x8381, 0x8481, 0x8581, 0xc4b0, 0x8681, 0x8781, 0x8881, 0x8981, 0x8a81, 0x8b81, 0x8c81, 0x8d81, 0x8e81, 0x8f81, 0x9081, 0x9181, 0x9281, 0x9381, 0x9481, 0x9581, 0x9681, 0x9781, 0x9881, 0xc5b0, 0xc6b0, 0x9981, 0x9a81, 0xc7b0, 0x9b81, 0x9c81, 0xc8b0, 0xc9b0, 0x9d81, 0xcab0, 0x9e81, 0x9f81, 0xa081, 0xa181, 0xa281, 0xcbb0, 0xccb0, 0xa381, 0xcdb0, 0xceb0, 0xcfb0, 0xd0b0, 0xa481, 0xa581, 0xd1b0, 0xd2b0, 0xd3b0, 0xd4b0, 0xa681, 0xa781, 0xa881, 0xd5b0, 0xa981, 0xaa81, 0xab81, 0xd6b0, 0xac81, 0xad81, 0xae81, 0xaf81, 0xb081, 0xb181, 0xb281, 0xd7b0, 0xd8b0, 0xb381, 0xd9b0, 0xdab0, 0xdbb0, 0xb481, 0xb581, 0xb681, 0xb781, 0xb881, 0xb981, 0xdcb0, 0xddb0, 0xdeb0, 0xba81, 0xdfb0, 0xbb81, 0xbc81, 0xe0b0, 0xe1b0, 0xbd81, 0xbe81, 0xbf81, 0xc081, 0xc181, 0xc281, 0xc381, 0xe2b0, 0xe3b0, 0xc481, 0xe4b0, 0xe5b0, 0xe6b0, 0xc581, 0xc681, 0xc781, 0xe7b0, 0xc881, 0xc981, 0xe8b0, 0xca81, 0xcb81, 0xcc81, 0xe9b0, 0xcd81, 0xce81, 0xcf81, 0xeab0, 0xd081, 0xd181, 0xd281, 0xd381, 0xd481, 0xd581, 0xd681, 0xd781, 0xebb0, 0xd881, 0xecb0, 0xd981, 0xda81, 0xdb81, 0xdc81, 0xdd81, 0xde81, 0xdf81, 0xe081, 0xedb0, 0xeeb0, 0xe181, 0xe281, 0xefb0, 0xe381, 0xe481, 0xf0b0, 0xf1b0, 0xe581, 0xf2b0, 0xe681, 0xf3b0, 0xe781, 0xe881, 0xf4b0, 0xf5b0, 0xf6b0, 0xe981, 0xf7b0, 0xea81, 0xf8b0, 0xf9b0, 0xeb81, 0xec81, 0xed81, 0xee81, 0xef81, 0xfab0, 0xfbb0, 0xf081, 0xf181, 0xfcb0, 0xf281, 0xf381, 0xf481, 0xfdb0, 0xf581, 0xfeb0, 0xf681, 0xf781, 0xf881, 0xf981, 0xfa81, 0xa1b1, 0xa2b1, 0xfb81, 0xa3b1, 0xfc81, 0xa4b1, 0xfd81, 0xfe81, 0x4182, 0x4282, 0x4382, 0x4482, 0xa5b1, 0x4582, 0x4682, 0x4782, 0xa6b1, 0x4882, 0x4982, 0x4a82, 0xa7b1, 0x4b82, 0x4c82, 0x4d82, 0x4e82, 0x4f82, 0x5082, 0x5182, 0x5282, 0xa8b1, 0x5382, 0x5482, 0xa9b1, 0xaab1, 0x5582, 0x5682, 0x5782, 0x5882, 0x5982, 0x5a82, 0xabb1, 0xacb1, 0x6182, 0x6282, 0xadb1, 0x6382, 0x6482, 0x6582, 0xaeb1, 0x6682, 0x6782, 0x6882, 0x6982, 0x6a82, 0x6b82, 0x6c82, 0xafb1, 0xb0b1, 0x6d82, 0xb1b1, 0x6e82, 0xb2b1, 0x6f82, 0x7082, 0x7182, 0x7282, 0x7382, 0x7482, 0xb3b1, 0x7582, 0x7682, 0x7782, 0xb4b1, 0x7882, 0x7982, 0x7a82, 0xb5b1, 0x8182, 0x8282, 0x8382, 0x8482, 0x8582, 0x8682, 0x8782, 0x8882, 0xb6b1, 0x8982, 0xb7b1, 0x8a82, 0x8b82, 0x8c82, 0x8d82, 0x8e82, 0x8f82, 0x9082, 0x9182, 0xb8b1, 0xb9b1, 0x9282, 0x9382, 0xbab1, 0x9482, 0x9582, 0xbbb1, 0xbcb1, 0xbdb1, 0xbeb1, 0x9682, 0x9782, 0x9882, 0x9982, 0xbfb1, 0xc0b1, 0xc1b1, 0x9a82, 0xc2b1, 0x9b82, 0xc3b1, 0xc4b1, 0x9c82, 0x9d82, 0x9e82, 0x9f82, 0xa082, 0xc5b1, 0xc6b1, 0xa182, 0xa282, 0xc7b1, 0xa382, 0xa482, 0xa582, 0xc8b1, 0xa682, 0xa782, 0xa882, 0xa982, 0xaa82, 0xab82, 0xac82, 0xad82, 0xae82, 0xaf82, 0xb082, 0xc9b1, 0xcab1, 0xb182, 0xb282, 0xb382, 0xb482, 0xb582, 0xb682, 0xcbb1, 0xb782, 0xb882, 0xb982, 0xba82, 0xbb82, 0xbc82, 0xbd82, 0xbe82, 0xbf82, 0xc082, 0xc182, 0xc282, 0xc382, 0xc482, 0xc582, 0xc682, 0xc782, 0xc882, 0xccb1, 0xc982, 0xca82, 0xcb82, 0xcc82, 0xcd82, 0xce82, 0xcf82, 0xd082, 0xcdb1, 0xceb1, 0xd182, 0xd282, 0xcfb1, 0xd382, 0xd482, 0xd582, 0xd0b1, 0xd682, 0xd782, 0xd882, 0xd982, 0xda82, 0xdb82, 0xdc82, 0xd1b1, 0xd2b1, 0xdd82, 0xd3b1, 0xde82, 0xdf82, 0xe082, 0xe182, 0xe282, 0xe382, 0xe482, 0xe582, 0xd4b1, 0xe682, 0xe782, 0xe882, 0xd5b1, 0xe982, 0xea82, 0xeb82, 0xd6b1, 0xec82, 0xed82, 0xee82, 0xef82, 0xf082, 0xf182, 0xf282, 0xf382, 0xf482, 0xf582, 0xf682, 0xf782, 0xf882, 0xf982, 0xfa82, 0xfb82, 0xfc82, 0xfd82, 0xfe82, 0xd7b1, 0xd8b1, 0x4183, 0x4283, 0xd9b1, 0x4383, 0x4483, 0xdab1, 0xdbb1, 0xdcb1, 0x4583, 0x4683, 0x4783, 0x4883, 0x4983, 0x4a83, 0xddb1, 0xdeb1, 0x4b83, 0xdfb1, 0x4c83, 0xe0b1, 0x4d83, 0x4e83, 0x4f83, 0x5083, 0x5183, 0x5283, 0xe1b1, 0x5383, 0x5483, 0x5583, 0x5683, 0x5783, 0x5883, 0x5983, 0x5a83, 0x6183, 0x6283, 0x6383, 0x6483, 0x6583, 0x6683, 0x6783, 0x6883, 0x6983, 0x6a83, 0x6b83, 0x6c83, 0x6d83, 0x6e83, 0x6f83, 0x7083, 0x7183, 0x7283, 0x7383, 0xe2b1, 0xe3b1, 0x7483, 0x7583, 0xe4b1, 0x7683, 0x7783, 0xe5b1, 0xe6b1, 0x7883, 0xe7b1, 0x7983, 0x7a83, 0x8183, 0x8283, 0x8383, 0xe8b1, 0xe9b1, 0x8483, 0xeab1, 0x8583, 0xebb1, 0xecb1, 0x8683, 0x8783, 0x8883, 0xedb1, 0x8983, 0xeeb1, 0xefb1, 0xf0b1, 0x8a83, 0xf1b1, 0x8b83, 0x8c83, 0x8d83, 0xf2b1, 0x8e83, 0xf3b1, 0x8f83, 0x9083, 0x9183, 0x9283, 0x9383, 0xf4b1, 0xf5b1, 0x9483, 0xf6b1, 0xf7b1, 0xf8b1, 0x9583, 0x9683, 0x9783, 0xf9b1, 0x9883, 0x9983, 0xfab1, 0xfbb1, 0x9a83, 0x9b83, 0xfcb1, 0x9c83, 0x9d83, 0x9e83, 0xfdb1, 0x9f83, 0xa083, 0xa183, 0xa283, 0xa383, 0xa483, 0xa583, 0xfeb1, 0xa1b2, 0xa683, 0xa2b2, 0xa3b2, 0xa4b2, 0xa783, 0xa883, 0xa983, 0xaa83, 0xab83, 0xac83, 0xa5b2, 0xa6b2, 0xad83, 0xae83, 0xaf83, 0xb083, 0xb183, 0xb283, 0xa7b2, 0xb383, 0xb483, 0xb583, 0xb683, 0xb783, 0xb883, 0xb983, 0xba83, 0xbb83, 0xbc83, 0xbd83, 0xbe83, 0xbf83, 0xc083, 0xc183, 0xc283, 0xc383, 0xc483, 0xc583, 0xc683, 0xc783, 0xc883, 0xc983, 0xca83, 0xcb83, 0xcc83, 0xcd83, 0xce83, 0xcf83, 0xd083, 0xd183, 0xd283, 0xd383, 0xd483, 0xd583, 0xd683, 0xd783, 0xd883, 0xd983, 0xda83, 0xdb83, 0xdc83, 0xdd83, 0xde83, 0xdf83, 0xe083, 0xe183, 0xa8b2, 0xa9b2, 0xaab2, 0xe283, 0xabb2, 0xe383, 0xe483, 0xe583, 0xacb2, 0xe683, 0xe783, 0xe883, 0xe983, 0xea83, 0xeb83, 0xec83, 0xadb2, 0xaeb2, 0xed83, 0xafb2, 0xb0b2, 0xb1b2, 0xee83, 0xef83, 0xf083, 0xf183, 0xf283, 0xf383, 0xb2b2, 0xb3b2, 0xf483, 0xf583, 0xb4b2, 0xf683, 0xf783, 0xf883, 0xf983, 0xfa83, 0xfb83, 0xfc83, 0xfd83, 0xfe83, 0x4184, 0x4284, 0xb5b2, 0x4384, 0x4484, 0xb6b2, 0x4584, 0xb7b2, 0x4684, 0x4784, 0x4884, 0x4984, 0x4a84, 0x4b84, 0xb8b2, 0x4c84, 0x4d84, 0x4e84, 0xb9b2, 0x4f84, 0x5084, 0x5184, 0xbab2, 0x5284, 0x5384, 0x5484, 0x5584, 0x5684, 0x5784, 0x5884, 0x5984, 0x5a84, 0x6184, 0xbbb2, 0xbcb2, 0x6284, 0x6384, 0x6484, 0x6584, 0xbdb2, 0x6684, 0x6784, 0xbeb2, 0x6884, 0x6984, 0x6a84, 0x6b84, 0x6c84, 0x6d84, 0x6e84, 0x6f84, 0x7084, 0x7184, 0x7284, 0x7384, 0x7484, 0x7584, 0x7684, 0x7784, 0x7884, 0x7984, 0x7a84, 0x8184, 0x8284, 0x8384, 0x8484, 0x8584, 0x8684, 0x8784, 0x8884, 0xbfb2, 0xc0b2, 0x8984, 0x8a84, 0xc1b2, 0x8b84, 0xc2b2, 0x8c84, 0xc3b2, 0x8d84, 0x8e84, 0x8f84, 0x9084, 0x9184, 0x9284, 0x9384, 0xc4b2, 0xc5b2, 0x9484, 0xc6b2, 0x9584, 0xc7b2, 0xc8b2, 0xc9b2, 0x9684, 0x9784, 0x9884, 0x9984, 0xcab2, 0xcbb2, 0x9a84, 0x9b84, 0x9c84, 0x9d84, 0x9e84, 0x9f84, 0xccb2, 0xa084, 0xa184, 0xa284, 0xa384, 0xa484, 0xa584, 0xa684, 0xa784, 0xa884, 0xa984, 0xaa84, 0xcdb2, 0xceb2, 0xab84, 0xac84, 0xad84, 0xae84, 0xaf84, 0xb084, 0xcfb2, 0xd0b2, 0xb184, 0xb284, 0xb384, 0xb484, 0xb584, 0xb684, 0xb784, 0xb884, 0xb984, 0xba84, 0xbb84, 0xbc84, 0xbd84, 0xbe84, 0xbf84, 0xc084, 0xc184, 0xc284, 0xc384, 0xd1b2, 0xc484, 0xc584, 0xc684, 0xc784, 0xc884, 0xc984, 0xd2b2, 0xca84, 0xcb84, 0xcc84, 0xd3b2, 0xcd84, 0xce84, 0xcf84, 0xd4b2, 0xd084, 0xd184, 0xd284, 0xd384, 0xd484, 0xd584, 0xd684, 0xd5b2, 0xd6b2, 0xd784, 0xd884, 0xd984, 0xd7b2, 0xda84, 0xdb84, 0xdc84, 0xdd84, 0xde84, 0xdf84, 0xd8b2, 0xe084, 0xe184, 0xe284, 0xe384, 0xe484, 0xe584, 0xe684, 0xe784, 0xe884, 0xe984, 0xea84, 0xeb84, 0xec84, 0xed84, 0xee84, 0xef84, 0xf084, 0xf184, 0xf284, 0xf384, 0xf484, 0xf584, 0xf684, 0xf784, 0xf884, 0xf984, 0xfa84, 0xd9b2, 0xdab2, 0xfb84, 0xfc84, 0xdbb2, 0xfd84, 0xfe84, 0x4185, 0xdcb2, 0x4285, 0x4385, 0x4485, 0x4585, 0x4685, 0x4785, 0xddb2, 0xdeb2, 0xdfb2, 0x4885, 0xe0b2, 0x4985, 0xe1b2, 0xe2b2, 0x4a85, 0x4b85, 0x4c85, 0x4d85, 0x4e85, 0xe3b2, 0x4f85, 0x5085, 0x5185, 0x5285, 0x5385, 0x5485, 0x5585, 0xe4b2, 0x5685, 0x5785, 0x5885, 0x5985, 0x5a85, 0x6185, 0x6285, 0x6385, 0x6485, 0x6585, 0x6685, 0xe5b2, 0xe6b2, 0x6785, 0x6885, 0x6985, 0x6a85, 0x6b85, 0x6c85, 0xe7b2, 0xe8b2, 0x6d85, 0x6e85, 0xe9b2, 0x6f85, 0x7085, 0x7185, 0xeab2, 0x7285, 0x7385, 0x7485, 0x7585, 0x7685, 0x7785, 0x7885, 0xebb2, 0xecb2, 0x7985, 0x7a85, 0xedb2, 0x8185, 0x8285, 0x8385, 0x8485, 0x8585, 0x8685, 0x8785, 0xeeb2, 0x8885, 0x8985, 0x8a85, 0xefb2, 0x8b85, 0x8c85, 0x8d85, 0xf0b2, 0x8e85, 0x8f85, 0x9085, 0x9185, 0x9285, 0x9385, 0x9485, 0xf1b2, 0xf2b2, 0x9585, 0x9685, 0x9785, 0x9885, 0x9985, 0x9a85, 0x9b85, 0x9c85, 0x9d85, 0x9e85, 0xf3b2, 0x9f85, 0xa085, 0xa185, 0xa285, 0xa385, 0xa485, 0xa585, 0xa685, 0xa785, 0xa885, 0xa985, 0xaa85, 0xab85, 0xac85, 0xad85, 0xae85, 0xaf85, 0xb085, 0xb185, 0xb285, 0xb385, 0xb485, 0xb585, 0xb685, 0xb785, 0xb885, 0xb985, 0xf4b2, 0xf5b2, 0xba85, 0xbb85, 0xf6b2, 0xbc85, 0xf7b2, 0xbd85, 0xf8b2, 0xbe85, 0xf9b2, 0xbf85, 0xc085, 0xc185, 0xc285, 0xfab2, 0xfbb2, 0xfcb2, 0xc385, 0xfdb2, 0xc485, 0xfeb2, 0xc585, 0xc685, 0xc785, 0xa1b3, 0xc885, 0xc985, 0xca85, 0xcb85, 0xcc85, 0xcd85, 0xce85, 0xcf85, 0xd085, 0xd185, 0xd285, 0xd385, 0xd485, 0xd585, 0xd685, 0xd785, 0xd885, 0xd985, 0xda85, 0xdb85, 0xdc85, 0xdd85, 0xde85, 0xdf85, 0xe085, 0xe185, 0xe285, 0xe385, 0xe485, 0xe585, 0xa2b3, 0xa3b3, 0xe685, 0xe785, 0xa4b3, 0xe885, 0xe985, 0xea85, 0xa5b3, 0xeb85, 0xec85, 0xed85, 0xee85, 0xef85, 0xf085, 0xf185, 0xa6b3, 0xa7b3, 0xf285, 0xa8b3, 0xf385, 0xa9b3, 0xf485, 0xf585, 0xf685, 0xf785, 0xf885, 0xf985, 0xaab3, 0xabb3, 0xacb3, 0xfa85, 0xadb3, 0xfb85, 0xfc85, 0xaeb3, 0xafb3, 0xb0b3, 0xb1b3, 0xfd85, 0xfe85, 0x4186, 0x4286, 0x4386, 0xb2b3, 0xb3b3, 0x4486, 0xb4b3, 0xb5b3, 0xb6b3, 0xb7b3, 0xb8b3, 0x4586, 0xb9b3, 0x4686, 0xbab3, 0xbbb3, 0xbcb3, 0x4786, 0x4886, 0xbdb3, 0x4986, 0x4a86, 0x4b86, 0xbeb3, 0x4c86, 0x4d86, 0x4e86, 0x4f86, 0x5086, 0x5186, 0x5286, 0xbfb3, 0xc0b3, 0x5386, 0xc1b3, 0xc2b3, 0xc3b3, 0x5486, 0x5586, 0x5686, 0x5786, 0x5886, 0x5986, 0xc4b3, 0xc5b3, 0x5a86, 0x6186, 0xc6b3, 0x6286, 0x6386, 0x6486, 0xc7b3, 0x6586, 0x6686, 0x6786, 0x6886, 0x6986, 0x6a86, 0x6b86, 0xc8b3, 0x6c86, 0x6d86, 0x6e86, 0x6f86, 0xc9b3, 0x7086, 0x7186, 0x7286, 0x7386, 0x7486, 0x7586, 0x7686, 0x7786, 0x7886, 0x7986, 0x7a86, 0x8186, 0x8286, 0x8386, 0x8486, 0x8586, 0x8686, 0x8786, 0x8886, 0x8986, 0x8a86, 0x8b86, 0x8c86, 0x8d86, 0x8e86, 0x8f86, 0x9086, 0x9186, 0x9286, 0x9386, 0x9486, 0x9586, 0x9686, 0x9786, 0xcab3, 0xcbb3, 0x9886, 0xccb3, 0xcdb3, 0x9986, 0x9a86, 0x9b86, 0xceb3, 0x9c86, 0xcfb3, 0xd0b3, 0x9d86, 0x9e86, 0x9f86, 0xa086, 0xd1b3, 0xd2b3, 0xa186, 0xd3b3, 0xd4b3, 0xd5b3, 0xa286, 0xa386, 0xa486, 0xa586, 0xa686, 0xd6b3, 0xd7b3, 0xd8b3, 0xa786, 0xa886, 0xd9b3, 0xa986, 0xaa86, 0xab86, 0xdab3, 0xac86, 0xad86, 0xae86, 0xaf86, 0xb086, 0xb186, 0xb286, 0xdbb3, 0xdcb3, 0xb386, 0xddb3, 0xdeb3, 0xdfb3, 0xb486, 0xb586, 0xb686, 0xb786, 0xb886, 0xb986, 0xe0b3, 0xe1b3, 0xba86, 0xbb86, 0xe2b3, 0xbc86, 0xbd86, 0xbe86, 0xe3b3, 0xbf86, 0xc086, 0xc186, 0xc286, 0xc386, 0xc486, 0xc586, 0xe4b3, 0xe5b3, 0xc686, 0xc786, 0xe6b3, 0xe7b3, 0xc886, 0xc986, 0xe8b3, 0xca86, 0xcb86, 0xcc86, 0xe9b3, 0xcd86, 0xce86, 0xcf86, 0xeab3, 0xd086, 0xd186, 0xd286, 0xd386, 0xd486, 0xd586, 0xd686, 0xd786, 0xd886, 0xd986, 0xda86, 0xdb86, 0xdc86, 0xdd86, 0xde86, 0xdf86, 0xe086, 0xe186, 0xe286, 0xe386, 0xe486, 0xe586, 0xe686, 0xebb3, 0xecb3, 0xe786, 0xe886, 0xedb3, 0xe986, 0xea86, 0xeb86, 0xeeb3, 0xec86, 0xefb3, 0xed86, 0xee86, 0xef86, 0xf086, 0xf186, 0xf0b3, 0xf1b3, 0xf286, 0xf2b3, 0xf386, 0xf3b3, 0xf486, 0xf586, 0xf686, 0xf786, 0xf4b3, 0xf5b3, 0xf6b3, 0xf886, 0xf986, 0xfa86, 0xf7b3, 0xfb86, 0xfc86, 0xfd86, 0xf8b3, 0xfe86, 0x4187, 0x4287, 0x4387, 0x4487, 0x4587, 0x4687, 0x4787, 0x4887, 0x4987, 0x4a87, 0xf9b3, 0x4b87, 0x4c87, 0x4d87, 0x4e87, 0x4f87, 0x5087, 0x5187, 0x5287, 0x5387, 0x5487, 0x5587, 0x5687, 0x5787, 0x5887, 0x5987, 0x5a87, 0x6187, 0x6287, 0x6387, 0x6487, 0x6587, 0x6687, 0x6787, 0x6887, 0x6987, 0x6a87, 0x6b87, 0x6c87, 0x6d87, 0x6e87, 0x6f87, 0x7087, 0x7187, 0x7287, 0x7387, 0xfab3, 0x7487, 0x7587, 0x7687, 0xfbb3, 0x7787, 0x7887, 0x7987, 0xfcb3, 0x7a87, 0x8187, 0x8287, 0x8387, 0x8487, 0x8587, 0x8687, 0xfdb3, 0xfeb3, 0x8787, 0xa1b4, 0x8887, 0x8987, 0x8a87, 0x8b87, 0x8c87, 0x8d87, 0x8e87, 0x8f87, 0xa2b4, 0xa3b4, 0x9087, 0x9187, 0xa4b4, 0x9287, 0x9387, 0x9487, 0xa5b4, 0x9587, 0x9687, 0x9787, 0x9887, 0x9987, 0x9a87, 0x9b87, 0x9c87, 0xa6b4, 0x9d87, 0xa7b4, 0x9e87, 0xa8b4, 0x9f87, 0xa087, 0xa187, 0xa287, 0xa387, 0xa487, 0xa9b4, 0xaab4, 0xa587, 0xa687, 0xabb4, 0xa787, 0xa887, 0xacb4, 0xadb4, 0xa987, 0xaa87, 0xab87, 0xac87, 0xad87, 0xae87, 0xaf87, 0xaeb4, 0xafb4, 0xb087, 0xb0b4, 0xb187, 0xb1b4, 0xb287, 0xb387, 0xb487, 0xb587, 0xb687, 0xb787, 0xb2b4, 0xb887, 0xb987, 0xba87, 0xbb87, 0xbc87, 0xbd87, 0xbe87, 0xbf87, 0xc087, 0xc187, 0xc287, 0xc387, 0xc487, 0xc587, 0xc687, 0xc787, 0xc887, 0xc987, 0xca87, 0xb3b4, 0xcb87, 0xcc87, 0xcd87, 0xce87, 0xcf87, 0xd087, 0xd187, 0xb4b4, 0xd287, 0xd387, 0xd487, 0xd587, 0xd687, 0xd787, 0xd887, 0xd987, 0xda87, 0xdb87, 0xdc87, 0xdd87, 0xde87, 0xdf87, 0xe087, 0xe187, 0xe287, 0xe387, 0xe487, 0xe587, 0xe687, 0xe787, 0xe887, 0xe987, 0xea87, 0xeb87, 0xec87, 0xb5b4, 0xed87, 0xee87, 0xef87, 0xb6b4, 0xf087, 0xf187, 0xf287, 0xb7b4, 0xf387, 0xf487, 0xf587, 0xf687, 0xf787, 0xf887, 0xf987, 0xb8b4, 0xb9b4, 0xfa87, 0xfb87, 0xfc87, 0xfd87, 0xfe87, 0x4188, 0x4288, 0x4388, 0x4488, 0x4588, 0xbab4, 0xbbb4, 0x4688, 0x4788, 0x4888, 0x4988, 0x4a88, 0x4b88, 0xbcb4, 0x4c88, 0x4d88, 0x4e88, 0x4f88, 0x5088, 0x5188, 0x5288, 0xbdb4, 0xbeb4, 0x5388, 0x5488, 0x5588, 0xbfb4, 0x5688, 0x5788, 0x5888, 0x5988, 0x5a88, 0x6188, 0xc0b4, 0xc1b4, 0x6288, 0x6388, 0xc2b4, 0x6488, 0x6588, 0x6688, 0xc3b4, 0xc4b4, 0xc5b4, 0x6788, 0x6888, 0x6988, 0x6a88, 0x6b88, 0xc6b4, 0xc7b4, 0x6c88, 0xc8b4, 0x6d88, 0xc9b4, 0xcab4, 0x6e88, 0x6f88, 0x7088, 0xcbb4, 0x7188, 0xccb4, 0x7288, 0x7388, 0x7488, 0xcdb4, 0x7588, 0x7688, 0x7788, 0xceb4, 0x7888, 0x7988, 0x7a88, 0x8188, 0x8288, 0x8388, 0x8488, 0x8588, 0x8688, 0x8788, 0x8888, 0x8988, 0x8a88, 0x8b88, 0x8c88, 0x8d88, 0x8e88, 0x8f88, 0x9088, 0xcfb4, 0xd0b4, 0x9188, 0x9288, 0xd1b4, 0x9388, 0x9488, 0x9588, 0xd2b4, 0x9688, 0xd3b4, 0x9788, 0x9888, 0x9988, 0x9a88, 0x9b88, 0xd4b4, 0xd5b4, 0x9c88, 0xd6b4, 0x9d88, 0xd7b4, 0x9e88, 0x9f88, 0xa088, 0xa188, 0xd8b4, 0xa288, 0xd9b4, 0xdab4, 0xdbb4, 0xa388, 0xdcb4, 0xa488, 0xa588, 0xddb4, 0xdeb4, 0xdfb4, 0xe0b4, 0xe1b4, 0xa688, 0xa788, 0xa888, 0xe2b4, 0xe3b4, 0xe4b4, 0xa988, 0xe5b4, 0xe6b4, 0xe7b4, 0xe8b4, 0xe9b4, 0xaa88, 0xab88, 0xac88, 0xeab4, 0xebb4, 0xecb4, 0xad88, 0xae88, 0xedb4, 0xaf88, 0xb088, 0xb188, 0xeeb4, 0xb288, 0xb388, 0xb488, 0xb588, 0xb688, 0xb788, 0xb888, 0xefb4, 0xf0b4, 0xb988, 0xf1b4, 0xf2b4, 0xf3b4, 0xba88, 0xbb88, 0xbc88, 0xbd88, 0xbe88, 0xbf88, 0xf4b4, 0xc088, 0xc188, 0xc288, 0xc388, 0xc488, 0xc588, 0xc688, 0xc788, 0xc888, 0xc988, 0xca88, 0xcb88, 0xcc88, 0xcd88, 0xce88, 0xcf88, 0xd088, 0xd188, 0xd288, 0xd388, 0xd488, 0xd588, 0xd688, 0xd788, 0xd888, 0xd988, 0xda88, 0xdb88, 0xdc88, 0xdd88, 0xde88, 0xdf88, 0xe088, 0xe188, 0xe288, 0xe388, 0xe488, 0xe588, 0xe688, 0xe788, 0xe888, 0xe988, 0xea88, 0xeb88, 0xec88, 0xed88, 0xee88, 0xef88, 0xf088, 0xf188, 0xf288, 0xf388, 0xf488, 0xf588, 0xf688, 0xf5b4, 0xf6b4, 0xf7b4, 0xf788, 0xf8b4, 0xf888, 0xf988, 0xf9b4, 0xfab4, 0xfa88, 0xfbb4, 0xfcb4, 0xfb88, 0xfc88, 0xfd88, 0xfe88, 0xfdb4, 0xfeb4, 0x4189, 0xa1b5, 0x4289, 0xa2b5, 0x4389, 0xa3b5, 0x4489, 0x4589, 0xa4b5, 0x4689, 0xa5b5, 0xa6b5, 0x4789, 0x4889, 0xa7b5, 0x4989, 0x4a89, 0x4b89, 0xa8b5, 0x4c89, 0x4d89, 0x4e89, 0x4f89, 0x5089, 0x5189, 0x5289, 0xa9b5, 0xaab5, 0x5389, 0xabb5, 0xacb5, 0xadb5, 0x5489, 0x5589, 0x5689, 0x5789, 0x5889, 0x5989, 0xaeb5, 0x5a89, 0x6189, 0x6289, 0xafb5, 0x6389, 0x6489, 0x6589, 0xb0b5, 0x6689, 0x6789, 0x6889, 0x6989, 0x6a89, 0x6b89, 0x6c89, 0x6d89, 0x6e89, 0x6f89, 0x7089, 0xb1b5, 0xb2b5, 0x7189, 0x7289, 0x7389, 0x7489, 0x7589, 0x7689, 0xb3b5, 0x7789, 0x7889, 0x7989, 0xb4b5, 0x7a89, 0x8189, 0x8289, 0x8389, 0x8489, 0x8589, 0x8689, 0x8789, 0x8889, 0x8989, 0x8a89, 0x8b89, 0x8c89, 0x8d89, 0x8e89, 0x8f89, 0x9089, 0x9189, 0x9289, 0x9389, 0x9489, 0x9589, 0x9689, 0xb5b5, 0xb6b5, 0x9789, 0x9889, 0xb7b5, 0x9989, 0x9a89, 0xb8b5, 0xb9b5, 0x9b89, 0xbab5, 0x9c89, 0xbbb5, 0x9d89, 0x9e89, 0x9f89, 0xbcb5, 0xbdb5, 0xa089, 0xbeb5, 0xa189, 0xbfb5, 0xa289, 0xc0b5, 0xa389, 0xc1b5, 0xa489, 0xa589, 0xc2b5, 0xa689, 0xa789, 0xa889, 0xc3b5, 0xa989, 0xaa89, 0xab89, 0xc4b5, 0xac89, 0xad89, 0xae89, 0xaf89, 0xb089, 0xb189, 0xb289, 0xb389, 0xb489, 0xb589, 0xb689, 0xb789, 0xb889, 0xb989, 0xba89, 0xbb89, 0xbc89, 0xbd89, 0xbe89, 0xc5b5, 0xbf89, 0xc089, 0xc189, 0xc289, 0xc389, 0xc489, 0xc589, 0xc689, 0xc789, 0xc889, 0xc989, 0xca89, 0xcb89, 0xcc89, 0xcd89, 0xce89, 0xcf89, 0xd089, 0xd189, 0xc6b5, 0xd289, 0xd389, 0xd489, 0xd589, 0xd689, 0xd789, 0xd889, 0xc7b5, 0xd989, 0xda89, 0xdb89, 0xc8b5, 0xdc89, 0xdd89, 0xde89, 0xc9b5, 0xdf89, 0xe089, 0xe189, 0xe289, 0xe389, 0xe489, 0xe589, 0xcab5, 0xcbb5, 0xe689, 0xccb5, 0xe789, 0xe889, 0xe989, 0xea89, 0xeb89, 0xec89, 0xed89, 0xee89, 0xcdb5, 0xef89, 0xf089, 0xf189, 0xf289, 0xf389, 0xf489, 0xf589, 0xf689, 0xf789, 0xf889, 0xf989, 0xfa89, 0xfb89, 0xfc89, 0xfd89, 0xfe89, 0x418a, 0x428a, 0x438a, 0x448a, 0x458a, 0x468a, 0x478a, 0x488a, 0x498a, 0x4a8a, 0x4b8a, 0xceb5, 0xcfb5, 0x4c8a, 0x4d8a, 0xd0b5, 0x4e8a, 0x4f8a, 0x508a, 0xd1b5, 0x518a, 0x528a, 0x538a, 0x548a, 0x558a, 0x568a, 0x578a, 0xd2b5, 0xd3b5, 0x588a, 0xd4b5, 0x598a, 0xd5b5, 0x5a8a, 0x618a, 0x628a, 0x638a, 0x648a, 0x658a, 0xd6b5, 0x668a, 0x678a, 0x688a, 0x698a, 0x6a8a, 0x6b8a, 0x6c8a, 0x6d8a, 0x6e8a, 0x6f8a, 0x708a, 0x718a, 0x728a, 0x738a, 0x748a, 0x758a, 0x768a, 0x778a, 0x788a, 0xd7b5, 0x798a, 0x7a8a, 0x818a, 0x828a, 0x838a, 0x848a, 0x858a, 0xd8b5, 0x868a, 0x878a, 0x888a, 0x898a, 0x8a8a, 0x8b8a, 0x8c8a, 0x8d8a, 0x8e8a, 0x8f8a, 0x908a, 0x918a, 0x928a, 0x938a, 0x948a, 0x958a, 0x968a, 0x978a, 0x988a, 0x998a, 0xd9b5, 0x9a8a, 0x9b8a, 0x9c8a, 0x9d8a, 0x9e8a, 0x9f8a, 0xdab5, 0xa08a, 0xa18a, 0xa28a, 0xdbb5, 0xa38a, 0xa48a, 0xa58a, 0xdcb5, 0xa68a, 0xa78a, 0xa88a, 0xa98a, 0xaa8a, 0xab8a, 0xac8a, 0xad8a, 0xddb5, 0xae8a, 0xdeb5, 0xaf8a, 0xdfb5, 0xb08a, 0xb18a, 0xb28a, 0xb38a, 0xb48a, 0xb58a, 0xe0b5, 0xb68a, 0xb78a, 0xb88a, 0xe1b5, 0xb98a, 0xba8a, 0xbb8a, 0xe2b5, 0xbc8a, 0xbd8a, 0xbe8a, 0xbf8a, 0xc08a, 0xc18a, 0xc28a, 0xe3b5, 0xc38a, 0xc48a, 0xc58a, 0xc68a, 0xe4b5, 0xc78a, 0xc88a, 0xc98a, 0xca8a, 0xcb8a, 0xcc8a, 0xe5b5, 0xe6b5, 0xcd8a, 0xce8a, 0xe7b5, 0xcf8a, 0xd08a, 0xe8b5, 0xe9b5, 0xd18a, 0xeab5, 0xd28a, 0xd38a, 0xd48a, 0xd58a, 0xd68a, 0xebb5, 0xecb5, 0xd78a, 0xedb5, 0xd88a, 0xeeb5, 0xd98a, 0xda8a, 0xdb8a, 0xdc8a, 0xdd8a, 0xde8a, 0xefb5, 0xdf8a, 0xe08a, 0xe18a, 0xe28a, 0xe38a, 0xe48a, 0xe58a, 0xe68a, 0xe78a, 0xe88a, 0xe98a, 0xea8a, 0xeb8a, 0xec8a, 0xed8a, 0xee8a, 0xef8a, 0xf08a, 0xf18a, 0xf28a, 0xf38a, 0xf48a, 0xf58a, 0xf68a, 0xf78a, 0xf88a, 0xf98a, 0xf0b5, 0xf1b5, 0xfa8a, 0xfb8a, 0xf2b5, 0xfc8a, 0xfd8a, 0xf3b5, 0xf4b5, 0xfe8a, 0x418b, 0x428b, 0x438b, 0x448b, 0x458b, 0x468b, 0xf5b5, 0xf6b5, 0x478b, 0xf7b5, 0xf8b5, 0xf9b5, 0xfab5, 0x488b, 0x498b, 0x4a8b, 0x4b8b, 0x4c8b, 0xfbb5, 0xfcb5, 0x4d8b, 0x4e8b, 0xfdb5, 0x4f8b, 0x508b, 0x518b, 0xfeb5, 0x528b, 0x538b, 0x548b, 0x558b, 0x568b, 0x578b, 0x588b, 0xa1b6, 0xa2b6, 0x598b, 0xa3b6, 0xa4b6, 0xa5b6, 0x5a8b, 0x618b, 0x628b, 0x638b, 0x648b, 0xa6b6, 0xa7b6, 0xa8b6, 0x658b, 0x668b, 0xa9b6, 0x678b, 0x688b, 0x698b, 0xaab6, 0x6a8b, 0x6b8b, 0x6c8b, 0x6d8b, 0x6e8b, 0x6f8b, 0x708b, 0xabb6, 0xacb6, 0x718b, 0xadb6, 0xaeb6, 0xafb6, 0x728b, 0x738b, 0x748b, 0x758b, 0x768b, 0x778b, 0x788b, 0x798b, 0x7a8b, 0x818b, 0x828b, 0x838b, 0x848b, 0x858b, 0x868b, 0x878b, 0x888b, 0x898b, 0x8a8b, 0x8b8b, 0x8c8b, 0x8d8b, 0x8e8b, 0x8f8b, 0x908b, 0x918b, 0x928b, 0x938b, 0x948b, 0x958b, 0x968b, 0x978b, 0x988b, 0x998b, 0x9a8b, 0x9b8b, 0x9c8b, 0x9d8b, 0x9e8b, 0x9f8b, 0xa08b, 0xa18b, 0xa28b, 0xa38b, 0xa48b, 0xa58b, 0xa68b, 0xa78b, 0xa88b, 0xa98b, 0xaa8b, 0xab8b, 0xac8b, 0xad8b, 0xae8b, 0xaf8b, 0xb08b, 0xb18b, 0xb28b, 0xb38b, 0xb48b, 0xb58b, 0xb0b6, 0xb1b6, 0xb68b, 0xb78b, 0xb2b6, 0xb88b, 0xb98b, 0xba8b, 0xb3b6, 0xbb8b, 0xb4b6, 0xb5b6, 0xbc8b, 0xbd8b, 0xbe8b, 0xbf8b, 0xb6b6, 0xb7b6, 0xc08b, 0xb8b6, 0xb9b6, 0xbab6, 0xc18b, 0xc28b, 0xc38b, 0xc48b, 0xc58b, 0xbbb6, 0xbcb6, 0xbdb6, 0xc68b, 0xc78b, 0xbeb6, 0xc88b, 0xc98b, 0xca8b, 0xbfb6, 0xcb8b, 0xcc8b, 0xcd8b, 0xce8b, 0xcf8b, 0xd08b, 0xd18b, 0xc0b6, 0xc1b6, 0xd28b, 0xc2b6, 0xc3b6, 0xc4b6, 0xd38b, 0xd48b, 0xd58b, 0xd68b, 0xd78b, 0xd88b, 0xc5b6, 0xd98b, 0xda8b, 0xdb8b, 0xdc8b, 0xdd8b, 0xde8b, 0xdf8b, 0xe08b, 0xe18b, 0xe28b, 0xe38b, 0xe48b, 0xe58b, 0xe68b, 0xe78b, 0xe88b, 0xe98b, 0xea8b, 0xeb8b, 0xc6b6, 0xec8b, 0xed8b, 0xee8b, 0xef8b, 0xf08b, 0xf18b, 0xf28b, 0xf38b, 0xf48b, 0xf58b, 0xf68b, 0xf78b, 0xf88b, 0xf98b, 0xfa8b, 0xfb8b, 0xfc8b, 0xfd8b, 0xfe8b, 0x418c, 0x428c, 0x438c, 0x448c, 0x458c, 0x468c, 0x478c, 0x488c, 0x498c, 0x4a8c, 0x4b8c, 0x4c8c, 0x4d8c, 0x4e8c, 0x4f8c, 0x508c, 0xc7b6, 0xc8b6, 0x518c, 0x528c, 0xc9b6, 0x538c, 0x548c, 0x558c, 0xcab6, 0x568c, 0x578c, 0x588c, 0x598c, 0x5a8c, 0x618c, 0x628c, 0x638c, 0x648c, 0x658c, 0x668c, 0x678c, 0xcbb6, 0x688c, 0x698c, 0x6a8c, 0x6b8c, 0x6c8c, 0x6d8c, 0xccb6, 0x6e8c, 0x6f8c, 0x708c, 0x718c, 0x728c, 0x738c, 0x748c, 0xcdb6, 0x758c, 0x768c, 0x778c, 0x788c, 0x798c, 0x7a8c, 0x818c, 0x828c, 0x838c, 0x848c, 0x858c, 0x868c, 0x878c, 0x888c, 0x898c, 0x8a8c, 0x8b8c, 0x8c8c, 0x8d8c, 0xceb6, 0x8e8c, 0x8f8c, 0x908c, 0x918c, 0x928c, 0x938c, 0x948c, 0x958c, 0x968c, 0x978c, 0x988c, 0x998c, 0x9a8c, 0x9b8c, 0x9c8c, 0x9d8c, 0x9e8c, 0x9f8c, 0xa08c, 0xa18c, 0xa28c, 0xa38c, 0xa48c, 0xa58c, 0xa68c, 0xa78c, 0xa88c, 0xcfb6, 0xa98c, 0xaa8c, 0xab8c, 0xd0b6, 0xac8c, 0xad8c, 0xae8c, 0xaf8c, 0xb08c, 0xb18c, 0xb28c, 0xb38c, 0xb48c, 0xb58c, 0xb68c, 0xb78c, 0xb88c, 0xb98c, 0xba8c, 0xbb8c, 0xbc8c, 0xbd8c, 0xbe8c, 0xbf8c, 0xc08c, 0xc18c, 0xc28c, 0xc38c, 0xc48c, 0xc58c, 0xc68c, 0xc78c, 0xc88c, 0xc98c, 0xca8c, 0xcb8c, 0xcc8c, 0xcd8c, 0xce8c, 0xcf8c, 0xd08c, 0xd18c, 0xd28c, 0xd38c, 0xd48c, 0xd58c, 0xd68c, 0xd78c, 0xd88c, 0xd98c, 0xda8c, 0xdb8c, 0xdc8c, 0xdd8c, 0xde8c, 0xd1b6, 0xd2b6, 0xdf8c, 0xe08c, 0xd3b6, 0xe18c, 0xe28c, 0xe38c, 0xd4b6, 0xe48c, 0xe58c, 0xe68c, 0xe78c, 0xe88c, 0xe98c, 0xd5b6, 0xd6b6, 0xea8c, 0xeb8c, 0xec8c, 0xed8c, 0xd7b6, 0xee8c, 0xef8c, 0xf08c, 0xf18c, 0xf28c, 0xf38c, 0xf48c, 0xf58c, 0xf68c, 0xf78c, 0xf88c, 0xf98c, 0xfa8c, 0xfb8c, 0xfc8c, 0xfd8c, 0xfe8c, 0x418d, 0x428d, 0x438d, 0x448d, 0x458d, 0x468d, 0x478d, 0x488d, 0x498d, 0x4a8d, 0x4b8d, 0x4c8d, 0x4d8d, 0x4e8d, 0x4f8d, 0x508d, 0x518d, 0xd8b6, 0x528d, 0x538d, 0x548d, 0x558d, 0x568d, 0x578d, 0x588d, 0x598d, 0x5a8d, 0x618d, 0x628d, 0x638d, 0x648d, 0x658d, 0x668d, 0x678d, 0x688d, 0x698d, 0x6a8d, 0x6b8d, 0x6c8d, 0x6d8d, 0x6e8d, 0x6f8d, 0x708d, 0x718d, 0x728d, 0xd9b6, 0x738d, 0x748d, 0x758d, 0xdab6, 0x768d, 0x778d, 0x788d, 0xdbb6, 0x798d, 0x7a8d, 0x818d, 0x828d, 0x838d, 0x848d, 0x858d, 0xdcb6, 0xddb6, 0x868d, 0x878d, 0x888d, 0xdeb6, 0x898d, 0x8a8d, 0x8b8d, 0x8c8d, 0x8d8d, 0x8e8d, 0x8f8d, 0x908d, 0x918d, 0x928d, 0x938d, 0x948d, 0x958d, 0x968d, 0x978d, 0x988d, 0x998d, 0x9a8d, 0x9b8d, 0x9c8d, 0x9d8d, 0x9e8d, 0x9f8d, 0xa08d, 0xa18d, 0xa28d, 0xa38d, 0xa48d, 0xa58d, 0xa68d, 0xa78d, 0xa88d, 0xa98d, 0xaa8d, 0xdfb6, 0xe0b6, 0xab8d, 0xac8d, 0xe1b6, 0xad8d, 0xae8d, 0xe2b6, 0xe3b6, 0xaf8d, 0xb08d, 0xb18d, 0xb28d, 0xb38d, 0xb48d, 0xb58d, 0xe4b6, 0xe5b6, 0xb68d, 0xe6b6, 0xb78d, 0xb88d, 0xb98d, 0xba8d, 0xbb8d, 0xbc8d, 0xbd8d, 0xbe8d, 0xe7b6, 0xbf8d, 0xc08d, 0xc18d, 0xe8b6, 0xc28d, 0xc38d, 0xc48d, 0xe9b6, 0xc58d, 0xc68d, 0xc78d, 0xc88d, 0xc98d, 0xca8d, 0xcb8d, 0xeab6, 0xebb6, 0xcc8d, 0xcd8d, 0xce8d, 0xcf8d, 0xd08d, 0xd18d, 0xd28d, 0xd38d, 0xd48d, 0xd58d, 0xecb6, 0xd68d, 0xd78d, 0xd88d, 0xedb6, 0xd98d, 0xda8d, 0xdb8d, 0xeeb6, 0xdc8d, 0xdd8d, 0xde8d, 0xdf8d, 0xe08d, 0xe18d, 0xe28d, 0xefb6, 0xf0b6, 0xe38d, 0xf1b6, 0xe48d, 0xf2b6, 0xe58d, 0xe68d, 0xe78d, 0xe88d, 0xe98d, 0xea8d, 0xf3b6, 0xf4b6, 0xeb8d, 0xec8d, 0xf5b6, 0xed8d, 0xee8d, 0xef8d, 0xf6b6, 0xf08d, 0xf18d, 0xf28d, 0xf38d, 0xf48d, 0xf58d, 0xf68d, 0xf7b6, 0xf8b6, 0xf78d, 0xf9b6, 0xfab6, 0xfbb6, 0xfcb6, 0xf88d, 0xf98d, 0xfa8d, 0xfdb6, 0xfeb6, 0xa1b7, 0xa2b7, 0xfb8d, 0xfc8d, 0xa3b7, 0xfd8d, 0xfe8d, 0x418e, 0xa4b7, 0x428e, 0x438e, 0x448e, 0x458e, 0x468e, 0x478e, 0x488e, 0xa5b7, 0xa6b7, 0x498e, 0xa7b7, 0xa8b7, 0xa9b7, 0x4a8e, 0x4b8e, 0x4c8e, 0x4d8e, 0x4e8e, 0x4f8e, 0xaab7, 0xabb7, 0x508e, 0x518e, 0xacb7, 0x528e, 0x538e, 0x548e, 0x558e, 0x568e, 0x578e, 0x588e, 0x598e, 0x5a8e, 0x618e, 0x628e, 0x638e, 0x648e, 0x658e, 0xadb7, 0x668e, 0xaeb7, 0x678e, 0x688e, 0x698e, 0x6a8e, 0x6b8e, 0x6c8e, 0x6d8e, 0x6e8e, 0x6f8e, 0x708e, 0x718e, 0x728e, 0x738e, 0x748e, 0x758e, 0x768e, 0x778e, 0x788e, 0x798e, 0x7a8e, 0x818e, 0x828e, 0x838e, 0x848e, 0x858e, 0x868e, 0x878e, 0x888e, 0x898e, 0x8a8e, 0x8b8e, 0x8c8e, 0x8d8e, 0x8e8e, 0xafb7, 0xb0b7, 0x8f8e, 0x908e, 0xb1b7, 0x918e, 0x928e, 0x938e, 0xb2b7, 0x948e, 0x958e, 0x968e, 0x978e, 0x988e, 0x998e, 0x9a8e, 0xb3b7, 0xb4b7, 0x9b8e, 0xb5b7, 0xb6b7, 0xb7b7, 0x9c8e, 0x9d8e, 0x9e8e, 0x9f8e, 0xa08e, 0xb8b7, 0xb9b7, 0xbab7, 0xa18e, 0xa28e, 0xbbb7, 0xa38e, 0xa48e, 0xa58e, 0xbcb7, 0xa68e, 0xa78e, 0xa88e, 0xa98e, 0xaa8e, 0xab8e, 0xac8e, 0xbdb7, 0xbeb7, 0xad8e, 0xbfb7, 0xae8e, 0xc0b7, 0xaf8e, 0xb08e, 0xb18e, 0xb28e, 0xb38e, 0xb48e, 0xc1b7, 0xc2b7, 0xb58e, 0xb68e, 0xc3b7, 0xb78e, 0xb88e, 0xb98e, 0xc4b7, 0xba8e, 0xbb8e, 0xbc8e, 0xbd8e, 0xbe8e, 0xbf8e, 0xc08e, 0xc5b7, 0xc6b7, 0xc18e, 0xc7b7, 0xc8b7, 0xc9b7, 0xc28e, 0xc38e, 0xc48e, 0xc58e, 0xc68e, 0xc78e, 0xcab7, 0xc88e, 0xc98e, 0xca8e, 0xcbb7, 0xcb8e, 0xcc8e, 0xcd8e, 0xce8e, 0xcf8e, 0xd08e, 0xd18e, 0xd28e, 0xd38e, 0xd48e, 0xd58e, 0xd68e, 0xccb7, 0xd78e, 0xcdb7, 0xd88e, 0xd98e, 0xda8e, 0xdb8e, 0xdc8e, 0xdd8e, 0xde8e, 0xdf8e, 0xceb7, 0xcfb7, 0xe08e, 0xe18e, 0xd0b7, 0xe28e, 0xe38e, 0xe48e, 0xd1b7, 0xe58e, 0xe68e, 0xe78e, 0xe88e, 0xe98e, 0xea8e, 0xeb8e, 0xd2b7, 0xd3b7, 0xec8e, 0xd4b7, 0xed8e, 0xd5b7, 0xee8e, 0xef8e, 0xf08e, 0xf18e, 0xf28e, 0xf38e, 0xd6b7, 0xf48e, 0xf58e, 0xf68e, 0xd7b7, 0xf78e, 0xf88e, 0xf98e, 0xfa8e, 0xfb8e, 0xfc8e, 0xfd8e, 0xfe8e, 0x418f, 0x428f, 0x438f, 0x448f, 0x458f, 0x468f, 0x478f, 0x488f, 0xd8b7, 0x498f, 0x4a8f, 0x4b8f, 0x4c8f, 0x4d8f, 0x4e8f, 0x4f8f, 0x508f, 0x518f, 0x528f, 0x538f, 0x548f, 0x558f, 0x568f, 0x578f, 0x588f, 0x598f, 0x5a8f, 0x618f, 0x628f, 0x638f, 0x648f, 0x658f, 0x668f, 0x678f, 0x688f, 0xd9b7, 0x698f, 0x6a8f, 0x6b8f, 0x6c8f, 0x6d8f, 0x6e8f, 0x6f8f, 0xdab7, 0x708f, 0x718f, 0x728f, 0xdbb7, 0x738f, 0x748f, 0x758f, 0xdcb7, 0x768f, 0x778f, 0x788f, 0x798f, 0x7a8f, 0x818f, 0x828f, 0xddb7, 0xdeb7, 0x838f, 0xdfb7, 0x848f, 0xe0b7, 0x858f, 0x868f, 0x878f, 0x888f, 0x898f, 0x8a8f, 0xe1b7, 0x8b8f, 0x8c8f, 0x8d8f, 0xe2b7, 0x8e8f, 0x8f8f, 0x908f, 0xe3b7, 0x918f, 0x928f, 0x938f, 0x948f, 0x958f, 0x968f, 0x978f, 0x988f, 0xe4b7, 0x998f, 0xe5b7, 0x9a8f, 0xe6b7, 0x9b8f, 0x9c8f, 0x9d8f, 0x9e8f, 0x9f8f, 0xa08f, 0xe7b7, 0xe8b7, 0xa18f, 0xa28f, 0xe9b7, 0xa38f, 0xa48f, 0xa58f, 0xeab7, 0xa68f, 0xa78f, 0xa88f, 0xa98f, 0xaa8f, 0xab8f, 0xac8f, 0xebb7, 0xecb7, 0xad8f, 0xedb7, 0xae8f, 0xeeb7, 0xaf8f, 0xb08f, 0xb18f, 0xb28f, 0xb38f, 0xb48f, 0xefb7, 0xb58f, 0xb68f, 0xb78f, 0xb88f, 0xb98f, 0xba8f, 0xbb8f, 0xbc8f, 0xbd8f, 0xbe8f, 0xbf8f, 0xc08f, 0xc18f, 0xc28f, 0xc38f, 0xc48f, 0xc58f, 0xc68f, 0xc78f, 0xf0b7, 0xc88f, 0xc98f, 0xca8f, 0xcb8f, 0xcc8f, 0xcd8f, 0xce8f, 0xf1b7, 0xcf8f, 0xd08f, 0xd18f, 0xd28f, 0xd38f, 0xd48f, 0xd58f, 0xd68f, 0xd78f, 0xd88f, 0xd98f, 0xda8f, 0xdb8f, 0xdc8f, 0xdd8f, 0xde8f, 0xdf8f, 0xe08f, 0xe18f, 0xe28f, 0xe38f, 0xe48f, 0xe58f, 0xe68f, 0xe78f, 0xe88f, 0xe98f, 0xf2b7, 0xf3b7, 0xea8f, 0xeb8f, 0xf4b7, 0xec8f, 0xed8f, 0xee8f, 0xf5b7, 0xef8f, 0xf08f, 0xf18f, 0xf28f, 0xf38f, 0xf48f, 0xf58f, 0xf6b7, 0xf68f, 0xf78f, 0xf7b7, 0xf88f, 0xf8b7, 0xf98f, 0xfa8f, 0xfb8f, 0xfc8f, 0xfd8f, 0xfe8f, 0xf9b7, 0xfab7, 0x4190, 0x4290, 0xfbb7, 0x4390, 0x4490, 0x4590, 0xfcb7, 0x4690, 0x4790, 0x4890, 0x4990, 0x4a90, 0x4b90, 0x4c90, 0xfdb7, 0xfeb7, 0x4d90, 0xa1b8, 0x4e90, 0xa2b8, 0x4f90, 0x5090, 0x5190, 0x5290, 0x5390, 0x5490, 0xa3b8, 0xa4b8, 0x5590, 0x5690, 0xa5b8, 0x5790, 0x5890, 0x5990, 0xa6b8, 0x5a90, 0x6190, 0x6290, 0x6390, 0x6490, 0x6590, 0x6690, 0xa7b8, 0xa8b8, 0x6790, 0xa9b8, 0x6890, 0xaab8, 0xabb8, 0x6990, 0x6a90, 0xacb8, 0xadb8, 0x6b90, 0x6c90, 0x6d90, 0x6e90, 0x6f90, 0x7090, 0x7190, 0x7290, 0x7390, 0x7490, 0x7590, 0x7690, 0x7790, 0x7890, 0x7990, 0x7a90, 0x8190, 0x8290, 0x8390, 0x8490, 0x8590, 0x8690, 0x8790, 0x8890, 0x8990, 0x8a90, 0x8b90, 0x8c90, 0x8d90, 0xaeb8, 0xafb8, 0x8e90, 0x8f90, 0xb0b8, 0x9090, 0x9190, 0x9290, 0xb1b8, 0x9390, 0x9490, 0x9590, 0x9690, 0x9790, 0x9890, 0x9990, 0xb2b8, 0xb3b8, 0x9a90, 0xb4b8, 0x9b90, 0xb5b8, 0x9c90, 0x9d90, 0x9e90, 0x9f90, 0xa090, 0xa190, 0xb6b8, 0xb7b8, 0xa290, 0xa390, 0xb8b8, 0xa490, 0xb9b8, 0xbab8, 0xbbb8, 0xbcb8, 0xbdb8, 0xa590, 0xa690, 0xa790, 0xa890, 0xa990, 0xbeb8, 0xbfb8, 0xaa90, 0xc0b8, 0xab90, 0xc1b8, 0xc2b8, 0xac90, 0xad90, 0xc3b8, 0xae90, 0xc4b8, 0xc5b8, 0xc6b8, 0xaf90, 0xb090, 0xc7b8, 0xb190, 0xb290, 0xb390, 0xc8b8, 0xb490, 0xb590, 0xb690, 0xb790, 0xb890, 0xb990, 0xba90, 0xc9b8, 0xcab8, 0xbb90, 0xcbb8, 0xccb8, 0xcdb8, 0xceb8, 0xbc90, 0xbd90, 0xbe90, 0xbf90, 0xc090, 0xcfb8, 0xd0b8, 0xc190, 0xc290, 0xc390, 0xc490, 0xc590, 0xc690, 0xd1b8, 0xc790, 0xc890, 0xc990, 0xca90, 0xcb90, 0xcc90, 0xcd90, 0xce90, 0xcf90, 0xd090, 0xd190, 0xd290, 0xd2b8, 0xd390, 0xd490, 0xd590, 0xd690, 0xd790, 0xd890, 0xd990, 0xda90, 0xdb90, 0xdc90, 0xdd90, 0xde90, 0xdf90, 0xe090, 0xe190, 0xe290, 0xe390, 0xe490, 0xe590, 0xe690, 0xe790, 0xe890, 0xe990, 0xea90, 0xeb90, 0xec90, 0xed90, 0xee90, 0xef90, 0xf090, 0xf190, 0xf290, 0xf390, 0xf490, 0xd3b8, 0xd4b8, 0xf590, 0xf690, 0xd5b8, 0xf790, 0xf890, 0xf990, 0xd6b8, 0xfa90, 0xd7b8, 0xfb90, 0xfc90, 0xfd90, 0xfe90, 0x4191, 0xd8b8, 0xd9b8, 0x4291, 0xdab8, 0x4391, 0xdbb8, 0xdcb8, 0x4491, 0x4591, 0x4691, 0x4791, 0xddb8, 0xdeb8, 0xdfb8, 0x4891, 0x4991, 0xe0b8, 0x4a91, 0x4b91, 0x4c91, 0xe1b8, 0x4d91, 0x4e91, 0x4f91, 0x5091, 0x5191, 0x5291, 0x5391, 0xe2b8, 0xe3b8, 0x5491, 0xe4b8, 0xe5b8, 0xe6b8, 0x5591, 0x5691, 0x5791, 0x5891, 0x5991, 0x5a91, 0xe7b8, 0xe8b8, 0x6191, 0x6291, 0xe9b8, 0x6391, 0x6491, 0x6591, 0xeab8, 0x6691, 0x6791, 0x6891, 0x6991, 0x6a91, 0x6b91, 0x6c91, 0x6d91, 0x6e91, 0x6f91, 0xebb8, 0xecb8, 0xedb8, 0x7091, 0xeeb8, 0x7191, 0x7291, 0x7391, 0x7491, 0xefb8, 0x7591, 0x7691, 0x7791, 0x7891, 0x7991, 0x7a91, 0x8191, 0x8291, 0x8391, 0x8491, 0x8591, 0x8691, 0x8791, 0x8891, 0x8991, 0x8a91, 0x8b91, 0x8c91, 0x8d91, 0x8e91, 0x8f91, 0x9091, 0x9191, 0x9291, 0x9391, 0x9491, 0x9591, 0xf0b8, 0xf1b8, 0x9691, 0xf2b8, 0xf3b8, 0x9791, 0x9891, 0x9991, 0xf4b8, 0x9a91, 0xf5b8, 0x9b91, 0x9c91, 0x9d91, 0x9e91, 0x9f91, 0xf6b8, 0xf7b8, 0xa091, 0xf8b8, 0xa191, 0xf9b8, 0xa291, 0xa391, 0xa491, 0xa591, 0xa691, 0xa791, 0xfab8, 0xa891, 0xa991, 0xaa91, 0xfbb8, 0xab91, 0xac91, 0xad91, 0xae91, 0xaf91, 0xb091, 0xb191, 0xb291, 0xb391, 0xb491, 0xb591, 0xb691, 0xb791, 0xb891, 0xb991, 0xfcb8, 0xfdb8, 0xba91, 0xbb91, 0xbc91, 0xbd91, 0xbe91, 0xbf91, 0xc091, 0xc191, 0xc291, 0xc391, 0xc491, 0xc591, 0xc691, 0xc791, 0xc891, 0xc991, 0xca91, 0xcb91, 0xcc91, 0xcd91, 0xce91, 0xcf91, 0xd091, 0xd191, 0xd291, 0xd391, 0xd491, 0xd591, 0xd691, 0xd791, 0xd891, 0xd991, 0xda91, 0xdb91, 0xfeb8, 0xdc91, 0xdd91, 0xde91, 0xa1b9, 0xdf91, 0xe091, 0xe191, 0xa2b9, 0xe291, 0xe391, 0xe491, 0xe591, 0xe691, 0xe791, 0xe891, 0xe991, 0xa3b9, 0xea91, 0xa4b9, 0xeb91, 0xa5b9, 0xec91, 0xed91, 0xee91, 0xef91, 0xf091, 0xf191, 0xa6b9, 0xf291, 0xf391, 0xf491, 0xa7b9, 0xf591, 0xf691, 0xf791, 0xa8b9, 0xf891, 0xf991, 0xfa91, 0xfb91, 0xfc91, 0xfd91, 0xfe91, 0x4192, 0xa9b9, 0x4292, 0xaab9, 0x4392, 0x4492, 0x4592, 0x4692, 0x4792, 0x4892, 0x4992, 0x4a92, 0xabb9, 0xacb9, 0xadb9, 0x4b92, 0xaeb9, 0x4c92, 0x4d92, 0xafb9, 0xb0b9, 0xb1b9, 0xb2b9, 0x4e92, 0x4f92, 0x5092, 0x5192, 0x5292, 0xb3b9, 0xb4b9, 0x5392, 0xb5b9, 0x5492, 0xb6b9, 0x5592, 0x5692, 0x5792, 0xb7b9, 0x5892, 0xb8b9, 0xb9b9, 0x5992, 0x5a92, 0x6192, 0xbab9, 0x6292, 0x6392, 0x6492, 0xbbb9, 0x6592, 0x6692, 0x6792, 0x6892, 0x6992, 0x6a92, 0x6b92, 0x6c92, 0xbcb9, 0x6d92, 0xbdb9, 0x6e92, 0x6f92, 0x7092, 0x7192, 0x7292, 0x7392, 0x7492, 0x7592, 0xbeb9, 0x7692, 0x7792, 0x7892, 0x7992, 0x7a92, 0x8192, 0x8292, 0x8392, 0x8492, 0x8592, 0x8692, 0x8792, 0x8892, 0x8992, 0x8a92, 0x8b92, 0x8c92, 0x8d92, 0x8e92, 0x8f92, 0x9092, 0x9192, 0x9292, 0x9392, 0x9492, 0x9592, 0x9692, 0xbfb9, 0x9792, 0x9892, 0x9992, 0xc0b9, 0x9a92, 0x9b92, 0x9c92, 0xc1b9, 0x9d92, 0x9e92, 0x9f92, 0xa092, 0xa192, 0xa292, 0xa392, 0xa492, 0xa592, 0xa692, 0xa792, 0xa892, 0xa992, 0xaa92, 0xab92, 0xac92, 0xad92, 0xae92, 0xaf92, 0xc2b9, 0xb092, 0xb192, 0xb292, 0xc3b9, 0xb392, 0xb492, 0xb592, 0xc4b9, 0xb692, 0xb792, 0xb892, 0xb992, 0xba92, 0xbb92, 0xbc92, 0xc5b9, 0xbd92, 0xbe92, 0xc6b9, 0xbf92, 0xc092, 0xc192, 0xc292, 0xc392, 0xc492, 0xc592, 0xc692, 0xc7b9, 0xc792, 0xc892, 0xc992, 0xc8b9, 0xca92, 0xcb92, 0xcc92, 0xc9b9, 0xcd92, 0xce92, 0xcf92, 0xd092, 0xd192, 0xd292, 0xd392, 0xcab9, 0xd492, 0xd592, 0xcbb9, 0xd692, 0xd792, 0xd892, 0xd992, 0xda92, 0xdb92, 0xdc92, 0xdd92, 0xde92, 0xdf92, 0xe092, 0xe192, 0xe292, 0xe392, 0xe492, 0xe592, 0xe692, 0xe792, 0xe892, 0xe992, 0xea92, 0xeb92, 0xec92, 0xed92, 0xee92, 0xef92, 0xf092, 0xf192, 0xf292, 0xf392, 0xf492, 0xf592, 0xf692, 0xf792, 0xf892, 0xf992, 0xccb9, 0xcdb9, 0xfa92, 0xfb92, 0xceb9, 0xfc92, 0xfd92, 0xcfb9, 0xd0b9, 0xfe92, 0xd1b9, 0x4193, 0x4293, 0x4393, 0x4493, 0x4593, 0xd2b9, 0xd3b9, 0x4693, 0xd4b9, 0xd5b9, 0xd6b9, 0x4793, 0xd7b9, 0x4893, 0xd8b9, 0x4993, 0x4a93, 0xd9b9, 0xdab9, 0xdbb9, 0xdcb9, 0xddb9, 0x4b93, 0x4c93, 0xdeb9, 0xdfb9, 0xe0b9, 0xe1b9, 0xe2b9, 0x4d93, 0x4e93, 0x4f93, 0x5093, 0xe3b9, 0xe4b9, 0x5193, 0xe5b9, 0x5293, 0xe6b9, 0x5393, 0x5493, 0x5593, 0xe7b9, 0x5693, 0x5793, 0xe8b9, 0xe9b9, 0x5893, 0x5993, 0xeab9, 0x5a93, 0x6193, 0x6293, 0xebb9, 0x6393, 0x6493, 0x6593, 0x6693, 0x6793, 0x6893, 0x6993, 0xecb9, 0xedb9, 0x6a93, 0xeeb9, 0xefb9, 0xf0b9, 0x6b93, 0x6c93, 0x6d93, 0xf1b9, 0x6e93, 0x6f93, 0xf2b9, 0xf3b9, 0x7093, 0x7193, 0xf4b9, 0x7293, 0x7393, 0x7493, 0x7593, 0x7693, 0x7793, 0x7893, 0x7993, 0x7a93, 0x8193, 0x8293, 0x8393, 0xf5b9, 0x8493, 0x8593, 0x8693, 0x8793, 0x8893, 0x8993, 0x8a93, 0x8b93, 0x8c93, 0x8d93, 0x8e93, 0x8f93, 0x9093, 0x9193, 0x9293, 0x9393, 0x9493, 0x9593, 0x9693, 0x9793, 0x9893, 0x9993, 0x9a93, 0x9b93, 0x9c93, 0x9d93, 0x9e93, 0x9f93, 0xa093, 0xa193, 0xa293, 0xa393, 0xa493, 0xa593, 0xa693, 0xa793, 0xa893, 0xa993, 0xf6b9, 0xf7b9, 0xaa93, 0xab93, 0xf8b9, 0xac93, 0xad93, 0xf9b9, 0xfab9, 0xae93, 0xfbb9, 0xaf93, 0xb093, 0xb193, 0xb293, 0xb393, 0xfcb9, 0xfdb9, 0xb493, 0xfeb9, 0xb593, 0xa1ba, 0xa2ba, 0xb693, 0xb793, 0xb893, 0xb993, 0xba93, 0xa3ba, 0xa4ba, 0xbb93, 0xbc93, 0xa5ba, 0xbd93, 0xbe93, 0xa6ba, 0xa7ba, 0xbf93, 0xc093, 0xc193, 0xc293, 0xc393, 0xc493, 0xc593, 0xa8ba, 0xa9ba, 0xc693, 0xaaba, 0xabba, 0xacba, 0xc793, 0xc893, 0xc993, 0xca93, 0xcb93, 0xcc93, 0xadba, 0xaeba, 0xcd93, 0xce93, 0xafba, 0xcf93, 0xd093, 0xd193, 0xb0ba, 0xd293, 0xd393, 0xd493, 0xd593, 0xd693, 0xd793, 0xd893, 0xd993, 0xb1ba, 0xda93, 0xb2ba, 0xb3ba, 0xb4ba, 0xdb93, 0xdc93, 0xdd93, 0xb5ba, 0xde93, 0xdf93, 0xb6ba, 0xe093, 0xe193, 0xe293, 0xb7ba, 0xe393, 0xe493, 0xe593, 0xe693, 0xe793, 0xe893, 0xe993, 0xea93, 0xeb93, 0xec93, 0xed93, 0xee93, 0xef93, 0xf093, 0xf193, 0xf293, 0xf393, 0xf493, 0xf593, 0xf693, 0xf793, 0xf893, 0xf993, 0xb8ba, 0xb9ba, 0xbaba, 0xfa93, 0xbbba, 0xfb93, 0xfc93, 0xfd93, 0xbcba, 0xfe93, 0x4194, 0x4294, 0x4394, 0x4494, 0x4594, 0x4694, 0xbdba, 0xbeba, 0x4794, 0xbfba, 0x4894, 0xc0ba, 0x4994, 0x4a94, 0x4b94, 0x4c94, 0x4d94, 0x4e94, 0xc1ba, 0x4f94, 0x5094, 0x5194, 0xc2ba, 0x5294, 0x5394, 0x5494, 0x5594, 0x5694, 0x5794, 0x5894, 0x5994, 0x5a94, 0x6194, 0x6294, 0x6394, 0x6494, 0x6594, 0x6694, 0xc3ba, 0x6794, 0x6894, 0x6994, 0x6a94, 0x6b94, 0x6c94, 0x6d94, 0xc4ba, 0x6e94, 0x6f94, 0x7094, 0x7194, 0x7294, 0x7394, 0x7494, 0x7594, 0x7694, 0x7794, 0x7894, 0x7994, 0x7a94, 0x8194, 0x8294, 0x8394, 0x8494, 0x8594, 0x8694, 0xc5ba, 0x8794, 0x8894, 0x8994, 0x8a94, 0x8b94, 0x8c94, 0x8d94, 0xc6ba, 0xc7ba, 0x8e94, 0x8f94, 0xc8ba, 0x9094, 0x9194, 0x9294, 0xc9ba, 0x9394, 0x9494, 0x9594, 0x9694, 0x9794, 0x9894, 0x9994, 0xcaba, 0xcbba, 0x9a94, 0x9b94, 0x9c94, 0x9d94, 0x9e94, 0x9f94, 0xa094, 0xa194, 0xa294, 0xa394, 0xccba, 0xa494, 0xa594, 0xa694, 0xcdba, 0xa794, 0xa894, 0xa994, 0xaa94, 0xab94, 0xac94, 0xad94, 0xae94, 0xaf94, 0xb094, 0xb194, 0xb294, 0xb394, 0xb494, 0xb594, 0xb694, 0xb794, 0xb894, 0xb994, 0xba94, 0xbb94, 0xbc94, 0xbd94, 0xceba, 0xcfba, 0xbe94, 0xbf94, 0xd0ba, 0xc094, 0xc194, 0xd1ba, 0xd2ba, 0xd3ba, 0xd4ba, 0xc294, 0xc394, 0xc494, 0xc594, 0xc694, 0xd5ba, 0xd6ba, 0xc794, 0xd7ba, 0xc894, 0xd8ba, 0xc994, 0xca94, 0xcb94, 0xd9ba, 0xdaba, 0xcc94, 0xdbba, 0xcd94, 0xce94, 0xcf94, 0xd094, 0xd194, 0xd294, 0xd394, 0xdcba, 0xd494, 0xd594, 0xd694, 0xd794, 0xd894, 0xd994, 0xda94, 0xdb94, 0xdc94, 0xdd94, 0xde94, 0xddba, 0xdf94, 0xe094, 0xe194, 0xe294, 0xe394, 0xe494, 0xe594, 0xdeba, 0xe694, 0xe794, 0xe894, 0xe994, 0xea94, 0xeb94, 0xec94, 0xed94, 0xee94, 0xef94, 0xf094, 0xf194, 0xf294, 0xf394, 0xf494, 0xf594, 0xf694, 0xf794, 0xf894, 0xf994, 0xfa94, 0xfb94, 0xfc94, 0xfd94, 0xfe94, 0x4195, 0x4295, 0xdfba, 0xe0ba, 0x4395, 0x4495, 0xe1ba, 0x4595, 0x4695, 0x4795, 0xe2ba, 0x4895, 0x4995, 0x4a95, 0x4b95, 0x4c95, 0x4d95, 0x4e95, 0x4f95, 0x5095, 0x5195, 0x5295, 0x5395, 0xe3ba, 0x5495, 0x5595, 0x5695, 0x5795, 0x5895, 0x5995, 0xe4ba, 0x5a95, 0x6195, 0x6295, 0xe5ba, 0x6395, 0x6495, 0x6595, 0xe6ba, 0x6695, 0x6795, 0x6895, 0x6995, 0x6a95, 0x6b95, 0x6c95, 0xe7ba, 0x6d95, 0x6e95, 0xe8ba, 0x6f95, 0xe9ba, 0x7095, 0x7195, 0x7295, 0x7395, 0x7495, 0x7595, 0xeaba, 0xebba, 0x7695, 0x7795, 0xecba, 0x7895, 0x7995, 0x7a95, 0xedba, 0x8195, 0x8295, 0x8395, 0x8495, 0x8595, 0x8695, 0x8795, 0xeeba, 0xefba, 0x8895, 0xf0ba, 0x8995, 0x8a95, 0x8b95, 0x8c95, 0x8d95, 0x8e95, 0x8f95, 0x9095, 0x9195, 0x9295, 0x9395, 0x9495, 0x9595, 0x9695, 0x9795, 0x9895, 0x9995, 0x9a95, 0x9b95, 0x9c95, 0x9d95, 0x9e95, 0x9f95, 0xa095, 0xa195, 0xa295, 0xa395, 0xa495, 0xa595, 0xa695, 0xa795, 0xa895, 0xa995, 0xaa95, 0xab95, 0xac95, 0xf1ba, 0xf2ba, 0xad95, 0xae95, 0xf3ba, 0xaf95, 0xb095, 0xb195, 0xf4ba, 0xb295, 0xf5ba, 0xb395, 0xb495, 0xb595, 0xb695, 0xb795, 0xf6ba, 0xf7ba, 0xb895, 0xf8ba, 0xb995, 0xf9ba, 0xfaba, 0xfbba, 0xba95, 0xbb95, 0xbc95, 0xbd95, 0xfcba, 0xfdba, 0xbe95, 0xbf95, 0xfeba, 0xc095, 0xc195, 0xc295, 0xa1bb, 0xc395, 0xa2bb, 0xc495, 0xc595, 0xc695, 0xc795, 0xc895, 0xa3bb, 0xa4bb, 0xc995, 0xa5bb, 0xa6bb, 0xa7bb, 0xca95, 0xcb95, 0xcc95, 0xcd95, 0xce95, 0xa8bb, 0xa9bb, 0xaabb, 0xcf95, 0xd095, 0xabbb, 0xd195, 0xd295, 0xd395, 0xacbb, 0xd495, 0xd595, 0xd695, 0xd795, 0xd895, 0xd995, 0xda95, 0xadbb, 0xaebb, 0xdb95, 0xafbb, 0xb0bb, 0xb1bb, 0xdc95, 0xdd95, 0xde95, 0xdf95, 0xe095, 0xe195, 0xb2bb, 0xb3bb, 0xe295, 0xe395, 0xe495, 0xe595, 0xe695, 0xe795, 0xe895, 0xe995, 0xea95, 0xeb95, 0xec95, 0xed95, 0xee95, 0xef95, 0xb4bb, 0xf095, 0xf195, 0xf295, 0xf395, 0xf495, 0xf595, 0xf695, 0xf795, 0xf895, 0xf995, 0xfa95, 0xfb95, 0xfc95, 0xfd95, 0xfe95, 0x4196, 0x4296, 0x4396, 0x4496, 0x4596, 0x4696, 0x4796, 0x4896, 0x4996, 0x4a96, 0x4b96, 0x4c96, 0x4d96, 0x4e96, 0x4f96, 0x5096, 0x5196, 0x5296, 0x5396, 0x5496, 0x5596, 0x5696, 0x5796, 0x5896, 0xb5bb, 0xb6bb, 0x5996, 0x5a96, 0xb7bb, 0x6196, 0x6296, 0xb8bb, 0xb9bb, 0x6396, 0x6496, 0x6596, 0x6696, 0x6796, 0x6896, 0x6996, 0xbabb, 0x6a96, 0x6b96, 0xbbbb, 0xbcbb, 0xbdbb, 0x6c96, 0x6d96, 0x6e96, 0x6f96, 0x7096, 0x7196, 0xbebb, 0x7296, 0x7396, 0x7496, 0x7596, 0x7696, 0x7796, 0x7896, 0x7996, 0x7a96, 0x8196, 0x8296, 0x8396, 0x8496, 0x8596, 0x8696, 0x8796, 0x8896, 0x8996, 0x8a96, 0x8b96, 0xbfbb, 0x8c96, 0x8d96, 0x8e96, 0x8f96, 0x9096, 0x9196, 0xc0bb, 0xc1bb, 0x9296, 0x9396, 0x9496, 0x9596, 0x9696, 0x9796, 0x9896, 0x9996, 0x9a96, 0x9b96, 0x9c96, 0x9d96, 0x9e96, 0x9f96, 0xc2bb, 0xc3bb, 0xa096, 0xc4bb, 0xc5bb, 0xc6bb, 0xa196, 0xa296, 0xa396, 0xa496, 0xa596, 0xa696, 0xa796, 0xa896, 0xa996, 0xaa96, 0xab96, 0xac96, 0xad96, 0xae96, 0xaf96, 0xb096, 0xb196, 0xb296, 0xb396, 0xb496, 0xb596, 0xb696, 0xb796, 0xb896, 0xb996, 0xba96, 0xbb96, 0xbc96, 0xbd96, 0xbe96, 0xbf96, 0xc096, 0xc196, 0xc296, 0xc7bb, 0xc8bb, 0xc396, 0xc496, 0xc9bb, 0xc596, 0xc696, 0xc796, 0xcabb, 0xc896, 0xc996, 0xca96, 0xcb96, 0xcc96, 0xcd96, 0xce96, 0xcbbb, 0xccbb, 0xcf96, 0xd096, 0xd196, 0xcdbb, 0xd296, 0xd396, 0xd496, 0xd596, 0xd696, 0xd796, 0xd896, 0xd996, 0xda96, 0xdb96, 0xdc96, 0xdd96, 0xde96, 0xdf96, 0xe096, 0xe196, 0xe296, 0xe396, 0xe496, 0xe596, 0xe696, 0xe796, 0xe896, 0xe996, 0xea96, 0xeb96, 0xec96, 0xed96, 0xee96, 0xef96, 0xf096, 0xf196, 0xf296, 0xf396, 0xf496, 0xf596, 0xf696, 0xf796, 0xf896, 0xf996, 0xfa96, 0xfb96, 0xfc96, 0xfd96, 0xfe96, 0x4197, 0x4297, 0x4397, 0x4497, 0x4597, 0x4697, 0x4797, 0x4897, 0x4997, 0x4a97, 0x4b97, 0x4c97, 0x4d97, 0x4e97, 0x4f97, 0x5097, 0x5197, 0xcebb, 0x5297, 0x5397, 0x5497, 0x5597, 0x5697, 0x5797, 0x5897, 0x5997, 0x5a97, 0x6197, 0x6297, 0x6397, 0x6497, 0x6597, 0x6697, 0x6797, 0x6897, 0x6997, 0x6a97, 0x6b97, 0x6c97, 0x6d97, 0x6e97, 0x6f97, 0x7097, 0x7197, 0x7297, 0xcfbb, 0x7397, 0x7497, 0x7597, 0x7697, 0x7797, 0x7897, 0x7997, 0x7a97, 0x8197, 0x8297, 0x8397, 0x8497, 0x8597, 0x8697, 0x8797, 0x8897, 0x8997, 0x8a97, 0x8b97, 0x8c97, 0xd0bb, 0x8d97, 0x8e97, 0x8f97, 0x9097, 0x9197, 0x9297, 0xd1bb, 0xd2bb, 0x9397, 0x9497, 0xd3bb, 0x9597, 0x9697, 0x9797, 0xd4bb, 0x9897, 0x9997, 0x9a97, 0x9b97, 0x9c97, 0x9d97, 0x9e97, 0xd5bb, 0x9f97, 0xa097, 0xd6bb, 0xa197, 0xd7bb, 0xa297, 0xa397, 0xa497, 0xa597, 0xa697, 0xa797, 0xa897, 0xa997, 0xaa97, 0xab97, 0xac97, 0xad97, 0xae97, 0xaf97, 0xb097, 0xb197, 0xb297, 0xb397, 0xb497, 0xb597, 0xb697, 0xb797, 0xb897, 0xb997, 0xba97, 0xbb97, 0xbc97, 0xbd97, 0xbe97, 0xbf97, 0xc097, 0xc197, 0xc297, 0xc397, 0xc497, 0xc597, 0xc697, 0xc797, 0xc897, 0xc997, 0xca97, 0xcb97, 0xcc97, 0xcd97, 0xce97, 0xcf97, 0xd097, 0xd197, 0xd297, 0xd397, 0xd497, 0xd597, 0xd697, 0xd797, 0xd897, 0xd997, 0xda97, 0xdb97, 0xdc97, 0xdd97, 0xde97, 0xdf97, 0xe097, 0xe197, 0xe297, 0xe397, 0xe497, 0xe597, 0xe697, 0xe797, 0xe897, 0xe997, 0xea97, 0xeb97, 0xec97, 0xed97, 0xee97, 0xef97, 0xf097, 0xf197, 0xf297, 0xf397, 0xf497, 0xf597, 0xf697, 0xf797, 0xf897, 0xf997, 0xfa97, 0xfb97, 0xd8bb, 0xfc97, 0xfd97, 0xfe97, 0x4198, 0x4298, 0x4398, 0x4498, 0x4598, 0x4698, 0x4798, 0x4898, 0x4998, 0x4a98, 0x4b98, 0x4c98, 0x4d98, 0x4e98, 0x4f98, 0x5098, 0x5198, 0xd9bb, 0x5298, 0x5398, 0x5498, 0x5598, 0x5698, 0x5798, 0xdabb, 0x5898, 0x5998, 0x5a98, 0xdbbb, 0x6198, 0x6298, 0x6398, 0xdcbb, 0x6498, 0x6598, 0x6698, 0x6798, 0x6898, 0x6998, 0x6a98, 0xddbb, 0xdebb, 0x6b98, 0x6c98, 0x6d98, 0x6e98, 0x6f98, 0x7098, 0x7198, 0x7298, 0x7398, 0x7498, 0x7598, 0x7698, 0x7798, 0x7898, 0x7998, 0x7a98, 0x8198, 0x8298, 0x8398, 0x8498, 0x8598, 0x8698, 0x8798, 0x8898, 0x8998, 0x8a98, 0x8b98, 0x8c98, 0x8d98, 0x8e98, 0x8f98, 0x9098, 0x9198, 0x9298, 0x9398, 0x9498, 0x9598, 0x9698, 0xdfbb, 0xe0bb, 0x9798, 0x9898, 0xe1bb, 0x9998, 0x9a98, 0x9b98, 0xe2bb, 0x9c98, 0x9d98, 0x9e98, 0x9f98, 0xa098, 0xa198, 0xa298, 0xe3bb, 0xe4bb, 0xa398, 0xe5bb, 0xa498, 0xe6bb, 0xa598, 0xa698, 0xa798, 0xa898, 0xa998, 0xaa98, 0xe7bb, 0xe8bb, 0xab98, 0xe9bb, 0xeabb, 0xac98, 0xad98, 0xebbb, 0xecbb, 0xedbb, 0xeebb, 0xae98, 0xaf98, 0xb098, 0xb198, 0xb298, 0xefbb, 0xf0bb, 0xb398, 0xf1bb, 0xf2bb, 0xf3bb, 0xb498, 0xb598, 0xb698, 0xf4bb, 0xb798, 0xb898, 0xf5bb, 0xf6bb, 0xb998, 0xba98, 0xf7bb, 0xbb98, 0xbc98, 0xbd98, 0xf8bb, 0xbe98, 0xbf98, 0xc098, 0xc198, 0xc298, 0xc398, 0xc498, 0xf9bb, 0xfabb, 0xc598, 0xfbbb, 0xfcbb, 0xfdbb, 0xc698, 0xc798, 0xc898, 0xc998, 0xca98, 0xcb98, 0xfebb, 0xa1bc, 0xcc98, 0xcd98, 0xa2bc, 0xce98, 0xcf98, 0xd098, 0xa3bc, 0xd198, 0xd298, 0xd398, 0xd498, 0xd598, 0xd698, 0xd798, 0xa4bc, 0xa5bc, 0xd898, 0xa6bc, 0xd998, 0xa7bc, 0xda98, 0xdb98, 0xdc98, 0xdd98, 0xde98, 0xdf98, 0xa8bc, 0xe098, 0xe198, 0xe298, 0xa9bc, 0xe398, 0xe498, 0xe598, 0xaabc, 0xe698, 0xe798, 0xe898, 0xe998, 0xea98, 0xeb98, 0xec98, 0xabbc, 0xed98, 0xee98, 0xef98, 0xf098, 0xacbc, 0xf198, 0xf298, 0xf398, 0xf498, 0xf598, 0xf698, 0xadbc, 0xaebc, 0xafbc, 0xb0bc, 0xb1bc, 0xf798, 0xf898, 0xb2bc, 0xb3bc, 0xf998, 0xb4bc, 0xb5bc, 0xfa98, 0xfb98, 0xfc98, 0xfd98, 0xb6bc, 0xb7bc, 0xfe98, 0xb8bc, 0xb9bc, 0xbabc, 0x4199, 0x4299, 0x4399, 0x4499, 0xbbbc, 0x4599, 0xbcbc, 0xbdbc, 0x4699, 0x4799, 0xbebc, 0x4899, 0x4999, 0x4a99, 0xbfbc, 0x4b99, 0x4c99, 0x4d99, 0x4e99, 0x4f99, 0x5099, 0x5199, 0xc0bc, 0xc1bc, 0x5299, 0xc2bc, 0xc3bc, 0xc4bc, 0x5399, 0x5499, 0x5599, 0x5699, 0x5799, 0x5899, 0xc5bc, 0xc6bc, 0x5999, 0x5a99, 0xc7bc, 0x6199, 0x6299, 0x6399, 0xc8bc, 0x6499, 0x6599, 0x6699, 0x6799, 0x6899, 0x6999, 0x6a99, 0xc9bc, 0xcabc, 0x6b99, 0xcbbc, 0xccbc, 0xcdbc, 0x6c99, 0x6d99, 0x6e99, 0x6f99, 0x7099, 0x7199, 0xcebc, 0x7299, 0x7399, 0x7499, 0xcfbc, 0x7599, 0x7699, 0x7799, 0xd0bc, 0x7899, 0x7999, 0x7a99, 0x8199, 0x8299, 0x8399, 0x8499, 0x8599, 0x8699, 0x8799, 0x8899, 0x8999, 0xd1bc, 0x8a99, 0x8b99, 0x8c99, 0x8d99, 0x8e99, 0x8f99, 0xd2bc, 0xd3bc, 0xd4bc, 0x9099, 0xd5bc, 0x9199, 0x9299, 0x9399, 0xd6bc, 0x9499, 0xd7bc, 0x9599, 0x9699, 0x9799, 0x9899, 0x9999, 0xd8bc, 0xd9bc, 0x9a99, 0xdabc, 0x9b99, 0xdbbc, 0x9c99, 0x9d99, 0x9e99, 0xdcbc, 0x9f99, 0xa099, 0xddbc, 0xdebc, 0xa199, 0xa299, 0xdfbc, 0xa399, 0xa499, 0xa599, 0xe0bc, 0xa699, 0xa799, 0xa899, 0xa999, 0xaa99, 0xab99, 0xac99, 0xad99, 0xae99, 0xaf99, 0xb099, 0xb199, 0xe1bc, 0xb299, 0xb399, 0xb499, 0xb599, 0xb699, 0xb799, 0xe2bc, 0xb899, 0xb999, 0xba99, 0xe3bc, 0xbb99, 0xbc99, 0xbd99, 0xe4bc, 0xbe99, 0xbf99, 0xc099, 0xc199, 0xc299, 0xc399, 0xc499, 0xe5bc, 0xc599, 0xc699, 0xe6bc, 0xe7bc, 0xc799, 0xc899, 0xc999, 0xca99, 0xcb99, 0xcc99, 0xcd99, 0xe8bc, 0xce99, 0xcf99, 0xd099, 0xe9bc, 0xd199, 0xd299, 0xd399, 0xeabc, 0xd499, 0xd599, 0xd699, 0xd799, 0xd899, 0xd999, 0xda99, 0xebbc, 0xecbc, 0xdb99, 0xedbc, 0xdc99, 0xdd99, 0xde99, 0xdf99, 0xe099, 0xe199, 0xe299, 0xe399, 0xeebc, 0xefbc, 0xe499, 0xe599, 0xf0bc, 0xe699, 0xe799, 0xe899, 0xf1bc, 0xe999, 0xea99, 0xeb99, 0xec99, 0xed99, 0xee99, 0xef99, 0xf2bc, 0xf3bc, 0xf099, 0xf4bc, 0xf199, 0xf5bc, 0xf299, 0xf399, 0xf499, 0xf599, 0xf699, 0xf799, 0xf6bc, 0xf7bc, 0xf899, 0xf999, 0xf8bc, 0xfa99, 0xfb99, 0xf9bc, 0xfabc, 0xfc99, 0xfd99, 0xfe99, 0x419a, 0x429a, 0x439a, 0x449a, 0xfbbc, 0xfcbc, 0x459a, 0xfdbc, 0x469a, 0xfebc, 0x479a, 0xa1bd, 0x489a, 0xa2bd, 0xa3bd, 0x499a, 0xa4bd, 0x4a9a, 0x4b9a, 0x4c9a, 0x4d9a, 0x4e9a, 0x4f9a, 0x509a, 0x519a, 0x529a, 0x539a, 0x549a, 0x559a, 0x569a, 0x579a, 0x589a, 0x599a, 0x5a9a, 0x619a, 0x629a, 0xa5bd, 0x639a, 0x649a, 0x659a, 0x669a, 0x679a, 0x689a, 0x699a, 0xa6bd, 0xa7bd, 0x6a9a, 0x6b9a, 0xa8bd, 0x6c9a, 0x6d9a, 0x6e9a, 0xa9bd, 0x6f9a, 0x709a, 0x719a, 0x729a, 0x739a, 0x749a, 0x759a, 0xaabd, 0x769a, 0x779a, 0x789a, 0x799a, 0xabbd, 0x7a9a, 0x819a, 0x829a, 0x839a, 0x849a, 0x859a, 0xacbd, 0xadbd, 0x869a, 0x879a, 0xaebd, 0x889a, 0x899a, 0x8a9a, 0xafbd, 0x8b9a, 0x8c9a, 0x8d9a, 0x8e9a, 0x8f9a, 0x909a, 0x919a, 0xb0bd, 0xb1bd, 0x929a, 0xb2bd, 0x939a, 0xb3bd, 0x949a, 0x959a, 0x969a, 0x979a, 0x989a, 0x999a, 0xb4bd, 0xb5bd, 0x9a9a, 0x9b9a, 0x9c9a, 0x9d9a, 0x9e9a, 0x9f9a, 0xb6bd, 0xa09a, 0xa19a, 0xa29a, 0xa39a, 0xa49a, 0xa59a, 0xa69a, 0xb7bd, 0xa79a, 0xa89a, 0xb8bd, 0xa99a, 0xb9bd, 0xaa9a, 0xab9a, 0xac9a, 0xad9a, 0xae9a, 0xaf9a, 0xbabd, 0xbbbd, 0xb09a, 0xb19a, 0xbcbd, 0xb29a, 0xb39a, 0xb49a, 0xbdbd, 0xbebd, 0xb59a, 0xb69a, 0xb79a, 0xb89a, 0xb99a, 0xba9a, 0xbfbd, 0xc0bd, 0xbb9a, 0xc1bd, 0xbc9a, 0xc2bd, 0xbd9a, 0xbe9a, 0xbf9a, 0xc09a, 0xc19a, 0xc29a, 0xc39a, 0xc49a, 0xc59a, 0xc69a, 0xc79a, 0xc89a, 0xc99a, 0xca9a, 0xcb9a, 0xcc9a, 0xcd9a, 0xce9a, 0xcf9a, 0xd09a, 0xd19a, 0xd29a, 0xd39a, 0xd49a, 0xd59a, 0xd69a, 0xd79a, 0xd89a, 0xd99a, 0xda9a, 0xdb9a, 0xdc9a, 0xdd9a, 0xde9a, 0xc3bd, 0xc4bd, 0xdf9a, 0xe09a, 0xc5bd, 0xe19a, 0xe29a, 0xc6bd, 0xc7bd, 0xe39a, 0xe49a, 0xe59a, 0xe69a, 0xe79a, 0xe89a, 0xc8bd, 0xc9bd, 0xcabd, 0xe99a, 0xcbbd, 0xea9a, 0xccbd, 0xeb9a, 0xec9a, 0xed9a, 0xee9a, 0xcdbd, 0xef9a, 0xcebd, 0xcfbd, 0xf09a, 0xd0bd, 0xd1bd, 0xf19a, 0xf29a, 0xf39a, 0xd2bd, 0xf49a, 0xf59a, 0xf69a, 0xf79a, 0xf89a, 0xf99a, 0xfa9a, 0xd3bd, 0xd4bd, 0xfb9a, 0xfc9a, 0xd5bd, 0xd6bd, 0xfd9a, 0xfe9a, 0x419b, 0x429b, 0x439b, 0xd7bd, 0xd8bd, 0xd9bd, 0x449b, 0x459b, 0xdabd, 0x469b, 0x479b, 0x489b, 0xdbbd, 0x499b, 0x4a9b, 0x4b9b, 0x4c9b, 0x4d9b, 0x4e9b, 0x4f9b, 0xdcbd, 0xddbd, 0x509b, 0x519b, 0xdebd, 0xdfbd, 0x529b, 0x539b, 0x549b, 0x559b, 0x569b, 0x579b, 0x589b, 0x599b, 0x5a9b, 0x619b, 0x629b, 0x639b, 0x649b, 0x659b, 0x669b, 0x679b, 0x689b, 0x699b, 0x6a9b, 0x6b9b, 0x6c9b, 0x6d9b, 0x6e9b, 0x6f9b, 0x709b, 0x719b, 0x729b, 0xe0bd, 0x739b, 0x749b, 0x759b, 0x769b, 0x779b, 0x789b, 0x799b, 0x7a9b, 0x819b, 0x829b, 0x839b, 0x849b, 0x859b, 0x869b, 0x879b, 0x889b, 0x899b, 0x8a9b, 0x8b9b, 0x8c9b, 0x8d9b, 0x8e9b, 0x8f9b, 0x909b, 0x919b, 0x929b, 0x939b, 0x949b, 0x959b, 0x969b, 0x979b, 0x989b, 0x999b, 0x9a9b, 0xe1bd, 0xe2bd, 0x9b9b, 0x9c9b, 0xe3bd, 0x9d9b, 0x9e9b, 0x9f9b, 0xe4bd, 0xa09b, 0xe5bd, 0xa19b, 0xa29b, 0xa39b, 0xa49b, 0xa59b, 0xe6bd, 0xe7bd, 0xa69b, 0xa79b, 0xe8bd, 0xe9bd, 0xa89b, 0xa99b, 0xaa9b, 0xab9b, 0xac9b, 0xad9b, 0xeabd, 0xae9b, 0xaf9b, 0xb09b, 0xebbd, 0xb19b, 0xb29b, 0xb39b, 0xecbd, 0xb49b, 0xb59b, 0xb69b, 0xb79b, 0xb89b, 0xb99b, 0xba9b, 0xbb9b, 0xbc9b, 0xbd9b, 0xbe9b, 0xbf9b, 0xc09b, 0xc19b, 0xc29b, 0xc39b, 0xc49b, 0xc59b, 0xc69b, 0xc79b, 0xc89b, 0xc99b, 0xca9b, 0xcb9b, 0xcc9b, 0xcd9b, 0xce9b, 0xcf9b, 0xd09b, 0xd19b, 0xd29b, 0xd39b, 0xd49b, 0xd59b, 0xd69b, 0xd79b, 0xd89b, 0xd99b, 0xda9b, 0xdb9b, 0xdc9b, 0xdd9b, 0xde9b, 0xdf9b, 0xe09b, 0xe19b, 0xe29b, 0xe39b, 0xe49b, 0xe59b, 0xe69b, 0xedbd, 0xe79b, 0xe89b, 0xe99b, 0xea9b, 0xeb9b, 0xec9b, 0xed9b, 0xee9b, 0xef9b, 0xf09b, 0xf19b, 0xf29b, 0xf39b, 0xf49b, 0xf59b, 0xf69b, 0xf79b, 0xf89b, 0xf99b, 0xfa9b, 0xfb9b, 0xfc9b, 0xfd9b, 0xeebd, 0xefbd, 0xfe9b, 0x419c, 0xf0bd, 0x429c, 0x439c, 0xf1bd, 0xf2bd, 0x449c, 0xf3bd, 0x459c, 0x469c, 0x479c, 0x489c, 0x499c, 0xf4bd, 0xf5bd, 0x4a9c, 0x4b9c, 0x4c9c, 0xf6bd, 0x4d9c, 0x4e9c, 0x4f9c, 0x509c, 0x519c, 0x529c, 0xf7bd, 0xf8bd, 0x539c, 0x549c, 0xf9bd, 0x559c, 0x569c, 0x579c, 0x589c, 0x599c, 0x5a9c, 0x619c, 0x629c, 0x639c, 0x649c, 0x659c, 0x669c, 0x679c, 0x689c, 0x699c, 0xfabd, 0x6a9c, 0x6b9c, 0x6c9c, 0x6d9c, 0x6e9c, 0x6f9c, 0x709c, 0xfbbd, 0x719c, 0x729c, 0x739c, 0x749c, 0x759c, 0x769c, 0x779c, 0x789c, 0x799c, 0x7a9c, 0x819c, 0x829c, 0x839c, 0x849c, 0x859c, 0x869c, 0x879c, 0x889c, 0x899c, 0xfcbd, 0x8a9c, 0x8b9c, 0x8c9c, 0x8d9c, 0x8e9c, 0x8f9c, 0x909c, 0xfdbd, 0x919c, 0x929c, 0x939c, 0xfebd, 0x949c, 0x959c, 0x969c, 0xa1be, 0x979c, 0x989c, 0x999c, 0x9a9c, 0x9b9c, 0x9c9c, 0x9d9c, 0xa2be, 0xa3be, 0x9e9c, 0x9f9c, 0xa09c, 0xa19c, 0xa29c, 0xa39c, 0xa49c, 0xa59c, 0xa69c, 0xa79c, 0xa4be, 0xa89c, 0xa99c, 0xaa9c, 0xab9c, 0xac9c, 0xad9c, 0xae9c, 0xaf9c, 0xb09c, 0xb19c, 0xb29c, 0xb39c, 0xb49c, 0xb59c, 0xb69c, 0xb79c, 0xb89c, 0xb99c, 0xba9c, 0xbb9c, 0xbc9c, 0xbd9c, 0xbe9c, 0xbf9c, 0xc09c, 0xc19c, 0xc29c, 0xa5be, 0xa6be, 0xc39c, 0xc49c, 0xa7be, 0xc59c, 0xc69c, 0xc79c, 0xa8be, 0xc89c, 0xc99c, 0xca9c, 0xcb9c, 0xcc9c, 0xcd9c, 0xce9c, 0xa9be, 0xaabe, 0xcf9c, 0xd09c, 0xd19c, 0xabbe, 0xd29c, 0xd39c, 0xd49c, 0xd59c, 0xd69c, 0xd79c, 0xacbe, 0xd89c, 0xd99c, 0xda9c, 0xdb9c, 0xdc9c, 0xdd9c, 0xde9c, 0xdf9c, 0xe09c, 0xe19c, 0xe29c, 0xe39c, 0xe49c, 0xe59c, 0xe69c, 0xe79c, 0xe89c, 0xe99c, 0xea9c, 0xadbe, 0xeb9c, 0xec9c, 0xed9c, 0xee9c, 0xef9c, 0xf09c, 0xf19c, 0xaebe, 0xf29c, 0xf39c, 0xf49c, 0xf59c, 0xf69c, 0xf79c, 0xf89c, 0xf99c, 0xfa9c, 0xfb9c, 0xfc9c, 0xfd9c, 0xfe9c, 0x419d, 0x429d, 0x439d, 0x449d, 0x459d, 0x469d, 0x479d, 0x489d, 0x499d, 0x4a9d, 0x4b9d, 0x4c9d, 0x4d9d, 0x4e9d, 0xafbe, 0x4f9d, 0x509d, 0x519d, 0xb0be, 0x529d, 0x539d, 0x549d, 0x559d, 0x569d, 0x579d, 0x589d, 0x599d, 0x5a9d, 0x619d, 0x629d, 0x639d, 0x649d, 0x659d, 0x669d, 0x679d, 0x689d, 0x699d, 0x6a9d, 0x6b9d, 0x6c9d, 0x6d9d, 0x6e9d, 0x6f9d, 0x709d, 0x719d, 0x729d, 0x739d, 0x749d, 0x759d, 0x769d, 0x779d, 0x789d, 0x799d, 0x7a9d, 0x819d, 0x829d, 0x839d, 0x849d, 0x859d, 0x869d, 0x879d, 0x889d, 0x899d, 0xb1be, 0x8a9d, 0x8b9d, 0x8c9d, 0x8d9d, 0x8e9d, 0x8f9d, 0xb2be, 0xb3be, 0x909d, 0x919d, 0xb4be, 0x929d, 0x939d, 0x949d, 0xb5be, 0x959d, 0xb6be, 0x969d, 0x979d, 0x989d, 0x999d, 0xb7be, 0xb8be, 0xb9be, 0x9a9d, 0x9b9d, 0x9c9d, 0x9d9d, 0x9e9d, 0x9f9d, 0xa09d, 0xa19d, 0xa29d, 0xa39d, 0xbabe, 0xa49d, 0xa59d, 0xa69d, 0xbbbe, 0xa79d, 0xa89d, 0xa99d, 0xbcbe, 0xaa9d, 0xab9d, 0xac9d, 0xad9d, 0xae9d, 0xaf9d, 0xb09d, 0xbdbe, 0xb19d, 0xb29d, 0xb39d, 0xb49d, 0xb59d, 0xb69d, 0xb79d, 0xb89d, 0xb99d, 0xba9d, 0xbb9d, 0xbebe, 0xbfbe, 0xbc9d, 0xbd9d, 0xc0be, 0xbe9d, 0xbf9d, 0xc09d, 0xc1be, 0xc19d, 0xc29d, 0xc39d, 0xc49d, 0xc59d, 0xc69d, 0xc79d, 0xc2be, 0xc3be, 0xc89d, 0xc4be, 0xc99d, 0xc5be, 0xca9d, 0xcb9d, 0xcc9d, 0xcd9d, 0xce9d, 0xcf9d, 0xc6be, 0xc7be, 0xd09d, 0xd19d, 0xc8be, 0xc9be, 0xcabe, 0xd29d, 0xcbbe, 0xccbe, 0xcdbe, 0xd39d, 0xd49d, 0xd59d, 0xd69d, 0xcebe, 0xcfbe, 0xd0be, 0xd79d, 0xd1be, 0xd2be, 0xd3be, 0xd89d, 0xd99d, 0xda9d, 0xd4be, 0xd5be, 0xdb9d, 0xd6be, 0xd7be, 0xdc9d, 0xdd9d, 0xd8be, 0xde9d, 0xdf9d, 0xe09d, 0xd9be, 0xe19d, 0xe29d, 0xe39d, 0xe49d, 0xe59d, 0xe69d, 0xe79d, 0xdabe, 0xdbbe, 0xe89d, 0xdcbe, 0xddbe, 0xdebe, 0xe99d, 0xea9d, 0xeb9d, 0xec9d, 0xed9d, 0xee9d, 0xdfbe, 0xe0be, 0xef9d, 0xf09d, 0xe1be, 0xf19d, 0xf29d, 0xf39d, 0xe2be, 0xf49d, 0xf59d, 0xe3be, 0xf69d, 0xf79d, 0xf89d, 0xf99d, 0xe4be, 0xe5be, 0xfa9d, 0xe6be, 0xfb9d, 0xe7be, 0xfc9d, 0xfd9d, 0xfe9d, 0xe8be, 0x419e, 0xe9be, 0xeabe, 0x429e, 0x439e, 0x449e, 0xebbe, 0x459e, 0x469e, 0x479e, 0xecbe, 0x489e, 0x499e, 0x4a9e, 0x4b9e, 0x4c9e, 0x4d9e, 0x4e9e, 0x4f9e, 0xedbe, 0x509e, 0x519e, 0x529e, 0x539e, 0x549e, 0x559e, 0x569e, 0x579e, 0x589e, 0x599e, 0xeebe, 0xefbe, 0x5a9e, 0x619e, 0xf0be, 0xf1be, 0x629e, 0xf2be, 0xf3be, 0xf4be, 0xf5be, 0x639e, 0x649e, 0x659e, 0x669e, 0x679e, 0xf6be, 0xf7be, 0xf8be, 0xf9be, 0xfabe, 0xfbbe, 0xfcbe, 0x689e, 0xfdbe, 0x699e, 0xfebe, 0x6a9e, 0xa1bf, 0xa2bf, 0x6b9e, 0x6c9e, 0xa3bf, 0x6d9e, 0x6e9e, 0x6f9e, 0xa4bf, 0x709e, 0x719e, 0x729e, 0x739e, 0x749e, 0x759e, 0x769e, 0xa5bf, 0xa6bf, 0x779e, 0xa7bf, 0x789e, 0xa8bf, 0x799e, 0x7a9e, 0x819e, 0x829e, 0x839e, 0x849e, 0xa9bf, 0xaabf, 0xabbf, 0x859e, 0xacbf, 0x869e, 0x879e, 0x889e, 0xadbf, 0x899e, 0xaebf, 0xafbf, 0x8a9e, 0x8b9e, 0x8c9e, 0x8d9e, 0xb0bf, 0xb1bf, 0xb2bf, 0xb3bf, 0xb4bf, 0xb5bf, 0x8e9e, 0x8f9e, 0x909e, 0xb6bf, 0xb7bf, 0xb8bf, 0xb9bf, 0x919e, 0x929e, 0x939e, 0xbabf, 0x949e, 0x959e, 0x969e, 0xbbbf, 0x979e, 0x989e, 0x999e, 0x9a9e, 0x9b9e, 0x9c9e, 0x9d9e, 0xbcbf, 0xbdbf, 0x9e9e, 0xbebf, 0xbfbf, 0x9f9e, 0xa09e, 0xa19e, 0xa29e, 0xa39e, 0xa49e, 0xa59e, 0xc0bf, 0xc1bf, 0xa69e, 0xa79e, 0xc2bf, 0xa89e, 0xa99e, 0xaa9e, 0xc3bf, 0xc4bf, 0xc5bf, 0xab9e, 0xc6bf, 0xac9e, 0xad9e, 0xc7bf, 0xc8bf, 0xc9bf, 0xae9e, 0xcabf, 0xaf9e, 0xcbbf, 0xb09e, 0xccbf, 0xb19e, 0xb29e, 0xb39e, 0xb49e, 0xcdbf, 0xcebf, 0xb59e, 0xb69e, 0xcfbf, 0xb79e, 0xb89e, 0xb99e, 0xd0bf, 0xba9e, 0xbb9e, 0xbc9e, 0xbd9e, 0xbe9e, 0xbf9e, 0xc09e, 0xd1bf, 0xd2bf, 0xc19e, 0xd3bf, 0xd4bf, 0xd5bf, 0xc29e, 0xc39e, 0xc49e, 0xc59e, 0xc69e, 0xc79e, 0xd6bf, 0xd7bf, 0xc89e, 0xc99e, 0xd8bf, 0xca9e, 0xcb9e, 0xcc9e, 0xcd9e, 0xce9e, 0xcf9e, 0xd09e, 0xd19e, 0xd29e, 0xd39e, 0xd49e, 0xd9bf, 0xd59e, 0xd69e, 0xdabf, 0xd79e, 0xdbbf, 0xd89e, 0xd99e, 0xda9e, 0xdb9e, 0xdc9e, 0xdd9e, 0xdcbf, 0xddbf, 0xde9e, 0xdf9e, 0xdebf, 0xe09e, 0xe19e, 0xe29e, 0xdfbf, 0xe39e, 0xe49e, 0xe59e, 0xe69e, 0xe79e, 0xe89e, 0xe99e, 0xe0bf, 0xe1bf, 0xea9e, 0xe2bf, 0xeb9e, 0xe3bf, 0xec9e, 0xed9e, 0xee9e, 0xef9e, 0xf09e, 0xf19e, 0xe4bf, 0xe5bf, 0xf29e, 0xf39e, 0xe6bf, 0xf49e, 0xf59e, 0xf69e, 0xe7bf, 0xf79e, 0xf89e, 0xf99e, 0xfa9e, 0xfb9e, 0xfc9e, 0xfd9e, 0xe8bf, 0xe9bf, 0xfe9e, 0xeabf, 0x419f, 0xebbf, 0x429f, 0x439f, 0x449f, 0x459f, 0x469f, 0x479f, 0xecbf, 0xedbf, 0x489f, 0x499f, 0xeebf, 0x4a9f, 0x4b9f, 0x4c9f, 0xefbf, 0xf0bf, 0xf1bf, 0x4d9f, 0x4e9f, 0x4f9f, 0x509f, 0x519f, 0xf2bf, 0xf3bf, 0x529f, 0xf4bf, 0x539f, 0xf5bf, 0x549f, 0x559f, 0x569f, 0x579f, 0x589f, 0x599f, 0xf6bf, 0xf7bf, 0x5a9f, 0x619f, 0xf8bf, 0x629f, 0x639f, 0x649f, 0xf9bf, 0x659f, 0x669f, 0x679f, 0x689f, 0x699f, 0x6a9f, 0x6b9f, 0xfabf, 0xfbbf, 0x6c9f, 0x6d9f, 0xfcbf, 0xfdbf, 0x6e9f, 0x6f9f, 0x709f, 0x719f, 0x729f, 0x739f, 0xfebf, 0xa1c0, 0x749f, 0x759f, 0xa2c0, 0x769f, 0x779f, 0x789f, 0xa3c0, 0x799f, 0x7a9f, 0x819f, 0x829f, 0x839f, 0x849f, 0x859f, 0xa4c0, 0xa5c0, 0x869f, 0x879f, 0x889f, 0xa6c0, 0x899f, 0x8a9f, 0x8b9f, 0x8c9f, 0x8d9f, 0x8e9f, 0xa7c0, 0xa8c0, 0x8f9f, 0x909f, 0xa9c0, 0x919f, 0x929f, 0x939f, 0xaac0, 0x949f, 0x959f, 0x969f, 0x979f, 0x989f, 0x999f, 0x9a9f, 0xabc0, 0xacc0, 0x9b9f, 0xadc0, 0x9c9f, 0xaec0, 0x9d9f, 0x9e9f, 0x9f9f, 0xa09f, 0xa19f, 0xa29f, 0xafc0, 0xb0c0, 0xa39f, 0xa49f, 0xb1c0, 0xa59f, 0xa69f, 0xa79f, 0xb2c0, 0xa89f, 0xa99f, 0xaa9f, 0xab9f, 0xac9f, 0xad9f, 0xae9f, 0xb3c0, 0xb4c0, 0xaf9f, 0xb5c0, 0xb09f, 0xb6c0, 0xb19f, 0xb7c0, 0xb29f, 0xb39f, 0xb49f, 0xb59f, 0xb8c0, 0xb9c0, 0xb69f, 0xb79f, 0xbac0, 0xb89f, 0xb99f, 0xba9f, 0xbbc0, 0xbb9f, 0xbc9f, 0xbd9f, 0xbe9f, 0xbf9f, 0xbcc0, 0xc09f, 0xbdc0, 0xbec0, 0xc19f, 0xbfc0, 0xc29f, 0xc0c0, 0xc1c0, 0xc2c0, 0xc3c0, 0xc4c0, 0xc5c0, 0xc6c0, 0xc7c0, 0xc39f, 0xc49f, 0xc59f, 0xc8c0, 0xc69f, 0xc79f, 0xc89f, 0xc9c0, 0xc99f, 0xca9f, 0xcb9f, 0xcc9f, 0xcd9f, 0xce9f, 0xcf9f, 0xcac0, 0xd09f, 0xd19f, 0xcbc0, 0xd29f, 0xd39f, 0xd49f, 0xd59f, 0xd69f, 0xd79f, 0xd89f, 0xd99f, 0xccc0, 0xcdc0, 0xda9f, 0xdb9f, 0xcec0, 0xdc9f, 0xdd9f, 0xde9f, 0xcfc0, 0xd0c0, 0xd1c0, 0xdf9f, 0xe09f, 0xe19f, 0xe29f, 0xd2c0, 0xd3c0, 0xd4c0, 0xe39f, 0xd5c0, 0xd6c0, 0xd7c0, 0xd8c0, 0xe49f, 0xe59f, 0xe69f, 0xd9c0, 0xe79f, 0xdac0, 0xdbc0, 0xe89f, 0xe99f, 0xdcc0, 0xea9f, 0xddc0, 0xdec0, 0xdfc0, 0xeb9f, 0xe0c0, 0xec9f, 0xed9f, 0xee9f, 0xef9f, 0xf09f, 0xe1c0, 0xe2c0, 0xf19f, 0xe3c0, 0xe4c0, 0xe5c0, 0xe6c0, 0xf29f, 0xf39f, 0xf49f, 0xf59f, 0xf69f, 0xe7c0, 0xe8c0, 0xf79f, 0xf89f, 0xe9c0, 0xf99f, 0xfa9f, 0xfb9f, 0xeac0, 0xfc9f, 0xfd9f, 0xfe9f, 0x41a0, 0x42a0, 0x43a0, 0x44a0, 0xebc0, 0xecc0, 0x45a0, 0xedc0, 0xeec0, 0xefc0, 0x46a0, 0x47a0, 0x48a0, 0x49a0, 0x4aa0, 0x4ba0, 0xf0c0, 0xf1c0, 0x4ca0, 0x4da0, 0xf2c0, 0x4ea0, 0xf3c0, 0x4fa0, 0xf4c0, 0x50a0, 0x51a0, 0x52a0, 0x53a0, 0x54a0, 0x55a0, 0x56a0, 0xf5c0, 0x57a0, 0x58a0, 0x59a0, 0x5aa0, 0xf6c0, 0x61a0, 0x62a0, 0x63a0, 0x64a0, 0x65a0, 0x66a0, 0xf7c0, 0x67a0, 0x68a0, 0x69a0, 0xf8c0, 0x6aa0, 0x6ba0, 0x6ca0, 0xf9c0, 0x6da0, 0x6ea0, 0x6fa0, 0x70a0, 0x71a0, 0x72a0, 0x73a0, 0x74a0, 0x75a0, 0x76a0, 0x77a0, 0x78a0, 0x79a0, 0x7aa0, 0x81a0, 0x82a0, 0x83a0, 0x84a0, 0x85a0, 0xfac0, 0xfbc0, 0x86a0, 0x87a0, 0xfcc0, 0x88a0, 0x89a0, 0x8aa0, 0xfdc0, 0x8ba0, 0xfec0, 0x8ca0, 0x8da0, 0x8ea0, 0x8fa0, 0x90a0, 0xa1c1, 0xa2c1, 0x91a0, 0xa3c1, 0x92a0, 0xa4c1, 0xa5c1, 0x93a0, 0x94a0, 0x95a0, 0x96a0, 0x97a0, 0xa6c1, 0xa7c1, 0x98a0, 0x99a0, 0xa8c1, 0x9aa0, 0x9ba0, 0x9ca0, 0xa9c1, 0x9da0, 0x9ea0, 0x9fa0, 0xa0a0, 0xa1a0, 0xa2a0, 0xa3a0, 0xaac1, 0xabc1, 0xa4a0, 0xacc1, 0xa5a0, 0xadc1, 0xa6a0, 0xa7a0, 0xa8a0, 0xa9a0, 0xaaa0, 0xaba0, 0xaec1, 0xaca0, 0xada0, 0xaea0, 0xafc1, 0xafa0, 0xb0a0, 0xb1a0, 0xb0c1, 0xb2a0, 0xb3a0, 0xb4a0, 0xb5a0, 0xb6a0, 0xb7a0, 0xb8a0, 0xb1c1, 0xb2c1, 0xb9a0, 0xbaa0, 0xb3c1, 0xb4c1, 0xbba0, 0xbca0, 0xbda0, 0xbea0, 0xbfa0, 0xc0a0, 0xb5c1, 0xc1a0, 0xc2a0, 0xc3a0, 0xc4a0, 0xc5a0, 0xc6a0, 0xc7a0, 0xc8a0, 0xc9a0, 0xcaa0, 0xcba0, 0xcca0, 0xcda0, 0xcea0, 0xcfa0, 0xd0a0, 0xd1a0, 0xd2a0, 0xd3a0, 0xd4a0, 0xd5a0, 0xd6a0, 0xd7a0, 0xd8a0, 0xd9a0, 0xdaa0, 0xdba0, 0xb6c1, 0xb7c1, 0xdca0, 0xdda0, 0xb8c1, 0xdea0, 0xdfa0, 0xe0a0, 0xb9c1, 0xe1a0, 0xbac1, 0xe2a0, 0xe3a0, 0xe4a0, 0xe5a0, 0xe6a0, 0xbbc1, 0xbcc1, 0xe7a0, 0xbdc1, 0xe8a0, 0xbec1, 0xbfc1, 0xc0c1, 0xe9a0, 0xeaa0, 0xeba0, 0xc1c1, 0xc2c1, 0xc3c1, 0xeca0, 0xeda0, 0xeea0, 0xefa0, 0xf0a0, 0xf1a0, 0xc4c1, 0xf2a0, 0xf3a0, 0xf4a0, 0xf5a0, 0xf6a0, 0xf7a0, 0xf8a0, 0xf9a0, 0xc5c1, 0xfaa0, 0xc6c1, 0xfba0, 0xc7c1, 0xfca0, 0xfda0, 0xfea0, 0x41a1, 0x42a1, 0x43a1, 0xc8c1, 0x44a1, 0x45a1, 0x46a1, 0x47a1, 0x48a1, 0x49a1, 0x4aa1, 0x4ba1, 0x4ca1, 0x4da1, 0x4ea1, 0x4fa1, 0x50a1, 0x51a1, 0x52a1, 0x53a1, 0x54a1, 0x55a1, 0x56a1, 0xc9c1, 0xcac1, 0x57a1, 0x58a1, 0x59a1, 0x5aa1, 0x61a1, 0x62a1, 0xcbc1, 0x63a1, 0x64a1, 0x65a1, 0xccc1, 0x66a1, 0x67a1, 0x68a1, 0xcdc1, 0x69a1, 0x6aa1, 0x6ba1, 0x6ca1, 0x6da1, 0x6ea1, 0x6fa1, 0xcec1, 0xcfc1, 0x70a1, 0xd0c1, 0x71a1, 0xd1c1, 0x72a1, 0x73a1, 0x74a1, 0x75a1, 0x76a1, 0x77a1, 0xd2c1, 0xd3c1, 0x78a1, 0x79a1, 0xd4c1, 0x7aa1, 0x81a1, 0x82a1, 0x83a1, 0x84a1, 0x85a1, 0x86a1, 0x87a1, 0x88a1, 0x89a1, 0x8aa1, 0x8ba1, 0x8ca1, 0x8da1, 0x8ea1, 0x8fa1, 0xd5c1, 0x90a1, 0x91a1, 0x92a1, 0x93a1, 0x94a1, 0x95a1, 0xd6c1, 0xd7c1, 0x96a1, 0x97a1, 0xd8c1, 0x98a1, 0x99a1, 0x9aa1, 0xd9c1, 0xdac1, 0xdbc1, 0x9ba1, 0x9ca1, 0x9da1, 0x9ea1, 0x9fa1, 0xdcc1, 0xddc1, 0xa0a1, 0xdec1, 0x41a2, 0xdfc1, 0x42a2, 0x43a2, 0x44a2, 0x45a2, 0x46a2, 0x47a2, 0xe0c1, 0x48a2, 0x49a2, 0x4aa2, 0x4ba2, 0x4ca2, 0x4da2, 0x4ea2, 0x4fa2, 0x50a2, 0x51a2, 0x52a2, 0x53a2, 0x54a2, 0x55a2, 0x56a2, 0x57a2, 0x58a2, 0x59a2, 0x5aa2, 0xe1c1, 0x61a2, 0x62a2, 0x63a2, 0x64a2, 0x65a2, 0x66a2, 0x67a2, 0xe2c1, 0x68a2, 0x69a2, 0x6aa2, 0x6ba2, 0x6ca2, 0x6da2, 0x6ea2, 0x6fa2, 0x70a2, 0x71a2, 0x72a2, 0x73a2, 0x74a2, 0x75a2, 0x76a2, 0x77a2, 0x78a2, 0x79a2, 0x7aa2, 0x81a2, 0x82a2, 0x83a2, 0x84a2, 0x85a2, 0x86a2, 0x87a2, 0x88a2, 0xe3c1, 0xe4c1, 0x89a2, 0x8aa2, 0xe5c1, 0x8ba2, 0x8ca2, 0x8da2, 0xe6c1, 0x8ea2, 0x8fa2, 0x90a2, 0x91a2, 0x92a2, 0x93a2, 0x94a2, 0xe7c1, 0xe8c1, 0x95a2, 0xe9c1, 0x96a2, 0x97a2, 0x98a2, 0x99a2, 0x9aa2, 0x9ba2, 0x9ca2, 0x9da2, 0xeac1, 0x9ea2, 0x9fa2, 0xa0a2, 0xebc1, 0x41a3, 0x42a3, 0x43a3, 0xecc1, 0x44a3, 0x45a3, 0x46a3, 0x47a3, 0x48a3, 0x49a3, 0x4aa3, 0xedc1, 0x4ba3, 0x4ca3, 0x4da3, 0x4ea3, 0x4fa3, 0x50a3, 0x51a3, 0x52a3, 0x53a3, 0x54a3, 0x55a3, 0xeec1, 0xefc1, 0x56a3, 0x57a3, 0xf0c1, 0x58a3, 0x59a3, 0x5aa3, 0xf1c1, 0x61a3, 0x62a3, 0x63a3, 0x64a3, 0x65a3, 0x66a3, 0x67a3, 0xf2c1, 0xf3c1, 0x68a3, 0xf4c1, 0x69a3, 0xf5c1, 0x6aa3, 0x6ba3, 0x6ca3, 0x6da3, 0x6ea3, 0x6fa3, 0x70a3, 0x71a3, 0x72a3, 0x73a3, 0x74a3, 0x75a3, 0x76a3, 0x77a3, 0x78a3, 0x79a3, 0x7aa3, 0x81a3, 0x82a3, 0x83a3, 0x84a3, 0x85a3, 0x86a3, 0x87a3, 0x88a3, 0x89a3, 0x8aa3, 0x8ba3, 0x8ca3, 0x8da3, 0x8ea3, 0x8fa3, 0x90a3, 0x91a3, 0xf6c1, 0xf7c1, 0x92a3, 0x93a3, 0xf8c1, 0x94a3, 0x95a3, 0xf9c1, 0xfac1, 0x96a3, 0xfbc1, 0x97a3, 0x98a3, 0x99a3, 0x9aa3, 0x9ba3, 0xfcc1, 0xfdc1, 0x9ca3, 0xfec1, 0x9da3, 0xa1c2, 0xa2c2, 0x9ea3, 0x9fa3, 0xa3c2, 0xa4c2, 0xa0a3, 0xa5c2, 0xa6c2, 0x41a4, 0x42a4, 0xa7c2, 0x43a4, 0xa8c2, 0x44a4, 0xa9c2, 0x45a4, 0x46a4, 0xaac2, 0x47a4, 0x48a4, 0x49a4, 0x4aa4, 0xabc2, 0xacc2, 0x4ba4, 0xadc2, 0xaec2, 0xafc2, 0x4ca4, 0x4da4, 0x4ea4, 0x4fa4, 0x50a4, 0x51a4, 0xb0c2, 0xb1c2, 0x52a4, 0x53a4, 0xb2c2, 0x54a4, 0x55a4, 0x56a4, 0xb3c2, 0x57a4, 0x58a4, 0x59a4, 0x5aa4, 0x61a4, 0x62a4, 0x63a4, 0xb4c2, 0xb5c2, 0x64a4, 0xb6c2, 0xb7c2, 0xb8c2, 0x65a4, 0x66a4, 0x67a4, 0x68a4, 0x69a4, 0x6aa4, 0xb9c2, 0x6ba4, 0x6ca4, 0x6da4, 0xbac2, 0x6ea4, 0x6fa4, 0x70a4, 0x71a4, 0x72a4, 0x73a4, 0x74a4, 0x75a4, 0x76a4, 0x77a4, 0x78a4, 0x79a4, 0x7aa4, 0x81a4, 0x82a4, 0x83a4, 0xbbc2, 0x84a4, 0x85a4, 0x86a4, 0x87a4, 0x88a4, 0x89a4, 0x8aa4, 0x8ba4, 0x8ca4, 0x8da4, 0x8ea4, 0x8fa4, 0x90a4, 0x91a4, 0x92a4, 0x93a4, 0x94a4, 0x95a4, 0x96a4, 0x97a4, 0x98a4, 0x99a4, 0x9aa4, 0x9ba4, 0x9ca4, 0x9da4, 0x9ea4, 0x9fa4, 0xa0a4, 0x41a5, 0x42a5, 0x43a5, 0x44a5, 0x45a5, 0xbcc2, 0xbdc2, 0x46a5, 0x47a5, 0xbec2, 0x48a5, 0x49a5, 0x4aa5, 0xbfc2, 0x4ba5, 0x4ca5, 0x4da5, 0x4ea5, 0x4fa5, 0x50a5, 0x51a5, 0xc0c2, 0xc1c2, 0x52a5, 0xc2c2, 0xc3c2, 0xc4c2, 0x53a5, 0x54a5, 0x55a5, 0x56a5, 0x57a5, 0x58a5, 0xc5c2, 0x59a5, 0x5aa5, 0x61a5, 0x62a5, 0x63a5, 0x64a5, 0x65a5, 0x66a5, 0x67a5, 0x68a5, 0x69a5, 0x6aa5, 0x6ba5, 0x6ca5, 0x6da5, 0x6ea5, 0x6fa5, 0x70a5, 0x71a5, 0x72a5, 0xc6c2, 0x73a5, 0x74a5, 0x75a5, 0x76a5, 0x77a5, 0x78a5, 0xc7c2, 0x79a5, 0x7aa5, 0x81a5, 0x82a5, 0x83a5, 0x84a5, 0x85a5, 0x86a5, 0x87a5, 0x88a5, 0x89a5, 0x8aa5, 0x8ba5, 0x8ca5, 0x8da5, 0x8ea5, 0x8fa5, 0x90a5, 0x91a5, 0xc8c2, 0x92a5, 0x93a5, 0x94a5, 0x95a5, 0x96a5, 0x97a5, 0x98a5, 0x99a5, 0x9aa5, 0x9ba5, 0x9ca5, 0x9da5, 0x9ea5, 0x9fa5, 0xa0a5, 0x41a6, 0x42a6, 0x43a6, 0x44a6, 0x45a6, 0x46a6, 0x47a6, 0x48a6, 0x49a6, 0x4aa6, 0x4ba6, 0x4ca6, 0x4da6, 0x4ea6, 0x4fa6, 0x50a6, 0x51a6, 0x52a6, 0x53a6, 0x54a6, 0xc9c2, 0xcac2, 0x55a6, 0x56a6, 0xcbc2, 0x57a6, 0x58a6, 0x59a6, 0xccc2, 0x5aa6, 0x61a6, 0x62a6, 0x63a6, 0x64a6, 0x65a6, 0x66a6, 0xcdc2, 0xcec2, 0x67a6, 0xcfc2, 0x68a6, 0xd0c2, 0x69a6, 0xd1c2, 0x6aa6, 0x6ba6, 0x6ca6, 0x6da6, 0xd2c2, 0xd3c2, 0x6ea6, 0x6fa6, 0x70a6, 0x71a6, 0x72a6, 0x73a6, 0xd4c2, 0x74a6, 0x75a6, 0x76a6, 0x77a6, 0x78a6, 0x79a6, 0x7aa6, 0x81a6, 0x82a6, 0x83a6, 0x84a6, 0xd5c2, 0x85a6, 0x86a6, 0x87a6, 0x88a6, 0x89a6, 0x8aa6, 0x8ba6, 0xd6c2, 0x8ca6, 0x8da6, 0x8ea6, 0x8fa6, 0x90a6, 0x91a6, 0x92a6, 0x93a6, 0x94a6, 0x95a6, 0x96a6, 0x97a6, 0x98a6, 0x99a6, 0x9aa6, 0x9ba6, 0x9ca6, 0x9da6, 0x9ea6, 0xd7c2, 0x9fa6, 0xa0a6, 0x41a7, 0x42a7, 0x43a7, 0x44a7, 0x45a7, 0xd8c2, 0x46a7, 0x47a7, 0x48a7, 0xd9c2, 0x49a7, 0x4aa7, 0x4ba7, 0xdac2, 0x4ca7, 0x4da7, 0x4ea7, 0x4fa7, 0x50a7, 0x51a7, 0x52a7, 0xdbc2, 0xdcc2, 0x53a7, 0x54a7, 0x55a7, 0x56a7, 0x57a7, 0x58a7, 0x59a7, 0x5aa7, 0x61a7, 0x62a7, 0x63a7, 0x64a7, 0x65a7, 0x66a7, 0x67a7, 0x68a7, 0x69a7, 0x6aa7, 0x6ba7, 0x6ca7, 0x6da7, 0x6ea7, 0x6fa7, 0x70a7, 0x71a7, 0x72a7, 0x73a7, 0x74a7, 0x75a7, 0x76a7, 0x77a7, 0xddc2, 0x78a7, 0x79a7, 0x7aa7, 0x81a7, 0x82a7, 0x83a7, 0xdec2, 0xdfc2, 0x84a7, 0x85a7, 0xe0c2, 0x86a7, 0x87a7, 0x88a7, 0xe1c2, 0x89a7, 0x8aa7, 0x8ba7, 0x8ca7, 0x8da7, 0x8ea7, 0x8fa7, 0xe2c2, 0xe3c2, 0x90a7, 0x91a7, 0x92a7, 0xe4c2, 0x93a7, 0x94a7, 0x95a7, 0x96a7, 0x97a7, 0x98a7, 0xe5c2, 0x99a7, 0x9aa7, 0x9ba7, 0x9ca7, 0x9da7, 0x9ea7, 0x9fa7, 0xa0a7, 0x41a8, 0x42a8, 0x43a8, 0x44a8, 0x45a8, 0x46a8, 0x47a8, 0x48a8, 0x49a8, 0x4aa8, 0x4ba8, 0xe6c2, 0xe7c2, 0x4ca8, 0x4da8, 0x4ea8, 0x4fa8, 0x50a8, 0x51a8, 0x52a8, 0x53a8, 0x54a8, 0x55a8, 0x56a8, 0x57a8, 0x58a8, 0x59a8, 0x5aa8, 0x61a8, 0x62a8, 0x63a8, 0x64a8, 0x65a8, 0x66a8, 0x67a8, 0x68a8, 0x69a8, 0x6aa8, 0x6ba8, 0x6ca8, 0x6da8, 0x6ea8, 0x6fa8, 0x70a8, 0x71a8, 0x72a8, 0x73a8, 0xe8c2, 0x74a8, 0x75a8, 0x76a8, 0x77a8, 0x78a8, 0x79a8, 0x7aa8, 0x81a8, 0x82a8, 0x83a8, 0x84a8, 0x85a8, 0x86a8, 0x87a8, 0x88a8, 0x89a8, 0x8aa8, 0x8ba8, 0x8ca8, 0x8da8, 0x8ea8, 0x8fa8, 0x90a8, 0x91a8, 0x92a8, 0x93a8, 0x94a8, 0xe9c2, 0x95a8, 0x96a8, 0x97a8, 0x98a8, 0x99a8, 0x9aa8, 0x9ba8, 0x9ca8, 0x9da8, 0x9ea8, 0x9fa8, 0xa0a8, 0x41a9, 0x42a9, 0x43a9, 0x44a9, 0x45a9, 0x46a9, 0x47a9, 0x48a9, 0x49a9, 0x4aa9, 0x4ba9, 0x4ca9, 0x4da9, 0x4ea9, 0x4fa9, 0xeac2, 0x50a9, 0x51a9, 0x52a9, 0x53a9, 0x54a9, 0x55a9, 0x56a9, 0x57a9, 0x58a9, 0x59a9, 0x5aa9, 0x61a9, 0x62a9, 0x63a9, 0x64a9, 0xebc2, 0x65a9, 0x66a9, 0xecc2, 0x67a9, 0xedc2, 0x68a9, 0x69a9, 0x6aa9, 0x6ba9, 0x6ca9, 0x6da9, 0x6ea9, 0x6fa9, 0x70a9, 0x71a9, 0x72a9, 0x73a9, 0x74a9, 0x75a9, 0x76a9, 0x77a9, 0x78a9, 0x79a9, 0x7aa9, 0x81a9, 0x82a9, 0x83a9, 0x84a9, 0x85a9, 0x86a9, 0x87a9, 0x88a9, 0x89a9, 0x8aa9, 0x8ba9, 0x8ca9, 0x8da9, 0x8ea9, 0x8fa9, 0xeec2, 0xefc2, 0x90a9, 0x91a9, 0xf0c2, 0x92a9, 0x93a9, 0x94a9, 0xf1c2, 0x95a9, 0x96a9, 0x97a9, 0x98a9, 0x99a9, 0x9aa9, 0x9ba9, 0xf2c2, 0xf3c2, 0x9ca9, 0x9da9, 0x9ea9, 0xf4c2, 0xf5c2, 0x9fa9, 0xa0a9, 0x41aa, 0x42aa, 0xf6c2, 0xf7c2, 0xf8c2, 0x43aa, 0x44aa, 0xf9c2, 0x45aa, 0xfac2, 0x46aa, 0xfbc2, 0x47aa, 0x48aa, 0x49aa, 0x4aaa, 0x4baa, 0x4caa, 0x4daa, 0xfcc2, 0xfdc2, 0x4eaa, 0xfec2, 0xa1c3, 0xa2c3, 0xa3c3, 0x4faa, 0x50aa, 0x51aa, 0x52aa, 0x53aa, 0xa4c3, 0xa5c3, 0x54aa, 0x55aa, 0xa6c3, 0x56aa, 0x57aa, 0x58aa, 0xa7c3, 0x59aa, 0x5aaa, 0x61aa, 0x62aa, 0x63aa, 0x64aa, 0x65aa, 0xa8c3, 0xa9c3, 0x66aa, 0xaac3, 0xabc3, 0xacc3, 0x67aa, 0x68aa, 0x69aa, 0x6aaa, 0x6baa, 0x6caa, 0xadc3, 0x6daa, 0x6eaa, 0x6faa, 0xaec3, 0x70aa, 0xafc3, 0x71aa, 0xb0c3, 0x72aa, 0x73aa, 0x74aa, 0x75aa, 0x76aa, 0x77aa, 0x78aa, 0xb1c3, 0x79aa, 0x7aaa, 0x81aa, 0x82aa, 0xb2c3, 0x83aa, 0x84aa, 0x85aa, 0x86aa, 0x87aa, 0x88aa, 0x89aa, 0x8aaa, 0x8baa, 0x8caa, 0x8daa, 0x8eaa, 0x8faa, 0x90aa, 0x91aa, 0x92aa, 0x93aa, 0x94aa, 0x95aa, 0x96aa, 0x97aa, 0x98aa, 0x99aa, 0x9aaa, 0x9baa, 0x9caa, 0x9daa, 0x9eaa, 0x9faa, 0xa0aa, 0x41ab, 0x42ab, 0x43ab, 0x44ab, 0xb3c3, 0xb4c3, 0x45ab, 0x46ab, 0xb5c3, 0x47ab, 0x48ab, 0x49ab, 0xb6c3, 0x4aab, 0x4bab, 0x4cab, 0x4dab, 0x4eab, 0x4fab, 0x50ab, 0xb7c3, 0xb8c3, 0x51ab, 0xb9c3, 0xbac3, 0xbbc3, 0x52ab, 0x53ab, 0x54ab, 0x55ab, 0x56ab, 0x57ab, 0xbcc3, 0xbdc3, 0x58ab, 0x59ab, 0xbec3, 0x5aab, 0x61ab, 0x62ab, 0xbfc3, 0x63ab, 0x64ab, 0x65ab, 0x66ab, 0x67ab, 0x68ab, 0x69ab, 0xc0c3, 0xc1c3, 0x6aab, 0xc2c3, 0x6bab, 0xc3c3, 0x6cab, 0x6dab, 0x6eab, 0x6fab, 0x70ab, 0x71ab, 0xc4c3, 0x72ab, 0x73ab, 0x74ab, 0xc5c3, 0x75ab, 0x76ab, 0x77ab, 0x78ab, 0x79ab, 0x7aab, 0x81ab, 0x82ab, 0x83ab, 0x84ab, 0x85ab, 0x86ab, 0x87ab, 0x88ab, 0x89ab, 0xc6c3, 0x8aab, 0x8bab, 0x8cab, 0x8dab, 0x8eab, 0x8fab, 0x90ab, 0xc7c3, 0x91ab, 0x92ab, 0x93ab, 0xc8c3, 0x94ab, 0x95ab, 0x96ab, 0x97ab, 0x98ab, 0x99ab, 0x9aab, 0x9bab, 0x9cab, 0x9dab, 0x9eab, 0x9fab, 0xa0ab, 0x41ac, 0x42ac, 0x43ac, 0xc9c3, 0x44ac, 0x45ac, 0x46ac, 0x47ac, 0x48ac, 0x49ac, 0xcac3, 0xcbc3, 0x4aac, 0x4bac, 0xccc3, 0x4cac, 0x4dac, 0x4eac, 0xcdc3, 0x4fac, 0x50ac, 0x51ac, 0x52ac, 0x53ac, 0x54ac, 0x55ac, 0xcec3, 0xcfc3, 0x56ac, 0xd0c3, 0x57ac, 0xd1c3, 0x58ac, 0x59ac, 0x5aac, 0x61ac, 0x62ac, 0x63ac, 0xd2c3, 0x64ac, 0x65ac, 0x66ac, 0xd3c3, 0x67ac, 0x68ac, 0x69ac, 0xd4c3, 0x6aac, 0x6bac, 0x6cac, 0x6dac, 0x6eac, 0x6fac, 0x70ac, 0x71ac, 0x72ac, 0x73ac, 0x74ac, 0x75ac, 0xd5c3, 0x76ac, 0x77ac, 0x78ac, 0x79ac, 0x7aac, 0x81ac, 0x82ac, 0x83ac, 0x84ac, 0x85ac, 0x86ac, 0x87ac, 0x88ac, 0x89ac, 0x8aac, 0x8bac, 0x8cac, 0x8dac, 0x8eac, 0x8fac, 0x90ac, 0x91ac, 0x92ac, 0x93ac, 0x94ac, 0x95ac, 0x96ac, 0x97ac, 0x98ac, 0x99ac, 0x9aac, 0x9bac, 0x9cac, 0x9dac, 0xd6c3, 0x9eac, 0x9fac, 0xa0ac, 0xd7c3, 0x41ad, 0x42ad, 0x43ad, 0xd8c3, 0x44ad, 0x45ad, 0x46ad, 0x47ad, 0x48ad, 0x49ad, 0x4aad, 0xd9c3, 0xdac3, 0x4bad, 0xdbc3, 0x4cad, 0xdcc3, 0x4dad, 0x4ead, 0x4fad, 0x50ad, 0x51ad, 0x52ad, 0xddc3, 0x53ad, 0x54ad, 0x55ad, 0x56ad, 0x57ad, 0x58ad, 0x59ad, 0x5aad, 0x61ad, 0x62ad, 0x63ad, 0x64ad, 0x65ad, 0x66ad, 0x67ad, 0xdec3, 0x68ad, 0x69ad, 0x6aad, 0x6bad, 0x6cad, 0x6dad, 0x6ead, 0x6fad, 0x70ad, 0x71ad, 0x72ad, 0xdfc3, 0xe0c3, 0x73ad, 0x74ad, 0xe1c3, 0x75ad, 0x76ad, 0x77ad, 0xe2c3, 0x78ad, 0x79ad, 0x7aad, 0x81ad, 0x82ad, 0x83ad, 0x84ad, 0xe3c3, 0xe4c3, 0x85ad, 0xe5c3, 0x86ad, 0xe6c3, 0x87ad, 0x88ad, 0x89ad, 0x8aad, 0x8bad, 0x8cad, 0xe7c3, 0x8dad, 0x8ead, 0x8fad, 0x90ad, 0x91ad, 0x92ad, 0x93ad, 0x94ad, 0x95ad, 0x96ad, 0x97ad, 0x98ad, 0x99ad, 0x9aad, 0x9bad, 0x9cad, 0x9dad, 0x9ead, 0x9fad, 0xe8c3, 0xa0ad, 0x41ae, 0x42ae, 0x43ae, 0x44ae, 0x45ae, 0x46ae, 0xe9c3, 0x47ae, 0x48ae, 0x49ae, 0xeac3, 0x4aae, 0x4bae, 0x4cae, 0x4dae, 0x4eae, 0x4fae, 0x50ae, 0x51ae, 0x52ae, 0x53ae, 0x54ae, 0x55ae, 0x56ae, 0x57ae, 0x58ae, 0x59ae, 0x5aae, 0x61ae, 0x62ae, 0x63ae, 0x64ae, 0x65ae, 0x66ae, 0xebc3, 0x67ae, 0x68ae, 0x69ae, 0xecc3, 0x6aae, 0x6bae, 0x6cae, 0xedc3, 0x6dae, 0x6eae, 0x6fae, 0x70ae, 0x71ae, 0x72ae, 0x73ae, 0xeec3, 0xefc3, 0x74ae, 0xf0c3, 0x75ae, 0xf1c3, 0x76ae, 0x77ae, 0x78ae, 0x79ae, 0x7aae, 0x81ae, 0xf2c3, 0x82ae, 0x83ae, 0x84ae, 0xf3c3, 0x85ae, 0x86ae, 0x87ae, 0xf4c3, 0x88ae, 0x89ae, 0x8aae, 0x8bae, 0x8cae, 0x8dae, 0x8eae, 0xf5c3, 0x8fae, 0x90ae, 0x91ae, 0x92ae, 0xf6c3, 0x93ae, 0x94ae, 0x95ae, 0x96ae, 0x97ae, 0x98ae, 0xf7c3, 0xf8c3, 0x99ae, 0x9aae, 0xf9c3, 0x9bae, 0x9cae, 0x9dae, 0xfac3, 0x9eae, 0x9fae, 0xa0ae, 0x41af, 0x42af, 0x43af, 0x44af, 0xfbc3, 0xfcc3, 0x45af, 0xfdc3, 0x46af, 0xfec3, 0x47af, 0x48af, 0x49af, 0x4aaf, 0x4baf, 0x4caf, 0x4daf, 0x4eaf, 0x4faf, 0x50af, 0x51af, 0x52af, 0x53af, 0x54af, 0x55af, 0x56af, 0x57af, 0x58af, 0x59af, 0x5aaf, 0x61af, 0x62af, 0x63af, 0x64af, 0x65af, 0x66af, 0x67af, 0x68af, 0x69af, 0x6aaf, 0x6baf, 0x6caf, 0x6daf, 0x6eaf, 0xa1c4, 0xa2c4, 0x6faf, 0x70af, 0xa3c4, 0x71af, 0x72af, 0xa4c4, 0xa5c4, 0xa6c4, 0x73af, 0x74af, 0x75af, 0x76af, 0x77af, 0x78af, 0xa7c4, 0xa8c4, 0x79af, 0xa9c4, 0x7aaf, 0xaac4, 0x81af, 0x82af, 0x83af, 0x84af, 0x85af, 0x86af, 0xabc4, 0xacc4, 0x87af, 0x88af, 0xadc4, 0x89af, 0x8aaf, 0x8baf, 0xaec4, 0x8caf, 0x8daf, 0x8eaf, 0x8faf, 0x90af, 0x91af, 0x92af, 0xafc4, 0xb0c4, 0x93af, 0xb1c4, 0x94af, 0xb2c4, 0x95af, 0x96af, 0x97af, 0x98af, 0x99af, 0x9aaf, 0xb3c4, 0xb4c4, 0x9baf, 0x9caf, 0xb5c4, 0x9daf, 0x9eaf, 0x9faf, 0xb6c4, 0xa0af, 0x41b0, 0x42b0, 0x43b0, 0x44b0, 0x45b0, 0x46b0, 0xb7c4, 0xb8c4, 0x47b0, 0xb9c4, 0xbac4, 0xbbc4, 0x48b0, 0x49b0, 0x4ab0, 0x4bb0, 0x4cb0, 0x4db0, 0xbcc4, 0xbdc4, 0x4eb0, 0x4fb0, 0x50b0, 0x51b0, 0x52b0, 0x53b0, 0x54b0, 0x55b0, 0x56b0, 0x57b0, 0x58b0, 0x59b0, 0x5ab0, 0x61b0, 0x62b0, 0x63b0, 0x64b0, 0x65b0, 0x66b0, 0xbec4, 0x67b0, 0x68b0, 0x69b0, 0x6ab0, 0x6bb0, 0x6cb0, 0x6db0, 0x6eb0, 0x6fb0, 0x70b0, 0x71b0, 0x72b0, 0x73b0, 0x74b0, 0x75b0, 0x76b0, 0x77b0, 0x78b0, 0x79b0, 0x7ab0, 0x81b0, 0x82b0, 0x83b0, 0x84b0, 0x85b0, 0x86b0, 0x87b0, 0x88b0, 0x89b0, 0x8ab0, 0x8bb0, 0x8cb0, 0x8db0, 0x8eb0, 0xbfc4, 0xc0c4, 0x8fb0, 0x90b0, 0xc1c4, 0x91b0, 0x92b0, 0xc2c4, 0xc3c4, 0x93b0, 0x94b0, 0x95b0, 0x96b0, 0x97b0, 0x98b0, 0x99b0, 0xc4c4, 0xc5c4, 0x9ab0, 0xc6c4, 0xc7c4, 0xc8c4, 0x9bb0, 0x9cb0, 0x9db0, 0x9eb0, 0x9fb0, 0xa0b0, 0xc9c4, 0xcac4, 0x41b1, 0x42b1, 0xcbc4, 0x43b1, 0x44b1, 0x45b1, 0xccc4, 0x46b1, 0x47b1, 0x48b1, 0x49b1, 0x4ab1, 0x4bb1, 0x4cb1, 0xcdc4, 0xcec4, 0x4db1, 0xcfc4, 0x4eb1, 0xd0c4, 0x4fb1, 0x50b1, 0x51b1, 0x52b1, 0x53b1, 0x54b1, 0xd1c4, 0x55b1, 0x56b1, 0x57b1, 0xd2c4, 0x58b1, 0x59b1, 0x5ab1, 0xd3c4, 0x61b1, 0x62b1, 0x63b1, 0x64b1, 0x65b1, 0x66b1, 0x67b1, 0xd4c4, 0xd5c4, 0x68b1, 0xd6c4, 0xd7c4, 0xd8c4, 0x69b1, 0x6ab1, 0x6bb1, 0x6cb1, 0x6db1, 0x6eb1, 0xd9c4, 0x6fb1, 0x70b1, 0x71b1, 0x72b1, 0x73b1, 0x74b1, 0x75b1, 0x76b1, 0x77b1, 0x78b1, 0x79b1, 0x7ab1, 0x81b1, 0x82b1, 0x83b1, 0x84b1, 0x85b1, 0x86b1, 0x87b1, 0x88b1, 0x89b1, 0x8ab1, 0x8bb1, 0x8cb1, 0x8db1, 0x8eb1, 0x8fb1, 0xdac4, 0xdbc4, 0x90b1, 0x91b1, 0xdcc4, 0x92b1, 0x93b1, 0x94b1, 0xddc4, 0x95b1, 0x96b1, 0x97b1, 0x98b1, 0x99b1, 0x9ab1, 0x9bb1, 0xdec4, 0xdfc4, 0x9cb1, 0xe0c4, 0x9db1, 0xe1c4, 0x9eb1, 0x9fb1, 0xa0b1, 0x41b2, 0x42b2, 0x43b2, 0xe2c4, 0xe3c4, 0x44b2, 0x45b2, 0xe4c4, 0x46b2, 0x47b2, 0x48b2, 0xe5c4, 0x49b2, 0x4ab2, 0x4bb2, 0x4cb2, 0x4db2, 0x4eb2, 0x4fb2, 0xe6c4, 0x50b2, 0x51b2, 0x52b2, 0x53b2, 0xe7c4, 0x54b2, 0x55b2, 0x56b2, 0x57b2, 0x58b2, 0x59b2, 0xe8c4, 0x5ab2, 0x61b2, 0x62b2, 0x63b2, 0x64b2, 0x65b2, 0x66b2, 0x67b2, 0x68b2, 0x69b2, 0x6ab2, 0x6bb2, 0x6cb2, 0x6db2, 0x6eb2, 0x6fb2, 0x70b2, 0x71b2, 0x72b2, 0x73b2, 0xe9c4, 0x74b2, 0x75b2, 0x76b2, 0x77b2, 0x78b2, 0x79b2, 0xeac4, 0x7ab2, 0x81b2, 0x82b2, 0x83b2, 0x84b2, 0x85b2, 0x86b2, 0xebc4, 0x87b2, 0x88b2, 0x89b2, 0x8ab2, 0x8bb2, 0x8cb2, 0x8db2, 0x8eb2, 0x8fb2, 0x90b2, 0x91b2, 0x92b2, 0x93b2, 0x94b2, 0x95b2, 0x96b2, 0x97b2, 0x98b2, 0x99b2, 0xecc4, 0x9ab2, 0x9bb2, 0x9cb2, 0x9db2, 0x9eb2, 0x9fb2, 0xa0b2, 0x41b3, 0x42b3, 0x43b3, 0x44b3, 0x45b3, 0x46b3, 0x47b3, 0x48b3, 0x49b3, 0x4ab3, 0x4bb3, 0x4cb3, 0x4db3, 0x4eb3, 0x4fb3, 0x50b3, 0x51b3, 0x52b3, 0x53b3, 0x54b3, 0xedc4, 0xeec4, 0x55b3, 0x56b3, 0xefc4, 0x57b3, 0x58b3, 0x59b3, 0xf0c4, 0x5ab3, 0x61b3, 0x62b3, 0x63b3, 0x64b3, 0x65b3, 0x66b3, 0xf1c4, 0xf2c4, 0x67b3, 0xf3c4, 0x68b3, 0xf4c4, 0x69b3, 0x6ab3, 0x6bb3, 0x6cb3, 0x6db3, 0x6eb3, 0xf5c4, 0x6fb3, 0x70b3, 0x71b3, 0xf6c4, 0x72b3, 0x73b3, 0x74b3, 0xf7c4, 0x75b3, 0x76b3, 0x77b3, 0x78b3, 0x79b3, 0x7ab3, 0x81b3, 0x82b3, 0x83b3, 0x84b3, 0x85b3, 0x86b3, 0xf8c4, 0x87b3, 0x88b3, 0x89b3, 0x8ab3, 0x8bb3, 0x8cb3, 0xf9c4, 0x8db3, 0x8eb3, 0x8fb3, 0x90b3, 0x91b3, 0x92b3, 0x93b3, 0x94b3, 0x95b3, 0x96b3, 0x97b3, 0x98b3, 0x99b3, 0x9ab3, 0x9bb3, 0x9cb3, 0x9db3, 0x9eb3, 0x9fb3, 0xa0b3, 0xfac4, 0x41b4, 0x42b4, 0x43b4, 0x44b4, 0x45b4, 0x46b4, 0xfbc4, 0xfcc4, 0x47b4, 0x48b4, 0xfdc4, 0x49b4, 0x4ab4, 0x4bb4, 0xfec4, 0x4cb4, 0x4db4, 0x4eb4, 0x4fb4, 0x50b4, 0x51b4, 0x52b4, 0xa1c5, 0xa2c5, 0x53b4, 0xa3c5, 0x54b4, 0xa4c5, 0x55b4, 0x56b4, 0x57b4, 0x58b4, 0x59b4, 0x5ab4, 0xa5c5, 0x61b4, 0x62b4, 0x63b4, 0xa6c5, 0x64b4, 0x65b4, 0x66b4, 0xa7c5, 0x67b4, 0x68b4, 0x69b4, 0x6ab4, 0x6bb4, 0x6cb4, 0x6db4, 0xa8c5, 0x6eb4, 0x6fb4, 0x70b4, 0x71b4, 0x72b4, 0x73b4, 0x74b4, 0x75b4, 0x76b4, 0x77b4, 0x78b4, 0xa9c5, 0xaac5, 0x79b4, 0x7ab4, 0xabc5, 0x81b4, 0x82b4, 0x83b4, 0xacc5, 0x84b4, 0x85b4, 0x86b4, 0x87b4, 0x88b4, 0x89b4, 0x8ab4, 0xadc5, 0xaec5, 0x8bb4, 0x8cb4, 0x8db4, 0xafc5, 0x8eb4, 0x8fb4, 0x90b4, 0x91b4, 0x92b4, 0x93b4, 0x94b4, 0x95b4, 0x96b4, 0x97b4, 0x98b4, 0x99b4, 0x9ab4, 0x9bb4, 0x9cb4, 0x9db4, 0x9eb4, 0x9fb4, 0xa0b4, 0x41b5, 0x42b5, 0x43b5, 0x44b5, 0x45b5, 0x46b5, 0x47b5, 0x48b5, 0x49b5, 0x4ab5, 0x4bb5, 0x4cb5, 0x4db5, 0x4eb5, 0x4fb5, 0xb0c5, 0xb1c5, 0x50b5, 0x51b5, 0xb2c5, 0x52b5, 0x53b5, 0x54b5, 0xb3c5, 0x55b5, 0x56b5, 0x57b5, 0x58b5, 0x59b5, 0x5ab5, 0x61b5, 0xb4c5, 0xb5c5, 0x62b5, 0xb6c5, 0x63b5, 0xb7c5, 0x64b5, 0x65b5, 0x66b5, 0x67b5, 0x68b5, 0x69b5, 0xb8c5, 0xb9c5, 0x6ab5, 0x6bb5, 0xbac5, 0x6cb5, 0x6db5, 0x6eb5, 0xbbc5, 0xbcc5, 0x6fb5, 0x70b5, 0x71b5, 0x72b5, 0x73b5, 0x74b5, 0xbdc5, 0xbec5, 0x75b5, 0xbfc5, 0xc0c5, 0xc1c5, 0x76b5, 0x77b5, 0x78b5, 0x79b5, 0x7ab5, 0x81b5, 0xc2c5, 0xc3c5, 0x82b5, 0x83b5, 0xc4c5, 0x84b5, 0x85b5, 0x86b5, 0xc5c5, 0x87b5, 0x88b5, 0x89b5, 0x8ab5, 0x8bb5, 0x8cb5, 0x8db5, 0xc6c5, 0xc7c5, 0x8eb5, 0xc8c5, 0xc9c5, 0xcac5, 0x8fb5, 0x90b5, 0x91b5, 0x92b5, 0x93b5, 0x94b5, 0xcbc5, 0x95b5, 0x96b5, 0x97b5, 0x98b5, 0x99b5, 0x9ab5, 0x9bb5, 0x9cb5, 0x9db5, 0x9eb5, 0x9fb5, 0xa0b5, 0x41b6, 0x42b6, 0x43b6, 0x44b6, 0x45b6, 0x46b6, 0x47b6, 0x48b6, 0xccc5, 0x49b6, 0x4ab6, 0x4bb6, 0x4cb6, 0x4db6, 0x4eb6, 0x4fb6, 0x50b6, 0x51b6, 0x52b6, 0x53b6, 0x54b6, 0x55b6, 0x56b6, 0x57b6, 0x58b6, 0x59b6, 0x5ab6, 0x61b6, 0x62b6, 0x63b6, 0x64b6, 0x65b6, 0x66b6, 0x67b6, 0x68b6, 0x69b6, 0x6ab6, 0x6bb6, 0x6cb6, 0x6db6, 0x6eb6, 0x6fb6, 0x70b6, 0xcdc5, 0xcec5, 0x71b6, 0x72b6, 0xcfc5, 0x73b6, 0x74b6, 0x75b6, 0xd0c5, 0x76b6, 0xd1c5, 0x77b6, 0x78b6, 0x79b6, 0x7ab6, 0x81b6, 0xd2c5, 0xd3c5, 0x82b6, 0xd4c5, 0xd5c5, 0xd6c5, 0x83b6, 0x84b6, 0x85b6, 0x86b6, 0x87b6, 0x88b6, 0xd7c5, 0xd8c5, 0x89b6, 0x8ab6, 0xd9c5, 0x8bb6, 0x8cb6, 0x8db6, 0xdac5, 0x8eb6, 0x8fb6, 0x90b6, 0x91b6, 0x92b6, 0x93b6, 0x94b6, 0xdbc5, 0xdcc5, 0x95b6, 0xddc5, 0x96b6, 0xdec5, 0x97b6, 0x98b6, 0x99b6, 0x9ab6, 0x9bb6, 0x9cb6, 0xdfc5, 0x9db6, 0x9eb6, 0x9fb6, 0xe0c5, 0xa0b6, 0x41b7, 0x42b7, 0x43b7, 0x44b7, 0x45b7, 0x46b7, 0x47b7, 0x48b7, 0x49b7, 0x4ab7, 0x4bb7, 0x4cb7, 0x4db7, 0x4eb7, 0xe1c5, 0x4fb7, 0x50b7, 0x51b7, 0x52b7, 0x53b7, 0x54b7, 0x55b7, 0xe2c5, 0x56b7, 0x57b7, 0x58b7, 0xe3c5, 0x59b7, 0x5ab7, 0x61b7, 0x62b7, 0x63b7, 0x64b7, 0x65b7, 0x66b7, 0x67b7, 0x68b7, 0x69b7, 0x6ab7, 0x6bb7, 0x6cb7, 0x6db7, 0x6eb7, 0x6fb7, 0x70b7, 0x71b7, 0x72b7, 0x73b7, 0x74b7, 0x75b7, 0xe4c5, 0xe5c5, 0x76b7, 0x77b7, 0xe6c5, 0x78b7, 0x79b7, 0x7ab7, 0xe7c5, 0x81b7, 0x82b7, 0x83b7, 0x84b7, 0x85b7, 0x86b7, 0x87b7, 0xe8c5, 0xe9c5, 0x88b7, 0xeac5, 0x89b7, 0xebc5, 0x8ab7, 0x8bb7, 0x8cb7, 0x8db7, 0xecc5, 0x8eb7, 0xedc5, 0x8fb7, 0x90b7, 0x91b7, 0xeec5, 0x92b7, 0x93b7, 0x94b7, 0x95b7, 0x96b7, 0x97b7, 0x98b7, 0x99b7, 0x9ab7, 0x9bb7, 0x9cb7, 0x9db7, 0x9eb7, 0x9fb7, 0xa0b7, 0x41b8, 0x42b8, 0x43b8, 0x44b8, 0x45b8, 0x46b8, 0x47b8, 0x48b8, 0xefc5, 0x49b8, 0x4ab8, 0x4bb8, 0x4cb8, 0x4db8, 0x4eb8, 0x4fb8, 0x50b8, 0x51b8, 0x52b8, 0x53b8, 0x54b8, 0x55b8, 0x56b8, 0x57b8, 0x58b8, 0x59b8, 0x5ab8, 0x61b8, 0x62b8, 0x63b8, 0x64b8, 0x65b8, 0x66b8, 0x67b8, 0x68b8, 0x69b8, 0xf0c5, 0x6ab8, 0x6bb8, 0x6cb8, 0xf1c5, 0x6db8, 0x6eb8, 0x6fb8, 0x70b8, 0x71b8, 0x72b8, 0x73b8, 0x74b8, 0x75b8, 0x76b8, 0x77b8, 0x78b8, 0x79b8, 0x7ab8, 0xf2c5, 0x81b8, 0xf3c5, 0x82b8, 0x83b8, 0x84b8, 0x85b8, 0x86b8, 0x87b8, 0xf4c5, 0x88b8, 0x89b8, 0x8ab8, 0x8bb8, 0x8cb8, 0x8db8, 0x8eb8, 0x8fb8, 0x90b8, 0x91b8, 0x92b8, 0x93b8, 0x94b8, 0x95b8, 0x96b8, 0x97b8, 0x98b8, 0x99b8, 0x9ab8, 0x9bb8, 0x9cb8, 0x9db8, 0x9eb8, 0x9fb8, 0xa0b8, 0x41b9, 0x42b9, 0xf5c5, 0xf6c5, 0x43b9, 0x44b9, 0xf7c5, 0x45b9, 0x46b9, 0x47b9, 0xf8c5, 0x48b9, 0x49b9, 0x4ab9, 0x4bb9, 0x4cb9, 0x4db9, 0x4eb9, 0xf9c5, 0xfac5, 0x4fb9, 0xfbc5, 0x50b9, 0xfcc5, 0x51b9, 0x52b9, 0x53b9, 0x54b9, 0x55b9, 0x56b9, 0xfdc5, 0x57b9, 0x58b9, 0x59b9, 0x5ab9, 0x61b9, 0x62b9, 0x63b9, 0x64b9, 0x65b9, 0x66b9, 0x67b9, 0x68b9, 0x69b9, 0x6ab9, 0x6bb9, 0x6cb9, 0x6db9, 0x6eb9, 0x6fb9, 0xfec5, 0x70b9, 0x71b9, 0x72b9, 0x73b9, 0x74b9, 0x75b9, 0x76b9, 0xa1c6, 0x77b9, 0x78b9, 0x79b9, 0x7ab9, 0x81b9, 0x82b9, 0x83b9, 0x84b9, 0x85b9, 0x86b9, 0x87b9, 0x88b9, 0x89b9, 0x8ab9, 0x8bb9, 0x8cb9, 0x8db9, 0x8eb9, 0x8fb9, 0x90b9, 0x91b9, 0x92b9, 0x93b9, 0x94b9, 0x95b9, 0x96b9, 0x97b9, 0xa2c6, 0xa3c6, 0x98b9, 0x99b9, 0xa4c6, 0x9ab9, 0x9bb9, 0x9cb9, 0xa5c6, 0x9db9, 0x9eb9, 0x9fb9, 0xa0b9, 0x41ba, 0x42ba, 0x43ba, 0xa6c6, 0xa7c6, 0x44ba, 0x45ba, 0x46ba, 0xa8c6, 0x47ba, 0x48ba, 0x49ba, 0x4aba, 0x4bba, 0x4cba, 0xa9c6, 0x4dba, 0x4eba, 0x4fba, 0xaac6, 0x50ba, 0x51ba, 0x52ba, 0xabc6, 0x53ba, 0x54ba, 0x55ba, 0x56ba, 0x57ba, 0x58ba, 0x59ba, 0xacc6, 0x5aba, 0x61ba, 0x62ba, 0x63ba, 0xadc6, 0x64ba, 0x65ba, 0x66ba, 0x67ba, 0x68ba, 0x69ba, 0xaec6, 0xafc6, 0x6aba, 0x6bba, 0xb0c6, 0x6cba, 0x6dba, 0xb1c6, 0xb2c6, 0x6eba, 0xb3c6, 0x6fba, 0x70ba, 0x71ba, 0x72ba, 0x73ba, 0xb4c6, 0xb5c6, 0x74ba, 0xb6c6, 0x75ba, 0x76ba, 0x77ba, 0x78ba, 0x79ba, 0x7aba, 0x81ba, 0x82ba, 0xb7c6, 0x83ba, 0x84ba, 0x85ba, 0xb8c6, 0x86ba, 0x87ba, 0x88ba, 0xb9c6, 0x89ba, 0x8aba, 0x8bba, 0x8cba, 0x8dba, 0x8eba, 0x8fba, 0xbac6, 0xbbc6, 0x90ba, 0x91ba, 0x92ba, 0x93ba, 0x94ba, 0x95ba, 0x96ba, 0x97ba, 0x98ba, 0x99ba, 0xbcc6, 0xbdc6, 0x9aba, 0x9bba, 0xbec6, 0x9cba, 0x9dba, 0x9eba, 0xbfc6, 0x9fba, 0xa0ba, 0x41bb, 0x42bb, 0x43bb, 0x44bb, 0x45bb, 0xc0c6, 0xc1c6, 0x46bb, 0xc2c6, 0x47bb, 0xc3c6, 0x48bb, 0x49bb, 0x4abb, 0x4bbb, 0x4cbb, 0x4dbb, 0xc4c6, 0xc5c6, 0xc6c6, 0x4ebb, 0xc7c6, 0x4fbb, 0x50bb, 0x51bb, 0xc8c6, 0x52bb, 0xc9c6, 0x53bb, 0x54bb, 0x55bb, 0x56bb, 0x57bb, 0xcac6, 0xcbc6, 0x58bb, 0xccc6, 0xcdc6, 0xcec6, 0x59bb, 0x5abb, 0x61bb, 0xcfc6, 0x62bb, 0x63bb, 0xd0c6, 0xd1c6, 0x64bb, 0x65bb, 0xd2c6, 0x66bb, 0x67bb, 0x68bb, 0xd3c6, 0x69bb, 0x6abb, 0x6bbb, 0x6cbb, 0x6dbb, 0x6ebb, 0x6fbb, 0xd4c6, 0xd5c6, 0x70bb, 0xd6c6, 0xd7c6, 0xd8c6, 0x71bb, 0x72bb, 0x73bb, 0x74bb, 0x75bb, 0x76bb, 0xd9c6, 0xdac6, 0x77bb, 0x78bb, 0x79bb, 0x7abb, 0x81bb, 0x82bb, 0x83bb, 0x84bb, 0x85bb, 0x86bb, 0x87bb, 0x88bb, 0x89bb, 0x8abb, 0x8bbb, 0x8cbb, 0x8dbb, 0x8ebb, 0x8fbb, 0x90bb, 0x91bb, 0x92bb, 0x93bb, 0x94bb, 0x95bb, 0x96bb, 0x97bb, 0x98bb, 0x99bb, 0x9abb, 0x9bbb, 0x9cbb, 0x9dbb, 0x9ebb, 0x9fbb, 0xa0bb, 0x41bc, 0x42bc, 0x43bc, 0x44bc, 0x45bc, 0x46bc, 0x47bc, 0x48bc, 0x49bc, 0x4abc, 0x4bbc, 0x4cbc, 0x4dbc, 0x4ebc, 0x4fbc, 0x50bc, 0x51bc, 0x52bc, 0xdbc6, 0xdcc6, 0x53bc, 0x54bc, 0xddc6, 0x55bc, 0x56bc, 0x57bc, 0xdec6, 0x58bc, 0x59bc, 0x5abc, 0x61bc, 0x62bc, 0x63bc, 0x64bc, 0xdfc6, 0xe0c6, 0x65bc, 0xe1c6, 0xe2c6, 0xe3c6, 0x66bc, 0x67bc, 0x68bc, 0x69bc, 0x6abc, 0x6bbc, 0xe4c6, 0xe5c6, 0x6cbc, 0x6dbc, 0xe6c6, 0x6ebc, 0x6fbc, 0x70bc, 0xe7c6, 0x71bc, 0x72bc, 0x73bc, 0x74bc, 0x75bc, 0x76bc, 0x77bc, 0xe8c6, 0xe9c6, 0x78bc, 0xeac6, 0x79bc, 0xebc6, 0x7abc, 0x81bc, 0x82bc, 0x83bc, 0x84bc, 0x85bc, 0xecc6, 0x86bc, 0x87bc, 0x88bc, 0xedc6, 0x89bc, 0x8abc, 0x8bbc, 0xeec6, 0x8cbc, 0x8dbc, 0x8ebc, 0x8fbc, 0x90bc, 0x91bc, 0x92bc, 0xefc6, 0xf0c6, 0x93bc, 0x94bc, 0xf1c6, 0xf2c6, 0x95bc, 0x96bc, 0x97bc, 0x98bc, 0x99bc, 0x9abc, 0xf3c6, 0x9bbc, 0x9cbc, 0x9dbc, 0x9ebc, 0x9fbc, 0xa0bc, 0x41bd, 0xf4c6, 0x42bd, 0x43bd, 0x44bd, 0x45bd, 0x46bd, 0x47bd, 0x48bd, 0x49bd, 0xf5c6, 0x4abd, 0xf6c6, 0x4bbd, 0x4cbd, 0x4dbd, 0x4ebd, 0x4fbd, 0x50bd, 0x51bd, 0x52bd, 0xf7c6, 0xf8c6, 0x53bd, 0x54bd, 0xf9c6, 0x55bd, 0x56bd, 0x57bd, 0xfac6, 0x58bd, 0x59bd, 0x5abd, 0x61bd, 0x62bd, 0x63bd, 0x64bd, 0xfbc6, 0xfcc6, 0x65bd, 0xfdc6, 0x66bd, 0xfec6, 0x67bd, 0x68bd, 0x69bd, 0x6abd, 0x6bbd, 0x6cbd, 0xa1c7, 0x6dbd, 0x6ebd, 0x6fbd, 0x70bd, 0x71bd, 0x72bd, 0x73bd, 0x74bd, 0x75bd, 0x76bd, 0x77bd, 0x78bd, 0x79bd, 0x7abd, 0x81bd, 0x82bd, 0x83bd, 0x84bd, 0x85bd, 0x86bd, 0xa2c7, 0x87bd, 0x88bd, 0x89bd, 0x8abd, 0x8bbd, 0x8cbd, 0x8dbd, 0x8ebd, 0x8fbd, 0x90bd, 0x91bd, 0x92bd, 0x93bd, 0x94bd, 0x95bd, 0x96bd, 0x97bd, 0x98bd, 0x99bd, 0x9abd, 0x9bbd, 0x9cbd, 0x9dbd, 0x9ebd, 0x9fbd, 0xa0bd, 0x41be, 0x42be, 0x43be, 0x44be, 0x45be, 0x46be, 0x47be, 0x48be, 0xa3c7, 0x49be, 0x4abe, 0x4bbe, 0xa4c7, 0x4cbe, 0x4dbe, 0x4ebe, 0x4fbe, 0x50be, 0x51be, 0x52be, 0x53be, 0x54be, 0x55be, 0x56be, 0x57be, 0x58be, 0x59be, 0x5abe, 0x61be, 0x62be, 0x63be, 0x64be, 0x65be, 0x66be, 0x67be, 0x68be, 0xa5c7, 0x69be, 0x6abe, 0x6bbe, 0xa6c7, 0x6cbe, 0x6dbe, 0x6ebe, 0xa7c7, 0x6fbe, 0x70be, 0x71be, 0x72be, 0x73be, 0x74be, 0x75be, 0x76be, 0xa8c7, 0x77be, 0xa9c7, 0x78be, 0x79be, 0x7abe, 0x81be, 0x82be, 0x83be, 0x84be, 0x85be, 0xaac7, 0xabc7, 0x86be, 0x87be, 0xacc7, 0x88be, 0x89be, 0xadc7, 0xaec7, 0x8abe, 0xafc7, 0x8bbe, 0x8cbe, 0x8dbe, 0x8ebe, 0x8fbe, 0xb0c7, 0xb1c7, 0x90be, 0xb2c7, 0x91be, 0xb3c7, 0x92be, 0x93be, 0x94be, 0x95be, 0x96be, 0x97be, 0xb4c7, 0x98be, 0x99be, 0x9abe, 0x9bbe, 0x9cbe, 0x9dbe, 0x9ebe, 0x9fbe, 0xa0be, 0x41bf, 0x42bf, 0x43bf, 0x44bf, 0x45bf, 0x46bf, 0x47bf, 0x48bf, 0x49bf, 0x4abf, 0x4bbf, 0xb5c7, 0x4cbf, 0x4dbf, 0x4ebf, 0x4fbf, 0x50bf, 0x51bf, 0x52bf, 0x53bf, 0x54bf, 0x55bf, 0x56bf, 0x57bf, 0x58bf, 0x59bf, 0x5abf, 0x61bf, 0x62bf, 0x63bf, 0x64bf, 0x65bf, 0x66bf, 0x67bf, 0x68bf, 0x69bf, 0x6abf, 0x6bbf, 0x6cbf, 0x6dbf, 0x6ebf, 0x6fbf, 0x70bf, 0x71bf, 0x72bf, 0x73bf, 0xb6c7, 0x74bf, 0x75bf, 0x76bf, 0xb7c7, 0x77bf, 0x78bf, 0x79bf, 0xb8c7, 0x7abf, 0x81bf, 0x82bf, 0x83bf, 0x84bf, 0x85bf, 0x86bf, 0xb9c7, 0x87bf, 0x88bf, 0xbac7, 0x89bf, 0x8abf, 0x8bbf, 0x8cbf, 0x8dbf, 0x8ebf, 0x8fbf, 0x90bf, 0xbbc7, 0x91bf, 0x92bf, 0x93bf, 0xbcc7, 0x94bf, 0x95bf, 0x96bf, 0xbdc7, 0x97bf, 0x98bf, 0x99bf, 0x9abf, 0x9bbf, 0x9cbf, 0x9dbf, 0xbec7, 0x9ebf, 0x9fbf, 0xbfc7, 0xa0bf, 0xc0c7, 0x41c0, 0x42c0, 0x43c0, 0x44c0, 0x45c0, 0x46c0, 0xc1c7, 0x47c0, 0x48c0, 0x49c0, 0xc2c7, 0x4ac0, 0x4bc0, 0x4cc0, 0xc3c7, 0x4dc0, 0x4ec0, 0x4fc0, 0x50c0, 0x51c0, 0x52c0, 0x53c0, 0xc4c7, 0xc5c7, 0x54c0, 0xc6c7, 0x55c0, 0x56c0, 0x57c0, 0x58c0, 0x59c0, 0x5ac0, 0x61c0, 0x62c0, 0x63c0, 0x64c0, 0x65c0, 0x66c0, 0x67c0, 0x68c0, 0x69c0, 0x6ac0, 0x6bc0, 0x6cc0, 0x6dc0, 0x6ec0, 0x6fc0, 0x70c0, 0x71c0, 0x72c0, 0x73c0, 0x74c0, 0x75c0, 0x76c0, 0x77c0, 0x78c0, 0x79c0, 0x7ac0, 0x81c0, 0x82c0, 0x83c0, 0x84c0, 0xc7c7, 0xc8c7, 0x85c0, 0x86c0, 0xc9c7, 0x87c0, 0x88c0, 0x89c0, 0xcac7, 0x8ac0, 0x8bc0, 0x8cc0, 0x8dc0, 0x8ec0, 0x8fc0, 0x90c0, 0xcbc7, 0xccc7, 0x91c0, 0xcdc7, 0x92c0, 0xcec7, 0x93c0, 0x94c0, 0x95c0, 0x96c0, 0x97c0, 0x98c0, 0xcfc7, 0xd0c7, 0x99c0, 0x9ac0, 0xd1c7, 0x9bc0, 0x9cc0, 0x9dc0, 0xd2c7, 0x9ec0, 0x9fc0, 0xa0c0, 0x41c1, 0xd3c7, 0x42c1, 0x43c1, 0xd4c7, 0xd5c7, 0x44c1, 0xd6c7, 0x45c1, 0xd7c7, 0x46c1, 0x47c1, 0x48c1, 0x49c1, 0x4ac1, 0x4bc1, 0xd8c7, 0xd9c7, 0x4cc1, 0x4dc1, 0xdac7, 0x4ec1, 0x4fc1, 0x50c1, 0xdbc7, 0x51c1, 0x52c1, 0x53c1, 0x54c1, 0x55c1, 0x56c1, 0x57c1, 0xdcc7, 0xddc7, 0x58c1, 0xdec7, 0xdfc7, 0xe0c7, 0x59c1, 0x5ac1, 0x61c1, 0x62c1, 0x63c1, 0x64c1, 0xe1c7, 0x65c1, 0x66c1, 0x67c1, 0x68c1, 0x69c1, 0x6ac1, 0x6bc1, 0x6cc1, 0x6dc1, 0x6ec1, 0x6fc1, 0x70c1, 0x71c1, 0x72c1, 0x73c1, 0x74c1, 0x75c1, 0x76c1, 0x77c1, 0x78c1, 0xe2c7, 0x79c1, 0x7ac1, 0x81c1, 0x82c1, 0x83c1, 0x84c1, 0x85c1, 0x86c1, 0x87c1, 0x88c1, 0x89c1, 0x8ac1, 0x8bc1, 0x8cc1, 0x8dc1, 0x8ec1, 0x8fc1, 0x90c1, 0x91c1, 0x92c1, 0x93c1, 0x94c1, 0x95c1, 0x96c1, 0x97c1, 0x98c1, 0x99c1, 0x9ac1, 0x9bc1, 0x9cc1, 0x9dc1, 0x9ec1, 0x9fc1, 0xa0c1, 0xe3c7, 0xe4c7, 0x41c2, 0x42c2, 0xe5c7, 0x43c2, 0x44c2, 0x45c2, 0xe6c7, 0x46c2, 0xe7c7, 0x47c2, 0x48c2, 0x49c2, 0x4ac2, 0x4bc2, 0xe8c7, 0xe9c7, 0x4cc2, 0xeac7, 0x4dc2, 0xebc7, 0x4ec2, 0x4fc2, 0x50c2, 0x51c2, 0x52c2, 0x53c2, 0xecc7, 0xedc7, 0x54c2, 0x55c2, 0xeec7, 0x56c2, 0x57c2, 0x58c2, 0xefc7, 0x59c2, 0x5ac2, 0x61c2, 0x62c2, 0x63c2, 0x64c2, 0x65c2, 0xf0c7, 0xf1c7, 0x66c2, 0xf2c7, 0x67c2, 0xf3c7, 0x68c2, 0x69c2, 0x6ac2, 0x6bc2, 0x6cc2, 0x6dc2, 0xf4c7, 0xf5c7, 0x6ec2, 0x6fc2, 0xf6c7, 0x70c2, 0x71c2, 0x72c2, 0xf7c7, 0x73c2, 0x74c2, 0x75c2, 0x76c2, 0x77c2, 0x78c2, 0x79c2, 0xf8c7, 0xf9c7, 0x7ac2, 0xfac7, 0xfbc7, 0xfcc7, 0x81c2, 0x82c2, 0x83c2, 0x84c2, 0x85c2, 0x86c2, 0xfdc7, 0x87c2, 0x88c2, 0x89c2, 0xfec7, 0x8ac2, 0x8bc2, 0x8cc2, 0xa1c8, 0x8dc2, 0x8ec2, 0x8fc2, 0x90c2, 0x91c2, 0x92c2, 0x93c2, 0x94c2, 0xa2c8, 0x95c2, 0x96c2, 0x97c2, 0x98c2, 0x99c2, 0x9ac2, 0x9bc2, 0x9cc2, 0x9dc2, 0x9ec2, 0xa3c8, 0xa4c8, 0x9fc2, 0xa0c2, 0xa5c8, 0x41c3, 0x42c3, 0x43c3, 0xa6c8, 0x44c3, 0x45c3, 0x46c3, 0x47c3, 0xa7c8, 0x48c3, 0x49c3, 0xa8c8, 0xa9c8, 0x4ac3, 0xaac8, 0x4bc3, 0xabc8, 0x4cc3, 0x4dc3, 0x4ec3, 0xacc8, 0x4fc3, 0x50c3, 0xadc8, 0xaec8, 0x51c3, 0x52c3, 0xafc8, 0x53c3, 0x54c3, 0x55c3, 0xb0c8, 0x56c3, 0x57c3, 0x58c3, 0x59c3, 0x5ac3, 0x61c3, 0x62c3, 0x63c3, 0x64c3, 0x65c3, 0xb1c8, 0x66c3, 0xb2c8, 0x67c3, 0x68c3, 0x69c3, 0x6ac3, 0x6bc3, 0x6cc3, 0xb3c8, 0xb4c8, 0x6dc3, 0x6ec3, 0xb5c8, 0x6fc3, 0x70c3, 0x71c3, 0x72c3, 0x73c3, 0x74c3, 0x75c3, 0x76c3, 0x77c3, 0x78c3, 0x79c3, 0x7ac3, 0x81c3, 0x82c3, 0xb6c8, 0x83c3, 0xb7c8, 0x84c3, 0x85c3, 0x86c3, 0x87c3, 0x88c3, 0x89c3, 0xb8c8, 0xb9c8, 0x8ac3, 0x8bc3, 0xbac8, 0x8cc3, 0x8dc3, 0x8ec3, 0xbbc8, 0x8fc3, 0x90c3, 0x91c3, 0x92c3, 0x93c3, 0x94c3, 0x95c3, 0x96c3, 0xbcc8, 0x97c3, 0xbdc8, 0x98c3, 0xbec8, 0x99c3, 0x9ac3, 0x9bc3, 0x9cc3, 0x9dc3, 0x9ec3, 0xbfc8, 0x9fc3, 0xa0c3, 0x41c4, 0xc0c8, 0x42c4, 0x43c4, 0x44c4, 0xc1c8, 0x45c4, 0x46c4, 0x47c4, 0x48c4, 0x49c4, 0x4ac4, 0x4bc4, 0x4cc4, 0xc2c8, 0x4dc4, 0xc3c8, 0x4ec4, 0x4fc4, 0x50c4, 0x51c4, 0x52c4, 0x53c4, 0x54c4, 0x55c4, 0xc4c8, 0xc5c8, 0x56c4, 0x57c4, 0xc6c8, 0x58c4, 0x59c4, 0x5ac4, 0xc7c8, 0x61c4, 0x62c4, 0x63c4, 0x64c4, 0xc8c8, 0x65c4, 0x66c4, 0xc9c8, 0x67c4, 0x68c4, 0xcac8, 0x69c4, 0xcbc8, 0x6ac4, 0x6bc4, 0x6cc4, 0x6dc4, 0x6ec4, 0x6fc4, 0xccc8, 0x70c4, 0x71c4, 0x72c4, 0xcdc8, 0x73c4, 0x74c4, 0x75c4, 0xcec8, 0x76c4, 0x77c4, 0x78c4, 0x79c4, 0x7ac4, 0x81c4, 0x82c4, 0xcfc8, 0x83c4, 0x84c4, 0x85c4, 0x86c4, 0xd0c8, 0x87c4, 0x88c4, 0x89c4, 0x8ac4, 0x8bc4, 0x8cc4, 0xd1c8, 0xd2c8, 0x8dc4, 0x8ec4, 0xd3c8, 0x8fc4, 0x90c4, 0x91c4, 0xd4c8, 0x92c4, 0x93c4, 0x94c4, 0x95c4, 0x96c4, 0x97c4, 0x98c4, 0x99c4, 0x9ac4, 0x9bc4, 0x9cc4, 0x9dc4, 0xd5c8, 0x9ec4, 0x9fc4, 0xa0c4, 0x41c5, 0x42c5, 0x43c5, 0xd6c8, 0xd7c8, 0x44c5, 0x45c5, 0xd8c8, 0x46c5, 0x47c5, 0x48c5, 0xd9c8, 0x49c5, 0x4ac5, 0x4bc5, 0x4cc5, 0x4dc5, 0x4ec5, 0x4fc5, 0xdac8, 0xdbc8, 0x50c5, 0xdcc8, 0x51c5, 0xddc8, 0x52c5, 0x53c5, 0x54c5, 0x55c5, 0x56c5, 0x57c5, 0xdec8, 0xdfc8, 0x58c5, 0x59c5, 0xe0c8, 0x5ac5, 0x61c5, 0x62c5, 0xe1c8, 0x63c5, 0x64c5, 0x65c5, 0x66c5, 0x67c5, 0x68c5, 0x69c5, 0xe2c8, 0x6ac5, 0x6bc5, 0xe3c8, 0x6cc5, 0xe4c8, 0x6dc5, 0x6ec5, 0x6fc5, 0x70c5, 0x71c5, 0x72c5, 0xe5c8, 0xe6c8, 0x73c5, 0x74c5, 0xe7c8, 0x75c5, 0xe8c8, 0xe9c8, 0xeac8, 0xebc8, 0x76c5, 0x77c5, 0x78c5, 0x79c5, 0x7ac5, 0x81c5, 0xecc8, 0xedc8, 0x82c5, 0xeec8, 0x83c5, 0xefc8, 0x84c5, 0x85c5, 0x86c5, 0xf0c8, 0x87c5, 0x88c5, 0xf1c8, 0x89c5, 0x8ac5, 0x8bc5, 0xf2c8, 0x8cc5, 0x8dc5, 0x8ec5, 0xf3c8, 0x8fc5, 0x90c5, 0x91c5, 0x92c5, 0x93c5, 0x94c5, 0x95c5, 0xf4c8, 0xf5c8, 0x96c5, 0x97c5, 0x98c5, 0xf6c8, 0x99c5, 0x9ac5, 0x9bc5, 0x9cc5, 0x9dc5, 0x9ec5, 0xf7c8, 0xf8c8, 0x9fc5, 0xa0c5, 0xf9c8, 0x41c6, 0x42c6, 0x43c6, 0xfac8, 0x44c6, 0x45c6, 0x46c6, 0x47c6, 0x48c6, 0x49c6, 0x4ac6, 0xfbc8, 0xfcc8, 0x4bc6, 0xfdc8, 0x4cc6, 0xfec8, 0x4dc6, 0x4ec6, 0x4fc6, 0x50c6, 0x51c6, 0x52c6 }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0xf900[ 268 ] = { 0xd0cb, 0xd6cb, 0xe7cb, 0xcfcd, 0xe8cd, 0xadce, 0xfbcf, 0xa2d0, 0xb8d0, 0xd0d0, 0xddd0, 0xd4d1, 0xd5d1, 0xd8d1, 0xdbd1, 0xdcd1, 0xddd1, 0xded1, 0xdfd1, 0xe0d1, 0xe2d1, 0xe3d1, 0xe4d1, 0xe5d1, 0xe6d1, 0xe8d1, 0xe9d1, 0xead1, 0xebd1, 0xedd1, 0xefd1, 0xf0d1, 0xf2d1, 0xf6d1, 0xfad1, 0xfcd1, 0xfdd1, 0xfed1, 0xa2d2, 0xa3d2, 0xa7d2, 0xa8d2, 0xa9d2, 0xaad2, 0xabd2, 0xadd2, 0xb2d2, 0xbed2, 0xc2d2, 0xc3d2, 0xc4d2, 0xc6d2, 0xc7d2, 0xc8d2, 0xc9d2, 0xcad2, 0xcbd2, 0xcdd2, 0xced2, 0xcfd2, 0xd0d2, 0xd1d2, 0xd2d2, 0xd3d2, 0xd4d2, 0xd5d2, 0xd6d2, 0xd7d2, 0xd9d2, 0xdad2, 0xded2, 0xdfd2, 0xe1d2, 0xe2d2, 0xe4d2, 0xe5d2, 0xe6d2, 0xe7d2, 0xe8d2, 0xe9d2, 0xead2, 0xebd2, 0xf0d2, 0xf1d2, 0xf2d2, 0xf3d2, 0xf4d2, 0xf5d2, 0xf7d2, 0xf8d2, 0xe6d4, 0xfcd4, 0xa5d5, 0xabd5, 0xaed5, 0xb8d6, 0xcdd6, 0xcbd7, 0xe4d7, 0xc5db, 0xe4db, 0xa5dc, 0xa5dd, 0xd5dd, 0xf4dd, 0xfcde, 0xfede, 0xb3df, 0xe1df, 0xe8df, 0xf1e0, 0xade1, 0xede1, 0xf5e3, 0xa1e4, 0xa9e4, 0xaee5, 0xb1e5, 0xb2e5, 0xb9e5, 0xbbe5, 0xbce5, 0xc4e5, 0xcee5, 0xd0e5, 0xd2e5, 0xd6e5, 0xfae5, 0xfbe5, 0xfce5, 0xfee5, 0xa1e6, 0xa4e6, 0xa7e6, 0xade6, 0xafe6, 0xb0e6, 0xb1e6, 0xb3e6, 0xb7e6, 0xb8e6, 0xbce6, 0xc4e6, 0xc6e6, 0xc7e6, 0xcae6, 0xd2e6, 0xd6e6, 0xd9e6, 0xdce6, 0xdfe6, 0xe1e6, 0xe4e6, 0xe5e6, 0xe6e6, 0xe8e6, 0xeae6, 0xebe6, 0xece6, 0xefe6, 0xf1e6, 0xf2e6, 0xf5e6, 0xf6e6, 0xf7e6, 0xf9e6, 0xa1e7, 0xa6e7, 0xa9e7, 0xaae7, 0xace7, 0xade7, 0xb0e7, 0xbfe7, 0xc1e7, 0xc6e7, 0xc7e7, 0xcbe7, 0xcde7, 0xcfe7, 0xd0e7, 0xd3e7, 0xdfe7, 0xe4e7, 0xe6e7, 0xf7e7, 0xe7e8, 0xe8e8, 0xf0e8, 0xf1e8, 0xf7e8, 0xf9e8, 0xfbe8, 0xfee8, 0xa7e9, 0xace9, 0xcce9, 0xf7e9, 0xc1ea, 0xe5ea, 0xf4ea, 0xf7ea, 0xfcea, 0xfeea, 0xa4eb, 0xa7eb, 0xa9eb, 0xaaeb, 0xbaeb, 0xbbeb, 0xbdeb, 0xc1eb, 0xc2eb, 0xc6eb, 0xc7eb, 0xcceb, 0xcfeb, 0xd0eb, 0xd1eb, 0xd2eb, 0xd8eb, 0xa6ec, 0xa7ec, 0xaaec, 0xafec, 0xb0ec, 0xb1ec, 0xb2ec, 0xb5ec, 0xb8ec, 0xbaec, 0xc0ec, 0xc1ec, 0xc5ec, 0xc6ec, 0xc9ec, 0xcaec, 0xd5ec, 0xddec, 0xdeec, 0xe1ec, 0xe4ec, 0xe7ec, 0xe8ec, 0xf7ec, 0xf8ec, 0xfaec, 0xa1ed, 0xa2ed, 0xa3ed, 0xeeed, 0xdbee, 0xbdf2, 0xfaf2, 0xb1f3, 0xa7f4, 0xeef4, 0xf4f6, 0xf6f6, 0xb8f7, 0xc8f7, 0xd3f7, 0xdbf8, 0xf0f8, 0xa1fa, 0xa2fa, 0xe6fa, 0xa9fc }; const uint16_t libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ 256 ] = { 0x001a, 0xa1a3, 0xa2a3, 0xa3a3, 0xa4a3, 0xa5a3, 0xa6a3, 0xa7a3, 0xa8a3, 0xa9a3, 0xaaa3, 0xaba3, 0xaca3, 0xada3, 0xaea3, 0xafa3, 0xb0a3, 0xb1a3, 0xb2a3, 0xb3a3, 0xb4a3, 0xb5a3, 0xb6a3, 0xb7a3, 0xb8a3, 0xb9a3, 0xbaa3, 0xbba3, 0xbca3, 0xbda3, 0xbea3, 0xbfa3, 0xc0a3, 0xc1a3, 0xc2a3, 0xc3a3, 0xc4a3, 0xc5a3, 0xc6a3, 0xc7a3, 0xc8a3, 0xc9a3, 0xcaa3, 0xcba3, 0xcca3, 0xcda3, 0xcea3, 0xcfa3, 0xd0a3, 0xd1a3, 0xd2a3, 0xd3a3, 0xd4a3, 0xd5a3, 0xd6a3, 0xd7a3, 0xd8a3, 0xd9a3, 0xdaa3, 0xdba3, 0xaca1, 0xdda3, 0xdea3, 0xdfa3, 0xe0a3, 0xe1a3, 0xe2a3, 0xe3a3, 0xe4a3, 0xe5a3, 0xe6a3, 0xe7a3, 0xe8a3, 0xe9a3, 0xeaa3, 0xeba3, 0xeca3, 0xeda3, 0xeea3, 0xefa3, 0xf0a3, 0xf1a3, 0xf2a3, 0xf3a3, 0xf4a3, 0xf5a3, 0xf6a3, 0xf7a3, 0xf8a3, 0xf9a3, 0xfaa3, 0xfba3, 0xfca3, 0xfda3, 0xa6a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcba1, 0xcca1, 0xfea1, 0xfea3, 0x001a, 0xcda1, 0xdca3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_949_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_949_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xac00 ) && ( unicode_character < 0xd7a4 ) ) { unicode_character -= 0xac00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xac00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa14 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_949_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_949_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( ( byte_stream_character >= 0x81 ) && ( byte_stream_character <= 0xa1 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x81: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; case 0xa1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa2 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xe8 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa240[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa3 ) && ( byte_stream_character <= 0xa4 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa340[ additional_character ]; break; case 0xa4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa5 ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa540[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xe8 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa640[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa7 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa740[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa8 ) && ( byte_stream_character <= 0xa9 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xaa ) && ( byte_stream_character <= 0xab ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xaa: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xac ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xc8 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xd0; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xacd0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xad ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xcdc5; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xae ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xce2b; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xaf ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xce99; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xb0 ) && ( byte_stream_character <= 0xc5 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xb0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xc6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x58 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc640[ additional_character ]; } else if( additional_character >= 0xa0 ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc6a0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xc7 ) && ( byte_stream_character <= 0xc8 ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xc7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc7a0[ additional_character ]; break; case 0xc8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xc8a0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xca ) && ( byte_stream_character <= 0xfd ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xca: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcaa0[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcba0[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcca0[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcda0[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcea0[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xcfa0[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd0a0[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd1a0[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd2a0[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd3a0[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd4a0[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd5a0[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd6a0[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd7a0[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd8a0[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xd9a0[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdaa0[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdba0[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdca0[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdda0[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdea0[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xdfa0[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe0a0[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe1a0[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe2a0[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe3a0[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe4a0[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe5a0[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe6a0[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe7a0[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe8a0[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xe9a0[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeaa0[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeba0[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeca0[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeda0[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xeea0[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xefa0[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf0a0[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf1a0[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf2a0[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf3a0[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf4a0[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf5a0[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf6a0[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf7a0[ additional_character ]; break; case 0xf8: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf8a0[ additional_character ]; break; case 0xf9: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xf9a0[ additional_character ]; break; case 0xfa: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfaa0[ additional_character ]; break; case 0xfb: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfba0[ additional_character ]; break; case 0xfc: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfca0[ additional_character ]; break; case 0xfd: *unicode_character = libuna_codepage_windows_949_byte_stream_to_unicode_base_0xfda0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_949_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_949_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xac00 ) && ( unicode_character < 0xd7a4 ) ) { unicode_character -= 0xac00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xac00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa14 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_949_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libpff-20120802/libuna/libuna_codepage_iso_8859_6.h0000644000175000017500000000231512005152764016460 00000000000000/* * ISO 8859-6 codepage (Arabic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_6_H ) #define _LIBUNA_CODEPAGE_ISO_8859_6_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ 64 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1256.h0000644000175000017500000000275412005152764017122 00000000000000/* * Windows 1256 codepage (Arabic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1256_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1256_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ 32 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ 64 ]; extern const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ 32 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_6.c0000644000175000017500000000475612005152764016466 00000000000000/* * ISO 8859-6 codepage (Arabic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_6.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-6 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0xfffd, 0xfffd, 0xfffd, 0x00a4, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x060c, 0x00ad, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x061b, 0xfffd, 0xfffd, 0xfffd, 0x061f, 0xfffd, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637, 0x0638, 0x0639, 0x063a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647, 0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f, 0x0650, 0x0651, 0x0652, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; /* Unicode to ASCII character lookup table for ISO 8859-6 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ 64 ] = { 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf, 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_codepage_windows_874.h0000644000175000017500000000245312005152764017043 00000000000000/* * Windows 874 codepage (Thai) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_874_H ) #define _LIBUNA_CODEPAGE_WINDOWS_874_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ 96 ]; extern const uint8_t libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ 8 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1251.c0000644000175000017500000000672312005152764017110 00000000000000/* * Windows 1251 codepage (Cyrillic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1251.h" /* Extended ASCII to Unicode character lookup table for Windows 1251 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021, 0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f, 0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f, 0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7, 0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407, 0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7, 0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f }; /* Unicode to ASCII character lookup table for Windows 1251 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0xa6, 0xa7, 0x1a, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0x1a, 0x1a, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ 96 ] = { 0x1a, 0xa8, 0x80, 0x81, 0xaa, 0xbd, 0xb2, 0xaf, 0xa3, 0x8a, 0x8c, 0x8e, 0x8d, 0x1a, 0xa1, 0x8f, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 0x1a, 0xb8, 0x90, 0x83, 0xba, 0xbe, 0xb3, 0xbf, 0xbc, 0x9a, 0x9c, 0x9e, 0x9d, 0x1a, 0xa2, 0x9f }; const uint8_t libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_codepage_windows_1256.c0000644000175000017500000000713512005152764017113 00000000000000/* * Windows 1256 codepage (Arabic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1256.h" /* Extended ASCII to Unicode character lookup table for Windows 1256 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0x067e, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0679, 0x2039, 0x0152, 0x0686, 0x0698, 0x0688, 0x06af, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x06a9, 0x2122, 0x0691, 0x203a, 0x0153, 0x200c, 0x200d, 0x06ba, 0x00a0, 0x060c, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x06be, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x061b, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x061f, 0x06c1, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627, 0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f, 0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x00d7, 0x0637, 0x0638, 0x0639, 0x063a, 0x0640, 0x0641, 0x0642, 0x0643, 0x00e0, 0x0644, 0x00e2, 0x0645, 0x0646, 0x0647, 0x0648, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0649, 0x064a, 0x00ee, 0x00ef, 0x064b, 0x064c, 0x064d, 0x064e, 0x00f4, 0x064f, 0x0650, 0x00f7, 0x0651, 0x00f9, 0x0652, 0x00fb, 0x00fc, 0x200e, 0x200f, 0x06d2 }; /* Unicode to ASCII character lookup table for Windows 1256 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a }; const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ 32 ] = { 0xe0, 0x1a, 0xe2, 0x1a, 0x1a, 0x1a, 0x1a, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0x1a, 0x1a, 0xee, 0xef, 0x1a, 0x1a, 0x1a, 0x1a, 0xf4, 0x1a, 0x1a, 0xf7, 0x1a, 0xf9, 0x1a, 0xfb, 0xfc, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ 64 ] = { 0x1a, 0x1a, 0x1a, 0xba, 0x1a, 0x1a, 0x1a, 0xbf, 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd8, 0xd9, 0xda, 0xdb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdc, 0xdd, 0xde, 0xdf, 0xe1, 0xe3, 0xe4, 0xe5, 0xe6, 0xec, 0xed, 0xf0, 0xf1, 0xf2, 0xf3, 0xf5, 0xf6, 0xf8, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ 32 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0x9d, 0x9e, 0xfd, 0xfe, 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_base16_stream.h0000644000175000017500000000453512005152764015557 00000000000000/* * Base16 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BASE16_STREAM_H ) #define _LIBUNA_BASE16_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_base16_stream_size_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, size_t *byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_copy_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base16_stream_size, uint32_t base16_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base16_stream_with_index_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, size_t *base16_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_2.h0000644000175000017500000000261312005152764016455 00000000000000/* * ISO 8859-2 codepage (Central European) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_2_H ) #define _LIBUNA_CODEPAGE_ISO_8859_2_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ 128 ]; extern const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ 72 ]; extern const uint8_t libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ 8 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/Makefile.am0000644000175000017500000000576712005152764013464 00000000000000if HAVE_LOCAL_LIBUNA AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libuna.la libuna_la_SOURCES = \ libuna_base16_stream.c libuna_base16_stream.h \ libuna_base32_stream.c libuna_base32_stream.h \ libuna_base64_stream.c libuna_base64_stream.h \ libuna_byte_stream.c libuna_byte_stream.h \ libuna_codepage_iso_8859_2.c libuna_codepage_iso_8859_2.h \ libuna_codepage_iso_8859_3.c libuna_codepage_iso_8859_3.h \ libuna_codepage_iso_8859_4.c libuna_codepage_iso_8859_4.h \ libuna_codepage_iso_8859_5.c libuna_codepage_iso_8859_5.h \ libuna_codepage_iso_8859_6.c libuna_codepage_iso_8859_6.h \ libuna_codepage_iso_8859_7.c libuna_codepage_iso_8859_7.h \ libuna_codepage_iso_8859_8.c libuna_codepage_iso_8859_8.h \ libuna_codepage_iso_8859_9.c libuna_codepage_iso_8859_9.h \ libuna_codepage_iso_8859_10.c libuna_codepage_iso_8859_10.h \ libuna_codepage_iso_8859_13.c libuna_codepage_iso_8859_13.h \ libuna_codepage_iso_8859_14.c libuna_codepage_iso_8859_14.h \ libuna_codepage_iso_8859_15.c libuna_codepage_iso_8859_15.h \ libuna_codepage_iso_8859_16.c libuna_codepage_iso_8859_16.h \ libuna_codepage_koi8_r.c libuna_codepage_koi8_r.h \ libuna_codepage_koi8_u.c libuna_codepage_koi8_u.h \ libuna_codepage_windows_874.c libuna_codepage_windows_874.h \ libuna_codepage_windows_932.c libuna_codepage_windows_932.h \ libuna_codepage_windows_936.c libuna_codepage_windows_936.h \ libuna_codepage_windows_949.c libuna_codepage_windows_949.h \ libuna_codepage_windows_950.c libuna_codepage_windows_950.h \ libuna_codepage_windows_1250.c libuna_codepage_windows_1250.h \ libuna_codepage_windows_1251.c libuna_codepage_windows_1251.h \ libuna_codepage_windows_1252.c libuna_codepage_windows_1252.h \ libuna_codepage_windows_1253.c libuna_codepage_windows_1253.h \ libuna_codepage_windows_1254.c libuna_codepage_windows_1254.h \ libuna_codepage_windows_1255.c libuna_codepage_windows_1255.h \ libuna_codepage_windows_1256.c libuna_codepage_windows_1256.h \ libuna_codepage_windows_1257.c libuna_codepage_windows_1257.h \ libuna_codepage_windows_1258.c libuna_codepage_windows_1258.h \ libuna_definitions.h \ libuna_error.c libuna_error.h \ libuna_extern.h \ libuna_inline.h \ libuna_libcerror.h \ libuna_support.c libuna_support.h \ libuna_types.h \ libuna_unicode_character.c libuna_unicode_character.h \ libuna_unused.h \ libuna_url_stream.c libuna_url_stream.h \ libuna_utf16_stream.c libuna_utf16_stream.h \ libuna_utf16_string.c libuna_utf16_string.h \ libuna_utf32_stream.c libuna_utf32_stream.h \ libuna_utf32_string.c libuna_utf32_string.h \ libuna_utf7_stream.c libuna_utf7_stream.h \ libuna_utf8_stream.c libuna_utf8_stream.h \ libuna_utf8_string.c libuna_utf8_string.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) libpff-20120802/libuna/libuna_codepage_windows_1257.c0000644000175000017500000000770312005152764017115 00000000000000/* * Windows 1257 codepage (Baltic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1257.h" /* Extended ASCII to Unicode character lookup table for Windows 1257 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0xfffd, 0x201e, 0x2026, 0x2020, 0x2021, 0xfffd, 0x2030, 0xfffd, 0x2039, 0xfffd, 0x00a8, 0x02c7, 0x00b8, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0xfffd, 0x203a, 0xfffd, 0x00af, 0x02db, 0xfffd, 0x00a0, 0xfffd, 0x00a2, 0x00a3, 0x00a4, 0xfffd, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x02d9 }; /* Unicode to ASCII character lookup table for Windows 1257 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ 224 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0x1a, 0xa6, 0xa7, 0x8d, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x9d, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0x8f, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc4, 0xc5, 0xaf, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0x1a, 0xd5, 0xd6, 0xd7, 0xa8, 0x1a, 0x1a, 0x1a, 0xdc, 0x1a, 0x1a, 0xdf, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0xe5, 0xbf, 0x1a, 0x1a, 0xe9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, 0xf5, 0xf6, 0xf7, 0xb8, 0x1a, 0x1a, 0x1a, 0xfc, 0x1a, 0x1a, 0x1a, 0xc2, 0xe2, 0x1a, 0x1a, 0xc0, 0xe0, 0xc3, 0xe3, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0xcb, 0xeb, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xce, 0xee, 0x1a, 0x1a, 0xc1, 0xe1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcd, 0xed, 0x1a, 0x1a, 0x1a, 0xcf, 0xef, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xaa, 0xba, 0x1a, 0x1a, 0xda, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd8, 0xf8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x1a }; const uint8_t libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_codepage_windows_1254.h0000644000175000017500000000275212005152764017116 00000000000000/* * Windows 1254 codepage (Turkish) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1254_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1254_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ 32 ]; extern const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ 16 ]; extern const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ 16 ]; extern const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ 48 ]; extern const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1255.c0000644000175000017500000000655012005152764017112 00000000000000/* * Windows 1255 codepage (Hebrew) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1255.h" /* Extended ASCII to Unicode character lookup table for Windows 1255 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0xfffd, 0x2039, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0xfffd, 0x203a, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20aa, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x05b0, 0x05b1, 0x05b2, 0x05b3, 0x05b4, 0x05b5, 0x05b6, 0x05b7, 0x05b8, 0x05b9, 0xfffd, 0x05bb, 0x05bc, 0x05bd, 0x05be, 0x05bf, 0x05c0, 0x05c1, 0x05c2, 0x05c3, 0x05f0, 0x05f1, 0x05f2, 0x05f3, 0x05f4, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd }; /* Unicode to ASCII character lookup table for Windows 1255 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa3, 0x1a, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf }; const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ 24 ] = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0x1a, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ 40 ] = { 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_unused.h0000644000175000017500000000245212005152764014422 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_UNUSED_H ) #define _LIBUNA_INTERNAL_UNUSED_H #include #if !defined( LIBUNA_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBUNA_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBUNA_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBUNA_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBUNA_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1253.h0000644000175000017500000000261712005152764017115 00000000000000/* * Windows 1253 codepage (Greek) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1253_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1253_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ 80 ]; extern const uint8_t libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_unicode_character.h0000644000175000017500000001406512005152764016564 00000000000000/* * Unicode character functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UNICDODE_CHARACTER_H ) #define _LIBUNA_UNICDODE_CHARACTER_H #include #include #include "libuna_definitions.h" #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, int codepage, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf7_stream( libuna_unicode_character_t unicode_character, size_t *utf7_stream_character_size, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf7_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf7_stream_index, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf7_stream( libuna_unicode_character_t unicode_character, uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf7_stream_index, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf8( libuna_unicode_character_t unicode_character, size_t *utf8_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf8( libuna_unicode_character_t *unicode_character, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf8( libuna_unicode_character_t unicode_character, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf16( libuna_unicode_character_t unicode_character, size_t *utf16_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf16( libuna_unicode_character_t *unicode_character, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf16( libuna_unicode_character_t unicode_character, libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf16_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf16_stream( libuna_unicode_character_t unicode_character, uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf32( libuna_unicode_character_t unicode_character, size_t *utf32_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf32( libuna_unicode_character_t *unicode_character, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf32( libuna_unicode_character_t unicode_character, libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf32_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf32_stream( libuna_unicode_character_t unicode_character, uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_byte_stream.c0000644000175000017500000003552312005152764015435 00000000000000/* * Byte stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_byte_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" /* Determines the size of a byte stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many byte stream character bytes are required */ if( libuna_unicode_character_size_to_byte_stream( unicode_character, codepage, byte_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to unable to determine size of Unicode character in byte stream.", function ); return( -1 ); } } return( 1 ); } /* Copies a byte stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_copy_from_utf8( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_copy_from_utf8"; size_t byte_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into a byte stream */ if( libuna_unicode_character_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a byte stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many byte stream character bytes are required */ if( libuna_unicode_character_size_to_byte_stream( unicode_character, codepage, byte_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to unable to determine size of Unicode character in byte stream.", function ); return( -1 ); } } return( 1 ); } /* Copies a byte stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_copy_from_utf16( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_copy_from_utf16"; size_t byte_stream_index = 0; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into a byte stream */ if( libuna_unicode_character_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a byte stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } *byte_stream_size = 0; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many byte stream character bytes are required */ if( libuna_unicode_character_size_to_byte_stream( unicode_character, codepage, byte_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to unable to determine size of Unicode character in byte stream.", function ); return( -1 ); } } return( 1 ); } /* Copies a byte stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_byte_stream_copy_from_utf32( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_byte_stream_copy_from_utf32"; size_t byte_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 string.", function ); return( -1 ); } /* Convert the Unicode character into a byte stream */ if( libuna_unicode_character_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } } return( 1 ); } libpff-20120802/libuna/libuna_codepage_iso_8859_3.h0000644000175000017500000000306312005152764016456 00000000000000/* * ISO 8859-3 codepage (Latin 3) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_3_H ) #define _LIBUNA_CODEPAGE_ISO_8859_3_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ 16 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ 8 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_15.h0000644000175000017500000000232312005152764016537 00000000000000/* * ISO 8859-15 codepage (Latin 9) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_15_H ) #define _LIBUNA_CODEPAGE_ISO_8859_15_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ 32 ]; extern const uint8_t libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ 32 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf32_string.h0000644000175000017500000002111012005152764015440 00000000000000/* * UTF-32 string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF32_STRING_H ) #define _LIBUNA_UTF32_STRING_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf32_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_byte_stream is implemented by * libuna_byte_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_byte_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_byte_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf7_stream is implemented by * libuna_utf7_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf7_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf7_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf8( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_compare_with_utf8 is implemented by * libuna_utf8_string_compare_with_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf8_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf8_stream is implemented by * libuna_utf8_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf8_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf8_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf16( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_compare_with_utf16 is implemented by * libuna_utf16_string_compare_with_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf16_stream is implemented by * libuna_utf16_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf16_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf16_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf32_string_copy_to_utf32_stream is implemented by * libuna_utf32_stream_copy_from_utf32 */ LIBUNA_EXTERN \ int libuna_utf32_string_with_index_copy_from_utf32_stream( libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_string_compare_with_utf32_stream( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_koi8_r.c0000644000175000017500000000577612005152764016150 00000000000000/* * KOI8-R codepage (Russian Cyrillic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_koi8_r.h" /* Extended ASCII to Unicode character lookup table for KOI8-R codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, 0x2550, 0x2551, 0x2552, 0x0451, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x0401, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x00a9, 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; /* Unicode to ASCII character lookup table for KOI8-R codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ 64 ] = { 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1 }; const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_codepage_windows_936.h0000644000175000017500000000361512005152764017043 00000000000000/* * Windows 936 codepage (Chinese Simplified) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_936_H ) #define _LIBUNA_CODEPAGE_WINDOWS_936_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_936_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_936_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_936_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_base64_stream.h0000644000175000017500000000724112005152764015557 00000000000000/* * Base64 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BASE64_STREAM_H ) #define _LIBUNA_BASE64_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_INLINE \ int libuna_base64_character_copy_to_sixtet( uint8_t base64_character, uint8_t *base64_sixtet, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base64_triplet_copy_from_base64_stream( uint32_t *base64_triplet, const uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, uint8_t *padding_size, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base64_triplet_copy_to_base64_stream( uint32_t base64_triplet, uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, uint8_t padding_size, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base64_triplet_copy_from_byte_stream( uint32_t *base64_triplet, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t *padding_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base64_triplet_copy_to_byte_stream( uint32_t base64_triplet, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t padding_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base64_stream_size_to_byte_stream( const uint8_t *base64_stream, size_t base64_stream_size, size_t *byte_stream_size, uint32_t base64_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base64_stream_copy_to_byte_stream( const uint8_t *base64_stream, size_t base64_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base64_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base64_stream_size, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base64_stream_copy_from_byte_stream( uint8_t *base64_stream, size_t base64_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base64_stream_with_index_copy_from_byte_stream( uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_950.c0000644000175000017500000127706012005152764017042 00000000000000/* * Windows 950 codepage (Traditional Chinese) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_950.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 950 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ 63 ] = { 0x3000, 0xff0c, 0x3001, 0x3002, 0xff0e, 0x2027, 0xff1b, 0xff1a, 0xff1f, 0xff01, 0xfe30, 0x2026, 0x2025, 0xfe50, 0xfe51, 0xfe52, 0x00b7, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xff5c, 0x2013, 0xfe31, 0x2014, 0xfe33, 0x2574, 0xfe34, 0xfe4f, 0xff08, 0xff09, 0xfe35, 0xfe36, 0xff5b, 0xff5d, 0xfe37, 0xfe38, 0x3014, 0x3015, 0xfe39, 0xfe3a, 0x3010, 0x3011, 0xfe3b, 0xfe3c, 0x300a, 0x300b, 0xfe3d, 0xfe3e, 0x3008, 0x3009, 0xfe3f, 0xfe40, 0x300c, 0x300d, 0xfe41, 0xfe42, 0x300e, 0x300f, 0xfe43, 0xfe44, 0xfe59, 0xfe5a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ 94 ] = { 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0x2018, 0x2019, 0x201c, 0x201d, 0x301d, 0x301e, 0x2035, 0x2032, 0xff03, 0xff06, 0xff0a, 0x203b, 0x00a7, 0x3003, 0x25cb, 0x25cf, 0x25b3, 0x25b2, 0x25ce, 0x2606, 0x2605, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25bd, 0x25bc, 0x32a3, 0x2105, 0x00af, 0xffe3, 0xff3f, 0x02cd, 0xfe49, 0xfe4a, 0xfe4d, 0xfe4e, 0xfe4b, 0xfe4c, 0xfe5f, 0xfe60, 0xfe61, 0xff0b, 0xff0d, 0x00d7, 0x00f7, 0x00b1, 0x221a, 0xff1c, 0xff1e, 0xff1d, 0x2266, 0x2267, 0x2260, 0x221e, 0x2252, 0x2261, 0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xff5e, 0x2229, 0x222a, 0x22a5, 0x2220, 0x221f, 0x22bf, 0x33d2, 0x33d1, 0x222b, 0x222e, 0x2235, 0x2234, 0x2640, 0x2642, 0x2295, 0x2299, 0x2191, 0x2193, 0x2190, 0x2192, 0x2196, 0x2197, 0x2199, 0x2198, 0x2225, 0x2223, 0xff0f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa240[ 63 ] = { 0xff3c, 0x2215, 0xfe68, 0xff04, 0xffe5, 0x3012, 0xffe0, 0xffe1, 0xff05, 0xff20, 0x2103, 0x2109, 0xfe69, 0xfe6a, 0xfe6b, 0x33d5, 0x339c, 0x339d, 0x339e, 0x33ce, 0x33a1, 0x338e, 0x338f, 0x33c4, 0x00b0, 0x5159, 0x515b, 0x515e, 0x515d, 0x5161, 0x5163, 0x55e7, 0x74e9, 0x7cce, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, 0x2588, 0x258f, 0x258e, 0x258d, 0x258c, 0x258b, 0x258a, 0x2589, 0x253c, 0x2534, 0x252c, 0x2524, 0x251c, 0x2594, 0x2500, 0x2502, 0x2595, 0x250c, 0x2510, 0x2514, 0x2518, 0x256d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ 94 ] = { 0x256e, 0x2570, 0x256f, 0x2550, 0x255e, 0x256a, 0x2561, 0x25e2, 0x25e3, 0x25e5, 0x25e4, 0x2571, 0x2572, 0x2573, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, 0x3029, 0x5341, 0x5344, 0x5345, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa340[ 63 ] = { 0xff57, 0xff58, 0xff59, 0xff5a, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x3105, 0x3106, 0x3107, 0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ 31 ] = { 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128, 0x3129, 0x02d9, 0x02c9, 0x02ca, 0x02c7, 0x02cb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ 63 ] = { 0x4e00, 0x4e59, 0x4e01, 0x4e03, 0x4e43, 0x4e5d, 0x4e86, 0x4e8c, 0x4eba, 0x513f, 0x5165, 0x516b, 0x51e0, 0x5200, 0x5201, 0x529b, 0x5315, 0x5341, 0x535c, 0x53c8, 0x4e09, 0x4e0b, 0x4e08, 0x4e0a, 0x4e2b, 0x4e38, 0x51e1, 0x4e45, 0x4e48, 0x4e5f, 0x4e5e, 0x4e8e, 0x4ea1, 0x5140, 0x5203, 0x52fa, 0x5343, 0x53c9, 0x53e3, 0x571f, 0x58eb, 0x5915, 0x5927, 0x5973, 0x5b50, 0x5b51, 0x5b53, 0x5bf8, 0x5c0f, 0x5c22, 0x5c38, 0x5c71, 0x5ddd, 0x5de5, 0x5df1, 0x5df2, 0x5df3, 0x5dfe, 0x5e72, 0x5efe, 0x5f0b, 0x5f13, 0x624d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ 94 ] = { 0x4e11, 0x4e10, 0x4e0d, 0x4e2d, 0x4e30, 0x4e39, 0x4e4b, 0x5c39, 0x4e88, 0x4e91, 0x4e95, 0x4e92, 0x4e94, 0x4ea2, 0x4ec1, 0x4ec0, 0x4ec3, 0x4ec6, 0x4ec7, 0x4ecd, 0x4eca, 0x4ecb, 0x4ec4, 0x5143, 0x5141, 0x5167, 0x516d, 0x516e, 0x516c, 0x5197, 0x51f6, 0x5206, 0x5207, 0x5208, 0x52fb, 0x52fe, 0x52ff, 0x5316, 0x5339, 0x5348, 0x5347, 0x5345, 0x535e, 0x5384, 0x53cb, 0x53ca, 0x53cd, 0x58ec, 0x5929, 0x592b, 0x592a, 0x592d, 0x5b54, 0x5c11, 0x5c24, 0x5c3a, 0x5c6f, 0x5df4, 0x5e7b, 0x5eff, 0x5f14, 0x5f15, 0x5fc3, 0x6208, 0x6236, 0x624b, 0x624e, 0x652f, 0x6587, 0x6597, 0x65a4, 0x65b9, 0x65e5, 0x66f0, 0x6708, 0x6728, 0x6b20, 0x6b62, 0x6b79, 0x6bcb, 0x6bd4, 0x6bdb, 0x6c0f, 0x6c34, 0x706b, 0x722a, 0x7236, 0x723b, 0x7247, 0x7259, 0x725b, 0x72ac, 0x738b, 0x4e19 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ 63 ] = { 0x4e16, 0x4e15, 0x4e14, 0x4e18, 0x4e3b, 0x4e4d, 0x4e4f, 0x4e4e, 0x4ee5, 0x4ed8, 0x4ed4, 0x4ed5, 0x4ed6, 0x4ed7, 0x4ee3, 0x4ee4, 0x4ed9, 0x4ede, 0x5145, 0x5144, 0x5189, 0x518a, 0x51ac, 0x51f9, 0x51fa, 0x51f8, 0x520a, 0x52a0, 0x529f, 0x5305, 0x5306, 0x5317, 0x531d, 0x4edf, 0x534a, 0x5349, 0x5361, 0x5360, 0x536f, 0x536e, 0x53bb, 0x53ef, 0x53e4, 0x53f3, 0x53ec, 0x53ee, 0x53e9, 0x53e8, 0x53fc, 0x53f8, 0x53f5, 0x53eb, 0x53e6, 0x53ea, 0x53f2, 0x53f1, 0x53f0, 0x53e5, 0x53ed, 0x53fb, 0x56db, 0x56da, 0x5916 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ 94 ] = { 0x592e, 0x5931, 0x5974, 0x5976, 0x5b55, 0x5b83, 0x5c3c, 0x5de8, 0x5de7, 0x5de6, 0x5e02, 0x5e03, 0x5e73, 0x5e7c, 0x5f01, 0x5f18, 0x5f17, 0x5fc5, 0x620a, 0x6253, 0x6254, 0x6252, 0x6251, 0x65a5, 0x65e6, 0x672e, 0x672c, 0x672a, 0x672b, 0x672d, 0x6b63, 0x6bcd, 0x6c11, 0x6c10, 0x6c38, 0x6c41, 0x6c40, 0x6c3e, 0x72af, 0x7384, 0x7389, 0x74dc, 0x74e6, 0x7518, 0x751f, 0x7528, 0x7529, 0x7530, 0x7531, 0x7532, 0x7533, 0x758b, 0x767d, 0x76ae, 0x76bf, 0x76ee, 0x77db, 0x77e2, 0x77f3, 0x793a, 0x79be, 0x7a74, 0x7acb, 0x4e1e, 0x4e1f, 0x4e52, 0x4e53, 0x4e69, 0x4e99, 0x4ea4, 0x4ea6, 0x4ea5, 0x4eff, 0x4f09, 0x4f19, 0x4f0a, 0x4f15, 0x4f0d, 0x4f10, 0x4f11, 0x4f0f, 0x4ef2, 0x4ef6, 0x4efb, 0x4ef0, 0x4ef3, 0x4efd, 0x4f01, 0x4f0b, 0x5149, 0x5147, 0x5146, 0x5148, 0x5168 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ 63 ] = { 0x5171, 0x518d, 0x51b0, 0x5217, 0x5211, 0x5212, 0x520e, 0x5216, 0x52a3, 0x5308, 0x5321, 0x5320, 0x5370, 0x5371, 0x5409, 0x540f, 0x540c, 0x540a, 0x5410, 0x5401, 0x540b, 0x5404, 0x5411, 0x540d, 0x5408, 0x5403, 0x540e, 0x5406, 0x5412, 0x56e0, 0x56de, 0x56dd, 0x5733, 0x5730, 0x5728, 0x572d, 0x572c, 0x572f, 0x5729, 0x5919, 0x591a, 0x5937, 0x5938, 0x5984, 0x5978, 0x5983, 0x597d, 0x5979, 0x5982, 0x5981, 0x5b57, 0x5b58, 0x5b87, 0x5b88, 0x5b85, 0x5b89, 0x5bfa, 0x5c16, 0x5c79, 0x5dde, 0x5e06, 0x5e76, 0x5e74 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ 94 ] = { 0x5f0f, 0x5f1b, 0x5fd9, 0x5fd6, 0x620e, 0x620c, 0x620d, 0x6210, 0x6263, 0x625b, 0x6258, 0x6536, 0x65e9, 0x65e8, 0x65ec, 0x65ed, 0x66f2, 0x66f3, 0x6709, 0x673d, 0x6734, 0x6731, 0x6735, 0x6b21, 0x6b64, 0x6b7b, 0x6c16, 0x6c5d, 0x6c57, 0x6c59, 0x6c5f, 0x6c60, 0x6c50, 0x6c55, 0x6c61, 0x6c5b, 0x6c4d, 0x6c4e, 0x7070, 0x725f, 0x725d, 0x767e, 0x7af9, 0x7c73, 0x7cf8, 0x7f36, 0x7f8a, 0x7fbd, 0x8001, 0x8003, 0x800c, 0x8012, 0x8033, 0x807f, 0x8089, 0x808b, 0x808c, 0x81e3, 0x81ea, 0x81f3, 0x81fc, 0x820c, 0x821b, 0x821f, 0x826e, 0x8272, 0x827e, 0x866b, 0x8840, 0x884c, 0x8863, 0x897f, 0x9621, 0x4e32, 0x4ea8, 0x4f4d, 0x4f4f, 0x4f47, 0x4f57, 0x4f5e, 0x4f34, 0x4f5b, 0x4f55, 0x4f30, 0x4f50, 0x4f51, 0x4f3d, 0x4f3a, 0x4f38, 0x4f43, 0x4f54, 0x4f3c, 0x4f46, 0x4f63 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ 63 ] = { 0x4f5c, 0x4f60, 0x4f2f, 0x4f4e, 0x4f36, 0x4f59, 0x4f5d, 0x4f48, 0x4f5a, 0x514c, 0x514b, 0x514d, 0x5175, 0x51b6, 0x51b7, 0x5225, 0x5224, 0x5229, 0x522a, 0x5228, 0x52ab, 0x52a9, 0x52aa, 0x52ac, 0x5323, 0x5373, 0x5375, 0x541d, 0x542d, 0x541e, 0x543e, 0x5426, 0x544e, 0x5427, 0x5446, 0x5443, 0x5433, 0x5448, 0x5442, 0x541b, 0x5429, 0x544a, 0x5439, 0x543b, 0x5438, 0x542e, 0x5435, 0x5436, 0x5420, 0x543c, 0x5440, 0x5431, 0x542b, 0x541f, 0x542c, 0x56ea, 0x56f0, 0x56e4, 0x56eb, 0x574a, 0x5751, 0x5740, 0x574d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ 94 ] = { 0x5747, 0x574e, 0x573e, 0x5750, 0x574f, 0x573b, 0x58ef, 0x593e, 0x599d, 0x5992, 0x59a8, 0x599e, 0x59a3, 0x5999, 0x5996, 0x598d, 0x59a4, 0x5993, 0x598a, 0x59a5, 0x5b5d, 0x5b5c, 0x5b5a, 0x5b5b, 0x5b8c, 0x5b8b, 0x5b8f, 0x5c2c, 0x5c40, 0x5c41, 0x5c3f, 0x5c3e, 0x5c90, 0x5c91, 0x5c94, 0x5c8c, 0x5deb, 0x5e0c, 0x5e8f, 0x5e87, 0x5e8a, 0x5ef7, 0x5f04, 0x5f1f, 0x5f64, 0x5f62, 0x5f77, 0x5f79, 0x5fd8, 0x5fcc, 0x5fd7, 0x5fcd, 0x5ff1, 0x5feb, 0x5ff8, 0x5fea, 0x6212, 0x6211, 0x6284, 0x6297, 0x6296, 0x6280, 0x6276, 0x6289, 0x626d, 0x628a, 0x627c, 0x627e, 0x6279, 0x6273, 0x6292, 0x626f, 0x6298, 0x626e, 0x6295, 0x6293, 0x6291, 0x6286, 0x6539, 0x653b, 0x6538, 0x65f1, 0x66f4, 0x675f, 0x674e, 0x674f, 0x6750, 0x6751, 0x675c, 0x6756, 0x675e, 0x6749, 0x6746, 0x6760 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ 63 ] = { 0x6753, 0x6757, 0x6b65, 0x6bcf, 0x6c42, 0x6c5e, 0x6c99, 0x6c81, 0x6c88, 0x6c89, 0x6c85, 0x6c9b, 0x6c6a, 0x6c7a, 0x6c90, 0x6c70, 0x6c8c, 0x6c68, 0x6c96, 0x6c92, 0x6c7d, 0x6c83, 0x6c72, 0x6c7e, 0x6c74, 0x6c86, 0x6c76, 0x6c8d, 0x6c94, 0x6c98, 0x6c82, 0x7076, 0x707c, 0x707d, 0x7078, 0x7262, 0x7261, 0x7260, 0x72c4, 0x72c2, 0x7396, 0x752c, 0x752b, 0x7537, 0x7538, 0x7682, 0x76ef, 0x77e3, 0x79c1, 0x79c0, 0x79bf, 0x7a76, 0x7cfb, 0x7f55, 0x8096, 0x8093, 0x809d, 0x8098, 0x809b, 0x809a, 0x80b2, 0x826f, 0x8292 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ 94 ] = { 0x828b, 0x828d, 0x898b, 0x89d2, 0x8a00, 0x8c37, 0x8c46, 0x8c55, 0x8c9d, 0x8d64, 0x8d70, 0x8db3, 0x8eab, 0x8eca, 0x8f9b, 0x8fb0, 0x8fc2, 0x8fc6, 0x8fc5, 0x8fc4, 0x5de1, 0x9091, 0x90a2, 0x90aa, 0x90a6, 0x90a3, 0x9149, 0x91c6, 0x91cc, 0x9632, 0x962e, 0x9631, 0x962a, 0x962c, 0x4e26, 0x4e56, 0x4e73, 0x4e8b, 0x4e9b, 0x4e9e, 0x4eab, 0x4eac, 0x4f6f, 0x4f9d, 0x4f8d, 0x4f73, 0x4f7f, 0x4f6c, 0x4f9b, 0x4f8b, 0x4f86, 0x4f83, 0x4f70, 0x4f75, 0x4f88, 0x4f69, 0x4f7b, 0x4f96, 0x4f7e, 0x4f8f, 0x4f91, 0x4f7a, 0x5154, 0x5152, 0x5155, 0x5169, 0x5177, 0x5176, 0x5178, 0x51bd, 0x51fd, 0x523b, 0x5238, 0x5237, 0x523a, 0x5230, 0x522e, 0x5236, 0x5241, 0x52be, 0x52bb, 0x5352, 0x5354, 0x5353, 0x5351, 0x5366, 0x5377, 0x5378, 0x5379, 0x53d6, 0x53d4, 0x53d7, 0x5473, 0x5475 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ 63 ] = { 0x5496, 0x5478, 0x5495, 0x5480, 0x547b, 0x5477, 0x5484, 0x5492, 0x5486, 0x547c, 0x5490, 0x5471, 0x5476, 0x548c, 0x549a, 0x5462, 0x5468, 0x548b, 0x547d, 0x548e, 0x56fa, 0x5783, 0x5777, 0x576a, 0x5769, 0x5761, 0x5766, 0x5764, 0x577c, 0x591c, 0x5949, 0x5947, 0x5948, 0x5944, 0x5954, 0x59be, 0x59bb, 0x59d4, 0x59b9, 0x59ae, 0x59d1, 0x59c6, 0x59d0, 0x59cd, 0x59cb, 0x59d3, 0x59ca, 0x59af, 0x59b3, 0x59d2, 0x59c5, 0x5b5f, 0x5b64, 0x5b63, 0x5b97, 0x5b9a, 0x5b98, 0x5b9c, 0x5b99, 0x5b9b, 0x5c1a, 0x5c48, 0x5c45 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ 94 ] = { 0x5c46, 0x5cb7, 0x5ca1, 0x5cb8, 0x5ca9, 0x5cab, 0x5cb1, 0x5cb3, 0x5e18, 0x5e1a, 0x5e16, 0x5e15, 0x5e1b, 0x5e11, 0x5e78, 0x5e9a, 0x5e97, 0x5e9c, 0x5e95, 0x5e96, 0x5ef6, 0x5f26, 0x5f27, 0x5f29, 0x5f80, 0x5f81, 0x5f7f, 0x5f7c, 0x5fdd, 0x5fe0, 0x5ffd, 0x5ff5, 0x5fff, 0x600f, 0x6014, 0x602f, 0x6035, 0x6016, 0x602a, 0x6015, 0x6021, 0x6027, 0x6029, 0x602b, 0x601b, 0x6216, 0x6215, 0x623f, 0x623e, 0x6240, 0x627f, 0x62c9, 0x62cc, 0x62c4, 0x62bf, 0x62c2, 0x62b9, 0x62d2, 0x62db, 0x62ab, 0x62d3, 0x62d4, 0x62cb, 0x62c8, 0x62a8, 0x62bd, 0x62bc, 0x62d0, 0x62d9, 0x62c7, 0x62cd, 0x62b5, 0x62da, 0x62b1, 0x62d8, 0x62d6, 0x62d7, 0x62c6, 0x62ac, 0x62ce, 0x653e, 0x65a7, 0x65bc, 0x65fa, 0x6614, 0x6613, 0x660c, 0x6606, 0x6602, 0x660e, 0x6600, 0x660f, 0x6615, 0x660a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ 63 ] = { 0x6607, 0x670d, 0x670b, 0x676d, 0x678b, 0x6795, 0x6771, 0x679c, 0x6773, 0x6777, 0x6787, 0x679d, 0x6797, 0x676f, 0x6770, 0x677f, 0x6789, 0x677e, 0x6790, 0x6775, 0x679a, 0x6793, 0x677c, 0x676a, 0x6772, 0x6b23, 0x6b66, 0x6b67, 0x6b7f, 0x6c13, 0x6c1b, 0x6ce3, 0x6ce8, 0x6cf3, 0x6cb1, 0x6ccc, 0x6ce5, 0x6cb3, 0x6cbd, 0x6cbe, 0x6cbc, 0x6ce2, 0x6cab, 0x6cd5, 0x6cd3, 0x6cb8, 0x6cc4, 0x6cb9, 0x6cc1, 0x6cae, 0x6cd7, 0x6cc5, 0x6cf1, 0x6cbf, 0x6cbb, 0x6ce1, 0x6cdb, 0x6cca, 0x6cac, 0x6cef, 0x6cdc, 0x6cd6, 0x6ce0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ 94 ] = { 0x7095, 0x708e, 0x7092, 0x708a, 0x7099, 0x722c, 0x722d, 0x7238, 0x7248, 0x7267, 0x7269, 0x72c0, 0x72ce, 0x72d9, 0x72d7, 0x72d0, 0x73a9, 0x73a8, 0x739f, 0x73ab, 0x73a5, 0x753d, 0x759d, 0x7599, 0x759a, 0x7684, 0x76c2, 0x76f2, 0x76f4, 0x77e5, 0x77fd, 0x793e, 0x7940, 0x7941, 0x79c9, 0x79c8, 0x7a7a, 0x7a79, 0x7afa, 0x7cfe, 0x7f54, 0x7f8c, 0x7f8b, 0x8005, 0x80ba, 0x80a5, 0x80a2, 0x80b1, 0x80a1, 0x80ab, 0x80a9, 0x80b4, 0x80aa, 0x80af, 0x81e5, 0x81fe, 0x820d, 0x82b3, 0x829d, 0x8299, 0x82ad, 0x82bd, 0x829f, 0x82b9, 0x82b1, 0x82ac, 0x82a5, 0x82af, 0x82b8, 0x82a3, 0x82b0, 0x82be, 0x82b7, 0x864e, 0x8671, 0x521d, 0x8868, 0x8ecb, 0x8fce, 0x8fd4, 0x8fd1, 0x90b5, 0x90b8, 0x90b1, 0x90b6, 0x91c7, 0x91d1, 0x9577, 0x9580, 0x961c, 0x9640, 0x963f, 0x963b, 0x9644 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ 63 ] = { 0x9642, 0x96b9, 0x96e8, 0x9752, 0x975e, 0x4e9f, 0x4ead, 0x4eae, 0x4fe1, 0x4fb5, 0x4faf, 0x4fbf, 0x4fe0, 0x4fd1, 0x4fcf, 0x4fdd, 0x4fc3, 0x4fb6, 0x4fd8, 0x4fdf, 0x4fca, 0x4fd7, 0x4fae, 0x4fd0, 0x4fc4, 0x4fc2, 0x4fda, 0x4fce, 0x4fde, 0x4fb7, 0x5157, 0x5192, 0x5191, 0x51a0, 0x524e, 0x5243, 0x524a, 0x524d, 0x524c, 0x524b, 0x5247, 0x52c7, 0x52c9, 0x52c3, 0x52c1, 0x530d, 0x5357, 0x537b, 0x539a, 0x53db, 0x54ac, 0x54c0, 0x54a8, 0x54ce, 0x54c9, 0x54b8, 0x54a6, 0x54b3, 0x54c7, 0x54c2, 0x54bd, 0x54aa, 0x54c1 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ 94 ] = { 0x54c4, 0x54c8, 0x54af, 0x54ab, 0x54b1, 0x54bb, 0x54a9, 0x54a7, 0x54bf, 0x56ff, 0x5782, 0x578b, 0x57a0, 0x57a3, 0x57a2, 0x57ce, 0x57ae, 0x5793, 0x5955, 0x5951, 0x594f, 0x594e, 0x5950, 0x59dc, 0x59d8, 0x59ff, 0x59e3, 0x59e8, 0x5a03, 0x59e5, 0x59ea, 0x59da, 0x59e6, 0x5a01, 0x59fb, 0x5b69, 0x5ba3, 0x5ba6, 0x5ba4, 0x5ba2, 0x5ba5, 0x5c01, 0x5c4e, 0x5c4f, 0x5c4d, 0x5c4b, 0x5cd9, 0x5cd2, 0x5df7, 0x5e1d, 0x5e25, 0x5e1f, 0x5e7d, 0x5ea0, 0x5ea6, 0x5efa, 0x5f08, 0x5f2d, 0x5f65, 0x5f88, 0x5f85, 0x5f8a, 0x5f8b, 0x5f87, 0x5f8c, 0x5f89, 0x6012, 0x601d, 0x6020, 0x6025, 0x600e, 0x6028, 0x604d, 0x6070, 0x6068, 0x6062, 0x6046, 0x6043, 0x606c, 0x606b, 0x606a, 0x6064, 0x6241, 0x62dc, 0x6316, 0x6309, 0x62fc, 0x62ed, 0x6301, 0x62ee, 0x62fd, 0x6307, 0x62f1, 0x62f7 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ 63 ] = { 0x62ef, 0x62ec, 0x62fe, 0x62f4, 0x6311, 0x6302, 0x653f, 0x6545, 0x65ab, 0x65bd, 0x65e2, 0x6625, 0x662d, 0x6620, 0x6627, 0x662f, 0x661f, 0x6628, 0x6631, 0x6624, 0x66f7, 0x67ff, 0x67d3, 0x67f1, 0x67d4, 0x67d0, 0x67ec, 0x67b6, 0x67af, 0x67f5, 0x67e9, 0x67ef, 0x67c4, 0x67d1, 0x67b4, 0x67da, 0x67e5, 0x67b8, 0x67cf, 0x67de, 0x67f3, 0x67b0, 0x67d9, 0x67e2, 0x67dd, 0x67d2, 0x6b6a, 0x6b83, 0x6b86, 0x6bb5, 0x6bd2, 0x6bd7, 0x6c1f, 0x6cc9, 0x6d0b, 0x6d32, 0x6d2a, 0x6d41, 0x6d25, 0x6d0c, 0x6d31, 0x6d1e, 0x6d17 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ 94 ] = { 0x6d3b, 0x6d3d, 0x6d3e, 0x6d36, 0x6d1b, 0x6cf5, 0x6d39, 0x6d27, 0x6d38, 0x6d29, 0x6d2e, 0x6d35, 0x6d0e, 0x6d2b, 0x70ab, 0x70ba, 0x70b3, 0x70ac, 0x70af, 0x70ad, 0x70b8, 0x70ae, 0x70a4, 0x7230, 0x7272, 0x726f, 0x7274, 0x72e9, 0x72e0, 0x72e1, 0x73b7, 0x73ca, 0x73bb, 0x73b2, 0x73cd, 0x73c0, 0x73b3, 0x751a, 0x752d, 0x754f, 0x754c, 0x754e, 0x754b, 0x75ab, 0x75a4, 0x75a5, 0x75a2, 0x75a3, 0x7678, 0x7686, 0x7687, 0x7688, 0x76c8, 0x76c6, 0x76c3, 0x76c5, 0x7701, 0x76f9, 0x76f8, 0x7709, 0x770b, 0x76fe, 0x76fc, 0x7707, 0x77dc, 0x7802, 0x7814, 0x780c, 0x780d, 0x7946, 0x7949, 0x7948, 0x7947, 0x79b9, 0x79ba, 0x79d1, 0x79d2, 0x79cb, 0x7a7f, 0x7a81, 0x7aff, 0x7afd, 0x7c7d, 0x7d02, 0x7d05, 0x7d00, 0x7d09, 0x7d07, 0x7d04, 0x7d06, 0x7f38, 0x7f8e, 0x7fbf, 0x8004 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ 63 ] = { 0x8010, 0x800d, 0x8011, 0x8036, 0x80d6, 0x80e5, 0x80da, 0x80c3, 0x80c4, 0x80cc, 0x80e1, 0x80db, 0x80ce, 0x80de, 0x80e4, 0x80dd, 0x81f4, 0x8222, 0x82e7, 0x8303, 0x8305, 0x82e3, 0x82db, 0x82e6, 0x8304, 0x82e5, 0x8302, 0x8309, 0x82d2, 0x82d7, 0x82f1, 0x8301, 0x82dc, 0x82d4, 0x82d1, 0x82de, 0x82d3, 0x82df, 0x82ef, 0x8306, 0x8650, 0x8679, 0x867b, 0x867a, 0x884d, 0x886b, 0x8981, 0x89d4, 0x8a08, 0x8a02, 0x8a03, 0x8c9e, 0x8ca0, 0x8d74, 0x8d73, 0x8db4, 0x8ecd, 0x8ecc, 0x8ff0, 0x8fe6, 0x8fe2, 0x8fea, 0x8fe5 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ 94 ] = { 0x8fed, 0x8feb, 0x8fe4, 0x8fe8, 0x90ca, 0x90ce, 0x90c1, 0x90c3, 0x914b, 0x914a, 0x91cd, 0x9582, 0x9650, 0x964b, 0x964c, 0x964d, 0x9762, 0x9769, 0x97cb, 0x97ed, 0x97f3, 0x9801, 0x98a8, 0x98db, 0x98df, 0x9996, 0x9999, 0x4e58, 0x4eb3, 0x500c, 0x500d, 0x5023, 0x4fef, 0x5026, 0x5025, 0x4ff8, 0x5029, 0x5016, 0x5006, 0x503c, 0x501f, 0x501a, 0x5012, 0x5011, 0x4ffa, 0x5000, 0x5014, 0x5028, 0x4ff1, 0x5021, 0x500b, 0x5019, 0x5018, 0x4ff3, 0x4fee, 0x502d, 0x502a, 0x4ffe, 0x502b, 0x5009, 0x517c, 0x51a4, 0x51a5, 0x51a2, 0x51cd, 0x51cc, 0x51c6, 0x51cb, 0x5256, 0x525c, 0x5254, 0x525b, 0x525d, 0x532a, 0x537f, 0x539f, 0x539d, 0x53df, 0x54e8, 0x5510, 0x5501, 0x5537, 0x54fc, 0x54e5, 0x54f2, 0x5506, 0x54fa, 0x5514, 0x54e9, 0x54ed, 0x54e1, 0x5509, 0x54ee, 0x54ea }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ 63 ] = { 0x54e6, 0x5527, 0x5507, 0x54fd, 0x550f, 0x5703, 0x5704, 0x57c2, 0x57d4, 0x57cb, 0x57c3, 0x5809, 0x590f, 0x5957, 0x5958, 0x595a, 0x5a11, 0x5a18, 0x5a1c, 0x5a1f, 0x5a1b, 0x5a13, 0x59ec, 0x5a20, 0x5a23, 0x5a29, 0x5a25, 0x5a0c, 0x5a09, 0x5b6b, 0x5c58, 0x5bb0, 0x5bb3, 0x5bb6, 0x5bb4, 0x5bae, 0x5bb5, 0x5bb9, 0x5bb8, 0x5c04, 0x5c51, 0x5c55, 0x5c50, 0x5ced, 0x5cfd, 0x5cfb, 0x5cea, 0x5ce8, 0x5cf0, 0x5cf6, 0x5d01, 0x5cf4, 0x5dee, 0x5e2d, 0x5e2b, 0x5eab, 0x5ead, 0x5ea7, 0x5f31, 0x5f92, 0x5f91, 0x5f90, 0x6059 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ 94 ] = { 0x6063, 0x6065, 0x6050, 0x6055, 0x606d, 0x6069, 0x606f, 0x6084, 0x609f, 0x609a, 0x608d, 0x6094, 0x608c, 0x6085, 0x6096, 0x6247, 0x62f3, 0x6308, 0x62ff, 0x634e, 0x633e, 0x632f, 0x6355, 0x6342, 0x6346, 0x634f, 0x6349, 0x633a, 0x6350, 0x633d, 0x632a, 0x632b, 0x6328, 0x634d, 0x634c, 0x6548, 0x6549, 0x6599, 0x65c1, 0x65c5, 0x6642, 0x6649, 0x664f, 0x6643, 0x6652, 0x664c, 0x6645, 0x6641, 0x66f8, 0x6714, 0x6715, 0x6717, 0x6821, 0x6838, 0x6848, 0x6846, 0x6853, 0x6839, 0x6842, 0x6854, 0x6829, 0x68b3, 0x6817, 0x684c, 0x6851, 0x683d, 0x67f4, 0x6850, 0x6840, 0x683c, 0x6843, 0x682a, 0x6845, 0x6813, 0x6818, 0x6841, 0x6b8a, 0x6b89, 0x6bb7, 0x6c23, 0x6c27, 0x6c28, 0x6c26, 0x6c24, 0x6cf0, 0x6d6a, 0x6d95, 0x6d88, 0x6d87, 0x6d66, 0x6d78, 0x6d77, 0x6d59, 0x6d93 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ 63 ] = { 0x6d6c, 0x6d89, 0x6d6e, 0x6d5a, 0x6d74, 0x6d69, 0x6d8c, 0x6d8a, 0x6d79, 0x6d85, 0x6d65, 0x6d94, 0x70ca, 0x70d8, 0x70e4, 0x70d9, 0x70c8, 0x70cf, 0x7239, 0x7279, 0x72fc, 0x72f9, 0x72fd, 0x72f8, 0x72f7, 0x7386, 0x73ed, 0x7409, 0x73ee, 0x73e0, 0x73ea, 0x73de, 0x7554, 0x755d, 0x755c, 0x755a, 0x7559, 0x75be, 0x75c5, 0x75c7, 0x75b2, 0x75b3, 0x75bd, 0x75bc, 0x75b9, 0x75c2, 0x75b8, 0x768b, 0x76b0, 0x76ca, 0x76cd, 0x76ce, 0x7729, 0x771f, 0x7720, 0x7728, 0x77e9, 0x7830, 0x7827, 0x7838, 0x781d, 0x7834, 0x7837 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ 94 ] = { 0x7825, 0x782d, 0x7820, 0x781f, 0x7832, 0x7955, 0x7950, 0x7960, 0x795f, 0x7956, 0x795e, 0x795d, 0x7957, 0x795a, 0x79e4, 0x79e3, 0x79e7, 0x79df, 0x79e6, 0x79e9, 0x79d8, 0x7a84, 0x7a88, 0x7ad9, 0x7b06, 0x7b11, 0x7c89, 0x7d21, 0x7d17, 0x7d0b, 0x7d0a, 0x7d20, 0x7d22, 0x7d14, 0x7d10, 0x7d15, 0x7d1a, 0x7d1c, 0x7d0d, 0x7d19, 0x7d1b, 0x7f3a, 0x7f5f, 0x7f94, 0x7fc5, 0x7fc1, 0x8006, 0x8018, 0x8015, 0x8019, 0x8017, 0x803d, 0x803f, 0x80f1, 0x8102, 0x80f0, 0x8105, 0x80ed, 0x80f4, 0x8106, 0x80f8, 0x80f3, 0x8108, 0x80fd, 0x810a, 0x80fc, 0x80ef, 0x81ed, 0x81ec, 0x8200, 0x8210, 0x822a, 0x822b, 0x8228, 0x822c, 0x82bb, 0x832b, 0x8352, 0x8354, 0x834a, 0x8338, 0x8350, 0x8349, 0x8335, 0x8334, 0x834f, 0x8332, 0x8339, 0x8336, 0x8317, 0x8340, 0x8331, 0x8328, 0x8343 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ 63 ] = { 0x8654, 0x868a, 0x86aa, 0x8693, 0x86a4, 0x86a9, 0x868c, 0x86a3, 0x869c, 0x8870, 0x8877, 0x8881, 0x8882, 0x887d, 0x8879, 0x8a18, 0x8a10, 0x8a0e, 0x8a0c, 0x8a15, 0x8a0a, 0x8a17, 0x8a13, 0x8a16, 0x8a0f, 0x8a11, 0x8c48, 0x8c7a, 0x8c79, 0x8ca1, 0x8ca2, 0x8d77, 0x8eac, 0x8ed2, 0x8ed4, 0x8ecf, 0x8fb1, 0x9001, 0x9006, 0x8ff7, 0x9000, 0x8ffa, 0x8ff4, 0x9003, 0x8ffd, 0x9005, 0x8ff8, 0x9095, 0x90e1, 0x90dd, 0x90e2, 0x9152, 0x914d, 0x914c, 0x91d8, 0x91dd, 0x91d7, 0x91dc, 0x91d9, 0x9583, 0x9662, 0x9663, 0x9661 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ 94 ] = { 0x965b, 0x965d, 0x9664, 0x9658, 0x965e, 0x96bb, 0x98e2, 0x99ac, 0x9aa8, 0x9ad8, 0x9b25, 0x9b32, 0x9b3c, 0x4e7e, 0x507a, 0x507d, 0x505c, 0x5047, 0x5043, 0x504c, 0x505a, 0x5049, 0x5065, 0x5076, 0x504e, 0x5055, 0x5075, 0x5074, 0x5077, 0x504f, 0x500f, 0x506f, 0x506d, 0x515c, 0x5195, 0x51f0, 0x526a, 0x526f, 0x52d2, 0x52d9, 0x52d8, 0x52d5, 0x5310, 0x530f, 0x5319, 0x533f, 0x5340, 0x533e, 0x53c3, 0x66fc, 0x5546, 0x556a, 0x5566, 0x5544, 0x555e, 0x5561, 0x5543, 0x554a, 0x5531, 0x5556, 0x554f, 0x5555, 0x552f, 0x5564, 0x5538, 0x552e, 0x555c, 0x552c, 0x5563, 0x5533, 0x5541, 0x5557, 0x5708, 0x570b, 0x5709, 0x57df, 0x5805, 0x580a, 0x5806, 0x57e0, 0x57e4, 0x57fa, 0x5802, 0x5835, 0x57f7, 0x57f9, 0x5920, 0x5962, 0x5a36, 0x5a41, 0x5a49, 0x5a66, 0x5a6a, 0x5a40 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ 63 ] = { 0x5a3c, 0x5a62, 0x5a5a, 0x5a46, 0x5a4a, 0x5b70, 0x5bc7, 0x5bc5, 0x5bc4, 0x5bc2, 0x5bbf, 0x5bc6, 0x5c09, 0x5c08, 0x5c07, 0x5c60, 0x5c5c, 0x5c5d, 0x5d07, 0x5d06, 0x5d0e, 0x5d1b, 0x5d16, 0x5d22, 0x5d11, 0x5d29, 0x5d14, 0x5d19, 0x5d24, 0x5d27, 0x5d17, 0x5de2, 0x5e38, 0x5e36, 0x5e33, 0x5e37, 0x5eb7, 0x5eb8, 0x5eb6, 0x5eb5, 0x5ebe, 0x5f35, 0x5f37, 0x5f57, 0x5f6c, 0x5f69, 0x5f6b, 0x5f97, 0x5f99, 0x5f9e, 0x5f98, 0x5fa1, 0x5fa0, 0x5f9c, 0x607f, 0x60a3, 0x6089, 0x60a0, 0x60a8, 0x60cb, 0x60b4, 0x60e6, 0x60bd }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ 94 ] = { 0x60c5, 0x60bb, 0x60b5, 0x60dc, 0x60bc, 0x60d8, 0x60d5, 0x60c6, 0x60df, 0x60b8, 0x60da, 0x60c7, 0x621a, 0x621b, 0x6248, 0x63a0, 0x63a7, 0x6372, 0x6396, 0x63a2, 0x63a5, 0x6377, 0x6367, 0x6398, 0x63aa, 0x6371, 0x63a9, 0x6389, 0x6383, 0x639b, 0x636b, 0x63a8, 0x6384, 0x6388, 0x6399, 0x63a1, 0x63ac, 0x6392, 0x638f, 0x6380, 0x637b, 0x6369, 0x6368, 0x637a, 0x655d, 0x6556, 0x6551, 0x6559, 0x6557, 0x555f, 0x654f, 0x6558, 0x6555, 0x6554, 0x659c, 0x659b, 0x65ac, 0x65cf, 0x65cb, 0x65cc, 0x65ce, 0x665d, 0x665a, 0x6664, 0x6668, 0x6666, 0x665e, 0x66f9, 0x52d7, 0x671b, 0x6881, 0x68af, 0x68a2, 0x6893, 0x68b5, 0x687f, 0x6876, 0x68b1, 0x68a7, 0x6897, 0x68b0, 0x6883, 0x68c4, 0x68ad, 0x6886, 0x6885, 0x6894, 0x689d, 0x68a8, 0x689f, 0x68a1, 0x6882, 0x6b32, 0x6bba }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ 63 ] = { 0x6beb, 0x6bec, 0x6c2b, 0x6d8e, 0x6dbc, 0x6df3, 0x6dd9, 0x6db2, 0x6de1, 0x6dcc, 0x6de4, 0x6dfb, 0x6dfa, 0x6e05, 0x6dc7, 0x6dcb, 0x6daf, 0x6dd1, 0x6dae, 0x6dde, 0x6df9, 0x6db8, 0x6df7, 0x6df5, 0x6dc5, 0x6dd2, 0x6e1a, 0x6db5, 0x6dda, 0x6deb, 0x6dd8, 0x6dea, 0x6df1, 0x6dee, 0x6de8, 0x6dc6, 0x6dc4, 0x6daa, 0x6dec, 0x6dbf, 0x6de6, 0x70f9, 0x7109, 0x710a, 0x70fd, 0x70ef, 0x723d, 0x727d, 0x7281, 0x731c, 0x731b, 0x7316, 0x7313, 0x7319, 0x7387, 0x7405, 0x740a, 0x7403, 0x7406, 0x73fe, 0x740d, 0x74e0, 0x74f6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ 94 ] = { 0x74f7, 0x751c, 0x7522, 0x7565, 0x7566, 0x7562, 0x7570, 0x758f, 0x75d4, 0x75d5, 0x75b5, 0x75ca, 0x75cd, 0x768e, 0x76d4, 0x76d2, 0x76db, 0x7737, 0x773e, 0x773c, 0x7736, 0x7738, 0x773a, 0x786b, 0x7843, 0x784e, 0x7965, 0x7968, 0x796d, 0x79fb, 0x7a92, 0x7a95, 0x7b20, 0x7b28, 0x7b1b, 0x7b2c, 0x7b26, 0x7b19, 0x7b1e, 0x7b2e, 0x7c92, 0x7c97, 0x7c95, 0x7d46, 0x7d43, 0x7d71, 0x7d2e, 0x7d39, 0x7d3c, 0x7d40, 0x7d30, 0x7d33, 0x7d44, 0x7d2f, 0x7d42, 0x7d32, 0x7d31, 0x7f3d, 0x7f9e, 0x7f9a, 0x7fcc, 0x7fce, 0x7fd2, 0x801c, 0x804a, 0x8046, 0x812f, 0x8116, 0x8123, 0x812b, 0x8129, 0x8130, 0x8124, 0x8202, 0x8235, 0x8237, 0x8236, 0x8239, 0x838e, 0x839e, 0x8398, 0x8378, 0x83a2, 0x8396, 0x83bd, 0x83ab, 0x8392, 0x838a, 0x8393, 0x8389, 0x83a0, 0x8377, 0x837b, 0x837c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ 63 ] = { 0x8386, 0x83a7, 0x8655, 0x5f6a, 0x86c7, 0x86c0, 0x86b6, 0x86c4, 0x86b5, 0x86c6, 0x86cb, 0x86b1, 0x86af, 0x86c9, 0x8853, 0x889e, 0x8888, 0x88ab, 0x8892, 0x8896, 0x888d, 0x888b, 0x8993, 0x898f, 0x8a2a, 0x8a1d, 0x8a23, 0x8a25, 0x8a31, 0x8a2d, 0x8a1f, 0x8a1b, 0x8a22, 0x8c49, 0x8c5a, 0x8ca9, 0x8cac, 0x8cab, 0x8ca8, 0x8caa, 0x8ca7, 0x8d67, 0x8d66, 0x8dbe, 0x8dba, 0x8edb, 0x8edf, 0x9019, 0x900d, 0x901a, 0x9017, 0x9023, 0x901f, 0x901d, 0x9010, 0x9015, 0x901e, 0x9020, 0x900f, 0x9022, 0x9016, 0x901b, 0x9014 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ 94 ] = { 0x90e8, 0x90ed, 0x90fd, 0x9157, 0x91ce, 0x91f5, 0x91e6, 0x91e3, 0x91e7, 0x91ed, 0x91e9, 0x9589, 0x966a, 0x9675, 0x9673, 0x9678, 0x9670, 0x9674, 0x9676, 0x9677, 0x966c, 0x96c0, 0x96ea, 0x96e9, 0x7ae0, 0x7adf, 0x9802, 0x9803, 0x9b5a, 0x9ce5, 0x9e75, 0x9e7f, 0x9ea5, 0x9ebb, 0x50a2, 0x508d, 0x5085, 0x5099, 0x5091, 0x5080, 0x5096, 0x5098, 0x509a, 0x6700, 0x51f1, 0x5272, 0x5274, 0x5275, 0x5269, 0x52de, 0x52dd, 0x52db, 0x535a, 0x53a5, 0x557b, 0x5580, 0x55a7, 0x557c, 0x558a, 0x559d, 0x5598, 0x5582, 0x559c, 0x55aa, 0x5594, 0x5587, 0x558b, 0x5583, 0x55b3, 0x55ae, 0x559f, 0x553e, 0x55b2, 0x559a, 0x55bb, 0x55ac, 0x55b1, 0x557e, 0x5589, 0x55ab, 0x5599, 0x570d, 0x582f, 0x582a, 0x5834, 0x5824, 0x5830, 0x5831, 0x5821, 0x581d, 0x5820, 0x58f9, 0x58fa, 0x5960 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ 63 ] = { 0x5a77, 0x5a9a, 0x5a7f, 0x5a92, 0x5a9b, 0x5aa7, 0x5b73, 0x5b71, 0x5bd2, 0x5bcc, 0x5bd3, 0x5bd0, 0x5c0a, 0x5c0b, 0x5c31, 0x5d4c, 0x5d50, 0x5d34, 0x5d47, 0x5dfd, 0x5e45, 0x5e3d, 0x5e40, 0x5e43, 0x5e7e, 0x5eca, 0x5ec1, 0x5ec2, 0x5ec4, 0x5f3c, 0x5f6d, 0x5fa9, 0x5faa, 0x5fa8, 0x60d1, 0x60e1, 0x60b2, 0x60b6, 0x60e0, 0x611c, 0x6123, 0x60fa, 0x6115, 0x60f0, 0x60fb, 0x60f4, 0x6168, 0x60f1, 0x610e, 0x60f6, 0x6109, 0x6100, 0x6112, 0x621f, 0x6249, 0x63a3, 0x638c, 0x63cf, 0x63c0, 0x63e9, 0x63c9, 0x63c6, 0x63cd }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ 94 ] = { 0x63d2, 0x63e3, 0x63d0, 0x63e1, 0x63d6, 0x63ed, 0x63ee, 0x6376, 0x63f4, 0x63ea, 0x63db, 0x6452, 0x63da, 0x63f9, 0x655e, 0x6566, 0x6562, 0x6563, 0x6591, 0x6590, 0x65af, 0x666e, 0x6670, 0x6674, 0x6676, 0x666f, 0x6691, 0x667a, 0x667e, 0x6677, 0x66fe, 0x66ff, 0x671f, 0x671d, 0x68fa, 0x68d5, 0x68e0, 0x68d8, 0x68d7, 0x6905, 0x68df, 0x68f5, 0x68ee, 0x68e7, 0x68f9, 0x68d2, 0x68f2, 0x68e3, 0x68cb, 0x68cd, 0x690d, 0x6912, 0x690e, 0x68c9, 0x68da, 0x696e, 0x68fb, 0x6b3e, 0x6b3a, 0x6b3d, 0x6b98, 0x6b96, 0x6bbc, 0x6bef, 0x6c2e, 0x6c2f, 0x6c2c, 0x6e2f, 0x6e38, 0x6e54, 0x6e21, 0x6e32, 0x6e67, 0x6e4a, 0x6e20, 0x6e25, 0x6e23, 0x6e1b, 0x6e5b, 0x6e58, 0x6e24, 0x6e56, 0x6e6e, 0x6e2d, 0x6e26, 0x6e6f, 0x6e34, 0x6e4d, 0x6e3a, 0x6e2c, 0x6e43, 0x6e1d, 0x6e3e, 0x6ecb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ 63 ] = { 0x6e89, 0x6e19, 0x6e4e, 0x6e63, 0x6e44, 0x6e72, 0x6e69, 0x6e5f, 0x7119, 0x711a, 0x7126, 0x7130, 0x7121, 0x7136, 0x716e, 0x711c, 0x724c, 0x7284, 0x7280, 0x7336, 0x7325, 0x7334, 0x7329, 0x743a, 0x742a, 0x7433, 0x7422, 0x7425, 0x7435, 0x7436, 0x7434, 0x742f, 0x741b, 0x7426, 0x7428, 0x7525, 0x7526, 0x756b, 0x756a, 0x75e2, 0x75db, 0x75e3, 0x75d9, 0x75d8, 0x75de, 0x75e0, 0x767b, 0x767c, 0x7696, 0x7693, 0x76b4, 0x76dc, 0x774f, 0x77ed, 0x785d, 0x786c, 0x786f, 0x7a0d, 0x7a08, 0x7a0b, 0x7a05, 0x7a00, 0x7a98 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ 94 ] = { 0x7a97, 0x7a96, 0x7ae5, 0x7ae3, 0x7b49, 0x7b56, 0x7b46, 0x7b50, 0x7b52, 0x7b54, 0x7b4d, 0x7b4b, 0x7b4f, 0x7b51, 0x7c9f, 0x7ca5, 0x7d5e, 0x7d50, 0x7d68, 0x7d55, 0x7d2b, 0x7d6e, 0x7d72, 0x7d61, 0x7d66, 0x7d62, 0x7d70, 0x7d73, 0x5584, 0x7fd4, 0x7fd5, 0x800b, 0x8052, 0x8085, 0x8155, 0x8154, 0x814b, 0x8151, 0x814e, 0x8139, 0x8146, 0x813e, 0x814c, 0x8153, 0x8174, 0x8212, 0x821c, 0x83e9, 0x8403, 0x83f8, 0x840d, 0x83e0, 0x83c5, 0x840b, 0x83c1, 0x83ef, 0x83f1, 0x83f4, 0x8457, 0x840a, 0x83f0, 0x840c, 0x83cc, 0x83fd, 0x83f2, 0x83ca, 0x8438, 0x840e, 0x8404, 0x83dc, 0x8407, 0x83d4, 0x83df, 0x865b, 0x86df, 0x86d9, 0x86ed, 0x86d4, 0x86db, 0x86e4, 0x86d0, 0x86de, 0x8857, 0x88c1, 0x88c2, 0x88b1, 0x8983, 0x8996, 0x8a3b, 0x8a60, 0x8a55, 0x8a5e, 0x8a3c, 0x8a41 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ 63 ] = { 0x8a54, 0x8a5b, 0x8a50, 0x8a46, 0x8a34, 0x8a3a, 0x8a36, 0x8a56, 0x8c61, 0x8c82, 0x8caf, 0x8cbc, 0x8cb3, 0x8cbd, 0x8cc1, 0x8cbb, 0x8cc0, 0x8cb4, 0x8cb7, 0x8cb6, 0x8cbf, 0x8cb8, 0x8d8a, 0x8d85, 0x8d81, 0x8dce, 0x8ddd, 0x8dcb, 0x8dda, 0x8dd1, 0x8dcc, 0x8ddb, 0x8dc6, 0x8efb, 0x8ef8, 0x8efc, 0x8f9c, 0x902e, 0x9035, 0x9031, 0x9038, 0x9032, 0x9036, 0x9102, 0x90f5, 0x9109, 0x90fe, 0x9163, 0x9165, 0x91cf, 0x9214, 0x9215, 0x9223, 0x9209, 0x921e, 0x920d, 0x9210, 0x9207, 0x9211, 0x9594, 0x958f, 0x958b, 0x9591 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ 94 ] = { 0x9593, 0x9592, 0x958e, 0x968a, 0x968e, 0x968b, 0x967d, 0x9685, 0x9686, 0x968d, 0x9672, 0x9684, 0x96c1, 0x96c5, 0x96c4, 0x96c6, 0x96c7, 0x96ef, 0x96f2, 0x97cc, 0x9805, 0x9806, 0x9808, 0x98e7, 0x98ea, 0x98ef, 0x98e9, 0x98f2, 0x98ed, 0x99ae, 0x99ad, 0x9ec3, 0x9ecd, 0x9ed1, 0x4e82, 0x50ad, 0x50b5, 0x50b2, 0x50b3, 0x50c5, 0x50be, 0x50ac, 0x50b7, 0x50bb, 0x50af, 0x50c7, 0x527f, 0x5277, 0x527d, 0x52df, 0x52e6, 0x52e4, 0x52e2, 0x52e3, 0x532f, 0x55df, 0x55e8, 0x55d3, 0x55e6, 0x55ce, 0x55dc, 0x55c7, 0x55d1, 0x55e3, 0x55e4, 0x55ef, 0x55da, 0x55e1, 0x55c5, 0x55c6, 0x55e5, 0x55c9, 0x5712, 0x5713, 0x585e, 0x5851, 0x5858, 0x5857, 0x585a, 0x5854, 0x586b, 0x584c, 0x586d, 0x584a, 0x5862, 0x5852, 0x584b, 0x5967, 0x5ac1, 0x5ac9, 0x5acc, 0x5abe, 0x5abd, 0x5abc }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ 63 ] = { 0x5ab3, 0x5ac2, 0x5ab2, 0x5d69, 0x5d6f, 0x5e4c, 0x5e79, 0x5ec9, 0x5ec8, 0x5f12, 0x5f59, 0x5fac, 0x5fae, 0x611a, 0x610f, 0x6148, 0x611f, 0x60f3, 0x611b, 0x60f9, 0x6101, 0x6108, 0x614e, 0x614c, 0x6144, 0x614d, 0x613e, 0x6134, 0x6127, 0x610d, 0x6106, 0x6137, 0x6221, 0x6222, 0x6413, 0x643e, 0x641e, 0x642a, 0x642d, 0x643d, 0x642c, 0x640f, 0x641c, 0x6414, 0x640d, 0x6436, 0x6416, 0x6417, 0x6406, 0x656c, 0x659f, 0x65b0, 0x6697, 0x6689, 0x6687, 0x6688, 0x6696, 0x6684, 0x6698, 0x668d, 0x6703, 0x6994, 0x696d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ 94 ] = { 0x695a, 0x6977, 0x6960, 0x6954, 0x6975, 0x6930, 0x6982, 0x694a, 0x6968, 0x696b, 0x695e, 0x6953, 0x6979, 0x6986, 0x695d, 0x6963, 0x695b, 0x6b47, 0x6b72, 0x6bc0, 0x6bbf, 0x6bd3, 0x6bfd, 0x6ea2, 0x6eaf, 0x6ed3, 0x6eb6, 0x6ec2, 0x6e90, 0x6e9d, 0x6ec7, 0x6ec5, 0x6ea5, 0x6e98, 0x6ebc, 0x6eba, 0x6eab, 0x6ed1, 0x6e96, 0x6e9c, 0x6ec4, 0x6ed4, 0x6eaa, 0x6ea7, 0x6eb4, 0x714e, 0x7159, 0x7169, 0x7164, 0x7149, 0x7167, 0x715c, 0x716c, 0x7166, 0x714c, 0x7165, 0x715e, 0x7146, 0x7168, 0x7156, 0x723a, 0x7252, 0x7337, 0x7345, 0x733f, 0x733e, 0x746f, 0x745a, 0x7455, 0x745f, 0x745e, 0x7441, 0x743f, 0x7459, 0x745b, 0x745c, 0x7576, 0x7578, 0x7600, 0x75f0, 0x7601, 0x75f2, 0x75f1, 0x75fa, 0x75ff, 0x75f4, 0x75f3, 0x76de, 0x76df, 0x775b, 0x776b, 0x7766, 0x775e, 0x7763 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ 63 ] = { 0x7779, 0x776a, 0x776c, 0x775c, 0x7765, 0x7768, 0x7762, 0x77ee, 0x788e, 0x78b0, 0x7897, 0x7898, 0x788c, 0x7889, 0x787c, 0x7891, 0x7893, 0x787f, 0x797a, 0x797f, 0x7981, 0x842c, 0x79bd, 0x7a1c, 0x7a1a, 0x7a20, 0x7a14, 0x7a1f, 0x7a1e, 0x7a9f, 0x7aa0, 0x7b77, 0x7bc0, 0x7b60, 0x7b6e, 0x7b67, 0x7cb1, 0x7cb3, 0x7cb5, 0x7d93, 0x7d79, 0x7d91, 0x7d81, 0x7d8f, 0x7d5b, 0x7f6e, 0x7f69, 0x7f6a, 0x7f72, 0x7fa9, 0x7fa8, 0x7fa4, 0x8056, 0x8058, 0x8086, 0x8084, 0x8171, 0x8170, 0x8178, 0x8165, 0x816e, 0x8173, 0x816b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ 94 ] = { 0x8179, 0x817a, 0x8166, 0x8205, 0x8247, 0x8482, 0x8477, 0x843d, 0x8431, 0x8475, 0x8466, 0x846b, 0x8449, 0x846c, 0x845b, 0x843c, 0x8435, 0x8461, 0x8463, 0x8469, 0x846d, 0x8446, 0x865e, 0x865c, 0x865f, 0x86f9, 0x8713, 0x8708, 0x8707, 0x8700, 0x86fe, 0x86fb, 0x8702, 0x8703, 0x8706, 0x870a, 0x8859, 0x88df, 0x88d4, 0x88d9, 0x88dc, 0x88d8, 0x88dd, 0x88e1, 0x88ca, 0x88d5, 0x88d2, 0x899c, 0x89e3, 0x8a6b, 0x8a72, 0x8a73, 0x8a66, 0x8a69, 0x8a70, 0x8a87, 0x8a7c, 0x8a63, 0x8aa0, 0x8a71, 0x8a85, 0x8a6d, 0x8a62, 0x8a6e, 0x8a6c, 0x8a79, 0x8a7b, 0x8a3e, 0x8a68, 0x8c62, 0x8c8a, 0x8c89, 0x8cca, 0x8cc7, 0x8cc8, 0x8cc4, 0x8cb2, 0x8cc3, 0x8cc2, 0x8cc5, 0x8de1, 0x8ddf, 0x8de8, 0x8def, 0x8df3, 0x8dfa, 0x8dea, 0x8de4, 0x8de6, 0x8eb2, 0x8f03, 0x8f09, 0x8efe, 0x8f0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ 63 ] = { 0x8f9f, 0x8fb2, 0x904b, 0x904a, 0x9053, 0x9042, 0x9054, 0x903c, 0x9055, 0x9050, 0x9047, 0x904f, 0x904e, 0x904d, 0x9051, 0x903e, 0x9041, 0x9112, 0x9117, 0x916c, 0x916a, 0x9169, 0x91c9, 0x9237, 0x9257, 0x9238, 0x923d, 0x9240, 0x923e, 0x925b, 0x924b, 0x9264, 0x9251, 0x9234, 0x9249, 0x924d, 0x9245, 0x9239, 0x923f, 0x925a, 0x9598, 0x9698, 0x9694, 0x9695, 0x96cd, 0x96cb, 0x96c9, 0x96ca, 0x96f7, 0x96fb, 0x96f9, 0x96f6, 0x9756, 0x9774, 0x9776, 0x9810, 0x9811, 0x9813, 0x980a, 0x9812, 0x980c, 0x98fc, 0x98f4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ 94 ] = { 0x98fd, 0x98fe, 0x99b3, 0x99b1, 0x99b4, 0x9ae1, 0x9ce9, 0x9e82, 0x9f0e, 0x9f13, 0x9f20, 0x50e7, 0x50ee, 0x50e5, 0x50d6, 0x50ed, 0x50da, 0x50d5, 0x50cf, 0x50d1, 0x50f1, 0x50ce, 0x50e9, 0x5162, 0x51f3, 0x5283, 0x5282, 0x5331, 0x53ad, 0x55fe, 0x5600, 0x561b, 0x5617, 0x55fd, 0x5614, 0x5606, 0x5609, 0x560d, 0x560e, 0x55f7, 0x5616, 0x561f, 0x5608, 0x5610, 0x55f6, 0x5718, 0x5716, 0x5875, 0x587e, 0x5883, 0x5893, 0x588a, 0x5879, 0x5885, 0x587d, 0x58fd, 0x5925, 0x5922, 0x5924, 0x596a, 0x5969, 0x5ae1, 0x5ae6, 0x5ae9, 0x5ad7, 0x5ad6, 0x5ad8, 0x5ae3, 0x5b75, 0x5bde, 0x5be7, 0x5be1, 0x5be5, 0x5be6, 0x5be8, 0x5be2, 0x5be4, 0x5bdf, 0x5c0d, 0x5c62, 0x5d84, 0x5d87, 0x5e5b, 0x5e63, 0x5e55, 0x5e57, 0x5e54, 0x5ed3, 0x5ed6, 0x5f0a, 0x5f46, 0x5f70, 0x5fb9, 0x6147 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ 63 ] = { 0x613f, 0x614b, 0x6177, 0x6162, 0x6163, 0x615f, 0x615a, 0x6158, 0x6175, 0x622a, 0x6487, 0x6458, 0x6454, 0x64a4, 0x6478, 0x645f, 0x647a, 0x6451, 0x6467, 0x6434, 0x646d, 0x647b, 0x6572, 0x65a1, 0x65d7, 0x65d6, 0x66a2, 0x66a8, 0x669d, 0x699c, 0x69a8, 0x6995, 0x69c1, 0x69ae, 0x69d3, 0x69cb, 0x699b, 0x69b7, 0x69bb, 0x69ab, 0x69b4, 0x69d0, 0x69cd, 0x69ad, 0x69cc, 0x69a6, 0x69c3, 0x69a3, 0x6b49, 0x6b4c, 0x6c33, 0x6f33, 0x6f14, 0x6efe, 0x6f13, 0x6ef4, 0x6f29, 0x6f3e, 0x6f20, 0x6f2c, 0x6f0f, 0x6f02, 0x6f22 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ 94 ] = { 0x6eff, 0x6eef, 0x6f06, 0x6f31, 0x6f38, 0x6f32, 0x6f23, 0x6f15, 0x6f2b, 0x6f2f, 0x6f88, 0x6f2a, 0x6eec, 0x6f01, 0x6ef2, 0x6ecc, 0x6ef7, 0x7194, 0x7199, 0x717d, 0x718a, 0x7184, 0x7192, 0x723e, 0x7292, 0x7296, 0x7344, 0x7350, 0x7464, 0x7463, 0x746a, 0x7470, 0x746d, 0x7504, 0x7591, 0x7627, 0x760d, 0x760b, 0x7609, 0x7613, 0x76e1, 0x76e3, 0x7784, 0x777d, 0x777f, 0x7761, 0x78c1, 0x789f, 0x78a7, 0x78b3, 0x78a9, 0x78a3, 0x798e, 0x798f, 0x798d, 0x7a2e, 0x7a31, 0x7aaa, 0x7aa9, 0x7aed, 0x7aef, 0x7ba1, 0x7b95, 0x7b8b, 0x7b75, 0x7b97, 0x7b9d, 0x7b94, 0x7b8f, 0x7bb8, 0x7b87, 0x7b84, 0x7cb9, 0x7cbd, 0x7cbe, 0x7dbb, 0x7db0, 0x7d9c, 0x7dbd, 0x7dbe, 0x7da0, 0x7dca, 0x7db4, 0x7db2, 0x7db1, 0x7dba, 0x7da2, 0x7dbf, 0x7db5, 0x7db8, 0x7dad, 0x7dd2, 0x7dc7, 0x7dac }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ 63 ] = { 0x7f70, 0x7fe0, 0x7fe1, 0x7fdf, 0x805e, 0x805a, 0x8087, 0x8150, 0x8180, 0x818f, 0x8188, 0x818a, 0x817f, 0x8182, 0x81e7, 0x81fa, 0x8207, 0x8214, 0x821e, 0x824b, 0x84c9, 0x84bf, 0x84c6, 0x84c4, 0x8499, 0x849e, 0x84b2, 0x849c, 0x84cb, 0x84b8, 0x84c0, 0x84d3, 0x8490, 0x84bc, 0x84d1, 0x84ca, 0x873f, 0x871c, 0x873b, 0x8722, 0x8725, 0x8734, 0x8718, 0x8755, 0x8737, 0x8729, 0x88f3, 0x8902, 0x88f4, 0x88f9, 0x88f8, 0x88fd, 0x88e8, 0x891a, 0x88ef, 0x8aa6, 0x8a8c, 0x8a9e, 0x8aa3, 0x8a8d, 0x8aa1, 0x8a93, 0x8aa4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ 94 ] = { 0x8aaa, 0x8aa5, 0x8aa8, 0x8a98, 0x8a91, 0x8a9a, 0x8aa7, 0x8c6a, 0x8c8d, 0x8c8c, 0x8cd3, 0x8cd1, 0x8cd2, 0x8d6b, 0x8d99, 0x8d95, 0x8dfc, 0x8f14, 0x8f12, 0x8f15, 0x8f13, 0x8fa3, 0x9060, 0x9058, 0x905c, 0x9063, 0x9059, 0x905e, 0x9062, 0x905d, 0x905b, 0x9119, 0x9118, 0x911e, 0x9175, 0x9178, 0x9177, 0x9174, 0x9278, 0x9280, 0x9285, 0x9298, 0x9296, 0x927b, 0x9293, 0x929c, 0x92a8, 0x927c, 0x9291, 0x95a1, 0x95a8, 0x95a9, 0x95a3, 0x95a5, 0x95a4, 0x9699, 0x969c, 0x969b, 0x96cc, 0x96d2, 0x9700, 0x977c, 0x9785, 0x97f6, 0x9817, 0x9818, 0x98af, 0x98b1, 0x9903, 0x9905, 0x990c, 0x9909, 0x99c1, 0x9aaf, 0x9ab0, 0x9ae6, 0x9b41, 0x9b42, 0x9cf4, 0x9cf6, 0x9cf3, 0x9ebc, 0x9f3b, 0x9f4a, 0x5104, 0x5100, 0x50fb, 0x50f5, 0x50f9, 0x5102, 0x5108, 0x5109, 0x5105, 0x51dc }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ 63 ] = { 0x5287, 0x5288, 0x5289, 0x528d, 0x528a, 0x52f0, 0x53b2, 0x562e, 0x563b, 0x5639, 0x5632, 0x563f, 0x5634, 0x5629, 0x5653, 0x564e, 0x5657, 0x5674, 0x5636, 0x562f, 0x5630, 0x5880, 0x589f, 0x589e, 0x58b3, 0x589c, 0x58ae, 0x58a9, 0x58a6, 0x596d, 0x5b09, 0x5afb, 0x5b0b, 0x5af5, 0x5b0c, 0x5b08, 0x5bee, 0x5bec, 0x5be9, 0x5beb, 0x5c64, 0x5c65, 0x5d9d, 0x5d94, 0x5e62, 0x5e5f, 0x5e61, 0x5ee2, 0x5eda, 0x5edf, 0x5edd, 0x5ee3, 0x5ee0, 0x5f48, 0x5f71, 0x5fb7, 0x5fb5, 0x6176, 0x6167, 0x616e, 0x615d, 0x6155, 0x6182 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ 94 ] = { 0x617c, 0x6170, 0x616b, 0x617e, 0x61a7, 0x6190, 0x61ab, 0x618e, 0x61ac, 0x619a, 0x61a4, 0x6194, 0x61ae, 0x622e, 0x6469, 0x646f, 0x6479, 0x649e, 0x64b2, 0x6488, 0x6490, 0x64b0, 0x64a5, 0x6493, 0x6495, 0x64a9, 0x6492, 0x64ae, 0x64ad, 0x64ab, 0x649a, 0x64ac, 0x6499, 0x64a2, 0x64b3, 0x6575, 0x6577, 0x6578, 0x66ae, 0x66ab, 0x66b4, 0x66b1, 0x6a23, 0x6a1f, 0x69e8, 0x6a01, 0x6a1e, 0x6a19, 0x69fd, 0x6a21, 0x6a13, 0x6a0a, 0x69f3, 0x6a02, 0x6a05, 0x69ed, 0x6a11, 0x6b50, 0x6b4e, 0x6ba4, 0x6bc5, 0x6bc6, 0x6f3f, 0x6f7c, 0x6f84, 0x6f51, 0x6f66, 0x6f54, 0x6f86, 0x6f6d, 0x6f5b, 0x6f78, 0x6f6e, 0x6f8e, 0x6f7a, 0x6f70, 0x6f64, 0x6f97, 0x6f58, 0x6ed5, 0x6f6f, 0x6f60, 0x6f5f, 0x719f, 0x71ac, 0x71b1, 0x71a8, 0x7256, 0x729b, 0x734e, 0x7357, 0x7469, 0x748b, 0x7483 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ 63 ] = { 0x747e, 0x7480, 0x757f, 0x7620, 0x7629, 0x761f, 0x7624, 0x7626, 0x7621, 0x7622, 0x769a, 0x76ba, 0x76e4, 0x778e, 0x7787, 0x778c, 0x7791, 0x778b, 0x78cb, 0x78c5, 0x78ba, 0x78ca, 0x78be, 0x78d5, 0x78bc, 0x78d0, 0x7a3f, 0x7a3c, 0x7a40, 0x7a3d, 0x7a37, 0x7a3b, 0x7aaf, 0x7aae, 0x7bad, 0x7bb1, 0x7bc4, 0x7bb4, 0x7bc6, 0x7bc7, 0x7bc1, 0x7ba0, 0x7bcc, 0x7cca, 0x7de0, 0x7df4, 0x7def, 0x7dfb, 0x7dd8, 0x7dec, 0x7ddd, 0x7de8, 0x7de3, 0x7dda, 0x7dde, 0x7de9, 0x7d9e, 0x7dd9, 0x7df2, 0x7df9, 0x7f75, 0x7f77, 0x7faf }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ 94 ] = { 0x7fe9, 0x8026, 0x819b, 0x819c, 0x819d, 0x81a0, 0x819a, 0x8198, 0x8517, 0x853d, 0x851a, 0x84ee, 0x852c, 0x852d, 0x8513, 0x8511, 0x8523, 0x8521, 0x8514, 0x84ec, 0x8525, 0x84ff, 0x8506, 0x8782, 0x8774, 0x8776, 0x8760, 0x8766, 0x8778, 0x8768, 0x8759, 0x8757, 0x874c, 0x8753, 0x885b, 0x885d, 0x8910, 0x8907, 0x8912, 0x8913, 0x8915, 0x890a, 0x8abc, 0x8ad2, 0x8ac7, 0x8ac4, 0x8a95, 0x8acb, 0x8af8, 0x8ab2, 0x8ac9, 0x8ac2, 0x8abf, 0x8ab0, 0x8ad6, 0x8acd, 0x8ab6, 0x8ab9, 0x8adb, 0x8c4c, 0x8c4e, 0x8c6c, 0x8ce0, 0x8cde, 0x8ce6, 0x8ce4, 0x8cec, 0x8ced, 0x8ce2, 0x8ce3, 0x8cdc, 0x8cea, 0x8ce1, 0x8d6d, 0x8d9f, 0x8da3, 0x8e2b, 0x8e10, 0x8e1d, 0x8e22, 0x8e0f, 0x8e29, 0x8e1f, 0x8e21, 0x8e1e, 0x8eba, 0x8f1d, 0x8f1b, 0x8f1f, 0x8f29, 0x8f26, 0x8f2a, 0x8f1c, 0x8f1e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ 63 ] = { 0x8f25, 0x9069, 0x906e, 0x9068, 0x906d, 0x9077, 0x9130, 0x912d, 0x9127, 0x9131, 0x9187, 0x9189, 0x918b, 0x9183, 0x92c5, 0x92bb, 0x92b7, 0x92ea, 0x92ac, 0x92e4, 0x92c1, 0x92b3, 0x92bc, 0x92d2, 0x92c7, 0x92f0, 0x92b2, 0x95ad, 0x95b1, 0x9704, 0x9706, 0x9707, 0x9709, 0x9760, 0x978d, 0x978b, 0x978f, 0x9821, 0x982b, 0x981c, 0x98b3, 0x990a, 0x9913, 0x9912, 0x9918, 0x99dd, 0x99d0, 0x99df, 0x99db, 0x99d1, 0x99d5, 0x99d2, 0x99d9, 0x9ab7, 0x9aee, 0x9aef, 0x9b27, 0x9b45, 0x9b44, 0x9b77, 0x9b6f, 0x9d06, 0x9d09 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ 94 ] = { 0x9d03, 0x9ea9, 0x9ebe, 0x9ece, 0x58a8, 0x9f52, 0x5112, 0x5118, 0x5114, 0x5110, 0x5115, 0x5180, 0x51aa, 0x51dd, 0x5291, 0x5293, 0x52f3, 0x5659, 0x566b, 0x5679, 0x5669, 0x5664, 0x5678, 0x566a, 0x5668, 0x5665, 0x5671, 0x566f, 0x566c, 0x5662, 0x5676, 0x58c1, 0x58be, 0x58c7, 0x58c5, 0x596e, 0x5b1d, 0x5b34, 0x5b78, 0x5bf0, 0x5c0e, 0x5f4a, 0x61b2, 0x6191, 0x61a9, 0x618a, 0x61cd, 0x61b6, 0x61be, 0x61ca, 0x61c8, 0x6230, 0x64c5, 0x64c1, 0x64cb, 0x64bb, 0x64bc, 0x64da, 0x64c4, 0x64c7, 0x64c2, 0x64cd, 0x64bf, 0x64d2, 0x64d4, 0x64be, 0x6574, 0x66c6, 0x66c9, 0x66b9, 0x66c4, 0x66c7, 0x66b8, 0x6a3d, 0x6a38, 0x6a3a, 0x6a59, 0x6a6b, 0x6a58, 0x6a39, 0x6a44, 0x6a62, 0x6a61, 0x6a4b, 0x6a47, 0x6a35, 0x6a5f, 0x6a48, 0x6b59, 0x6b77, 0x6c05, 0x6fc2, 0x6fb1, 0x6fa1 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ 63 ] = { 0x6fc3, 0x6fa4, 0x6fc1, 0x6fa7, 0x6fb3, 0x6fc0, 0x6fb9, 0x6fb6, 0x6fa6, 0x6fa0, 0x6fb4, 0x71be, 0x71c9, 0x71d0, 0x71d2, 0x71c8, 0x71d5, 0x71b9, 0x71ce, 0x71d9, 0x71dc, 0x71c3, 0x71c4, 0x7368, 0x749c, 0x74a3, 0x7498, 0x749f, 0x749e, 0x74e2, 0x750c, 0x750d, 0x7634, 0x7638, 0x763a, 0x76e7, 0x76e5, 0x77a0, 0x779e, 0x779f, 0x77a5, 0x78e8, 0x78da, 0x78ec, 0x78e7, 0x79a6, 0x7a4d, 0x7a4e, 0x7a46, 0x7a4c, 0x7a4b, 0x7aba, 0x7bd9, 0x7c11, 0x7bc9, 0x7be4, 0x7bdb, 0x7be1, 0x7be9, 0x7be6, 0x7cd5, 0x7cd6, 0x7e0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ 94 ] = { 0x7e11, 0x7e08, 0x7e1b, 0x7e23, 0x7e1e, 0x7e1d, 0x7e09, 0x7e10, 0x7f79, 0x7fb2, 0x7ff0, 0x7ff1, 0x7fee, 0x8028, 0x81b3, 0x81a9, 0x81a8, 0x81fb, 0x8208, 0x8258, 0x8259, 0x854a, 0x8559, 0x8548, 0x8568, 0x8569, 0x8543, 0x8549, 0x856d, 0x856a, 0x855e, 0x8783, 0x879f, 0x879e, 0x87a2, 0x878d, 0x8861, 0x892a, 0x8932, 0x8925, 0x892b, 0x8921, 0x89aa, 0x89a6, 0x8ae6, 0x8afa, 0x8aeb, 0x8af1, 0x8b00, 0x8adc, 0x8ae7, 0x8aee, 0x8afe, 0x8b01, 0x8b02, 0x8af7, 0x8aed, 0x8af3, 0x8af6, 0x8afc, 0x8c6b, 0x8c6d, 0x8c93, 0x8cf4, 0x8e44, 0x8e31, 0x8e34, 0x8e42, 0x8e39, 0x8e35, 0x8f3b, 0x8f2f, 0x8f38, 0x8f33, 0x8fa8, 0x8fa6, 0x9075, 0x9074, 0x9078, 0x9072, 0x907c, 0x907a, 0x9134, 0x9192, 0x9320, 0x9336, 0x92f8, 0x9333, 0x932f, 0x9322, 0x92fc, 0x932b, 0x9304, 0x931a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ 63 ] = { 0x9310, 0x9326, 0x9321, 0x9315, 0x932e, 0x9319, 0x95bb, 0x96a7, 0x96a8, 0x96aa, 0x96d5, 0x970e, 0x9711, 0x9716, 0x970d, 0x9713, 0x970f, 0x975b, 0x975c, 0x9766, 0x9798, 0x9830, 0x9838, 0x983b, 0x9837, 0x982d, 0x9839, 0x9824, 0x9910, 0x9928, 0x991e, 0x991b, 0x9921, 0x991a, 0x99ed, 0x99e2, 0x99f1, 0x9ab8, 0x9abc, 0x9afb, 0x9aed, 0x9b28, 0x9b91, 0x9d15, 0x9d23, 0x9d26, 0x9d28, 0x9d12, 0x9d1b, 0x9ed8, 0x9ed4, 0x9f8d, 0x9f9c, 0x512a, 0x511f, 0x5121, 0x5132, 0x52f5, 0x568e, 0x5680, 0x5690, 0x5685, 0x5687 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ 94 ] = { 0x568f, 0x58d5, 0x58d3, 0x58d1, 0x58ce, 0x5b30, 0x5b2a, 0x5b24, 0x5b7a, 0x5c37, 0x5c68, 0x5dbc, 0x5dba, 0x5dbd, 0x5db8, 0x5e6b, 0x5f4c, 0x5fbd, 0x61c9, 0x61c2, 0x61c7, 0x61e6, 0x61cb, 0x6232, 0x6234, 0x64ce, 0x64ca, 0x64d8, 0x64e0, 0x64f0, 0x64e6, 0x64ec, 0x64f1, 0x64e2, 0x64ed, 0x6582, 0x6583, 0x66d9, 0x66d6, 0x6a80, 0x6a94, 0x6a84, 0x6aa2, 0x6a9c, 0x6adb, 0x6aa3, 0x6a7e, 0x6a97, 0x6a90, 0x6aa0, 0x6b5c, 0x6bae, 0x6bda, 0x6c08, 0x6fd8, 0x6ff1, 0x6fdf, 0x6fe0, 0x6fdb, 0x6fe4, 0x6feb, 0x6fef, 0x6f80, 0x6fec, 0x6fe1, 0x6fe9, 0x6fd5, 0x6fee, 0x6ff0, 0x71e7, 0x71df, 0x71ee, 0x71e6, 0x71e5, 0x71ed, 0x71ec, 0x71f4, 0x71e0, 0x7235, 0x7246, 0x7370, 0x7372, 0x74a9, 0x74b0, 0x74a6, 0x74a8, 0x7646, 0x7642, 0x764c, 0x76ea, 0x77b3, 0x77aa, 0x77b0, 0x77ac }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ 63 ] = { 0x77a7, 0x77ad, 0x77ef, 0x78f7, 0x78fa, 0x78f4, 0x78ef, 0x7901, 0x79a7, 0x79aa, 0x7a57, 0x7abf, 0x7c07, 0x7c0d, 0x7bfe, 0x7bf7, 0x7c0c, 0x7be0, 0x7ce0, 0x7cdc, 0x7cde, 0x7ce2, 0x7cdf, 0x7cd9, 0x7cdd, 0x7e2e, 0x7e3e, 0x7e46, 0x7e37, 0x7e32, 0x7e43, 0x7e2b, 0x7e3d, 0x7e31, 0x7e45, 0x7e41, 0x7e34, 0x7e39, 0x7e48, 0x7e35, 0x7e3f, 0x7e2f, 0x7f44, 0x7ff3, 0x7ffc, 0x8071, 0x8072, 0x8070, 0x806f, 0x8073, 0x81c6, 0x81c3, 0x81ba, 0x81c2, 0x81c0, 0x81bf, 0x81bd, 0x81c9, 0x81be, 0x81e8, 0x8209, 0x8271, 0x85aa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ 94 ] = { 0x8584, 0x857e, 0x859c, 0x8591, 0x8594, 0x85af, 0x859b, 0x8587, 0x85a8, 0x858a, 0x8667, 0x87c0, 0x87d1, 0x87b3, 0x87d2, 0x87c6, 0x87ab, 0x87bb, 0x87ba, 0x87c8, 0x87cb, 0x893b, 0x8936, 0x8944, 0x8938, 0x893d, 0x89ac, 0x8b0e, 0x8b17, 0x8b19, 0x8b1b, 0x8b0a, 0x8b20, 0x8b1d, 0x8b04, 0x8b10, 0x8c41, 0x8c3f, 0x8c73, 0x8cfa, 0x8cfd, 0x8cfc, 0x8cf8, 0x8cfb, 0x8da8, 0x8e49, 0x8e4b, 0x8e48, 0x8e4a, 0x8f44, 0x8f3e, 0x8f42, 0x8f45, 0x8f3f, 0x907f, 0x907d, 0x9084, 0x9081, 0x9082, 0x9080, 0x9139, 0x91a3, 0x919e, 0x919c, 0x934d, 0x9382, 0x9328, 0x9375, 0x934a, 0x9365, 0x934b, 0x9318, 0x937e, 0x936c, 0x935b, 0x9370, 0x935a, 0x9354, 0x95ca, 0x95cb, 0x95cc, 0x95c8, 0x95c6, 0x96b1, 0x96b8, 0x96d6, 0x971c, 0x971e, 0x97a0, 0x97d3, 0x9846, 0x98b6, 0x9935, 0x9a01 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ 63 ] = { 0x99ff, 0x9bae, 0x9bab, 0x9baa, 0x9bad, 0x9d3b, 0x9d3f, 0x9e8b, 0x9ecf, 0x9ede, 0x9edc, 0x9edd, 0x9edb, 0x9f3e, 0x9f4b, 0x53e2, 0x5695, 0x56ae, 0x58d9, 0x58d8, 0x5b38, 0x5f5d, 0x61e3, 0x6233, 0x64f4, 0x64f2, 0x64fe, 0x6506, 0x64fa, 0x64fb, 0x64f7, 0x65b7, 0x66dc, 0x6726, 0x6ab3, 0x6aac, 0x6ac3, 0x6abb, 0x6ab8, 0x6ac2, 0x6aae, 0x6aaf, 0x6b5f, 0x6b78, 0x6baf, 0x7009, 0x700b, 0x6ffe, 0x7006, 0x6ffa, 0x7011, 0x700f, 0x71fb, 0x71fc, 0x71fe, 0x71f8, 0x7377, 0x7375, 0x74a7, 0x74bf, 0x7515, 0x7656, 0x7658 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ 94 ] = { 0x7652, 0x77bd, 0x77bf, 0x77bb, 0x77bc, 0x790e, 0x79ae, 0x7a61, 0x7a62, 0x7a60, 0x7ac4, 0x7ac5, 0x7c2b, 0x7c27, 0x7c2a, 0x7c1e, 0x7c23, 0x7c21, 0x7ce7, 0x7e54, 0x7e55, 0x7e5e, 0x7e5a, 0x7e61, 0x7e52, 0x7e59, 0x7f48, 0x7ff9, 0x7ffb, 0x8077, 0x8076, 0x81cd, 0x81cf, 0x820a, 0x85cf, 0x85a9, 0x85cd, 0x85d0, 0x85c9, 0x85b0, 0x85ba, 0x85b9, 0x85a6, 0x87ef, 0x87ec, 0x87f2, 0x87e0, 0x8986, 0x89b2, 0x89f4, 0x8b28, 0x8b39, 0x8b2c, 0x8b2b, 0x8c50, 0x8d05, 0x8e59, 0x8e63, 0x8e66, 0x8e64, 0x8e5f, 0x8e55, 0x8ec0, 0x8f49, 0x8f4d, 0x9087, 0x9083, 0x9088, 0x91ab, 0x91ac, 0x91d0, 0x9394, 0x938a, 0x9396, 0x93a2, 0x93b3, 0x93ae, 0x93ac, 0x93b0, 0x9398, 0x939a, 0x9397, 0x95d4, 0x95d6, 0x95d0, 0x95d5, 0x96e2, 0x96dc, 0x96d9, 0x96db, 0x96de, 0x9724, 0x97a3, 0x97a6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ 63 ] = { 0x97ad, 0x97f9, 0x984d, 0x984f, 0x984c, 0x984e, 0x9853, 0x98ba, 0x993e, 0x993f, 0x993d, 0x992e, 0x99a5, 0x9a0e, 0x9ac1, 0x9b03, 0x9b06, 0x9b4f, 0x9b4e, 0x9b4d, 0x9bca, 0x9bc9, 0x9bfd, 0x9bc8, 0x9bc0, 0x9d51, 0x9d5d, 0x9d60, 0x9ee0, 0x9f15, 0x9f2c, 0x5133, 0x56a5, 0x58de, 0x58df, 0x58e2, 0x5bf5, 0x9f90, 0x5eec, 0x61f2, 0x61f7, 0x61f6, 0x61f5, 0x6500, 0x650f, 0x66e0, 0x66dd, 0x6ae5, 0x6add, 0x6ada, 0x6ad3, 0x701b, 0x701f, 0x7028, 0x701a, 0x701d, 0x7015, 0x7018, 0x7206, 0x720d, 0x7258, 0x72a2, 0x7378 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ 94 ] = { 0x737a, 0x74bd, 0x74ca, 0x74e3, 0x7587, 0x7586, 0x765f, 0x7661, 0x77c7, 0x7919, 0x79b1, 0x7a6b, 0x7a69, 0x7c3e, 0x7c3f, 0x7c38, 0x7c3d, 0x7c37, 0x7c40, 0x7e6b, 0x7e6d, 0x7e79, 0x7e69, 0x7e6a, 0x7f85, 0x7e73, 0x7fb6, 0x7fb9, 0x7fb8, 0x81d8, 0x85e9, 0x85dd, 0x85ea, 0x85d5, 0x85e4, 0x85e5, 0x85f7, 0x87fb, 0x8805, 0x880d, 0x87f9, 0x87fe, 0x8960, 0x895f, 0x8956, 0x895e, 0x8b41, 0x8b5c, 0x8b58, 0x8b49, 0x8b5a, 0x8b4e, 0x8b4f, 0x8b46, 0x8b59, 0x8d08, 0x8d0a, 0x8e7c, 0x8e72, 0x8e87, 0x8e76, 0x8e6c, 0x8e7a, 0x8e74, 0x8f54, 0x8f4e, 0x8fad, 0x908a, 0x908b, 0x91b1, 0x91ae, 0x93e1, 0x93d1, 0x93df, 0x93c3, 0x93c8, 0x93dc, 0x93dd, 0x93d6, 0x93e2, 0x93cd, 0x93d8, 0x93e4, 0x93d7, 0x93e8, 0x95dc, 0x96b4, 0x96e3, 0x972a, 0x9727, 0x9761, 0x97dc, 0x97fb, 0x985e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ 63 ] = { 0x9858, 0x985b, 0x98bc, 0x9945, 0x9949, 0x9a16, 0x9a19, 0x9b0d, 0x9be8, 0x9be7, 0x9bd6, 0x9bdb, 0x9d89, 0x9d61, 0x9d72, 0x9d6a, 0x9d6c, 0x9e92, 0x9e97, 0x9e93, 0x9eb4, 0x52f8, 0x56a8, 0x56b7, 0x56b6, 0x56b4, 0x56bc, 0x58e4, 0x5b40, 0x5b43, 0x5b7d, 0x5bf6, 0x5dc9, 0x61f8, 0x61fa, 0x6518, 0x6514, 0x6519, 0x66e6, 0x6727, 0x6aec, 0x703e, 0x7030, 0x7032, 0x7210, 0x737b, 0x74cf, 0x7662, 0x7665, 0x7926, 0x792a, 0x792c, 0x792b, 0x7ac7, 0x7af6, 0x7c4c, 0x7c43, 0x7c4d, 0x7cef, 0x7cf0, 0x8fae, 0x7e7d, 0x7e7c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ 94 ] = { 0x7e82, 0x7f4c, 0x8000, 0x81da, 0x8266, 0x85fb, 0x85f9, 0x8611, 0x85fa, 0x8606, 0x860b, 0x8607, 0x860a, 0x8814, 0x8815, 0x8964, 0x89ba, 0x89f8, 0x8b70, 0x8b6c, 0x8b66, 0x8b6f, 0x8b5f, 0x8b6b, 0x8d0f, 0x8d0d, 0x8e89, 0x8e81, 0x8e85, 0x8e82, 0x91b4, 0x91cb, 0x9418, 0x9403, 0x93fd, 0x95e1, 0x9730, 0x98c4, 0x9952, 0x9951, 0x99a8, 0x9a2b, 0x9a30, 0x9a37, 0x9a35, 0x9c13, 0x9c0d, 0x9e79, 0x9eb5, 0x9ee8, 0x9f2f, 0x9f5f, 0x9f63, 0x9f61, 0x5137, 0x5138, 0x56c1, 0x56c0, 0x56c2, 0x5914, 0x5c6c, 0x5dcd, 0x61fc, 0x61fe, 0x651d, 0x651c, 0x6595, 0x66e9, 0x6afb, 0x6b04, 0x6afa, 0x6bb2, 0x704c, 0x721b, 0x72a7, 0x74d6, 0x74d4, 0x7669, 0x77d3, 0x7c50, 0x7e8f, 0x7e8c, 0x7fbc, 0x8617, 0x862d, 0x861a, 0x8823, 0x8822, 0x8821, 0x881f, 0x896a, 0x896c, 0x89bd, 0x8b74 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc540[ 63 ] = { 0x8b77, 0x8b7d, 0x8d13, 0x8e8a, 0x8e8d, 0x8e8b, 0x8f5f, 0x8faf, 0x91ba, 0x942e, 0x9433, 0x9435, 0x943a, 0x9438, 0x9432, 0x942b, 0x95e2, 0x9738, 0x9739, 0x9732, 0x97ff, 0x9867, 0x9865, 0x9957, 0x9a45, 0x9a43, 0x9a40, 0x9a3e, 0x9acf, 0x9b54, 0x9b51, 0x9c2d, 0x9c25, 0x9daf, 0x9db4, 0x9dc2, 0x9db8, 0x9e9d, 0x9eef, 0x9f19, 0x9f5c, 0x9f66, 0x9f67, 0x513c, 0x513b, 0x56c8, 0x56ca, 0x56c9, 0x5b7f, 0x5dd4, 0x5dd2, 0x5f4e, 0x61ff, 0x6524, 0x6b0a, 0x6b61, 0x7051, 0x7058, 0x7380, 0x74e4, 0x758a, 0x766e, 0x766c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ 94 ] = { 0x79b3, 0x7c60, 0x7c5f, 0x807e, 0x807d, 0x81df, 0x8972, 0x896f, 0x89fc, 0x8b80, 0x8d16, 0x8d17, 0x8e91, 0x8e93, 0x8f61, 0x9148, 0x9444, 0x9451, 0x9452, 0x973d, 0x973e, 0x97c3, 0x97c1, 0x986b, 0x9955, 0x9a55, 0x9a4d, 0x9ad2, 0x9b1a, 0x9c49, 0x9c31, 0x9c3e, 0x9c3b, 0x9dd3, 0x9dd7, 0x9f34, 0x9f6c, 0x9f6a, 0x9f94, 0x56cc, 0x5dd6, 0x6200, 0x6523, 0x652b, 0x652a, 0x66ec, 0x6b10, 0x74da, 0x7aca, 0x7c64, 0x7c63, 0x7c65, 0x7e93, 0x7e96, 0x7e94, 0x81e2, 0x8638, 0x863f, 0x8831, 0x8b8a, 0x9090, 0x908f, 0x9463, 0x9460, 0x9464, 0x9768, 0x986f, 0x995c, 0x9a5a, 0x9a5b, 0x9a57, 0x9ad3, 0x9ad4, 0x9ad1, 0x9c54, 0x9c57, 0x9c56, 0x9de5, 0x9e9f, 0x9ef4, 0x56d1, 0x58e9, 0x652c, 0x705e, 0x7671, 0x7672, 0x77d7, 0x7f50, 0x7f88, 0x8836, 0x8839, 0x8862, 0x8b93, 0x8b92 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ 63 ] = { 0x8b96, 0x8277, 0x8d1b, 0x91c0, 0x946a, 0x9742, 0x9748, 0x9744, 0x97c6, 0x9870, 0x9a5f, 0x9b22, 0x9b58, 0x9c5f, 0x9df9, 0x9dfa, 0x9e7c, 0x9e7d, 0x9f07, 0x9f77, 0x9f72, 0x5ef3, 0x6b16, 0x7063, 0x7c6c, 0x7c6e, 0x883b, 0x89c0, 0x8ea1, 0x91c1, 0x9472, 0x9470, 0x9871, 0x995e, 0x9ad6, 0x9b23, 0x9ecc, 0x7064, 0x77da, 0x8b9a, 0x9477, 0x97c9, 0x9a62, 0x9a65, 0x7e9c, 0x8b9c, 0x8eaa, 0x91c5, 0x947d, 0x947e, 0x947c, 0x9c77, 0x9c78, 0x9ef7, 0x8c54, 0x947f, 0x9e1a, 0x7228, 0x9a6a, 0x9b31, 0x9e1b, 0x9e1e, 0x7c72 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ 63 ] = { 0x4e42, 0x4e5c, 0x51f5, 0x531a, 0x5382, 0x4e07, 0x4e0c, 0x4e47, 0x4e8d, 0x56d7, 0xfa0c, 0x5c6e, 0x5f73, 0x4e0f, 0x5187, 0x4e0e, 0x4e2e, 0x4e93, 0x4ec2, 0x4ec9, 0x4ec8, 0x5198, 0x52fc, 0x536c, 0x53b9, 0x5720, 0x5903, 0x592c, 0x5c10, 0x5dff, 0x65e1, 0x6bb3, 0x6bcc, 0x6c14, 0x723f, 0x4e31, 0x4e3c, 0x4ee8, 0x4edc, 0x4ee9, 0x4ee1, 0x4edd, 0x4eda, 0x520c, 0x531c, 0x534c, 0x5722, 0x5723, 0x5917, 0x592f, 0x5b81, 0x5b84, 0x5c12, 0x5c3b, 0x5c74, 0x5c73, 0x5e04, 0x5e80, 0x5e82, 0x5fc9, 0x6209, 0x6250, 0x6c15 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ 94 ] = { 0x6c36, 0x6c43, 0x6c3f, 0x6c3b, 0x72ae, 0x72b0, 0x738a, 0x79b8, 0x808a, 0x961e, 0x4f0e, 0x4f18, 0x4f2c, 0x4ef5, 0x4f14, 0x4ef1, 0x4f00, 0x4ef7, 0x4f08, 0x4f1d, 0x4f02, 0x4f05, 0x4f22, 0x4f13, 0x4f04, 0x4ef4, 0x4f12, 0x51b1, 0x5213, 0x5209, 0x5210, 0x52a6, 0x5322, 0x531f, 0x534d, 0x538a, 0x5407, 0x56e1, 0x56df, 0x572e, 0x572a, 0x5734, 0x593c, 0x5980, 0x597c, 0x5985, 0x597b, 0x597e, 0x5977, 0x597f, 0x5b56, 0x5c15, 0x5c25, 0x5c7c, 0x5c7a, 0x5c7b, 0x5c7e, 0x5ddf, 0x5e75, 0x5e84, 0x5f02, 0x5f1a, 0x5f74, 0x5fd5, 0x5fd4, 0x5fcf, 0x625c, 0x625e, 0x6264, 0x6261, 0x6266, 0x6262, 0x6259, 0x6260, 0x625a, 0x6265, 0x65ef, 0x65ee, 0x673e, 0x6739, 0x6738, 0x673b, 0x673a, 0x673f, 0x673c, 0x6733, 0x6c18, 0x6c46, 0x6c52, 0x6c5c, 0x6c4f, 0x6c4a, 0x6c54, 0x6c4b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ 63 ] = { 0x6c4c, 0x7071, 0x725e, 0x72b4, 0x72b5, 0x738e, 0x752a, 0x767f, 0x7a75, 0x7f51, 0x8278, 0x827c, 0x8280, 0x827d, 0x827f, 0x864d, 0x897e, 0x9099, 0x9097, 0x9098, 0x909b, 0x9094, 0x9622, 0x9624, 0x9620, 0x9623, 0x4f56, 0x4f3b, 0x4f62, 0x4f49, 0x4f53, 0x4f64, 0x4f3e, 0x4f67, 0x4f52, 0x4f5f, 0x4f41, 0x4f58, 0x4f2d, 0x4f33, 0x4f3f, 0x4f61, 0x518f, 0x51b9, 0x521c, 0x521e, 0x5221, 0x52ad, 0x52ae, 0x5309, 0x5363, 0x5372, 0x538e, 0x538f, 0x5430, 0x5437, 0x542a, 0x5454, 0x5445, 0x5419, 0x541c, 0x5425, 0x5418 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ 94 ] = { 0x543d, 0x544f, 0x5441, 0x5428, 0x5424, 0x5447, 0x56ee, 0x56e7, 0x56e5, 0x5741, 0x5745, 0x574c, 0x5749, 0x574b, 0x5752, 0x5906, 0x5940, 0x59a6, 0x5998, 0x59a0, 0x5997, 0x598e, 0x59a2, 0x5990, 0x598f, 0x59a7, 0x59a1, 0x5b8e, 0x5b92, 0x5c28, 0x5c2a, 0x5c8d, 0x5c8f, 0x5c88, 0x5c8b, 0x5c89, 0x5c92, 0x5c8a, 0x5c86, 0x5c93, 0x5c95, 0x5de0, 0x5e0a, 0x5e0e, 0x5e8b, 0x5e89, 0x5e8c, 0x5e88, 0x5e8d, 0x5f05, 0x5f1d, 0x5f78, 0x5f76, 0x5fd2, 0x5fd1, 0x5fd0, 0x5fed, 0x5fe8, 0x5fee, 0x5ff3, 0x5fe1, 0x5fe4, 0x5fe3, 0x5ffa, 0x5fef, 0x5ff7, 0x5ffb, 0x6000, 0x5ff4, 0x623a, 0x6283, 0x628c, 0x628e, 0x628f, 0x6294, 0x6287, 0x6271, 0x627b, 0x627a, 0x6270, 0x6281, 0x6288, 0x6277, 0x627d, 0x6272, 0x6274, 0x6537, 0x65f0, 0x65f4, 0x65f3, 0x65f2, 0x65f5, 0x6745, 0x6747 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ 63 ] = { 0x6759, 0x6755, 0x674c, 0x6748, 0x675d, 0x674d, 0x675a, 0x674b, 0x6bd0, 0x6c19, 0x6c1a, 0x6c78, 0x6c67, 0x6c6b, 0x6c84, 0x6c8b, 0x6c8f, 0x6c71, 0x6c6f, 0x6c69, 0x6c9a, 0x6c6d, 0x6c87, 0x6c95, 0x6c9c, 0x6c66, 0x6c73, 0x6c65, 0x6c7b, 0x6c8e, 0x7074, 0x707a, 0x7263, 0x72bf, 0x72bd, 0x72c3, 0x72c6, 0x72c1, 0x72ba, 0x72c5, 0x7395, 0x7397, 0x7393, 0x7394, 0x7392, 0x753a, 0x7539, 0x7594, 0x7595, 0x7681, 0x793d, 0x8034, 0x8095, 0x8099, 0x8090, 0x8092, 0x809c, 0x8290, 0x828f, 0x8285, 0x828e, 0x8291, 0x8293 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ 94 ] = { 0x828a, 0x8283, 0x8284, 0x8c78, 0x8fc9, 0x8fbf, 0x909f, 0x90a1, 0x90a5, 0x909e, 0x90a7, 0x90a0, 0x9630, 0x9628, 0x962f, 0x962d, 0x4e33, 0x4f98, 0x4f7c, 0x4f85, 0x4f7d, 0x4f80, 0x4f87, 0x4f76, 0x4f74, 0x4f89, 0x4f84, 0x4f77, 0x4f4c, 0x4f97, 0x4f6a, 0x4f9a, 0x4f79, 0x4f81, 0x4f78, 0x4f90, 0x4f9c, 0x4f94, 0x4f9e, 0x4f92, 0x4f82, 0x4f95, 0x4f6b, 0x4f6e, 0x519e, 0x51bc, 0x51be, 0x5235, 0x5232, 0x5233, 0x5246, 0x5231, 0x52bc, 0x530a, 0x530b, 0x533c, 0x5392, 0x5394, 0x5487, 0x547f, 0x5481, 0x5491, 0x5482, 0x5488, 0x546b, 0x547a, 0x547e, 0x5465, 0x546c, 0x5474, 0x5466, 0x548d, 0x546f, 0x5461, 0x5460, 0x5498, 0x5463, 0x5467, 0x5464, 0x56f7, 0x56f9, 0x576f, 0x5772, 0x576d, 0x576b, 0x5771, 0x5770, 0x5776, 0x5780, 0x5775, 0x577b, 0x5773, 0x5774, 0x5762 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ 63 ] = { 0x5768, 0x577d, 0x590c, 0x5945, 0x59b5, 0x59ba, 0x59cf, 0x59ce, 0x59b2, 0x59cc, 0x59c1, 0x59b6, 0x59bc, 0x59c3, 0x59d6, 0x59b1, 0x59bd, 0x59c0, 0x59c8, 0x59b4, 0x59c7, 0x5b62, 0x5b65, 0x5b93, 0x5b95, 0x5c44, 0x5c47, 0x5cae, 0x5ca4, 0x5ca0, 0x5cb5, 0x5caf, 0x5ca8, 0x5cac, 0x5c9f, 0x5ca3, 0x5cad, 0x5ca2, 0x5caa, 0x5ca7, 0x5c9d, 0x5ca5, 0x5cb6, 0x5cb0, 0x5ca6, 0x5e17, 0x5e14, 0x5e19, 0x5f28, 0x5f22, 0x5f23, 0x5f24, 0x5f54, 0x5f82, 0x5f7e, 0x5f7d, 0x5fde, 0x5fe5, 0x602d, 0x6026, 0x6019, 0x6032, 0x600b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ 94 ] = { 0x6034, 0x600a, 0x6017, 0x6033, 0x601a, 0x601e, 0x602c, 0x6022, 0x600d, 0x6010, 0x602e, 0x6013, 0x6011, 0x600c, 0x6009, 0x601c, 0x6214, 0x623d, 0x62ad, 0x62b4, 0x62d1, 0x62be, 0x62aa, 0x62b6, 0x62ca, 0x62ae, 0x62b3, 0x62af, 0x62bb, 0x62a9, 0x62b0, 0x62b8, 0x653d, 0x65a8, 0x65bb, 0x6609, 0x65fc, 0x6604, 0x6612, 0x6608, 0x65fb, 0x6603, 0x660b, 0x660d, 0x6605, 0x65fd, 0x6611, 0x6610, 0x66f6, 0x670a, 0x6785, 0x676c, 0x678e, 0x6792, 0x6776, 0x677b, 0x6798, 0x6786, 0x6784, 0x6774, 0x678d, 0x678c, 0x677a, 0x679f, 0x6791, 0x6799, 0x6783, 0x677d, 0x6781, 0x6778, 0x6779, 0x6794, 0x6b25, 0x6b80, 0x6b7e, 0x6bde, 0x6c1d, 0x6c93, 0x6cec, 0x6ceb, 0x6cee, 0x6cd9, 0x6cb6, 0x6cd4, 0x6cad, 0x6ce7, 0x6cb7, 0x6cd0, 0x6cc2, 0x6cba, 0x6cc3, 0x6cc6, 0x6ced, 0x6cf2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ 63 ] = { 0x6cd2, 0x6cdd, 0x6cb4, 0x6c8a, 0x6c9d, 0x6c80, 0x6cde, 0x6cc0, 0x6d30, 0x6ccd, 0x6cc7, 0x6cb0, 0x6cf9, 0x6ccf, 0x6ce9, 0x6cd1, 0x7094, 0x7098, 0x7085, 0x7093, 0x7086, 0x7084, 0x7091, 0x7096, 0x7082, 0x709a, 0x7083, 0x726a, 0x72d6, 0x72cb, 0x72d8, 0x72c9, 0x72dc, 0x72d2, 0x72d4, 0x72da, 0x72cc, 0x72d1, 0x73a4, 0x73a1, 0x73ad, 0x73a6, 0x73a2, 0x73a0, 0x73ac, 0x739d, 0x74dd, 0x74e8, 0x753f, 0x7540, 0x753e, 0x758c, 0x7598, 0x76af, 0x76f3, 0x76f1, 0x76f0, 0x76f5, 0x77f8, 0x77fc, 0x77f9, 0x77fb, 0x77fa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ 94 ] = { 0x77f7, 0x7942, 0x793f, 0x79c5, 0x7a78, 0x7a7b, 0x7afb, 0x7c75, 0x7cfd, 0x8035, 0x808f, 0x80ae, 0x80a3, 0x80b8, 0x80b5, 0x80ad, 0x8220, 0x82a0, 0x82c0, 0x82ab, 0x829a, 0x8298, 0x829b, 0x82b5, 0x82a7, 0x82ae, 0x82bc, 0x829e, 0x82ba, 0x82b4, 0x82a8, 0x82a1, 0x82a9, 0x82c2, 0x82a4, 0x82c3, 0x82b6, 0x82a2, 0x8670, 0x866f, 0x866d, 0x866e, 0x8c56, 0x8fd2, 0x8fcb, 0x8fd3, 0x8fcd, 0x8fd6, 0x8fd5, 0x8fd7, 0x90b2, 0x90b4, 0x90af, 0x90b3, 0x90b0, 0x9639, 0x963d, 0x963c, 0x963a, 0x9643, 0x4fcd, 0x4fc5, 0x4fd3, 0x4fb2, 0x4fc9, 0x4fcb, 0x4fc1, 0x4fd4, 0x4fdc, 0x4fd9, 0x4fbb, 0x4fb3, 0x4fdb, 0x4fc7, 0x4fd6, 0x4fba, 0x4fc0, 0x4fb9, 0x4fec, 0x5244, 0x5249, 0x52c0, 0x52c2, 0x533d, 0x537c, 0x5397, 0x5396, 0x5399, 0x5398, 0x54ba, 0x54a1, 0x54ad, 0x54a5, 0x54cf }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ 63 ] = { 0x54c3, 0x830d, 0x54b7, 0x54ae, 0x54d6, 0x54b6, 0x54c5, 0x54c6, 0x54a0, 0x5470, 0x54bc, 0x54a2, 0x54be, 0x5472, 0x54de, 0x54b0, 0x57b5, 0x579e, 0x579f, 0x57a4, 0x578c, 0x5797, 0x579d, 0x579b, 0x5794, 0x5798, 0x578f, 0x5799, 0x57a5, 0x579a, 0x5795, 0x58f4, 0x590d, 0x5953, 0x59e1, 0x59de, 0x59ee, 0x5a00, 0x59f1, 0x59dd, 0x59fa, 0x59fd, 0x59fc, 0x59f6, 0x59e4, 0x59f2, 0x59f7, 0x59db, 0x59e9, 0x59f3, 0x59f5, 0x59e0, 0x59fe, 0x59f4, 0x59ed, 0x5ba8, 0x5c4c, 0x5cd0, 0x5cd8, 0x5ccc, 0x5cd7, 0x5ccb, 0x5cdb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ 94 ] = { 0x5cde, 0x5cda, 0x5cc9, 0x5cc7, 0x5cca, 0x5cd6, 0x5cd3, 0x5cd4, 0x5ccf, 0x5cc8, 0x5cc6, 0x5cce, 0x5cdf, 0x5cf8, 0x5df9, 0x5e21, 0x5e22, 0x5e23, 0x5e20, 0x5e24, 0x5eb0, 0x5ea4, 0x5ea2, 0x5e9b, 0x5ea3, 0x5ea5, 0x5f07, 0x5f2e, 0x5f56, 0x5f86, 0x6037, 0x6039, 0x6054, 0x6072, 0x605e, 0x6045, 0x6053, 0x6047, 0x6049, 0x605b, 0x604c, 0x6040, 0x6042, 0x605f, 0x6024, 0x6044, 0x6058, 0x6066, 0x606e, 0x6242, 0x6243, 0x62cf, 0x630d, 0x630b, 0x62f5, 0x630e, 0x6303, 0x62eb, 0x62f9, 0x630f, 0x630c, 0x62f8, 0x62f6, 0x6300, 0x6313, 0x6314, 0x62fa, 0x6315, 0x62fb, 0x62f0, 0x6541, 0x6543, 0x65aa, 0x65bf, 0x6636, 0x6621, 0x6632, 0x6635, 0x661c, 0x6626, 0x6622, 0x6633, 0x662b, 0x663a, 0x661d, 0x6634, 0x6639, 0x662e, 0x670f, 0x6710, 0x67c1, 0x67f2, 0x67c8, 0x67ba }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ 63 ] = { 0x67dc, 0x67bb, 0x67f8, 0x67d8, 0x67c0, 0x67b7, 0x67c5, 0x67eb, 0x67e4, 0x67df, 0x67b5, 0x67cd, 0x67b3, 0x67f7, 0x67f6, 0x67ee, 0x67e3, 0x67c2, 0x67b9, 0x67ce, 0x67e7, 0x67f0, 0x67b2, 0x67fc, 0x67c6, 0x67ed, 0x67cc, 0x67ae, 0x67e6, 0x67db, 0x67fa, 0x67c9, 0x67ca, 0x67c3, 0x67ea, 0x67cb, 0x6b28, 0x6b82, 0x6b84, 0x6bb6, 0x6bd6, 0x6bd8, 0x6be0, 0x6c20, 0x6c21, 0x6d28, 0x6d34, 0x6d2d, 0x6d1f, 0x6d3c, 0x6d3f, 0x6d12, 0x6d0a, 0x6cda, 0x6d33, 0x6d04, 0x6d19, 0x6d3a, 0x6d1a, 0x6d11, 0x6d00, 0x6d1d, 0x6d42 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ 94 ] = { 0x6d01, 0x6d18, 0x6d37, 0x6d03, 0x6d0f, 0x6d40, 0x6d07, 0x6d20, 0x6d2c, 0x6d08, 0x6d22, 0x6d09, 0x6d10, 0x70b7, 0x709f, 0x70be, 0x70b1, 0x70b0, 0x70a1, 0x70b4, 0x70b5, 0x70a9, 0x7241, 0x7249, 0x724a, 0x726c, 0x7270, 0x7273, 0x726e, 0x72ca, 0x72e4, 0x72e8, 0x72eb, 0x72df, 0x72ea, 0x72e6, 0x72e3, 0x7385, 0x73cc, 0x73c2, 0x73c8, 0x73c5, 0x73b9, 0x73b6, 0x73b5, 0x73b4, 0x73eb, 0x73bf, 0x73c7, 0x73be, 0x73c3, 0x73c6, 0x73b8, 0x73cb, 0x74ec, 0x74ee, 0x752e, 0x7547, 0x7548, 0x75a7, 0x75aa, 0x7679, 0x76c4, 0x7708, 0x7703, 0x7704, 0x7705, 0x770a, 0x76f7, 0x76fb, 0x76fa, 0x77e7, 0x77e8, 0x7806, 0x7811, 0x7812, 0x7805, 0x7810, 0x780f, 0x780e, 0x7809, 0x7803, 0x7813, 0x794a, 0x794c, 0x794b, 0x7945, 0x7944, 0x79d5, 0x79cd, 0x79cf, 0x79d6, 0x79ce, 0x7a80 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ 63 ] = { 0x7a7e, 0x7ad1, 0x7b00, 0x7b01, 0x7c7a, 0x7c78, 0x7c79, 0x7c7f, 0x7c80, 0x7c81, 0x7d03, 0x7d08, 0x7d01, 0x7f58, 0x7f91, 0x7f8d, 0x7fbe, 0x8007, 0x800e, 0x800f, 0x8014, 0x8037, 0x80d8, 0x80c7, 0x80e0, 0x80d1, 0x80c8, 0x80c2, 0x80d0, 0x80c5, 0x80e3, 0x80d9, 0x80dc, 0x80ca, 0x80d5, 0x80c9, 0x80cf, 0x80d7, 0x80e6, 0x80cd, 0x81ff, 0x8221, 0x8294, 0x82d9, 0x82fe, 0x82f9, 0x8307, 0x82e8, 0x8300, 0x82d5, 0x833a, 0x82eb, 0x82d6, 0x82f4, 0x82ec, 0x82e1, 0x82f2, 0x82f5, 0x830c, 0x82fb, 0x82f6, 0x82f0, 0x82ea }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ 94 ] = { 0x82e4, 0x82e0, 0x82fa, 0x82f3, 0x82ed, 0x8677, 0x8674, 0x867c, 0x8673, 0x8841, 0x884e, 0x8867, 0x886a, 0x8869, 0x89d3, 0x8a04, 0x8a07, 0x8d72, 0x8fe3, 0x8fe1, 0x8fee, 0x8fe0, 0x90f1, 0x90bd, 0x90bf, 0x90d5, 0x90c5, 0x90be, 0x90c7, 0x90cb, 0x90c8, 0x91d4, 0x91d3, 0x9654, 0x964f, 0x9651, 0x9653, 0x964a, 0x964e, 0x501e, 0x5005, 0x5007, 0x5013, 0x5022, 0x5030, 0x501b, 0x4ff5, 0x4ff4, 0x5033, 0x5037, 0x502c, 0x4ff6, 0x4ff7, 0x5017, 0x501c, 0x5020, 0x5027, 0x5035, 0x502f, 0x5031, 0x500e, 0x515a, 0x5194, 0x5193, 0x51ca, 0x51c4, 0x51c5, 0x51c8, 0x51ce, 0x5261, 0x525a, 0x5252, 0x525e, 0x525f, 0x5255, 0x5262, 0x52cd, 0x530e, 0x539e, 0x5526, 0x54e2, 0x5517, 0x5512, 0x54e7, 0x54f3, 0x54e4, 0x551a, 0x54ff, 0x5504, 0x5508, 0x54eb, 0x5511, 0x5505, 0x54f1 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ 63 ] = { 0x550a, 0x54fb, 0x54f7, 0x54f8, 0x54e0, 0x550e, 0x5503, 0x550b, 0x5701, 0x5702, 0x57cc, 0x5832, 0x57d5, 0x57d2, 0x57ba, 0x57c6, 0x57bd, 0x57bc, 0x57b8, 0x57b6, 0x57bf, 0x57c7, 0x57d0, 0x57b9, 0x57c1, 0x590e, 0x594a, 0x5a19, 0x5a16, 0x5a2d, 0x5a2e, 0x5a15, 0x5a0f, 0x5a17, 0x5a0a, 0x5a1e, 0x5a33, 0x5b6c, 0x5ba7, 0x5bad, 0x5bac, 0x5c03, 0x5c56, 0x5c54, 0x5cec, 0x5cff, 0x5cee, 0x5cf1, 0x5cf7, 0x5d00, 0x5cf9, 0x5e29, 0x5e28, 0x5ea8, 0x5eae, 0x5eaa, 0x5eac, 0x5f33, 0x5f30, 0x5f67, 0x605d, 0x605a, 0x6067 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ 94 ] = { 0x6041, 0x60a2, 0x6088, 0x6080, 0x6092, 0x6081, 0x609d, 0x6083, 0x6095, 0x609b, 0x6097, 0x6087, 0x609c, 0x608e, 0x6219, 0x6246, 0x62f2, 0x6310, 0x6356, 0x632c, 0x6344, 0x6345, 0x6336, 0x6343, 0x63e4, 0x6339, 0x634b, 0x634a, 0x633c, 0x6329, 0x6341, 0x6334, 0x6358, 0x6354, 0x6359, 0x632d, 0x6347, 0x6333, 0x635a, 0x6351, 0x6338, 0x6357, 0x6340, 0x6348, 0x654a, 0x6546, 0x65c6, 0x65c3, 0x65c4, 0x65c2, 0x664a, 0x665f, 0x6647, 0x6651, 0x6712, 0x6713, 0x681f, 0x681a, 0x6849, 0x6832, 0x6833, 0x683b, 0x684b, 0x684f, 0x6816, 0x6831, 0x681c, 0x6835, 0x682b, 0x682d, 0x682f, 0x684e, 0x6844, 0x6834, 0x681d, 0x6812, 0x6814, 0x6826, 0x6828, 0x682e, 0x684d, 0x683a, 0x6825, 0x6820, 0x6b2c, 0x6b2f, 0x6b2d, 0x6b31, 0x6b34, 0x6b6d, 0x8082, 0x6b88, 0x6be6, 0x6be4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ 63 ] = { 0x6be8, 0x6be3, 0x6be2, 0x6be7, 0x6c25, 0x6d7a, 0x6d63, 0x6d64, 0x6d76, 0x6d0d, 0x6d61, 0x6d92, 0x6d58, 0x6d62, 0x6d6d, 0x6d6f, 0x6d91, 0x6d8d, 0x6def, 0x6d7f, 0x6d86, 0x6d5e, 0x6d67, 0x6d60, 0x6d97, 0x6d70, 0x6d7c, 0x6d5f, 0x6d82, 0x6d98, 0x6d2f, 0x6d68, 0x6d8b, 0x6d7e, 0x6d80, 0x6d84, 0x6d16, 0x6d83, 0x6d7b, 0x6d7d, 0x6d75, 0x6d90, 0x70dc, 0x70d3, 0x70d1, 0x70dd, 0x70cb, 0x7f39, 0x70e2, 0x70d7, 0x70d2, 0x70de, 0x70e0, 0x70d4, 0x70cd, 0x70c5, 0x70c6, 0x70c7, 0x70da, 0x70ce, 0x70e1, 0x7242, 0x7278 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ 94 ] = { 0x7277, 0x7276, 0x7300, 0x72fa, 0x72f4, 0x72fe, 0x72f6, 0x72f3, 0x72fb, 0x7301, 0x73d3, 0x73d9, 0x73e5, 0x73d6, 0x73bc, 0x73e7, 0x73e3, 0x73e9, 0x73dc, 0x73d2, 0x73db, 0x73d4, 0x73dd, 0x73da, 0x73d7, 0x73d8, 0x73e8, 0x74de, 0x74df, 0x74f4, 0x74f5, 0x7521, 0x755b, 0x755f, 0x75b0, 0x75c1, 0x75bb, 0x75c4, 0x75c0, 0x75bf, 0x75b6, 0x75ba, 0x768a, 0x76c9, 0x771d, 0x771b, 0x7710, 0x7713, 0x7712, 0x7723, 0x7711, 0x7715, 0x7719, 0x771a, 0x7722, 0x7727, 0x7823, 0x782c, 0x7822, 0x7835, 0x782f, 0x7828, 0x782e, 0x782b, 0x7821, 0x7829, 0x7833, 0x782a, 0x7831, 0x7954, 0x795b, 0x794f, 0x795c, 0x7953, 0x7952, 0x7951, 0x79eb, 0x79ec, 0x79e0, 0x79ee, 0x79ed, 0x79ea, 0x79dc, 0x79de, 0x79dd, 0x7a86, 0x7a89, 0x7a85, 0x7a8b, 0x7a8c, 0x7a8a, 0x7a87, 0x7ad8, 0x7b10 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ 63 ] = { 0x7b04, 0x7b13, 0x7b05, 0x7b0f, 0x7b08, 0x7b0a, 0x7b0e, 0x7b09, 0x7b12, 0x7c84, 0x7c91, 0x7c8a, 0x7c8c, 0x7c88, 0x7c8d, 0x7c85, 0x7d1e, 0x7d1d, 0x7d11, 0x7d0e, 0x7d18, 0x7d16, 0x7d13, 0x7d1f, 0x7d12, 0x7d0f, 0x7d0c, 0x7f5c, 0x7f61, 0x7f5e, 0x7f60, 0x7f5d, 0x7f5b, 0x7f96, 0x7f92, 0x7fc3, 0x7fc2, 0x7fc0, 0x8016, 0x803e, 0x8039, 0x80fa, 0x80f2, 0x80f9, 0x80f5, 0x8101, 0x80fb, 0x8100, 0x8201, 0x822f, 0x8225, 0x8333, 0x832d, 0x8344, 0x8319, 0x8351, 0x8325, 0x8356, 0x833f, 0x8341, 0x8326, 0x831c, 0x8322 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ 94 ] = { 0x8342, 0x834e, 0x831b, 0x832a, 0x8308, 0x833c, 0x834d, 0x8316, 0x8324, 0x8320, 0x8337, 0x832f, 0x8329, 0x8347, 0x8345, 0x834c, 0x8353, 0x831e, 0x832c, 0x834b, 0x8327, 0x8348, 0x8653, 0x8652, 0x86a2, 0x86a8, 0x8696, 0x868d, 0x8691, 0x869e, 0x8687, 0x8697, 0x8686, 0x868b, 0x869a, 0x8685, 0x86a5, 0x8699, 0x86a1, 0x86a7, 0x8695, 0x8698, 0x868e, 0x869d, 0x8690, 0x8694, 0x8843, 0x8844, 0x886d, 0x8875, 0x8876, 0x8872, 0x8880, 0x8871, 0x887f, 0x886f, 0x8883, 0x887e, 0x8874, 0x887c, 0x8a12, 0x8c47, 0x8c57, 0x8c7b, 0x8ca4, 0x8ca3, 0x8d76, 0x8d78, 0x8db5, 0x8db7, 0x8db6, 0x8ed1, 0x8ed3, 0x8ffe, 0x8ff5, 0x9002, 0x8fff, 0x8ffb, 0x9004, 0x8ffc, 0x8ff6, 0x90d6, 0x90e0, 0x90d9, 0x90da, 0x90e3, 0x90df, 0x90e5, 0x90d8, 0x90db, 0x90d7, 0x90dc, 0x90e4, 0x9150 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ 63 ] = { 0x914e, 0x914f, 0x91d5, 0x91e2, 0x91da, 0x965c, 0x965f, 0x96bc, 0x98e3, 0x9adf, 0x9b2f, 0x4e7f, 0x5070, 0x506a, 0x5061, 0x505e, 0x5060, 0x5053, 0x504b, 0x505d, 0x5072, 0x5048, 0x504d, 0x5041, 0x505b, 0x504a, 0x5062, 0x5015, 0x5045, 0x505f, 0x5069, 0x506b, 0x5063, 0x5064, 0x5046, 0x5040, 0x506e, 0x5073, 0x5057, 0x5051, 0x51d0, 0x526b, 0x526d, 0x526c, 0x526e, 0x52d6, 0x52d3, 0x532d, 0x539c, 0x5575, 0x5576, 0x553c, 0x554d, 0x5550, 0x5534, 0x552a, 0x5551, 0x5562, 0x5536, 0x5535, 0x5530, 0x5552, 0x5545 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ 94 ] = { 0x550c, 0x5532, 0x5565, 0x554e, 0x5539, 0x5548, 0x552d, 0x553b, 0x5540, 0x554b, 0x570a, 0x5707, 0x57fb, 0x5814, 0x57e2, 0x57f6, 0x57dc, 0x57f4, 0x5800, 0x57ed, 0x57fd, 0x5808, 0x57f8, 0x580b, 0x57f3, 0x57cf, 0x5807, 0x57ee, 0x57e3, 0x57f2, 0x57e5, 0x57ec, 0x57e1, 0x580e, 0x57fc, 0x5810, 0x57e7, 0x5801, 0x580c, 0x57f1, 0x57e9, 0x57f0, 0x580d, 0x5804, 0x595c, 0x5a60, 0x5a58, 0x5a55, 0x5a67, 0x5a5e, 0x5a38, 0x5a35, 0x5a6d, 0x5a50, 0x5a5f, 0x5a65, 0x5a6c, 0x5a53, 0x5a64, 0x5a57, 0x5a43, 0x5a5d, 0x5a52, 0x5a44, 0x5a5b, 0x5a48, 0x5a8e, 0x5a3e, 0x5a4d, 0x5a39, 0x5a4c, 0x5a70, 0x5a69, 0x5a47, 0x5a51, 0x5a56, 0x5a42, 0x5a5c, 0x5b72, 0x5b6e, 0x5bc1, 0x5bc0, 0x5c59, 0x5d1e, 0x5d0b, 0x5d1d, 0x5d1a, 0x5d20, 0x5d0c, 0x5d28, 0x5d0d, 0x5d26, 0x5d25, 0x5d0f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ 63 ] = { 0x5d30, 0x5d12, 0x5d23, 0x5d1f, 0x5d2e, 0x5e3e, 0x5e34, 0x5eb1, 0x5eb4, 0x5eb9, 0x5eb2, 0x5eb3, 0x5f36, 0x5f38, 0x5f9b, 0x5f96, 0x5f9f, 0x608a, 0x6090, 0x6086, 0x60be, 0x60b0, 0x60ba, 0x60d3, 0x60d4, 0x60cf, 0x60e4, 0x60d9, 0x60dd, 0x60c8, 0x60b1, 0x60db, 0x60b7, 0x60ca, 0x60bf, 0x60c3, 0x60cd, 0x60c0, 0x6332, 0x6365, 0x638a, 0x6382, 0x637d, 0x63bd, 0x639e, 0x63ad, 0x639d, 0x6397, 0x63ab, 0x638e, 0x636f, 0x6387, 0x6390, 0x636e, 0x63af, 0x6375, 0x639c, 0x636d, 0x63ae, 0x637c, 0x63a4, 0x633b, 0x639f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ 94 ] = { 0x6378, 0x6385, 0x6381, 0x6391, 0x638d, 0x6370, 0x6553, 0x65cd, 0x6665, 0x6661, 0x665b, 0x6659, 0x665c, 0x6662, 0x6718, 0x6879, 0x6887, 0x6890, 0x689c, 0x686d, 0x686e, 0x68ae, 0x68ab, 0x6956, 0x686f, 0x68a3, 0x68ac, 0x68a9, 0x6875, 0x6874, 0x68b2, 0x688f, 0x6877, 0x6892, 0x687c, 0x686b, 0x6872, 0x68aa, 0x6880, 0x6871, 0x687e, 0x689b, 0x6896, 0x688b, 0x68a0, 0x6889, 0x68a4, 0x6878, 0x687b, 0x6891, 0x688c, 0x688a, 0x687d, 0x6b36, 0x6b33, 0x6b37, 0x6b38, 0x6b91, 0x6b8f, 0x6b8d, 0x6b8e, 0x6b8c, 0x6c2a, 0x6dc0, 0x6dab, 0x6db4, 0x6db3, 0x6e74, 0x6dac, 0x6de9, 0x6de2, 0x6db7, 0x6df6, 0x6dd4, 0x6e00, 0x6dc8, 0x6de0, 0x6ddf, 0x6dd6, 0x6dbe, 0x6de5, 0x6ddc, 0x6ddd, 0x6ddb, 0x6df4, 0x6dca, 0x6dbd, 0x6ded, 0x6df0, 0x6dba, 0x6dd5, 0x6dc2, 0x6dcf, 0x6dc9 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ 63 ] = { 0x6dd0, 0x6df2, 0x6dd3, 0x6dfd, 0x6dd7, 0x6dcd, 0x6de3, 0x6dbb, 0x70fa, 0x710d, 0x70f7, 0x7117, 0x70f4, 0x710c, 0x70f0, 0x7104, 0x70f3, 0x7110, 0x70fc, 0x70ff, 0x7106, 0x7113, 0x7100, 0x70f8, 0x70f6, 0x710b, 0x7102, 0x710e, 0x727e, 0x727b, 0x727c, 0x727f, 0x731d, 0x7317, 0x7307, 0x7311, 0x7318, 0x730a, 0x7308, 0x72ff, 0x730f, 0x731e, 0x7388, 0x73f6, 0x73f8, 0x73f5, 0x7404, 0x7401, 0x73fd, 0x7407, 0x7400, 0x73fa, 0x73fc, 0x73ff, 0x740c, 0x740b, 0x73f4, 0x7408, 0x7564, 0x7563, 0x75ce, 0x75d2, 0x75cf }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ 94 ] = { 0x75cb, 0x75cc, 0x75d1, 0x75d0, 0x768f, 0x7689, 0x76d3, 0x7739, 0x772f, 0x772d, 0x7731, 0x7732, 0x7734, 0x7733, 0x773d, 0x7725, 0x773b, 0x7735, 0x7848, 0x7852, 0x7849, 0x784d, 0x784a, 0x784c, 0x7826, 0x7845, 0x7850, 0x7964, 0x7967, 0x7969, 0x796a, 0x7963, 0x796b, 0x7961, 0x79bb, 0x79fa, 0x79f8, 0x79f6, 0x79f7, 0x7a8f, 0x7a94, 0x7a90, 0x7b35, 0x7b47, 0x7b34, 0x7b25, 0x7b30, 0x7b22, 0x7b24, 0x7b33, 0x7b18, 0x7b2a, 0x7b1d, 0x7b31, 0x7b2b, 0x7b2d, 0x7b2f, 0x7b32, 0x7b38, 0x7b1a, 0x7b23, 0x7c94, 0x7c98, 0x7c96, 0x7ca3, 0x7d35, 0x7d3d, 0x7d38, 0x7d36, 0x7d3a, 0x7d45, 0x7d2c, 0x7d29, 0x7d41, 0x7d47, 0x7d3e, 0x7d3f, 0x7d4a, 0x7d3b, 0x7d28, 0x7f63, 0x7f95, 0x7f9c, 0x7f9d, 0x7f9b, 0x7fca, 0x7fcb, 0x7fcd, 0x7fd0, 0x7fd1, 0x7fc7, 0x7fcf, 0x7fc9, 0x801f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ 63 ] = { 0x801e, 0x801b, 0x8047, 0x8043, 0x8048, 0x8118, 0x8125, 0x8119, 0x811b, 0x812d, 0x811f, 0x812c, 0x811e, 0x8121, 0x8115, 0x8127, 0x811d, 0x8122, 0x8211, 0x8238, 0x8233, 0x823a, 0x8234, 0x8232, 0x8274, 0x8390, 0x83a3, 0x83a8, 0x838d, 0x837a, 0x8373, 0x83a4, 0x8374, 0x838f, 0x8381, 0x8395, 0x8399, 0x8375, 0x8394, 0x83a9, 0x837d, 0x8383, 0x838c, 0x839d, 0x839b, 0x83aa, 0x838b, 0x837e, 0x83a5, 0x83af, 0x8388, 0x8397, 0x83b0, 0x837f, 0x83a6, 0x8387, 0x83ae, 0x8376, 0x839a, 0x8659, 0x8656, 0x86bf, 0x86b7 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ 94 ] = { 0x86c2, 0x86c1, 0x86c5, 0x86ba, 0x86b0, 0x86c8, 0x86b9, 0x86b3, 0x86b8, 0x86cc, 0x86b4, 0x86bb, 0x86bc, 0x86c3, 0x86bd, 0x86be, 0x8852, 0x8889, 0x8895, 0x88a8, 0x88a2, 0x88aa, 0x889a, 0x8891, 0x88a1, 0x889f, 0x8898, 0x88a7, 0x8899, 0x889b, 0x8897, 0x88a4, 0x88ac, 0x888c, 0x8893, 0x888e, 0x8982, 0x89d6, 0x89d9, 0x89d5, 0x8a30, 0x8a27, 0x8a2c, 0x8a1e, 0x8c39, 0x8c3b, 0x8c5c, 0x8c5d, 0x8c7d, 0x8ca5, 0x8d7d, 0x8d7b, 0x8d79, 0x8dbc, 0x8dc2, 0x8db9, 0x8dbf, 0x8dc1, 0x8ed8, 0x8ede, 0x8edd, 0x8edc, 0x8ed7, 0x8ee0, 0x8ee1, 0x9024, 0x900b, 0x9011, 0x901c, 0x900c, 0x9021, 0x90ef, 0x90ea, 0x90f0, 0x90f4, 0x90f2, 0x90f3, 0x90d4, 0x90eb, 0x90ec, 0x90e9, 0x9156, 0x9158, 0x915a, 0x9153, 0x9155, 0x91ec, 0x91f4, 0x91f1, 0x91f3, 0x91f8, 0x91e4, 0x91f9, 0x91ea }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ 63 ] = { 0x91eb, 0x91f7, 0x91e8, 0x91ee, 0x957a, 0x9586, 0x9588, 0x967c, 0x966d, 0x966b, 0x9671, 0x966f, 0x96bf, 0x976a, 0x9804, 0x98e5, 0x9997, 0x509b, 0x5095, 0x5094, 0x509e, 0x508b, 0x50a3, 0x5083, 0x508c, 0x508e, 0x509d, 0x5068, 0x509c, 0x5092, 0x5082, 0x5087, 0x515f, 0x51d4, 0x5312, 0x5311, 0x53a4, 0x53a7, 0x5591, 0x55a8, 0x55a5, 0x55ad, 0x5577, 0x5645, 0x55a2, 0x5593, 0x5588, 0x558f, 0x55b5, 0x5581, 0x55a3, 0x5592, 0x55a4, 0x557d, 0x558c, 0x55a6, 0x557f, 0x5595, 0x55a1, 0x558e, 0x570c, 0x5829, 0x5837 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ 94 ] = { 0x5819, 0x581e, 0x5827, 0x5823, 0x5828, 0x57f5, 0x5848, 0x5825, 0x581c, 0x581b, 0x5833, 0x583f, 0x5836, 0x582e, 0x5839, 0x5838, 0x582d, 0x582c, 0x583b, 0x5961, 0x5aaf, 0x5a94, 0x5a9f, 0x5a7a, 0x5aa2, 0x5a9e, 0x5a78, 0x5aa6, 0x5a7c, 0x5aa5, 0x5aac, 0x5a95, 0x5aae, 0x5a37, 0x5a84, 0x5a8a, 0x5a97, 0x5a83, 0x5a8b, 0x5aa9, 0x5a7b, 0x5a7d, 0x5a8c, 0x5a9c, 0x5a8f, 0x5a93, 0x5a9d, 0x5bea, 0x5bcd, 0x5bcb, 0x5bd4, 0x5bd1, 0x5bca, 0x5bce, 0x5c0c, 0x5c30, 0x5d37, 0x5d43, 0x5d6b, 0x5d41, 0x5d4b, 0x5d3f, 0x5d35, 0x5d51, 0x5d4e, 0x5d55, 0x5d33, 0x5d3a, 0x5d52, 0x5d3d, 0x5d31, 0x5d59, 0x5d42, 0x5d39, 0x5d49, 0x5d38, 0x5d3c, 0x5d32, 0x5d36, 0x5d40, 0x5d45, 0x5e44, 0x5e41, 0x5f58, 0x5fa6, 0x5fa5, 0x5fab, 0x60c9, 0x60b9, 0x60cc, 0x60e2, 0x60ce, 0x60c4, 0x6114 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ 63 ] = { 0x60f2, 0x610a, 0x6116, 0x6105, 0x60f5, 0x6113, 0x60f8, 0x60fc, 0x60fe, 0x60c1, 0x6103, 0x6118, 0x611d, 0x6110, 0x60ff, 0x6104, 0x610b, 0x624a, 0x6394, 0x63b1, 0x63b0, 0x63ce, 0x63e5, 0x63e8, 0x63ef, 0x63c3, 0x649d, 0x63f3, 0x63ca, 0x63e0, 0x63f6, 0x63d5, 0x63f2, 0x63f5, 0x6461, 0x63df, 0x63be, 0x63dd, 0x63dc, 0x63c4, 0x63d8, 0x63d3, 0x63c2, 0x63c7, 0x63cc, 0x63cb, 0x63c8, 0x63f0, 0x63d7, 0x63d9, 0x6532, 0x6567, 0x656a, 0x6564, 0x655c, 0x6568, 0x6565, 0x658c, 0x659d, 0x659e, 0x65ae, 0x65d0, 0x65d2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ 94 ] = { 0x667c, 0x666c, 0x667b, 0x6680, 0x6671, 0x6679, 0x666a, 0x6672, 0x6701, 0x690c, 0x68d3, 0x6904, 0x68dc, 0x692a, 0x68ec, 0x68ea, 0x68f1, 0x690f, 0x68d6, 0x68f7, 0x68eb, 0x68e4, 0x68f6, 0x6913, 0x6910, 0x68f3, 0x68e1, 0x6907, 0x68cc, 0x6908, 0x6970, 0x68b4, 0x6911, 0x68ef, 0x68c6, 0x6914, 0x68f8, 0x68d0, 0x68fd, 0x68fc, 0x68e8, 0x690b, 0x690a, 0x6917, 0x68ce, 0x68c8, 0x68dd, 0x68de, 0x68e6, 0x68f4, 0x68d1, 0x6906, 0x68d4, 0x68e9, 0x6915, 0x6925, 0x68c7, 0x6b39, 0x6b3b, 0x6b3f, 0x6b3c, 0x6b94, 0x6b97, 0x6b99, 0x6b95, 0x6bbd, 0x6bf0, 0x6bf2, 0x6bf3, 0x6c30, 0x6dfc, 0x6e46, 0x6e47, 0x6e1f, 0x6e49, 0x6e88, 0x6e3c, 0x6e3d, 0x6e45, 0x6e62, 0x6e2b, 0x6e3f, 0x6e41, 0x6e5d, 0x6e73, 0x6e1c, 0x6e33, 0x6e4b, 0x6e40, 0x6e51, 0x6e3b, 0x6e03, 0x6e2e, 0x6e5e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ 63 ] = { 0x6e68, 0x6e5c, 0x6e61, 0x6e31, 0x6e28, 0x6e60, 0x6e71, 0x6e6b, 0x6e39, 0x6e22, 0x6e30, 0x6e53, 0x6e65, 0x6e27, 0x6e78, 0x6e64, 0x6e77, 0x6e55, 0x6e79, 0x6e52, 0x6e66, 0x6e35, 0x6e36, 0x6e5a, 0x7120, 0x711e, 0x712f, 0x70fb, 0x712e, 0x7131, 0x7123, 0x7125, 0x7122, 0x7132, 0x711f, 0x7128, 0x713a, 0x711b, 0x724b, 0x725a, 0x7288, 0x7289, 0x7286, 0x7285, 0x728b, 0x7312, 0x730b, 0x7330, 0x7322, 0x7331, 0x7333, 0x7327, 0x7332, 0x732d, 0x7326, 0x7323, 0x7335, 0x730c, 0x742e, 0x742c, 0x7430, 0x742b, 0x7416 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ 94 ] = { 0x741a, 0x7421, 0x742d, 0x7431, 0x7424, 0x7423, 0x741d, 0x7429, 0x7420, 0x7432, 0x74fb, 0x752f, 0x756f, 0x756c, 0x75e7, 0x75da, 0x75e1, 0x75e6, 0x75dd, 0x75df, 0x75e4, 0x75d7, 0x7695, 0x7692, 0x76da, 0x7746, 0x7747, 0x7744, 0x774d, 0x7745, 0x774a, 0x774e, 0x774b, 0x774c, 0x77de, 0x77ec, 0x7860, 0x7864, 0x7865, 0x785c, 0x786d, 0x7871, 0x786a, 0x786e, 0x7870, 0x7869, 0x7868, 0x785e, 0x7862, 0x7974, 0x7973, 0x7972, 0x7970, 0x7a02, 0x7a0a, 0x7a03, 0x7a0c, 0x7a04, 0x7a99, 0x7ae6, 0x7ae4, 0x7b4a, 0x7b3b, 0x7b44, 0x7b48, 0x7b4c, 0x7b4e, 0x7b40, 0x7b58, 0x7b45, 0x7ca2, 0x7c9e, 0x7ca8, 0x7ca1, 0x7d58, 0x7d6f, 0x7d63, 0x7d53, 0x7d56, 0x7d67, 0x7d6a, 0x7d4f, 0x7d6d, 0x7d5c, 0x7d6b, 0x7d52, 0x7d54, 0x7d69, 0x7d51, 0x7d5f, 0x7d4e, 0x7f3e, 0x7f3f, 0x7f65 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ 63 ] = { 0x7f66, 0x7fa2, 0x7fa0, 0x7fa1, 0x7fd7, 0x8051, 0x804f, 0x8050, 0x80fe, 0x80d4, 0x8143, 0x814a, 0x8152, 0x814f, 0x8147, 0x813d, 0x814d, 0x813a, 0x81e6, 0x81ee, 0x81f7, 0x81f8, 0x81f9, 0x8204, 0x823c, 0x823d, 0x823f, 0x8275, 0x833b, 0x83cf, 0x83f9, 0x8423, 0x83c0, 0x83e8, 0x8412, 0x83e7, 0x83e4, 0x83fc, 0x83f6, 0x8410, 0x83c6, 0x83c8, 0x83eb, 0x83e3, 0x83bf, 0x8401, 0x83dd, 0x83e5, 0x83d8, 0x83ff, 0x83e1, 0x83cb, 0x83ce, 0x83d6, 0x83f5, 0x83c9, 0x8409, 0x840f, 0x83de, 0x8411, 0x8406, 0x83c2, 0x83f3 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ 94 ] = { 0x83d5, 0x83fa, 0x83c7, 0x83d1, 0x83ea, 0x8413, 0x83c3, 0x83ec, 0x83ee, 0x83c4, 0x83fb, 0x83d7, 0x83e2, 0x841b, 0x83db, 0x83fe, 0x86d8, 0x86e2, 0x86e6, 0x86d3, 0x86e3, 0x86da, 0x86ea, 0x86dd, 0x86eb, 0x86dc, 0x86ec, 0x86e9, 0x86d7, 0x86e8, 0x86d1, 0x8848, 0x8856, 0x8855, 0x88ba, 0x88d7, 0x88b9, 0x88b8, 0x88c0, 0x88be, 0x88b6, 0x88bc, 0x88b7, 0x88bd, 0x88b2, 0x8901, 0x88c9, 0x8995, 0x8998, 0x8997, 0x89dd, 0x89da, 0x89db, 0x8a4e, 0x8a4d, 0x8a39, 0x8a59, 0x8a40, 0x8a57, 0x8a58, 0x8a44, 0x8a45, 0x8a52, 0x8a48, 0x8a51, 0x8a4a, 0x8a4c, 0x8a4f, 0x8c5f, 0x8c81, 0x8c80, 0x8cba, 0x8cbe, 0x8cb0, 0x8cb9, 0x8cb5, 0x8d84, 0x8d80, 0x8d89, 0x8dd8, 0x8dd3, 0x8dcd, 0x8dc7, 0x8dd6, 0x8ddc, 0x8dcf, 0x8dd5, 0x8dd9, 0x8dc8, 0x8dd7, 0x8dc5, 0x8eef, 0x8ef7, 0x8efa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ 63 ] = { 0x8ef9, 0x8ee6, 0x8eee, 0x8ee5, 0x8ef5, 0x8ee7, 0x8ee8, 0x8ef6, 0x8eeb, 0x8ef1, 0x8eec, 0x8ef4, 0x8ee9, 0x902d, 0x9034, 0x902f, 0x9106, 0x912c, 0x9104, 0x90ff, 0x90fc, 0x9108, 0x90f9, 0x90fb, 0x9101, 0x9100, 0x9107, 0x9105, 0x9103, 0x9161, 0x9164, 0x915f, 0x9162, 0x9160, 0x9201, 0x920a, 0x9225, 0x9203, 0x921a, 0x9226, 0x920f, 0x920c, 0x9200, 0x9212, 0x91ff, 0x91fd, 0x9206, 0x9204, 0x9227, 0x9202, 0x921c, 0x9224, 0x9219, 0x9217, 0x9205, 0x9216, 0x957b, 0x958d, 0x958c, 0x9590, 0x9687, 0x967e, 0x9688 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ 94 ] = { 0x9689, 0x9683, 0x9680, 0x96c2, 0x96c8, 0x96c3, 0x96f1, 0x96f0, 0x976c, 0x9770, 0x976e, 0x9807, 0x98a9, 0x98eb, 0x9ce6, 0x9ef9, 0x4e83, 0x4e84, 0x4eb6, 0x50bd, 0x50bf, 0x50c6, 0x50ae, 0x50c4, 0x50ca, 0x50b4, 0x50c8, 0x50c2, 0x50b0, 0x50c1, 0x50ba, 0x50b1, 0x50cb, 0x50c9, 0x50b6, 0x50b8, 0x51d7, 0x527a, 0x5278, 0x527b, 0x527c, 0x55c3, 0x55db, 0x55cc, 0x55d0, 0x55cb, 0x55ca, 0x55dd, 0x55c0, 0x55d4, 0x55c4, 0x55e9, 0x55bf, 0x55d2, 0x558d, 0x55cf, 0x55d5, 0x55e2, 0x55d6, 0x55c8, 0x55f2, 0x55cd, 0x55d9, 0x55c2, 0x5714, 0x5853, 0x5868, 0x5864, 0x584f, 0x584d, 0x5849, 0x586f, 0x5855, 0x584e, 0x585d, 0x5859, 0x5865, 0x585b, 0x583d, 0x5863, 0x5871, 0x58fc, 0x5ac7, 0x5ac4, 0x5acb, 0x5aba, 0x5ab8, 0x5ab1, 0x5ab5, 0x5ab0, 0x5abf, 0x5ac8, 0x5abb, 0x5ac6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ 63 ] = { 0x5ab7, 0x5ac0, 0x5aca, 0x5ab4, 0x5ab6, 0x5acd, 0x5ab9, 0x5a90, 0x5bd6, 0x5bd8, 0x5bd9, 0x5c1f, 0x5c33, 0x5d71, 0x5d63, 0x5d4a, 0x5d65, 0x5d72, 0x5d6c, 0x5d5e, 0x5d68, 0x5d67, 0x5d62, 0x5df0, 0x5e4f, 0x5e4e, 0x5e4a, 0x5e4d, 0x5e4b, 0x5ec5, 0x5ecc, 0x5ec6, 0x5ecb, 0x5ec7, 0x5f40, 0x5faf, 0x5fad, 0x60f7, 0x6149, 0x614a, 0x612b, 0x6145, 0x6136, 0x6132, 0x612e, 0x6146, 0x612f, 0x614f, 0x6129, 0x6140, 0x6220, 0x9168, 0x6223, 0x6225, 0x6224, 0x63c5, 0x63f1, 0x63eb, 0x6410, 0x6412, 0x6409, 0x6420, 0x6424 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ 94 ] = { 0x6433, 0x6443, 0x641f, 0x6415, 0x6418, 0x6439, 0x6437, 0x6422, 0x6423, 0x640c, 0x6426, 0x6430, 0x6428, 0x6441, 0x6435, 0x642f, 0x640a, 0x641a, 0x6440, 0x6425, 0x6427, 0x640b, 0x63e7, 0x641b, 0x642e, 0x6421, 0x640e, 0x656f, 0x6592, 0x65d3, 0x6686, 0x668c, 0x6695, 0x6690, 0x668b, 0x668a, 0x6699, 0x6694, 0x6678, 0x6720, 0x6966, 0x695f, 0x6938, 0x694e, 0x6962, 0x6971, 0x693f, 0x6945, 0x696a, 0x6939, 0x6942, 0x6957, 0x6959, 0x697a, 0x6948, 0x6949, 0x6935, 0x696c, 0x6933, 0x693d, 0x6965, 0x68f0, 0x6978, 0x6934, 0x6969, 0x6940, 0x696f, 0x6944, 0x6976, 0x6958, 0x6941, 0x6974, 0x694c, 0x693b, 0x694b, 0x6937, 0x695c, 0x694f, 0x6951, 0x6932, 0x6952, 0x692f, 0x697b, 0x693c, 0x6b46, 0x6b45, 0x6b43, 0x6b42, 0x6b48, 0x6b41, 0x6b9b, 0xfa0d, 0x6bfb, 0x6bfc }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ 63 ] = { 0x6bf9, 0x6bf7, 0x6bf8, 0x6e9b, 0x6ed6, 0x6ec8, 0x6e8f, 0x6ec0, 0x6e9f, 0x6e93, 0x6e94, 0x6ea0, 0x6eb1, 0x6eb9, 0x6ec6, 0x6ed2, 0x6ebd, 0x6ec1, 0x6e9e, 0x6ec9, 0x6eb7, 0x6eb0, 0x6ecd, 0x6ea6, 0x6ecf, 0x6eb2, 0x6ebe, 0x6ec3, 0x6edc, 0x6ed8, 0x6e99, 0x6e92, 0x6e8e, 0x6e8d, 0x6ea4, 0x6ea1, 0x6ebf, 0x6eb3, 0x6ed0, 0x6eca, 0x6e97, 0x6eae, 0x6ea3, 0x7147, 0x7154, 0x7152, 0x7163, 0x7160, 0x7141, 0x715d, 0x7162, 0x7172, 0x7178, 0x716a, 0x7161, 0x7142, 0x7158, 0x7143, 0x714b, 0x7170, 0x715f, 0x7150, 0x7153 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ 94 ] = { 0x7144, 0x714d, 0x715a, 0x724f, 0x728d, 0x728c, 0x7291, 0x7290, 0x728e, 0x733c, 0x7342, 0x733b, 0x733a, 0x7340, 0x734a, 0x7349, 0x7444, 0x744a, 0x744b, 0x7452, 0x7451, 0x7457, 0x7440, 0x744f, 0x7450, 0x744e, 0x7442, 0x7446, 0x744d, 0x7454, 0x74e1, 0x74ff, 0x74fe, 0x74fd, 0x751d, 0x7579, 0x7577, 0x6983, 0x75ef, 0x760f, 0x7603, 0x75f7, 0x75fe, 0x75fc, 0x75f9, 0x75f8, 0x7610, 0x75fb, 0x75f6, 0x75ed, 0x75f5, 0x75fd, 0x7699, 0x76b5, 0x76dd, 0x7755, 0x775f, 0x7760, 0x7752, 0x7756, 0x775a, 0x7769, 0x7767, 0x7754, 0x7759, 0x776d, 0x77e0, 0x7887, 0x789a, 0x7894, 0x788f, 0x7884, 0x7895, 0x7885, 0x7886, 0x78a1, 0x7883, 0x7879, 0x7899, 0x7880, 0x7896, 0x787b, 0x797c, 0x7982, 0x797d, 0x7979, 0x7a11, 0x7a18, 0x7a19, 0x7a12, 0x7a17, 0x7a15, 0x7a22, 0x7a13 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ 63 ] = { 0x7a1b, 0x7a10, 0x7aa3, 0x7aa2, 0x7a9e, 0x7aeb, 0x7b66, 0x7b64, 0x7b6d, 0x7b74, 0x7b69, 0x7b72, 0x7b65, 0x7b73, 0x7b71, 0x7b70, 0x7b61, 0x7b78, 0x7b76, 0x7b63, 0x7cb2, 0x7cb4, 0x7caf, 0x7d88, 0x7d86, 0x7d80, 0x7d8d, 0x7d7f, 0x7d85, 0x7d7a, 0x7d8e, 0x7d7b, 0x7d83, 0x7d7c, 0x7d8c, 0x7d94, 0x7d84, 0x7d7d, 0x7d92, 0x7f6d, 0x7f6b, 0x7f67, 0x7f68, 0x7f6c, 0x7fa6, 0x7fa5, 0x7fa7, 0x7fdb, 0x7fdc, 0x8021, 0x8164, 0x8160, 0x8177, 0x815c, 0x8169, 0x815b, 0x8162, 0x8172, 0x6721, 0x815e, 0x8176, 0x8167, 0x816f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ 94 ] = { 0x8144, 0x8161, 0x821d, 0x8249, 0x8244, 0x8240, 0x8242, 0x8245, 0x84f1, 0x843f, 0x8456, 0x8476, 0x8479, 0x848f, 0x848d, 0x8465, 0x8451, 0x8440, 0x8486, 0x8467, 0x8430, 0x844d, 0x847d, 0x845a, 0x8459, 0x8474, 0x8473, 0x845d, 0x8507, 0x845e, 0x8437, 0x843a, 0x8434, 0x847a, 0x8443, 0x8478, 0x8432, 0x8445, 0x8429, 0x83d9, 0x844b, 0x842f, 0x8442, 0x842d, 0x845f, 0x8470, 0x8439, 0x844e, 0x844c, 0x8452, 0x846f, 0x84c5, 0x848e, 0x843b, 0x8447, 0x8436, 0x8433, 0x8468, 0x847e, 0x8444, 0x842b, 0x8460, 0x8454, 0x846e, 0x8450, 0x870b, 0x8704, 0x86f7, 0x870c, 0x86fa, 0x86d6, 0x86f5, 0x874d, 0x86f8, 0x870e, 0x8709, 0x8701, 0x86f6, 0x870d, 0x8705, 0x88d6, 0x88cb, 0x88cd, 0x88ce, 0x88de, 0x88db, 0x88da, 0x88cc, 0x88d0, 0x8985, 0x899b, 0x89df, 0x89e5, 0x89e4 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ 63 ] = { 0x89e1, 0x89e0, 0x89e2, 0x89dc, 0x89e6, 0x8a76, 0x8a86, 0x8a7f, 0x8a61, 0x8a3f, 0x8a77, 0x8a82, 0x8a84, 0x8a75, 0x8a83, 0x8a81, 0x8a74, 0x8a7a, 0x8c3c, 0x8c4b, 0x8c4a, 0x8c65, 0x8c64, 0x8c66, 0x8c86, 0x8c84, 0x8c85, 0x8ccc, 0x8d68, 0x8d69, 0x8d91, 0x8d8c, 0x8d8e, 0x8d8f, 0x8d8d, 0x8d93, 0x8d94, 0x8d90, 0x8d92, 0x8df0, 0x8de0, 0x8dec, 0x8df1, 0x8dee, 0x8dd0, 0x8de9, 0x8de3, 0x8de2, 0x8de7, 0x8df2, 0x8deb, 0x8df4, 0x8f06, 0x8eff, 0x8f01, 0x8f00, 0x8f05, 0x8f07, 0x8f08, 0x8f02, 0x8f0b, 0x9052, 0x903f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ 94 ] = { 0x9044, 0x9049, 0x903d, 0x9110, 0x910d, 0x910f, 0x9111, 0x9116, 0x9114, 0x910b, 0x910e, 0x916e, 0x916f, 0x9248, 0x9252, 0x9230, 0x923a, 0x9266, 0x9233, 0x9265, 0x925e, 0x9283, 0x922e, 0x924a, 0x9246, 0x926d, 0x926c, 0x924f, 0x9260, 0x9267, 0x926f, 0x9236, 0x9261, 0x9270, 0x9231, 0x9254, 0x9263, 0x9250, 0x9272, 0x924e, 0x9253, 0x924c, 0x9256, 0x9232, 0x959f, 0x959c, 0x959e, 0x959b, 0x9692, 0x9693, 0x9691, 0x9697, 0x96ce, 0x96fa, 0x96fd, 0x96f8, 0x96f5, 0x9773, 0x9777, 0x9778, 0x9772, 0x980f, 0x980d, 0x980e, 0x98ac, 0x98f6, 0x98f9, 0x99af, 0x99b2, 0x99b0, 0x99b5, 0x9aad, 0x9aab, 0x9b5b, 0x9cea, 0x9ced, 0x9ce7, 0x9e80, 0x9efd, 0x50e6, 0x50d4, 0x50d7, 0x50e8, 0x50f3, 0x50db, 0x50ea, 0x50dd, 0x50e4, 0x50d3, 0x50ec, 0x50f0, 0x50ef, 0x50e3, 0x50e0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ 63 ] = { 0x51d8, 0x5280, 0x5281, 0x52e9, 0x52eb, 0x5330, 0x53ac, 0x5627, 0x5615, 0x560c, 0x5612, 0x55fc, 0x560f, 0x561c, 0x5601, 0x5613, 0x5602, 0x55fa, 0x561d, 0x5604, 0x55ff, 0x55f9, 0x5889, 0x587c, 0x5890, 0x5898, 0x5886, 0x5881, 0x587f, 0x5874, 0x588b, 0x587a, 0x5887, 0x5891, 0x588e, 0x5876, 0x5882, 0x5888, 0x587b, 0x5894, 0x588f, 0x58fe, 0x596b, 0x5adc, 0x5aee, 0x5ae5, 0x5ad5, 0x5aea, 0x5ada, 0x5aed, 0x5aeb, 0x5af3, 0x5ae2, 0x5ae0, 0x5adb, 0x5aec, 0x5ade, 0x5add, 0x5ad9, 0x5ae8, 0x5adf, 0x5b77, 0x5be0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ 94 ] = { 0x5be3, 0x5c63, 0x5d82, 0x5d80, 0x5d7d, 0x5d86, 0x5d7a, 0x5d81, 0x5d77, 0x5d8a, 0x5d89, 0x5d88, 0x5d7e, 0x5d7c, 0x5d8d, 0x5d79, 0x5d7f, 0x5e58, 0x5e59, 0x5e53, 0x5ed8, 0x5ed1, 0x5ed7, 0x5ece, 0x5edc, 0x5ed5, 0x5ed9, 0x5ed2, 0x5ed4, 0x5f44, 0x5f43, 0x5f6f, 0x5fb6, 0x612c, 0x6128, 0x6141, 0x615e, 0x6171, 0x6173, 0x6152, 0x6153, 0x6172, 0x616c, 0x6180, 0x6174, 0x6154, 0x617a, 0x615b, 0x6165, 0x613b, 0x616a, 0x6161, 0x6156, 0x6229, 0x6227, 0x622b, 0x642b, 0x644d, 0x645b, 0x645d, 0x6474, 0x6476, 0x6472, 0x6473, 0x647d, 0x6475, 0x6466, 0x64a6, 0x644e, 0x6482, 0x645e, 0x645c, 0x644b, 0x6453, 0x6460, 0x6450, 0x647f, 0x643f, 0x646c, 0x646b, 0x6459, 0x6465, 0x6477, 0x6573, 0x65a0, 0x66a1, 0x66a0, 0x669f, 0x6705, 0x6704, 0x6722, 0x69b1, 0x69b6, 0x69c9 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ 63 ] = { 0x69a0, 0x69ce, 0x6996, 0x69b0, 0x69ac, 0x69bc, 0x6991, 0x6999, 0x698e, 0x69a7, 0x698d, 0x69a9, 0x69be, 0x69af, 0x69bf, 0x69c4, 0x69bd, 0x69a4, 0x69d4, 0x69b9, 0x69ca, 0x699a, 0x69cf, 0x69b3, 0x6993, 0x69aa, 0x69a1, 0x699e, 0x69d9, 0x6997, 0x6990, 0x69c2, 0x69b5, 0x69a5, 0x69c6, 0x6b4a, 0x6b4d, 0x6b4b, 0x6b9e, 0x6b9f, 0x6ba0, 0x6bc3, 0x6bc4, 0x6bfe, 0x6ece, 0x6ef5, 0x6ef1, 0x6f03, 0x6f25, 0x6ef8, 0x6f37, 0x6efb, 0x6f2e, 0x6f09, 0x6f4e, 0x6f19, 0x6f1a, 0x6f27, 0x6f18, 0x6f3b, 0x6f12, 0x6eed, 0x6f0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ 94 ] = { 0x6f36, 0x6f73, 0x6ef9, 0x6eee, 0x6f2d, 0x6f40, 0x6f30, 0x6f3c, 0x6f35, 0x6eeb, 0x6f07, 0x6f0e, 0x6f43, 0x6f05, 0x6efd, 0x6ef6, 0x6f39, 0x6f1c, 0x6efc, 0x6f3a, 0x6f1f, 0x6f0d, 0x6f1e, 0x6f08, 0x6f21, 0x7187, 0x7190, 0x7189, 0x7180, 0x7185, 0x7182, 0x718f, 0x717b, 0x7186, 0x7181, 0x7197, 0x7244, 0x7253, 0x7297, 0x7295, 0x7293, 0x7343, 0x734d, 0x7351, 0x734c, 0x7462, 0x7473, 0x7471, 0x7475, 0x7472, 0x7467, 0x746e, 0x7500, 0x7502, 0x7503, 0x757d, 0x7590, 0x7616, 0x7608, 0x760c, 0x7615, 0x7611, 0x760a, 0x7614, 0x76b8, 0x7781, 0x777c, 0x7785, 0x7782, 0x776e, 0x7780, 0x776f, 0x777e, 0x7783, 0x78b2, 0x78aa, 0x78b4, 0x78ad, 0x78a8, 0x787e, 0x78ab, 0x789e, 0x78a5, 0x78a0, 0x78ac, 0x78a2, 0x78a4, 0x7998, 0x798a, 0x798b, 0x7996, 0x7995, 0x7994, 0x7993 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ 63 ] = { 0x7997, 0x7988, 0x7992, 0x7990, 0x7a2b, 0x7a4a, 0x7a30, 0x7a2f, 0x7a28, 0x7a26, 0x7aa8, 0x7aab, 0x7aac, 0x7aee, 0x7b88, 0x7b9c, 0x7b8a, 0x7b91, 0x7b90, 0x7b96, 0x7b8d, 0x7b8c, 0x7b9b, 0x7b8e, 0x7b85, 0x7b98, 0x5284, 0x7b99, 0x7ba4, 0x7b82, 0x7cbb, 0x7cbf, 0x7cbc, 0x7cba, 0x7da7, 0x7db7, 0x7dc2, 0x7da3, 0x7daa, 0x7dc1, 0x7dc0, 0x7dc5, 0x7d9d, 0x7dce, 0x7dc4, 0x7dc6, 0x7dcb, 0x7dcc, 0x7daf, 0x7db9, 0x7d96, 0x7dbc, 0x7d9f, 0x7da6, 0x7dae, 0x7da9, 0x7da1, 0x7dc9, 0x7f73, 0x7fe2, 0x7fe3, 0x7fe5, 0x7fde }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ 94 ] = { 0x8024, 0x805d, 0x805c, 0x8189, 0x8186, 0x8183, 0x8187, 0x818d, 0x818c, 0x818b, 0x8215, 0x8497, 0x84a4, 0x84a1, 0x849f, 0x84ba, 0x84ce, 0x84c2, 0x84ac, 0x84ae, 0x84ab, 0x84b9, 0x84b4, 0x84c1, 0x84cd, 0x84aa, 0x849a, 0x84b1, 0x84d0, 0x849d, 0x84a7, 0x84bb, 0x84a2, 0x8494, 0x84c7, 0x84cc, 0x849b, 0x84a9, 0x84af, 0x84a8, 0x84d6, 0x8498, 0x84b6, 0x84cf, 0x84a0, 0x84d7, 0x84d4, 0x84d2, 0x84db, 0x84b0, 0x8491, 0x8661, 0x8733, 0x8723, 0x8728, 0x876b, 0x8740, 0x872e, 0x871e, 0x8721, 0x8719, 0x871b, 0x8743, 0x872c, 0x8741, 0x873e, 0x8746, 0x8720, 0x8732, 0x872a, 0x872d, 0x873c, 0x8712, 0x873a, 0x8731, 0x8735, 0x8742, 0x8726, 0x8727, 0x8738, 0x8724, 0x871a, 0x8730, 0x8711, 0x88f7, 0x88e7, 0x88f1, 0x88f2, 0x88fa, 0x88fe, 0x88ee, 0x88fc, 0x88f6, 0x88fb }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ 63 ] = { 0x88f0, 0x88ec, 0x88eb, 0x899d, 0x89a1, 0x899f, 0x899e, 0x89e9, 0x89eb, 0x89e8, 0x8aab, 0x8a99, 0x8a8b, 0x8a92, 0x8a8f, 0x8a96, 0x8c3d, 0x8c68, 0x8c69, 0x8cd5, 0x8ccf, 0x8cd7, 0x8d96, 0x8e09, 0x8e02, 0x8dff, 0x8e0d, 0x8dfd, 0x8e0a, 0x8e03, 0x8e07, 0x8e06, 0x8e05, 0x8dfe, 0x8e00, 0x8e04, 0x8f10, 0x8f11, 0x8f0e, 0x8f0d, 0x9123, 0x911c, 0x9120, 0x9122, 0x911f, 0x911d, 0x911a, 0x9124, 0x9121, 0x911b, 0x917a, 0x9172, 0x9179, 0x9173, 0x92a5, 0x92a4, 0x9276, 0x929b, 0x927a, 0x92a0, 0x9294, 0x92aa, 0x928d }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ 94 ] = { 0x92a6, 0x929a, 0x92ab, 0x9279, 0x9297, 0x927f, 0x92a3, 0x92ee, 0x928e, 0x9282, 0x9295, 0x92a2, 0x927d, 0x9288, 0x92a1, 0x928a, 0x9286, 0x928c, 0x9299, 0x92a7, 0x927e, 0x9287, 0x92a9, 0x929d, 0x928b, 0x922d, 0x969e, 0x96a1, 0x96ff, 0x9758, 0x977d, 0x977a, 0x977e, 0x9783, 0x9780, 0x9782, 0x977b, 0x9784, 0x9781, 0x977f, 0x97ce, 0x97cd, 0x9816, 0x98ad, 0x98ae, 0x9902, 0x9900, 0x9907, 0x999d, 0x999c, 0x99c3, 0x99b9, 0x99bb, 0x99ba, 0x99c2, 0x99bd, 0x99c7, 0x9ab1, 0x9ae3, 0x9ae7, 0x9b3e, 0x9b3f, 0x9b60, 0x9b61, 0x9b5f, 0x9cf1, 0x9cf2, 0x9cf5, 0x9ea7, 0x50ff, 0x5103, 0x5130, 0x50f8, 0x5106, 0x5107, 0x50f6, 0x50fe, 0x510b, 0x510c, 0x50fd, 0x510a, 0x528b, 0x528c, 0x52f1, 0x52ef, 0x5648, 0x5642, 0x564c, 0x5635, 0x5641, 0x564a, 0x5649, 0x5646, 0x5658 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ 63 ] = { 0x565a, 0x5640, 0x5633, 0x563d, 0x562c, 0x563e, 0x5638, 0x562a, 0x563a, 0x571a, 0x58ab, 0x589d, 0x58b1, 0x58a0, 0x58a3, 0x58af, 0x58ac, 0x58a5, 0x58a1, 0x58ff, 0x5aff, 0x5af4, 0x5afd, 0x5af7, 0x5af6, 0x5b03, 0x5af8, 0x5b02, 0x5af9, 0x5b01, 0x5b07, 0x5b05, 0x5b0f, 0x5c67, 0x5d99, 0x5d97, 0x5d9f, 0x5d92, 0x5da2, 0x5d93, 0x5d95, 0x5da0, 0x5d9c, 0x5da1, 0x5d9a, 0x5d9e, 0x5e69, 0x5e5d, 0x5e60, 0x5e5c, 0x7df3, 0x5edb, 0x5ede, 0x5ee1, 0x5f49, 0x5fb2, 0x618b, 0x6183, 0x6179, 0x61b1, 0x61b0, 0x61a2, 0x6189 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ 94 ] = { 0x619b, 0x6193, 0x61af, 0x61ad, 0x619f, 0x6192, 0x61aa, 0x61a1, 0x618d, 0x6166, 0x61b3, 0x622d, 0x646e, 0x6470, 0x6496, 0x64a0, 0x6485, 0x6497, 0x649c, 0x648f, 0x648b, 0x648a, 0x648c, 0x64a3, 0x649f, 0x6468, 0x64b1, 0x6498, 0x6576, 0x657a, 0x6579, 0x657b, 0x65b2, 0x65b3, 0x66b5, 0x66b0, 0x66a9, 0x66b2, 0x66b7, 0x66aa, 0x66af, 0x6a00, 0x6a06, 0x6a17, 0x69e5, 0x69f8, 0x6a15, 0x69f1, 0x69e4, 0x6a20, 0x69ff, 0x69ec, 0x69e2, 0x6a1b, 0x6a1d, 0x69fe, 0x6a27, 0x69f2, 0x69ee, 0x6a14, 0x69f7, 0x69e7, 0x6a40, 0x6a08, 0x69e6, 0x69fb, 0x6a0d, 0x69fc, 0x69eb, 0x6a09, 0x6a04, 0x6a18, 0x6a25, 0x6a0f, 0x69f6, 0x6a26, 0x6a07, 0x69f4, 0x6a16, 0x6b51, 0x6ba5, 0x6ba3, 0x6ba2, 0x6ba6, 0x6c01, 0x6c00, 0x6bff, 0x6c02, 0x6f41, 0x6f26, 0x6f7e, 0x6f87, 0x6fc6, 0x6f92 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ 63 ] = { 0x6f8d, 0x6f89, 0x6f8c, 0x6f62, 0x6f4f, 0x6f85, 0x6f5a, 0x6f96, 0x6f76, 0x6f6c, 0x6f82, 0x6f55, 0x6f72, 0x6f52, 0x6f50, 0x6f57, 0x6f94, 0x6f93, 0x6f5d, 0x6f00, 0x6f61, 0x6f6b, 0x6f7d, 0x6f67, 0x6f90, 0x6f53, 0x6f8b, 0x6f69, 0x6f7f, 0x6f95, 0x6f63, 0x6f77, 0x6f6a, 0x6f7b, 0x71b2, 0x71af, 0x719b, 0x71b0, 0x71a0, 0x719a, 0x71a9, 0x71b5, 0x719d, 0x71a5, 0x719e, 0x71a4, 0x71a1, 0x71aa, 0x719c, 0x71a7, 0x71b3, 0x7298, 0x729a, 0x7358, 0x7352, 0x735e, 0x735f, 0x7360, 0x735d, 0x735b, 0x7361, 0x735a, 0x7359 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ 94 ] = { 0x7362, 0x7487, 0x7489, 0x748a, 0x7486, 0x7481, 0x747d, 0x7485, 0x7488, 0x747c, 0x7479, 0x7508, 0x7507, 0x757e, 0x7625, 0x761e, 0x7619, 0x761d, 0x761c, 0x7623, 0x761a, 0x7628, 0x761b, 0x769c, 0x769d, 0x769e, 0x769b, 0x778d, 0x778f, 0x7789, 0x7788, 0x78cd, 0x78bb, 0x78cf, 0x78cc, 0x78d1, 0x78ce, 0x78d4, 0x78c8, 0x78c3, 0x78c4, 0x78c9, 0x799a, 0x79a1, 0x79a0, 0x799c, 0x79a2, 0x799b, 0x6b76, 0x7a39, 0x7ab2, 0x7ab4, 0x7ab3, 0x7bb7, 0x7bcb, 0x7bbe, 0x7bac, 0x7bce, 0x7baf, 0x7bb9, 0x7bca, 0x7bb5, 0x7cc5, 0x7cc8, 0x7ccc, 0x7ccb, 0x7df7, 0x7ddb, 0x7dea, 0x7de7, 0x7dd7, 0x7de1, 0x7e03, 0x7dfa, 0x7de6, 0x7df6, 0x7df1, 0x7df0, 0x7dee, 0x7ddf, 0x7f76, 0x7fac, 0x7fb0, 0x7fad, 0x7fed, 0x7feb, 0x7fea, 0x7fec, 0x7fe6, 0x7fe8, 0x8064, 0x8067, 0x81a3, 0x819f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ 63 ] = { 0x819e, 0x8195, 0x81a2, 0x8199, 0x8197, 0x8216, 0x824f, 0x8253, 0x8252, 0x8250, 0x824e, 0x8251, 0x8524, 0x853b, 0x850f, 0x8500, 0x8529, 0x850e, 0x8509, 0x850d, 0x851f, 0x850a, 0x8527, 0x851c, 0x84fb, 0x852b, 0x84fa, 0x8508, 0x850c, 0x84f4, 0x852a, 0x84f2, 0x8515, 0x84f7, 0x84eb, 0x84f3, 0x84fc, 0x8512, 0x84ea, 0x84e9, 0x8516, 0x84fe, 0x8528, 0x851d, 0x852e, 0x8502, 0x84fd, 0x851e, 0x84f6, 0x8531, 0x8526, 0x84e7, 0x84e8, 0x84f0, 0x84ef, 0x84f9, 0x8518, 0x8520, 0x8530, 0x850b, 0x8519, 0x852f, 0x8662 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ 94 ] = { 0x8756, 0x8763, 0x8764, 0x8777, 0x87e1, 0x8773, 0x8758, 0x8754, 0x875b, 0x8752, 0x8761, 0x875a, 0x8751, 0x875e, 0x876d, 0x876a, 0x8750, 0x874e, 0x875f, 0x875d, 0x876f, 0x876c, 0x877a, 0x876e, 0x875c, 0x8765, 0x874f, 0x877b, 0x8775, 0x8762, 0x8767, 0x8769, 0x885a, 0x8905, 0x890c, 0x8914, 0x890b, 0x8917, 0x8918, 0x8919, 0x8906, 0x8916, 0x8911, 0x890e, 0x8909, 0x89a2, 0x89a4, 0x89a3, 0x89ed, 0x89f0, 0x89ec, 0x8acf, 0x8ac6, 0x8ab8, 0x8ad3, 0x8ad1, 0x8ad4, 0x8ad5, 0x8abb, 0x8ad7, 0x8abe, 0x8ac0, 0x8ac5, 0x8ad8, 0x8ac3, 0x8aba, 0x8abd, 0x8ad9, 0x8c3e, 0x8c4d, 0x8c8f, 0x8ce5, 0x8cdf, 0x8cd9, 0x8ce8, 0x8cda, 0x8cdd, 0x8ce7, 0x8da0, 0x8d9c, 0x8da1, 0x8d9b, 0x8e20, 0x8e23, 0x8e25, 0x8e24, 0x8e2e, 0x8e15, 0x8e1b, 0x8e16, 0x8e11, 0x8e19, 0x8e26, 0x8e27 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ 63 ] = { 0x8e14, 0x8e12, 0x8e18, 0x8e13, 0x8e1c, 0x8e17, 0x8e1a, 0x8f2c, 0x8f24, 0x8f18, 0x8f1a, 0x8f20, 0x8f23, 0x8f16, 0x8f17, 0x9073, 0x9070, 0x906f, 0x9067, 0x906b, 0x912f, 0x912b, 0x9129, 0x912a, 0x9132, 0x9126, 0x912e, 0x9185, 0x9186, 0x918a, 0x9181, 0x9182, 0x9184, 0x9180, 0x92d0, 0x92c3, 0x92c4, 0x92c0, 0x92d9, 0x92b6, 0x92cf, 0x92f1, 0x92df, 0x92d8, 0x92e9, 0x92d7, 0x92dd, 0x92cc, 0x92ef, 0x92c2, 0x92e8, 0x92ca, 0x92c8, 0x92ce, 0x92e6, 0x92cd, 0x92d5, 0x92c9, 0x92e0, 0x92de, 0x92e7, 0x92d1, 0x92d3 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ 94 ] = { 0x92b5, 0x92e1, 0x92c6, 0x92b4, 0x957c, 0x95ac, 0x95ab, 0x95ae, 0x95b0, 0x96a4, 0x96a2, 0x96d3, 0x9705, 0x9708, 0x9702, 0x975a, 0x978a, 0x978e, 0x9788, 0x97d0, 0x97cf, 0x981e, 0x981d, 0x9826, 0x9829, 0x9828, 0x9820, 0x981b, 0x9827, 0x98b2, 0x9908, 0x98fa, 0x9911, 0x9914, 0x9916, 0x9917, 0x9915, 0x99dc, 0x99cd, 0x99cf, 0x99d3, 0x99d4, 0x99ce, 0x99c9, 0x99d6, 0x99d8, 0x99cb, 0x99d7, 0x99cc, 0x9ab3, 0x9aec, 0x9aeb, 0x9af3, 0x9af2, 0x9af1, 0x9b46, 0x9b43, 0x9b67, 0x9b74, 0x9b71, 0x9b66, 0x9b76, 0x9b75, 0x9b70, 0x9b68, 0x9b64, 0x9b6c, 0x9cfc, 0x9cfa, 0x9cfd, 0x9cff, 0x9cf7, 0x9d07, 0x9d00, 0x9cf9, 0x9cfb, 0x9d08, 0x9d05, 0x9d04, 0x9e83, 0x9ed3, 0x9f0f, 0x9f10, 0x511c, 0x5113, 0x5117, 0x511a, 0x5111, 0x51de, 0x5334, 0x53e1, 0x5670, 0x5660, 0x566e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ 63 ] = { 0x5673, 0x5666, 0x5663, 0x566d, 0x5672, 0x565e, 0x5677, 0x571c, 0x571b, 0x58c8, 0x58bd, 0x58c9, 0x58bf, 0x58ba, 0x58c2, 0x58bc, 0x58c6, 0x5b17, 0x5b19, 0x5b1b, 0x5b21, 0x5b14, 0x5b13, 0x5b10, 0x5b16, 0x5b28, 0x5b1a, 0x5b20, 0x5b1e, 0x5bef, 0x5dac, 0x5db1, 0x5da9, 0x5da7, 0x5db5, 0x5db0, 0x5dae, 0x5daa, 0x5da8, 0x5db2, 0x5dad, 0x5daf, 0x5db4, 0x5e67, 0x5e68, 0x5e66, 0x5e6f, 0x5ee9, 0x5ee7, 0x5ee6, 0x5ee8, 0x5ee5, 0x5f4b, 0x5fbc, 0x619d, 0x61a8, 0x6196, 0x61c5, 0x61b4, 0x61c6, 0x61c1, 0x61cc, 0x61ba }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ 94 ] = { 0x61bf, 0x61b8, 0x618c, 0x64d7, 0x64d6, 0x64d0, 0x64cf, 0x64c9, 0x64bd, 0x6489, 0x64c3, 0x64db, 0x64f3, 0x64d9, 0x6533, 0x657f, 0x657c, 0x65a2, 0x66c8, 0x66be, 0x66c0, 0x66ca, 0x66cb, 0x66cf, 0x66bd, 0x66bb, 0x66ba, 0x66cc, 0x6723, 0x6a34, 0x6a66, 0x6a49, 0x6a67, 0x6a32, 0x6a68, 0x6a3e, 0x6a5d, 0x6a6d, 0x6a76, 0x6a5b, 0x6a51, 0x6a28, 0x6a5a, 0x6a3b, 0x6a3f, 0x6a41, 0x6a6a, 0x6a64, 0x6a50, 0x6a4f, 0x6a54, 0x6a6f, 0x6a69, 0x6a60, 0x6a3c, 0x6a5e, 0x6a56, 0x6a55, 0x6a4d, 0x6a4e, 0x6a46, 0x6b55, 0x6b54, 0x6b56, 0x6ba7, 0x6baa, 0x6bab, 0x6bc8, 0x6bc7, 0x6c04, 0x6c03, 0x6c06, 0x6fad, 0x6fcb, 0x6fa3, 0x6fc7, 0x6fbc, 0x6fce, 0x6fc8, 0x6f5e, 0x6fc4, 0x6fbd, 0x6f9e, 0x6fca, 0x6fa8, 0x7004, 0x6fa5, 0x6fae, 0x6fba, 0x6fac, 0x6faa, 0x6fcf, 0x6fbf, 0x6fb8 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ 63 ] = { 0x6fa2, 0x6fc9, 0x6fab, 0x6fcd, 0x6faf, 0x6fb2, 0x6fb0, 0x71c5, 0x71c2, 0x71bf, 0x71b8, 0x71d6, 0x71c0, 0x71c1, 0x71cb, 0x71d4, 0x71ca, 0x71c7, 0x71cf, 0x71bd, 0x71d8, 0x71bc, 0x71c6, 0x71da, 0x71db, 0x729d, 0x729e, 0x7369, 0x7366, 0x7367, 0x736c, 0x7365, 0x736b, 0x736a, 0x747f, 0x749a, 0x74a0, 0x7494, 0x7492, 0x7495, 0x74a1, 0x750b, 0x7580, 0x762f, 0x762d, 0x7631, 0x763d, 0x7633, 0x763c, 0x7635, 0x7632, 0x7630, 0x76bb, 0x76e6, 0x779a, 0x779d, 0x77a1, 0x779c, 0x779b, 0x77a2, 0x77a3, 0x7795, 0x7799 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ 94 ] = { 0x7797, 0x78dd, 0x78e9, 0x78e5, 0x78ea, 0x78de, 0x78e3, 0x78db, 0x78e1, 0x78e2, 0x78ed, 0x78df, 0x78e0, 0x79a4, 0x7a44, 0x7a48, 0x7a47, 0x7ab6, 0x7ab8, 0x7ab5, 0x7ab1, 0x7ab7, 0x7bde, 0x7be3, 0x7be7, 0x7bdd, 0x7bd5, 0x7be5, 0x7bda, 0x7be8, 0x7bf9, 0x7bd4, 0x7bea, 0x7be2, 0x7bdc, 0x7beb, 0x7bd8, 0x7bdf, 0x7cd2, 0x7cd4, 0x7cd7, 0x7cd0, 0x7cd1, 0x7e12, 0x7e21, 0x7e17, 0x7e0c, 0x7e1f, 0x7e20, 0x7e13, 0x7e0e, 0x7e1c, 0x7e15, 0x7e1a, 0x7e22, 0x7e0b, 0x7e0f, 0x7e16, 0x7e0d, 0x7e14, 0x7e25, 0x7e24, 0x7f43, 0x7f7b, 0x7f7c, 0x7f7a, 0x7fb1, 0x7fef, 0x802a, 0x8029, 0x806c, 0x81b1, 0x81a6, 0x81ae, 0x81b9, 0x81b5, 0x81ab, 0x81b0, 0x81ac, 0x81b4, 0x81b2, 0x81b7, 0x81a7, 0x81f2, 0x8255, 0x8256, 0x8257, 0x8556, 0x8545, 0x856b, 0x854d, 0x8553, 0x8561, 0x8558 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ 63 ] = { 0x8540, 0x8546, 0x8564, 0x8541, 0x8562, 0x8544, 0x8551, 0x8547, 0x8563, 0x853e, 0x855b, 0x8571, 0x854e, 0x856e, 0x8575, 0x8555, 0x8567, 0x8560, 0x858c, 0x8566, 0x855d, 0x8554, 0x8565, 0x856c, 0x8663, 0x8665, 0x8664, 0x879b, 0x878f, 0x8797, 0x8793, 0x8792, 0x8788, 0x8781, 0x8796, 0x8798, 0x8779, 0x8787, 0x87a3, 0x8785, 0x8790, 0x8791, 0x879d, 0x8784, 0x8794, 0x879c, 0x879a, 0x8789, 0x891e, 0x8926, 0x8930, 0x892d, 0x892e, 0x8927, 0x8931, 0x8922, 0x8929, 0x8923, 0x892f, 0x892c, 0x891f, 0x89f1, 0x8ae0 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ 94 ] = { 0x8ae2, 0x8af2, 0x8af4, 0x8af5, 0x8add, 0x8b14, 0x8ae4, 0x8adf, 0x8af0, 0x8ac8, 0x8ade, 0x8ae1, 0x8ae8, 0x8aff, 0x8aef, 0x8afb, 0x8c91, 0x8c92, 0x8c90, 0x8cf5, 0x8cee, 0x8cf1, 0x8cf0, 0x8cf3, 0x8d6c, 0x8d6e, 0x8da5, 0x8da7, 0x8e33, 0x8e3e, 0x8e38, 0x8e40, 0x8e45, 0x8e36, 0x8e3c, 0x8e3d, 0x8e41, 0x8e30, 0x8e3f, 0x8ebd, 0x8f36, 0x8f2e, 0x8f35, 0x8f32, 0x8f39, 0x8f37, 0x8f34, 0x9076, 0x9079, 0x907b, 0x9086, 0x90fa, 0x9133, 0x9135, 0x9136, 0x9193, 0x9190, 0x9191, 0x918d, 0x918f, 0x9327, 0x931e, 0x9308, 0x931f, 0x9306, 0x930f, 0x937a, 0x9338, 0x933c, 0x931b, 0x9323, 0x9312, 0x9301, 0x9346, 0x932d, 0x930e, 0x930d, 0x92cb, 0x931d, 0x92fa, 0x9325, 0x9313, 0x92f9, 0x92f7, 0x9334, 0x9302, 0x9324, 0x92ff, 0x9329, 0x9339, 0x9335, 0x932a, 0x9314, 0x930c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ 63 ] = { 0x930b, 0x92fe, 0x9309, 0x9300, 0x92fb, 0x9316, 0x95bc, 0x95cd, 0x95be, 0x95b9, 0x95ba, 0x95b6, 0x95bf, 0x95b5, 0x95bd, 0x96a9, 0x96d4, 0x970b, 0x9712, 0x9710, 0x9799, 0x9797, 0x9794, 0x97f0, 0x97f8, 0x9835, 0x982f, 0x9832, 0x9924, 0x991f, 0x9927, 0x9929, 0x999e, 0x99ee, 0x99ec, 0x99e5, 0x99e4, 0x99f0, 0x99e3, 0x99ea, 0x99e9, 0x99e7, 0x9ab9, 0x9abf, 0x9ab4, 0x9abb, 0x9af6, 0x9afa, 0x9af9, 0x9af7, 0x9b33, 0x9b80, 0x9b85, 0x9b87, 0x9b7c, 0x9b7e, 0x9b7b, 0x9b82, 0x9b93, 0x9b92, 0x9b90, 0x9b7a, 0x9b95 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ 94 ] = { 0x9b7d, 0x9b88, 0x9d25, 0x9d17, 0x9d20, 0x9d1e, 0x9d14, 0x9d29, 0x9d1d, 0x9d18, 0x9d22, 0x9d10, 0x9d19, 0x9d1f, 0x9e88, 0x9e86, 0x9e87, 0x9eae, 0x9ead, 0x9ed5, 0x9ed6, 0x9efa, 0x9f12, 0x9f3d, 0x5126, 0x5125, 0x5122, 0x5124, 0x5120, 0x5129, 0x52f4, 0x5693, 0x568c, 0x568d, 0x5686, 0x5684, 0x5683, 0x567e, 0x5682, 0x567f, 0x5681, 0x58d6, 0x58d4, 0x58cf, 0x58d2, 0x5b2d, 0x5b25, 0x5b32, 0x5b23, 0x5b2c, 0x5b27, 0x5b26, 0x5b2f, 0x5b2e, 0x5b7b, 0x5bf1, 0x5bf2, 0x5db7, 0x5e6c, 0x5e6a, 0x5fbe, 0x5fbb, 0x61c3, 0x61b5, 0x61bc, 0x61e7, 0x61e0, 0x61e5, 0x61e4, 0x61e8, 0x61de, 0x64ef, 0x64e9, 0x64e3, 0x64eb, 0x64e4, 0x64e8, 0x6581, 0x6580, 0x65b6, 0x65da, 0x66d2, 0x6a8d, 0x6a96, 0x6a81, 0x6aa5, 0x6a89, 0x6a9f, 0x6a9b, 0x6aa1, 0x6a9e, 0x6a87, 0x6a93, 0x6a8e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ 63 ] = { 0x6a95, 0x6a83, 0x6aa8, 0x6aa4, 0x6a91, 0x6a7f, 0x6aa6, 0x6a9a, 0x6a85, 0x6a8c, 0x6a92, 0x6b5b, 0x6bad, 0x6c09, 0x6fcc, 0x6fa9, 0x6ff4, 0x6fd4, 0x6fe3, 0x6fdc, 0x6fed, 0x6fe7, 0x6fe6, 0x6fde, 0x6ff2, 0x6fdd, 0x6fe2, 0x6fe8, 0x71e1, 0x71f1, 0x71e8, 0x71f2, 0x71e4, 0x71f0, 0x71e2, 0x7373, 0x736e, 0x736f, 0x7497, 0x74b2, 0x74ab, 0x7490, 0x74aa, 0x74ad, 0x74b1, 0x74a5, 0x74af, 0x7510, 0x7511, 0x7512, 0x750f, 0x7584, 0x7643, 0x7648, 0x7649, 0x7647, 0x76a4, 0x76e9, 0x77b5, 0x77ab, 0x77b2, 0x77b7, 0x77b6 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ 94 ] = { 0x77b4, 0x77b1, 0x77a8, 0x77f0, 0x78f3, 0x78fd, 0x7902, 0x78fb, 0x78fc, 0x78f2, 0x7905, 0x78f9, 0x78fe, 0x7904, 0x79ab, 0x79a8, 0x7a5c, 0x7a5b, 0x7a56, 0x7a58, 0x7a54, 0x7a5a, 0x7abe, 0x7ac0, 0x7ac1, 0x7c05, 0x7c0f, 0x7bf2, 0x7c00, 0x7bff, 0x7bfb, 0x7c0e, 0x7bf4, 0x7c0b, 0x7bf3, 0x7c02, 0x7c09, 0x7c03, 0x7c01, 0x7bf8, 0x7bfd, 0x7c06, 0x7bf0, 0x7bf1, 0x7c10, 0x7c0a, 0x7ce8, 0x7e2d, 0x7e3c, 0x7e42, 0x7e33, 0x9848, 0x7e38, 0x7e2a, 0x7e49, 0x7e40, 0x7e47, 0x7e29, 0x7e4c, 0x7e30, 0x7e3b, 0x7e36, 0x7e44, 0x7e3a, 0x7f45, 0x7f7f, 0x7f7e, 0x7f7d, 0x7ff4, 0x7ff2, 0x802c, 0x81bb, 0x81c4, 0x81cc, 0x81ca, 0x81c5, 0x81c7, 0x81bc, 0x81e9, 0x825b, 0x825a, 0x825c, 0x8583, 0x8580, 0x858f, 0x85a7, 0x8595, 0x85a0, 0x858b, 0x85a3, 0x857b, 0x85a4, 0x859a, 0x859e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ 63 ] = { 0x8577, 0x857c, 0x8589, 0x85a1, 0x857a, 0x8578, 0x8557, 0x858e, 0x8596, 0x8586, 0x858d, 0x8599, 0x859d, 0x8581, 0x85a2, 0x8582, 0x8588, 0x8585, 0x8579, 0x8576, 0x8598, 0x8590, 0x859f, 0x8668, 0x87be, 0x87aa, 0x87ad, 0x87c5, 0x87b0, 0x87ac, 0x87b9, 0x87b5, 0x87bc, 0x87ae, 0x87c9, 0x87c3, 0x87c2, 0x87cc, 0x87b7, 0x87af, 0x87c4, 0x87ca, 0x87b4, 0x87b6, 0x87bf, 0x87b8, 0x87bd, 0x87de, 0x87b2, 0x8935, 0x8933, 0x893c, 0x893e, 0x8941, 0x8952, 0x8937, 0x8942, 0x89ad, 0x89af, 0x89ae, 0x89f2, 0x89f3, 0x8b1e }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ 94 ] = { 0x8b18, 0x8b16, 0x8b11, 0x8b05, 0x8b0b, 0x8b22, 0x8b0f, 0x8b12, 0x8b15, 0x8b07, 0x8b0d, 0x8b08, 0x8b06, 0x8b1c, 0x8b13, 0x8b1a, 0x8c4f, 0x8c70, 0x8c72, 0x8c71, 0x8c6f, 0x8c95, 0x8c94, 0x8cf9, 0x8d6f, 0x8e4e, 0x8e4d, 0x8e53, 0x8e50, 0x8e4c, 0x8e47, 0x8f43, 0x8f40, 0x9085, 0x907e, 0x9138, 0x919a, 0x91a2, 0x919b, 0x9199, 0x919f, 0x91a1, 0x919d, 0x91a0, 0x93a1, 0x9383, 0x93af, 0x9364, 0x9356, 0x9347, 0x937c, 0x9358, 0x935c, 0x9376, 0x9349, 0x9350, 0x9351, 0x9360, 0x936d, 0x938f, 0x934c, 0x936a, 0x9379, 0x9357, 0x9355, 0x9352, 0x934f, 0x9371, 0x9377, 0x937b, 0x9361, 0x935e, 0x9363, 0x9367, 0x9380, 0x934e, 0x9359, 0x95c7, 0x95c0, 0x95c9, 0x95c3, 0x95c5, 0x95b7, 0x96ae, 0x96b0, 0x96ac, 0x9720, 0x971f, 0x9718, 0x971d, 0x9719, 0x979a, 0x97a1, 0x979c }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ 63 ] = { 0x979e, 0x979d, 0x97d5, 0x97d4, 0x97f1, 0x9841, 0x9844, 0x984a, 0x9849, 0x9845, 0x9843, 0x9925, 0x992b, 0x992c, 0x992a, 0x9933, 0x9932, 0x992f, 0x992d, 0x9931, 0x9930, 0x9998, 0x99a3, 0x99a1, 0x9a02, 0x99fa, 0x99f4, 0x99f7, 0x99f9, 0x99f8, 0x99f6, 0x99fb, 0x99fd, 0x99fe, 0x99fc, 0x9a03, 0x9abe, 0x9afe, 0x9afd, 0x9b01, 0x9afc, 0x9b48, 0x9b9a, 0x9ba8, 0x9b9e, 0x9b9b, 0x9ba6, 0x9ba1, 0x9ba5, 0x9ba4, 0x9b86, 0x9ba2, 0x9ba0, 0x9baf, 0x9d33, 0x9d41, 0x9d67, 0x9d36, 0x9d2e, 0x9d2f, 0x9d31, 0x9d38, 0x9d30 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ 94 ] = { 0x9d45, 0x9d42, 0x9d43, 0x9d3e, 0x9d37, 0x9d40, 0x9d3d, 0x7ff5, 0x9d2d, 0x9e8a, 0x9e89, 0x9e8d, 0x9eb0, 0x9ec8, 0x9eda, 0x9efb, 0x9eff, 0x9f24, 0x9f23, 0x9f22, 0x9f54, 0x9fa0, 0x5131, 0x512d, 0x512e, 0x5698, 0x569c, 0x5697, 0x569a, 0x569d, 0x5699, 0x5970, 0x5b3c, 0x5c69, 0x5c6a, 0x5dc0, 0x5e6d, 0x5e6e, 0x61d8, 0x61df, 0x61ed, 0x61ee, 0x61f1, 0x61ea, 0x61f0, 0x61eb, 0x61d6, 0x61e9, 0x64ff, 0x6504, 0x64fd, 0x64f8, 0x6501, 0x6503, 0x64fc, 0x6594, 0x65db, 0x66da, 0x66db, 0x66d8, 0x6ac5, 0x6ab9, 0x6abd, 0x6ae1, 0x6ac6, 0x6aba, 0x6ab6, 0x6ab7, 0x6ac7, 0x6ab4, 0x6aad, 0x6b5e, 0x6bc9, 0x6c0b, 0x7007, 0x700c, 0x700d, 0x7001, 0x7005, 0x7014, 0x700e, 0x6fff, 0x7000, 0x6ffb, 0x7026, 0x6ffc, 0x6ff7, 0x700a, 0x7201, 0x71ff, 0x71f9, 0x7203, 0x71fd, 0x7376 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ 63 ] = { 0x74b8, 0x74c0, 0x74b5, 0x74c1, 0x74be, 0x74b6, 0x74bb, 0x74c2, 0x7514, 0x7513, 0x765c, 0x7664, 0x7659, 0x7650, 0x7653, 0x7657, 0x765a, 0x76a6, 0x76bd, 0x76ec, 0x77c2, 0x77ba, 0x78ff, 0x790c, 0x7913, 0x7914, 0x7909, 0x7910, 0x7912, 0x7911, 0x79ad, 0x79ac, 0x7a5f, 0x7c1c, 0x7c29, 0x7c19, 0x7c20, 0x7c1f, 0x7c2d, 0x7c1d, 0x7c26, 0x7c28, 0x7c22, 0x7c25, 0x7c30, 0x7e5c, 0x7e50, 0x7e56, 0x7e63, 0x7e58, 0x7e62, 0x7e5f, 0x7e51, 0x7e60, 0x7e57, 0x7e53, 0x7fb5, 0x7fb3, 0x7ff7, 0x7ff8, 0x8075, 0x81d1, 0x81d2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ 94 ] = { 0x81d0, 0x825f, 0x825e, 0x85b4, 0x85c6, 0x85c0, 0x85c3, 0x85c2, 0x85b3, 0x85b5, 0x85bd, 0x85c7, 0x85c4, 0x85bf, 0x85cb, 0x85ce, 0x85c8, 0x85c5, 0x85b1, 0x85b6, 0x85d2, 0x8624, 0x85b8, 0x85b7, 0x85be, 0x8669, 0x87e7, 0x87e6, 0x87e2, 0x87db, 0x87eb, 0x87ea, 0x87e5, 0x87df, 0x87f3, 0x87e4, 0x87d4, 0x87dc, 0x87d3, 0x87ed, 0x87d8, 0x87e3, 0x87a4, 0x87d7, 0x87d9, 0x8801, 0x87f4, 0x87e8, 0x87dd, 0x8953, 0x894b, 0x894f, 0x894c, 0x8946, 0x8950, 0x8951, 0x8949, 0x8b2a, 0x8b27, 0x8b23, 0x8b33, 0x8b30, 0x8b35, 0x8b47, 0x8b2f, 0x8b3c, 0x8b3e, 0x8b31, 0x8b25, 0x8b37, 0x8b26, 0x8b36, 0x8b2e, 0x8b24, 0x8b3b, 0x8b3d, 0x8b3a, 0x8c42, 0x8c75, 0x8c99, 0x8c98, 0x8c97, 0x8cfe, 0x8d04, 0x8d02, 0x8d00, 0x8e5c, 0x8e62, 0x8e60, 0x8e57, 0x8e56, 0x8e5e, 0x8e65, 0x8e67 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ 63 ] = { 0x8e5b, 0x8e5a, 0x8e61, 0x8e5d, 0x8e69, 0x8e54, 0x8f46, 0x8f47, 0x8f48, 0x8f4b, 0x9128, 0x913a, 0x913b, 0x913e, 0x91a8, 0x91a5, 0x91a7, 0x91af, 0x91aa, 0x93b5, 0x938c, 0x9392, 0x93b7, 0x939b, 0x939d, 0x9389, 0x93a7, 0x938e, 0x93aa, 0x939e, 0x93a6, 0x9395, 0x9388, 0x9399, 0x939f, 0x938d, 0x93b1, 0x9391, 0x93b2, 0x93a4, 0x93a8, 0x93b4, 0x93a3, 0x93a5, 0x95d2, 0x95d3, 0x95d1, 0x96b3, 0x96d7, 0x96da, 0x5dc2, 0x96df, 0x96d8, 0x96dd, 0x9723, 0x9722, 0x9725, 0x97ac, 0x97ae, 0x97a8, 0x97ab, 0x97a4, 0x97aa }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ 94 ] = { 0x97a2, 0x97a5, 0x97d7, 0x97d9, 0x97d6, 0x97d8, 0x97fa, 0x9850, 0x9851, 0x9852, 0x98b8, 0x9941, 0x993c, 0x993a, 0x9a0f, 0x9a0b, 0x9a09, 0x9a0d, 0x9a04, 0x9a11, 0x9a0a, 0x9a05, 0x9a07, 0x9a06, 0x9ac0, 0x9adc, 0x9b08, 0x9b04, 0x9b05, 0x9b29, 0x9b35, 0x9b4a, 0x9b4c, 0x9b4b, 0x9bc7, 0x9bc6, 0x9bc3, 0x9bbf, 0x9bc1, 0x9bb5, 0x9bb8, 0x9bd3, 0x9bb6, 0x9bc4, 0x9bb9, 0x9bbd, 0x9d5c, 0x9d53, 0x9d4f, 0x9d4a, 0x9d5b, 0x9d4b, 0x9d59, 0x9d56, 0x9d4c, 0x9d57, 0x9d52, 0x9d54, 0x9d5f, 0x9d58, 0x9d5a, 0x9e8e, 0x9e8c, 0x9edf, 0x9f01, 0x9f00, 0x9f16, 0x9f25, 0x9f2b, 0x9f2a, 0x9f29, 0x9f28, 0x9f4c, 0x9f55, 0x5134, 0x5135, 0x5296, 0x52f7, 0x53b4, 0x56ab, 0x56ad, 0x56a6, 0x56a7, 0x56aa, 0x56ac, 0x58da, 0x58dd, 0x58db, 0x5912, 0x5b3d, 0x5b3e, 0x5b3f, 0x5dc3, 0x5e70 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ 63 ] = { 0x5fbf, 0x61fb, 0x6507, 0x6510, 0x650d, 0x6509, 0x650c, 0x650e, 0x6584, 0x65de, 0x65dd, 0x66de, 0x6ae7, 0x6ae0, 0x6acc, 0x6ad1, 0x6ad9, 0x6acb, 0x6adf, 0x6adc, 0x6ad0, 0x6aeb, 0x6acf, 0x6acd, 0x6ade, 0x6b60, 0x6bb0, 0x6c0c, 0x7019, 0x7027, 0x7020, 0x7016, 0x702b, 0x7021, 0x7022, 0x7023, 0x7029, 0x7017, 0x7024, 0x701c, 0x702a, 0x720c, 0x720a, 0x7207, 0x7202, 0x7205, 0x72a5, 0x72a6, 0x72a4, 0x72a3, 0x72a1, 0x74cb, 0x74c5, 0x74b7, 0x74c3, 0x7516, 0x7660, 0x77c9, 0x77ca, 0x77c4, 0x77f1, 0x791d, 0x791b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ 94 ] = { 0x7921, 0x791c, 0x7917, 0x791e, 0x79b0, 0x7a67, 0x7a68, 0x7c33, 0x7c3c, 0x7c39, 0x7c2c, 0x7c3b, 0x7cec, 0x7cea, 0x7e76, 0x7e75, 0x7e78, 0x7e70, 0x7e77, 0x7e6f, 0x7e7a, 0x7e72, 0x7e74, 0x7e68, 0x7f4b, 0x7f4a, 0x7f83, 0x7f86, 0x7fb7, 0x7ffd, 0x7ffe, 0x8078, 0x81d7, 0x81d5, 0x8264, 0x8261, 0x8263, 0x85eb, 0x85f1, 0x85ed, 0x85d9, 0x85e1, 0x85e8, 0x85da, 0x85d7, 0x85ec, 0x85f2, 0x85f8, 0x85d8, 0x85df, 0x85e3, 0x85dc, 0x85d1, 0x85f0, 0x85e6, 0x85ef, 0x85de, 0x85e2, 0x8800, 0x87fa, 0x8803, 0x87f6, 0x87f7, 0x8809, 0x880c, 0x880b, 0x8806, 0x87fc, 0x8808, 0x87ff, 0x880a, 0x8802, 0x8962, 0x895a, 0x895b, 0x8957, 0x8961, 0x895c, 0x8958, 0x895d, 0x8959, 0x8988, 0x89b7, 0x89b6, 0x89f6, 0x8b50, 0x8b48, 0x8b4a, 0x8b40, 0x8b53, 0x8b56, 0x8b54, 0x8b4b, 0x8b55 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ 63 ] = { 0x8b51, 0x8b42, 0x8b52, 0x8b57, 0x8c43, 0x8c77, 0x8c76, 0x8c9a, 0x8d06, 0x8d07, 0x8d09, 0x8dac, 0x8daa, 0x8dad, 0x8dab, 0x8e6d, 0x8e78, 0x8e73, 0x8e6a, 0x8e6f, 0x8e7b, 0x8ec2, 0x8f52, 0x8f51, 0x8f4f, 0x8f50, 0x8f53, 0x8fb4, 0x9140, 0x913f, 0x91b0, 0x91ad, 0x93de, 0x93c7, 0x93cf, 0x93c2, 0x93da, 0x93d0, 0x93f9, 0x93ec, 0x93cc, 0x93d9, 0x93a9, 0x93e6, 0x93ca, 0x93d4, 0x93ee, 0x93e3, 0x93d5, 0x93c4, 0x93ce, 0x93c0, 0x93d2, 0x93e7, 0x957d, 0x95da, 0x95db, 0x96e1, 0x9729, 0x972b, 0x972c, 0x9728, 0x9726 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ 94 ] = { 0x97b3, 0x97b7, 0x97b6, 0x97dd, 0x97de, 0x97df, 0x985c, 0x9859, 0x985d, 0x9857, 0x98bf, 0x98bd, 0x98bb, 0x98be, 0x9948, 0x9947, 0x9943, 0x99a6, 0x99a7, 0x9a1a, 0x9a15, 0x9a25, 0x9a1d, 0x9a24, 0x9a1b, 0x9a22, 0x9a20, 0x9a27, 0x9a23, 0x9a1e, 0x9a1c, 0x9a14, 0x9ac2, 0x9b0b, 0x9b0a, 0x9b0e, 0x9b0c, 0x9b37, 0x9bea, 0x9beb, 0x9be0, 0x9bde, 0x9be4, 0x9be6, 0x9be2, 0x9bf0, 0x9bd4, 0x9bd7, 0x9bec, 0x9bdc, 0x9bd9, 0x9be5, 0x9bd5, 0x9be1, 0x9bda, 0x9d77, 0x9d81, 0x9d8a, 0x9d84, 0x9d88, 0x9d71, 0x9d80, 0x9d78, 0x9d86, 0x9d8b, 0x9d8c, 0x9d7d, 0x9d6b, 0x9d74, 0x9d75, 0x9d70, 0x9d69, 0x9d85, 0x9d73, 0x9d7b, 0x9d82, 0x9d6f, 0x9d79, 0x9d7f, 0x9d87, 0x9d68, 0x9e94, 0x9e91, 0x9ec0, 0x9efc, 0x9f2d, 0x9f40, 0x9f41, 0x9f4d, 0x9f56, 0x9f57, 0x9f58, 0x5337, 0x56b2 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ 63 ] = { 0x56b5, 0x56b3, 0x58e3, 0x5b45, 0x5dc6, 0x5dc7, 0x5eee, 0x5eef, 0x5fc0, 0x5fc1, 0x61f9, 0x6517, 0x6516, 0x6515, 0x6513, 0x65df, 0x66e8, 0x66e3, 0x66e4, 0x6af3, 0x6af0, 0x6aea, 0x6ae8, 0x6af9, 0x6af1, 0x6aee, 0x6aef, 0x703c, 0x7035, 0x702f, 0x7037, 0x7034, 0x7031, 0x7042, 0x7038, 0x703f, 0x703a, 0x7039, 0x7040, 0x703b, 0x7033, 0x7041, 0x7213, 0x7214, 0x72a8, 0x737d, 0x737c, 0x74ba, 0x76ab, 0x76aa, 0x76be, 0x76ed, 0x77cc, 0x77ce, 0x77cf, 0x77cd, 0x77f2, 0x7925, 0x7923, 0x7927, 0x7928, 0x7924, 0x7929 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ 94 ] = { 0x79b2, 0x7a6e, 0x7a6c, 0x7a6d, 0x7af7, 0x7c49, 0x7c48, 0x7c4a, 0x7c47, 0x7c45, 0x7cee, 0x7e7b, 0x7e7e, 0x7e81, 0x7e80, 0x7fba, 0x7fff, 0x8079, 0x81db, 0x81d9, 0x820b, 0x8268, 0x8269, 0x8622, 0x85ff, 0x8601, 0x85fe, 0x861b, 0x8600, 0x85f6, 0x8604, 0x8609, 0x8605, 0x860c, 0x85fd, 0x8819, 0x8810, 0x8811, 0x8817, 0x8813, 0x8816, 0x8963, 0x8966, 0x89b9, 0x89f7, 0x8b60, 0x8b6a, 0x8b5d, 0x8b68, 0x8b63, 0x8b65, 0x8b67, 0x8b6d, 0x8dae, 0x8e86, 0x8e88, 0x8e84, 0x8f59, 0x8f56, 0x8f57, 0x8f55, 0x8f58, 0x8f5a, 0x908d, 0x9143, 0x9141, 0x91b7, 0x91b5, 0x91b2, 0x91b3, 0x940b, 0x9413, 0x93fb, 0x9420, 0x940f, 0x9414, 0x93fe, 0x9415, 0x9410, 0x9428, 0x9419, 0x940d, 0x93f5, 0x9400, 0x93f7, 0x9407, 0x940e, 0x9416, 0x9412, 0x93fa, 0x9409, 0x93f8, 0x940a, 0x93ff }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ 63 ] = { 0x93fc, 0x940c, 0x93f6, 0x9411, 0x9406, 0x95de, 0x95e0, 0x95df, 0x972e, 0x972f, 0x97b9, 0x97bb, 0x97fd, 0x97fe, 0x9860, 0x9862, 0x9863, 0x985f, 0x98c1, 0x98c2, 0x9950, 0x994e, 0x9959, 0x994c, 0x994b, 0x9953, 0x9a32, 0x9a34, 0x9a31, 0x9a2c, 0x9a2a, 0x9a36, 0x9a29, 0x9a2e, 0x9a38, 0x9a2d, 0x9ac7, 0x9aca, 0x9ac6, 0x9b10, 0x9b12, 0x9b11, 0x9c0b, 0x9c08, 0x9bf7, 0x9c05, 0x9c12, 0x9bf8, 0x9c40, 0x9c07, 0x9c0e, 0x9c06, 0x9c17, 0x9c14, 0x9c09, 0x9d9f, 0x9d99, 0x9da4, 0x9d9d, 0x9d92, 0x9d98, 0x9d90, 0x9d9b }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ 94 ] = { 0x9da0, 0x9d94, 0x9d9c, 0x9daa, 0x9d97, 0x9da1, 0x9d9a, 0x9da2, 0x9da8, 0x9d9e, 0x9da3, 0x9dbf, 0x9da9, 0x9d96, 0x9da6, 0x9da7, 0x9e99, 0x9e9b, 0x9e9a, 0x9ee5, 0x9ee4, 0x9ee7, 0x9ee6, 0x9f30, 0x9f2e, 0x9f5b, 0x9f60, 0x9f5e, 0x9f5d, 0x9f59, 0x9f91, 0x513a, 0x5139, 0x5298, 0x5297, 0x56c3, 0x56bd, 0x56be, 0x5b48, 0x5b47, 0x5dcb, 0x5dcf, 0x5ef1, 0x61fd, 0x651b, 0x6b02, 0x6afc, 0x6b03, 0x6af8, 0x6b00, 0x7043, 0x7044, 0x704a, 0x7048, 0x7049, 0x7045, 0x7046, 0x721d, 0x721a, 0x7219, 0x737e, 0x7517, 0x766a, 0x77d0, 0x792d, 0x7931, 0x792f, 0x7c54, 0x7c53, 0x7cf2, 0x7e8a, 0x7e87, 0x7e88, 0x7e8b, 0x7e86, 0x7e8d, 0x7f4d, 0x7fbb, 0x8030, 0x81dd, 0x8618, 0x862a, 0x8626, 0x861f, 0x8623, 0x861c, 0x8619, 0x8627, 0x862e, 0x8621, 0x8620, 0x8629, 0x861e, 0x8625 }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ 63 ] = { 0x8829, 0x881d, 0x881b, 0x8820, 0x8824, 0x881c, 0x882b, 0x884a, 0x896d, 0x8969, 0x896e, 0x896b, 0x89fa, 0x8b79, 0x8b78, 0x8b45, 0x8b7a, 0x8b7b, 0x8d10, 0x8d14, 0x8daf, 0x8e8e, 0x8e8c, 0x8f5e, 0x8f5b, 0x8f5d, 0x9146, 0x9144, 0x9145, 0x91b9, 0x943f, 0x943b, 0x9436, 0x9429, 0x943d, 0x943c, 0x9430, 0x9439, 0x942a, 0x9437, 0x942c, 0x9440, 0x9431, 0x95e5, 0x95e4, 0x95e3, 0x9735, 0x973a, 0x97bf, 0x97e1, 0x9864, 0x98c9, 0x98c6, 0x98c0, 0x9958, 0x9956, 0x9a39, 0x9a3d, 0x9a46, 0x9a44, 0x9a42, 0x9a41, 0x9a3a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ 94 ] = { 0x9a3f, 0x9acd, 0x9b15, 0x9b17, 0x9b18, 0x9b16, 0x9b3a, 0x9b52, 0x9c2b, 0x9c1d, 0x9c1c, 0x9c2c, 0x9c23, 0x9c28, 0x9c29, 0x9c24, 0x9c21, 0x9db7, 0x9db6, 0x9dbc, 0x9dc1, 0x9dc7, 0x9dca, 0x9dcf, 0x9dbe, 0x9dc5, 0x9dc3, 0x9dbb, 0x9db5, 0x9dce, 0x9db9, 0x9dba, 0x9dac, 0x9dc8, 0x9db1, 0x9dad, 0x9dcc, 0x9db3, 0x9dcd, 0x9db2, 0x9e7a, 0x9e9c, 0x9eeb, 0x9eee, 0x9eed, 0x9f1b, 0x9f18, 0x9f1a, 0x9f31, 0x9f4e, 0x9f65, 0x9f64, 0x9f92, 0x4eb9, 0x56c6, 0x56c5, 0x56cb, 0x5971, 0x5b4b, 0x5b4c, 0x5dd5, 0x5dd1, 0x5ef2, 0x6521, 0x6520, 0x6526, 0x6522, 0x6b0b, 0x6b08, 0x6b09, 0x6c0d, 0x7055, 0x7056, 0x7057, 0x7052, 0x721e, 0x721f, 0x72a9, 0x737f, 0x74d8, 0x74d5, 0x74d9, 0x74d7, 0x766d, 0x76ad, 0x7935, 0x79b4, 0x7a70, 0x7a71, 0x7c57, 0x7c5c, 0x7c59, 0x7c5b, 0x7c5a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ 63 ] = { 0x7cf4, 0x7cf1, 0x7e91, 0x7f4f, 0x7f87, 0x81de, 0x826b, 0x8634, 0x8635, 0x8633, 0x862c, 0x8632, 0x8636, 0x882c, 0x8828, 0x8826, 0x882a, 0x8825, 0x8971, 0x89bf, 0x89be, 0x89fb, 0x8b7e, 0x8b84, 0x8b82, 0x8b86, 0x8b85, 0x8b7f, 0x8d15, 0x8e95, 0x8e94, 0x8e9a, 0x8e92, 0x8e90, 0x8e96, 0x8e97, 0x8f60, 0x8f62, 0x9147, 0x944c, 0x9450, 0x944a, 0x944b, 0x944f, 0x9447, 0x9445, 0x9448, 0x9449, 0x9446, 0x973f, 0x97e3, 0x986a, 0x9869, 0x98cb, 0x9954, 0x995b, 0x9a4e, 0x9a53, 0x9a54, 0x9a4c, 0x9a4f, 0x9a48, 0x9a4a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ 94 ] = { 0x9a49, 0x9a52, 0x9a50, 0x9ad0, 0x9b19, 0x9b2b, 0x9b3b, 0x9b56, 0x9b55, 0x9c46, 0x9c48, 0x9c3f, 0x9c44, 0x9c39, 0x9c33, 0x9c41, 0x9c3c, 0x9c37, 0x9c34, 0x9c32, 0x9c3d, 0x9c36, 0x9ddb, 0x9dd2, 0x9dde, 0x9dda, 0x9dcb, 0x9dd0, 0x9ddc, 0x9dd1, 0x9ddf, 0x9de9, 0x9dd9, 0x9dd8, 0x9dd6, 0x9df5, 0x9dd5, 0x9ddd, 0x9eb6, 0x9ef0, 0x9f35, 0x9f33, 0x9f32, 0x9f42, 0x9f6b, 0x9f95, 0x9fa2, 0x513d, 0x5299, 0x58e8, 0x58e7, 0x5972, 0x5b4d, 0x5dd8, 0x882f, 0x5f4f, 0x6201, 0x6203, 0x6204, 0x6529, 0x6525, 0x6596, 0x66eb, 0x6b11, 0x6b12, 0x6b0f, 0x6bca, 0x705b, 0x705a, 0x7222, 0x7382, 0x7381, 0x7383, 0x7670, 0x77d4, 0x7c67, 0x7c66, 0x7e95, 0x826c, 0x863a, 0x8640, 0x8639, 0x863c, 0x8631, 0x863b, 0x863e, 0x8830, 0x8832, 0x882e, 0x8833, 0x8976, 0x8974, 0x8973, 0x89fe }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ 63 ] = { 0x8b8c, 0x8b8e, 0x8b8b, 0x8b88, 0x8c45, 0x8d19, 0x8e98, 0x8f64, 0x8f63, 0x91bc, 0x9462, 0x9455, 0x945d, 0x9457, 0x945e, 0x97c4, 0x97c5, 0x9800, 0x9a56, 0x9a59, 0x9b1e, 0x9b1f, 0x9b20, 0x9c52, 0x9c58, 0x9c50, 0x9c4a, 0x9c4d, 0x9c4b, 0x9c55, 0x9c59, 0x9c4c, 0x9c4e, 0x9dfb, 0x9df7, 0x9def, 0x9de3, 0x9deb, 0x9df8, 0x9de4, 0x9df6, 0x9de1, 0x9dee, 0x9de6, 0x9df2, 0x9df0, 0x9de2, 0x9dec, 0x9df4, 0x9df3, 0x9de8, 0x9ded, 0x9ec2, 0x9ed0, 0x9ef2, 0x9ef3, 0x9f06, 0x9f1c, 0x9f38, 0x9f37, 0x9f36, 0x9f43, 0x9f4f }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ 94 ] = { 0x9f71, 0x9f70, 0x9f6e, 0x9f6f, 0x56d3, 0x56cd, 0x5b4e, 0x5c6d, 0x652d, 0x66ed, 0x66ee, 0x6b13, 0x705f, 0x7061, 0x705d, 0x7060, 0x7223, 0x74db, 0x74e5, 0x77d5, 0x7938, 0x79b7, 0x79b6, 0x7c6a, 0x7e97, 0x7f89, 0x826d, 0x8643, 0x8838, 0x8837, 0x8835, 0x884b, 0x8b94, 0x8b95, 0x8e9e, 0x8e9f, 0x8ea0, 0x8e9d, 0x91be, 0x91bd, 0x91c2, 0x946b, 0x9468, 0x9469, 0x96e5, 0x9746, 0x9743, 0x9747, 0x97c7, 0x97e5, 0x9a5e, 0x9ad5, 0x9b59, 0x9c63, 0x9c67, 0x9c66, 0x9c62, 0x9c5e, 0x9c60, 0x9e02, 0x9dfe, 0x9e07, 0x9e03, 0x9e06, 0x9e05, 0x9e00, 0x9e01, 0x9e09, 0x9dff, 0x9dfd, 0x9e04, 0x9ea0, 0x9f1e, 0x9f46, 0x9f74, 0x9f75, 0x9f76, 0x56d4, 0x652e, 0x65b8, 0x6b18, 0x6b19, 0x6b17, 0x6b1a, 0x7062, 0x7226, 0x72aa, 0x77d8, 0x77d9, 0x7939, 0x7c69, 0x7c6b, 0x7cf6, 0x7e9a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf940[ 63 ] = { 0x7e98, 0x7e9b, 0x7e99, 0x81e0, 0x81e1, 0x8646, 0x8647, 0x8648, 0x8979, 0x897a, 0x897c, 0x897b, 0x89ff, 0x8b98, 0x8b99, 0x8ea5, 0x8ea4, 0x8ea3, 0x946e, 0x946d, 0x946f, 0x9471, 0x9473, 0x9749, 0x9872, 0x995f, 0x9c68, 0x9c6e, 0x9c6d, 0x9e0b, 0x9e0d, 0x9e10, 0x9e0f, 0x9e12, 0x9e11, 0x9ea1, 0x9ef5, 0x9f09, 0x9f47, 0x9f78, 0x9f7b, 0x9f7a, 0x9f79, 0x571e, 0x7066, 0x7c6f, 0x883c, 0x8db2, 0x8ea6, 0x91c3, 0x9474, 0x9478, 0x9476, 0x9475, 0x9a60, 0x9c74, 0x9c73, 0x9c71, 0x9c75, 0x9e14, 0x9e13, 0x9ef6, 0x9f0a }; const uint16_t libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ 94 ] = { 0x9fa4, 0x7068, 0x7065, 0x7cf7, 0x866a, 0x883e, 0x883d, 0x883f, 0x8b9e, 0x8c9c, 0x8ea9, 0x8ec9, 0x974b, 0x9873, 0x9874, 0x98cc, 0x9961, 0x99ab, 0x9a64, 0x9a66, 0x9a67, 0x9b24, 0x9e15, 0x9e17, 0x9f48, 0x6207, 0x6b1e, 0x7227, 0x864c, 0x8ea8, 0x9482, 0x9480, 0x9481, 0x9a69, 0x9a68, 0x9b2e, 0x9e19, 0x7229, 0x864b, 0x8b9f, 0x9483, 0x9c79, 0x9eb7, 0x7675, 0x9a6b, 0x9c7a, 0x9e1d, 0x7069, 0x706a, 0x9ea4, 0x9f7e, 0x9f49, 0x9f98, 0x7881, 0x92b9, 0x88cf, 0x58bb, 0x6052, 0x7ca7, 0x5afa, 0x2554, 0x2566, 0x2557, 0x2560, 0x256c, 0x2563, 0x255a, 0x2569, 0x255d, 0x2552, 0x2564, 0x2555, 0x255e, 0x256a, 0x2561, 0x2558, 0x2567, 0x255b, 0x2553, 0x2565, 0x2556, 0x255f, 0x256b, 0x2562, 0x2559, 0x2568, 0x255c, 0x2551, 0x2550, 0x256d, 0x256e, 0x2570, 0x256f, 0x2593, }; /* Unicode to ASCII character lookup table for Windows 950 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ 128 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2a1, 0x58a2, 0xd3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x02c0[ 320 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbea3, 0x001a, 0xbca3, 0xbda3, 0xbfa3, 0x001a, 0xc5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbba3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44a3, 0x45a3, 0x46a3, 0x47a3, 0x48a3, 0x49a3, 0x4aa3, 0x4ba3, 0x4ca3, 0x4da3, 0x4ea3, 0x4fa3, 0x50a3, 0x51a3, 0x52a3, 0x53a3, 0x54a3, 0x001a, 0x55a3, 0x56a3, 0x57a3, 0x58a3, 0x59a3, 0x5aa3, 0x5ba3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ca3, 0x5da3, 0x5ea3, 0x5fa3, 0x60a3, 0x61a3, 0x62a3, 0x63a3, 0x64a3, 0x65a3, 0x66a3, 0x67a3, 0x68a3, 0x69a3, 0x6aa3, 0x6ba3, 0x6ca3, 0x001a, 0x6da3, 0x6ea3, 0x6fa3, 0x70a3, 0x71a3, 0x72a3, 0x73a3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2000[ 768 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56a1, 0x58a1, 0x001a, 0x001a, 0x001a, 0xa5a1, 0xa6a1, 0x001a, 0x001a, 0xa7a1, 0xa8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ca1, 0x4ba1, 0x45a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaca1, 0x001a, 0x001a, 0xaba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa2, 0x001a, 0xc1a1, 0x001a, 0x001a, 0x001a, 0x4ba2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9a2, 0xbaa2, 0xbba2, 0xbca2, 0xbda2, 0xbea2, 0xbfa2, 0xc0a2, 0xc1a2, 0xc2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6a1, 0xf4a1, 0xf7a1, 0xf5a1, 0x001a, 0x001a, 0xf8a1, 0xf9a1, 0xfba1, 0xfaa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41a2, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4a1, 0x001a, 0x001a, 0x001a, 0xdba1, 0xe8a1, 0xe7a1, 0x001a, 0x001a, 0xfda1, 0x001a, 0xfca1, 0x001a, 0x001a, 0x001a, 0xe4a1, 0xe5a1, 0xeca1, 0x001a, 0x001a, 0xeda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefa1, 0xeea1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdca1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaa1, 0xdda1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8a1, 0xd9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2a1, 0x001a, 0x001a, 0x001a, 0xf3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2500[ 384 ] = { 0x77a2, 0x001a, 0x78a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7aa2, 0x001a, 0x001a, 0x001a, 0x7ba2, 0x001a, 0x001a, 0x001a, 0x7ca2, 0x001a, 0x001a, 0x001a, 0x7da2, 0x001a, 0x001a, 0x001a, 0x75a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x71a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a2, 0xf8f9, 0xe6f9, 0xeff9, 0xddf9, 0xe8f9, 0xf1f9, 0xdff9, 0xecf9, 0xf5f9, 0xe3f9, 0xeef9, 0xf7f9, 0xe5f9, 0xa5a2, 0xf2f9, 0xe0f9, 0xa7a2, 0xf4f9, 0xe2f9, 0xe7f9, 0xf0f9, 0xdef9, 0xedf9, 0xf6f9, 0xe4f9, 0xa6a2, 0xf3f9, 0xe1f9, 0x7ea2, 0xa1a2, 0xa3a2, 0xa2a2, 0xaca2, 0xada2, 0xaea2, 0x5aa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62a2, 0x63a2, 0x64a2, 0x65a2, 0x66a2, 0x67a2, 0x68a2, 0x69a2, 0x70a2, 0x6fa2, 0x6ea2, 0x6da2, 0x6ca2, 0x6ba2, 0x6aa2, 0x001a, 0x001a, 0x001a, 0xfef9, 0x76a2, 0x79a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbda1, 0xbca1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6a1, 0xb5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfa1, 0xbea1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbba1, 0xbaa1, 0x001a, 0x001a, 0x001a, 0xb3a1, 0x001a, 0x001a, 0xb7a1, 0xb4a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a2, 0xa9a2, 0xaba2, 0xaaa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9a1, 0xb8a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0a1, 0x001a, 0xf1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x3000[ 1024 ] = { 0x40a1, 0x42a1, 0x43a1, 0xb2a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x71a1, 0x72a1, 0x6da1, 0x6ea1, 0x75a1, 0x76a1, 0x79a1, 0x7aa1, 0x69a1, 0x6aa1, 0x45a2, 0x001a, 0x65a1, 0x66a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9a1, 0xaaa1, 0x001a, 0x001a, 0xc3a2, 0xc4a2, 0xc5a2, 0xc6a2, 0xc7a2, 0xc8a2, 0xc9a2, 0xcaa2, 0xcba2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74a3, 0x75a3, 0x76a3, 0x77a3, 0x78a3, 0x79a3, 0x7aa3, 0x7ba3, 0x7ca3, 0x7da3, 0x7ea3, 0xa1a3, 0xa2a3, 0xa3a3, 0xa4a3, 0xa5a3, 0xa6a3, 0xa7a3, 0xa8a3, 0xa9a3, 0xaaa3, 0xaba3, 0xaca3, 0xada3, 0xaea3, 0xafa3, 0xb0a3, 0xb1a3, 0xb2a3, 0xb3a3, 0xb4a3, 0xb5a3, 0xb6a3, 0xb7a3, 0xb8a3, 0xb9a3, 0xbaa3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55a2, 0x56a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a2, 0x51a2, 0x52a2, 0x001a, 0x001a, 0x54a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a2, 0x001a, 0x001a, 0xeba1, 0xeaa1, 0x001a, 0x001a, 0x4fa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0x4e00[ 20928 ] = { 0x40a4, 0x42a4, 0x001a, 0x43a4, 0x001a, 0x001a, 0x001a, 0x45c9, 0x56a4, 0x54a4, 0x57a4, 0x55a4, 0x46c9, 0xa3a4, 0x4fc9, 0x4dc9, 0xa2a4, 0xa1a4, 0x001a, 0x001a, 0x42a5, 0x41a5, 0x40a5, 0x001a, 0x43a5, 0xfea4, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0a5, 0xe1a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x58a4, 0x001a, 0xa4a4, 0x50c9, 0x001a, 0xa5a4, 0x63c9, 0xeaa6, 0xb1cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x59a4, 0xa6a4, 0x001a, 0x44a5, 0x64c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40c9, 0x44a4, 0x001a, 0x5ba4, 0x001a, 0x47c9, 0x5ca4, 0x001a, 0x001a, 0xa7a4, 0x001a, 0x45a5, 0x47a5, 0x46a5, 0x001a, 0x001a, 0xe2a5, 0xe3a5, 0x001a, 0x001a, 0xc4a8, 0x001a, 0xbcad, 0x41a4, 0x001a, 0x001a, 0x41c9, 0x45a4, 0x5ea4, 0x5da4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeb0, 0x4bd4, 0x001a, 0x001a, 0xc3b6, 0xb1dc, 0xb2dc, 0x001a, 0x46a4, 0x001a, 0xa9a4, 0x001a, 0x001a, 0xc6a8, 0x47a4, 0x48c9, 0x5fa4, 0x001a, 0x001a, 0xaaa4, 0xaca4, 0x51c9, 0xada4, 0xaba4, 0x001a, 0x001a, 0x001a, 0xe5a5, 0x001a, 0xc7a8, 0x001a, 0x001a, 0xc8a8, 0x45ab, 0x001a, 0x60a4, 0xaea4, 0x001a, 0xe6a5, 0xe8a5, 0xe7a5, 0x001a, 0xeba6, 0x001a, 0x001a, 0xc9a8, 0xcaa8, 0x46ab, 0x47ab, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdad, 0x001a, 0x001a, 0xb3dc, 0x001a, 0x001a, 0xd6f6, 0x48a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a4, 0xafa4, 0x52c9, 0xb1a4, 0xb7a4, 0x001a, 0xb2a4, 0xb3a4, 0x54c9, 0x53c9, 0xb5a4, 0xb6a4, 0x001a, 0xb4a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa5, 0x4ba5, 0x4ca5, 0x4da5, 0x49a5, 0x50a5, 0x6ac9, 0x001a, 0x66c9, 0x69c9, 0x51a5, 0x61a5, 0x001a, 0x68c9, 0x001a, 0x4ea5, 0x4fa5, 0x48a5, 0x001a, 0x001a, 0x65c9, 0x67c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5a5, 0xb0c9, 0xf2a5, 0xf6a5, 0xbac9, 0xaec9, 0xf3a5, 0xb2c9, 0x001a, 0x001a, 0x001a, 0xf4a5, 0x001a, 0xf7a5, 0x001a, 0xe9a5, 0xb1c9, 0xf8a5, 0xb5c9, 0x001a, 0xb9c9, 0xb6c9, 0x001a, 0x001a, 0xb3c9, 0xeaa5, 0xeca5, 0xf9a5, 0x001a, 0xeea5, 0xabc9, 0xf1a5, 0xefa5, 0xf0a5, 0xbbc9, 0xb8c9, 0xafc9, 0xeda5, 0x001a, 0x001a, 0xacc9, 0xeba5, 0x001a, 0x001a, 0x001a, 0xb4c9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadc9, 0x66ca, 0x001a, 0x42a7, 0xf4a6, 0x001a, 0x001a, 0x67ca, 0xf1a6, 0x001a, 0x44a7, 0x001a, 0xf9a6, 0x001a, 0xf8a6, 0x5bca, 0xfca6, 0xf7a6, 0x60ca, 0x68ca, 0x001a, 0x64ca, 0x001a, 0xfaa6, 0x001a, 0x001a, 0xfda6, 0xeea6, 0x47a7, 0x5dca, 0x001a, 0x001a, 0xbdcb, 0xeca6, 0x43a7, 0xeda6, 0xf5a6, 0xf6a6, 0x62ca, 0x5eca, 0xfba6, 0xf3a6, 0x5aca, 0xefa6, 0x65ca, 0x45a7, 0x48a7, 0xf2a6, 0x40a7, 0x46a7, 0xf0a6, 0x63ca, 0x41a7, 0x69ca, 0x5cca, 0xfea6, 0x5fca, 0x001a, 0x001a, 0x61ca, 0x001a, 0xd8a8, 0xbfcb, 0xcbcb, 0xd0a8, 0x001a, 0xcccb, 0xcba8, 0xd5a8, 0x001a, 0x001a, 0xcea8, 0xb9cb, 0xd6a8, 0xb8cb, 0xbccb, 0xc3cb, 0xc1cb, 0xdea8, 0xd9a8, 0xb3cb, 0xb5cb, 0xdba8, 0xcfa8, 0xb6cb, 0xc2cb, 0xc9cb, 0xd4a8, 0xbbcb, 0xb4cb, 0xd3a8, 0xb7cb, 0xd7a8, 0xbacb, 0x001a, 0xd2a8, 0x001a, 0xcda8, 0x001a, 0xdca8, 0xc4cb, 0xdda8, 0xc8cb, 0x001a, 0xc6cb, 0xcacb, 0xdaa8, 0xbecb, 0xb2cb, 0x001a, 0xc0cb, 0xd1a8, 0xc5cb, 0xcca8, 0xc7cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56ab, 0x4aab, 0x001a, 0x001a, 0xe0cd, 0xe8cd, 0x001a, 0x49ab, 0x51ab, 0x5dab, 0x001a, 0xeecd, 0xeccd, 0xe7cd, 0x001a, 0x001a, 0x001a, 0x4bab, 0xedcd, 0xe3cd, 0x59ab, 0x50ab, 0x58ab, 0xdecd, 0x001a, 0xeacd, 0x001a, 0xe1cd, 0x54ab, 0xe2cd, 0x001a, 0xddcd, 0x5bab, 0x4eab, 0x57ab, 0x4dab, 0x001a, 0xdfcd, 0xe4cd, 0x001a, 0xebcd, 0x55ab, 0x52ab, 0xe6cd, 0x5aab, 0xe9cd, 0xe5cd, 0x4fab, 0x5cab, 0x53ab, 0x4cab, 0x48ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefcd, 0x001a, 0xd7ad, 0xc1ad, 0x001a, 0xd1ad, 0x001a, 0xd6ad, 0xd0d0, 0xcfd0, 0xd4d0, 0xd5d0, 0xc4ad, 0x001a, 0xcdad, 0x001a, 0x001a, 0x001a, 0xdaad, 0x001a, 0xcead, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9d0, 0xc7ad, 0xcad0, 0x001a, 0xdcad, 0x001a, 0xd3ad, 0xbead, 0xbfad, 0xddd0, 0xbfb0, 0x001a, 0xccad, 0xcbad, 0xcbd0, 0xcfad, 0x5bd4, 0xc6ad, 0xd6d0, 0xd5ad, 0xd4ad, 0xcaad, 0xced0, 0xd7d0, 0x001a, 0xc8d0, 0xc9ad, 0xd8d0, 0xd2ad, 0xccd0, 0xc0ad, 0x001a, 0xc3ad, 0xc2ad, 0xd9d0, 0xd0ad, 0xc5ad, 0xd9ad, 0xdbad, 0xd3d0, 0xd8ad, 0x001a, 0xdbd0, 0xcdd0, 0xdcd0, 0x001a, 0xd1d0, 0x001a, 0xdad0, 0x001a, 0xd2d0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ad, 0x001a, 0x001a, 0x001a, 0x63d4, 0x57d4, 0x001a, 0xb3b0, 0x001a, 0x5cd4, 0x62d4, 0xb2b0, 0x55d4, 0xb6b0, 0x59d4, 0x52d4, 0xb4b0, 0x56d4, 0xb9b0, 0xbeb0, 0x001a, 0x67d4, 0x001a, 0x51d4, 0x001a, 0xbab0, 0x001a, 0x66d4, 0x001a, 0x001a, 0xb5b0, 0x58d4, 0xb1b0, 0x53d4, 0x4fd4, 0x5dd4, 0x50d4, 0x4ed4, 0x5ad4, 0x60d4, 0x61d4, 0xb7b0, 0x001a, 0x001a, 0x5bd8, 0x5ed4, 0x4dd4, 0x5fd4, 0x001a, 0xc1b0, 0x64d4, 0xc0b0, 0x4cd4, 0x001a, 0x54d4, 0x65d4, 0xbcb0, 0xbbb0, 0xb8b0, 0xbdb0, 0x001a, 0x001a, 0xafb0, 0x001a, 0x001a, 0xb0b0, 0x001a, 0x001a, 0xc8b3, 0x001a, 0x5ed8, 0x57d8, 0x001a, 0xc5b3, 0x001a, 0x5fd8, 0x001a, 0x001a, 0x001a, 0x55d8, 0x58d8, 0xc4b3, 0x59d8, 0x001a, 0x001a, 0xc7b3, 0x5dd8, 0x001a, 0x53d8, 0x52d8, 0xc9b3, 0x001a, 0xcab3, 0xc6b3, 0xcbb3, 0x51d8, 0x5cd8, 0x5ad8, 0x54d8, 0x001a, 0x001a, 0x001a, 0xc3b3, 0x56d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcab6, 0xc4b6, 0xb7dc, 0xcdb6, 0xbddc, 0xc0dc, 0xc6b6, 0xc7b6, 0xbadc, 0xc5b6, 0xc3dc, 0xcbb6, 0xc4dc, 0x001a, 0xbfdc, 0xccb6, 0x001a, 0xb4dc, 0xc9b6, 0xb5dc, 0x001a, 0xbedc, 0xbcdc, 0x001a, 0xb8dc, 0xc8b6, 0xb6dc, 0xceb6, 0xbbdc, 0xc2dc, 0xb9dc, 0xc1dc, 0x001a, 0x001a, 0xb6b9, 0xb3b9, 0x001a, 0xb4b9, 0x001a, 0xf9e0, 0xf1e0, 0xb2b9, 0xafb9, 0xf2e0, 0x001a, 0x001a, 0xb1b9, 0xf5e0, 0x001a, 0xf7e0, 0x001a, 0x001a, 0xfee0, 0x001a, 0x001a, 0xfde0, 0xf8e0, 0xaeb9, 0xf0e0, 0xacb9, 0xf3e0, 0xb7b9, 0xf6e0, 0x001a, 0xfae0, 0xb0b9, 0xadb9, 0xfce0, 0xfbe0, 0xb5b9, 0x001a, 0xf4e0, 0x001a, 0xf8bb, 0xece4, 0x001a, 0xe9e4, 0xf9bb, 0x001a, 0xf7bb, 0x001a, 0xf0e4, 0xede4, 0xe6e4, 0xf6bb, 0x001a, 0xfabb, 0xe7e4, 0xf5bb, 0xfdbb, 0xeae4, 0xebe4, 0xfbbb, 0xfcbb, 0xf1e4, 0xeee4, 0xefe4, 0x001a, 0x001a, 0x001a, 0xaabe, 0xf8e8, 0xa7be, 0xf5e8, 0xa9be, 0xabbe, 0x001a, 0xf6e8, 0xa8be, 0x001a, 0xf7e8, 0x001a, 0xf4e8, 0x001a, 0x001a, 0x76c0, 0xbdec, 0x77c0, 0xbbec, 0x001a, 0xbcec, 0xbaec, 0xb9ec, 0x001a, 0x001a, 0xbeec, 0x75c0, 0x001a, 0x001a, 0xb8ef, 0xb9ef, 0x001a, 0xe8e4, 0xb7ef, 0x78c0, 0x5fc3, 0xebf1, 0xecf1, 0x001a, 0xd7c4, 0xd8c4, 0xc1f5, 0xc0f5, 0x6cc5, 0x6bc5, 0xd0f7, 0x001a, 0x49a4, 0x61a4, 0xb9a4, 0x001a, 0xb8a4, 0x53a5, 0x52a5, 0xfca5, 0xfba5, 0xfda5, 0xfaa5, 0x001a, 0x4aa7, 0x49a7, 0x4ba7, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0a8, 0x001a, 0xdfa8, 0xe1a8, 0x001a, 0x5eab, 0x001a, 0x59a2, 0xded0, 0x5aa2, 0xc2b0, 0x5ca2, 0x5ba2, 0x60d8, 0x001a, 0x5da2, 0xb8b9, 0x5ea2, 0x001a, 0x4aa4, 0x001a, 0xbaa4, 0xfea5, 0xe2a8, 0x001a, 0x4ba4, 0xbda4, 0xbba4, 0xbca4, 0x001a, 0x001a, 0x40a6, 0x001a, 0x001a, 0x001a, 0x4ca7, 0xe4a8, 0xe3a8, 0xe5a8, 0x001a, 0x001a, 0x001a, 0xddad, 0x001a, 0x001a, 0x001a, 0xacbe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ec9, 0x001a, 0x54a5, 0x55a5, 0x001a, 0x001a, 0x41a6, 0x001a, 0x6aca, 0x001a, 0x60ab, 0x5fab, 0xe0d0, 0xdfd0, 0xc3b0, 0x001a, 0xbea4, 0x55c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdcb, 0x001a, 0x61ab, 0x001a, 0xe0ad, 0x001a, 0xdead, 0xdfad, 0x001a, 0x001a, 0x001a, 0x001a, 0xadbe, 0x001a, 0x56a5, 0x001a, 0x001a, 0x001a, 0x42a6, 0xbcc9, 0x001a, 0x001a, 0x001a, 0x001a, 0x4da7, 0x4ea7, 0x001a, 0x6bca, 0x001a, 0x001a, 0xcecb, 0xe6a8, 0xcfcb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2d0, 0xe3d0, 0xe3ad, 0x001a, 0xe4d0, 0x001a, 0xe1d0, 0xe4ad, 0xe2ad, 0xe1ad, 0xe5d0, 0x001a, 0x68d4, 0x001a, 0x001a, 0x001a, 0x61d8, 0x001a, 0x001a, 0xc5dc, 0x40e1, 0x001a, 0x001a, 0x001a, 0xfebb, 0xaebe, 0xf9e8, 0x001a, 0x4ca4, 0x5aa4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4b0, 0xcdb3, 0x001a, 0xb9b9, 0x001a, 0x42c9, 0xbfa4, 0x001a, 0x59a5, 0x57a5, 0x58a5, 0x001a, 0x001a, 0xe7a8, 0x001a, 0x001a, 0x4da4, 0x4ea4, 0x001a, 0x62a4, 0x001a, 0x001a, 0xc0a4, 0xc1a4, 0xc2a4, 0xbec9, 0x5aa5, 0x001a, 0x6bc9, 0x001a, 0x46a6, 0x001a, 0xbfc9, 0x44a6, 0x45a6, 0xbdc9, 0x001a, 0x001a, 0x47a6, 0x43a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x6cca, 0xecaa, 0x6dca, 0x001a, 0x001a, 0x6eca, 0x001a, 0x001a, 0x50a7, 0x4fa7, 0x001a, 0x001a, 0x53a7, 0x51a7, 0x52a7, 0x001a, 0x001a, 0x001a, 0xeda8, 0x001a, 0xeca8, 0xd4cb, 0xd1cb, 0xd2cb, 0x001a, 0xd0cb, 0xeea8, 0xeaa8, 0xe9a8, 0x001a, 0xeba8, 0xe8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefa8, 0x001a, 0x63ab, 0xf0cd, 0x001a, 0xd3cb, 0x68ab, 0x001a, 0xf1cd, 0x64ab, 0x67ab, 0x66ab, 0x65ab, 0x62ab, 0x001a, 0x001a, 0x001a, 0xe8d0, 0x001a, 0xe7ad, 0xebd0, 0xe5ad, 0x001a, 0x001a, 0x001a, 0xe7d0, 0xe8ad, 0xe6ad, 0xe9ad, 0xe9d0, 0xead0, 0x001a, 0xe6d0, 0xecd0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1b3, 0xc5b0, 0x69d4, 0x6bd4, 0x6ad4, 0x6cd4, 0xc6b0, 0x001a, 0x001a, 0xceb3, 0x001a, 0xcfb3, 0xd0b3, 0x001a, 0xd0b6, 0xc7dc, 0x001a, 0xc6dc, 0xc8dc, 0xc9dc, 0xd1b6, 0x001a, 0xcfb6, 0x41e1, 0x42e1, 0xbbb9, 0xbab9, 0x5ae3, 0x001a, 0x001a, 0x40bc, 0x41bc, 0x42bc, 0x44bc, 0xf2e4, 0xf3e4, 0x43bc, 0x001a, 0x001a, 0x001a, 0xafbe, 0x001a, 0xb0be, 0x001a, 0x001a, 0xedf1, 0xc3f5, 0xc2f5, 0xd1f7, 0x001a, 0x4fa4, 0x001a, 0x001a, 0x001a, 0x5ca5, 0x5ba5, 0x001a, 0x001a, 0x48a6, 0x001a, 0x001a, 0xc0c9, 0x001a, 0x001a, 0x55a7, 0x56a7, 0x54a7, 0x57a7, 0x6fca, 0x70ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1a8, 0xd5cb, 0x001a, 0xf0a8, 0x001a, 0xf2cd, 0x6cab, 0xf3cd, 0x6bab, 0x001a, 0x001a, 0x001a, 0x69ab, 0x001a, 0x6aab, 0x001a, 0x001a, 0x001a, 0xedd0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7b0, 0x6ed4, 0x001a, 0xcab0, 0x6dd4, 0xe5b1, 0xc9b0, 0xc8b0, 0x001a, 0xd4b3, 0x001a, 0xd3b3, 0xd2b3, 0xd2b6, 0x001a, 0x001a, 0xd5b6, 0xd6b6, 0xd4b6, 0x001a, 0xd3b6, 0x001a, 0x001a, 0x43e1, 0x001a, 0x44e1, 0x001a, 0x001a, 0x001a, 0xf5e4, 0x45bc, 0xf4e4, 0x001a, 0xb1be, 0xbfec, 0x79c0, 0x001a, 0xeef1, 0x55c4, 0x001a, 0x63a4, 0xc3a4, 0x56c9, 0x001a, 0xc4a4, 0xc5a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5da5, 0x5ea5, 0x001a, 0x49a6, 0x71ca, 0xd6cb, 0xd7cb, 0x001a, 0x6dab, 0xeed0, 0xccb0, 0xcbb0, 0x63d8, 0x62d8, 0x001a, 0x001a, 0x50a4, 0xc6a4, 0x5fa5, 0x001a, 0xcdb0, 0x43c9, 0x001a, 0x6cc9, 0x60a5, 0x001a, 0xc2c9, 0x4ba6, 0x4aa6, 0xc1c9, 0x58a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaad, 0x001a, 0x001a, 0x6fd4, 0x001a, 0xd7b6, 0x45e1, 0xbcb9, 0x001a, 0x001a, 0xfae8, 0x001a, 0x001a, 0xfdf3, 0x001a, 0xc7a4, 0x001a, 0x001a, 0xd8cb, 0xf4cd, 0xd0b0, 0xceb0, 0xcfb0, 0xcca2, 0x001a, 0x64a4, 0xcda2, 0xcea2, 0x001a, 0xc9a4, 0xc8a4, 0x63a5, 0x62a5, 0x001a, 0x6dc9, 0xc3c9, 0x001a, 0x001a, 0x001a, 0xf5a8, 0xf2a8, 0xf4a8, 0xf3a8, 0x001a, 0x001a, 0x6eab, 0x001a, 0x001a, 0xd5b3, 0x001a, 0x52a4, 0x001a, 0xcba4, 0x001a, 0x65a5, 0x64a5, 0x001a, 0x72ca, 0x001a, 0x001a, 0xf6a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57c9, 0x001a, 0x67a5, 0x66a5, 0x4ca6, 0x4da6, 0x73ca, 0x59a7, 0x001a, 0x5aa7, 0x001a, 0xf7a8, 0xf8a8, 0xf9a8, 0x001a, 0x6fab, 0xf5cd, 0x001a, 0x001a, 0xebad, 0x001a, 0x001a, 0x44c9, 0x001a, 0xcca4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4c9, 0x001a, 0x001a, 0x001a, 0x74ca, 0x75ca, 0x001a, 0x001a, 0xd9cb, 0x001a, 0xdacb, 0x001a, 0xf7cd, 0xf6cd, 0xf9cd, 0xf8cd, 0x70ab, 0x001a, 0x70d4, 0xedad, 0xefd0, 0xecad, 0x001a, 0x001a, 0x001a, 0x001a, 0x64d8, 0xd6b3, 0x001a, 0x65d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x46e1, 0xbdb9, 0x001a, 0x001a, 0x001a, 0x001a, 0x46bc, 0x001a, 0xeff1, 0x001a, 0x001a, 0x001a, 0x001a, 0x58c9, 0x001a, 0x68a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a4, 0x65a4, 0xcea4, 0xcda4, 0x001a, 0xcfa4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfba8, 0x001a, 0xfaa8, 0xfca8, 0x001a, 0x001a, 0x001a, 0x71ab, 0x001a, 0x001a, 0x001a, 0xeead, 0x001a, 0xfbe8, 0x4fc2, 0x66a4, 0x6aa5, 0x79a5, 0x74a5, 0x001a, 0x6fa5, 0x6ea5, 0x75a5, 0x73a5, 0x6ca5, 0x7aa5, 0x6da5, 0x69a5, 0x78a5, 0x77a5, 0x76a5, 0x6ba5, 0x001a, 0x72a5, 0x001a, 0x001a, 0x71a5, 0x001a, 0x001a, 0x7ba5, 0x70a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a6, 0x001a, 0x59a6, 0x55a6, 0x001a, 0x5ba6, 0xc5c9, 0x58a6, 0x4ea6, 0x51a6, 0x54a6, 0x50a6, 0x57a6, 0x5aa6, 0x4fa6, 0x52a6, 0x56a6, 0x5ca6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7eca, 0x7bca, 0x001a, 0x67a7, 0x7cca, 0x5ba7, 0x5da7, 0x75a7, 0x70a7, 0x001a, 0x001a, 0x001a, 0xa5ca, 0x7dca, 0x5fa7, 0x61a7, 0xa4ca, 0x68a7, 0x78ca, 0x74a7, 0x76a7, 0x5ca7, 0x6da7, 0x001a, 0x76ca, 0x73a7, 0x001a, 0x64a7, 0x001a, 0x6ea7, 0x6fa7, 0x77ca, 0x6ca7, 0x6aa7, 0x001a, 0x6ba7, 0x71a7, 0xa1ca, 0x5ea7, 0x001a, 0x72a7, 0xa3ca, 0x66a7, 0x63a7, 0x001a, 0x7aca, 0x62a7, 0xa6ca, 0x65a7, 0x001a, 0x69a7, 0x001a, 0x001a, 0x001a, 0x60a7, 0xa2ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x79ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebcb, 0xeacb, 0x4fa9, 0xedcb, 0xefcb, 0xe4cb, 0xe7cb, 0xeecb, 0x50a9, 0x001a, 0x001a, 0xe1cb, 0xe5cb, 0x001a, 0x001a, 0xe9cb, 0x49ce, 0x4ba9, 0x4dce, 0xfda8, 0xe6cb, 0xfea8, 0x4ca9, 0x45a9, 0x41a9, 0x001a, 0xe2cb, 0x44a9, 0x49a9, 0x52a9, 0xe3cb, 0xdccb, 0x43a9, 0xddcb, 0xdfcb, 0x001a, 0x46a9, 0x001a, 0x48a9, 0xdbcb, 0xe0cb, 0x001a, 0x001a, 0x51a9, 0x4da9, 0xe8cb, 0x53a9, 0x001a, 0x4aa9, 0xdecb, 0x47a9, 0x001a, 0x001a, 0x42a9, 0x40a9, 0x001a, 0xeccb, 0x001a, 0x4ea9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48ce, 0xfbcd, 0x4bce, 0x001a, 0x001a, 0xfdcd, 0x78ab, 0xa8ab, 0x74ab, 0xa7ab, 0x7dab, 0xa4ab, 0x72ab, 0xfccd, 0x43ce, 0xa3ab, 0x4fce, 0xa5ab, 0x001a, 0x79ab, 0x001a, 0x001a, 0x45ce, 0x42ce, 0x77ab, 0x001a, 0xfacd, 0xa6ab, 0x4ace, 0x7cab, 0x4cce, 0xa9ab, 0x73ab, 0x7eab, 0x7bab, 0x40ce, 0xa1ab, 0x46ce, 0x47ce, 0x7aab, 0xa2ab, 0x76ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x75ab, 0xfecd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ece, 0x001a, 0x44d1, 0xfbad, 0xf1d0, 0x001a, 0xf6d0, 0xf4ad, 0x40ae, 0xf4d0, 0xefad, 0xf9ad, 0xfead, 0xfbd0, 0x001a, 0xfaad, 0xfdad, 0x001a, 0x001a, 0xfed0, 0xf5ad, 0xf5d0, 0x001a, 0x001a, 0x001a, 0x42d1, 0x43d1, 0x001a, 0xf7ad, 0x41d1, 0xf3ad, 0x43ae, 0x001a, 0xf8d0, 0x001a, 0xf1ad, 0x001a, 0x46d1, 0xf9d0, 0xfdd0, 0xf6ad, 0x42ae, 0xfad0, 0xfcad, 0x40d1, 0x47d1, 0xa1d4, 0x001a, 0x45d1, 0x44ae, 0xf0ad, 0xfcd0, 0xf3d0, 0x001a, 0xf8ad, 0x001a, 0x001a, 0xf2d0, 0x001a, 0x001a, 0xf7d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d0, 0x41ae, 0x001a, 0x001a, 0x77d4, 0x001a, 0xe4b0, 0xa7d4, 0xe2b0, 0xdfb0, 0x7cd4, 0xdbb0, 0xa2d4, 0xe6b0, 0x76d4, 0x7bd4, 0x7ad4, 0xf2ad, 0xe1b0, 0xa5d4, 0x001a, 0xa8d4, 0x73d4, 0x001a, 0xe8b3, 0x001a, 0xa9d4, 0xe7b0, 0x001a, 0xd9b0, 0xd6b0, 0x7ed4, 0xd3b0, 0x001a, 0xa6d4, 0x001a, 0xdab0, 0xaad4, 0x001a, 0x74d4, 0xa4d4, 0xddb0, 0x75d4, 0x78d4, 0x7dd4, 0x001a, 0x001a, 0xdeb0, 0xdcb0, 0xe8b0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3b0, 0x001a, 0xd7b0, 0xd2b1, 0x001a, 0xd8b0, 0x79d4, 0xe5b0, 0xe0b0, 0xa3d4, 0xd5b0, 0x001a, 0x001a, 0x001a, 0xd4b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x71d4, 0x72d4, 0x6ad8, 0x001a, 0x001a, 0x001a, 0xd7b3, 0xdab3, 0x75d8, 0xeeb3, 0x78d8, 0xd8b3, 0x71d8, 0xdeb3, 0xe4b3, 0xbdb5, 0x001a, 0x001a, 0xe2b3, 0x6ed8, 0xefb3, 0xdbb3, 0xe3b3, 0x76d8, 0xd7dc, 0x7bd8, 0x6fd8, 0x001a, 0x66d8, 0x73d8, 0x6dd8, 0xe1b3, 0x79d8, 0x001a, 0x001a, 0xddb3, 0xf1b3, 0xeab3, 0x001a, 0xdfb3, 0xdcb3, 0x001a, 0xe7b3, 0x001a, 0x7ad8, 0x6cd8, 0x72d8, 0x74d8, 0x68d8, 0x77d8, 0xd9b3, 0x67d8, 0x001a, 0xe0b3, 0xf0b3, 0xecb3, 0x69d8, 0xe6b3, 0x001a, 0x001a, 0xedb3, 0xe9b3, 0xe5b3, 0x001a, 0x70d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebb3, 0x001a, 0x001a, 0x001a, 0xd5dc, 0xd1dc, 0x001a, 0xe0dc, 0xcadc, 0xd3dc, 0xe5b6, 0xe6b6, 0xdeb6, 0xdcdc, 0xe8b6, 0xcfdc, 0xcedc, 0xccdc, 0xdedc, 0xdcb6, 0xd8dc, 0xcddc, 0xdfb6, 0xd6dc, 0xdab6, 0xd2dc, 0xd9dc, 0xdbdc, 0x001a, 0x001a, 0xdfdc, 0xe3b6, 0xcbdc, 0xddb6, 0xd0dc, 0x001a, 0xd8b6, 0x001a, 0xe4b6, 0xdadc, 0xe0b6, 0xe1b6, 0xe7b6, 0xdbb6, 0x5fa2, 0xd9b6, 0xd4dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2b6, 0x001a, 0x001a, 0xdddc, 0x001a, 0x001a, 0x001a, 0xcdb9, 0xc8b9, 0x001a, 0x55e1, 0x51e1, 0x001a, 0x4be1, 0xc2b9, 0xbeb9, 0x54e1, 0xbfb9, 0x4ee1, 0x50e1, 0x001a, 0x53e1, 0x001a, 0xc4b9, 0x001a, 0xcbb9, 0xc5b9, 0x001a, 0x001a, 0x49e1, 0xc6b9, 0xc7b9, 0x4ce1, 0xccb9, 0x001a, 0x4ae1, 0x4fe1, 0xc3b9, 0x48e1, 0xc9b9, 0xc1b9, 0x001a, 0x001a, 0x001a, 0xc0b9, 0x4de1, 0x52e1, 0x001a, 0xcab9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x47e1, 0x001a, 0x4dbc, 0x47e5, 0x001a, 0x44e5, 0x001a, 0x47bc, 0x53bc, 0x54bc, 0x001a, 0x4abc, 0x42e5, 0x4cbc, 0xf9e4, 0x52bc, 0x001a, 0x46e5, 0x49bc, 0x48e5, 0x48bc, 0x001a, 0x43e5, 0x45e5, 0x4bbc, 0x41e5, 0xfae4, 0xf7e4, 0x001a, 0x001a, 0x6bd8, 0xfde4, 0x001a, 0xf6e4, 0xfce4, 0xfbe4, 0x001a, 0xf8e4, 0x001a, 0x4fbc, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ebc, 0x001a, 0x001a, 0x001a, 0x50bc, 0xfee4, 0xb2be, 0x40e5, 0x001a, 0x001a, 0x001a, 0x45e9, 0x001a, 0xfde8, 0x001a, 0xbebe, 0x42e9, 0xb6be, 0xbabe, 0x41e9, 0x001a, 0xb9be, 0xb5be, 0xb8be, 0xb3be, 0xbdbe, 0x43e9, 0xfee8, 0xbcbe, 0xfce8, 0xbbbe, 0x44e9, 0x40e9, 0x51bc, 0x001a, 0xbfbe, 0x46e9, 0xb7be, 0xb4be, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6ec, 0xc8ec, 0x7bc0, 0xc9ec, 0xc7ec, 0xc5ec, 0xc4ec, 0x7dc0, 0xc3ec, 0x7ec0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1ec, 0xc2ec, 0x7ac0, 0xa1c0, 0x7cc0, 0x001a, 0x001a, 0xc0ec, 0x001a, 0x50c2, 0x001a, 0xbcef, 0xbaef, 0xbfef, 0xbdef, 0x001a, 0xbbef, 0xbeef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60c3, 0xf2f1, 0xf3f1, 0x56c4, 0x001a, 0xf4f1, 0xf0f1, 0xf5f1, 0xf1f1, 0x51c2, 0x001a, 0x001a, 0x001a, 0xfef3, 0x41f4, 0x59c4, 0x40f4, 0x58c4, 0x57c4, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ac4, 0xc5f5, 0xc6f5, 0x001a, 0xdac4, 0xd9c4, 0xdbc4, 0xc4f5, 0x001a, 0xd8f6, 0xd7f6, 0x001a, 0x6dc5, 0x6fc5, 0x6ec5, 0xd9f6, 0xc8c5, 0xa6f8, 0x001a, 0x001a, 0x001a, 0xf1c5, 0x001a, 0xa5f8, 0xeef8, 0x001a, 0x001a, 0x49c9, 0x001a, 0x001a, 0x7da5, 0x7ca5, 0x001a, 0x5fa6, 0x5ea6, 0xc7c9, 0x5da6, 0xc6c9, 0x001a, 0x001a, 0x79a7, 0xa9ca, 0x001a, 0xa8ca, 0x001a, 0x001a, 0x77a7, 0x7aa7, 0x001a, 0x001a, 0xa7ca, 0x001a, 0x78a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0cb, 0x001a, 0xf1cb, 0x54a9, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaab, 0x001a, 0x48d1, 0x49d1, 0x45ae, 0x46ae, 0x001a, 0x001a, 0xacd4, 0xe9b0, 0xebb0, 0xabd4, 0xeab0, 0x7cd8, 0xf2b3, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9b6, 0xeab6, 0xe1dc, 0x001a, 0xcfb9, 0x001a, 0xceb9, 0x001a, 0x49e5, 0x48e9, 0x47e9, 0x001a, 0x6bf9, 0x67a4, 0x59c9, 0x001a, 0x6ec9, 0x6fc9, 0x001a, 0x001a, 0x001a, 0x001a, 0x62a6, 0x66a6, 0xc9c9, 0x001a, 0x64a6, 0x63a6, 0xc8c9, 0x65a6, 0x61a6, 0x001a, 0x001a, 0x60a6, 0xcac9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6a7, 0x001a, 0x001a, 0xa3a7, 0x001a, 0x7da7, 0xaaca, 0x001a, 0x001a, 0x001a, 0xabca, 0x001a, 0xa1a7, 0x001a, 0xadca, 0x7ba7, 0xaeca, 0xacca, 0x7ea7, 0xa2a7, 0xa5a7, 0xa4a7, 0x7ca7, 0xafca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59a9, 0xfecb, 0x001a, 0x5ba9, 0x001a, 0x5aa9, 0x001a, 0x40cc, 0x58a9, 0x57a9, 0xf5cb, 0x001a, 0xf4cb, 0x001a, 0xf2cb, 0xf7cb, 0xf6cb, 0xf3cb, 0xfccb, 0xfdcb, 0xfacb, 0xf8cb, 0x56a9, 0x001a, 0x001a, 0x001a, 0xfbcb, 0x5ca9, 0x41cc, 0x001a, 0x001a, 0xf9cb, 0x001a, 0xabab, 0x55a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacab, 0x54ce, 0x001a, 0x001a, 0x5ace, 0x001a, 0x001a, 0x001a, 0xb2ab, 0x58ce, 0x5ece, 0x001a, 0x55ce, 0x59ce, 0x5bce, 0x5dce, 0x57ce, 0x001a, 0x56ce, 0x51ce, 0x52ce, 0xadab, 0x001a, 0xafab, 0xaeab, 0x53ce, 0x5cce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50ce, 0x53d1, 0x001a, 0x52d1, 0x57d1, 0x4ed1, 0x001a, 0x51d1, 0x50d1, 0x001a, 0x54d1, 0x001a, 0x58d1, 0x47ae, 0x4aae, 0x001a, 0x001a, 0x4fd1, 0x55d1, 0x001a, 0x001a, 0x001a, 0x49ae, 0x4ad1, 0x001a, 0xb0ab, 0xbad4, 0x56d1, 0x001a, 0x4dd1, 0x001a, 0x48ae, 0x4cd1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1d4, 0x001a, 0x001a, 0xecb0, 0xf0b0, 0xc1d4, 0xafd4, 0xbdd4, 0xf1b0, 0xbfd4, 0x001a, 0xc5d4, 0x001a, 0xc9d4, 0x001a, 0x001a, 0xc0d4, 0xb4d4, 0xbcd4, 0x001a, 0xcad4, 0xc8d4, 0xbed4, 0xb9d4, 0xb2d4, 0xa6d8, 0xb0d4, 0xf5b0, 0xb7d4, 0xf6b0, 0xf2b0, 0xadd4, 0xc3d4, 0xb5d4, 0x001a, 0x001a, 0xb3d4, 0xc6d4, 0xf3b0, 0x001a, 0xccd4, 0xedb0, 0xefb0, 0xbbd4, 0xb6d4, 0x4bae, 0xeeb0, 0xb8d4, 0xc7d4, 0xcbd4, 0xc2d4, 0x001a, 0xc4d4, 0x001a, 0x001a, 0x001a, 0xaed4, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1d8, 0x001a, 0xaad8, 0xa9d8, 0xfab3, 0xa2d8, 0x001a, 0xfbb3, 0xf9b3, 0x001a, 0xa4d8, 0xf6b3, 0xa8d8, 0x001a, 0xa3d8, 0xa5d8, 0x7dd8, 0xf4b3, 0x001a, 0xb2d8, 0xb1d8, 0xaed8, 0xf3b3, 0xf7b3, 0xf8b3, 0x4bd1, 0xabd8, 0xf5b3, 0xf4b0, 0xadd8, 0x7ed8, 0xb0d8, 0xafd8, 0x001a, 0xb3d8, 0x001a, 0xefdc, 0x001a, 0xacd8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7d8, 0xe7dc, 0xf4b6, 0xf7b6, 0xf2b6, 0xe6dc, 0xeadc, 0xe5dc, 0x001a, 0xecb6, 0xf6b6, 0xe2dc, 0xf0b6, 0xe9dc, 0x001a, 0xeeb6, 0xedb6, 0xecdc, 0xefb6, 0xeedc, 0x001a, 0xebdc, 0xebb6, 0x001a, 0x001a, 0x001a, 0xf5b6, 0xf0dc, 0xe4dc, 0xeddc, 0x001a, 0x001a, 0xe3dc, 0x001a, 0x001a, 0xf1b6, 0x001a, 0xf3b6, 0x001a, 0xe8dc, 0x001a, 0xf1dc, 0x001a, 0x001a, 0x5de1, 0xd0b9, 0x63e1, 0x001a, 0x001a, 0xd5b9, 0x5fe1, 0x66e1, 0x57e1, 0xd7b9, 0xd1b9, 0x5ce1, 0x55bc, 0x5be1, 0x64e1, 0xd2b9, 0x001a, 0xd6b9, 0x5ae1, 0x60e1, 0x65e1, 0x56e1, 0xd4b9, 0x5ee1, 0x001a, 0x001a, 0x62e1, 0x68e1, 0x58e1, 0x61e1, 0x001a, 0xd3b9, 0x67e1, 0x001a, 0x001a, 0x001a, 0x59e1, 0x001a, 0x001a, 0x001a, 0x59bc, 0x4be5, 0x57bc, 0x56bc, 0x4de5, 0x52e5, 0x001a, 0x4ee5, 0x001a, 0x51e5, 0x5cbc, 0x001a, 0xa5be, 0x5bbc, 0x001a, 0x4ae5, 0x50e5, 0x001a, 0x5abc, 0x4fe5, 0x001a, 0x4ce5, 0x001a, 0x58bc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de9, 0xd9f9, 0x4fe9, 0x4ae9, 0xc1be, 0x4ce9, 0x001a, 0xc0be, 0x4ee9, 0x001a, 0x001a, 0xc3be, 0x50e9, 0xc2be, 0x49e9, 0x4be9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5c0, 0xccec, 0x001a, 0xa4c0, 0xcdec, 0xa3c0, 0xcbec, 0xa2c0, 0xcaec, 0x001a, 0x53c2, 0x52c2, 0xf6f1, 0xf8f1, 0x001a, 0xf7f1, 0x61c3, 0x62c3, 0x001a, 0x001a, 0x63c3, 0x42f4, 0x5bc4, 0x001a, 0x001a, 0xd3f7, 0xd2f7, 0xf2c5, 0x001a, 0x68a4, 0xd0a4, 0x001a, 0x001a, 0xa7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fce, 0x001a, 0x001a, 0x001a, 0x001a, 0xfcb3, 0xfdb3, 0x001a, 0xf2dc, 0xd8b9, 0x69e1, 0x53e5, 0x001a, 0x001a, 0x001a, 0x5ac9, 0x001a, 0x001a, 0xb0ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x42cc, 0x60ce, 0x59d1, 0x4cae, 0x001a, 0x001a, 0xf9f1, 0x001a, 0xdcc4, 0x69a4, 0x7ea5, 0x70c9, 0x001a, 0x67a6, 0x68a6, 0x001a, 0x5da9, 0x001a, 0x001a, 0x001a, 0xf7b0, 0x001a, 0xdab9, 0x001a, 0xdbb9, 0xd9b9, 0x001a, 0x6aa4, 0x001a, 0xd1a4, 0xd3a4, 0xd2a4, 0x5bc9, 0xd4a4, 0xa1a5, 0x71c9, 0x001a, 0xa2a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x69a6, 0x6aa6, 0x001a, 0x001a, 0x001a, 0xcbc9, 0x001a, 0xa8a7, 0x001a, 0xb1ca, 0x001a, 0x001a, 0x001a, 0x61a9, 0x43cc, 0x001a, 0x5fa9, 0x60a9, 0x5ea9, 0x5ad1, 0x001a, 0x001a, 0x001a, 0xb6ab, 0xb5ab, 0xb7ab, 0xb4ab, 0x001a, 0x61ce, 0x62a9, 0xb3ab, 0x001a, 0x4dae, 0x4eae, 0x001a, 0x4fae, 0x001a, 0xcdd4, 0x001a, 0x001a, 0x001a, 0xfeb3, 0xb4d8, 0xf8b0, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8b6, 0x001a, 0xddb9, 0xdcb9, 0x6ae1, 0x001a, 0x5dbc, 0xc4be, 0x001a, 0xc0ef, 0xdaf6, 0xd4f7, 0x6ba4, 0xa3a5, 0x001a, 0xa4a5, 0xd1c9, 0x6ca6, 0x6fa6, 0x001a, 0xcfc9, 0xcdc9, 0x6ea6, 0xd0c9, 0xd2c9, 0xccc9, 0x71a6, 0x70a6, 0x6da6, 0x6ba6, 0xcec9, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3a7, 0x001a, 0x001a, 0xb0a7, 0xb6ca, 0xb9ca, 0xb8ca, 0x001a, 0xaaa7, 0xb2a7, 0x001a, 0x001a, 0xafa7, 0xb5ca, 0xb3ca, 0xaea7, 0x001a, 0x001a, 0x001a, 0xa9a7, 0xaca7, 0x001a, 0xb4ca, 0xbbca, 0xb7ca, 0xada7, 0xb1a7, 0xb4a7, 0xb2ca, 0xbaca, 0xaba7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x67a9, 0x6fa9, 0x001a, 0x4fcc, 0x48cc, 0x70a9, 0x53cc, 0x44cc, 0x4bcc, 0x001a, 0x001a, 0x66a9, 0x45cc, 0x64a9, 0x4ccc, 0x50cc, 0x63a9, 0x001a, 0x51cc, 0x4acc, 0x001a, 0x4dcc, 0x001a, 0x72a9, 0x69a9, 0x54cc, 0x52cc, 0x001a, 0x6ea9, 0x6ca9, 0x49cc, 0x6ba9, 0x47cc, 0x46cc, 0x6aa9, 0x68a9, 0x71a9, 0x6da9, 0x65a9, 0x001a, 0x4ecc, 0x001a, 0xb9ab, 0x001a, 0xc0ab, 0x6fce, 0xb8ab, 0x67ce, 0x63ce, 0x001a, 0x73ce, 0x62ce, 0x001a, 0xbbab, 0x6cce, 0xbeab, 0xc1ab, 0x001a, 0xbcab, 0x70ce, 0xbfab, 0x001a, 0x56ae, 0x76ce, 0x64ce, 0x001a, 0x001a, 0x66ce, 0x6dce, 0x71ce, 0x75ce, 0x72ce, 0x6bce, 0x6ece, 0x001a, 0x001a, 0x68ce, 0xc3ab, 0x6ace, 0x69ce, 0x74ce, 0xbaab, 0x65ce, 0xc2ab, 0x001a, 0xbdab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cae, 0x62d1, 0x001a, 0x5bae, 0x001a, 0x001a, 0x60d1, 0x001a, 0x50ae, 0x001a, 0x55ae, 0x001a, 0x5fd1, 0x5cd1, 0x61d1, 0x51ae, 0x5bd1, 0x001a, 0x54ae, 0x52ae, 0x001a, 0x63d1, 0x53ae, 0x57ae, 0x001a, 0x001a, 0x58ae, 0x001a, 0x5aae, 0x001a, 0x001a, 0x001a, 0x59ae, 0x001a, 0x001a, 0x001a, 0x5dd1, 0x5ed1, 0x001a, 0x001a, 0x001a, 0x001a, 0x64d1, 0x001a, 0xd4d4, 0xf9b0, 0xc2d8, 0xd3d4, 0xe6d4, 0x001a, 0x001a, 0x40b1, 0x001a, 0xe4d4, 0x001a, 0xfeb0, 0xfab0, 0xedd4, 0xddd4, 0xe0d4, 0x001a, 0x43b1, 0xead4, 0xe2d4, 0xfbb0, 0x44b1, 0x001a, 0xe7d4, 0xe5d4, 0x001a, 0x001a, 0xd6d4, 0xebd4, 0xdfd4, 0xdad4, 0x001a, 0xd0d4, 0xecd4, 0xdcd4, 0xcfd4, 0x001a, 0x42b1, 0xe1d4, 0xeed4, 0xded4, 0xd2d4, 0xd7d4, 0xced4, 0x001a, 0x41b1, 0x001a, 0xdbd4, 0xd8d4, 0xfcb0, 0xd1d4, 0x001a, 0xe9d4, 0xfdb0, 0x001a, 0xd9d4, 0xd5d4, 0x001a, 0x001a, 0xe8d4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40b4, 0xbbd8, 0x001a, 0xb8d8, 0xc9d8, 0xbdd8, 0xcad8, 0x001a, 0x42b4, 0x001a, 0x001a, 0x001a, 0xc6d8, 0xc3d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d8, 0xc7d8, 0xcbd8, 0x001a, 0xe3d4, 0xcdd8, 0x47dd, 0x001a, 0x43b4, 0xced8, 0xb6d8, 0xc0d8, 0x001a, 0xc5d8, 0x001a, 0x001a, 0x41b4, 0x44b4, 0xccd8, 0xcfd8, 0xbad8, 0xb7d8, 0x001a, 0x001a, 0xb9d8, 0x001a, 0x001a, 0xbed8, 0xbcd8, 0x45b4, 0x001a, 0xc8d8, 0x001a, 0x001a, 0xbfd8, 0x001a, 0xc1d8, 0xb5d8, 0xfadc, 0xf8dc, 0x42b7, 0x40b7, 0x43dd, 0xf9dc, 0x44dd, 0x40dd, 0xf7dc, 0x46dd, 0xf6dc, 0xfddc, 0xfeb6, 0xfdb6, 0xfcb6, 0xfbdc, 0x41dd, 0xf9b6, 0x41b7, 0x001a, 0xf4dc, 0x001a, 0xfedc, 0xf3dc, 0xfcdc, 0xfab6, 0x42dd, 0xf5dc, 0xfbb6, 0x45dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee1, 0xe2b9, 0xe1b9, 0xe3b9, 0x7ae1, 0x70e1, 0x76e1, 0x6be1, 0x79e1, 0x78e1, 0x7ce1, 0x75e1, 0xdeb9, 0x74e1, 0xe4b9, 0x001a, 0x6de1, 0xdfb9, 0x001a, 0x7be1, 0xe0b9, 0x6fe1, 0x72e1, 0x77e1, 0x71e1, 0x6ce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e1, 0x55e5, 0x61bc, 0x58e5, 0x57e5, 0x5ae5, 0x5ce5, 0xdcf9, 0x5fbc, 0x001a, 0x56e5, 0x001a, 0x54e5, 0x001a, 0x5de5, 0x5be5, 0x59e5, 0x001a, 0x5fe5, 0x001a, 0x5ee5, 0x63bc, 0x5ebc, 0x001a, 0x60bc, 0x62bc, 0x001a, 0x001a, 0x60e5, 0x57e9, 0x001a, 0x001a, 0x56e9, 0x55e9, 0x001a, 0x58e9, 0x51e9, 0x001a, 0x52e9, 0x5ae9, 0x53e9, 0x001a, 0xc5be, 0x5ce9, 0x001a, 0x5be9, 0x54e9, 0x001a, 0xd1ec, 0xa8c0, 0xcfec, 0xd4ec, 0xd3ec, 0x59e9, 0x001a, 0xa7c0, 0x001a, 0xd2ec, 0xceec, 0xd6ec, 0xd5ec, 0xa6c0, 0x001a, 0xd0ec, 0x001a, 0xc6be, 0x001a, 0x001a, 0x001a, 0x54c2, 0x001a, 0x001a, 0x001a, 0xc1ef, 0xfaf1, 0xfbf1, 0xfcf1, 0x5cc4, 0x001a, 0x001a, 0x5dc4, 0x001a, 0x43f4, 0x001a, 0xc8f5, 0xc7f5, 0x001a, 0x001a, 0xdbf6, 0xdcf6, 0xd5f7, 0xa7f8, 0x001a, 0x6ca4, 0x6da4, 0x001a, 0x6ea4, 0xd5a4, 0xa5a5, 0xd3c9, 0x72a6, 0x73a6, 0x001a, 0xb7a7, 0xb8a7, 0xb6a7, 0xb5a7, 0x001a, 0x73a9, 0x001a, 0x001a, 0x55cc, 0x75a9, 0x74a9, 0x56cc, 0x001a, 0x001a, 0x001a, 0xc4ab, 0x001a, 0x5dae, 0x65d1, 0x001a, 0xf0d4, 0x001a, 0x45b1, 0x47b4, 0xefd4, 0x46b4, 0x001a, 0xe5b9, 0x001a, 0x7de1, 0xc7be, 0x001a, 0xa9c0, 0xd7ec, 0x001a, 0x5ec4, 0x001a, 0x70c5, 0x001a, 0x72c9, 0x001a, 0xa6a5, 0x73c9, 0x76a6, 0x001a, 0x74a6, 0x75a6, 0x77a6, 0x001a, 0xbaa7, 0xb9a7, 0x001a, 0xbcca, 0xbba7, 0x001a, 0x001a, 0xbdca, 0x57cc, 0x001a, 0x58cc, 0x001a, 0x76a9, 0x78a9, 0x7aa9, 0x77a9, 0x7ba9, 0x79a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ab, 0xc5ab, 0xc7ab, 0xc9ab, 0xc6ab, 0x66d1, 0x77ce, 0x001a, 0x001a, 0x001a, 0x68d1, 0x67d1, 0x63ae, 0x001a, 0x5fae, 0x001a, 0x001a, 0x60ae, 0x62ae, 0x64ae, 0x61ae, 0x001a, 0x66ae, 0x65ae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ab1, 0xf2d4, 0xf1d4, 0x49b1, 0x001a, 0x48b1, 0x47b1, 0x4bb1, 0x46b1, 0x001a, 0x001a, 0xd5d8, 0xd2d8, 0x49b4, 0xd1d8, 0xd6d8, 0x001a, 0x4bb4, 0xd4d8, 0x48b4, 0x4ab4, 0xd3d8, 0x001a, 0x48dd, 0x001a, 0x49dd, 0x4add, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6b9, 0xeeb9, 0x7ee1, 0xe8b9, 0xecb9, 0xa1e1, 0xedb9, 0xe9b9, 0xeab9, 0xe7b9, 0xebb9, 0x66bc, 0xd0d8, 0x67bc, 0x65bc, 0x001a, 0x64bc, 0x5de9, 0xc8be, 0xd8ec, 0xd9ec, 0x001a, 0x001a, 0x64c3, 0x5fc4, 0x001a, 0x6fa4, 0x001a, 0x78a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaab, 0x001a, 0x69d1, 0x67ae, 0x001a, 0x001a, 0x4eb1, 0x4db1, 0x4cb1, 0x4cb4, 0x4db4, 0xd7d8, 0xefb9, 0xc9be, 0x70a4, 0x5cc9, 0xd6a4, 0x74c9, 0x001a, 0x001a, 0xd4c9, 0x79a6, 0x001a, 0x001a, 0x001a, 0x7ca9, 0x001a, 0x001a, 0x001a, 0x001a, 0x4bdd, 0x001a, 0x001a, 0x71a4, 0x001a, 0xd7a4, 0xd5c9, 0x001a, 0x001a, 0xbeca, 0x001a, 0xbfca, 0x001a, 0xbca7, 0x001a, 0x001a, 0x001a, 0xd8d8, 0x4eb4, 0x001a, 0x4cdd, 0x001a, 0x001a, 0x001a, 0xaac0, 0x72a4, 0xa8a4, 0xd8a4, 0x75c9, 0xa7a5, 0x001a, 0xc0a7, 0xbfa7, 0xbda7, 0xbea7, 0x001a, 0x001a, 0x59cc, 0x7ea9, 0xa1a9, 0x5acc, 0x7da9, 0x001a, 0x001a, 0xceab, 0x78ce, 0xcdab, 0xcbab, 0xccab, 0x6aae, 0x68ae, 0x001a, 0x001a, 0x6bd1, 0x69ae, 0x6ad1, 0x001a, 0x5eae, 0xf3d4, 0x001a, 0x001a, 0x50b1, 0x51b1, 0x001a, 0x001a, 0x4fb1, 0x001a, 0xf0b9, 0xa2e1, 0x68bc, 0x69bc, 0x001a, 0x61e5, 0xabc0, 0xc2ef, 0xc3ef, 0x001a, 0xddc4, 0xa8f8, 0x4bc9, 0xd9a4, 0x001a, 0x73a4, 0x001a, 0x77c9, 0x76c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x7aa6, 0xd7c9, 0xd8c9, 0xd6c9, 0x001a, 0xd9c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7ca, 0x001a, 0xc2ca, 0xc4ca, 0xc6ca, 0xc3ca, 0xc4a7, 0xc0ca, 0x001a, 0xc1ca, 0xc1a7, 0xc2a7, 0xc5ca, 0xc8ca, 0xc3a7, 0xc9ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68cc, 0x001a, 0x62cc, 0x5dcc, 0xa3a9, 0x65cc, 0x63cc, 0x5ccc, 0x69cc, 0x6ccc, 0x67cc, 0x60cc, 0xa5a9, 0x66cc, 0xa6a9, 0x61cc, 0x64cc, 0x5bcc, 0x5fcc, 0x6bcc, 0xa7a9, 0x001a, 0xa8a9, 0x001a, 0x5ecc, 0x6acc, 0xa2a9, 0xa4a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xabce, 0xa4ce, 0xaace, 0xa3ce, 0xa5ce, 0x7dce, 0x7bce, 0x001a, 0xacce, 0xa9ce, 0x79ce, 0x001a, 0xd0ab, 0xa7ce, 0xa8ce, 0x001a, 0xa6ce, 0x7cce, 0x7ace, 0xcfab, 0xa2ce, 0x7ece, 0x001a, 0x001a, 0xa1ce, 0xadce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fae, 0x001a, 0x6eae, 0x001a, 0x6cd1, 0x6bae, 0x6ed1, 0x001a, 0x70ae, 0x6fd1, 0x001a, 0x001a, 0x73ae, 0x001a, 0x71ae, 0x70d1, 0xaece, 0x72d1, 0x001a, 0x6dae, 0x001a, 0x6cae, 0x001a, 0x6dd1, 0x71d1, 0x72ae, 0x001a, 0x001a, 0x001a, 0x001a, 0x53b1, 0x52b1, 0x001a, 0x001a, 0x001a, 0xf5d4, 0xf9d4, 0xfbd4, 0x54b1, 0xfed4, 0x001a, 0x58b1, 0x41d5, 0x001a, 0x5ab1, 0x001a, 0x56b1, 0x5eb1, 0x001a, 0x5bb1, 0xf7d4, 0x55b1, 0x001a, 0xf6d4, 0xf4d4, 0x43d5, 0xf8d4, 0x001a, 0x57b1, 0x42d5, 0x5cb1, 0xfdd4, 0xfcd4, 0x5db1, 0xfad4, 0x59b1, 0x001a, 0x001a, 0x001a, 0x001a, 0x44d5, 0x001a, 0x40d5, 0xe7d8, 0xeed8, 0xe3d8, 0x51b4, 0xdfd8, 0xefd8, 0xd9d8, 0xecd8, 0xead8, 0xe4d8, 0x001a, 0xedd8, 0xe6d8, 0x001a, 0xded8, 0xf0d8, 0xdcd8, 0xe9d8, 0xdad8, 0x001a, 0xf1d8, 0x001a, 0x52b4, 0x001a, 0xebd8, 0x4fdd, 0xddd8, 0x4fb4, 0x001a, 0xe1d8, 0x001a, 0x50b4, 0xe0d8, 0xe5d8, 0x001a, 0x001a, 0xe2d8, 0x001a, 0x001a, 0x001a, 0xe8d8, 0x001a, 0x001a, 0x001a, 0x001a, 0x53dd, 0x001a, 0x001a, 0x001a, 0x56dd, 0x4edd, 0x001a, 0x50dd, 0x001a, 0x55dd, 0x54dd, 0x43b7, 0x001a, 0xdbd8, 0x52dd, 0x001a, 0x001a, 0x44b7, 0x001a, 0x4ddd, 0x51dd, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9e1, 0x001a, 0xb0e1, 0xa7e1, 0x001a, 0xaee1, 0xa5e1, 0xade1, 0xb1e1, 0xa4e1, 0xa8e1, 0xa3e1, 0x001a, 0xf1b9, 0x001a, 0xa6e1, 0xf2b9, 0xace1, 0xabe1, 0xaae1, 0x001a, 0x001a, 0xafe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x65e5, 0x67e5, 0x6bbc, 0x68e5, 0x001a, 0x63e5, 0x001a, 0x62e5, 0x6ce5, 0x001a, 0x6ae5, 0x6abc, 0x6de5, 0x64e5, 0x69e5, 0x6be5, 0x66e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x61e9, 0x66e9, 0x60e9, 0x65e9, 0x001a, 0x5ee9, 0x68e9, 0x64e9, 0x69e9, 0x63e9, 0x5fe9, 0x67e9, 0x001a, 0x6ae9, 0x62e9, 0x001a, 0xdaec, 0xafc0, 0x001a, 0xadc0, 0x001a, 0xacc0, 0xaec0, 0x001a, 0x001a, 0xc4ef, 0x001a, 0x72f1, 0xfdf1, 0x001a, 0x001a, 0x44f4, 0x45f4, 0x001a, 0x60c4, 0x001a, 0xc9f5, 0x001a, 0xdec4, 0x001a, 0xcaf5, 0x001a, 0xdef6, 0x72c5, 0x001a, 0x71c5, 0xddf6, 0xc9c5, 0x001a, 0xd6f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x74a4, 0x7ba6, 0xdac9, 0xcaca, 0xb5a8, 0x5fb1, 0x001a, 0x001a, 0x75a4, 0xaaa5, 0xa9a5, 0xa8a5, 0x001a, 0x001a, 0xc5a7, 0x001a, 0x001a, 0x74ae, 0x001a, 0x57dd, 0x76a4, 0x77a4, 0x78a4, 0xdaa4, 0x001a, 0x001a, 0xd1ab, 0x001a, 0xafce, 0x001a, 0x001a, 0x001a, 0x53b4, 0x79a4, 0x5dc9, 0x001a, 0x001a, 0xaba5, 0xaca5, 0x78c9, 0x001a, 0x7ca6, 0x001a, 0x001a, 0x001a, 0xcbca, 0x001a, 0xc6a7, 0x001a, 0xccca, 0x001a, 0x001a, 0xaea9, 0x001a, 0x001a, 0x6ecc, 0xaca9, 0xaba9, 0x6dcc, 0xa9a9, 0x6fcc, 0xaaa9, 0xada9, 0x001a, 0xd2ab, 0x001a, 0xd4ab, 0xb3ce, 0xb0ce, 0xb1ce, 0xb2ce, 0xb4ce, 0xd3ab, 0x001a, 0x001a, 0x74d1, 0x73d1, 0x001a, 0x76ae, 0x001a, 0x75ae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62b1, 0x46d5, 0x001a, 0x61b1, 0x63b1, 0x60b1, 0x001a, 0x001a, 0x001a, 0x001a, 0x55b4, 0x45d5, 0x001a, 0x56b4, 0xf3d8, 0x001a, 0x57b4, 0xf2d8, 0x54b4, 0x001a, 0x001a, 0x001a, 0x001a, 0x5add, 0x5cdd, 0x45b7, 0x5bdd, 0x59dd, 0x58dd, 0x001a, 0x001a, 0x001a, 0xb4e1, 0xf7b9, 0xf5b9, 0x001a, 0xf6b9, 0xb2e1, 0xb3e1, 0x001a, 0xf3b9, 0x71e5, 0x6fe5, 0x001a, 0x6dbc, 0x70e5, 0x6ebc, 0x6cbc, 0xf4b9, 0x001a, 0x001a, 0x6de9, 0x6be9, 0x6ce9, 0x6ee5, 0xdcec, 0xb0c0, 0xdbec, 0xc5ef, 0xc6ef, 0x6ee9, 0xfef1, 0x001a, 0x7aa4, 0xada5, 0x7ea6, 0xdbc9, 0x7da6, 0x001a, 0xafa9, 0x46b7, 0x001a, 0xdba4, 0xaea5, 0xd5ab, 0x58b4, 0x001a, 0x79c9, 0x001a, 0x7ac9, 0x001a, 0xdcc9, 0x001a, 0x001a, 0xc8a7, 0xd0ca, 0xceca, 0xc9a7, 0xcdca, 0xcfca, 0xd1ca, 0x001a, 0xc7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3a9, 0xb4a9, 0xb1a9, 0x001a, 0x001a, 0xb0a9, 0xb8ce, 0xb2a9, 0x001a, 0x001a, 0x001a, 0xd6ab, 0x001a, 0xb7ce, 0xb9ce, 0xb6ce, 0xbace, 0xd7ab, 0x79ae, 0x75d1, 0x001a, 0x77d1, 0x77ae, 0x78d1, 0x78ae, 0x76d1, 0x001a, 0xb5ce, 0x47d5, 0x4ad5, 0x4bd5, 0x48d5, 0x67b1, 0x66b1, 0x64b1, 0x65b1, 0x49d5, 0x001a, 0x001a, 0x001a, 0x001a, 0x68b1, 0x001a, 0x001a, 0x5ab4, 0x5bb4, 0x001a, 0x5cb4, 0x5ddd, 0x5fdd, 0x61dd, 0x48b7, 0x47b7, 0x59b4, 0x60dd, 0x5edd, 0x001a, 0xb8e1, 0x001a, 0x001a, 0xb6e1, 0xbce1, 0xf8b9, 0xbde1, 0xbae1, 0xf9b9, 0xb7e1, 0xb5e1, 0xbbe1, 0x70bc, 0x73e5, 0xb9e1, 0x72bc, 0x74e5, 0x71bc, 0x74bc, 0x75e5, 0x6fbc, 0x73bc, 0x001a, 0x73e9, 0x71e9, 0x70e9, 0x72e9, 0x6fe9, 0x001a, 0x001a, 0x66c3, 0x001a, 0x46f4, 0x47f4, 0x001a, 0xcbf5, 0xdff6, 0x55c6, 0x001a, 0x001a, 0xb5a9, 0xcaa7, 0x001a, 0x001a, 0xd8ab, 0x001a, 0x001a, 0x001a, 0x7ba4, 0xdca4, 0x001a, 0xafa5, 0xddc9, 0x001a, 0xcba7, 0xd2ca, 0x001a, 0xbbce, 0xd9ab, 0x001a, 0xfab9, 0x7ca4, 0x001a, 0x001a, 0x001a, 0xa1a6, 0x001a, 0x001a, 0x49b7, 0x7da4, 0xdda4, 0xdea4, 0x001a, 0xb1a5, 0xb0a5, 0x001a, 0xdec9, 0xa2a6, 0x001a, 0xd3ca, 0x001a, 0xcca7, 0x001a, 0x001a, 0x71cc, 0x72cc, 0x73cc, 0x001a, 0xb6a9, 0xb7a9, 0x70cc, 0xb8a9, 0x001a, 0x001a, 0x001a, 0xdaab, 0xbcce, 0x001a, 0x7ad1, 0x7aae, 0x001a, 0x79d1, 0x001a, 0x69b1, 0x4cd5, 0x6ab1, 0x4dd5, 0x001a, 0x001a, 0x001a, 0x5db4, 0x001a, 0x001a, 0x001a, 0x62dd, 0x001a, 0x001a, 0xbfe1, 0xbee1, 0x001a, 0xfbb9, 0x001a, 0x75bc, 0x76e5, 0xcabe, 0x74e9, 0xb1c0, 0x001a, 0x73c5, 0xd8f7, 0x001a, 0x001a, 0x001a, 0x001a, 0x74cc, 0x001a, 0xbdce, 0x6bb1, 0xf4d8, 0x4ab7, 0x001a, 0x001a, 0x001a, 0x55c2, 0x001a, 0x001a, 0x001a, 0x001a, 0xcea7, 0x001a, 0xcda7, 0xdbab, 0x001a, 0x7bd1, 0x001a, 0x6db1, 0x43b3, 0x6eb1, 0x6cb1, 0x5eb4, 0x001a, 0xc0e1, 0xfcb9, 0x76bc, 0x001a, 0x4cc9, 0xdfc9, 0x001a, 0xd5ca, 0xcfa7, 0xd4ca, 0xd0a7, 0x001a, 0x001a, 0xbca9, 0x77cc, 0x76cc, 0xbba9, 0xb9a9, 0xbaa9, 0x75cc, 0x001a, 0x001a, 0xddab, 0xbece, 0xe0ab, 0xdcab, 0xe2ab, 0xdeab, 0xdfab, 0xe1ab, 0x001a, 0x001a, 0x001a, 0x7dae, 0x7cae, 0x7bae, 0x001a, 0x001a, 0x001a, 0x4fd5, 0x6fb1, 0x72b1, 0x70b1, 0x001a, 0x4ed5, 0x75b1, 0x001a, 0x71b1, 0x50d5, 0x74b1, 0x73b1, 0x001a, 0x001a, 0x001a, 0xf6d8, 0xf5d8, 0x001a, 0x61b4, 0x5fb4, 0x60b4, 0xf7d8, 0x4bb7, 0x64dd, 0x4cb7, 0x63dd, 0x001a, 0x001a, 0x77e5, 0x001a, 0x001a, 0x78bc, 0xc1e1, 0x77bc, 0x001a, 0xfdb9, 0x001a, 0xdeec, 0x75e9, 0xb2c0, 0xddec, 0x40f2, 0x48f4, 0x49f4, 0x001a, 0xdfa4, 0x001a, 0xb2a5, 0x001a, 0x001a, 0x001a, 0x7bc9, 0x001a, 0x001a, 0xd2a7, 0xd4a7, 0x001a, 0xe2c9, 0xd8ca, 0xd7ca, 0xd6ca, 0x001a, 0xe1c9, 0xe0c9, 0xa4a6, 0xd3a7, 0xd1a7, 0xa3a6, 0x001a, 0x001a, 0x001a, 0xbda9, 0x78cc, 0x001a, 0xbea9, 0xddca, 0x001a, 0xdfca, 0xdeca, 0x79cc, 0x001a, 0x001a, 0xdaca, 0x001a, 0xd8a7, 0xd6a7, 0x001a, 0xd9ca, 0xdbca, 0xe1ca, 0x001a, 0xd5a7, 0x001a, 0xdcca, 0xe5ca, 0xc0a9, 0x001a, 0xe2ca, 0xd7a7, 0x001a, 0xe0ca, 0xe3ca, 0x001a, 0xbfa9, 0x001a, 0xc1a9, 0xe4ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcc, 0xa2cc, 0x7ecc, 0xaecc, 0xa9cc, 0xe7ab, 0xc2a9, 0xaacc, 0xadcc, 0xe3ab, 0xaccc, 0xc3a9, 0xc8a9, 0xc6a9, 0xa3cc, 0x001a, 0x7ccc, 0xa5cc, 0xcda9, 0xb0cc, 0xe4ab, 0xa6cc, 0x001a, 0xe5ab, 0xc9a9, 0xa8cc, 0x001a, 0xcdce, 0xe6ab, 0x7bcc, 0xcaa9, 0xe8ab, 0xcba9, 0xc7a9, 0xcca9, 0xa7cc, 0x7acc, 0xabcc, 0xc4a9, 0x001a, 0x001a, 0x7dcc, 0xa4cc, 0xa1cc, 0xc5a9, 0x001a, 0xbfce, 0x001a, 0xc0ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcace, 0xa1d1, 0xcbce, 0xeeab, 0xcece, 0xc4ce, 0xedab, 0xc6ce, 0x001a, 0xc7ce, 0x001a, 0x001a, 0xc9ce, 0xe9ab, 0x001a, 0x001a, 0xa3ae, 0x001a, 0xdaf9, 0xc5ce, 0xc1ce, 0xa4ae, 0x001a, 0x001a, 0xcfce, 0x7eae, 0x7dd1, 0xc8ce, 0x001a, 0x7cd1, 0xc3ce, 0xccce, 0x001a, 0x001a, 0xecab, 0xa1ae, 0xf2ab, 0xa2ae, 0xd0ce, 0x7ed1, 0xebab, 0xa6ae, 0xf1ab, 0xf0ab, 0xefab, 0xa5ae, 0xd1ce, 0xa7ae, 0xeaab, 0x001a, 0xc2ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76b1, 0xa4d1, 0xa6d1, 0x001a, 0xa8d1, 0xa8ae, 0xaeae, 0x53d5, 0xacd1, 0xa3d1, 0x78b1, 0x51d5, 0x001a, 0xadae, 0xabae, 0xaed1, 0x001a, 0x52d5, 0x001a, 0xa5d1, 0x001a, 0xacae, 0xa9d1, 0xafae, 0xabd1, 0x001a, 0x001a, 0xaaae, 0xaad1, 0xadd1, 0xa7d1, 0x001a, 0xa9ae, 0x79b1, 0x001a, 0xa2d1, 0x77b1, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ab1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55d5, 0x5ed5, 0x64b4, 0x001a, 0x7cb1, 0xa3b1, 0x65b4, 0x60d5, 0xaab1, 0xf9d8, 0x56d5, 0xa2b1, 0xa5b1, 0x7eb1, 0x54d5, 0x62d5, 0x65d5, 0x49d9, 0x001a, 0x63d5, 0xfdd8, 0xa1b1, 0xa8b1, 0xacb1, 0x5dd5, 0xf8d8, 0x61d5, 0x7bb1, 0xfad8, 0x64d5, 0xfcd8, 0x59d5, 0x001a, 0x62b4, 0x001a, 0x57d5, 0x58d5, 0xa7b1, 0x001a, 0x001a, 0xa6b1, 0x5bd5, 0xabb1, 0x5fd5, 0xa4b1, 0x5cd5, 0x001a, 0xa9b1, 0x66b4, 0x63b4, 0xfbd8, 0x001a, 0x5ad5, 0x001a, 0x7db1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6bb4, 0x6fb4, 0x40d9, 0x51b7, 0x6db4, 0x44d9, 0x71b4, 0x65dd, 0x46d9, 0x53b7, 0x69b4, 0x6cb4, 0x47d9, 0x001a, 0x48d9, 0x4ed9, 0x73b4, 0x54b7, 0x001a, 0x4ad9, 0x4fd9, 0x43d9, 0x5eb7, 0x001a, 0x55b7, 0x72b4, 0x41d9, 0x50d9, 0x001a, 0x5db7, 0x70b4, 0x4eb7, 0x4dd9, 0x001a, 0x74b4, 0x45d9, 0xfed8, 0x6ab4, 0x42d9, 0x001a, 0x4bd9, 0x001a, 0x4db7, 0x52b7, 0x67b4, 0x4cd9, 0x001a, 0x50b7, 0x001a, 0x001a, 0x001a, 0x68b4, 0x001a, 0x001a, 0x001a, 0x5cb7, 0xc3e1, 0x70dd, 0x001a, 0x68dd, 0xc2e1, 0x001a, 0x6cdd, 0x6edd, 0x001a, 0x001a, 0x6bdd, 0x001a, 0x5bb7, 0x001a, 0x6add, 0x5fb7, 0x001a, 0x001a, 0x001a, 0xd2e1, 0x001a, 0x001a, 0x5ab7, 0x40ba, 0x71dd, 0xc4e1, 0x001a, 0x001a, 0x58b7, 0x69dd, 0x6ddd, 0xfeb9, 0x4fb7, 0x66dd, 0x67dd, 0x41ba, 0x57b7, 0x59b7, 0x56b7, 0x6fdd, 0x001a, 0x001a, 0xc8e1, 0xc9e1, 0xcee1, 0x7dbc, 0xd5e1, 0x001a, 0x47ba, 0x001a, 0x46ba, 0xd0e1, 0x001a, 0x7cbc, 0xc5e1, 0x45ba, 0x001a, 0xd4e1, 0x43ba, 0x44ba, 0x001a, 0xd1e1, 0xaae5, 0x7abc, 0x6eb4, 0x001a, 0xd3e1, 0xa3bc, 0xcbe1, 0x001a, 0x7bbc, 0x001a, 0xa2bc, 0xc6e1, 0xcae1, 0xc7e1, 0xcde1, 0x48ba, 0x79bc, 0x42ba, 0x001a, 0x7ae5, 0xcfe1, 0x001a, 0xa1bc, 0x001a, 0xa4bc, 0x001a, 0xcce1, 0x001a, 0x7ebc, 0x79e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ee5, 0xcebe, 0x78e5, 0xa3e9, 0xa9e5, 0xa8bc, 0x001a, 0xa6bc, 0xccbe, 0xa6e5, 0xa2e5, 0xacbc, 0x001a, 0x78e9, 0x001a, 0x001a, 0x001a, 0xaabc, 0xa1e5, 0x001a, 0x76e9, 0x001a, 0xa5e5, 0x001a, 0xa8e5, 0x7de5, 0x001a, 0xabbc, 0x001a, 0x001a, 0xa5bc, 0x77e9, 0xcdbe, 0xa7e5, 0xa7bc, 0xa9bc, 0xa4e5, 0xadbc, 0xa3e5, 0x7ce5, 0x7be5, 0xcbbe, 0xabe5, 0x7ae9, 0xe0ec, 0xd0be, 0x001a, 0xa2e9, 0x001a, 0x7ee9, 0x001a, 0xe1ec, 0x001a, 0xd1be, 0xa1e9, 0x001a, 0x7ce9, 0xb4c0, 0xdfec, 0x001a, 0x79e9, 0x7be9, 0xb5c0, 0xd3be, 0xb3c0, 0xd2be, 0xb7c0, 0x7de9, 0xcfbe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfef, 0x001a, 0xc7ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ec, 0xc8ef, 0xe3ec, 0x001a, 0x001a, 0x56c2, 0xe5ec, 0xe4ec, 0xb6c0, 0xe2ec, 0xe6ec, 0xd0ef, 0xccef, 0xceef, 0x001a, 0xc9ef, 0xcaef, 0x001a, 0xcdef, 0xcbef, 0x67c3, 0x001a, 0x001a, 0x6ac3, 0x69c3, 0x68c3, 0x61c4, 0x4af4, 0x62c4, 0x41f2, 0xdfc4, 0xccf5, 0xe0c4, 0x74c5, 0xcac5, 0xd9f7, 0x001a, 0xdaf7, 0xdbf7, 0x001a, 0x001a, 0xbaf9, 0xe0a4, 0x7cc9, 0xb3a5, 0x001a, 0xa6a6, 0xa7a6, 0xa5a6, 0x001a, 0xa8a6, 0xdaa7, 0xd9a7, 0x001a, 0xb1cc, 0xcfa9, 0xcea9, 0x001a, 0x001a, 0xafd1, 0xadb1, 0xaeb1, 0x001a, 0x001a, 0x001a, 0x75b4, 0x72dd, 0x60b7, 0x61b7, 0x74dd, 0x76dd, 0x75dd, 0x001a, 0xd7e1, 0x001a, 0xd6e1, 0x49ba, 0xd8e1, 0x001a, 0xace5, 0xaebc, 0x001a, 0xd4be, 0x001a, 0xb8c0, 0x57c2, 0xb9c0, 0x001a, 0xe1a4, 0x001a, 0x001a, 0x001a, 0xe6ca, 0x001a, 0x001a, 0xb2cc, 0xd1a9, 0xd0a9, 0xd2a9, 0xf3ab, 0xd2ce, 0xd3ce, 0x001a, 0x001a, 0xb0d1, 0xb0ae, 0xafb1, 0x76b4, 0x51d9, 0xe2a4, 0x001a, 0x7ea4, 0xe3a4, 0x001a, 0x7dc9, 0xb7a5, 0xb6a5, 0xb4a5, 0xb5a5, 0x001a, 0x001a, 0x001a, 0xaba6, 0xe9c9, 0xebc9, 0xaaa6, 0xe3c9, 0x001a, 0xe4c9, 0x001a, 0xeac9, 0xe6c9, 0xe8c9, 0xa9a6, 0xe5c9, 0xecc9, 0xe7c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a7, 0xeaa7, 0xe8a7, 0xf0ca, 0xedca, 0xf5ca, 0xe6a7, 0xf6ca, 0x001a, 0xdfa7, 0xf3ca, 0x001a, 0xe5a7, 0xefca, 0xeeca, 0xe3a7, 0xf4ca, 0xe4a7, 0xd3a9, 0xdea7, 0xf1ca, 0x001a, 0xe7ca, 0xdba7, 0x001a, 0xeea7, 0xecca, 0xf2ca, 0xe0a7, 0xe2a7, 0x001a, 0xe8ca, 0x001a, 0xe9ca, 0xeaca, 0x001a, 0xeda7, 0xe7a7, 0xeca7, 0xebca, 0xeba7, 0xdda7, 0xdca7, 0xe9a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1a9, 0xbecc, 0xb7cc, 0xdca9, 0xefa9, 0xb3cc, 0xbacc, 0xbccc, 0xbfcc, 0xeaa9, 0x001a, 0xbbcc, 0xb4cc, 0xe8a9, 0xb8cc, 0x001a, 0xc0cc, 0xd9a9, 0x001a, 0xbdcc, 0xe3a9, 0xe2a9, 0xb6cc, 0xd7a9, 0x001a, 0x001a, 0xd8a9, 0x001a, 0xd6a9, 0x001a, 0xeea9, 0xe6a9, 0xe0a9, 0xd4a9, 0xb9cc, 0xdfa9, 0xd5a9, 0xe7a9, 0xf0a9, 0xd4ce, 0xe4a9, 0xb5cc, 0xdaa9, 0xdda9, 0xdea9, 0x001a, 0xeca9, 0xeda9, 0xeba9, 0xe5a9, 0xe9a9, 0xdba9, 0xf4ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdace, 0x41ac, 0xf8ab, 0xfaab, 0x40ac, 0xe6ce, 0xfdab, 0xb1d1, 0xb1ae, 0x43ac, 0xd7ce, 0xdfce, 0xfeab, 0xdece, 0xdbce, 0xe3ce, 0xe5ce, 0xf7ab, 0xfbab, 0x42ac, 0xb3ae, 0xe0ce, 0xf9ab, 0x45ac, 0xd9ce, 0x001a, 0x001a, 0x001a, 0xfcab, 0xb2ae, 0xf6ab, 0x001a, 0xd6ce, 0xddce, 0xd5ce, 0xd8ce, 0xdcce, 0xb2d1, 0x44ac, 0x001a, 0xe1ce, 0xe2ce, 0xe4ce, 0xf5ab, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1ae, 0xbed1, 0xbfae, 0xc0ae, 0xb4d1, 0xc4d1, 0x001a, 0xb6ae, 0x001a, 0x001a, 0x66d5, 0xc6d1, 0xc0d1, 0x001a, 0xb7d1, 0x001a, 0xc9d1, 0xbad1, 0xbcae, 0x7dd5, 0xbdd1, 0xbeae, 0xb5ae, 0x001a, 0xcbd1, 0xbfd1, 0xb8ae, 0xb8d1, 0xb5d1, 0xb6d1, 0xb9ae, 0xc5d1, 0xccd1, 0xbbae, 0xbcd1, 0xbbd1, 0xc3ae, 0xc2ae, 0xb4ae, 0xbaae, 0xbdae, 0xc8d1, 0x001a, 0x001a, 0xc2d1, 0xb7ae, 0xb3d1, 0xcad1, 0xc1d1, 0xc3d1, 0xc7d1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x67d5, 0x001a, 0xb7b1, 0xcbb1, 0xcab1, 0x001a, 0xbfb1, 0x001a, 0x79d5, 0x75d5, 0x72d5, 0xa6d5, 0xbab1, 0xb2b1, 0x001a, 0x001a, 0x77d5, 0xa8b4, 0xb6b1, 0xa1d5, 0x001a, 0xccb1, 0xc9b1, 0x7bd5, 0x6ad5, 0x001a, 0x001a, 0xc8b1, 0xa3d5, 0x69d5, 0xbdb1, 0xc1b1, 0xa2d5, 0x001a, 0x73d5, 0xc2b1, 0xbcb1, 0x68d5, 0x001a, 0x78b4, 0xa5d5, 0x71d5, 0xc7b1, 0x74d5, 0xa4d5, 0xc6b1, 0x001a, 0x52d9, 0x001a, 0xb3b1, 0x6fd5, 0xb8b1, 0xc3b1, 0x001a, 0xbeb1, 0x78d5, 0x6ed5, 0x6cd5, 0x7ed5, 0xb0b1, 0xc4b1, 0xb4b1, 0x77b4, 0x7cd5, 0xb5b1, 0x001a, 0xb1b1, 0xc0b1, 0xbbb1, 0xb9b1, 0x70d5, 0xc5b1, 0x6dd5, 0x7ad5, 0x76d5, 0x54d9, 0x53d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6bd5, 0x64d9, 0x001a, 0x7ab4, 0x001a, 0x6ad9, 0x59d9, 0x67d9, 0x77dd, 0x7db4, 0x6bd9, 0x6ed9, 0x7cb4, 0x5cd9, 0x6dd9, 0x6cd9, 0x7eb4, 0x55d9, 0x79b4, 0xa3b4, 0x001a, 0xa1b4, 0x69d9, 0x001a, 0x5fd9, 0xa5b4, 0x70d9, 0x68d9, 0x71d9, 0xadb4, 0xabb4, 0x66d9, 0x65d9, 0x001a, 0x63d9, 0x5dd9, 0xa4b4, 0x001a, 0xa2b4, 0xb9d1, 0x56d9, 0x001a, 0xb7dd, 0x57d9, 0x7bb4, 0xaab4, 0x79dd, 0x001a, 0xa6b4, 0xa7b4, 0x58d9, 0x6fd9, 0x78dd, 0x60d9, 0x5bd9, 0xa9b4, 0x61d9, 0x5ed9, 0x001a, 0x001a, 0xaeb4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70b7, 0x001a, 0x001a, 0x7cdd, 0xb1dd, 0xb6dd, 0xaadd, 0x6cb7, 0xbbdd, 0x69b7, 0x7add, 0x001a, 0x7bdd, 0x62b7, 0x6bb7, 0xa4dd, 0x6eb7, 0x6fb7, 0xa5dd, 0x001a, 0xb2dd, 0xb8dd, 0x6ab7, 0x001a, 0x64b7, 0xa3dd, 0x7ddd, 0xbadd, 0xa8dd, 0xa9dd, 0x7edd, 0xb4dd, 0xabdd, 0xb5dd, 0xaddd, 0x001a, 0x65b7, 0xd9e1, 0x68b7, 0x66b7, 0xb9dd, 0xb0dd, 0xacdd, 0x001a, 0x001a, 0xa1dd, 0x53ba, 0xafdd, 0x6db7, 0xa7dd, 0x001a, 0xa6dd, 0x001a, 0x001a, 0x001a, 0x67b7, 0x63b7, 0xeee1, 0xb3dd, 0xaedd, 0x001a, 0xa2dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e1, 0x001a, 0xdae1, 0xe5e1, 0x001a, 0xece1, 0x51ba, 0xacb4, 0xeae1, 0x4cba, 0x001a, 0x001a, 0x001a, 0x4bba, 0xf1e1, 0x001a, 0xdbe1, 0xe8e1, 0xdce1, 0xe7e1, 0x4fba, 0xebe1, 0x62d9, 0x001a, 0x001a, 0x001a, 0xf2e1, 0xe3e1, 0x52ba, 0xbae5, 0xafbc, 0x001a, 0xf0e1, 0xefe1, 0x54ba, 0xade5, 0xb0bc, 0xaee5, 0x001a, 0xdfe1, 0xe0e1, 0xdde1, 0xe2e1, 0xdee1, 0xf3e1, 0x4eba, 0xb1bc, 0x50ba, 0x55ba, 0x001a, 0xe1e1, 0x001a, 0xede1, 0x001a, 0x001a, 0xe6e1, 0x001a, 0x001a, 0xb1e5, 0x001a, 0x4aba, 0xb4bc, 0xaae9, 0xb6e5, 0xb5e5, 0xb7e5, 0x001a, 0x001a, 0xb4e5, 0xb5bc, 0x001a, 0xbbbc, 0xb8bc, 0x001a, 0xb9bc, 0xafe5, 0xb2e5, 0xbce5, 0xc1bc, 0xbfbc, 0x001a, 0xb3e5, 0x5ad9, 0xb2bc, 0xb9e5, 0xb0e5, 0x001a, 0xc2bc, 0xb8e5, 0x4dba, 0xb7bc, 0xe4e1, 0x001a, 0x001a, 0xbabc, 0x001a, 0xbebc, 0xc0bc, 0xbdbc, 0xbcbc, 0x001a, 0xb6bc, 0xbbe5, 0xb3bc, 0xc3bc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8be, 0xd9be, 0xa9e9, 0xe2be, 0xdfbe, 0x001a, 0xd6be, 0xddbe, 0xabe9, 0xdbbe, 0xd5be, 0x001a, 0xdcbe, 0x001a, 0xa8e9, 0xbbc0, 0xd7be, 0x001a, 0xdebe, 0xbac0, 0xa7e9, 0xa6e9, 0x001a, 0xe0be, 0x001a, 0xe1be, 0x001a, 0xa5e9, 0xa4e9, 0xbcc0, 0xaee9, 0xdabe, 0xace9, 0x001a, 0x001a, 0x001a, 0x001a, 0xbdc0, 0x001a, 0xc2c0, 0xeaec, 0xecec, 0x001a, 0xbfc0, 0x001a, 0xedec, 0xe9ec, 0x001a, 0xebec, 0xc0c0, 0xc3c0, 0x001a, 0xe8ec, 0xbec0, 0xc1c0, 0x59c2, 0xade9, 0x58c2, 0x001a, 0x001a, 0x5ec2, 0xd4ef, 0x001a, 0x5cc2, 0x5dc2, 0xd7ef, 0xd3ef, 0x5ac2, 0xd1ef, 0x6bc3, 0xd5ef, 0x001a, 0xd6ef, 0xd2ef, 0x001a, 0x5bc2, 0x42f2, 0x001a, 0x45f2, 0x001a, 0x001a, 0x46f2, 0x44f2, 0x47f2, 0x6cc3, 0x43f2, 0x001a, 0x001a, 0x4ef4, 0x64c4, 0x4df4, 0x4cf4, 0x4bf4, 0x63c4, 0x65c4, 0x001a, 0xcdf5, 0xe2c4, 0xe1c4, 0x001a, 0x001a, 0xe1f6, 0xe0f6, 0xe3f6, 0xcbc5, 0x75c5, 0xddf7, 0xe2f6, 0x001a, 0x001a, 0xdcf7, 0xcdc5, 0xccc5, 0xf3c5, 0xa9f8, 0xeff8, 0xe4a4, 0x001a, 0x001a, 0x72d9, 0xafe9, 0x001a, 0x001a, 0xaca6, 0xf7ca, 0xf1a7, 0xefa7, 0x001a, 0xf0a7, 0x001a, 0xc1cc, 0xf1a9, 0x46ac, 0x001a, 0xe7ce, 0x001a, 0xe8ce, 0x001a, 0x47ac, 0xced1, 0x001a, 0xc4ae, 0xc5ae, 0xcdd1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3b1, 0x001a, 0xcfb1, 0x001a, 0xa7d5, 0xd6b1, 0xd5b1, 0xceb1, 0xd1b1, 0xd4b1, 0xd0b1, 0x001a, 0x001a, 0x76d9, 0xcdb1, 0xafb4, 0x001a, 0x001a, 0x001a, 0xb1b4, 0xb2b4, 0x75d9, 0x78d9, 0xb0b4, 0x73d9, 0x77d9, 0x001a, 0x74d9, 0x001a, 0x71b7, 0x001a, 0x001a, 0xbcdd, 0x001a, 0x001a, 0x56ba, 0xf4e1, 0xe3be, 0xc4bc, 0xbde5, 0xc5bc, 0xc6bc, 0xbfe5, 0xbee5, 0xc0e5, 0xb1e9, 0x001a, 0x001a, 0xb0e9, 0xefec, 0xeeec, 0xc4c0, 0xc5c0, 0x48f2, 0x001a, 0x001a, 0xe5a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x79d9, 0x001a, 0x001a, 0x001a, 0xb4b4, 0xb3b4, 0xbddd, 0x001a, 0xd8ef, 0xe3c4, 0xdef7, 0xe6a4, 0x001a, 0xc6ae, 0x001a, 0xd8b1, 0xd7b1, 0x7ad9, 0x7bd9, 0x72b7, 0xf5e1, 0x57ba, 0xb2e9, 0x001a, 0xe7a4, 0xb8a5, 0x001a, 0xf2a9, 0xc2cc, 0x001a, 0xe9ce, 0x48ac, 0xd9b1, 0x001a, 0x7cd9, 0xb5b4, 0x73b7, 0x001a, 0xc1e5, 0xc2e5, 0x001a, 0x001a, 0xf0ec, 0x5fc2, 0xf0f8, 0xe8a4, 0x001a, 0xc3cc, 0xf3a9, 0x49ac, 0x001a, 0xeace, 0x001a, 0xc7ae, 0xd2d1, 0xd0d1, 0xd1d1, 0xc8ae, 0xcfd1, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbb1, 0xdcb1, 0xa8d5, 0xddb1, 0xdab1, 0x7dd9, 0x001a, 0x7ed9, 0xbedd, 0x001a, 0x001a, 0x59ba, 0x58ba, 0x001a, 0x001a, 0xf1ec, 0xd9ef, 0x001a, 0x4af2, 0x49f2, 0x4ff4, 0x001a, 0x5ec9, 0x4aac, 0x001a, 0x001a, 0xe9a4, 0xb9a5, 0x001a, 0xaea6, 0xada6, 0x001a, 0x001a, 0xafa6, 0xb0a6, 0xeec9, 0xedc9, 0xf8ca, 0xf2a7, 0xfbca, 0xfaca, 0xf9ca, 0xfcca, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4a9, 0xc9cc, 0xc5cc, 0xcecc, 0x001a, 0x001a, 0xfba9, 0x001a, 0xf9a9, 0xcacc, 0xc6cc, 0xcdcc, 0xf8a9, 0x40aa, 0xc8cc, 0xc4cc, 0xfea9, 0xcbcc, 0xf7a9, 0xcccc, 0xfaa9, 0xfca9, 0xd0cc, 0xcfcc, 0xc7cc, 0xf6a9, 0xf5a9, 0xfda9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefce, 0xf5ce, 0x001a, 0x50ac, 0x4dac, 0xecce, 0xf1ce, 0x001a, 0x53ac, 0x4bac, 0xf0ce, 0x4eac, 0x51ac, 0x001a, 0x001a, 0xf3ce, 0x001a, 0x4cac, 0xf8ce, 0x4fac, 0x001a, 0x52ac, 0xedce, 0xf2ce, 0xf6ce, 0xeece, 0xebce, 0x001a, 0x001a, 0xf7ce, 0xf4ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ae, 0xc9ae, 0xccae, 0x001a, 0xcfae, 0x001a, 0xd5d1, 0x001a, 0xcaae, 0xd3d1, 0x001a, 0xceae, 0x001a, 0x001a, 0xcbae, 0x001a, 0xd6d1, 0xcdae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd5, 0xdfb1, 0xabd5, 0xadd5, 0xdeb1, 0xe3b1, 0xd4d1, 0x001a, 0xaad5, 0xaed5, 0x001a, 0xe0b1, 0xa9d5, 0xe2b1, 0x001a, 0xe1b1, 0x001a, 0xa7d9, 0x001a, 0xa2d9, 0x001a, 0xb6b4, 0xbab4, 0xb7b4, 0xa5d9, 0xa8d9, 0x001a, 0xb8b4, 0x001a, 0xb9b4, 0xbeb4, 0xc7dd, 0xa6d9, 0xbcb4, 0xa3d9, 0xa1d9, 0x001a, 0xbdb4, 0x001a, 0xa4d9, 0x001a, 0x001a, 0x001a, 0x79b7, 0x001a, 0xbfdd, 0x76b7, 0x77b7, 0x75b7, 0xc4dd, 0xc3dd, 0xc0dd, 0x7bb7, 0x001a, 0x001a, 0xc2dd, 0xbbb4, 0x001a, 0x001a, 0xc6dd, 0xc1dd, 0x78b7, 0x74b7, 0x7ab7, 0xc5dd, 0x001a, 0x001a, 0x001a, 0x5cba, 0x001a, 0xf8e1, 0xf7e1, 0xf6e1, 0x5aba, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bba, 0xc5e5, 0xc8e5, 0xc8bc, 0x001a, 0x001a, 0xc7bc, 0xc9e5, 0xc4e5, 0xcabc, 0xc6e5, 0x001a, 0xc9bc, 0xc3e5, 0x001a, 0xc7e5, 0xe9be, 0xe6be, 0xbbe9, 0xbae9, 0x001a, 0xb9e9, 0xb4e9, 0x001a, 0xb5e9, 0x001a, 0x001a, 0x001a, 0xe7be, 0x001a, 0xe4be, 0xe8be, 0xb3e9, 0xe5be, 0xb6e9, 0xb7e9, 0xbce9, 0x001a, 0x001a, 0xb8e9, 0x001a, 0x001a, 0xf2ec, 0x001a, 0x001a, 0x001a, 0xc7c0, 0x001a, 0xdcef, 0xc6c0, 0xdaef, 0xdbef, 0x60c2, 0x6ec3, 0x4bf2, 0x001a, 0x6dc3, 0x001a, 0x001a, 0x51f4, 0x52f4, 0x001a, 0x66c4, 0x001a, 0x50f4, 0xe4c4, 0x001a, 0xdff7, 0xcec5, 0xaaf8, 0xabf8, 0x001a, 0xeaa4, 0x001a, 0xb1a6, 0xb2a6, 0xf3a7, 0x001a, 0xd1cc, 0x54ac, 0xd1ae, 0xe4b1, 0x001a, 0x001a, 0xd2b0, 0x001a, 0xbfb4, 0xc0b4, 0xccb3, 0xa9d9, 0x001a, 0x7cb7, 0xfae1, 0xf9e1, 0x001a, 0x001a, 0xeba4, 0xb3a6, 0xd2cc, 0x42aa, 0x001a, 0x41aa, 0x001a, 0xf9ce, 0xface, 0x001a, 0xd7d1, 0xd8d1, 0xd2ae, 0xd3ae, 0x001a, 0xd4ae, 0xafd5, 0x001a, 0x001a, 0xe6b1, 0x001a, 0xc2b4, 0x001a, 0xc1b4, 0xc8dd, 0x7adf, 0xfbe1, 0xbde9, 0x001a, 0x001a, 0x61c2, 0x67c4, 0xeca4, 0x001a, 0xbca5, 0xbda5, 0xbba5, 0xbea5, 0xbaa5, 0x001a, 0x001a, 0xb6a6, 0x001a, 0xf6c9, 0xb5a6, 0xb7a6, 0x001a, 0x001a, 0xf1c9, 0xf0c9, 0xf3c9, 0xf2c9, 0xf5c9, 0xb4a6, 0xefc9, 0xf4c9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdca, 0xfda7, 0xfeca, 0x43cb, 0xfca7, 0x001a, 0x47cb, 0x42cb, 0x45cb, 0xf5a7, 0xf6a7, 0xf7a7, 0xf8a7, 0x001a, 0x40a8, 0x001a, 0x41cb, 0xfaa7, 0x41a8, 0x001a, 0x40cb, 0x46cb, 0x001a, 0xf9a7, 0x44cb, 0xfba7, 0xf4a7, 0xfea7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57aa, 0x001a, 0xd4cc, 0x43aa, 0x001a, 0x4daa, 0x4eaa, 0x46aa, 0x58aa, 0x48aa, 0xdccc, 0x53aa, 0xd7cc, 0x49aa, 0xe6cc, 0xe7cc, 0xdfcc, 0xd8cc, 0x56aa, 0xe4cc, 0x51aa, 0x4faa, 0x001a, 0xe5cc, 0x001a, 0xe3cc, 0xdbcc, 0xd3cc, 0xdacc, 0x4aaa, 0x001a, 0x50aa, 0x001a, 0x44aa, 0xdecc, 0xddcc, 0xd5cc, 0x001a, 0x52aa, 0xe1cc, 0xd6cc, 0x55aa, 0xe8cc, 0x45aa, 0x001a, 0x4caa, 0xd9cc, 0xe2cc, 0x54aa, 0x001a, 0x47aa, 0x4baa, 0x001a, 0xe0cc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bcf, 0x5cac, 0x69ac, 0x001a, 0x56cf, 0x4ccf, 0x62ac, 0x4acf, 0x5bac, 0x45cf, 0x65ac, 0x52cf, 0xfece, 0x41cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x44cf, 0xfbce, 0x51cf, 0x61cf, 0x60ac, 0x46cf, 0x58cf, 0x001a, 0xfdce, 0x5fcf, 0x60cf, 0x63cf, 0x5acf, 0x4bcf, 0x53cf, 0x66ac, 0x59ac, 0x61ac, 0x6dac, 0x56ac, 0x58ac, 0x001a, 0x001a, 0x001a, 0x43cf, 0x6aac, 0x63ac, 0x5dcf, 0x40cf, 0x6cac, 0x67ac, 0x49cf, 0x001a, 0x001a, 0x6bac, 0x50cf, 0x48cf, 0x64ac, 0x5ccf, 0x54cf, 0x001a, 0x5eac, 0x62cf, 0x47cf, 0x5aac, 0x59cf, 0x4fcf, 0x5fac, 0x55cf, 0x57ac, 0xfcce, 0x68ac, 0xe3ae, 0x5dac, 0x4ecf, 0x4dcf, 0x42cf, 0x001a, 0x5ecf, 0x001a, 0x57cf, 0x001a, 0x001a, 0x55ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd1, 0xeaae, 0xedd1, 0x001a, 0xe1d1, 0xdfae, 0xebae, 0x001a, 0xdad1, 0x001a, 0xe3d1, 0xebd1, 0x001a, 0xd9d1, 0xf4d1, 0xd5ae, 0x001a, 0x001a, 0x001a, 0xf3d1, 0xeed1, 0x001a, 0xefd1, 0xddae, 0xe8ae, 0xe5d1, 0x001a, 0xe6d1, 0xf0d1, 0xe7d1, 0x001a, 0xe2d1, 0xdcd1, 0xddd1, 0xead1, 0xe4d1, 0x001a, 0x001a, 0xd6ae, 0xdaae, 0xf2d1, 0xded1, 0xe6ae, 0xe2ae, 0x001a, 0x001a, 0xe5ae, 0xecae, 0xdbae, 0xe7ae, 0xe9d1, 0xe9ae, 0xd8ae, 0x001a, 0xd7ae, 0xdbd1, 0x001a, 0xdfd1, 0xe0ae, 0xf1d1, 0xe8d1, 0xe0d1, 0xe4ae, 0xe1ae, 0x001a, 0xd9ae, 0xdcae, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d5, 0x001a, 0xb4d5, 0xb5d5, 0xb9d5, 0x001a, 0xc8d5, 0xc5d5, 0x001a, 0xbed5, 0xbdd5, 0xedb1, 0xc1d5, 0xd0d5, 0xb0d5, 0x001a, 0xd1d5, 0xc3d5, 0xd5d5, 0xc9d5, 0xecb1, 0xc7d5, 0xe7b1, 0xfcb1, 0xf2b1, 0x001a, 0xf6b1, 0xf5b1, 0xb1d5, 0x001a, 0xced5, 0xd4d5, 0xccd5, 0xd3d5, 0x001a, 0x001a, 0xc0d5, 0xb2d5, 0xd2d5, 0xc2d5, 0xeab1, 0xf7b1, 0x001a, 0xcbd5, 0xf0b1, 0x001a, 0x001a, 0x001a, 0xcad5, 0xb3d5, 0xf8b1, 0x001a, 0xfab1, 0xcdd5, 0xfbb1, 0xe9b1, 0xbad5, 0xcfd5, 0x001a, 0x001a, 0xefb1, 0xf9b1, 0xbcd5, 0xc6d5, 0xb7d5, 0xbbd5, 0xf4b1, 0xb6d5, 0xe8b1, 0xf1b1, 0xeeb1, 0xbfd5, 0xdeae, 0xc0d9, 0xebb1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3b1, 0x001a, 0xc3d9, 0xd9d9, 0xced9, 0xd6b4, 0x001a, 0xd1b4, 0xbdd9, 0xd2b4, 0xcdd9, 0x001a, 0xc6d9, 0xd3d9, 0xceb4, 0xabd9, 0xd5d9, 0xc4b4, 0xb3d9, 0xc7b4, 0xc6b4, 0x001a, 0xd7b4, 0x001a, 0xadd9, 0xcfd9, 0xd0d9, 0xc9b4, 0xc5b4, 0xbbd9, 0x001a, 0xd0b4, 0xb6d9, 0x001a, 0xd1d9, 0xccb4, 0xc9d9, 0xd6d9, 0xb0d9, 0xb5d9, 0xafd9, 0x001a, 0xcbb4, 0xc2d9, 0xdedd, 0xb1d9, 0xcfb4, 0xbad9, 0xd2d9, 0xcab4, 0xb7d9, 0xb4d9, 0xc5d9, 0xcdb4, 0xc3b4, 0xd9b4, 0xc8d9, 0xc7d9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacd9, 0xc8b4, 0xd4d9, 0xbcd9, 0xbed9, 0x001a, 0xcbd9, 0xcad9, 0xaad9, 0xd3b4, 0xd5b4, 0xb2d9, 0xb9d9, 0xc1d9, 0xd4b4, 0xb8d9, 0xc4d9, 0xd7d9, 0x001a, 0xccd9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8d9, 0x001a, 0x001a, 0x001a, 0x001a, 0xaed9, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2dd, 0xa6b7, 0x001a, 0xf0dd, 0xdbdd, 0xe0dd, 0xd9dd, 0x001a, 0xecdd, 0xcbdd, 0xd2dd, 0x001a, 0xeadd, 0xf4dd, 0xdcdd, 0x001a, 0xcfdd, 0xe2dd, 0xe7dd, 0xd3dd, 0x001a, 0xe4dd, 0xd0dd, 0x001a, 0x001a, 0xd7dd, 0xd8dd, 0xa8b7, 0xebdd, 0xe9dd, 0x001a, 0xccdd, 0xeedd, 0x001a, 0xefdd, 0xf1dd, 0xacb7, 0xa4b7, 0x001a, 0xb8d5, 0xd4dd, 0xe6dd, 0xd5dd, 0xa1b7, 0xb1b7, 0xeddd, 0xafb7, 0xabb7, 0xcadd, 0xa3b7, 0x001a, 0xcddd, 0xb0b7, 0x001a, 0xdddd, 0xc9dd, 0x001a, 0xa9b7, 0xe1dd, 0xd1dd, 0xaab7, 0xdadd, 0x7eb7, 0xd8b4, 0xe3dd, 0xbfd9, 0xcedd, 0x001a, 0x001a, 0xe8dd, 0xa5b7, 0xe5dd, 0xa2b7, 0xdfdd, 0xadb7, 0xd6dd, 0xf3dd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7b7, 0xc6de, 0x001a, 0x001a, 0xaeb7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae2, 0x48e2, 0x001a, 0x5ee2, 0x46e2, 0x001a, 0x58e2, 0x7db7, 0x5fba, 0x42e2, 0x5de2, 0x001a, 0x47e2, 0x55e2, 0x64ba, 0x5dba, 0x001a, 0x5be2, 0x001a, 0x40e2, 0x5ae2, 0x001a, 0x6fba, 0x51e2, 0x61e2, 0x6dba, 0x49e2, 0x5eba, 0x4be2, 0x59e2, 0x67ba, 0x44e2, 0x6bba, 0x61ba, 0x4de2, 0x43e2, 0xfce1, 0x001a, 0x57e2, 0x68ba, 0x60e2, 0xfde1, 0x65ba, 0x001a, 0x53e2, 0x001a, 0x66ba, 0x45e2, 0x50e2, 0x4ce2, 0x4ee2, 0x001a, 0x60ba, 0x5fe2, 0x6eba, 0x4fe2, 0x001a, 0x62e2, 0x001a, 0x001a, 0xfee1, 0x54e2, 0x63ba, 0x6cba, 0x6aba, 0x41e2, 0x56e2, 0x69ba, 0x001a, 0x001a, 0x62ba, 0x52e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ce2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e5, 0x001a, 0xd1e5, 0xcde5, 0xe1e5, 0xdee5, 0xcdbc, 0x001a, 0x001a, 0xe5e5, 0xd4e5, 0xd8bc, 0xdbe5, 0x001a, 0x001a, 0xd0e5, 0xdae5, 0xd5bc, 0xeee5, 0x001a, 0xebe5, 0xdde5, 0xcee5, 0x001a, 0x001a, 0xe2e5, 0xe4e5, 0xd1bc, 0xd8e5, 0xd3e5, 0xcae5, 0xcebc, 0xd6bc, 0x001a, 0xe7e5, 0xd7bc, 0xcbe5, 0xede5, 0xe0e5, 0xe6e5, 0xd4bc, 0x001a, 0x001a, 0xe3e5, 0x001a, 0xeae5, 0x001a, 0xd9bc, 0x001a, 0xd3bc, 0xdce5, 0xcfe5, 0xefe5, 0xcce5, 0xe8e5, 0xd0bc, 0x001a, 0xd6e5, 0x001a, 0xd7e5, 0xcfbc, 0xccbc, 0xd2e5, 0xd2bc, 0x001a, 0xcbbc, 0x001a, 0xe9e5, 0xece5, 0xd9e5, 0xcae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e9, 0x001a, 0xbee9, 0xf6be, 0x001a, 0x001a, 0xebbe, 0xf0be, 0xecbe, 0xcce9, 0xd7e9, 0xeabe, 0xc4e9, 0xcde9, 0xdfe5, 0xcee9, 0x001a, 0x001a, 0xf1be, 0x001a, 0xdde9, 0xf5be, 0xf8be, 0xc0e9, 0x001a, 0xf4be, 0x001a, 0xdbe9, 0xdce9, 0xd2e9, 0xd1e9, 0xc9e9, 0x001a, 0x001a, 0xd3e9, 0xdae9, 0xd9e9, 0x001a, 0xefbe, 0xedbe, 0xcbe9, 0xc8e9, 0x001a, 0xc5e9, 0xd8e9, 0xf7be, 0xd6e9, 0xf3be, 0xf2be, 0x001a, 0xd0e9, 0x001a, 0xbfe9, 0xc1e9, 0xc3e9, 0xd5e9, 0xcfe9, 0xeebe, 0x001a, 0xc6e9, 0x001a, 0xd4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfc0, 0x45ed, 0xc8c0, 0xf5ec, 0x001a, 0x41ed, 0xcac0, 0x48ed, 0x001a, 0xfcec, 0x001a, 0xf7ec, 0x001a, 0x001a, 0x49ed, 0xf3ec, 0xfeec, 0x001a, 0xd1c0, 0x44ed, 0x4aed, 0xfdec, 0xc9c0, 0x40ed, 0xf4ec, 0xd0c0, 0x001a, 0x001a, 0x47ed, 0xf9ec, 0xccc0, 0x001a, 0xfbec, 0xf8ec, 0xd2c0, 0xfaec, 0xcbc0, 0xcec0, 0x43ed, 0xf6ec, 0x46ed, 0x001a, 0x42ed, 0x001a, 0x001a, 0x001a, 0x63c2, 0xe7ef, 0x68c2, 0x69c2, 0x001a, 0x001a, 0x001a, 0x62c2, 0xe6ef, 0x001a, 0xe3ef, 0xe4ef, 0x66c2, 0xdeef, 0xe2ef, 0x65c2, 0x001a, 0xdfef, 0x001a, 0x001a, 0x001a, 0x001a, 0x67c2, 0x64c2, 0x001a, 0xddef, 0xe1ef, 0xe5ef, 0x001a, 0x001a, 0x001a, 0x51f2, 0x4ef2, 0x57f2, 0x001a, 0x56f2, 0x54f2, 0x4ff2, 0x001a, 0x72c3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50f2, 0x71c3, 0xcdc0, 0x53f2, 0x70c3, 0x58f2, 0x52f2, 0x4df2, 0xe0ef, 0x001a, 0x001a, 0x001a, 0x6fc3, 0x001a, 0x4cf2, 0x56f4, 0x001a, 0x55f4, 0x55f2, 0x68c4, 0x001a, 0x59f4, 0x5af4, 0x54f4, 0x58f4, 0x001a, 0x53f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1f5, 0x57f4, 0xe7c4, 0xe5c4, 0xcff5, 0x001a, 0x001a, 0x001a, 0xd2f5, 0x001a, 0xcef5, 0xd0f5, 0xe6c4, 0x001a, 0x001a, 0x001a, 0xe5f6, 0xe6f6, 0x76c5, 0xe4f6, 0x001a, 0x001a, 0x001a, 0xe2f7, 0xcfc5, 0xe0f7, 0xe1f7, 0xacf8, 0x001a, 0x001a, 0x56c6, 0xf3f8, 0xf1f8, 0xf2f8, 0xf4f8, 0x001a, 0x001a, 0x001a, 0xbbf9, 0x001a, 0xeda4, 0xb8a6, 0x001a, 0x59aa, 0x001a, 0xe9cc, 0x001a, 0x001a, 0x64cf, 0x001a, 0x001a, 0x001a, 0xf5d1, 0xf7d1, 0x001a, 0xf6d1, 0x001a, 0xf8d1, 0xfdb1, 0xd7d5, 0xf9d1, 0x001a, 0xd6d5, 0xd8d5, 0xd9d5, 0xdad9, 0xdbb4, 0xdbd9, 0xddd9, 0xdcb4, 0xdab4, 0xdcd9, 0x001a, 0xfadd, 0xf8dd, 0xf7dd, 0x001a, 0xf6dd, 0xf5dd, 0xb2b7, 0xf9dd, 0x70ba, 0x63e2, 0x65e2, 0x71ba, 0x64e2, 0xdbbc, 0x001a, 0xdabc, 0xf0e5, 0x001a, 0x001a, 0xdfe9, 0xdee9, 0xe0e9, 0x001a, 0x001a, 0xf9be, 0x001a, 0x4bed, 0xd3c0, 0x001a, 0xe8ef, 0x6ac2, 0x59f2, 0x77c5, 0xeea4, 0xbfa5, 0xb9a6, 0x42a8, 0x5aaa, 0x5baa, 0x001a, 0x001a, 0x6eac, 0x001a, 0x001a, 0xfad1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3b7, 0x001a, 0x001a, 0x001a, 0xd1e6, 0xfabe, 0x6bc2, 0xefa4, 0x001a, 0xbaa6, 0x001a, 0x001a, 0xebcc, 0x5caa, 0xeacc, 0x001a, 0x65cf, 0x6fac, 0x66cf, 0x001a, 0x70ac, 0x001a, 0xfcd1, 0xeeae, 0xedae, 0x001a, 0xded5, 0xdcd5, 0xddd5, 0xdbd5, 0x001a, 0xdad5, 0x001a, 0x001a, 0xded9, 0xe1d9, 0xdeb4, 0xdfd9, 0xddb4, 0xe0d9, 0x001a, 0xfbdd, 0x001a, 0x001a, 0x66e2, 0x67e2, 0x68e2, 0x001a, 0xf3e5, 0xf2e5, 0xdcbc, 0xf1e5, 0xf4e5, 0xe1e9, 0x001a, 0x001a, 0xe2e9, 0xe3e9, 0x001a, 0x4ced, 0xd4c0, 0x6cc2, 0x5af2, 0x001a, 0xe8c4, 0x5fc9, 0x001a, 0x71ac, 0x67cf, 0xefae, 0x001a, 0x001a, 0xfeb1, 0x001a, 0xdfb4, 0xe2d9, 0x001a, 0xb5b7, 0xb4b7, 0x001a, 0x001a, 0x69e2, 0x6ae2, 0xddbc, 0xdebc, 0xe5e9, 0xe4e9, 0xe9ef, 0xe3f7, 0xf0a4, 0x60c9, 0xc0a5, 0x001a, 0x43a8, 0x48cb, 0x001a, 0x72ac, 0xb6b7, 0xf1a4, 0x001a, 0x68cf, 0x73ac, 0x69cf, 0x001a, 0xd5c0, 0xf2a4, 0x001a, 0x001a, 0xeccc, 0x001a, 0x6acf, 0x001a, 0x42d2, 0x41d2, 0xfed1, 0x001a, 0xfdd1, 0x43d2, 0x40d2, 0x001a, 0x001a, 0x40b2, 0x41b2, 0x001a, 0x001a, 0xe0b4, 0xe3d9, 0x001a, 0xe4d9, 0xe5d9, 0x001a, 0x001a, 0x001a, 0x41de, 0x42de, 0x40de, 0x001a, 0xfddd, 0xfedd, 0xb7b7, 0x6be2, 0xf7e5, 0xf6e5, 0xf5e5, 0xf8e5, 0xe7e9, 0xe6e9, 0xfbbe, 0xe8e9, 0x001a, 0xd6c0, 0x4ded, 0x001a, 0xeaef, 0x5bf2, 0xe7f6, 0x001a, 0xf3a4, 0xc2a5, 0xc1a5, 0x001a, 0x5daa, 0x61c9, 0x7ec9, 0xbba6, 0x001a, 0xf7c9, 0x49cb, 0x4acb, 0x5eaa, 0x001a, 0xedcc, 0x001a, 0x74ac, 0x6bcf, 0x6ccf, 0x001a, 0xf0ae, 0xf4ae, 0x44d2, 0xf3ae, 0xf1ae, 0xf2ae, 0x001a, 0xdfd5, 0x42b2, 0xe3b4, 0x001a, 0xe1b4, 0xe2b4, 0xe6d9, 0x001a, 0x001a, 0x72ba, 0xf4a4, 0x001a, 0xa1c9, 0x001a, 0xc3a5, 0x001a, 0x001a, 0xa4c9, 0x001a, 0x001a, 0xc6a5, 0xa3c9, 0xc5a5, 0xc4a5, 0x44a8, 0xa2c9, 0x001a, 0x001a, 0xf8c9, 0x001a, 0x001a, 0x001a, 0xfcc9, 0xfec9, 0x40ca, 0xc5a6, 0xc6a6, 0xfbc9, 0xc1a6, 0x001a, 0xf9c9, 0x001a, 0xfdc9, 0xc2a6, 0x001a, 0xbda6, 0x001a, 0xbea6, 0x001a, 0xc4a6, 0xfac9, 0xbca6, 0x45a8, 0xbfa6, 0xc0a6, 0xc3a6, 0x001a, 0x001a, 0x001a, 0x5bcb, 0x59cb, 0x4ccb, 0x51a8, 0x53cb, 0x4ca8, 0x4dcb, 0x001a, 0x55cb, 0x001a, 0x52cb, 0x4fa8, 0x51cb, 0x56a8, 0x5acb, 0x58a8, 0x001a, 0x5aa8, 0x001a, 0x4bcb, 0x001a, 0x4da8, 0x5ccb, 0x001a, 0x54a8, 0x57a8, 0x001a, 0x45cd, 0x47a8, 0x5ea8, 0x55a8, 0x4ecb, 0x4aa8, 0x59a8, 0x56cb, 0x48a8, 0x49a8, 0x43cd, 0x4fcb, 0x50a8, 0x5ba8, 0x5dcb, 0x50cb, 0x4ea8, 0x001a, 0x53a8, 0xeecc, 0x5ca8, 0x57cb, 0x52a8, 0x001a, 0x5da8, 0x46a8, 0x54cb, 0x4ba8, 0x58cb, 0x44cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6aaa, 0x7aaa, 0xf5cc, 0x71aa, 0x001a, 0x4bcd, 0x62aa, 0x001a, 0x65aa, 0x42cd, 0x001a, 0xf3cc, 0xf7cc, 0x6daa, 0x6faa, 0xfacc, 0x76aa, 0x68aa, 0x66aa, 0x67aa, 0x75aa, 0x47cd, 0x70aa, 0xf9cc, 0xfbcc, 0x6eaa, 0x73aa, 0xfccc, 0x4acd, 0x001a, 0x75ac, 0x79aa, 0x001a, 0x63aa, 0x49cd, 0x001a, 0x4dcd, 0xf8cc, 0x4fcd, 0x40cd, 0x6caa, 0xf4cc, 0x6baa, 0x7daa, 0x72aa, 0x001a, 0xf2cc, 0x75cf, 0x78aa, 0x7caa, 0x41cd, 0x46cd, 0x001a, 0x7eaa, 0x77aa, 0x69aa, 0x5faa, 0x001a, 0x64aa, 0x001a, 0xf6cc, 0x60aa, 0x4ecd, 0x001a, 0xf0cc, 0xefcc, 0xfdcc, 0xf1cc, 0x7baa, 0xf5ae, 0x74aa, 0xfecc, 0x61aa, 0x001a, 0xa6ac, 0x001a, 0x001a, 0x001a, 0x4ccd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ccf, 0xa1cf, 0x001a, 0xa4cf, 0x77cf, 0x001a, 0x001a, 0xa7cf, 0xaacf, 0xaccf, 0x74cf, 0x76ac, 0x7bac, 0x49d2, 0xadac, 0xa5cf, 0xadcf, 0x7bcf, 0x73cf, 0x001a, 0x001a, 0x001a, 0x64d2, 0x7eac, 0xa2cf, 0x78cf, 0x7acf, 0xa5ac, 0x001a, 0x7dcf, 0x7dac, 0x70cf, 0xa8cf, 0x001a, 0xabcf, 0x001a, 0x001a, 0x7aac, 0x001a, 0xa8ac, 0x6dcf, 0xaaac, 0x78ac, 0xaeac, 0xa9cf, 0x6fcf, 0xabac, 0x5ed2, 0x48cd, 0x7cac, 0x77ac, 0x76cf, 0x6ecf, 0xacac, 0xa4ac, 0xa3cf, 0xa9ac, 0xa7ac, 0x79cf, 0xa1ac, 0x71cf, 0xa2ac, 0xa3ac, 0x72cf, 0xa6cf, 0x79ac, 0x7ecf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cd2, 0xfdae, 0x43af, 0x001a, 0x001a, 0x001a, 0x55d2, 0x5bd2, 0x57d2, 0x4ad2, 0x4dd2, 0x46d2, 0x47d2, 0x4aaf, 0xfaae, 0x56d2, 0x5fd2, 0x45af, 0xf6ae, 0x001a, 0x40af, 0x4ed2, 0x42af, 0x4fd2, 0x59d2, 0x001a, 0x001a, 0x001a, 0x44af, 0x68d2, 0x48d2, 0xfcae, 0xfbae, 0x48af, 0x45d2, 0x66d2, 0x5ad2, 0x67d2, 0x61d2, 0x53d2, 0x62d2, 0x001a, 0x5cd2, 0x65d2, 0x63d2, 0x49af, 0x54d2, 0xf9ae, 0xf8ae, 0x41af, 0x47af, 0x60d2, 0x46af, 0x51d2, 0x43b2, 0x001a, 0x69d2, 0x50d2, 0x4bd2, 0xfeae, 0x4baf, 0xf7ae, 0x001a, 0x58d2, 0x5dd2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x65b2, 0xe1d5, 0xe5d5, 0x001a, 0x52b2, 0x50b2, 0x001a, 0x001a, 0x47b2, 0xe3d5, 0xe2d5, 0x5bb2, 0x001a, 0xe8d5, 0x55b2, 0x001a, 0xfad5, 0x47d6, 0x44b2, 0xf7d5, 0xf0d5, 0x67b2, 0xe0d5, 0x001a, 0xfcd5, 0x001a, 0x64b2, 0x58b2, 0x63b2, 0x4eb2, 0xecd5, 0xfed5, 0xf6d5, 0x4fb2, 0x49b2, 0x45d6, 0x001a, 0xfdd5, 0x40d6, 0x51b2, 0x59b2, 0x42d6, 0xead5, 0xfbd5, 0xefd5, 0x44d6, 0x5eb2, 0x46b2, 0x5cb2, 0xf4d5, 0xf2d5, 0xf3d5, 0x53b2, 0xeed5, 0xedd5, 0x48b2, 0xe7d5, 0x46d6, 0x4ab2, 0xf1d5, 0x68b2, 0x001a, 0x62b2, 0xe6d5, 0x5fb2, 0x5db2, 0x66b2, 0xf8d5, 0x61b2, 0x52d2, 0xf9d5, 0x60b2, 0x41d6, 0x45b2, 0xf5d5, 0x57b2, 0xe9d5, 0x56b2, 0x001a, 0x54b2, 0x4cb2, 0x4bb2, 0xe7d9, 0x43d6, 0x001a, 0x001a, 0xebd5, 0x001a, 0x001a, 0xfcd9, 0x001a, 0x4db2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41b5, 0x5ab2, 0xeeb4, 0xf6d9, 0xfcb4, 0x001a, 0xead9, 0xebb4, 0xe7b4, 0x49da, 0xedb4, 0xf1b4, 0xecb4, 0xf5b4, 0x4dda, 0x44da, 0x001a, 0x001a, 0xf1d9, 0xfab4, 0xf4b4, 0xfdd9, 0xe4b4, 0x4ada, 0x43da, 0xe8b4, 0xf7d9, 0xf7b4, 0x55da, 0x56da, 0x001a, 0xe5b4, 0x48da, 0xf9b4, 0xfbd9, 0xedd9, 0xeed9, 0xfdb4, 0xf2d9, 0xf9d9, 0xf3d9, 0x001a, 0xfbb4, 0x44b5, 0xefd9, 0xe8d9, 0xe9d9, 0x001a, 0xebd9, 0xeab4, 0xf8d9, 0x001a, 0xf8b4, 0x42b5, 0x001a, 0x001a, 0xfad9, 0x53da, 0x4bda, 0xe6b4, 0x51da, 0xf2b4, 0x001a, 0xf0b4, 0x001a, 0x57da, 0xefb4, 0x41da, 0xf4d9, 0xfed9, 0x47b5, 0x45da, 0x42da, 0xf0d9, 0x43b5, 0x4fda, 0x4cda, 0x54da, 0xe9b4, 0x40da, 0x46b5, 0x001a, 0x47da, 0x001a, 0x001a, 0xf3b4, 0xf6b4, 0x001a, 0x46da, 0x45b5, 0xf5d9, 0xe4d5, 0x001a, 0x001a, 0x50da, 0x4eda, 0x52da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xecd9, 0x40b5, 0x001a, 0x001a, 0x001a, 0x61de, 0x60de, 0x46de, 0xbdb7, 0x001a, 0x5fde, 0x49de, 0x4ade, 0x001a, 0xc7b7, 0x68de, 0xc2b7, 0x5ede, 0x001a, 0x43de, 0xc8b7, 0xbeb7, 0x52de, 0x48de, 0x4bde, 0x63de, 0xb8b7, 0x6ade, 0x62de, 0xc1b7, 0x57de, 0xccb7, 0x001a, 0x001a, 0xcbb7, 0xc5b7, 0x001a, 0x001a, 0x69de, 0xb9b7, 0x55de, 0x4cde, 0x59de, 0x65de, 0xcdb7, 0x001a, 0xbbb7, 0x54de, 0x001a, 0x4dde, 0xc4b7, 0x001a, 0xc3b7, 0x50de, 0x5ade, 0x64de, 0x47de, 0x51de, 0xbcb7, 0x5bde, 0xc9b7, 0xc0b7, 0x4ede, 0xbfb7, 0x45de, 0x53de, 0x67de, 0xfeb4, 0xb0ba, 0x56de, 0x6ce2, 0x58de, 0x66de, 0xc6b7, 0x4fde, 0xbab7, 0xcab7, 0xf0bc, 0x44de, 0x001a, 0x5dde, 0x001a, 0x001a, 0x001a, 0x5cde, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae2, 0xadba, 0x7de2, 0xa4e2, 0xa2ba, 0x001a, 0x6ee2, 0xafba, 0x001a, 0x77ba, 0x6de2, 0xb0e2, 0xb1ba, 0x71e2, 0xa3e2, 0x001a, 0x73e2, 0xb3e2, 0xafe2, 0x75ba, 0xa1ba, 0x53e6, 0xaeba, 0x7dba, 0x6fe2, 0x001a, 0xaee2, 0xa3ba, 0xabe2, 0xb8e2, 0x75e2, 0x7ee2, 0x001a, 0x001a, 0xb6e2, 0xace2, 0x7cba, 0x001a, 0x001a, 0x7ce2, 0x76ba, 0x74ba, 0xa8ba, 0x001a, 0x001a, 0x7ae2, 0x77e2, 0x78e2, 0x001a, 0xb2e2, 0x001a, 0xb7e2, 0xb5e2, 0x7aba, 0xb9e2, 0x7eba, 0xa7ba, 0x001a, 0x70e2, 0xfae5, 0x79e2, 0x001a, 0x78ba, 0xacba, 0xa9ba, 0x7bba, 0xa5e2, 0x74e2, 0xaaba, 0xa7e2, 0xa4ba, 0xa6ba, 0x73ba, 0x001a, 0xa9e2, 0xa1e2, 0x72e2, 0xa5ba, 0xb1e2, 0xb4e2, 0x7be2, 0xa8e2, 0x001a, 0x79ba, 0xdfbc, 0xa6e2, 0xf9e5, 0x001a, 0xade2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76e2, 0x44e6, 0x4ee6, 0xe2bc, 0x4de6, 0x59e6, 0xe4bc, 0x4be6, 0x001a, 0x4fe6, 0xefbc, 0x001a, 0x46e6, 0xe7bc, 0x001a, 0x52e6, 0xf0e9, 0xf3bc, 0xf2bc, 0x54e6, 0x43e6, 0x5ee6, 0xedbc, 0x001a, 0xe3bc, 0x57e6, 0x001a, 0x5be6, 0x60e6, 0x55e6, 0x49e6, 0xe6bc, 0xe9bc, 0xf1bc, 0xecbc, 0x001a, 0x4ce6, 0xa2e2, 0x001a, 0x001a, 0x48e6, 0x5fe6, 0xe8bc, 0x001a, 0xebbc, 0x61e6, 0xe0bc, 0x56e6, 0xfbe5, 0x5ce6, 0xdfc0, 0x001a, 0x4ae6, 0x001a, 0xe1bc, 0x45e6, 0xe5bc, 0xfce5, 0xabba, 0x41e6, 0x001a, 0x5ae6, 0x42e6, 0x40e6, 0xeabc, 0x001a, 0x58e6, 0x001a, 0xfee5, 0x51e6, 0x50e6, 0x5de6, 0x47e6, 0xeebc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e9, 0x001a, 0x49bf, 0xfebe, 0x40ea, 0xebe9, 0x41bf, 0xf7e9, 0x48bf, 0x43bf, 0xf5e9, 0x4fed, 0xfbe9, 0x42ea, 0xfae9, 0xe9e9, 0xf8e9, 0x44ea, 0x46ea, 0xfdbe, 0x45ea, 0x44bf, 0x4abf, 0x001a, 0x47bf, 0x001a, 0xfee9, 0x46bf, 0xf9e9, 0x001a, 0xede9, 0xf2e9, 0x001a, 0xfde9, 0x45bf, 0x42bf, 0xfcbe, 0x40bf, 0xf1e9, 0x001a, 0xfde5, 0xece9, 0xefe9, 0x41ea, 0xf4e9, 0xeae9, 0x4eed, 0x43ea, 0xeee9, 0xfce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x51ed, 0xe3c0, 0x001a, 0x001a, 0xd7c0, 0x001a, 0x001a, 0xdbc0, 0x53ed, 0x59ed, 0x57ed, 0xd9c0, 0xdac0, 0xe1c0, 0x5aed, 0x52ed, 0xdcc0, 0x001a, 0x56ed, 0x55ed, 0x5bed, 0xe2c0, 0x001a, 0xddc0, 0xe0c0, 0x54ed, 0xe4c0, 0xdec0, 0xe5c0, 0xd8c0, 0x58ed, 0x001a, 0x50ed, 0x001a, 0x001a, 0xf7ef, 0x001a, 0x001a, 0x71c2, 0xf4ef, 0xf6ef, 0x001a, 0x6fc2, 0xf2ef, 0xf3ef, 0xeeef, 0x001a, 0x001a, 0xf6e9, 0xefef, 0x70c2, 0xebef, 0x001a, 0x6dc2, 0xf8ef, 0x6ec2, 0xecef, 0xedef, 0xf1ef, 0x73c2, 0x001a, 0x72c2, 0x001a, 0x001a, 0xf0ef, 0x78c3, 0x5ff2, 0x65f2, 0x79c3, 0x5cf2, 0x76c3, 0x73c3, 0x67f2, 0x77c3, 0x001a, 0x74c3, 0x5ef2, 0x61f2, 0x62f2, 0x63f2, 0x66f2, 0x001a, 0xf5ef, 0x5df2, 0x75c3, 0x64f2, 0x68f2, 0x60f2, 0x001a, 0x001a, 0x001a, 0x5df4, 0x6ac4, 0x60f4, 0x6bc4, 0x68f4, 0x5ff4, 0x5cf4, 0x001a, 0x5ef4, 0x62f4, 0x65f4, 0x64f4, 0x67f4, 0x5bf4, 0x001a, 0x69c4, 0x63f4, 0x66f4, 0x69f4, 0x61f4, 0xd3f5, 0xd4f5, 0xd8f5, 0xd9f5, 0x001a, 0xd6f5, 0xd7f5, 0xd5f5, 0x001a, 0xe9c4, 0x001a, 0x001a, 0x001a, 0x001a, 0x78c5, 0xebf6, 0x001a, 0x001a, 0xe8f6, 0xe9f6, 0xeaf6, 0x79c5, 0x001a, 0xe5f7, 0xe4f7, 0x001a, 0xaff8, 0xf4c5, 0xadf8, 0xb0f8, 0xaef8, 0xf5f8, 0x57c6, 0x65c6, 0xa3f9, 0x6cf9, 0x001a, 0xa2f9, 0xd0f9, 0xd1f9, 0xf5a4, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7a6, 0x41ca, 0x001a, 0x001a, 0x5ecb, 0x001a, 0x5fa8, 0x001a, 0x62a8, 0x001a, 0x5fcb, 0x001a, 0x60a8, 0x61a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x58cd, 0x5acd, 0x55cd, 0x52cd, 0x54cd, 0x001a, 0x001a, 0x001a, 0xa4aa, 0x001a, 0x001a, 0x001a, 0xa2aa, 0x001a, 0x001a, 0x56cd, 0xa3aa, 0x53cd, 0x50cd, 0xa1aa, 0x57cd, 0x001a, 0x51cd, 0xa5aa, 0x59cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xafcf, 0x001a, 0xb3cf, 0x001a, 0x001a, 0xb7ac, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6cf, 0x001a, 0xafac, 0xb2ac, 0xb4ac, 0xb6ac, 0xb3ac, 0xb2cf, 0xb1cf, 0x001a, 0xb1ac, 0xb4cf, 0xb5cf, 0x001a, 0xaecf, 0xb5ac, 0x001a, 0xb0ac, 0x001a, 0x001a, 0x001a, 0xb0cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77d2, 0x78d2, 0x79d2, 0x50af, 0x001a, 0x4caf, 0x6ed2, 0x001a, 0x76d2, 0x7bd2, 0x51af, 0x001a, 0x6cd2, 0x72d2, 0x6bd2, 0x75d2, 0x001a, 0x001a, 0x71d2, 0x4daf, 0x4faf, 0x7ad2, 0x001a, 0x6ad2, 0x6dd2, 0x73d2, 0x001a, 0x74d2, 0x7cd2, 0x70d2, 0x001a, 0x4eaf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6db2, 0x4ed6, 0x001a, 0x001a, 0x50d6, 0x4cd6, 0x001a, 0x58d6, 0x4ad6, 0x57d6, 0x69b2, 0x48d6, 0x5bda, 0x52d6, 0x6cb2, 0x001a, 0x53d6, 0x56d6, 0x001a, 0x5ad6, 0x001a, 0x4fd6, 0x001a, 0x54d6, 0x001a, 0x001a, 0x6ab2, 0x6bb2, 0x59d6, 0x4dd6, 0x49d6, 0x5bd6, 0x001a, 0x51d6, 0x001a, 0x001a, 0x55d6, 0x001a, 0x001a, 0x001a, 0x4bd6, 0x001a, 0x48b5, 0x49b5, 0x65da, 0x4fb5, 0x001a, 0x59da, 0x62da, 0x58da, 0x4cb5, 0x60da, 0x5eda, 0x001a, 0x5fda, 0x4ab5, 0x001a, 0x63da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cda, 0x5ada, 0x4bb5, 0x5dda, 0x61da, 0x001a, 0x001a, 0x001a, 0x4db5, 0x001a, 0x001a, 0x001a, 0x64da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70de, 0x77de, 0x79de, 0xa1de, 0x001a, 0xdab7, 0x6bde, 0x001a, 0xd2b7, 0x001a, 0x7ade, 0xd7b7, 0xa2de, 0xceb7, 0x001a, 0x7dde, 0x001a, 0x6dde, 0x7ede, 0x6cde, 0x001a, 0xdcb7, 0x001a, 0x78de, 0xcfb7, 0xa3de, 0x001a, 0xd4b7, 0x71de, 0xd9b7, 0x7cde, 0x6fde, 0x76de, 0x72de, 0x6ede, 0xd1b7, 0xd8b7, 0xd6b7, 0xd3b7, 0xdbb7, 0xd0b7, 0x75de, 0x001a, 0xd5b7, 0x001a, 0x4eb5, 0x001a, 0x7bde, 0x001a, 0x73de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74de, 0x001a, 0x001a, 0xc1e2, 0x001a, 0xb4ba, 0x001a, 0x001a, 0xbde2, 0xc3e2, 0xbfe2, 0x001a, 0xb6ba, 0xbee2, 0xc2e2, 0xbae2, 0x001a, 0xbce2, 0xb5ba, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e2, 0xbbe2, 0x001a, 0xb7ba, 0x001a, 0xb2ba, 0x001a, 0x001a, 0xc4e2, 0x001a, 0xb3ba, 0x67e6, 0x64e6, 0x70e6, 0x6ae6, 0x6ce6, 0xf4bc, 0x66e6, 0x6ee6, 0x001a, 0x001a, 0x6de6, 0x6be6, 0x001a, 0x71e6, 0xf7bc, 0x68e6, 0x6fe6, 0x001a, 0xf5bc, 0x001a, 0x001a, 0x63e6, 0x65e6, 0xf6bc, 0x62e6, 0x72e6, 0x001a, 0x69e6, 0x001a, 0x001a, 0x4aea, 0x51bf, 0x001a, 0x001a, 0x55ea, 0x53ea, 0x4bbf, 0x49ea, 0x4cea, 0x4dea, 0x48ea, 0x55bf, 0x56bf, 0x47ea, 0x56ea, 0x51ea, 0x4fbf, 0x4cbf, 0x50ea, 0x4eea, 0x001a, 0x001a, 0x52bf, 0x52ea, 0x4dbf, 0x001a, 0x4ebf, 0x001a, 0x4fea, 0x50bf, 0x4bea, 0x001a, 0x54ea, 0x53bf, 0x57ea, 0x58ea, 0x54bf, 0x001a, 0x001a, 0xe7c0, 0xeec0, 0x5ced, 0x62ed, 0x001a, 0x60ed, 0xeac0, 0xe9c0, 0xe6c0, 0x5eed, 0x001a, 0x001a, 0x001a, 0xecc0, 0xebc0, 0xe8c0, 0x001a, 0x61ed, 0x5ded, 0x5fed, 0x001a, 0xedc0, 0x001a, 0x001a, 0x001a, 0x77c2, 0xfbef, 0x001a, 0x74c2, 0x75c2, 0xfdef, 0x76c2, 0xfaef, 0x001a, 0xf9ef, 0x6cf2, 0xfcef, 0x001a, 0x6df2, 0x7ac3, 0x6bf2, 0x001a, 0x001a, 0x6af2, 0x001a, 0x69f2, 0x7bc3, 0x001a, 0x001a, 0x6cc4, 0x001a, 0x001a, 0x6af4, 0x6bf4, 0x001a, 0x001a, 0x001a, 0x001a, 0xdcf5, 0xdbf5, 0xeac4, 0x001a, 0xdaf5, 0xecf6, 0xedf6, 0x001a, 0x001a, 0xe6f7, 0xb1f8, 0x001a, 0x001a, 0xf6f8, 0xbcf9, 0x79c6, 0xc6f9, 0xf6a4, 0x001a, 0xa6aa, 0xa7aa, 0x001a, 0x001a, 0xb8ac, 0x001a, 0x001a, 0x001a, 0x001a, 0xefc0, 0xf7a4, 0x001a, 0xa8aa, 0x52af, 0xddb7, 0xf8a4, 0x001a, 0x6eb2, 0xb8ba, 0x62c9, 0x001a, 0xb7cf, 0x7dd2, 0x001a, 0xc5e2, 0x001a, 0xf0c0, 0xf9a4, 0xa9aa, 0xb8cf, 0xb9cf, 0x66da, 0x50b5, 0x001a, 0x001a, 0xa4de, 0x001a, 0x001a, 0xdeb7, 0xc6e2, 0x001a, 0x001a, 0xf8bc, 0x001a, 0x7cc3, 0xfaa4, 0x67da, 0xfba4, 0x001a, 0xc9a6, 0x42ca, 0xc8a6, 0x65a8, 0x64a8, 0x63a8, 0x60cb, 0x001a, 0x001a, 0x001a, 0xaaaa, 0x001a, 0xabaa, 0x5bcd, 0x001a, 0xbacf, 0x001a, 0xbdcf, 0xbaac, 0xbbcf, 0x001a, 0xb9ac, 0xbccf, 0xbbac, 0x001a, 0xa2d2, 0xa1d2, 0x7ed2, 0x53af, 0x001a, 0x5dd6, 0x5ed6, 0x6fb2, 0x5cd6, 0x5fd6, 0x52b5, 0x70b2, 0x001a, 0x001a, 0x51b5, 0x6bda, 0x6ada, 0x001a, 0x68da, 0x69da, 0x001a, 0x6cda, 0xa6de, 0xa5de, 0xa9de, 0x001a, 0xa8de, 0xa7de, 0xb9ba, 0xc9e2, 0x001a, 0xc8e2, 0xbaba, 0xc7e2, 0x73e6, 0x001a, 0x74e6, 0xf9bc, 0x001a, 0x59ea, 0x5aea, 0x001a, 0x001a, 0x72f2, 0x7dc3, 0x71f2, 0x70f2, 0x6ef2, 0x6ff2, 0xebc4, 0x6cf4, 0xeef6, 0xf7f8, 0x001a, 0xfca4, 0x001a, 0xa5c9, 0xc7a5, 0xa6c9, 0x001a, 0x001a, 0x001a, 0x43ca, 0x44ca, 0x001a, 0x001a, 0x001a, 0x001a, 0x66cb, 0x001a, 0x001a, 0x62cb, 0x001a, 0x61cb, 0xacaa, 0x65cb, 0x67a8, 0x63cb, 0x66a8, 0x67cb, 0x64cb, 0x001a, 0x001a, 0x5fcd, 0xbecf, 0x5dcd, 0x64cd, 0x001a, 0xadaa, 0x001a, 0xb0aa, 0x65cd, 0x61cd, 0x001a, 0x62cd, 0x001a, 0x5ccd, 0xafaa, 0x5ecd, 0xaeaa, 0x63cd, 0x001a, 0x60cd, 0x001a, 0x001a, 0xc2cf, 0xbdac, 0xbeac, 0x001a, 0xc5cf, 0xbfcf, 0x001a, 0xc4cf, 0x001a, 0xc0cf, 0xbcac, 0xc3cf, 0xc1cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d2, 0xa5d2, 0x001a, 0xa7d2, 0x58af, 0x57af, 0x55af, 0xa4d2, 0xa9d2, 0x54af, 0x56af, 0xa6d2, 0x67d6, 0xa3d2, 0xaad2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62d6, 0x66d6, 0x001a, 0x65d6, 0x6eda, 0x79da, 0x001a, 0x001a, 0x68d6, 0x001a, 0x63d6, 0x6dda, 0x74b2, 0x001a, 0x001a, 0x73b2, 0x61d6, 0x64d6, 0x75b2, 0x001a, 0x72b2, 0x71b2, 0x60d6, 0x69d6, 0x001a, 0x001a, 0x001a, 0x70da, 0x77da, 0x001a, 0x54b5, 0x76da, 0x73da, 0x001a, 0x56b5, 0x001a, 0x001a, 0x001a, 0x75da, 0x001a, 0x001a, 0x6fda, 0x71da, 0x74da, 0x72da, 0x55b5, 0x78da, 0x53b5, 0xdfb7, 0x001a, 0x001a, 0xadde, 0xacde, 0xaade, 0x001a, 0xe2b7, 0xe1b7, 0xaede, 0x001a, 0xabde, 0xcae2, 0xbbba, 0xe0b7, 0x001a, 0x001a, 0x001a, 0xb0de, 0xafde, 0x001a, 0xcde2, 0xcbe2, 0xfabc, 0x001a, 0xbcba, 0xcce2, 0x76e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbbc, 0x75e6, 0x7ee6, 0x7de6, 0x7be6, 0x001a, 0x7ae6, 0x77e6, 0x78e6, 0x79e6, 0x7ce6, 0xa1e6, 0x001a, 0x001a, 0x5fea, 0x5cea, 0x5dea, 0x57bf, 0x5bea, 0x61ea, 0x60ea, 0x5eea, 0x001a, 0x64ed, 0x65ed, 0xf1c0, 0x001a, 0xf2c0, 0x63ed, 0x001a, 0x79c2, 0xfeef, 0x78c2, 0x7ec3, 0x001a, 0xa1c3, 0x6dc4, 0x6ef4, 0x6df4, 0xddf5, 0xeff6, 0x7ac5, 0xe8f7, 0xe7f7, 0xe9f7, 0xc8a5, 0xc6cf, 0x59af, 0x76b2, 0x6ad6, 0xc9a5, 0xa7c9, 0xfda4, 0x001a, 0x001a, 0x45ca, 0x001a, 0x001a, 0x001a, 0x6ccb, 0x6acb, 0x6bcb, 0x68cb, 0x68a8, 0x69cb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6dcd, 0x001a, 0xb3aa, 0x6bcd, 0x67cd, 0x6acd, 0x001a, 0x66cd, 0xb5aa, 0x69cd, 0x001a, 0xb2aa, 0xb1aa, 0x001a, 0xb4aa, 0x6ccd, 0x68cd, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2ac, 0xc5ac, 0xcecf, 0xcdcf, 0xcccf, 0xbfac, 0xd5cf, 0xcbcf, 0x001a, 0xc1ac, 0xafd2, 0x001a, 0xd2cf, 0xd0cf, 0xc4ac, 0x001a, 0xc8cf, 0xd3cf, 0x001a, 0xcacf, 0xd4cf, 0xd1cf, 0xc9cf, 0x001a, 0xc0ac, 0xd6cf, 0xc7cf, 0xc3ac, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4d2, 0xabd2, 0xb6d2, 0x001a, 0xaed2, 0xb9d2, 0xbad2, 0xacd2, 0xb8d2, 0xb5d2, 0xb3d2, 0xb7d2, 0x5faf, 0x001a, 0x5daf, 0x001a, 0x001a, 0xb1d2, 0x001a, 0xadd2, 0x001a, 0xb0d2, 0xbbd2, 0xb2d2, 0x5eaf, 0xcfcf, 0x001a, 0x5aaf, 0x5caf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78d6, 0x6dd6, 0x6bd6, 0x001a, 0x6cd6, 0x001a, 0x73d6, 0x001a, 0x74d6, 0x70d6, 0x7bb2, 0x75d6, 0x72d6, 0x6fd6, 0x001a, 0x79b2, 0x6ed6, 0x77b2, 0x7ab2, 0x71d6, 0x79d6, 0x5baf, 0x78b2, 0x77d6, 0x76d6, 0x7cb2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7eda, 0x001a, 0x001a, 0x001a, 0xa1da, 0x60b5, 0x001a, 0xa7da, 0x001a, 0x001a, 0xa9da, 0xa2da, 0x5ab5, 0xa6da, 0xa5da, 0x5bb5, 0x61b5, 0x001a, 0x62b5, 0xa8da, 0x58b5, 0x7dda, 0x7bda, 0xa3da, 0x7ada, 0x5fb5, 0x7cda, 0xa4da, 0xaada, 0x59b5, 0x5eb5, 0x5cb5, 0x5db5, 0x001a, 0x001a, 0x001a, 0x57b5, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9b7, 0xb7de, 0xe8b7, 0xbbde, 0x001a, 0xb1de, 0x001a, 0xbcde, 0x001a, 0x001a, 0x001a, 0xb2de, 0xb3de, 0x001a, 0xbdde, 0xbade, 0xb8de, 0xb9de, 0xb5de, 0xb4de, 0x001a, 0xbede, 0xe5b7, 0x001a, 0xb6de, 0x001a, 0xeab7, 0xe4b7, 0xebb7, 0xecb7, 0x001a, 0xe7b7, 0xe6b7, 0x001a, 0x001a, 0xcee2, 0xbeba, 0xbdba, 0x001a, 0x001a, 0xd3e2, 0x001a, 0xfcbc, 0xbfba, 0x001a, 0x001a, 0xc1ba, 0xd4e2, 0xe3b7, 0xc0ba, 0xd0e2, 0xd2e2, 0xcfe2, 0x001a, 0xd1e2, 0x001a, 0x001a, 0x001a, 0xabe6, 0x001a, 0x001a, 0xaae6, 0xa7e6, 0x40bd, 0x62ea, 0x41bd, 0xa6e6, 0x001a, 0xfebc, 0x001a, 0xa8e6, 0xa5e6, 0xa2e6, 0xa9e6, 0xa3e6, 0xa4e6, 0xfdbc, 0x001a, 0x001a, 0x001a, 0x001a, 0x69ed, 0x001a, 0x66ea, 0x001a, 0x65ea, 0x67ea, 0x001a, 0x66ed, 0x5abf, 0x001a, 0x63ea, 0x001a, 0x58bf, 0x001a, 0x5cbf, 0x5bbf, 0x64ea, 0x68ea, 0x001a, 0x59bf, 0x001a, 0x6ded, 0xf5c0, 0x7ac2, 0xf6c0, 0xf3c0, 0x6aed, 0x68ed, 0x001a, 0x6bed, 0x001a, 0x6eed, 0xf4c0, 0x6ced, 0x67ed, 0x001a, 0x001a, 0x42f0, 0x45f0, 0x75f2, 0x40f0, 0x001a, 0x6ff4, 0x46f0, 0x001a, 0xa2c3, 0x44f0, 0x7bc2, 0x41f0, 0x43f0, 0x47f0, 0x76f2, 0x001a, 0x74f2, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3c3, 0x73f2, 0x001a, 0x001a, 0x001a, 0x6ec4, 0x001a, 0x001a, 0x001a, 0x001a, 0xedc4, 0xf1f6, 0xecc4, 0xf3f6, 0xf0f6, 0xf2f6, 0xd0c5, 0xb2f8, 0xcaa5, 0x6ecd, 0xbcd2, 0xbdd2, 0x7db2, 0xbfde, 0x5dbf, 0xa4c3, 0x7bc5, 0xb3f8, 0xcba5, 0x001a, 0x6fcd, 0x60a2, 0x001a, 0x001a, 0xd7cf, 0x001a, 0xd8cf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbed2, 0xbfd2, 0x7eb2, 0xa1b2, 0x001a, 0x001a, 0x001a, 0xabda, 0x001a, 0xc2de, 0xc1de, 0xc0de, 0xd5e2, 0x001a, 0xd6e2, 0xd7e2, 0xc2ba, 0x001a, 0x001a, 0xade6, 0xace6, 0x001a, 0x001a, 0x69ea, 0x5ebf, 0x5fbf, 0x001a, 0x72ed, 0x6fed, 0x70ed, 0x71ed, 0x49f0, 0x48f0, 0x7cc2, 0x77f2, 0xdef5, 0xcca5, 0x001a, 0xc6ac, 0x001a, 0xa2b2, 0xc3de, 0x001a, 0xcda5, 0x001a, 0xc0d2, 0xa3b2, 0x001a, 0x001a, 0x63b5, 0x64b5, 0x001a, 0xcea5, 0xcfa5, 0x46ca, 0x6aa8, 0x69a8, 0xc7ac, 0xd9cf, 0xacda, 0xd0a5, 0xd1a5, 0xd2a5, 0xd3a5, 0x001a, 0x001a, 0x001a, 0x6ba8, 0x6ca8, 0x6ecb, 0x6dcb, 0x001a, 0x001a, 0xb6aa, 0x72cd, 0x70cd, 0x71cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdacf, 0xdbcf, 0x001a, 0x001a, 0xcbac, 0xc9ac, 0x001a, 0xcaac, 0xc8ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x60af, 0x001a, 0x001a, 0x001a, 0x001a, 0x64af, 0x63af, 0xc1d2, 0x62af, 0x61af, 0x001a, 0xc2d2, 0x001a, 0x001a, 0xa6b2, 0x7bd6, 0x7ad6, 0xa4b2, 0xa5b2, 0x001a, 0x001a, 0x001a, 0x66b5, 0x65b5, 0xaeda, 0x001a, 0x001a, 0xadda, 0xa7b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xedb7, 0xc5de, 0xeeb7, 0xc4de, 0x001a, 0x001a, 0x001a, 0xd8e2, 0xaee6, 0x42bd, 0x6aea, 0x001a, 0x001a, 0x001a, 0x73ed, 0x001a, 0xa6c3, 0xa5c3, 0x001a, 0x001a, 0x7cc5, 0xd4a5, 0x73cd, 0x001a, 0x001a, 0xa8b2, 0xd9e2, 0xc3ba, 0x001a, 0x001a, 0x6fcb, 0x70cb, 0x001a, 0x001a, 0x74cd, 0xb8aa, 0xb9aa, 0x001a, 0x001a, 0xb7aa, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfac, 0xd0ac, 0xcdac, 0xceac, 0x001a, 0xdccf, 0x001a, 0x001a, 0xddcf, 0xccac, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3d2, 0x001a, 0x68af, 0x69af, 0x001a, 0xabb2, 0xc9d2, 0x001a, 0x6eaf, 0x6caf, 0xcad2, 0xc5d2, 0x6baf, 0x6aaf, 0x65af, 0xc8d2, 0xc7d2, 0xc4d2, 0x6daf, 0x001a, 0xc6d2, 0x66af, 0x001a, 0x67af, 0x001a, 0x001a, 0xacb2, 0xa1d6, 0xa2d6, 0xadb2, 0x7cd6, 0x7ed6, 0xa4d6, 0xa3d6, 0x7dd6, 0x001a, 0xa9b2, 0xaab2, 0x001a, 0xb6da, 0x6bb5, 0x6ab5, 0xb0da, 0x68b5, 0x001a, 0xb3da, 0x6cb5, 0xb4da, 0x6db5, 0xb1da, 0x67b5, 0x69b5, 0xb5da, 0x001a, 0xb2da, 0xafda, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2de, 0x001a, 0xc7de, 0xf0b7, 0xf3b7, 0xf2b7, 0xf7b7, 0xf6b7, 0xd3de, 0xd1de, 0xcade, 0xcede, 0xcdde, 0xf4b7, 0xd0de, 0xccde, 0xd4de, 0xcbde, 0xf5b7, 0xefb7, 0xf1b7, 0x001a, 0xc9de, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe2, 0xc7ba, 0xdfe2, 0xc6ba, 0xdce2, 0xc5ba, 0x001a, 0xc8de, 0xcfde, 0xdee2, 0x001a, 0xc8ba, 0xe0e2, 0xdde2, 0xdae2, 0x001a, 0x001a, 0xb1e6, 0xb5e6, 0xb7e6, 0xb3e6, 0xb2e6, 0xb0e6, 0x45bd, 0x43bd, 0x48bd, 0x49bd, 0xb4e6, 0x46bd, 0xafe6, 0x47bd, 0xc4ba, 0xb6e6, 0x44bd, 0x001a, 0x001a, 0x001a, 0x6cea, 0x001a, 0x6bea, 0x73ea, 0x6dea, 0x72ea, 0x6fea, 0x60bf, 0x71ea, 0x001a, 0x001a, 0x61bf, 0x001a, 0x62bf, 0x001a, 0x70ea, 0x6eea, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8c0, 0x74ed, 0x001a, 0x001a, 0xf7c0, 0x77ed, 0x75ed, 0x76ed, 0x001a, 0x001a, 0xf9c0, 0x001a, 0x001a, 0x001a, 0x4df0, 0x001a, 0xa1c2, 0x4ef0, 0x001a, 0x001a, 0x7dc2, 0x4ff0, 0x7ec2, 0x4cf0, 0x50f0, 0x001a, 0x4af0, 0x001a, 0x001a, 0xa7c3, 0x78f2, 0xa8c3, 0x6fc4, 0x001a, 0x4bf0, 0x70c4, 0x001a, 0x001a, 0x001a, 0xeec4, 0xdff5, 0x001a, 0x7ec5, 0xf4f6, 0x7dc5, 0x001a, 0xeaf7, 0xf5c5, 0xf6c5, 0x001a, 0x001a, 0xccf9, 0x001a, 0x001a, 0xd1ac, 0xdecf, 0x001a, 0x6eb5, 0x6fb5, 0xd5a5, 0xcaa6, 0x47ca, 0x001a, 0x71cb, 0x6da8, 0x001a, 0xbaaa, 0x001a, 0xd2ac, 0xd3ac, 0xd4ac, 0xa6d6, 0xcbd2, 0x6faf, 0x001a, 0x001a, 0xaeb2, 0xa5d6, 0x001a, 0x001a, 0xb8da, 0x71b5, 0x001a, 0xb7da, 0x70b5, 0x001a, 0x001a, 0xd5de, 0x4abd, 0xbbe6, 0xb8e6, 0xb9e6, 0xbae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78ed, 0x001a, 0x51f0, 0x001a, 0x001a, 0x001a, 0x71f4, 0x70f4, 0x001a, 0xf5f6, 0xd6a5, 0x75cd, 0x70af, 0x001a, 0x001a, 0x001a, 0x72b5, 0xd6de, 0x001a, 0x001a, 0xe1e2, 0x001a, 0x4bbd, 0x74ea, 0x001a, 0x52f0, 0x72f4, 0xd7a5, 0x001a, 0x001a, 0xbbaa, 0xd7ac, 0xdfcf, 0xd8ac, 0xd6ac, 0x001a, 0xd5ac, 0xccd2, 0x71af, 0x001a, 0x001a, 0x72af, 0x73af, 0x001a, 0x001a, 0x001a, 0xb0b2, 0xa7d6, 0xafb2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9da, 0xb1b2, 0x73b5, 0xd7de, 0xf8b7, 0xf9b7, 0x001a, 0xc9ba, 0x001a, 0xcaba, 0x4cbd, 0x64bf, 0x75ea, 0x63bf, 0x001a, 0x79ed, 0xfac0, 0x001a, 0x53f0, 0x73f4, 0xd8a5, 0x6ea8, 0x78cd, 0x77cd, 0xbcaa, 0x76cd, 0xbdaa, 0x79cd, 0x001a, 0xe5cf, 0xdbac, 0xdaac, 0xe7cf, 0xe6cf, 0xdfac, 0x001a, 0xdeac, 0x001a, 0x001a, 0xd9ac, 0x001a, 0xe1cf, 0xe2cf, 0xe3cf, 0x001a, 0xe0ac, 0xe0cf, 0xdcac, 0xe4cf, 0xddac, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfd2, 0xd3d2, 0xd1d2, 0xd0d2, 0x001a, 0xd4d2, 0x001a, 0x001a, 0x001a, 0xd5d2, 0xd6d2, 0xced2, 0x001a, 0xcdd2, 0x001a, 0x75af, 0x76af, 0x001a, 0xd7d2, 0xd2d2, 0x001a, 0xb0d6, 0x001a, 0xd8d2, 0x77af, 0x74af, 0x001a, 0x001a, 0x001a, 0xaad6, 0x001a, 0xa9d6, 0x001a, 0xabd6, 0xacd6, 0xaed6, 0xadd6, 0xb2d6, 0xb5b2, 0xb2b2, 0xb6b2, 0xa8d6, 0xb7b2, 0xb1d6, 0xb4b2, 0xafd6, 0xb3b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcda, 0xbeda, 0xbada, 0xbbda, 0x001a, 0x001a, 0xbfda, 0xc1da, 0xc2da, 0xbdda, 0xc0da, 0x74b5, 0x001a, 0x001a, 0xdbde, 0x001a, 0xe0de, 0xd8de, 0xdcde, 0x001a, 0x001a, 0xe1de, 0xddde, 0xfab7, 0x43b8, 0x001a, 0xfdb7, 0xd9de, 0xdade, 0xceba, 0x46b8, 0xfeb7, 0x001a, 0x44b8, 0xfcb7, 0xdfde, 0x45b8, 0xdede, 0x41b8, 0xfbb7, 0x42b8, 0xe2de, 0xe6e2, 0xe8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40b8, 0x001a, 0x001a, 0xe3e2, 0xccba, 0xe9e2, 0xcdba, 0xe7e2, 0xe2e2, 0xe5e2, 0xeae2, 0xcbba, 0xe4e2, 0x001a, 0x4ebd, 0xbfe6, 0xbee6, 0x001a, 0x51bd, 0x4fbd, 0xbce6, 0x4dbd, 0xbde6, 0x001a, 0x50bd, 0x001a, 0x001a, 0x001a, 0x7dea, 0x001a, 0xa1ea, 0x001a, 0x7eea, 0x76ea, 0x7aea, 0x79ea, 0x77ea, 0x66bf, 0x67bf, 0x65bf, 0x78ea, 0x7bea, 0x7cea, 0x001a, 0x68bf, 0x001a, 0x40c1, 0xa3ed, 0x001a, 0xfcc0, 0x7bed, 0xfec0, 0x41c1, 0x001a, 0x001a, 0xfdc0, 0xa2ed, 0x7ced, 0xfbc0, 0xa1ed, 0x7aed, 0x7eed, 0x7ded, 0x001a, 0x001a, 0x55f0, 0xa4c2, 0xa5c2, 0xa2c2, 0x001a, 0xa3c2, 0x001a, 0x001a, 0x54f0, 0x001a, 0x7bf2, 0x001a, 0x001a, 0xa9c3, 0x001a, 0x79f2, 0x7af2, 0x001a, 0x74f4, 0x77f4, 0x75f4, 0x76f4, 0xe0f5, 0x001a, 0x001a, 0xefc4, 0xebf7, 0xb4f8, 0x001a, 0xf7c5, 0xf8f8, 0xf9f8, 0x66c6, 0xd9a5, 0xe1ac, 0x001a, 0xc3da, 0x001a, 0xe3de, 0x001a, 0xdaa5, 0x6fa8, 0x001a, 0xbeaa, 0x001a, 0xe8cf, 0xe9cf, 0x78af, 0x001a, 0x001a, 0xc4da, 0x75b5, 0x47b8, 0x42c1, 0xa4ed, 0x7cf2, 0x78f4, 0xdba5, 0x001a, 0x001a, 0x001a, 0xa1cd, 0x7acd, 0x7ccd, 0x7ecd, 0x7dcd, 0x7bcd, 0xbfaa, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2ac, 0xf2cf, 0x001a, 0xedcf, 0xeacf, 0x001a, 0x001a, 0xf1cf, 0x001a, 0x001a, 0xe4ac, 0xe5ac, 0xf0cf, 0xefcf, 0xeecf, 0xebcf, 0xeccf, 0xf3cf, 0xe3ac, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7caf, 0x001a, 0xa4af, 0xa3af, 0xe1d2, 0xdbd2, 0xd9d2, 0x001a, 0xa1af, 0xb9d6, 0x7aaf, 0xded2, 0xe2d2, 0xe4d2, 0xe0d2, 0xdad2, 0xa2af, 0xdfd2, 0xddd2, 0x79af, 0xe5d2, 0xa5af, 0xe3d2, 0x7daf, 0xdcd2, 0x001a, 0x7eaf, 0x7baf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9b2, 0x001a, 0xbad6, 0x001a, 0x001a, 0xb3d6, 0xb5d6, 0xb7d6, 0x001a, 0xb8d6, 0xb6d6, 0xbab2, 0x001a, 0xbbd6, 0x001a, 0xb4d6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8da, 0x76b5, 0xd0da, 0x001a, 0xc5da, 0x001a, 0xd1da, 0x001a, 0xc6da, 0xc7da, 0x001a, 0x001a, 0xcfda, 0xceda, 0xcbda, 0xb8b2, 0x77b5, 0xc9da, 0xccda, 0x78b5, 0xcdda, 0xcada, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeede, 0x001a, 0xf2de, 0x4eb8, 0x001a, 0xf0e2, 0x51b8, 0xf0de, 0xd6f9, 0x001a, 0xedde, 0xe8de, 0xeade, 0xebde, 0xe4de, 0x001a, 0x4db8, 0x001a, 0x001a, 0x4cb8, 0x001a, 0x48b8, 0xe7de, 0x001a, 0x4fb8, 0x001a, 0x50b8, 0xe6de, 0xe9de, 0xf1de, 0x4ab8, 0x4bb8, 0xefde, 0xe5de, 0x001a, 0x001a, 0x001a, 0xf2e2, 0xd0ba, 0xf4e2, 0xecde, 0xf6e2, 0xd4ba, 0xf7e2, 0xf3e2, 0x001a, 0xd1ba, 0xefe2, 0xd3ba, 0xece2, 0xf1e2, 0xf5e2, 0xeee2, 0x001a, 0x001a, 0x49b8, 0x001a, 0xebe2, 0xd2ba, 0xede2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x54bd, 0xc1e6, 0x58bd, 0x001a, 0x56bd, 0x001a, 0x001a, 0xcfba, 0x001a, 0xc8e6, 0xc9e6, 0x53bd, 0x001a, 0x001a, 0xc7e6, 0xcae6, 0x55bd, 0x52bd, 0xc3e6, 0xc0e6, 0xc5e6, 0xc2e6, 0x59bd, 0xc4e6, 0x001a, 0x001a, 0xc6e6, 0x57bd, 0x001a, 0x001a, 0x001a, 0x001a, 0x6abf, 0xa8ea, 0x001a, 0xa2ea, 0xa6ea, 0xacea, 0xadea, 0xa9ea, 0xaaea, 0xa7ea, 0x001a, 0xa4ea, 0x001a, 0x6cbf, 0x69bf, 0xa3ea, 0xa5ea, 0x001a, 0x6bbf, 0xabea, 0x001a, 0x46c1, 0x001a, 0x001a, 0xaaed, 0xa5ed, 0x45c1, 0x001a, 0x001a, 0x43c1, 0x001a, 0xaced, 0x44c1, 0xa8ed, 0xa9ed, 0xa6ed, 0xaded, 0x56f0, 0x001a, 0x47c1, 0xa7ed, 0x001a, 0xaeed, 0xabed, 0x001a, 0x001a, 0x001a, 0x5af0, 0x001a, 0x001a, 0x57f0, 0x001a, 0xa6c2, 0x001a, 0x5bf0, 0x5df0, 0x5cf0, 0x58f0, 0x59f0, 0x001a, 0x001a, 0xa3f2, 0x001a, 0xaac3, 0x001a, 0x7ef2, 0xa2f2, 0x7df2, 0xa4f2, 0x001a, 0x001a, 0xa1f2, 0x001a, 0x7af4, 0x7df4, 0x79f4, 0x71c4, 0x7bf4, 0x7cf4, 0x7ef4, 0x72c4, 0x74c4, 0x73c4, 0xe1f5, 0x001a, 0xe3f5, 0x001a, 0xe2f5, 0x001a, 0x001a, 0x001a, 0xf6f6, 0x001a, 0x001a, 0xb5f8, 0xfaf8, 0xdca5, 0x001a, 0x001a, 0x72cb, 0xc0aa, 0xa3cd, 0xc1aa, 0xc2aa, 0xa2cd, 0x001a, 0xf8cf, 0xf7cf, 0xe6ac, 0xe9ac, 0xe8ac, 0xe7ac, 0xf4cf, 0xf6cf, 0xf5cf, 0x001a, 0x001a, 0xe8d2, 0xa7af, 0xecd2, 0xebd2, 0xead2, 0xe6d2, 0xa6af, 0xaaaf, 0xadaf, 0x001a, 0x001a, 0xaeaf, 0xe7d2, 0xe9d2, 0xacaf, 0xabaf, 0xa9af, 0xa8af, 0xc2d6, 0x001a, 0xc0d6, 0xbcd6, 0xbbb2, 0x001a, 0xbdd6, 0xbcb2, 0xbed6, 0xbfd6, 0xc1d6, 0x001a, 0xbdb2, 0x001a, 0x001a, 0xd5da, 0x001a, 0xd4da, 0xd3da, 0xd2da, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6de, 0x52b8, 0x001a, 0xf3de, 0xf5de, 0x001a, 0x53b8, 0x001a, 0x54b8, 0xf4de, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e3, 0x001a, 0xf9e2, 0xfae2, 0x001a, 0xd7ba, 0xd5ba, 0xd6ba, 0x43e3, 0x001a, 0x42e3, 0xfee2, 0xfde2, 0xfce2, 0xfbe2, 0x40e3, 0xf8e2, 0x001a, 0xcbe6, 0xd0e6, 0xcee6, 0x001a, 0x001a, 0x001a, 0xcde6, 0xcce6, 0xcfe6, 0x001a, 0xaeea, 0x001a, 0x6dbf, 0x48c1, 0xb0ed, 0x001a, 0x49c1, 0xafed, 0x5ff0, 0x5ef0, 0xa7c2, 0x001a, 0xa5f2, 0xabc3, 0xa1f4, 0xa1c5, 0xf7f6, 0x001a, 0xb7f8, 0xb6f8, 0xa8c9, 0xeaac, 0xebac, 0xc3d6, 0x001a, 0x56b8, 0xdda5, 0x72a8, 0x71a8, 0x70a8, 0x001a, 0x001a, 0x001a, 0xa4cd, 0x001a, 0x001a, 0xc4aa, 0xc3aa, 0x001a, 0xeeac, 0x001a, 0xfacf, 0xfdcf, 0xfbcf, 0x001a, 0xecac, 0xedac, 0x001a, 0x001a, 0xf9cf, 0xfccf, 0x001a, 0xb5af, 0x001a, 0x001a, 0x001a, 0xf3d2, 0xf5d2, 0xf4d2, 0xb2af, 0xefd2, 0x001a, 0x001a, 0xb0af, 0xafaf, 0x001a, 0xb3af, 0xb1af, 0x001a, 0xb4af, 0xf2d2, 0xedd2, 0xeed2, 0xf1d2, 0xf0d2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6d6, 0xc7d6, 0xc5d6, 0x001a, 0xc4d6, 0xbeb2, 0x001a, 0x001a, 0x001a, 0x001a, 0x7db5, 0x001a, 0xd6da, 0xd8da, 0xdada, 0x7cb5, 0x001a, 0x001a, 0x7ab5, 0x001a, 0xd7da, 0x7bb5, 0xd9da, 0x79b5, 0x001a, 0x001a, 0x41df, 0xf7de, 0xfade, 0xfede, 0x5ab8, 0xfcde, 0x001a, 0xfbde, 0xf8de, 0xf9de, 0x58b8, 0x40df, 0x57b8, 0x001a, 0x5cb8, 0x5bb8, 0x59b8, 0x001a, 0xfdde, 0x001a, 0x001a, 0x001a, 0x49e3, 0x001a, 0x48e3, 0x001a, 0x001a, 0x44e3, 0x001a, 0x001a, 0xd8ba, 0x47e3, 0x46e3, 0xd9ba, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ebd, 0x001a, 0xd2e6, 0x001a, 0x5fbd, 0x5bbd, 0x5dbd, 0x001a, 0x5abd, 0x5cbd, 0x001a, 0x001a, 0x001a, 0xafea, 0x001a, 0x70bf, 0xb1ea, 0xb0ea, 0x001a, 0x45e3, 0x72bf, 0x71bf, 0x6ebf, 0x6fbf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5ed, 0x001a, 0xb3ed, 0x4ac1, 0xb4ed, 0x001a, 0xb6ed, 0xb2ed, 0xb1ed, 0x001a, 0x001a, 0x60f0, 0xaac2, 0xa8c2, 0xa9c2, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6f2, 0xa7f2, 0xadc3, 0x001a, 0xacc3, 0xa3f4, 0xa4f4, 0xa2f4, 0x001a, 0xf8f6, 0xf9f6, 0x001a, 0x001a, 0xdea5, 0x48ca, 0x73a8, 0x001a, 0xa5cd, 0xc6aa, 0xc5aa, 0xa6cd, 0x001a, 0x001a, 0x40d0, 0xefac, 0xfecf, 0xf0ac, 0x001a, 0x001a, 0xb6af, 0xf8d2, 0xf6d2, 0xfcd2, 0xb7af, 0xf7d2, 0xfbd2, 0xf9d2, 0xfad2, 0x001a, 0x001a, 0xc8d6, 0xcad6, 0x001a, 0xbfb2, 0x001a, 0xc9d6, 0xc0b2, 0xa2b5, 0xa1b5, 0x7eb5, 0xdbda, 0x001a, 0x001a, 0x001a, 0x001a, 0x44df, 0x5db8, 0x5eb8, 0x001a, 0x43df, 0x42df, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae3, 0xdbba, 0xdaba, 0x4be3, 0x4ce3, 0x001a, 0x61bd, 0x60bd, 0x001a, 0xb5ea, 0xd3e6, 0xd5e6, 0xd4e6, 0xb4ea, 0xb2ea, 0xb6ea, 0xb3ea, 0x001a, 0x73bf, 0x001a, 0x001a, 0x001a, 0xb7ed, 0x4bc1, 0xb8ed, 0xb9ed, 0x001a, 0x001a, 0xabc2, 0xacc2, 0x001a, 0x75c4, 0x001a, 0x001a, 0xd1c5, 0xdfa5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfdd2, 0xb8af, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbab3, 0xb9b3, 0x001a, 0x001a, 0xa4b5, 0xddda, 0xa3b5, 0xdcda, 0x001a, 0x001a, 0x001a, 0x001a, 0x45df, 0x001a, 0xdcba, 0x4de3, 0xddba, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76c4, 0xa5f4, 0x001a, 0xcba6, 0xc7aa, 0xa7cd, 0x001a, 0xf2ac, 0x001a, 0xf1ac, 0x42d0, 0x43d0, 0x001a, 0x001a, 0x40d3, 0x42d3, 0xb9af, 0x001a, 0x44d3, 0x47d3, 0x45d3, 0x001a, 0x001a, 0x001a, 0x46d3, 0x43d3, 0xfed2, 0xbaaf, 0x48d3, 0x41d3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3d6, 0xc6b2, 0xdcd6, 0xc3b2, 0x001a, 0xd5d6, 0xc7b2, 0x001a, 0xc1b2, 0x001a, 0xd0d6, 0xddd6, 0xd1d6, 0xced6, 0xc5b2, 0x001a, 0xc2b2, 0x001a, 0xd4d6, 0xd7d6, 0xc4b2, 0xd8d6, 0xc8b2, 0xd9d6, 0xcfd6, 0xd6d6, 0xdad6, 0xd2d6, 0xcdd6, 0xcbd6, 0x001a, 0x001a, 0xdbd6, 0x001a, 0x001a, 0xdfda, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4da, 0x001a, 0x001a, 0x001a, 0xe0da, 0xe6da, 0xa7b5, 0xccd6, 0xe1da, 0xa5b5, 0xdeda, 0xacb5, 0xe2da, 0xabb5, 0xe3da, 0xadb5, 0xa8b5, 0xaeb5, 0xa9b5, 0x001a, 0xaab5, 0x001a, 0xa6b5, 0x001a, 0xe5da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61b8, 0x50df, 0x001a, 0x53df, 0x47df, 0x4cdf, 0x46df, 0x63b8, 0x001a, 0x4adf, 0x001a, 0x001a, 0x001a, 0x48df, 0x62b8, 0x001a, 0x4fdf, 0x4edf, 0x4bdf, 0x4ddf, 0x49df, 0xe1ba, 0x52df, 0x5fb8, 0x51df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5de3, 0x001a, 0xe8ba, 0x58e3, 0x001a, 0xe7ba, 0x4ee3, 0x001a, 0x50e3, 0xe0ba, 0x55e3, 0x54e3, 0x57e3, 0xe5ba, 0x52e3, 0x51e3, 0x001a, 0x001a, 0xe4ba, 0xdfba, 0x53e3, 0xe2ba, 0x59e3, 0x5be3, 0x001a, 0x56e3, 0x4fe3, 0xe3ba, 0x001a, 0x001a, 0x69bd, 0xdeba, 0x001a, 0x001a, 0x5ce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e6, 0x62bd, 0x001a, 0xdbe6, 0x001a, 0x63bd, 0x001a, 0x001a, 0x65bd, 0xdee6, 0x001a, 0xd6e6, 0xe6ba, 0xdce6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e6, 0x001a, 0x60b8, 0x68bd, 0x001a, 0x001a, 0x64bd, 0x001a, 0x66bd, 0x67bd, 0x001a, 0x76bf, 0xdde6, 0xd7e6, 0x6abd, 0x001a, 0xdae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0ea, 0xbbea, 0x001a, 0x001a, 0xc5ea, 0x74bf, 0xbdea, 0x78bf, 0xc3ea, 0xbaea, 0xb7ea, 0xc6ea, 0x51c1, 0x79bf, 0xc2ea, 0xb8ea, 0x77bf, 0xbcea, 0x7bbf, 0xb9ea, 0xbeea, 0x7abf, 0xc1ea, 0xc4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbed, 0xcced, 0xbced, 0xc3ed, 0xc1ed, 0x001a, 0x001a, 0x4fc1, 0xc8ed, 0xbfea, 0x001a, 0xbfed, 0x001a, 0xc9ed, 0x4ec1, 0xbeed, 0xbded, 0xc7ed, 0xc4ed, 0xc6ed, 0x001a, 0xbaed, 0xcaed, 0x4cc1, 0x001a, 0xc5ed, 0xceed, 0xc2ed, 0x50c1, 0x4dc1, 0xc0ed, 0xbbed, 0xcded, 0x75bf, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x63f0, 0x001a, 0x001a, 0x61f0, 0x67f0, 0xb0c2, 0x65f0, 0x64f0, 0xb2c2, 0x6af0, 0xb1c2, 0x001a, 0x6bf0, 0x68f0, 0xaec2, 0x69f0, 0x62f0, 0xafc2, 0xadc2, 0xabf2, 0x66f0, 0x001a, 0x001a, 0x6cf0, 0x001a, 0x001a, 0xa8f2, 0x001a, 0x001a, 0x001a, 0xb2c3, 0xb0c3, 0xaaf2, 0x001a, 0xacf2, 0xa9f2, 0xb1c3, 0xaec3, 0xafc3, 0xb3c3, 0x001a, 0x001a, 0x78c4, 0x001a, 0xaaf4, 0x001a, 0xa9f4, 0xa7f4, 0xa6f4, 0xa8f4, 0x001a, 0x77c4, 0x79c4, 0x001a, 0x001a, 0xf0c4, 0x001a, 0x001a, 0xe5f5, 0xe4f5, 0x001a, 0x001a, 0xfaf6, 0x001a, 0xfcf6, 0xfef6, 0xfdf6, 0xfbf6, 0x001a, 0x001a, 0xa3c5, 0xa2c5, 0x001a, 0x001a, 0xd3c5, 0xd2c5, 0xd4c5, 0xedf7, 0xecf7, 0x001a, 0xfbf8, 0xb8f8, 0xfcf8, 0x58c6, 0x001a, 0x59c6, 0x6df9, 0x001a, 0x001a, 0x7ec6, 0xcca6, 0x001a, 0xa8cd, 0x001a, 0x001a, 0x45d0, 0x46d0, 0x44d0, 0x001a, 0x001a, 0xf3ac, 0x001a, 0x47d0, 0x48d0, 0x49d0, 0x001a, 0x001a, 0x49d3, 0x4fd3, 0x001a, 0x001a, 0x4dd3, 0xbbaf, 0x4bd3, 0x001a, 0x4cd3, 0x4ed3, 0x001a, 0x001a, 0x001a, 0x4ad3, 0xc9b2, 0x001a, 0xded6, 0xcbb2, 0xe0d6, 0xcab2, 0xdfd6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8da, 0xafb5, 0x001a, 0xeada, 0xe7da, 0xe1d6, 0x001a, 0xb0b5, 0x001a, 0xdbf9, 0xe9da, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56df, 0x001a, 0x64b8, 0x54df, 0x65b8, 0x55df, 0x66b8, 0x001a, 0x001a, 0x001a, 0xe9ba, 0x61e3, 0x5ee3, 0x60e3, 0xeaba, 0xebba, 0x5fe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe6, 0x001a, 0x001a, 0xe0e6, 0x001a, 0x6bbd, 0xe2e6, 0xe1e6, 0x001a, 0x61a2, 0x001a, 0xcaea, 0xcbea, 0xc7ea, 0x001a, 0xc8ea, 0x7cbf, 0x7dbf, 0xc9ea, 0x001a, 0x57c1, 0x001a, 0x001a, 0x53c1, 0x58c1, 0x54c1, 0x56c1, 0x52c1, 0x001a, 0x55c1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3c2, 0xcfed, 0x001a, 0xaef2, 0x001a, 0xadf2, 0x001a, 0xabf4, 0x7ac4, 0x7bc4, 0x41f7, 0xe6f5, 0x001a, 0x40f7, 0x001a, 0xfdf8, 0xa4f9, 0xcda6, 0x001a, 0x001a, 0x74a8, 0x001a, 0xa9cd, 0xc8aa, 0x001a, 0xf6ac, 0x4cd0, 0xf4ac, 0x4ad0, 0xf9ac, 0xf5ac, 0xfaac, 0xf8ac, 0x4bd0, 0xf7ac, 0xbfaf, 0xbeaf, 0x5ad3, 0xc7af, 0x53d3, 0x59d3, 0xc3af, 0x52d3, 0x58d3, 0x56d3, 0xc2af, 0xc4af, 0x55d3, 0xbdaf, 0x54d3, 0xc8af, 0xc5af, 0xc9af, 0xc6af, 0x51d3, 0x50d3, 0x57d3, 0xc0af, 0xbcaf, 0xc1af, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0d6, 0xe9d6, 0x001a, 0xb5b5, 0xe8d6, 0x001a, 0xcfb2, 0xd6b2, 0xd3b2, 0xd9b2, 0xd8b2, 0xd4b2, 0x001a, 0xe2d6, 0xe5d6, 0x001a, 0xe4d6, 0xd0b2, 0xe6d6, 0xefd6, 0xd1b2, 0xe3d6, 0xecd6, 0xedd6, 0xd2b2, 0xead6, 0xd7b2, 0xcdb2, 0xd5b2, 0xe7d6, 0xccb2, 0xebd6, 0x001a, 0x001a, 0xeed6, 0x001a, 0x001a, 0x001a, 0xfbda, 0xf2da, 0xb2b5, 0xf9da, 0xf6da, 0xeeda, 0xf7da, 0xb4b5, 0xefda, 0x001a, 0xebda, 0x001a, 0x001a, 0x6cb8, 0xf4da, 0x001a, 0xb1b5, 0xfada, 0x001a, 0xb8b5, 0xbab5, 0xedda, 0x001a, 0x001a, 0xb9b5, 0xf0da, 0xb3b5, 0xf8da, 0xf1da, 0xf5da, 0x001a, 0xf3da, 0xb6b5, 0xecda, 0xbbb5, 0xceb2, 0xb7b5, 0xbcb5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68b8, 0x5ddf, 0x5fdf, 0x61df, 0x65df, 0x001a, 0x5bdf, 0x59df, 0x6ab8, 0x001a, 0x60df, 0x64df, 0x5cdf, 0x58df, 0x001a, 0x57df, 0x001a, 0x001a, 0x001a, 0x62df, 0x5adf, 0x5edf, 0x6bb8, 0x001a, 0x69b8, 0x66df, 0x67b8, 0x63df, 0x001a, 0x72e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeeba, 0x6ae3, 0x78bd, 0x74e3, 0xf1ba, 0x78e3, 0xf7ba, 0x65e3, 0x001a, 0x001a, 0x75e3, 0x62e3, 0x001a, 0x77e3, 0x66e3, 0x001a, 0xfeba, 0xfbba, 0x76e3, 0x70e3, 0xedba, 0xf5ba, 0xf4ba, 0x001a, 0xf3ba, 0xf9ba, 0x001a, 0x63e3, 0xfaba, 0x71e3, 0xf6ba, 0xecba, 0x73e3, 0xefba, 0xf0ba, 0xf8ba, 0x68e3, 0x67e3, 0x64e3, 0x001a, 0x6ce3, 0x69e3, 0x6de3, 0xfdba, 0x001a, 0x79e3, 0xf2ba, 0x6ee3, 0x6fe3, 0x001a, 0x6be3, 0x001a, 0x001a, 0x001a, 0xfcba, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e6, 0x70bd, 0x79bd, 0x75bd, 0xe4e6, 0x001a, 0x72bd, 0x76bd, 0xf0e6, 0x6cbd, 0xe8e6, 0x001a, 0x74bd, 0x001a, 0x001a, 0xebe6, 0xe6e6, 0x73bd, 0x77bd, 0xe5e6, 0x001a, 0x71bd, 0x001a, 0xefe6, 0x6ebd, 0xeee6, 0xede6, 0x7abd, 0x72e5, 0x6dbd, 0x001a, 0xece6, 0xe3e6, 0x001a, 0x7bbd, 0xeae6, 0x6fbd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2bf, 0xa7bf, 0x7ebf, 0xd8ea, 0xcfea, 0xdbea, 0xd3ea, 0xd9ea, 0xa8bf, 0xa1bf, 0xccea, 0xd2ea, 0xdcea, 0xd5ea, 0xdaea, 0xceea, 0x001a, 0x001a, 0xd6ea, 0xa3bf, 0xd4ea, 0xa6bf, 0xa5bf, 0xd0ea, 0xd1ea, 0xcdea, 0xd7ea, 0xa4bf, 0xdeea, 0xddea, 0x001a, 0x001a, 0x001a, 0xdaed, 0xd6ed, 0x5fc1, 0x001a, 0xd0ed, 0x59c1, 0x69c1, 0xdced, 0x61c1, 0x5dc1, 0xd3ed, 0x64c1, 0x67c1, 0xdeed, 0x5cc1, 0xd5ed, 0x65c1, 0xe0ed, 0xdded, 0xd1ed, 0x60c1, 0x5ac1, 0x68c1, 0xd8ed, 0x63c1, 0xd2ed, 0x5ec1, 0xdfed, 0x62c1, 0x5bc1, 0xd9ed, 0x66c1, 0xd7ed, 0x001a, 0x001a, 0xdbed, 0x001a, 0x001a, 0x001a, 0x6ef0, 0x74f0, 0xb9c2, 0x77f0, 0xb4c2, 0xb5c2, 0x6ff0, 0x76f0, 0x71f0, 0xbac2, 0xb7c2, 0x001a, 0x6df0, 0x001a, 0xb6c2, 0x73f0, 0x75f0, 0xb8c2, 0x72f0, 0x70f0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8f2, 0xb7c3, 0xb8c3, 0xb4c3, 0x001a, 0xb5c3, 0x001a, 0xb4f2, 0xb2f2, 0x001a, 0xb6f2, 0xbac3, 0xb7f2, 0xb0f2, 0xaff2, 0xb3f2, 0xb1f2, 0xb6c3, 0xb5f2, 0xacf4, 0x7ec4, 0x7dc4, 0xadf4, 0x001a, 0xaff4, 0xaef4, 0xa1c4, 0x001a, 0x001a, 0x001a, 0xebf5, 0xe8f5, 0xe9f5, 0x001a, 0xe7f5, 0xeaf5, 0xf2c4, 0xecf5, 0x001a, 0xf1c4, 0x001a, 0x42f7, 0x001a, 0xd5c5, 0xd7c5, 0xeef7, 0xd6c5, 0xb9f8, 0x40f9, 0x42f9, 0xfef8, 0x41f9, 0x6cc6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcea6, 0x001a, 0xfbac, 0x6fd2, 0xcaaf, 0x001a, 0x001a, 0xdab2, 0xfcda, 0xfdda, 0x001a, 0x001a, 0x001a, 0xdfea, 0x6ac1, 0xe1ed, 0x001a, 0x001a, 0xbbc2, 0x001a, 0xbaf2, 0xb9f2, 0xa2c4, 0xedf5, 0x001a, 0x43f7, 0xf8c5, 0x49ca, 0x001a, 0x001a, 0xc9aa, 0x75a8, 0x001a, 0x001a, 0x4dd0, 0x001a, 0x001a, 0x60d3, 0x5bd3, 0x5fd3, 0x5dd3, 0xcbaf, 0x5ed3, 0x5cd3, 0x001a, 0xf1d6, 0x001a, 0xfeda, 0x40db, 0x69df, 0x6adf, 0x6eb8, 0x6fb8, 0x68df, 0x6bdf, 0x67df, 0x6db8, 0x001a, 0x40bb, 0x001a, 0x70b8, 0x7ae3, 0x001a, 0x7cbd, 0xf1e6, 0x7dbd, 0x001a, 0xa9bf, 0xe2ea, 0xe0ea, 0xe1ea, 0xe4ed, 0xe3ed, 0xe2ed, 0x001a, 0x001a, 0x001a, 0xbbf2, 0x001a, 0xb9c3, 0xbcf2, 0x44f7, 0xf9c5, 0xbaf8, 0xcfa6, 0xcbaa, 0xcaaa, 0x4fd0, 0xfcac, 0x001a, 0x001a, 0x4ed0, 0x62d3, 0x001a, 0xccaf, 0xf2d6, 0x61d3, 0x001a, 0x001a, 0x001a, 0xdcb2, 0xf5d6, 0xf3d6, 0xf4d6, 0xdbb2, 0x001a, 0x42db, 0x43db, 0x41db, 0x001a, 0x73b8, 0x6ddf, 0x6cdf, 0x6edf, 0x72b8, 0x71b8, 0x001a, 0x001a, 0xf2e6, 0xf4e6, 0x001a, 0x7ebd, 0xf3e6, 0xe3ea, 0xaabf, 0x79f0, 0x001a, 0x78f0, 0xbbc3, 0xbdf2, 0xbdc3, 0xbcc3, 0xb0f4, 0xeef5, 0xf3c4, 0xd0a6, 0x50d0, 0xfdac, 0x65d3, 0xceaf, 0x64d3, 0x63d3, 0x001a, 0xcdaf, 0x001a, 0xfbd6, 0x001a, 0xfdd6, 0xf6d6, 0xf7d6, 0xddb2, 0xf8d6, 0xdeb2, 0xfcd6, 0xf9d6, 0xfad6, 0xdfb2, 0x001a, 0xbeb5, 0xbfb5, 0x001a, 0x44db, 0x001a, 0x001a, 0x001a, 0x6fdf, 0x70df, 0x001a, 0x7ee3, 0x43bb, 0x41bb, 0x42bb, 0x7be3, 0x7ce3, 0x001a, 0x7de3, 0xf9e6, 0x001a, 0xfae6, 0xa1bd, 0xf7e6, 0xf6e6, 0xf8e6, 0xf5e6, 0xadbf, 0xe4ea, 0xabbf, 0xacbf, 0xe6ed, 0x6bc1, 0xe5ed, 0xa8ef, 0x001a, 0x7af0, 0x7bf0, 0xbcc2, 0x001a, 0xbdc2, 0x6cc1, 0xbef2, 0xbff2, 0xb1f4, 0xa3c4, 0xd1a6, 0x001a, 0xd2a6, 0xfeac, 0xccaa, 0xcfaf, 0x51d0, 0x001a, 0x001a, 0x001a, 0xc0b5, 0xd3a6, 0x41ad, 0x52d0, 0x53d0, 0x40ad, 0x42ad, 0xd4a6, 0x001a, 0x54d0, 0xd1af, 0x66d3, 0xd3af, 0xd0af, 0xd2af, 0x001a, 0x41d7, 0xe0b2, 0x001a, 0x40d7, 0xfed6, 0x001a, 0x71df, 0x001a, 0x001a, 0xa1e3, 0x001a, 0xa2bd, 0x001a, 0xaebf, 0xe6ea, 0xe5ea, 0x001a, 0xe7ed, 0x001a, 0x001a, 0x001a, 0xeff5, 0x001a, 0x001a, 0xd5a6, 0x73cb, 0xaacd, 0x43ad, 0x55d0, 0x001a, 0x68d3, 0x001a, 0x001a, 0x001a, 0xd4af, 0x67d3, 0xd5af, 0x001a, 0x001a, 0x001a, 0x43d7, 0x001a, 0x001a, 0xe2b2, 0x42d7, 0x44d7, 0x001a, 0xe1b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x46db, 0x47db, 0x45db, 0xc1b5, 0x001a, 0x001a, 0x001a, 0x74b8, 0x001a, 0x75b8, 0x001a, 0x45bb, 0x001a, 0xa3e3, 0xa2e3, 0x44bb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe6, 0x001a, 0x001a, 0xfce6, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ea, 0x001a, 0x001a, 0x70c1, 0x6fc1, 0x6dc1, 0x6ec1, 0x71c1, 0x001a, 0x7cf0, 0xbfc2, 0xbec2, 0xc0f2, 0xb2f4, 0x001a, 0x001a, 0x001a, 0xa5c5, 0xa4c5, 0xd6a6, 0x001a, 0x001a, 0xfbd1, 0x001a, 0x77b8, 0xc2b5, 0x76b8, 0x46bb, 0x001a, 0xd7a6, 0xa9c9, 0xd8a6, 0xd9a6, 0x001a, 0x001a, 0xabcd, 0x76cb, 0x001a, 0x77cb, 0x77a8, 0x001a, 0x74cb, 0x76a8, 0x001a, 0x79a8, 0x75cb, 0x7ba8, 0x7aa8, 0x78cb, 0x78a8, 0x001a, 0x001a, 0x001a, 0xd1aa, 0xcfaa, 0xadcd, 0x001a, 0xceaa, 0x001a, 0x001a, 0x001a, 0xd3aa, 0xd5aa, 0xd2aa, 0x001a, 0xb0cd, 0xaccd, 0xd6aa, 0x001a, 0xd0aa, 0x7ca8, 0x001a, 0xd4aa, 0xafcd, 0x001a, 0x001a, 0xaecd, 0x001a, 0xcdaa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bd0, 0x47ad, 0x48ad, 0x5dd0, 0x001a, 0x57d0, 0x5ad0, 0x63d0, 0x61d0, 0x001a, 0x49ad, 0x67d0, 0x4cad, 0x64d0, 0x5cd0, 0x59d0, 0x001a, 0x001a, 0x49db, 0x62d0, 0x44ad, 0x65d0, 0x56d0, 0x5fd0, 0x46ad, 0x4bad, 0x60d0, 0x4fad, 0x4dad, 0x001a, 0x58d0, 0x4aad, 0x001a, 0x5ed0, 0x4ead, 0x45ad, 0x66d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaaf, 0x001a, 0xe3af, 0xd8af, 0xd6af, 0x6ad3, 0xdeaf, 0xdbaf, 0x6cd3, 0x001a, 0x001a, 0xddaf, 0x6bd3, 0x69d3, 0x6ed3, 0xe2af, 0xe0af, 0x48db, 0x001a, 0x6fd3, 0x6dd3, 0xd7af, 0x001a, 0x001a, 0xd9af, 0xdcaf, 0x001a, 0xdfaf, 0x001a, 0xe1af, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ed7, 0xe4b2, 0x001a, 0x45d7, 0x47d7, 0x001a, 0x48d7, 0x001a, 0x50d7, 0x4cd7, 0x4ad7, 0x001a, 0x4dd7, 0x51d7, 0xe5b2, 0xe9b2, 0x46d7, 0x001a, 0x4fd7, 0x001a, 0xe7b2, 0x001a, 0xe6b2, 0x4bd7, 0x49d7, 0x001a, 0xe3b2, 0xe8b2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8b5, 0x51db, 0x001a, 0x001a, 0x4fdb, 0xcab5, 0x001a, 0x001a, 0x001a, 0x001a, 0x4adb, 0xa1df, 0x001a, 0xc9b5, 0x4edb, 0x001a, 0x001a, 0x4bdb, 0xc5b5, 0xcbb5, 0x50db, 0xc7b5, 0x4ddb, 0x47bb, 0xc6b5, 0x4cdb, 0xccb5, 0xc4b5, 0xc3b5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77df, 0x75df, 0x001a, 0x7bdf, 0x001a, 0x73df, 0xa2df, 0x78df, 0x001a, 0x72df, 0x7bb8, 0xa3b8, 0x7ddf, 0x001a, 0x76df, 0x001a, 0x7eb8, 0x001a, 0x001a, 0x7cb8, 0x7edf, 0x79b8, 0x78b8, 0x79df, 0x7db8, 0xcdb5, 0x001a, 0x7cdf, 0x74df, 0x7ab8, 0xa1b8, 0xa2b8, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cbb, 0x48bb, 0x001a, 0x4dbb, 0xa6e3, 0x001a, 0x001a, 0xa5e3, 0xa7e3, 0x4abb, 0xa4e3, 0x4bbb, 0xaae3, 0xa9e3, 0xa8e3, 0x001a, 0x49bb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e7, 0x001a, 0x44e7, 0xa8bd, 0x43e7, 0xa7bd, 0xa3bd, 0xa4bd, 0xa5bd, 0x40e7, 0xfee6, 0xa6bd, 0x001a, 0x42e7, 0xfde6, 0x001a, 0x001a, 0xe9ea, 0xf3ea, 0xb1bf, 0xb0bf, 0x001a, 0xedea, 0xefea, 0x001a, 0xeaea, 0x001a, 0xeeea, 0xe8ea, 0xf1ea, 0xafbf, 0xf0ea, 0xecea, 0x001a, 0xf2ea, 0x001a, 0xebea, 0x74c1, 0xe8ed, 0xeeed, 0x78c1, 0x7ac1, 0x77c1, 0x76c1, 0x001a, 0x75c1, 0x73c1, 0xe9ed, 0xeced, 0x72c1, 0xeded, 0x001a, 0x79c1, 0xebed, 0x001a, 0xeaed, 0xc0c2, 0x001a, 0xc1c2, 0xa1f0, 0x7df0, 0x7ef0, 0x001a, 0x001a, 0xc2f2, 0x001a, 0xc1f2, 0xbec3, 0xb4f4, 0xa4c4, 0xb3f4, 0x001a, 0xf0f5, 0x45f7, 0xa6c5, 0x43f9, 0x44f9, 0xd8c5, 0xdaa6, 0x001a, 0xd7aa, 0x52db, 0x4ebb, 0x7bc1, 0xefed, 0xdba6, 0x001a, 0xe5af, 0xe4af, 0x53db, 0x001a, 0x001a, 0x001a, 0xf4ea, 0xdca6, 0x50ad, 0x001a, 0x001a, 0x54db, 0x55db, 0x56db, 0x4fbb, 0xb2bf, 0xdda6, 0x001a, 0xd8aa, 0x68d0, 0xe6af, 0x70d3, 0xeab2, 0x001a, 0x57db, 0xa4b8, 0x001a, 0x50bb, 0xb3bf, 0x7cc1, 0xc2c2, 0xb5f4, 0xdea6, 0xd9aa, 0x001a, 0x001a, 0xe7af, 0x52d7, 0xceb5, 0x001a, 0x51bb, 0xabe3, 0x45e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfa6, 0xcfb5, 0xa3df, 0x52bb, 0xe0a6, 0xb1cd, 0x69d0, 0x51ad, 0x001a, 0x001a, 0x72d3, 0x001a, 0x001a, 0xeaaf, 0x001a, 0xe8af, 0xe9af, 0xebaf, 0x001a, 0x001a, 0x71d3, 0x001a, 0x001a, 0x57d7, 0x54d7, 0x56d7, 0xebb2, 0xedb2, 0xecb2, 0x53d7, 0xeeb2, 0x55d7, 0x001a, 0x58db, 0x59db, 0x001a, 0x5adb, 0xa6df, 0x001a, 0xa7df, 0x001a, 0xa5df, 0xa8df, 0x001a, 0xa5b8, 0x001a, 0xa4df, 0x001a, 0x53bb, 0x001a, 0x001a, 0x4ae7, 0x46e7, 0x49e7, 0x4be7, 0x48e7, 0x47e7, 0x001a, 0xf5ea, 0xf6ea, 0xf7ea, 0xb4bf, 0xb5bf, 0xf1ed, 0xf0ed, 0xf2ed, 0x001a, 0xa3f0, 0xa2f0, 0x001a, 0xc4f2, 0x001a, 0xc5f2, 0xc3f2, 0x001a, 0xa5c4, 0x001a, 0xb6f4, 0xb7f4, 0x001a, 0x46f7, 0xeff7, 0xbbf8, 0xe1a6, 0x7da8, 0x001a, 0x7dc1, 0xe2a6, 0x001a, 0x58d7, 0x5bdb, 0x001a, 0x41c6, 0x4aca, 0x001a, 0x001a, 0x001a, 0x4bca, 0x4dca, 0xe3a6, 0x4eca, 0x4cca, 0x001a, 0x001a, 0xa2cb, 0xa3cb, 0x7bcb, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1cb, 0xa1a8, 0x001a, 0xa2a8, 0x7ccb, 0x7acb, 0x79cb, 0x7dcb, 0x7ea8, 0x7ecb, 0x6ad0, 0x001a, 0x001a, 0x001a, 0xb6cd, 0xdcaa, 0xb5cd, 0xb7cd, 0x001a, 0xdbaa, 0xbccd, 0xdfaa, 0xb2cd, 0xc0cd, 0xc6cd, 0xe6aa, 0xc3cd, 0xe3aa, 0x001a, 0xb9cd, 0xbfcd, 0xc1cd, 0x001a, 0xb4cd, 0xe2aa, 0xddaa, 0xbacd, 0xe4aa, 0xe7aa, 0xe1aa, 0x001a, 0xdaaa, 0xbecd, 0xb8cd, 0xc5cd, 0xe9aa, 0xe5aa, 0xe0aa, 0xbdcd, 0xecaf, 0xbbcd, 0xdeaa, 0xe8aa, 0x001a, 0xb3cd, 0x001a, 0xc2cd, 0xc4cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62ad, 0x5cad, 0x64ad, 0x61ad, 0x71d0, 0x74d0, 0x5dad, 0x001a, 0x6bd0, 0x001a, 0x56ad, 0x60ad, 0x001a, 0x63ad, 0x65ad, 0xa2d0, 0x77d0, 0x001a, 0x55ad, 0xa1d0, 0x59ad, 0x57ad, 0x52ad, 0x6fd0, 0x001a, 0x7ed0, 0x73d0, 0x76d0, 0xa5d0, 0x001a, 0x66ad, 0x7dd0, 0x5ead, 0x78d0, 0xa4d0, 0x75d0, 0x79d0, 0x7cd0, 0x001a, 0x001a, 0x6dd0, 0xa3d0, 0x7bd0, 0x001a, 0x001a, 0x6cd0, 0x001a, 0x70d0, 0x5fad, 0x5aad, 0x53ad, 0x58ad, 0x54ad, 0x67ad, 0x6ed0, 0xa5d3, 0x5bad, 0x001a, 0x001a, 0x7ad0, 0x41ce, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8d3, 0xfaaf, 0x001a, 0x76d3, 0x001a, 0xa3d3, 0x7dd3, 0x001a, 0xb2d3, 0x001a, 0xaad3, 0x001a, 0x7ed3, 0x001a, 0xa9d3, 0x78d3, 0x7cd3, 0xb5d3, 0xfdaf, 0xadd3, 0xa4d3, 0xedaf, 0xb3d3, 0x74d3, 0x001a, 0xacd3, 0x001a, 0xfcaf, 0xf7af, 0x73d3, 0xf5af, 0xf4af, 0xf9af, 0xabd3, 0xf1af, 0xf8af, 0x72d0, 0x5cdb, 0xa6d3, 0x001a, 0x001a, 0x7ad3, 0xfbaf, 0x7bd3, 0xa1d3, 0xfeaf, 0x75d3, 0xafd3, 0x001a, 0xaed3, 0xb6d3, 0xf3af, 0xf0af, 0xb4d3, 0xb0d3, 0xa7d3, 0xa2d3, 0xf6af, 0xf2af, 0x77d3, 0xeeaf, 0xb1d3, 0xefaf, 0x001a, 0x79d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ed7, 0x60d7, 0x65d7, 0x79d7, 0xfcb2, 0xf2b2, 0x001a, 0x5dd7, 0xfdb2, 0xfeb2, 0x68d7, 0x6fd7, 0x75d7, 0x001a, 0x62d7, 0x001a, 0x69d7, 0x001a, 0x001a, 0x40b3, 0x77d7, 0x72d7, 0xfab2, 0xf8b2, 0x6ed7, 0x6ad7, 0x5cd7, 0xefb2, 0x61d7, 0x59d7, 0x001a, 0xf7b2, 0xf9b2, 0x66d7, 0x63d7, 0xf4b2, 0x73d7, 0xf1b2, 0x64d7, 0x7ad7, 0x6cd7, 0x001a, 0x6bd7, 0xf0b2, 0x001a, 0xfbb2, 0x001a, 0xf3b2, 0x5ad7, 0x5fd7, 0x70d7, 0x76d7, 0x41b3, 0x5bd7, 0x67d7, 0x6dd7, 0xf6b2, 0x001a, 0x001a, 0x78d7, 0x71d7, 0x74d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5b2, 0x001a, 0x6cdb, 0x60db, 0xd7b5, 0x7ddb, 0xa7db, 0xaadb, 0xd5b5, 0x68db, 0xa3db, 0x69db, 0x77db, 0xe2b5, 0x73db, 0xdfb5, 0x001a, 0x74db, 0x5ddb, 0x001a, 0xa4db, 0x001a, 0x001a, 0xe8b5, 0xa1db, 0x75db, 0xacdb, 0x70db, 0xc8df, 0x001a, 0xafdb, 0xe6b5, 0x6edb, 0x7adb, 0xe9b5, 0xd4b5, 0x72db, 0xaddb, 0x6bdb, 0x64db, 0x6fdb, 0x001a, 0x63db, 0x61db, 0xd0b5, 0xa5db, 0x6adb, 0xa8db, 0x001a, 0xa9db, 0xd8b5, 0xddb5, 0xd9b5, 0xe1b5, 0x7edb, 0xdab5, 0x76db, 0x66db, 0x001a, 0xd2b5, 0x5edb, 0xa2db, 0xabdb, 0x65db, 0xe0b5, 0xb0db, 0x71db, 0x001a, 0x6ddb, 0x001a, 0xd1b5, 0xe5b5, 0x001a, 0x7cdb, 0xe7b5, 0x001a, 0x78db, 0xdcb5, 0xd6b5, 0xdeb5, 0xd3b5, 0xe4b5, 0x79db, 0x67db, 0x7bdb, 0x62db, 0xa6db, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaedb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fdb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7df, 0x001a, 0xdddf, 0x55b8, 0xccdf, 0x001a, 0xcadf, 0xb5df, 0xa9b8, 0xc5df, 0xd9df, 0xc1df, 0xb1b8, 0xd8df, 0xbfdf, 0xe3b5, 0xcfdf, 0xc0df, 0xd6df, 0xb0b8, 0xa8b8, 0x001a, 0xaadf, 0xb2df, 0x001a, 0xcbdf, 0xc3df, 0xdcdf, 0xc6df, 0xb6b8, 0xd7df, 0x001a, 0xadb8, 0x001a, 0xc9df, 0xd1df, 0xb6df, 0xd0df, 0x001a, 0xe1df, 0xb1df, 0xd2df, 0x001a, 0xdfdf, 0x001a, 0xabdf, 0xdbb5, 0x001a, 0xb9df, 0xb8df, 0xafb8, 0x001a, 0xbcdf, 0xbedf, 0xcddf, 0xdedf, 0xb2b8, 0x001a, 0xb3b8, 0x001a, 0xb0df, 0xabb8, 0xb4df, 0xdadf, 0xb4b8, 0x001a, 0xacb8, 0xaeb8, 0xb5b8, 0xe0df, 0xd3df, 0xcedf, 0x001a, 0x001a, 0xbbdf, 0xbadf, 0xaab8, 0xacdf, 0xa7b8, 0xc4df, 0xaddf, 0xc2df, 0x001a, 0x001a, 0xb7df, 0xdbdf, 0x001a, 0x001a, 0x001a, 0xa6b8, 0x001a, 0x001a, 0x001a, 0xb3df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafdf, 0xd5df, 0xaedf, 0x60bb, 0xd3e3, 0x001a, 0x001a, 0xc2e3, 0x001a, 0x001a, 0xace3, 0xcae3, 0x58bb, 0xbbe3, 0xc5e3, 0x5bbb, 0xbee3, 0x59bb, 0xafe3, 0xcde3, 0xaee3, 0xc1e3, 0x001a, 0xade3, 0x001a, 0x001a, 0xbfe3, 0xc8e3, 0xc6e3, 0xbae3, 0xb5e3, 0xb3e3, 0x001a, 0xb4e3, 0xc7e3, 0xd2e3, 0xbce3, 0x5abb, 0x001a, 0xb7e3, 0x001a, 0xcbe3, 0x001a, 0x5dbb, 0xb6e3, 0xb0e3, 0xc0e3, 0x61bb, 0x001a, 0x001a, 0x55bb, 0x5ebb, 0xb8e3, 0xb2e3, 0x001a, 0x57bb, 0xd4df, 0x56bb, 0xc3e3, 0x001a, 0x54bb, 0x63bb, 0x5cbb, 0xc4e3, 0xb9e3, 0xb1e3, 0xcce3, 0xbde3, 0x62bb, 0xd0e3, 0x5fbb, 0xcfe3, 0x001a, 0xc9e3, 0xcee3, 0x001a, 0x001a, 0x001a, 0xd1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e7, 0x74e7, 0x67e7, 0x66e7, 0x62e7, 0xb4bd, 0x001a, 0xacbd, 0x76e7, 0x75e7, 0xa9df, 0x5fe7, 0x63e7, 0x5de7, 0x001a, 0x70e7, 0x61e7, 0x001a, 0x77e7, 0x5ae7, 0x58e7, 0x64e7, 0x6ee7, 0x69e7, 0xb6bd, 0x4fe7, 0x001a, 0x6de7, 0x001a, 0x001a, 0x001a, 0xb7bd, 0xbddf, 0x5be7, 0x52e7, 0x55e7, 0x7be7, 0x5ce7, 0x53e7, 0x51e7, 0x4ee7, 0x001a, 0xb0bd, 0x65e7, 0xafbd, 0xb3bd, 0x60e7, 0x68e7, 0xa9bd, 0x78e7, 0x7ce7, 0xabbd, 0x001a, 0x57e7, 0x6be7, 0x6fe7, 0x54e7, 0x79e7, 0xb2bd, 0x001a, 0xb1bd, 0x4ce7, 0xb5bd, 0x72e7, 0x56e7, 0x6ae7, 0x50e7, 0x5ee7, 0x59e7, 0xadbd, 0xaebd, 0x6ce7, 0x7de7, 0x7ae7, 0x71e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de7, 0x001a, 0xaabd, 0x49eb, 0x001a, 0x40eb, 0x43eb, 0x001a, 0xbbbf, 0x45eb, 0xf9ea, 0x41eb, 0x47eb, 0xb8bf, 0xbcbf, 0xb6bf, 0x001a, 0x001a, 0xfbea, 0x4ceb, 0x001a, 0x001a, 0x46eb, 0x001a, 0xfcea, 0x55eb, 0x4feb, 0xf8ea, 0x46ee, 0xfeea, 0xb7bf, 0x001a, 0x4aeb, 0x001a, 0x54eb, 0xbfbf, 0x001a, 0x51eb, 0xfdea, 0x44eb, 0x48eb, 0x42eb, 0x56eb, 0x53eb, 0x50eb, 0xb9bf, 0xbabf, 0xbebf, 0xfaea, 0x57eb, 0xbdbf, 0x4deb, 0x001a, 0x001a, 0x4beb, 0x001a, 0x001a, 0x001a, 0x4eeb, 0x53ee, 0x40ee, 0x45ee, 0x52ee, 0x44ee, 0xfbed, 0x41ee, 0x001a, 0xa2c1, 0x001a, 0xf4ed, 0x4dee, 0x4fee, 0xf3ed, 0xa1c1, 0x51ee, 0x49ee, 0xa8c1, 0x50ee, 0x42ee, 0xaac1, 0xf9ed, 0x52eb, 0x4aee, 0x47ee, 0xf5ed, 0x55ee, 0xa4c1, 0x001a, 0x001a, 0xa5c1, 0xf7ed, 0x48ee, 0x001a, 0x54ee, 0x4bee, 0xfded, 0xa7c1, 0xa3c1, 0x4cee, 0xfeed, 0x56ee, 0xf8ed, 0x43ee, 0x4eee, 0xfaed, 0xfced, 0x001a, 0xcbc2, 0xf6ed, 0xa9c1, 0xc4c2, 0x7ec1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6c1, 0xc8c2, 0xb3f0, 0x001a, 0xa9f0, 0xa4f0, 0xaaf0, 0xb4f0, 0xb8f0, 0xb7f0, 0xcac2, 0xc9c2, 0x001a, 0x001a, 0xabf0, 0xb9f0, 0xaef0, 0xa6f0, 0x001a, 0xa8f0, 0xa7f0, 0xadf0, 0xb2f0, 0xa5f0, 0xacf0, 0xb1f0, 0xc7c2, 0x001a, 0xaff0, 0x001a, 0xc5c2, 0xb0f0, 0xc3c2, 0xc6c2, 0xd5f2, 0xb5f0, 0x001a, 0x001a, 0xc2c3, 0x001a, 0xcdf2, 0xd1f2, 0xc9f2, 0xccf2, 0x001a, 0xd4f2, 0xc0c3, 0xd9f2, 0xd2f2, 0x001a, 0xcaf2, 0xdaf2, 0xd3f2, 0xc3c3, 0xc4c3, 0xd7f2, 0x001a, 0xcbf2, 0xbfc3, 0xc1c3, 0xc6f2, 0xcef2, 0xc8f2, 0x001a, 0xd8f2, 0xd6f2, 0xc7f2, 0xcff2, 0x001a, 0x001a, 0x001a, 0xbef4, 0xc5c3, 0xd0f2, 0xa7c4, 0xa9c4, 0xa6c4, 0x001a, 0xc3f4, 0xbbf4, 0xb9f4, 0xbdf4, 0xbaf4, 0x001a, 0x001a, 0xbff4, 0xc1f4, 0xaac4, 0xacc4, 0x001a, 0xc0f4, 0xadc4, 0xabc4, 0xc2f4, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8c4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4c4, 0xf1f5, 0xf7f5, 0xf6c4, 0xbcf4, 0xf6f5, 0x001a, 0xfdf5, 0xf4f5, 0xfbf5, 0xfaf5, 0xb8f4, 0xf5f5, 0xb6f0, 0xfef5, 0xf3f5, 0xf8f5, 0x001a, 0xfcf5, 0xf2f5, 0x001a, 0x4af7, 0xf5c4, 0xf9f5, 0x001a, 0x001a, 0xf4f7, 0x4bf7, 0x49f7, 0x47f7, 0x48f7, 0x4cf7, 0x001a, 0xd9c5, 0xf2f7, 0xf0f7, 0xf5f7, 0xf3f7, 0x001a, 0xf6f7, 0xdac5, 0xf1f7, 0x001a, 0x001a, 0xbcf8, 0x001a, 0x001a, 0x45f9, 0x46f9, 0x47f9, 0x001a, 0x001a, 0xc7f9, 0xbdf9, 0x4fca, 0xeaaa, 0x001a, 0x68ad, 0x001a, 0xb8d3, 0xb7d3, 0x40b0, 0x42b3, 0x7cd7, 0x001a, 0x001a, 0x7bd7, 0x001a, 0xeab5, 0xb8b8, 0x001a, 0xb7b8, 0xb9b8, 0x001a, 0xd4e3, 0x7ee7, 0x58eb, 0x5aeb, 0x59eb, 0x001a, 0xabc1, 0x57ee, 0xbaf0, 0xa5f9, 0xe4a6, 0x001a, 0xc9cd, 0xcacd, 0xc8cd, 0xc7cd, 0xebaa, 0x001a, 0xa9d0, 0xa7d0, 0x001a, 0x001a, 0xa6d0, 0x001a, 0x69ad, 0x6bad, 0x6aad, 0xa8d0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4d3, 0xc1d3, 0xbfd3, 0x001a, 0x001a, 0x41b0, 0xc2d3, 0x46b0, 0xbcd3, 0xcbd3, 0x001a, 0xcdd3, 0xbdd3, 0x001a, 0x43b0, 0xced3, 0xc9d3, 0xbbd3, 0xc0d3, 0xcad3, 0xc6d3, 0xc3d3, 0x001a, 0x48b0, 0xccd3, 0xbed3, 0x001a, 0x001a, 0xc7d3, 0xb9d3, 0x47b0, 0x44b0, 0xc5d3, 0x001a, 0xc8d3, 0xbad3, 0x45b0, 0x42b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cb3, 0xa5d7, 0x4bb3, 0x001a, 0xa8d7, 0xabd7, 0x48b3, 0x46b3, 0x7ed7, 0xa9d7, 0xa7d7, 0xa4d7, 0xacd7, 0xadd7, 0xafd7, 0xb0d7, 0x7dd7, 0x45b3, 0xa2d7, 0xa1d7, 0xaed7, 0x47b3, 0xa3d7, 0x49b3, 0x44b3, 0xa6d7, 0x4db3, 0x001a, 0x4ab3, 0xaad7, 0x001a, 0x001a, 0x001a, 0xf1b5, 0xbfdb, 0x001a, 0xb4db, 0xeeb5, 0x001a, 0xe7df, 0xbddb, 0xb1db, 0xecb5, 0xb6db, 0xefb5, 0xbadb, 0xb8db, 0xf2b5, 0xebb5, 0x001a, 0x001a, 0xb2db, 0xb5db, 0xf0b5, 0x001a, 0xb3db, 0x001a, 0xbedb, 0xbcdb, 0xb7db, 0xb9db, 0xbbdb, 0xedb5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8df, 0xeedf, 0xe4df, 0xeadf, 0xbab8, 0xe6df, 0xc0b8, 0x001a, 0x001a, 0xbfb8, 0x001a, 0xbeb8, 0xeddf, 0xc1b8, 0xc2b8, 0xe3df, 0xf0df, 0xc3b8, 0xbdb8, 0xbcb8, 0xecdf, 0xc4b8, 0xe2df, 0xe5df, 0xefdf, 0xebdf, 0x001a, 0x001a, 0xf4e3, 0xe9e3, 0xbbb8, 0x001a, 0x001a, 0x001a, 0x001a, 0x6abb, 0xdde3, 0xf2e3, 0xdee3, 0x65bb, 0x001a, 0xdbe3, 0x001a, 0xe4e3, 0xdce3, 0x67bb, 0xd6e3, 0xf1e3, 0x68bb, 0xeee3, 0xefe3, 0xd7e3, 0x6dbb, 0xe6e3, 0x001a, 0xe0e3, 0xe7e3, 0xdae3, 0x001a, 0xf3e3, 0xebe3, 0xe5e3, 0xd5e3, 0x69bb, 0xece3, 0x001a, 0x6cbb, 0xf0e3, 0x001a, 0xeae3, 0x66bb, 0xe8e3, 0x001a, 0xe2e3, 0x64bb, 0xd9e3, 0xe1e3, 0xede3, 0xdfe3, 0x001a, 0x001a, 0xe3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1bd, 0xe9df, 0xb2e7, 0xbbe7, 0xb1e7, 0xade7, 0xaae7, 0xc2bd, 0xa8e7, 0x6bbb, 0xa1e7, 0xc0bd, 0xa7e7, 0xbfbd, 0xace7, 0xa9e7, 0xb9e7, 0xb4e7, 0xaee7, 0xb3e7, 0xbbbd, 0xabe7, 0xbee7, 0xa2e7, 0xa3e7, 0xbae7, 0xbcbd, 0xbfe7, 0xbebd, 0xc0e7, 0xb0e7, 0xd8e3, 0xb6e7, 0xafe7, 0xb8e7, 0xb5e7, 0x001a, 0x001a, 0x001a, 0xa6e7, 0xb9bd, 0xbde7, 0xbabd, 0xa4e7, 0xbdbd, 0x64eb, 0xb7e7, 0xbce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61eb, 0xb8bd, 0xc0bf, 0x6beb, 0x67eb, 0x001a, 0x65eb, 0x60eb, 0x6feb, 0x001a, 0x001a, 0x001a, 0xc4bf, 0x001a, 0x5ceb, 0x68eb, 0x69eb, 0x5feb, 0x5eeb, 0x6ceb, 0x001a, 0x62eb, 0x5deb, 0x63eb, 0x001a, 0x6eeb, 0x5beb, 0x6deb, 0x6aeb, 0xc2bf, 0xc1bf, 0x001a, 0x001a, 0xc3bf, 0x66eb, 0xcbf0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59ee, 0xb1c1, 0x5dee, 0x5aee, 0x61ee, 0x67ee, 0x5cee, 0x001a, 0x70ee, 0xaec1, 0x6aee, 0x5fee, 0x6bee, 0x66ee, 0x6dee, 0x5eee, 0xb3c1, 0xb2c1, 0x60ee, 0x6eee, 0x58ee, 0x6cee, 0xacc1, 0x001a, 0x64ee, 0x63ee, 0x68ee, 0x5bee, 0xb0c1, 0x001a, 0xb4c1, 0x62ee, 0x69ee, 0xb5c1, 0x65ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xadc1, 0xafc1, 0xc7f0, 0xc5f0, 0x001a, 0x001a, 0xccf0, 0xc9f0, 0xcdf0, 0x001a, 0xbef0, 0xc6f0, 0xd1f0, 0x6fee, 0xc2f0, 0xcfc2, 0xa5e7, 0xbdf0, 0xcaf0, 0xc4f0, 0xc1f0, 0xbcf0, 0xbbf0, 0xd0f0, 0x001a, 0xc0f0, 0xbff0, 0xcdc2, 0xc8f0, 0x001a, 0xccc2, 0x001a, 0x001a, 0xcec2, 0xc3f0, 0xcff0, 0x001a, 0xdef2, 0xdff2, 0x001a, 0xc9c3, 0xdcf2, 0xc6c3, 0xe4f2, 0x001a, 0xcac3, 0xe6f2, 0xdbf2, 0xcef0, 0xe8f2, 0xddf2, 0x001a, 0xc7c3, 0xe3f2, 0x001a, 0xe5f2, 0xe0f2, 0xe7f2, 0xe2f2, 0xe1f2, 0xc8c3, 0x001a, 0x001a, 0xc5f4, 0xc6f4, 0x001a, 0xc8f4, 0xaec4, 0xafc4, 0xc9f4, 0xc7f4, 0x001a, 0xc4f4, 0x001a, 0x42f6, 0x45f6, 0x41f6, 0x001a, 0xfac4, 0x43f6, 0xf9c4, 0xf8c4, 0xf7c4, 0x44f6, 0x51f7, 0x4ff7, 0x001a, 0x4ef7, 0x40f6, 0x50f7, 0x46f6, 0x4df7, 0x001a, 0xf9f7, 0xd7f7, 0xf7f7, 0xdbc5, 0xf8f7, 0xfaf7, 0x001a, 0xbff8, 0xfac5, 0xbef8, 0xbdf8, 0xfbc5, 0x001a, 0x5ac6, 0x6ef9, 0xa7f9, 0xa6f9, 0xa8f9, 0xe5a6, 0xaad0, 0x001a, 0xcfd3, 0xd0d3, 0x001a, 0x001a, 0x001a, 0xc0db, 0x001a, 0x47f6, 0xc0f8, 0xe6a6, 0x6cad, 0xabd0, 0x001a, 0x001a, 0x001a, 0xb1d7, 0x4eb3, 0x001a, 0xc2db, 0xc1db, 0xf3b5, 0x001a, 0xc5b8, 0xc1e7, 0xc3bd, 0x001a, 0xc4bd, 0x001a, 0x001a, 0x001a, 0xc5bf, 0xfcc5, 0xe7a6, 0x001a, 0x001a, 0x001a, 0xacd0, 0xedaa, 0xaed0, 0xadd0, 0x6dad, 0x001a, 0xd1d3, 0x001a, 0xd8d3, 0x49b0, 0xd6d3, 0xd4d3, 0x001a, 0xdbd3, 0xd2d3, 0xd3d3, 0x4ab0, 0x001a, 0x4eb0, 0x001a, 0x001a, 0xdcd3, 0x4db0, 0xdad3, 0xd7d3, 0xd5d3, 0x4bb0, 0x4cb0, 0xd9d3, 0x001a, 0x001a, 0x001a, 0x001a, 0x50b3, 0xb2d7, 0x001a, 0x55b3, 0xc2d7, 0x54b3, 0xc4d7, 0x001a, 0x001a, 0xb8d7, 0x52b3, 0xc3d7, 0x001a, 0xb3d7, 0x53b3, 0xbfd7, 0xbbd7, 0xbdd7, 0xb7d7, 0xbed7, 0x001a, 0x001a, 0x4fb3, 0xbad7, 0x001a, 0xb9d7, 0xb5d7, 0x001a, 0xc0d7, 0x001a, 0x001a, 0xbcd7, 0xb4d7, 0x001a, 0xb6d7, 0x51b3, 0xc1d7, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6b5, 0xcddb, 0x001a, 0x001a, 0x001a, 0xc9db, 0xcbdb, 0xc6db, 0xc5db, 0xc3db, 0x001a, 0xcadb, 0xccdb, 0xc8db, 0x001a, 0xc7db, 0xf4b5, 0xf5b5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfdb, 0xcdb8, 0xf2df, 0xf8df, 0xf3df, 0xf4df, 0xd8f9, 0xf9df, 0x001a, 0xcfb8, 0x001a, 0xc7b8, 0xceb8, 0xf1df, 0xc4db, 0xcab8, 0xc8b8, 0xf7df, 0xf6df, 0xc9b8, 0xcbb8, 0xf5df, 0xc6b8, 0x001a, 0xccb8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e3, 0x74bb, 0x001a, 0x001a, 0x42e4, 0x41e4, 0x001a, 0xfbe3, 0x76bb, 0x40e4, 0xf7e3, 0xf8e3, 0x6ebb, 0x70bb, 0x001a, 0xfde3, 0xf5e3, 0x72bb, 0x71bb, 0xf9e3, 0xfee3, 0xfce3, 0x73bb, 0xfae3, 0x001a, 0x001a, 0xcedb, 0x6fbb, 0x001a, 0x001a, 0xc2e7, 0xc9e7, 0xc6bd, 0x001a, 0xcde7, 0xcabd, 0xc5e7, 0xc3e7, 0x001a, 0xcce7, 0x001a, 0xc5bd, 0xcbe7, 0xc7bd, 0xc8bd, 0xc4e7, 0xc9bd, 0xcae7, 0xc6e7, 0xc7e7, 0xc8e7, 0x75bb, 0x001a, 0x001a, 0x001a, 0x70eb, 0x7ceb, 0x001a, 0xcabf, 0x77eb, 0x79eb, 0x001a, 0xc8bf, 0x71eb, 0x75eb, 0x001a, 0x78eb, 0xc6bf, 0xc9bf, 0x7beb, 0x73eb, 0x74eb, 0x7aeb, 0x72eb, 0x76eb, 0xc7bf, 0x72ee, 0x001a, 0x71ee, 0xb7c1, 0x77ee, 0xb9c1, 0x001a, 0x001a, 0xb6c1, 0x73ee, 0xbac1, 0x74ee, 0x001a, 0x001a, 0x75ee, 0x78ee, 0x001a, 0xb8c1, 0x001a, 0xd6f0, 0x001a, 0x001a, 0xd9f0, 0x001a, 0xd3f0, 0xd5f0, 0x001a, 0x001a, 0xd4f0, 0xd7f0, 0xd8f0, 0x76ee, 0xd2f0, 0x001a, 0x001a, 0xcdc3, 0xecf2, 0xeff2, 0xf1f2, 0xeaf2, 0xebf2, 0xeef2, 0xf0f2, 0xcec3, 0xccc3, 0xcbc3, 0xedf2, 0xe9f2, 0xcaf4, 0xb0c4, 0x001a, 0xcbf4, 0x001a, 0x001a, 0x49f6, 0xfbc4, 0x4bf6, 0xfcc4, 0x48f6, 0x4af6, 0xa8c5, 0x001a, 0x52f7, 0xa7c5, 0xfdf7, 0xfcf7, 0x001a, 0xfbf7, 0x001a, 0x001a, 0x48f9, 0x49f9, 0x4bf9, 0x4af9, 0x001a, 0x50ca, 0xe8a6, 0x001a, 0x6ead, 0xc5d7, 0xf7b5, 0x001a, 0xfadf, 0xd0c2, 0x001a, 0xf2f2, 0x001a, 0x001a, 0xa3a8, 0x001a, 0x001a, 0x001a, 0x57b3, 0x001a, 0x001a, 0x001a, 0x56b3, 0x001a, 0xd0db, 0xf8b5, 0xd2db, 0xd1db, 0x001a, 0x001a, 0xfbdf, 0xd0b8, 0x43e4, 0x46e4, 0x45e4, 0x001a, 0x44e4, 0xcee7, 0xd0e7, 0xcfe7, 0x001a, 0xccbf, 0x001a, 0x001a, 0x001a, 0xcbbf, 0x001a, 0xbbc1, 0x79ee, 0x7bee, 0x7aee, 0x001a, 0x001a, 0xd1c2, 0x001a, 0x001a, 0x001a, 0xf4f2, 0xf3f2, 0x001a, 0xccf4, 0xb1c4, 0x001a, 0x001a, 0xfdc4, 0x54f7, 0x53f7, 0x5bc6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a8, 0xafd0, 0x6fad, 0xc8d7, 0xc6d7, 0x001a, 0x001a, 0xc7d7, 0xd4db, 0xd5db, 0x43e0, 0xd3db, 0x001a, 0xfcdf, 0x41e0, 0x40e0, 0x42e0, 0xd1b8, 0xfedf, 0xfddf, 0x44e0, 0x001a, 0x49e4, 0x47e4, 0x001a, 0x48e4, 0xd3e7, 0xd1e7, 0x001a, 0x001a, 0xd2e7, 0x7deb, 0x7cee, 0x7dee, 0xd2c2, 0x001a, 0xf5f2, 0xcdf4, 0xb2c4, 0x001a, 0x4cf6, 0x55f7, 0xa9c5, 0x001a, 0xfef7, 0x4cf9, 0xa5a8, 0x001a, 0x71ad, 0x72ad, 0xb0d0, 0x001a, 0x001a, 0xb1d0, 0x70ad, 0x001a, 0x54b0, 0x001a, 0x52b0, 0x001a, 0x51b0, 0x58b0, 0x50b0, 0x59b0, 0xddd3, 0x56b0, 0x001a, 0x53b0, 0x57b0, 0x55b0, 0x4fb0, 0x001a, 0x001a, 0x5fb3, 0x001a, 0x59b3, 0xccd7, 0x5eb3, 0x001a, 0x001a, 0x60b3, 0x5ab3, 0x001a, 0x5bb3, 0x001a, 0xcad7, 0x001a, 0x001a, 0x58b3, 0x001a, 0xcbd7, 0x5db3, 0x001a, 0x001a, 0xc9d7, 0x5cb3, 0x001a, 0x001a, 0x44b6, 0x001a, 0x46b6, 0x001a, 0x001a, 0xd8db, 0x45b6, 0xf9b5, 0xfdb5, 0x001a, 0xe4b8, 0x49e0, 0xdadb, 0xfeb5, 0x001a, 0x001a, 0xdddb, 0xdedb, 0x43b6, 0x001a, 0xe0db, 0x001a, 0xe2db, 0x001a, 0xe3db, 0xd7db, 0xd6db, 0xe4db, 0x42b6, 0xe1db, 0xdfdb, 0x001a, 0x40b6, 0xfbb5, 0x47b6, 0xdbdb, 0xdcdb, 0xd9db, 0x001a, 0x41b6, 0x001a, 0x001a, 0xfcb5, 0x001a, 0xfab5, 0x48e0, 0xdfb8, 0xdab8, 0x001a, 0x001a, 0xd5b8, 0x001a, 0xe5b8, 0xd6b8, 0x001a, 0xd2b8, 0xe1b8, 0xdeb8, 0xe0b8, 0x001a, 0xd7b8, 0xdcb8, 0xd3b8, 0xd4b8, 0x50e0, 0x4de0, 0x45e0, 0x4ae0, 0x001a, 0xe2b8, 0x51e0, 0xe3b8, 0xd9b8, 0x001a, 0x001a, 0x47e0, 0x001a, 0x4fe0, 0x4be0, 0x4ee0, 0x4ce0, 0xddb8, 0x46e0, 0xd8b8, 0x001a, 0x001a, 0x001a, 0x4ce4, 0x78bb, 0x7bbb, 0x001a, 0x4ee4, 0x001a, 0xa5bb, 0x4de4, 0x7dbb, 0x001a, 0xcfbd, 0x4fe4, 0x001a, 0xa4bb, 0x4be4, 0xa6bb, 0x001a, 0x001a, 0x001a, 0x79bb, 0x001a, 0xdbb8, 0x7cbb, 0x001a, 0x7abb, 0x7ebb, 0xa2bb, 0x77bb, 0xa7bb, 0xa3bb, 0x001a, 0xa1bb, 0x4ae4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6bd, 0x001a, 0xd2bd, 0x001a, 0x001a, 0x001a, 0xd9bd, 0x001a, 0xd6e7, 0xdabd, 0xe2e7, 0xdbe7, 0xcbbd, 0xe3e7, 0xdde7, 0xd5bd, 0xdee7, 0x001a, 0xd4bd, 0xe1e7, 0xcebd, 0xdfe7, 0xd5e7, 0xcdbd, 0xaaeb, 0xd3bd, 0x001a, 0xd0bd, 0x001a, 0xd8bd, 0x001a, 0xd4e7, 0x001a, 0xd8e7, 0xccbd, 0xd7e7, 0xd9e7, 0xdae7, 0xd7bd, 0xdce7, 0xe0e7, 0xe4e7, 0x001a, 0xdbbd, 0xd2bf, 0xa5eb, 0xabeb, 0xa8eb, 0x7eeb, 0xaceb, 0xa1eb, 0x001a, 0xa7eb, 0x001a, 0xcdbf, 0xd3bf, 0xadeb, 0x001a, 0x001a, 0xcfbf, 0x001a, 0xd9bf, 0xd4bf, 0xafeb, 0xa9eb, 0xd0bf, 0xa2eb, 0xdabf, 0xa3eb, 0xa4eb, 0xdbbf, 0xd8bf, 0xd1bd, 0x001a, 0xcebf, 0xb0eb, 0xdcbf, 0x001a, 0xd5bf, 0xaeeb, 0xd1bf, 0xd6bf, 0xd7bf, 0x001a, 0xc3c1, 0xa4ee, 0xadee, 0xaaee, 0xacee, 0x001a, 0xc0c1, 0xa5ee, 0x001a, 0xabee, 0xbcc1, 0xa7ee, 0xc4c1, 0xa3ee, 0xa8ee, 0xafee, 0xa6eb, 0xa9ee, 0xa2ee, 0xbdc1, 0xa1ee, 0xbec1, 0xb0ee, 0xbfc1, 0xaeee, 0xc2c1, 0x7eee, 0x001a, 0xc1c1, 0x001a, 0xa6ee, 0xdcf0, 0xeaf0, 0xe5f0, 0xe7f0, 0xdbf0, 0xd3c2, 0x001a, 0xdaf0, 0xd6c2, 0xd5c2, 0x001a, 0xe9f0, 0xe1f0, 0xdef0, 0xe4f0, 0x001a, 0xddf0, 0x001a, 0xdff0, 0xe8f0, 0xe6f0, 0x001a, 0xd4c2, 0xedf0, 0xebf0, 0xe2f0, 0xecf0, 0xe3f0, 0x001a, 0xf9f2, 0xcfc3, 0x41f3, 0x001a, 0x001a, 0x4ff6, 0xd6c3, 0xe0f0, 0xf7f2, 0xd2c3, 0xf8f2, 0xfdf2, 0x001a, 0x001a, 0xd4c3, 0xd5c3, 0xf6f2, 0x40f3, 0x42f3, 0xfaf2, 0xfcf2, 0xfef2, 0xfbf2, 0x43f3, 0xd1c3, 0xd7c3, 0xd3c3, 0x001a, 0xd0c3, 0xd0f4, 0x001a, 0xb7c4, 0xcef4, 0x001a, 0x001a, 0xd2f4, 0x001a, 0xd3f4, 0xb5c4, 0xd4f4, 0xd1f4, 0x001a, 0xcff4, 0xb8c4, 0xb4c4, 0xd5f4, 0x001a, 0xb6c4, 0xb3c4, 0x001a, 0x001a, 0x001a, 0xfec4, 0x001a, 0x001a, 0x40c5, 0x4ef6, 0x4df6, 0x50f6, 0x51f6, 0x001a, 0x41c5, 0x56f7, 0x5bf7, 0xaac5, 0x001a, 0x58f7, 0x001a, 0x57f7, 0x5af7, 0x59f7, 0x001a, 0x43f8, 0x001a, 0xdcc5, 0x42f8, 0x40f8, 0x001a, 0x41f8, 0x001a, 0x001a, 0x001a, 0xfec5, 0xfdc5, 0xc1f8, 0xc2f8, 0x40c6, 0x001a, 0x4df9, 0x4ef9, 0x67c6, 0x001a, 0x6dc6, 0x001a, 0xa9f9, 0xc8f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6a8, 0x001a, 0xcdd7, 0x001a, 0xced7, 0x52e0, 0x50e4, 0xe5e7, 0xc6c1, 0x001a, 0xc5c1, 0xeef0, 0x44f3, 0x001a, 0x44f8, 0xa7a8, 0xded3, 0x5ab0, 0x61b3, 0x54e0, 0x53e0, 0xdcbd, 0xe6e7, 0xddbd, 0xb1ee, 0xd7c2, 0x001a, 0x001a, 0x001a, 0x76c6, 0xa8a8, 0xcbcd, 0xdfd3, 0x001a, 0x001a, 0x62b3, 0x001a, 0xcfd7, 0xd0d7, 0x001a, 0xe5db, 0x001a, 0x48b6, 0xe6b8, 0x001a, 0x56e0, 0x55e0, 0x57e0, 0x001a, 0x51e4, 0x52e4, 0xa8bb, 0xddbf, 0xdebd, 0xdebf, 0x001a, 0xb5ee, 0xb2ee, 0xb4ee, 0xb3ee, 0xc7c1, 0x001a, 0xeff0, 0x46f3, 0x45f3, 0xa4cb, 0x5cb0, 0x5bb0, 0xe0d3, 0x001a, 0xd1d7, 0x001a, 0x001a, 0xe7db, 0xe6db, 0x49b6, 0x001a, 0x59e0, 0x5ae0, 0x58e0, 0x001a, 0x001a, 0xe8b8, 0xe7b8, 0x001a, 0xaabb, 0xa9bb, 0x001a, 0xe7e7, 0xb3eb, 0xb1eb, 0xb2eb, 0xdfbf, 0xb7ee, 0xb6ee, 0x001a, 0xf2f0, 0xf1f0, 0xf0f0, 0x47f3, 0x001a, 0xaaf9, 0xa9a8, 0x73ad, 0x001a, 0x74ad, 0x5db0, 0x5eb0, 0xe2d3, 0xe1d3, 0xd2d7, 0x001a, 0x68b3, 0x66b3, 0x63b3, 0x67b3, 0x65b3, 0x64b3, 0x001a, 0x001a, 0x4ab6, 0xeadb, 0x001a, 0xedb8, 0x4cb6, 0x51b6, 0xecdb, 0x53b6, 0x52b6, 0x55b6, 0xebdb, 0xe8db, 0x4fb6, 0x4bb6, 0x4db6, 0xe9db, 0x54b6, 0x50b6, 0x4eb6, 0xefb8, 0xeeb8, 0xecb8, 0xf0b8, 0x001a, 0xeab8, 0xebb8, 0x001a, 0xe9b8, 0x001a, 0x5be0, 0x001a, 0x001a, 0x54e4, 0x001a, 0xacbb, 0xadbb, 0xabbb, 0x001a, 0x53e4, 0x001a, 0x55e4, 0x001a, 0xeae7, 0xece7, 0x001a, 0xe7bd, 0xede7, 0xe0bd, 0xe9e7, 0xdfbd, 0xe9bd, 0xe5bd, 0xe6bd, 0xe2bd, 0xe8e7, 0xe1bd, 0xeee7, 0xebe7, 0x001a, 0xe8bd, 0x001a, 0xe3bd, 0xe4bd, 0xb5eb, 0x001a, 0xb7eb, 0xb6eb, 0x001a, 0xb8eb, 0xe0bf, 0xb4eb, 0x001a, 0x001a, 0xcbc1, 0xb8ee, 0xc8c1, 0xccc1, 0xcac1, 0xc9c1, 0xf3f0, 0x001a, 0xf6f0, 0x001a, 0xf5f0, 0x001a, 0xf4f0, 0xd8c2, 0x48f3, 0x49f3, 0xd8c3, 0x4af3, 0xd9c3, 0x001a, 0x001a, 0xbac4, 0x001a, 0xb9c4, 0x52f6, 0x001a, 0x001a, 0x42c5, 0x53f6, 0x5cf7, 0xabc5, 0xacc5, 0x001a, 0x45f8, 0x001a, 0x42c6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaaa8, 0x001a, 0x6ab3, 0x69b3, 0x5ce0, 0x5de0, 0x001a, 0xaebb, 0xb9eb, 0xeabd, 0xbaeb, 0xb9ee, 0xaba8, 0x001a, 0xb2d0, 0x76ad, 0x75ad, 0x001a, 0xe3d3, 0x5fb0, 0xe4d3, 0xd5d7, 0x001a, 0xd4d7, 0x001a, 0xd3d7, 0x001a, 0x001a, 0xeedb, 0x58b6, 0x001a, 0x001a, 0xeddb, 0x57b6, 0x001a, 0x001a, 0x001a, 0xefdb, 0x56b6, 0x001a, 0x5fe0, 0x62e0, 0x60e0, 0x61e0, 0x65e0, 0x5ee0, 0x66e0, 0x63e0, 0x64e0, 0xb0bb, 0x56e4, 0x001a, 0x001a, 0xafbb, 0x001a, 0xf2e7, 0xf0e7, 0x001a, 0x001a, 0xebbd, 0xefe7, 0xf1e7, 0x001a, 0xecbd, 0x001a, 0xbbeb, 0x001a, 0xbceb, 0xcdc1, 0x001a, 0x4cf3, 0x4ef3, 0x4bf3, 0x4df3, 0xd6f4, 0x54f6, 0x001a, 0x001a, 0x6ff9, 0xaca8, 0x77ad, 0xe5d3, 0xe7d3, 0xe6d3, 0x001a, 0xd8d7, 0x6cb3, 0x001a, 0xd6d7, 0x001a, 0x6bb3, 0xd9d7, 0x001a, 0xdad7, 0xd7d7, 0x001a, 0x001a, 0xfbdb, 0x60b6, 0xf3db, 0xf9db, 0x001a, 0x001a, 0x5bb6, 0x5eb6, 0xf2db, 0x59b6, 0xf6db, 0x6ce0, 0x5db6, 0x001a, 0xf1db, 0x001a, 0xf7db, 0xf4db, 0xfadb, 0xf0db, 0xf8db, 0x5cb6, 0x5fb6, 0xf5db, 0x5ab6, 0x001a, 0xf2b8, 0x68e0, 0xf1b8, 0x6fe0, 0x6ee0, 0xf8b8, 0x001a, 0xf9b8, 0x70e0, 0xf3b8, 0x6de0, 0xf7b8, 0x72e0, 0x69e0, 0x001a, 0x6be0, 0xf4b8, 0x67e0, 0x6ae0, 0x71e0, 0xf5b8, 0x73e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6b8, 0x001a, 0xb1bb, 0x5be4, 0x61e4, 0x59e4, 0x62e4, 0x001a, 0x58e4, 0x5de4, 0x63e4, 0x60e4, 0x5fe4, 0x5ee4, 0x001a, 0x57e4, 0x5ce4, 0x001a, 0x001a, 0x5ae4, 0x001a, 0xf1bd, 0xeebd, 0xfbe7, 0x41e8, 0x43e8, 0x40e8, 0xf8e7, 0xfae7, 0x45e8, 0x42e8, 0xfce7, 0x46e8, 0xf9e7, 0x44e8, 0xefbd, 0xf5bd, 0xf3bd, 0xf3e7, 0xf4bd, 0xf0bd, 0xf4e7, 0xf6e7, 0xf5e7, 0xfde7, 0xfee7, 0x001a, 0xf2bd, 0x001a, 0xedbd, 0x001a, 0x001a, 0xf7e7, 0x001a, 0xc6eb, 0xe2bf, 0x001a, 0xbdeb, 0xe3bf, 0xe6bf, 0xc2eb, 0x001a, 0xbfeb, 0xe5bf, 0x001a, 0x001a, 0xc3eb, 0xc4eb, 0xbeeb, 0xc7eb, 0xc0eb, 0xc5eb, 0xe4bf, 0x001a, 0xe1bf, 0xc1eb, 0x001a, 0xbfee, 0xd0c1, 0xcec1, 0xd1c1, 0xcfc1, 0xbeee, 0xbbee, 0xbaee, 0x001a, 0xbdee, 0x001a, 0x001a, 0xbcee, 0x45f1, 0xdec2, 0xfbf0, 0xfaf0, 0x001a, 0xd9c2, 0x41f1, 0x40f1, 0xf7f0, 0x43f1, 0xfcf0, 0xddc2, 0xf9f0, 0x42f1, 0xf8f0, 0xdac2, 0xdcc2, 0xfdf0, 0xdbc2, 0xfef0, 0x001a, 0x44f1, 0x52f3, 0x001a, 0xdec3, 0x4ff3, 0x001a, 0x53f3, 0x001a, 0x001a, 0xdbc3, 0x51f3, 0xe0c3, 0x001a, 0xddc3, 0x001a, 0x50f3, 0x001a, 0xdfc3, 0x54f3, 0xdac3, 0x001a, 0x001a, 0x001a, 0x001a, 0xbcc4, 0xbec4, 0x001a, 0xd9f4, 0xbdc4, 0xd7f4, 0xdcc3, 0xd8f4, 0xbbc4, 0x43c5, 0x45c5, 0x56f6, 0x44c5, 0x55f6, 0x001a, 0x61f7, 0xadc5, 0x60f7, 0xaec5, 0x5ef7, 0x5df7, 0x62f7, 0x63f7, 0x46f8, 0x001a, 0x5ff7, 0x001a, 0x001a, 0xc6f8, 0xc3f8, 0xc4f8, 0xc5f8, 0x5cc6, 0x001a, 0x51f9, 0x50f9, 0x4ff9, 0x70f9, 0x001a, 0xbef9, 0xabf9, 0x6ec6, 0xada8, 0x60b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfab8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6bd, 0x001a, 0x001a, 0xc8eb, 0x001a, 0x001a, 0xdfc2, 0x001a, 0x55f3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacf9, 0xaea8, 0xeeaa, 0x79ad, 0x78ad, 0x001a, 0x63b0, 0x001a, 0xe8d3, 0x61b0, 0xe9d3, 0x62b0, 0x001a, 0x001a, 0xdfd7, 0xdbd7, 0x001a, 0x001a, 0x6db3, 0xded7, 0xddd7, 0xdcd7, 0x6eb3, 0xe0d7, 0xe1d7, 0x001a, 0x001a, 0x001a, 0x43dc, 0x41dc, 0x45dc, 0x46dc, 0x4cdc, 0x001a, 0x48dc, 0x4adc, 0x001a, 0x42dc, 0xfcdb, 0x001a, 0x49dc, 0x001a, 0x001a, 0x4bdc, 0x44dc, 0x47dc, 0xfddb, 0x62b6, 0x40dc, 0xfedb, 0x61b6, 0x63b6, 0x001a, 0xfdb8, 0x75e0, 0x77e0, 0x76e0, 0x7be0, 0xfbb8, 0x001a, 0x78e0, 0x74e0, 0x79e0, 0x7ae0, 0xfcb8, 0xfeb8, 0x7ce0, 0x001a, 0x67e4, 0x66e4, 0x001a, 0x64e4, 0x65e4, 0xb3bb, 0xb5bb, 0xb2bb, 0xb4bb, 0x4de8, 0x4ee8, 0x49e8, 0x001a, 0x4ae8, 0xf8bd, 0xfdbd, 0xf7bd, 0xfebd, 0xf9bd, 0x4be8, 0x001a, 0x001a, 0x4ce8, 0x48e8, 0x40be, 0xfbbd, 0x001a, 0x001a, 0xfabd, 0xfcbd, 0x001a, 0x47e8, 0x001a, 0xcaeb, 0xe8bf, 0x001a, 0x001a, 0xcceb, 0xeabf, 0xcfeb, 0xcbeb, 0xc9eb, 0xceeb, 0xe9bf, 0xcdeb, 0x001a, 0xe7bf, 0x001a, 0x001a, 0xd3c1, 0xd6c1, 0xc1ee, 0x001a, 0xd4c1, 0xc0ee, 0xd2c1, 0xd5c1, 0x46f1, 0x47f1, 0x48f1, 0xe0c2, 0x001a, 0x49f1, 0x001a, 0xe1c2, 0xe2c3, 0x58f3, 0x59f3, 0x57f3, 0x56f3, 0x5af3, 0xe1c3, 0xddf4, 0xdbf4, 0xdcf4, 0xdef4, 0xdaf4, 0xdff4, 0x58f6, 0x001a, 0x59f6, 0x57f6, 0x46c5, 0x64f7, 0xafc5, 0x65f7, 0x48f8, 0x47f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafa8, 0x64b6, 0x001a, 0x001a, 0x40b9, 0x001a, 0x001a, 0x001a, 0xb6bb, 0x001a, 0x001a, 0xecbf, 0x001a, 0xebbf, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3c3, 0x7cc4, 0x47c5, 0xb0a8, 0x64b0, 0x41b9, 0x001a, 0x5bf3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6cb, 0x001a, 0x001a, 0xb1a8, 0x001a, 0xb4a8, 0xb3a8, 0xb2a8, 0x001a, 0x001a, 0xa5cb, 0x001a, 0xcdcd, 0x001a, 0xcfcd, 0xefaa, 0x001a, 0x001a, 0xf1aa, 0xcccd, 0xcecd, 0xf0aa, 0xd1cd, 0xd0cd, 0xd2cd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6d0, 0xb4d0, 0x7cad, 0xb3d0, 0xa3ad, 0x7ead, 0x7bad, 0x001a, 0xa4ad, 0x001a, 0x7dad, 0xa2ad, 0x001a, 0xa1ad, 0xb5d0, 0x001a, 0x7aad, 0x001a, 0x001a, 0x001a, 0x6ab0, 0xebd3, 0xf1d3, 0x67b0, 0x6eb0, 0x001a, 0x69b0, 0xeed3, 0xf0d3, 0x6cb0, 0xead3, 0xedd3, 0x68b0, 0x65b0, 0xecd3, 0x6bb0, 0xefd3, 0x6db0, 0x66b0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3d7, 0xe6d7, 0x70b3, 0x001a, 0x7ab3, 0x76b3, 0xe4d7, 0x001a, 0x001a, 0x7eb3, 0x77b3, 0x7cb3, 0x72b3, 0x001a, 0x6fb3, 0x71b3, 0x7db3, 0xe5d7, 0x75b3, 0x78b3, 0x74b3, 0x79b3, 0xe7d7, 0x7bb3, 0x73b3, 0xe2d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ddc, 0x65b6, 0x4fdc, 0x001a, 0x67b6, 0x69b6, 0x001a, 0x4edc, 0x66b6, 0x6ab6, 0x001a, 0x68b6, 0x001a, 0x001a, 0x001a, 0x47b9, 0xa3e0, 0x4fb9, 0x7ee0, 0x001a, 0x50b9, 0x45b9, 0x001a, 0xa1e0, 0x001a, 0x001a, 0x4ab9, 0x001a, 0xa2e0, 0x43b9, 0x42b9, 0x001a, 0x4db9, 0x4cb9, 0x4bb9, 0x49b9, 0x4eb9, 0x7de0, 0x44b9, 0x46b9, 0x48b9, 0x001a, 0x001a, 0xb8bb, 0xbbbb, 0x001a, 0xbfbb, 0xb9bb, 0xbebb, 0xbcbb, 0x001a, 0xb7bb, 0x001a, 0xbdbb, 0xbabb, 0x001a, 0x001a, 0x001a, 0x52e8, 0x43be, 0x41be, 0x001a, 0x53e8, 0x001a, 0x44be, 0x42be, 0x51e8, 0x50e8, 0x001a, 0xf0bf, 0x4fe8, 0xeebf, 0xedbf, 0xd0eb, 0x45be, 0xefbf, 0xd1eb, 0xf2bf, 0xd2eb, 0xf1bf, 0xd8c1, 0xc3ee, 0xd7c1, 0xdcc1, 0xdac1, 0xdbc1, 0xe3c2, 0xd9c1, 0xc2ee, 0xd3eb, 0xe2c2, 0xe4c2, 0x001a, 0xe4c3, 0xe5c3, 0x001a, 0xe0f4, 0x001a, 0xdec5, 0xddc5, 0xb6a8, 0x001a, 0x001a, 0x55ca, 0x6fb0, 0x001a, 0x52ca, 0x53ca, 0x51ca, 0x001a, 0x54ca, 0x001a, 0x001a, 0xaacb, 0xa7cb, 0xaccb, 0xa8cb, 0xb7a8, 0xbaa8, 0x001a, 0xa9cb, 0xb9a8, 0xabcb, 0x001a, 0x001a, 0xb8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5cd, 0xd7cd, 0xf4aa, 0xd3cd, 0xd6cd, 0xd4cd, 0xf2aa, 0xf5aa, 0x001a, 0xf3aa, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8d0, 0xbcd0, 0xb9d0, 0x001a, 0xa7ad, 0x001a, 0xa8ad, 0x001a, 0xbbd0, 0x001a, 0xbdd0, 0xbfd0, 0x001a, 0xa5ad, 0xbed0, 0x001a, 0x001a, 0xa6ad, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeed7, 0xbad0, 0xf2d3, 0xfbd3, 0xf9d3, 0xf4d3, 0xf5d3, 0xfad3, 0xfcd3, 0x71b0, 0x001a, 0xf7d3, 0xf3d3, 0x70b0, 0x72b0, 0xf6d3, 0xfdd3, 0xf8d3, 0x001a, 0x001a, 0xa1b3, 0xf1d7, 0xe9d7, 0xefd7, 0xf0d7, 0xa2b3, 0x001a, 0xe8d7, 0xead7, 0xb7d0, 0xecd7, 0xedd7, 0xebd7, 0x6cb6, 0x001a, 0x001a, 0x001a, 0x56dc, 0xd4eb, 0x57dc, 0x54dc, 0xa3b3, 0x6eb6, 0x53dc, 0x59dc, 0x58dc, 0x6bb6, 0x5cdc, 0x52dc, 0x5bdc, 0x50dc, 0x5adc, 0x55dc, 0x6db6, 0x001a, 0xaae0, 0x001a, 0xa5e0, 0xabe0, 0xa6e0, 0xa4e0, 0xa7e0, 0x51b9, 0x001a, 0xa9e0, 0x001a, 0xa8e0, 0x52b9, 0xc1bb, 0xc0bb, 0x6ee4, 0x71e4, 0x69e4, 0x6de4, 0xc2bb, 0x6ce4, 0x6ae4, 0x70e4, 0x6be4, 0x68e4, 0x6fe4, 0x001a, 0x59e8, 0x48be, 0x4af1, 0x56e8, 0x57e8, 0x55e8, 0x51dc, 0x47be, 0x5ae8, 0x54e8, 0x46be, 0x49be, 0x58e8, 0xd5eb, 0xf3bf, 0xd6eb, 0xd7eb, 0x001a, 0xc4ee, 0xddc1, 0x4bf1, 0x4cf1, 0x001a, 0x001a, 0x4df1, 0x5df3, 0x5cf3, 0xe2f4, 0x001a, 0xe1f4, 0x5bf6, 0x5cf6, 0x5af6, 0x66f7, 0xb0c5, 0xbba8, 0xaaad, 0xa9ad, 0x75b0, 0x74b0, 0x40d4, 0x41d4, 0xfed3, 0x001a, 0x73b0, 0xf5d7, 0x001a, 0xf6d7, 0xf2d7, 0xa4b3, 0xf3d7, 0x001a, 0xf4d7, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fdc, 0x61dc, 0x5ddc, 0x60dc, 0x6fb6, 0x5edc, 0x70b6, 0x001a, 0x001a, 0x73dd, 0x55b9, 0x54b9, 0x001a, 0x53b9, 0x001a, 0xace0, 0xade0, 0x001a, 0x001a, 0x73e4, 0x75e4, 0xc6bb, 0xc3bb, 0x001a, 0xc5bb, 0xc4bb, 0x74e4, 0x72e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61e8, 0x5ee8, 0x5fe8, 0x4dbe, 0x60e8, 0x5be8, 0x5ce8, 0x4abe, 0x001a, 0x4bbe, 0x5de8, 0x4cbe, 0x001a, 0xdbeb, 0x001a, 0xdceb, 0xd9eb, 0xdaeb, 0xf4bf, 0xd8eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ee, 0xc5ee, 0xc7ee, 0xe0c1, 0xcbee, 0xdfc1, 0xc9ee, 0xccee, 0xcaee, 0xc6ee, 0xdec1, 0x001a, 0x4ff1, 0x001a, 0x50f1, 0x4ef1, 0x001a, 0x52f1, 0xe5c2, 0xe6c2, 0x5ff3, 0xe7c3, 0x51f1, 0x5ef3, 0xe6c3, 0xe5f4, 0xe6f4, 0xbfc4, 0xe4f4, 0x001a, 0xe3f4, 0x001a, 0x5df6, 0x48c5, 0x001a, 0x49f8, 0xc8f8, 0xc7f8, 0x001a, 0x43c6, 0x5dc6, 0xc9f8, 0x71f9, 0x001a, 0x6fc6, 0xbca8, 0xf6aa, 0x001a, 0x56b9, 0x001a, 0xc0c4, 0xbda8, 0xabad, 0xa5b3, 0x71b6, 0xe7c2, 0xf7aa, 0x001a, 0xc1d0, 0xc0d0, 0x42d4, 0x001a, 0x78b0, 0x76b0, 0x7ab0, 0x44d4, 0x001a, 0x79b0, 0x77b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x43d4, 0xa8b3, 0xfcd7, 0x001a, 0xa7b3, 0xa9b3, 0x42d8, 0xabb3, 0xfed7, 0x40d8, 0xf7d7, 0xaab3, 0x43d8, 0x001a, 0x001a, 0xf9d7, 0x001a, 0xfad7, 0xf8d7, 0xa6b3, 0x001a, 0x41d8, 0xfbd7, 0xfdd7, 0x001a, 0x001a, 0x001a, 0x6ddc, 0x001a, 0x6cdc, 0x6adc, 0x62dc, 0x71dc, 0x65dc, 0x6fdc, 0x76dc, 0x6edc, 0x79b6, 0x001a, 0x75b6, 0x63dc, 0x001a, 0x69dc, 0x77b6, 0x001a, 0x68dc, 0x78b6, 0x7ab6, 0x6bdc, 0x001a, 0x72b6, 0x73b6, 0x77dc, 0x75dc, 0x001a, 0x74dc, 0x66dc, 0x001a, 0x72dc, 0x001a, 0x76b6, 0x001a, 0x001a, 0x001a, 0x001a, 0x74b6, 0x73dc, 0x64dc, 0x67dc, 0x70dc, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbae4, 0xb7e0, 0x001a, 0xb0e0, 0xc3e0, 0xcce0, 0xb3e0, 0x61b9, 0x001a, 0xc0e0, 0x57b9, 0x59b9, 0x65b9, 0xb1e0, 0x001a, 0x001a, 0x5ab9, 0x5cb9, 0x66b9, 0x5bb9, 0x001a, 0x001a, 0x001a, 0x001a, 0x64b9, 0xb9e0, 0x001a, 0xaee0, 0x62b9, 0xb8e0, 0x5eb9, 0xcae0, 0x63b9, 0xc8e0, 0xbce0, 0xc6e0, 0x60b9, 0xafe0, 0xc9e0, 0xc4e0, 0x001a, 0xcbe0, 0x58b9, 0x001a, 0x001a, 0x67b9, 0x5db9, 0x001a, 0x001a, 0xb5e0, 0x001a, 0xbde0, 0xc1e0, 0x001a, 0xc5e0, 0x5fb9, 0xb4e0, 0xb2e0, 0xbee0, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe0, 0xbae0, 0x001a, 0xbfe0, 0xc2e0, 0x001a, 0xc7e0, 0x001a, 0x001a, 0x001a, 0x78e4, 0x001a, 0xc7bb, 0xa4e4, 0x7ae4, 0xccbb, 0xd0bb, 0xade4, 0xb5e4, 0xa6e4, 0xc8bb, 0x001a, 0xaae4, 0xb6e0, 0x001a, 0xc9bb, 0xb1e4, 0xb6e4, 0xaee4, 0x001a, 0xb0e4, 0xb9e4, 0xb2e4, 0x7ee4, 0xa9e4, 0x001a, 0x001a, 0xd1bb, 0x001a, 0xcdbb, 0x7ce4, 0xabe4, 0xcbbb, 0xa5e4, 0xcabb, 0xb3e4, 0xa2e4, 0x79e4, 0xcebb, 0xb8e4, 0x001a, 0x001a, 0x7be4, 0xafe4, 0xace4, 0xa7e4, 0x77e4, 0x76e4, 0xa1e4, 0xb4e4, 0xcfbb, 0xb7e4, 0x7de4, 0xa3e4, 0x52be, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5abe, 0x55be, 0xa4e8, 0xa1e8, 0x67e8, 0x50be, 0x001a, 0xd7f9, 0x001a, 0x4fbe, 0x56be, 0x001a, 0x001a, 0x001a, 0x65e8, 0x54be, 0x71e8, 0x63e8, 0x64e8, 0x4ebe, 0xa3e8, 0x58be, 0x74e8, 0x79e8, 0x73e8, 0xeeeb, 0x6fe8, 0x77e8, 0x75e8, 0x68e8, 0x62e8, 0x7de8, 0x57be, 0x7ee8, 0x001a, 0x78e8, 0x001a, 0x6de8, 0x6be8, 0x66e8, 0x001a, 0x001a, 0x001a, 0x6ee8, 0x7be8, 0x6ae8, 0x7ae8, 0xa2e8, 0x001a, 0x001a, 0x53be, 0x001a, 0x76e8, 0x7ce8, 0x72e8, 0x6ce8, 0x51be, 0x001a, 0x001a, 0x001a, 0xa8e4, 0x70e8, 0x59be, 0x69e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4eb, 0xf7bf, 0xf3eb, 0xf0eb, 0x44ec, 0xfbbf, 0x001a, 0x41ec, 0xf8eb, 0x43ec, 0xe9eb, 0xf6eb, 0x001a, 0xfdbf, 0x001a, 0xe1eb, 0x001a, 0xdfeb, 0x42ec, 0x001a, 0x40ec, 0xfeeb, 0xedeb, 0xeceb, 0xe2eb, 0x40c0, 0x001a, 0xe8eb, 0xf2eb, 0xfdeb, 0x43c0, 0x45ec, 0x001a, 0xe8c1, 0x45c0, 0xfebf, 0xe6eb, 0x001a, 0xefeb, 0xdeeb, 0xe0eb, 0xf5bf, 0x42c0, 0xfabf, 0xe7eb, 0xf7eb, 0xf1eb, 0x41c0, 0xddeb, 0xe3c1, 0xf9eb, 0xfceb, 0xfcbf, 0x001a, 0xebeb, 0x44c0, 0xf9bf, 0x001a, 0x001a, 0x001a, 0xf8bf, 0xf5eb, 0xfbeb, 0xf6bf, 0x001a, 0xe4eb, 0xfaeb, 0x001a, 0x001a, 0xe5eb, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaeb, 0xd2ee, 0x001a, 0xd7ee, 0xe5c1, 0xe7c1, 0xddee, 0xe1c1, 0xecee, 0xe3ee, 0xd8ee, 0xd9ee, 0xe2ee, 0x001a, 0xeec1, 0xe1ee, 0xd1ee, 0xe0ee, 0xd4ee, 0xedee, 0xedc1, 0xebc1, 0xd5ee, 0x001a, 0xe8ee, 0x001a, 0xdaee, 0xe7ee, 0x001a, 0xe9ee, 0xd0ee, 0xe6c1, 0x001a, 0xeaee, 0x001a, 0x001a, 0xdeee, 0x001a, 0xeac1, 0xdbee, 0x001a, 0x001a, 0xecc1, 0xe4ee, 0x001a, 0x001a, 0x001a, 0xe4c1, 0xd6ee, 0xe5ee, 0x001a, 0xdfee, 0xe3eb, 0xe6ee, 0xd3ee, 0x001a, 0xe9c1, 0x001a, 0xebee, 0x001a, 0xe2c1, 0xceee, 0x001a, 0x001a, 0x001a, 0x001a, 0x60f1, 0x59f1, 0xe9c2, 0x001a, 0x54f1, 0x63f1, 0x5bf1, 0xdcee, 0x001a, 0x65f1, 0x55f1, 0x001a, 0xe8c2, 0x5ff1, 0xeac2, 0xf2c2, 0xf0c2, 0x61f1, 0xf1c2, 0x57f1, 0x001a, 0x58f1, 0x5df1, 0x62f1, 0x001a, 0xcdee, 0xebc2, 0x6af1, 0x67f1, 0x6bf1, 0x5ef1, 0x5af1, 0x68f1, 0x6af3, 0x5cf1, 0x001a, 0xeec2, 0x001a, 0xedc2, 0xcfee, 0xefc2, 0x64f1, 0x66f1, 0xecc2, 0x69f1, 0x53f1, 0x001a, 0x56f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73f3, 0x001a, 0x63f3, 0xebc3, 0x71f3, 0x001a, 0x001a, 0x61f3, 0xecc3, 0x001a, 0x6cf3, 0x001a, 0x68f3, 0xf1c3, 0x72f3, 0x62f3, 0x65f3, 0xe9c3, 0x74f3, 0x001a, 0x6df3, 0x70f3, 0xefc3, 0xf4c3, 0xf2c3, 0x69f3, 0x64f3, 0x001a, 0xedc3, 0xeec3, 0x60f3, 0xeac3, 0x001a, 0xe8c3, 0xf0c3, 0x6ff3, 0xf3c3, 0x001a, 0x6bf3, 0x75f3, 0xf5c3, 0x001a, 0x001a, 0x001a, 0x67f3, 0x001a, 0x6ef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3f4, 0x42f5, 0xf5f4, 0xfcf4, 0x66f3, 0xfaf4, 0xe9f4, 0x40f5, 0xc3c4, 0xedf4, 0xfef4, 0xf4f4, 0x001a, 0x001a, 0xc2c4, 0x001a, 0x001a, 0x44f5, 0xf6f4, 0x001a, 0xfbf4, 0xfdf4, 0xe7f4, 0x41f5, 0xf2f4, 0xf7f4, 0xebf4, 0xeff4, 0x43f5, 0xf9f4, 0xe8f4, 0xecf4, 0xeef4, 0xf8f4, 0x001a, 0xc1c4, 0xf1f4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeaf4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0f4, 0x61f6, 0x66f6, 0x4fc5, 0x68f6, 0x001a, 0x49c5, 0x001a, 0x64f6, 0x6af6, 0x4ec5, 0x4ac5, 0x001a, 0x4bc5, 0x60f6, 0x67f6, 0x4dc5, 0x65f6, 0x4cc5, 0x5ff6, 0x63f6, 0x62f6, 0x001a, 0x5ef6, 0x69f6, 0x001a, 0x001a, 0x001a, 0xb1c5, 0x6df7, 0x70f7, 0x6cf7, 0x6ef7, 0x6ff7, 0x69f7, 0x6af7, 0x67f7, 0x001a, 0x001a, 0x6bf7, 0x68f7, 0xb2c5, 0xb3c5, 0x001a, 0x001a, 0x4bf8, 0x001a, 0x4df8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cf8, 0x4ef8, 0x001a, 0xe0c5, 0x001a, 0x4af8, 0xdfc5, 0xe1c5, 0x001a, 0x001a, 0x001a, 0xcbf8, 0xccf8, 0x44c6, 0xcaf8, 0x001a, 0x53f9, 0x52f9, 0x54f9, 0x5fc6, 0x55f9, 0x5ec6, 0x56f9, 0x72f9, 0x75f9, 0x74f9, 0x68c6, 0x73f9, 0x001a, 0x001a, 0x001a, 0x72c6, 0x70c6, 0x71c6, 0x77c6, 0xc0f9, 0xc1f9, 0xbff9, 0xc9f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8aa, 0x001a, 0x001a, 0x44d8, 0x78dc, 0xa5e8, 0x76f3, 0x001a, 0x001a, 0xf9aa, 0x001a, 0xacad, 0x7bb0, 0x001a, 0x001a, 0x45d8, 0x001a, 0x46d8, 0xacb3, 0x001a, 0x7db6, 0x7adc, 0x79dc, 0xa3b6, 0x7cb6, 0x7bdc, 0x7eb6, 0xa2b6, 0xa1b6, 0x7bb6, 0x001a, 0x001a, 0x001a, 0x68b9, 0x001a, 0x001a, 0xd0e0, 0xcee0, 0x001a, 0xcfe0, 0xcde0, 0x001a, 0xd2bb, 0x001a, 0xd5bb, 0xd7bb, 0xd6bb, 0x001a, 0x001a, 0xd3bb, 0xd4bb, 0x001a, 0xa7e8, 0xa6e8, 0x5bbe, 0xa8e8, 0x001a, 0xa9e8, 0x5cbe, 0x001a, 0x001a, 0x001a, 0x4dec, 0x4bec, 0xf3ee, 0x001a, 0x49ec, 0x4aec, 0x46c0, 0x46ec, 0x4eec, 0x48ec, 0x4cec, 0xefee, 0x001a, 0x001a, 0xf1ee, 0x001a, 0xf2ee, 0xf3c1, 0xeeee, 0xf2c1, 0xf0ee, 0xefc1, 0xf0c1, 0xf1c1, 0x47ec, 0x001a, 0x001a, 0xf5c2, 0x6ef1, 0x6cf1, 0x6df1, 0xf3c2, 0xf6c2, 0xf4c2, 0x001a, 0x001a, 0x001a, 0x77f3, 0x78f3, 0xf6c3, 0x001a, 0x45f5, 0x47f5, 0x46f5, 0xc4c4, 0x50c5, 0x6df6, 0x6cf6, 0x6bf6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfaaa, 0x001a, 0xaac9, 0x001a, 0x58ca, 0xe9a6, 0x56ca, 0x59ca, 0x57ca, 0x001a, 0x001a, 0x001a, 0xaecb, 0x001a, 0xc1a8, 0x001a, 0xc2a8, 0xb0cb, 0xbfa8, 0xafcb, 0xadcb, 0xc0a8, 0xbea8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8cd, 0xdbcd, 0xfdaa, 0xdacd, 0xd9cd, 0x001a, 0xfcaa, 0xfbaa, 0x001a, 0x40ab, 0xdccd, 0xfeaa, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6d0, 0xaead, 0xafad, 0xb0ad, 0xc7d0, 0xc3d0, 0xadad, 0xc4d0, 0x001a, 0xc5d0, 0xc2d0, 0x001a, 0x001a, 0x001a, 0xa4b0, 0x001a, 0x001a, 0xa1b0, 0x45d4, 0xa2b0, 0xa5b0, 0x46d4, 0x001a, 0x7eb0, 0x7cb0, 0x7db0, 0xa3b0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xadb3, 0x49d8, 0xb5b3, 0x48d8, 0x001a, 0x4bd8, 0xb1b3, 0x4ad8, 0xabb6, 0xafb3, 0xb2b3, 0xaeb3, 0xb3b3, 0xb4b3, 0xb0b3, 0x001a, 0x001a, 0x001a, 0x47d8, 0xa7b6, 0x7ddc, 0x001a, 0xa3dc, 0x001a, 0x001a, 0xa2dc, 0xacb6, 0xa8b6, 0xa9b6, 0x7cdc, 0x7edc, 0xa1dc, 0xa4b6, 0xa6b6, 0x001a, 0xaab6, 0xa5b6, 0x001a, 0x001a, 0xd3e0, 0xd1e0, 0xd2e0, 0x6ab9, 0x6bb9, 0x001a, 0xd4e0, 0x69b9, 0xd8bb, 0x001a, 0xdabb, 0xd9bb, 0x001a, 0xbbe4, 0x001a, 0x001a, 0xbce4, 0xabe8, 0x001a, 0xaae8, 0x001a, 0x001a, 0x47c0, 0x48c0, 0x4fec, 0x49c0, 0x001a, 0xf6ee, 0x001a, 0xf4ee, 0x001a, 0xf5ee, 0xf4c1, 0x001a, 0x6ff1, 0xf7c3, 0x001a, 0x001a, 0x001a, 0xf5c1, 0x41ab, 0x001a, 0xa6b0, 0x47d4, 0x001a, 0x001a, 0x4cd8, 0xb6b3, 0xadb6, 0xa4dc, 0xa6dc, 0xafb6, 0xaeb6, 0xb0b6, 0xb1b6, 0xa5dc, 0x6eb9, 0x6fb9, 0x6db9, 0xdbbb, 0x6cb9, 0xd5e0, 0x001a, 0x001a, 0x001a, 0xdcbb, 0xace8, 0x50ec, 0x4ac0, 0xf6c1, 0x70f1, 0x74f1, 0xf9c2, 0x71f1, 0xfac2, 0xf8c2, 0x75f1, 0xfbc2, 0x73f1, 0x001a, 0x79f3, 0xf7c2, 0xf8c3, 0x001a, 0xcdf8, 0x001a, 0x001a, 0x42ab, 0xb8b3, 0xb7b3, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2b6, 0xa8dc, 0xa7dc, 0xb3b6, 0x001a, 0x001a, 0xd9e0, 0x73b9, 0x70b9, 0xd8e0, 0x72b9, 0xd6e0, 0x71b9, 0x001a, 0xd7e0, 0x001a, 0xbde4, 0xddbb, 0x001a, 0xafe8, 0x001a, 0x5dbe, 0xade8, 0x5ebe, 0x5fbe, 0xaee8, 0x60be, 0x001a, 0x51ec, 0x001a, 0x4ec0, 0x4bc0, 0x50c0, 0x53ec, 0x4cc0, 0x52ec, 0x4fc0, 0x001a, 0x001a, 0x4dc0, 0x001a, 0xf9ee, 0xfbee, 0x001a, 0x001a, 0xf7c1, 0xfaee, 0xf8c1, 0xf8ee, 0xf7ee, 0x001a, 0x77f1, 0x76f1, 0xfcc2, 0x78f1, 0x7ef3, 0xfac3, 0x7df3, 0x7af3, 0xf9c3, 0x7bf3, 0x7cf3, 0x001a, 0x48f5, 0x49f5, 0xc5c4, 0x001a, 0x53c5, 0x001a, 0x001a, 0x6ef6, 0x001a, 0x001a, 0x51c5, 0x52c5, 0x6ff6, 0x001a, 0x001a, 0xb4c5, 0xb5c5, 0x71f7, 0x001a, 0x001a, 0x45c6, 0xcff8, 0x47c6, 0x001a, 0xcef8, 0xd0f8, 0x46c6, 0x57f9, 0x001a, 0xadf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x43ab, 0x001a, 0x001a, 0x001a, 0x74b9, 0x001a, 0xbee4, 0x001a, 0xb0e8, 0x51c0, 0x52c0, 0x001a, 0x44ab, 0x001a, 0x61be, 0xfbc3, 0xb1ad, 0x001a, 0x001a, 0x001a, 0x53c0, 0x001a, 0xe2c5, 0xb2ad, 0x4dd8, 0x001a, 0xa9dc, 0x001a, 0xabdc, 0x001a, 0xaadc, 0x001a, 0xdde0, 0xdae0, 0x75b9, 0x001a, 0x76b9, 0xdbe0, 0xdce0, 0x001a, 0xc0e4, 0xc5e4, 0xdebb, 0xbfe4, 0xc1e4, 0xc8e4, 0xc3e4, 0xc7e4, 0xc4e4, 0xc2e4, 0xc6e4, 0xdfbb, 0x001a, 0x001a, 0xb3e8, 0x001a, 0xb1e8, 0x63be, 0x001a, 0x62be, 0xb2e8, 0x64be, 0x001a, 0x001a, 0x001a, 0x001a, 0x56ec, 0x001a, 0x001a, 0x55ec, 0x54c0, 0x54ec, 0xfcee, 0x001a, 0xfeee, 0x41ef, 0x40ef, 0x001a, 0xf9c1, 0xfdee, 0xa1f1, 0xfdc2, 0x7df1, 0xa2f1, 0xfec2, 0x001a, 0x7bf1, 0x001a, 0x7ef1, 0x7cf1, 0x79f1, 0x40c3, 0x7af1, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1f3, 0x001a, 0x001a, 0xa3f3, 0xa2f3, 0x001a, 0x4af5, 0x001a, 0x4bf5, 0x001a, 0x001a, 0x001a, 0x70f6, 0x001a, 0xb7c5, 0x001a, 0xb6c5, 0x4ff8, 0x50f8, 0x48c6, 0xd1f8, 0x001a, 0x69c6, 0x001a, 0xb3ad, 0xb4b6, 0xcae4, 0xc9e4, 0xb5e8, 0xb4e8, 0x001a, 0x001a, 0xfac1, 0x43ef, 0x42ef, 0xa5f1, 0xa3f1, 0xa6f1, 0xa4f1, 0x001a, 0x001a, 0xfcc3, 0xa4f3, 0xa5f3, 0xa6f3, 0x001a, 0x71f6, 0x001a, 0x72f7, 0x001a, 0xd2f8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4ad, 0x001a, 0x001a, 0x57ec, 0x44ef, 0x001a, 0xb5ad, 0x001a, 0x001a, 0xe0bb, 0x001a, 0x58ec, 0x41c3, 0xa7f1, 0xfdc3, 0x001a, 0x4cf5, 0x4df5, 0x54c5, 0x51f8, 0xb6ad, 0xbbb3, 0xbcb3, 0x4ed8, 0xb5b6, 0xb6b6, 0xacdc, 0xb7b6, 0x001a, 0x7ab9, 0x001a, 0x7cb9, 0xdfe0, 0xe0e0, 0xdee0, 0x77b9, 0x78b9, 0x7bb9, 0x79b9, 0x001a, 0x001a, 0xcbe4, 0xe1bb, 0xe2bb, 0x001a, 0x001a, 0xbce8, 0x67be, 0xb7e8, 0xb6e8, 0x001a, 0xbbe8, 0x65be, 0x001a, 0x001a, 0x5bc0, 0x001a, 0xb8e8, 0xbde8, 0xbae8, 0xb9e8, 0x001a, 0x66be, 0x001a, 0x59c0, 0x001a, 0x5aec, 0x55c0, 0x001a, 0x5bec, 0x001a, 0x001a, 0x59ec, 0x001a, 0x58c0, 0x56c0, 0x5ac0, 0x001a, 0x57c0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45ef, 0x001a, 0x4aef, 0x46ef, 0x49ef, 0xfbc1, 0x001a, 0xd4ed, 0x48ef, 0x47ef, 0x001a, 0x44c3, 0x42c3, 0x45c3, 0x43c3, 0xa8f1, 0xa9f1, 0xaaf1, 0x46c3, 0x001a, 0x001a, 0x001a, 0xaaf3, 0x40c4, 0xa8f3, 0x001a, 0x41c4, 0xa7f3, 0xa9f3, 0xfec3, 0x51f5, 0x4ef5, 0x001a, 0x4ff5, 0x50f5, 0x72f6, 0x56c5, 0x001a, 0x55c5, 0x001a, 0x74f7, 0x73f7, 0xb8c5, 0x001a, 0x001a, 0x001a, 0xe3c5, 0x49c6, 0x60c6, 0x58f9, 0xaef9, 0xaff9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7ad, 0xaddc, 0x001a, 0x001a, 0xe1e0, 0xcce4, 0xcde4, 0xe3bb, 0x001a, 0xe4bb, 0xbee8, 0x68be, 0x001a, 0x001a, 0xfcc1, 0x001a, 0xabf1, 0x001a, 0x47c3, 0xadf3, 0x42c4, 0xacf3, 0xaef3, 0xabf3, 0x75f6, 0x52f5, 0x53f5, 0x001a, 0xc6c4, 0x001a, 0x74f6, 0x001a, 0x001a, 0x73f6, 0x001a, 0x75f7, 0xb0f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8ad, 0x001a, 0x001a, 0x001a, 0xb9ad, 0x001a, 0x001a, 0xa7b0, 0x48d4, 0x001a, 0x4fd8, 0x001a, 0xb8b6, 0x001a, 0xbbb6, 0xb9b6, 0xaedc, 0x001a, 0xbdb6, 0x001a, 0xbab6, 0x001a, 0x001a, 0xbcb6, 0x001a, 0x7eb9, 0x001a, 0xe2e0, 0x001a, 0x001a, 0xe3e0, 0xc0e8, 0x001a, 0x7db9, 0xa1b9, 0xa2b9, 0x001a, 0xcfe4, 0x001a, 0xcee4, 0xe5bb, 0x001a, 0xe6bb, 0x001a, 0xd0e4, 0xbfe8, 0xe8bb, 0x69be, 0x001a, 0xe7bb, 0x001a, 0x001a, 0x001a, 0x5cc0, 0xc1e8, 0x6bbe, 0x6abe, 0xc2e8, 0xc5e8, 0xc3e8, 0xc4e8, 0x6cbe, 0x001a, 0x61c0, 0x5fc0, 0x001a, 0x001a, 0x5ec0, 0x5dec, 0x001a, 0x60c0, 0x001a, 0x001a, 0x5cec, 0x4bef, 0x001a, 0x5eec, 0x5dc0, 0x5fec, 0x4eef, 0x4cef, 0x4def, 0x52ef, 0x4bc3, 0x51ef, 0x54ef, 0x53ef, 0x50ef, 0x4fef, 0x001a, 0xfdc1, 0x001a, 0x001a, 0x001a, 0x001a, 0xaef1, 0x001a, 0xadf1, 0x4ac3, 0x48c3, 0x49c3, 0x001a, 0xacf1, 0x001a, 0xb1f3, 0x001a, 0x43c4, 0x001a, 0xb0f3, 0xaff3, 0x44c4, 0x001a, 0x58f5, 0x57f5, 0x001a, 0x55f5, 0x001a, 0x54f5, 0xc8c4, 0xc7c4, 0x59f5, 0x76f7, 0xb9c5, 0x77f6, 0x57c5, 0x76f6, 0x56f5, 0x001a, 0x77f7, 0xe4c5, 0x001a, 0x61c6, 0x59f9, 0x001a, 0xb1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaad, 0x50d8, 0x55ef, 0xbbad, 0x001a, 0x001a, 0xd2e4, 0xd1e4, 0x60ec, 0x001a, 0x001a, 0x57ef, 0x001a, 0x56ef, 0x001a, 0x4cc3, 0xb2f3, 0xb3f3, 0xc9c4, 0x001a, 0x001a, 0xb2f9, 0xa8b0, 0xbfb6, 0xbeb6, 0xe4e0, 0xe6e0, 0xa4b9, 0xe5e0, 0xa3b9, 0xa5b9, 0xe7e0, 0x001a, 0x001a, 0x001a, 0xd4e4, 0xd6e4, 0xd5e4, 0x001a, 0xd8e4, 0x001a, 0x001a, 0x001a, 0xe9bb, 0xd7e4, 0xd3e4, 0x001a, 0x001a, 0x001a, 0xd9e4, 0x001a, 0xcce8, 0x001a, 0xcfe8, 0xd1e8, 0xc7e8, 0xcbe8, 0xc8e8, 0x6ebe, 0x71be, 0x73be, 0xc9e8, 0xcae8, 0x72be, 0xcde8, 0xd0e8, 0xcee8, 0x74be, 0x001a, 0x70be, 0xc6e8, 0x6dbe, 0x001a, 0x6fbe, 0x001a, 0x001a, 0x63c0, 0x66ec, 0x64ec, 0x63ec, 0x001a, 0x69ec, 0x001a, 0x68ec, 0x67ec, 0x001a, 0x62ec, 0x62c0, 0x61ec, 0x001a, 0x65ec, 0x64c0, 0x001a, 0x001a, 0x5aef, 0x001a, 0x5eef, 0x5bef, 0x5def, 0x5cef, 0x59ef, 0x5fef, 0x62ef, 0x60ef, 0x61ef, 0x40c2, 0x001a, 0xfec1, 0x58ef, 0x63ef, 0xb3f1, 0xb6f1, 0xb8f1, 0xb7f1, 0x001a, 0xb1f1, 0xb5f1, 0xb0f1, 0x001a, 0xb2f1, 0x4dc3, 0xaff1, 0x001a, 0xb4f1, 0x001a, 0x001a, 0xc0f3, 0xb5f3, 0x45c4, 0x001a, 0x001a, 0x46c4, 0xb4f3, 0xb9f3, 0xbff3, 0xb7f3, 0xbef3, 0x001a, 0xbbf3, 0x001a, 0xbaf3, 0xbdf3, 0xb8f3, 0xb6f3, 0x001a, 0xbcf3, 0x001a, 0x60f5, 0x5ef5, 0xcac4, 0x5df5, 0x63f5, 0x61f5, 0x001a, 0xcbc4, 0x5cf5, 0x5af5, 0x001a, 0x5bf5, 0xcdc4, 0x5ff5, 0xccc4, 0x62f5, 0x78f6, 0x7ef6, 0x001a, 0x001a, 0x79f6, 0x5bc5, 0xa1f6, 0x5ac5, 0x7df6, 0x7cf6, 0x59c5, 0x7bf6, 0x58c5, 0x7af6, 0x001a, 0x7df7, 0xa1f7, 0x7ef7, 0x001a, 0x7bf7, 0xbbc5, 0x78f7, 0x7cf7, 0xa3f7, 0x001a, 0xa2f7, 0x79f7, 0x7af7, 0xbac5, 0x52f8, 0xe7c5, 0x001a, 0x53f8, 0xe5c5, 0xe6c5, 0x001a, 0x001a, 0xd3f8, 0x4ac6, 0x76f9, 0x001a, 0x6ac6, 0x001a, 0xb3f9, 0x6bc6, 0xb4f9, 0xb5f9, 0xc3f9, 0xc2f9, 0x7ac6, 0xcdf9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9b0, 0x001a, 0x001a, 0xe9e0, 0x001a, 0xe8e0, 0x001a, 0xeabb, 0xebbb, 0xdae4, 0x001a, 0xd2e8, 0x6cec, 0x001a, 0x001a, 0x75be, 0x65c0, 0x6aec, 0x001a, 0x6dec, 0x66c0, 0x001a, 0x64ef, 0x6bec, 0xb9f1, 0x4ec3, 0xc1f3, 0x001a, 0x001a, 0x001a, 0x66f5, 0x64f5, 0x001a, 0x001a, 0x65f5, 0x001a, 0x001a, 0xa2f6, 0x001a, 0x5cc5, 0xa4f7, 0xeac5, 0xbcc5, 0xe8c5, 0xe9c5, 0xd4f8, 0x62c6, 0x001a, 0xaab0, 0x001a, 0x001a, 0x001a, 0xbaf1, 0x001a, 0x001a, 0x49d4, 0x001a, 0xa6b9, 0x001a, 0xdbe4, 0x001a, 0x001a, 0xecbb, 0xdce4, 0x001a, 0x001a, 0x001a, 0xd4e8, 0xd3e8, 0x68c0, 0x76be, 0x77be, 0x001a, 0xd7e8, 0xd6e8, 0xd5e8, 0x001a, 0x001a, 0x6eec, 0x71ec, 0x001a, 0x70ec, 0x6fec, 0x67c0, 0x68ef, 0x66ef, 0x65ef, 0x001a, 0x001a, 0x67ef, 0x001a, 0x4fc3, 0xbcf1, 0xbdf1, 0x50c3, 0x001a, 0xbbf1, 0x001a, 0xc3f3, 0xc2f3, 0xc5f3, 0x47c4, 0xc4f3, 0x001a, 0x67f5, 0x69f5, 0x68f5, 0x001a, 0x001a, 0xa3f6, 0xa6f6, 0xa4f6, 0xa5f6, 0xa5f7, 0xbdc5, 0x001a, 0x001a, 0x001a, 0x54f8, 0x55f8, 0x56f8, 0x001a, 0x4bc6, 0x63c6, 0xb6f9, 0xabb0, 0x001a, 0x78be, 0x69c0, 0xbef1, 0x001a, 0xa6f7, 0x001a, 0x001a, 0xc4f9, 0x4ad4, 0x001a, 0x7bc6, 0xacb0, 0x72ec, 0x001a, 0xbff1, 0x001a, 0xc6f3, 0x001a, 0x001a, 0xa7f6, 0xa7f7, 0xadb0, 0x001a, 0xdde4, 0xdee4, 0x001a, 0xedbb, 0xeebb, 0xd9e8, 0x7abe, 0x79be, 0xd8e8, 0x001a, 0x69ef, 0x001a, 0xc0f1, 0xc2f1, 0xc1f1, 0x53c3, 0x52c3, 0x51c3, 0x001a, 0x5ec5, 0xa8f6, 0x001a, 0x5dc5, 0xa9f7, 0xa8f7, 0x001a, 0x4cc6, 0xd5f8, 0xbdb3, 0xeae0, 0x001a, 0x001a, 0x001a, 0xe1e4, 0xdfe4, 0xe0e4, 0x001a, 0x001a, 0xe2e8, 0x001a, 0xdde8, 0xdae8, 0xe1e8, 0x001a, 0x001a, 0x001a, 0xe3e8, 0x001a, 0x001a, 0x7cbe, 0xe0e8, 0xdce8, 0x001a, 0x001a, 0xdbe8, 0xdfe8, 0xdee8, 0x7bbe, 0x001a, 0x001a, 0x7dec, 0x78ec, 0x76ec, 0xa1ec, 0x77ec, 0x001a, 0x73ec, 0x001a, 0x79ec, 0x001a, 0x001a, 0x74ec, 0x72ef, 0x75ec, 0xa2ec, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7cec, 0x6ac0, 0x7bec, 0x7aec, 0x001a, 0x7eec, 0x001a, 0x001a, 0x001a, 0x001a, 0x6aef, 0x6def, 0x001a, 0x001a, 0x6cef, 0x001a, 0x74ef, 0x6fef, 0x73ef, 0x001a, 0x71ef, 0x70ef, 0x6eef, 0x001a, 0x6bef, 0x001a, 0x43c2, 0x42c2, 0x001a, 0x44c2, 0x41c2, 0x75ef, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8f1, 0xcbf1, 0x001a, 0xc9f1, 0xcdf1, 0x001a, 0x001a, 0x001a, 0xcef1, 0x001a, 0xc6f1, 0x58c3, 0xc7f1, 0x001a, 0xc5f1, 0xccf1, 0x001a, 0xc4f1, 0xc3f1, 0x57c3, 0x55c3, 0x54c3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaf1, 0xcff3, 0xd5f3, 0x4ac4, 0xd0f3, 0x001a, 0xd3f3, 0xd7f3, 0x4bc4, 0xd2f3, 0x001a, 0xcaf3, 0x001a, 0xc9f3, 0xd6f3, 0xcdf3, 0x001a, 0xcbf3, 0xd4f3, 0xccf3, 0x49c4, 0x48c4, 0x001a, 0xc7f3, 0xc8f3, 0xd1f3, 0x001a, 0x001a, 0x001a, 0xcef3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6cf5, 0x6ff5, 0x001a, 0x001a, 0x001a, 0x001a, 0x56c3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6df5, 0x73f5, 0x71f5, 0x6bf5, 0x76f5, 0x001a, 0x6af5, 0x001a, 0xcfc4, 0x72f5, 0x001a, 0x001a, 0x001a, 0x6ef5, 0xcec4, 0x75f5, 0x001a, 0x001a, 0x74f5, 0x001a, 0x001a, 0x001a, 0x001a, 0xabf6, 0xaaf6, 0x001a, 0x001a, 0x001a, 0xb1f6, 0x001a, 0xadf6, 0xb0f6, 0x60c5, 0x001a, 0x001a, 0xaef6, 0xaff6, 0x001a, 0xa9f6, 0xacf6, 0x5fc5, 0x001a, 0x001a, 0x001a, 0xbfc5, 0xb4f7, 0xaff7, 0xb3f7, 0x001a, 0xb6f7, 0xb2f7, 0x001a, 0xaef7, 0x001a, 0xc1c5, 0xb1f7, 0xb5f7, 0xc0c5, 0xacf7, 0x70f5, 0xb0f7, 0x001a, 0x001a, 0xadf7, 0x001a, 0xaaf7, 0x001a, 0xabf7, 0xbec5, 0x5af8, 0x5cf8, 0x5ff8, 0x5bf8, 0x60f8, 0x001a, 0x59f8, 0x001a, 0x57f8, 0x001a, 0xebc5, 0x5df8, 0xedc5, 0xecc5, 0x58f8, 0x5ef8, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaf8, 0x4dc6, 0xdbf8, 0x001a, 0xd9f8, 0xd6f8, 0x001a, 0x001a, 0xd8f8, 0xd7f8, 0x5af9, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cf9, 0x5bf9, 0x001a, 0x001a, 0x79f9, 0x001a, 0x78f9, 0x77f9, 0x7af9, 0x001a, 0x73c6, 0x74c6, 0xcaf9, 0xcef9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbeb3, 0xafdc, 0xede0, 0x001a, 0xa7b9, 0xebe0, 0x001a, 0x001a, 0xece0, 0x001a, 0x001a, 0x001a, 0xe2e4, 0xe3e4, 0xf1bb, 0xefbb, 0xe4e4, 0xf0bb, 0xe8e8, 0x001a, 0xebe8, 0xe5e8, 0xece8, 0xe4e8, 0xe6e8, 0x001a, 0xe7e8, 0xeae8, 0x001a, 0x001a, 0xa1be, 0xefe8, 0xeee8, 0x7dbe, 0xe9e8, 0xede8, 0x7ebe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xacec, 0x001a, 0x6fc0, 0x001a, 0xa7ec, 0x6bc0, 0x001a, 0xa4ec, 0xaaec, 0xadec, 0x001a, 0x70c0, 0x001a, 0xa9ec, 0xa6ec, 0xaeec, 0xa5ec, 0x001a, 0xabec, 0x6cc0, 0x001a, 0xa3ec, 0x6dc0, 0x001a, 0x6ec0, 0xa8ec, 0x001a, 0x001a, 0x001a, 0xa9ef, 0x7aef, 0x7bef, 0x7eef, 0x7cef, 0x001a, 0x76ef, 0x001a, 0x001a, 0x79ef, 0xa5ef, 0x7def, 0x001a, 0x001a, 0x45c2, 0x001a, 0xa7ef, 0xa4ef, 0x46c2, 0xa6ef, 0x77ef, 0xa2ef, 0xa3ef, 0x001a, 0xa1ef, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2f1, 0xd4f1, 0xd7f1, 0x001a, 0x001a, 0xd1f1, 0x001a, 0x59c3, 0xd9f1, 0xd0f1, 0xdaf1, 0x001a, 0xd6f1, 0xd8f1, 0xdcf1, 0xd5f1, 0xddf1, 0xd3f1, 0xcff1, 0x5ac3, 0x001a, 0xdbf1, 0x5bc3, 0x4dc4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78ef, 0xf1f3, 0xe8f3, 0x4fc4, 0xe4f3, 0x50c4, 0x001a, 0x001a, 0xedf3, 0xe7f3, 0xddf3, 0x4ec4, 0xeaf3, 0xe5f3, 0xe6f3, 0x001a, 0xd8f3, 0xdff3, 0xeef3, 0x001a, 0xebf3, 0x001a, 0xe3f3, 0x001a, 0xeff3, 0xdef3, 0xd9f3, 0xecf3, 0x001a, 0xdbf3, 0xe9f3, 0xe0f3, 0xf0f3, 0xdcf3, 0x4cc4, 0xdaf3, 0xe1f3, 0xe2f3, 0x001a, 0x001a, 0x001a, 0x7df5, 0x001a, 0x7bf5, 0x001a, 0xa2f5, 0x001a, 0xaef5, 0xa5f5, 0x7cf5, 0x78f5, 0xa7f5, 0x7ef5, 0xa3f5, 0x7af5, 0xaaf5, 0x77f5, 0xa1f5, 0xa6f5, 0xa8f5, 0xabf5, 0x79f5, 0x001a, 0xaff5, 0xb0f5, 0xa9f5, 0xadf5, 0xa4f5, 0x001a, 0xc1f6, 0xc4f6, 0x001a, 0x61c5, 0x001a, 0xc3f6, 0xc8f6, 0xc6f6, 0x62c5, 0xbdf6, 0xb3f6, 0xb2f6, 0x64c5, 0xbff6, 0xc0f6, 0xbcf6, 0xb4f6, 0x001a, 0xb9f6, 0xacf5, 0x001a, 0xb5f6, 0x63c5, 0xbbf6, 0x001a, 0xbaf6, 0x001a, 0xb6f6, 0xc2f6, 0x001a, 0xb7f6, 0xbbf7, 0xc5f6, 0xc7f6, 0xbef6, 0xb8f6, 0xbcf7, 0xbef7, 0xb8f7, 0xc2c5, 0x001a, 0xc5f7, 0xc3f7, 0xc3c5, 0xc2f7, 0xc1f7, 0xbaf7, 0xb7f7, 0xbdf7, 0xc6f7, 0xb9f7, 0xbff7, 0x001a, 0x69f8, 0x6ef8, 0x64f8, 0x67f8, 0xeec5, 0x6bf8, 0x001a, 0x72f8, 0xc0f7, 0x001a, 0x65f8, 0x6ff8, 0x73f8, 0x6af8, 0x63f8, 0x6df8, 0x001a, 0x6cf8, 0x71f8, 0x70f8, 0xc4f7, 0x68f8, 0x62f8, 0x66f8, 0x4ec6, 0x4fc6, 0x61f8, 0x001a, 0xe6f8, 0xddf8, 0xe5f8, 0xe2f8, 0xe3f8, 0xdcf8, 0xdff8, 0xe7f8, 0xe1f8, 0xe0f8, 0xdef8, 0x001a, 0xe4f8, 0x001a, 0x5df9, 0x001a, 0x5ef9, 0x001a, 0x60f9, 0x5ff9, 0x62f9, 0x61f9, 0x7cf9, 0x7bf9, 0xb7f9, 0x001a, 0xb8f9, 0x001a, 0xc5f9, 0x78c6, 0x7cc6, 0x001a, 0xcff9, 0x7dc6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfb3, 0x001a, 0x001a, 0x001a, 0xd0c4, 0xc9f6, 0x001a, 0x50c6, 0x51c6, 0x001a, 0xc0b3, 0xeee0, 0x001a, 0xa8b9, 0xf0e8, 0x001a, 0x001a, 0xb0ec, 0xb1ec, 0xafec, 0xabef, 0xaaef, 0x47c2, 0xdff1, 0xacef, 0xdef1, 0x001a, 0x001a, 0xf3f3, 0x51c4, 0x53c4, 0xf2f3, 0x001a, 0x001a, 0x52c4, 0x001a, 0xb1f5, 0xb3f5, 0xb2f5, 0xcaf6, 0x65c5, 0x001a, 0xefc5, 0xe8f8, 0x63f9, 0x001a, 0x001a, 0xd2f9, 0xc1b3, 0x001a, 0xe5e4, 0x001a, 0xa2be, 0x001a, 0x001a, 0x001a, 0xb3ec, 0xb2ec, 0x001a, 0xadef, 0x001a, 0x001a, 0x001a, 0x54c4, 0xd1c4, 0xc7f7, 0xcbf9, 0x001a, 0x001a, 0x001a, 0xc2b3, 0xf2bb, 0x001a, 0xa3be, 0x001a, 0xf4f3, 0x001a, 0x74f8, 0xc0b6, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeef, 0x001a, 0x001a, 0x001a, 0x64c6, 0xc1b6, 0xa4be, 0x48c2, 0x75f8, 0xc2b6, 0x001a, 0xf1e8, 0x72c0, 0xb4ec, 0xb5ec, 0x001a, 0x71c0, 0x001a, 0xafef, 0x4cc2, 0x4ac2, 0x4bc2, 0x49c2, 0xe0f1, 0x5cc3, 0x001a, 0x001a, 0x001a, 0xb5f5, 0xb4f5, 0xb7f5, 0xb6f5, 0xd2c4, 0x001a, 0x001a, 0xcbf6, 0x001a, 0xcdf6, 0xccf6, 0x66c5, 0xc8f7, 0x001a, 0x76f8, 0x77f8, 0xf0c5, 0x64f9, 0x7df9, 0x75c6, 0x001a, 0xb0dc, 0xb6ec, 0xb0ef, 0xf5f3, 0xefe0, 0x001a, 0xb1ef, 0xe2f1, 0xe1f1, 0x001a, 0x001a, 0x001a, 0x001a, 0x78f8, 0x52c6, 0x001a, 0x65f9, 0x7ef9, 0x001a, 0x001a, 0x001a, 0xa9b9, 0xf2e8, 0xf3e8, 0x001a, 0xb7ec, 0xaab9, 0x001a, 0x5dc3, 0xe3f1, 0x001a, 0xcff6, 0x67c5, 0xd0f6, 0xcef6, 0x79f8, 0x001a, 0xe9f8, 0x001a, 0xabb9, 0x001a, 0xb4ef, 0xb3ef, 0xb2ef, 0xe4f1, 0x001a, 0x001a, 0xe8f1, 0xe7f1, 0xe6f1, 0xe5f1, 0x5ec3, 0xf6f3, 0xb9f5, 0xd3c4, 0xb8f5, 0xd1f6, 0xcbf7, 0xcaf7, 0xc4c5, 0xc9f7, 0x7cf8, 0x7bf8, 0x7af8, 0x001a, 0x001a, 0xf3bb, 0x001a, 0xb8ec, 0x4dc2, 0x001a, 0xf7f3, 0xf8f3, 0xccf7, 0x7df8, 0x001a, 0x001a, 0xeaf8, 0x66f9, 0xb9f9, 0xd4f9, 0xf4bb, 0x4ec2, 0xe9f1, 0xf9f3, 0xd2f6, 0x7ef8, 0x001a, 0x001a, 0xa6be, 0x001a, 0xb5ef, 0xeaf1, 0xfaf3, 0xfbf3, 0xfcf3, 0xbef5, 0x001a, 0xbaf5, 0x68c5, 0xbdf5, 0xbcf5, 0xd4c4, 0xbbf5, 0xd6c4, 0x001a, 0xd5c4, 0xd4f6, 0xd3f6, 0x69c5, 0x6ac5, 0x001a, 0x001a, 0xc6c5, 0xcdf7, 0xc5c5, 0x001a, 0xa3f8, 0xa4f8, 0xa2f8, 0xa1f8, 0x54c6, 0x001a, 0xebf8, 0xecf8, 0xedf8, 0x53c6, 0x67f9, 0x6af9, 0x69f9, 0x68f9, 0x001a, 0x001a, 0xd3f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73c0, 0x001a, 0x001a, 0x65c3, 0xbff5, 0xd5f6, 0x001a, 0xc7c5, 0xcef7, 0x001a, 0x001a, 0xd5f9, 0x001a, 0x001a, 0x001a, 0x74c0, 0x001a, 0x001a, 0x001a, 0xb6ef, 0x001a, 0xcff7, 0x001a, 0xa1f9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfa00[ 64 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ac9, 0xfcdd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ 512 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa1, 0x57a1, 0x001a, 0x59a1, 0x5ba1, 0x5fa1, 0x60a1, 0x63a1, 0x64a1, 0x67a1, 0x68a1, 0x6ba1, 0x6ca1, 0x6fa1, 0x70a1, 0x73a1, 0x74a1, 0x77a1, 0x78a1, 0x7ba1, 0x7ca1, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6a1, 0xc7a1, 0xcaa1, 0xcba1, 0xc8a1, 0xc9a1, 0x5ca1, 0x4da1, 0x4ea1, 0x4fa1, 0x001a, 0x51a1, 0x52a1, 0x53a1, 0x54a1, 0x001a, 0x7da1, 0x7ea1, 0xa1a1, 0xa2a1, 0xa3a1, 0xa4a1, 0xcca1, 0xcda1, 0xcea1, 0xdea1, 0xdfa1, 0xe0a1, 0xe1a1, 0xe2a1, 0x001a, 0x42a2, 0x4ca2, 0x4da2, 0x4ea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x49a1, 0x001a, 0xada1, 0x43a2, 0x48a2, 0xaea1, 0x001a, 0x5da1, 0x5ea1, 0xafa1, 0xcfa1, 0x41a1, 0xd0a1, 0x44a1, 0xfea1, 0xafa2, 0xb0a2, 0xb1a2, 0xb2a2, 0xb3a2, 0xb4a2, 0xb5a2, 0xb6a2, 0xb7a2, 0xb8a2, 0x47a1, 0x46a1, 0xd5a1, 0xd7a1, 0xd6a1, 0x48a1, 0x49a2, 0xcfa2, 0xd0a2, 0xd1a2, 0xd2a2, 0xd3a2, 0xd4a2, 0xd5a2, 0xd6a2, 0xd7a2, 0xd8a2, 0xd9a2, 0xdaa2, 0xdba2, 0xdca2, 0xdda2, 0xdea2, 0xdfa2, 0xe0a2, 0xe1a2, 0xe2a2, 0xe3a2, 0xe4a2, 0xe5a2, 0xe6a2, 0xe7a2, 0xe8a2, 0x001a, 0x40a2, 0x001a, 0x001a, 0xc4a1, 0x001a, 0xe9a2, 0xeaa2, 0xeba2, 0xeca2, 0xeda2, 0xeea2, 0xefa2, 0xf0a2, 0xf1a2, 0xf2a2, 0xf3a2, 0xf4a2, 0xf5a2, 0xf6a2, 0xf7a2, 0xf8a2, 0xf9a2, 0xfaa2, 0xfba2, 0xfca2, 0xfda2, 0xfea2, 0x40a3, 0x41a3, 0x42a3, 0x43a3, 0x61a1, 0x55a1, 0x62a1, 0xe3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x46a2, 0x47a2, 0x001a, 0xc3a1, 0x001a, 0x44a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_950_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_950_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0400 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2300 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2500 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2500; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2500[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xfa00 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xfa00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfa00[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_950_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_950_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa2 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa140[ additional_character ]; break; case 0xa2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa240[ additional_character ]; break; } } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xff ) ) { additional_character -= 0xa1; switch( byte_stream_character ) { case 0xa1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa1a1[ additional_character ]; break; case 0xa2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa2a1[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa3 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa340[ additional_character ]; } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xc0 ) ) { additional_character -= 0xa1; *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa3a1[ additional_character ]; } else if( additional_character == 0xe1 ) { *unicode_character = 0x20ac; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa4 ) && ( byte_stream_character <= 0xc5 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xa4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa440[ additional_character ]; break; case 0xa5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa540[ additional_character ]; break; case 0xa6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa640[ additional_character ]; break; case 0xa7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa740[ additional_character ]; break; case 0xa8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa840[ additional_character ]; break; case 0xa9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa940[ additional_character ]; break; case 0xaa: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaa40[ additional_character ]; break; case 0xab: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xab40[ additional_character ]; break; case 0xac: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xac40[ additional_character ]; break; case 0xad: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xad40[ additional_character ]; break; case 0xae: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xae40[ additional_character ]; break; case 0xaf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaf40[ additional_character ]; break; case 0xb0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; } } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xff ) ) { additional_character -= 0xa1; switch( byte_stream_character ) { case 0xa4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa4a1[ additional_character ]; break; case 0xa5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa5a1[ additional_character ]; break; case 0xa6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa6a1[ additional_character ]; break; case 0xa7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa7a1[ additional_character ]; break; case 0xa8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa8a1[ additional_character ]; break; case 0xa9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xa9a1[ additional_character ]; break; case 0xaa: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaaa1[ additional_character ]; break; case 0xab: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaba1[ additional_character ]; break; case 0xac: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaca1[ additional_character ]; break; case 0xad: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xada1[ additional_character ]; break; case 0xae: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xaea1[ additional_character ]; break; case 0xaf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xafa1[ additional_character ]; break; case 0xb0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb0a1[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb1a1[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb2a1[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb3a1[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb4a1[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb5a1[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb6a1[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb7a1[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb8a1[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xb9a1[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbaa1[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbba1[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbca1[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbda1[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbea1[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xbfa1[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc0a1[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc1a1[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc2a1[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc3a1[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc4a1[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc5a1[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xc6 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc640[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xc9 ) && ( byte_stream_character <= 0xf9 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xc9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; case 0xf8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf840[ additional_character ]; break; case 0xf9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf940[ additional_character ]; break; } } else if( ( additional_character >= 0xa1 ) && ( additional_character < 0xff ) ) { additional_character -= 0xa1; switch( byte_stream_character ) { case 0xc9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xc9a1[ additional_character ]; break; case 0xca: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcaa1[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcba1[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcca1[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcda1[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcea1[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xcfa1[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd0a1[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd1a1[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd2a1[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd3a1[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd4a1[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd5a1[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd6a1[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd7a1[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd8a1[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xd9a1[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdaa1[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdba1[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdca1[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdda1[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdea1[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xdfa1[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe0a1[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe1a1[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe2a1[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe3a1[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe4a1[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe5a1[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe6a1[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe7a1[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe8a1[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xe9a1[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeaa1[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeba1[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeca1[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeda1[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xeea1[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xefa1[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf0a1[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf1a1[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf2a1[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf3a1[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf4a1[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf5a1[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf6a1[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf7a1[ additional_character ]; break; case 0xf8: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf8a1[ additional_character ]; break; case 0xf9: *unicode_character = libuna_codepage_windows_950_byte_stream_to_unicode_base_0xf9a1[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_950_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_950_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x80 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x02c0 ) && ( unicode_character < 0x0400 ) ) { unicode_character -= 0x02c0; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x02c0[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2300 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2500 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2500; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x2500[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xfa00 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xfa00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfa00[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_950_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libpff-20120802/libuna/libuna_utf8_string.h0000644000175000017500000002134012005152764015370 00000000000000/* * UTF-8 string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF8_STRING_H ) #define _LIBUNA_UTF8_STRING_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf8_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_byte_stream is implemented by * libuna_byte_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_byte_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf7_stream is implemented by * libuna_utf7_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf7_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf8_stream is implemented by * libuna_utf8_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf8_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf16( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf16_stream is implemented by * libuna_utf16_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf16_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf32( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf8_string_copy_to_utf32_stream is implemented by * libuna_utf32_stream_copy_from_utf8 */ LIBUNA_EXTERN \ int libuna_utf8_string_with_index_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_string_compare_with_utf32_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_936.c0000644000175000017500000151103212005152764017034 00000000000000/* * Windows 936 codepage (Chinese Simplified) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_936.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 936 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ 192 ] = { 0x4e02, 0x4e04, 0x4e05, 0x4e06, 0x4e0f, 0x4e12, 0x4e17, 0x4e1f, 0x4e20, 0x4e21, 0x4e23, 0x4e26, 0x4e29, 0x4e2e, 0x4e2f, 0x4e31, 0x4e33, 0x4e35, 0x4e37, 0x4e3c, 0x4e40, 0x4e41, 0x4e42, 0x4e44, 0x4e46, 0x4e4a, 0x4e51, 0x4e55, 0x4e57, 0x4e5a, 0x4e5b, 0x4e62, 0x4e63, 0x4e64, 0x4e65, 0x4e67, 0x4e68, 0x4e6a, 0x4e6b, 0x4e6c, 0x4e6d, 0x4e6e, 0x4e6f, 0x4e72, 0x4e74, 0x4e75, 0x4e76, 0x4e77, 0x4e78, 0x4e79, 0x4e7a, 0x4e7b, 0x4e7c, 0x4e7d, 0x4e7f, 0x4e80, 0x4e81, 0x4e82, 0x4e83, 0x4e84, 0x4e85, 0x4e87, 0x4e8a, 0xfffd, 0x4e90, 0x4e96, 0x4e97, 0x4e99, 0x4e9c, 0x4e9d, 0x4e9e, 0x4ea3, 0x4eaa, 0x4eaf, 0x4eb0, 0x4eb1, 0x4eb4, 0x4eb6, 0x4eb7, 0x4eb8, 0x4eb9, 0x4ebc, 0x4ebd, 0x4ebe, 0x4ec8, 0x4ecc, 0x4ecf, 0x4ed0, 0x4ed2, 0x4eda, 0x4edb, 0x4edc, 0x4ee0, 0x4ee2, 0x4ee6, 0x4ee7, 0x4ee9, 0x4eed, 0x4eee, 0x4eef, 0x4ef1, 0x4ef4, 0x4ef8, 0x4ef9, 0x4efa, 0x4efc, 0x4efe, 0x4f00, 0x4f02, 0x4f03, 0x4f04, 0x4f05, 0x4f06, 0x4f07, 0x4f08, 0x4f0b, 0x4f0c, 0x4f12, 0x4f13, 0x4f14, 0x4f15, 0x4f16, 0x4f1c, 0x4f1d, 0x4f21, 0x4f23, 0x4f28, 0x4f29, 0x4f2c, 0x4f2d, 0x4f2e, 0x4f31, 0x4f33, 0x4f35, 0x4f37, 0x4f39, 0x4f3b, 0x4f3e, 0x4f3f, 0x4f40, 0x4f41, 0x4f42, 0x4f44, 0x4f45, 0x4f47, 0x4f48, 0x4f49, 0x4f4a, 0x4f4b, 0x4f4c, 0x4f52, 0x4f54, 0x4f56, 0x4f61, 0x4f62, 0x4f66, 0x4f68, 0x4f6a, 0x4f6b, 0x4f6d, 0x4f6e, 0x4f71, 0x4f72, 0x4f75, 0x4f77, 0x4f78, 0x4f79, 0x4f7a, 0x4f7d, 0x4f80, 0x4f81, 0x4f82, 0x4f85, 0x4f86, 0x4f87, 0x4f8a, 0x4f8c, 0x4f8e, 0x4f90, 0x4f92, 0x4f93, 0x4f95, 0x4f96, 0x4f98, 0x4f99, 0x4f9a, 0x4f9c, 0x4f9e, 0x4f9f, 0x4fa1, 0x4fa2, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ 192 ] = { 0x4fa4, 0x4fab, 0x4fad, 0x4fb0, 0x4fb1, 0x4fb2, 0x4fb3, 0x4fb4, 0x4fb6, 0x4fb7, 0x4fb8, 0x4fb9, 0x4fba, 0x4fbb, 0x4fbc, 0x4fbd, 0x4fbe, 0x4fc0, 0x4fc1, 0x4fc2, 0x4fc6, 0x4fc7, 0x4fc8, 0x4fc9, 0x4fcb, 0x4fcc, 0x4fcd, 0x4fd2, 0x4fd3, 0x4fd4, 0x4fd5, 0x4fd6, 0x4fd9, 0x4fdb, 0x4fe0, 0x4fe2, 0x4fe4, 0x4fe5, 0x4fe7, 0x4feb, 0x4fec, 0x4ff0, 0x4ff2, 0x4ff4, 0x4ff5, 0x4ff6, 0x4ff7, 0x4ff9, 0x4ffb, 0x4ffc, 0x4ffd, 0x4fff, 0x5000, 0x5001, 0x5002, 0x5003, 0x5004, 0x5005, 0x5006, 0x5007, 0x5008, 0x5009, 0x500a, 0xfffd, 0x500b, 0x500e, 0x5010, 0x5011, 0x5013, 0x5015, 0x5016, 0x5017, 0x501b, 0x501d, 0x501e, 0x5020, 0x5022, 0x5023, 0x5024, 0x5027, 0x502b, 0x502f, 0x5030, 0x5031, 0x5032, 0x5033, 0x5034, 0x5035, 0x5036, 0x5037, 0x5038, 0x5039, 0x503b, 0x503d, 0x503f, 0x5040, 0x5041, 0x5042, 0x5044, 0x5045, 0x5046, 0x5049, 0x504a, 0x504b, 0x504d, 0x5050, 0x5051, 0x5052, 0x5053, 0x5054, 0x5056, 0x5057, 0x5058, 0x5059, 0x505b, 0x505d, 0x505e, 0x505f, 0x5060, 0x5061, 0x5062, 0x5063, 0x5064, 0x5066, 0x5067, 0x5068, 0x5069, 0x506a, 0x506b, 0x506d, 0x506e, 0x506f, 0x5070, 0x5071, 0x5072, 0x5073, 0x5074, 0x5075, 0x5078, 0x5079, 0x507a, 0x507c, 0x507d, 0x5081, 0x5082, 0x5083, 0x5084, 0x5086, 0x5087, 0x5089, 0x508a, 0x508b, 0x508c, 0x508e, 0x508f, 0x5090, 0x5091, 0x5092, 0x5093, 0x5094, 0x5095, 0x5096, 0x5097, 0x5098, 0x5099, 0x509a, 0x509b, 0x509c, 0x509d, 0x509e, 0x509f, 0x50a0, 0x50a1, 0x50a2, 0x50a4, 0x50a6, 0x50aa, 0x50ab, 0x50ad, 0x50ae, 0x50af, 0x50b0, 0x50b1, 0x50b3, 0x50b4, 0x50b5, 0x50b6, 0x50b7, 0x50b8, 0x50b9, 0x50bc, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ 192 ] = { 0x50bd, 0x50be, 0x50bf, 0x50c0, 0x50c1, 0x50c2, 0x50c3, 0x50c4, 0x50c5, 0x50c6, 0x50c7, 0x50c8, 0x50c9, 0x50ca, 0x50cb, 0x50cc, 0x50cd, 0x50ce, 0x50d0, 0x50d1, 0x50d2, 0x50d3, 0x50d4, 0x50d5, 0x50d7, 0x50d8, 0x50d9, 0x50db, 0x50dc, 0x50dd, 0x50de, 0x50df, 0x50e0, 0x50e1, 0x50e2, 0x50e3, 0x50e4, 0x50e5, 0x50e8, 0x50e9, 0x50ea, 0x50eb, 0x50ef, 0x50f0, 0x50f1, 0x50f2, 0x50f4, 0x50f6, 0x50f7, 0x50f8, 0x50f9, 0x50fa, 0x50fc, 0x50fd, 0x50fe, 0x50ff, 0x5100, 0x5101, 0x5102, 0x5103, 0x5104, 0x5105, 0x5108, 0xfffd, 0x5109, 0x510a, 0x510c, 0x510d, 0x510e, 0x510f, 0x5110, 0x5111, 0x5113, 0x5114, 0x5115, 0x5116, 0x5117, 0x5118, 0x5119, 0x511a, 0x511b, 0x511c, 0x511d, 0x511e, 0x511f, 0x5120, 0x5122, 0x5123, 0x5124, 0x5125, 0x5126, 0x5127, 0x5128, 0x5129, 0x512a, 0x512b, 0x512c, 0x512d, 0x512e, 0x512f, 0x5130, 0x5131, 0x5132, 0x5133, 0x5134, 0x5135, 0x5136, 0x5137, 0x5138, 0x5139, 0x513a, 0x513b, 0x513c, 0x513d, 0x513e, 0x5142, 0x5147, 0x514a, 0x514c, 0x514e, 0x514f, 0x5150, 0x5152, 0x5153, 0x5157, 0x5158, 0x5159, 0x515b, 0x515d, 0x515e, 0x515f, 0x5160, 0x5161, 0x5163, 0x5164, 0x5166, 0x5167, 0x5169, 0x516a, 0x516f, 0x5172, 0x517a, 0x517e, 0x517f, 0x5183, 0x5184, 0x5186, 0x5187, 0x518a, 0x518b, 0x518e, 0x518f, 0x5190, 0x5191, 0x5193, 0x5194, 0x5198, 0x519a, 0x519d, 0x519e, 0x519f, 0x51a1, 0x51a3, 0x51a6, 0x51a7, 0x51a8, 0x51a9, 0x51aa, 0x51ad, 0x51ae, 0x51b4, 0x51b8, 0x51b9, 0x51ba, 0x51be, 0x51bf, 0x51c1, 0x51c2, 0x51c3, 0x51c5, 0x51c8, 0x51ca, 0x51cd, 0x51ce, 0x51d0, 0x51d2, 0x51d3, 0x51d4, 0x51d5, 0x51d6, 0x51d7, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ 192 ] = { 0x51d8, 0x51d9, 0x51da, 0x51dc, 0x51de, 0x51df, 0x51e2, 0x51e3, 0x51e5, 0x51e6, 0x51e7, 0x51e8, 0x51e9, 0x51ea, 0x51ec, 0x51ee, 0x51f1, 0x51f2, 0x51f4, 0x51f7, 0x51fe, 0x5204, 0x5205, 0x5209, 0x520b, 0x520c, 0x520f, 0x5210, 0x5213, 0x5214, 0x5215, 0x521c, 0x521e, 0x521f, 0x5221, 0x5222, 0x5223, 0x5225, 0x5226, 0x5227, 0x522a, 0x522c, 0x522f, 0x5231, 0x5232, 0x5234, 0x5235, 0x523c, 0x523e, 0x5244, 0x5245, 0x5246, 0x5247, 0x5248, 0x5249, 0x524b, 0x524e, 0x524f, 0x5252, 0x5253, 0x5255, 0x5257, 0x5258, 0xfffd, 0x5259, 0x525a, 0x525b, 0x525d, 0x525f, 0x5260, 0x5262, 0x5263, 0x5264, 0x5266, 0x5268, 0x526b, 0x526c, 0x526d, 0x526e, 0x5270, 0x5271, 0x5273, 0x5274, 0x5275, 0x5276, 0x5277, 0x5278, 0x5279, 0x527a, 0x527b, 0x527c, 0x527e, 0x5280, 0x5283, 0x5284, 0x5285, 0x5286, 0x5287, 0x5289, 0x528a, 0x528b, 0x528c, 0x528d, 0x528e, 0x528f, 0x5291, 0x5292, 0x5294, 0x5295, 0x5296, 0x5297, 0x5298, 0x5299, 0x529a, 0x529c, 0x52a4, 0x52a5, 0x52a6, 0x52a7, 0x52ae, 0x52af, 0x52b0, 0x52b4, 0x52b5, 0x52b6, 0x52b7, 0x52b8, 0x52b9, 0x52ba, 0x52bb, 0x52bc, 0x52bd, 0x52c0, 0x52c1, 0x52c2, 0x52c4, 0x52c5, 0x52c6, 0x52c8, 0x52ca, 0x52cc, 0x52cd, 0x52ce, 0x52cf, 0x52d1, 0x52d3, 0x52d4, 0x52d5, 0x52d7, 0x52d9, 0x52da, 0x52db, 0x52dc, 0x52dd, 0x52de, 0x52e0, 0x52e1, 0x52e2, 0x52e3, 0x52e5, 0x52e6, 0x52e7, 0x52e8, 0x52e9, 0x52ea, 0x52eb, 0x52ec, 0x52ed, 0x52ee, 0x52ef, 0x52f1, 0x52f2, 0x52f3, 0x52f4, 0x52f5, 0x52f6, 0x52f7, 0x52f8, 0x52fb, 0x52fc, 0x52fd, 0x5301, 0x5302, 0x5303, 0x5304, 0x5307, 0x5309, 0x530a, 0x530b, 0x530c, 0x530e, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ 192 ] = { 0x5311, 0x5312, 0x5313, 0x5314, 0x5318, 0x531b, 0x531c, 0x531e, 0x531f, 0x5322, 0x5324, 0x5325, 0x5327, 0x5328, 0x5329, 0x532b, 0x532c, 0x532d, 0x532f, 0x5330, 0x5331, 0x5332, 0x5333, 0x5334, 0x5335, 0x5336, 0x5337, 0x5338, 0x533c, 0x533d, 0x5340, 0x5342, 0x5344, 0x5346, 0x534b, 0x534c, 0x534d, 0x5350, 0x5354, 0x5358, 0x5359, 0x535b, 0x535d, 0x5365, 0x5368, 0x536a, 0x536c, 0x536d, 0x5372, 0x5376, 0x5379, 0x537b, 0x537c, 0x537d, 0x537e, 0x5380, 0x5381, 0x5383, 0x5387, 0x5388, 0x538a, 0x538e, 0x538f, 0xfffd, 0x5390, 0x5391, 0x5392, 0x5393, 0x5394, 0x5396, 0x5397, 0x5399, 0x539b, 0x539c, 0x539e, 0x53a0, 0x53a1, 0x53a4, 0x53a7, 0x53aa, 0x53ab, 0x53ac, 0x53ad, 0x53af, 0x53b0, 0x53b1, 0x53b2, 0x53b3, 0x53b4, 0x53b5, 0x53b7, 0x53b8, 0x53b9, 0x53ba, 0x53bc, 0x53bd, 0x53be, 0x53c0, 0x53c3, 0x53c4, 0x53c5, 0x53c6, 0x53c7, 0x53ce, 0x53cf, 0x53d0, 0x53d2, 0x53d3, 0x53d5, 0x53da, 0x53dc, 0x53dd, 0x53de, 0x53e1, 0x53e2, 0x53e7, 0x53f4, 0x53fa, 0x53fe, 0x53ff, 0x5400, 0x5402, 0x5405, 0x5407, 0x540b, 0x5414, 0x5418, 0x5419, 0x541a, 0x541c, 0x5422, 0x5424, 0x5425, 0x542a, 0x5430, 0x5433, 0x5436, 0x5437, 0x543a, 0x543d, 0x543f, 0x5441, 0x5442, 0x5444, 0x5445, 0x5447, 0x5449, 0x544c, 0x544d, 0x544e, 0x544f, 0x5451, 0x545a, 0x545d, 0x545e, 0x545f, 0x5460, 0x5461, 0x5463, 0x5465, 0x5467, 0x5469, 0x546a, 0x546b, 0x546c, 0x546d, 0x546e, 0x546f, 0x5470, 0x5474, 0x5479, 0x547a, 0x547e, 0x547f, 0x5481, 0x5483, 0x5485, 0x5487, 0x5488, 0x5489, 0x548a, 0x548d, 0x5491, 0x5493, 0x5497, 0x5498, 0x549c, 0x549e, 0x549f, 0x54a0, 0x54a1, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ 192 ] = { 0x54a2, 0x54a5, 0x54ae, 0x54b0, 0x54b2, 0x54b5, 0x54b6, 0x54b7, 0x54b9, 0x54ba, 0x54bc, 0x54be, 0x54c3, 0x54c5, 0x54ca, 0x54cb, 0x54d6, 0x54d8, 0x54db, 0x54e0, 0x54e1, 0x54e2, 0x54e3, 0x54e4, 0x54eb, 0x54ec, 0x54ef, 0x54f0, 0x54f1, 0x54f4, 0x54f5, 0x54f6, 0x54f7, 0x54f8, 0x54f9, 0x54fb, 0x54fe, 0x5500, 0x5502, 0x5503, 0x5504, 0x5505, 0x5508, 0x550a, 0x550b, 0x550c, 0x550d, 0x550e, 0x5512, 0x5513, 0x5515, 0x5516, 0x5517, 0x5518, 0x5519, 0x551a, 0x551c, 0x551d, 0x551e, 0x551f, 0x5521, 0x5525, 0x5526, 0xfffd, 0x5528, 0x5529, 0x552b, 0x552d, 0x5532, 0x5534, 0x5535, 0x5536, 0x5538, 0x5539, 0x553a, 0x553b, 0x553d, 0x5540, 0x5542, 0x5545, 0x5547, 0x5548, 0x554b, 0x554c, 0x554d, 0x554e, 0x554f, 0x5551, 0x5552, 0x5553, 0x5554, 0x5557, 0x5558, 0x5559, 0x555a, 0x555b, 0x555d, 0x555e, 0x555f, 0x5560, 0x5562, 0x5563, 0x5568, 0x5569, 0x556b, 0x556f, 0x5570, 0x5571, 0x5572, 0x5573, 0x5574, 0x5579, 0x557a, 0x557d, 0x557f, 0x5585, 0x5586, 0x558c, 0x558d, 0x558e, 0x5590, 0x5592, 0x5593, 0x5595, 0x5596, 0x5597, 0x559a, 0x559b, 0x559e, 0x55a0, 0x55a1, 0x55a2, 0x55a3, 0x55a4, 0x55a5, 0x55a6, 0x55a8, 0x55a9, 0x55aa, 0x55ab, 0x55ac, 0x55ad, 0x55ae, 0x55af, 0x55b0, 0x55b2, 0x55b4, 0x55b6, 0x55b8, 0x55ba, 0x55bc, 0x55bf, 0x55c0, 0x55c1, 0x55c2, 0x55c3, 0x55c6, 0x55c7, 0x55c8, 0x55ca, 0x55cb, 0x55ce, 0x55cf, 0x55d0, 0x55d5, 0x55d7, 0x55d8, 0x55d9, 0x55da, 0x55db, 0x55de, 0x55e0, 0x55e2, 0x55e7, 0x55e9, 0x55ed, 0x55ee, 0x55f0, 0x55f1, 0x55f4, 0x55f6, 0x55f8, 0x55f9, 0x55fa, 0x55fb, 0x55fc, 0x55ff, 0x5602, 0x5603, 0x5604, 0x5605, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ 192 ] = { 0x5606, 0x5607, 0x560a, 0x560b, 0x560d, 0x5610, 0x5611, 0x5612, 0x5613, 0x5614, 0x5615, 0x5616, 0x5617, 0x5619, 0x561a, 0x561c, 0x561d, 0x5620, 0x5621, 0x5622, 0x5625, 0x5626, 0x5628, 0x5629, 0x562a, 0x562b, 0x562e, 0x562f, 0x5630, 0x5633, 0x5635, 0x5637, 0x5638, 0x563a, 0x563c, 0x563d, 0x563e, 0x5640, 0x5641, 0x5642, 0x5643, 0x5644, 0x5645, 0x5646, 0x5647, 0x5648, 0x5649, 0x564a, 0x564b, 0x564f, 0x5650, 0x5651, 0x5652, 0x5653, 0x5655, 0x5656, 0x565a, 0x565b, 0x565d, 0x565e, 0x565f, 0x5660, 0x5661, 0xfffd, 0x5663, 0x5665, 0x5666, 0x5667, 0x566d, 0x566e, 0x566f, 0x5670, 0x5672, 0x5673, 0x5674, 0x5675, 0x5677, 0x5678, 0x5679, 0x567a, 0x567d, 0x567e, 0x567f, 0x5680, 0x5681, 0x5682, 0x5683, 0x5684, 0x5687, 0x5688, 0x5689, 0x568a, 0x568b, 0x568c, 0x568d, 0x5690, 0x5691, 0x5692, 0x5694, 0x5695, 0x5696, 0x5697, 0x5698, 0x5699, 0x569a, 0x569b, 0x569c, 0x569d, 0x569e, 0x569f, 0x56a0, 0x56a1, 0x56a2, 0x56a4, 0x56a5, 0x56a6, 0x56a7, 0x56a8, 0x56a9, 0x56aa, 0x56ab, 0x56ac, 0x56ad, 0x56ae, 0x56b0, 0x56b1, 0x56b2, 0x56b3, 0x56b4, 0x56b5, 0x56b6, 0x56b8, 0x56b9, 0x56ba, 0x56bb, 0x56bd, 0x56be, 0x56bf, 0x56c0, 0x56c1, 0x56c2, 0x56c3, 0x56c4, 0x56c5, 0x56c6, 0x56c7, 0x56c8, 0x56c9, 0x56cb, 0x56cc, 0x56cd, 0x56ce, 0x56cf, 0x56d0, 0x56d1, 0x56d2, 0x56d3, 0x56d5, 0x56d6, 0x56d8, 0x56d9, 0x56dc, 0x56e3, 0x56e5, 0x56e6, 0x56e7, 0x56e8, 0x56e9, 0x56ea, 0x56ec, 0x56ee, 0x56ef, 0x56f2, 0x56f3, 0x56f6, 0x56f7, 0x56f8, 0x56fb, 0x56fc, 0x5700, 0x5701, 0x5702, 0x5705, 0x5707, 0x570b, 0x570c, 0x570d, 0x570e, 0x570f, 0x5710, 0x5711, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ 192 ] = { 0x5712, 0x5713, 0x5714, 0x5715, 0x5716, 0x5717, 0x5718, 0x5719, 0x571a, 0x571b, 0x571d, 0x571e, 0x5720, 0x5721, 0x5722, 0x5724, 0x5725, 0x5726, 0x5727, 0x572b, 0x5731, 0x5732, 0x5734, 0x5735, 0x5736, 0x5737, 0x5738, 0x573c, 0x573d, 0x573f, 0x5741, 0x5743, 0x5744, 0x5745, 0x5746, 0x5748, 0x5749, 0x574b, 0x5752, 0x5753, 0x5754, 0x5755, 0x5756, 0x5758, 0x5759, 0x5762, 0x5763, 0x5765, 0x5767, 0x576c, 0x576e, 0x5770, 0x5771, 0x5772, 0x5774, 0x5775, 0x5778, 0x5779, 0x577a, 0x577d, 0x577e, 0x577f, 0x5780, 0xfffd, 0x5781, 0x5787, 0x5788, 0x5789, 0x578a, 0x578d, 0x578e, 0x578f, 0x5790, 0x5791, 0x5794, 0x5795, 0x5796, 0x5797, 0x5798, 0x5799, 0x579a, 0x579c, 0x579d, 0x579e, 0x579f, 0x57a5, 0x57a8, 0x57aa, 0x57ac, 0x57af, 0x57b0, 0x57b1, 0x57b3, 0x57b5, 0x57b6, 0x57b7, 0x57b9, 0x57ba, 0x57bb, 0x57bc, 0x57bd, 0x57be, 0x57bf, 0x57c0, 0x57c1, 0x57c4, 0x57c5, 0x57c6, 0x57c7, 0x57c8, 0x57c9, 0x57ca, 0x57cc, 0x57cd, 0x57d0, 0x57d1, 0x57d3, 0x57d6, 0x57d7, 0x57db, 0x57dc, 0x57de, 0x57e1, 0x57e2, 0x57e3, 0x57e5, 0x57e6, 0x57e7, 0x57e8, 0x57e9, 0x57ea, 0x57eb, 0x57ec, 0x57ee, 0x57f0, 0x57f1, 0x57f2, 0x57f3, 0x57f5, 0x57f6, 0x57f7, 0x57fb, 0x57fc, 0x57fe, 0x57ff, 0x5801, 0x5803, 0x5804, 0x5805, 0x5808, 0x5809, 0x580a, 0x580c, 0x580e, 0x580f, 0x5810, 0x5812, 0x5813, 0x5814, 0x5816, 0x5817, 0x5818, 0x581a, 0x581b, 0x581c, 0x581d, 0x581f, 0x5822, 0x5823, 0x5825, 0x5826, 0x5827, 0x5828, 0x5829, 0x582b, 0x582c, 0x582d, 0x582e, 0x582f, 0x5831, 0x5832, 0x5833, 0x5834, 0x5836, 0x5837, 0x5838, 0x5839, 0x583a, 0x583b, 0x583c, 0x583d, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ 192 ] = { 0x583e, 0x583f, 0x5840, 0x5841, 0x5842, 0x5843, 0x5845, 0x5846, 0x5847, 0x5848, 0x5849, 0x584a, 0x584b, 0x584e, 0x584f, 0x5850, 0x5852, 0x5853, 0x5855, 0x5856, 0x5857, 0x5859, 0x585a, 0x585b, 0x585c, 0x585d, 0x585f, 0x5860, 0x5861, 0x5862, 0x5863, 0x5864, 0x5866, 0x5867, 0x5868, 0x5869, 0x586a, 0x586d, 0x586e, 0x586f, 0x5870, 0x5871, 0x5872, 0x5873, 0x5874, 0x5875, 0x5876, 0x5877, 0x5878, 0x5879, 0x587a, 0x587b, 0x587c, 0x587d, 0x587f, 0x5882, 0x5884, 0x5886, 0x5887, 0x5888, 0x588a, 0x588b, 0x588c, 0xfffd, 0x588d, 0x588e, 0x588f, 0x5890, 0x5891, 0x5894, 0x5895, 0x5896, 0x5897, 0x5898, 0x589b, 0x589c, 0x589d, 0x58a0, 0x58a1, 0x58a2, 0x58a3, 0x58a4, 0x58a5, 0x58a6, 0x58a7, 0x58aa, 0x58ab, 0x58ac, 0x58ad, 0x58ae, 0x58af, 0x58b0, 0x58b1, 0x58b2, 0x58b3, 0x58b4, 0x58b5, 0x58b6, 0x58b7, 0x58b8, 0x58b9, 0x58ba, 0x58bb, 0x58bd, 0x58be, 0x58bf, 0x58c0, 0x58c2, 0x58c3, 0x58c4, 0x58c6, 0x58c7, 0x58c8, 0x58c9, 0x58ca, 0x58cb, 0x58cc, 0x58cd, 0x58ce, 0x58cf, 0x58d0, 0x58d2, 0x58d3, 0x58d4, 0x58d6, 0x58d7, 0x58d8, 0x58d9, 0x58da, 0x58db, 0x58dc, 0x58dd, 0x58de, 0x58df, 0x58e0, 0x58e1, 0x58e2, 0x58e3, 0x58e5, 0x58e6, 0x58e7, 0x58e8, 0x58e9, 0x58ea, 0x58ed, 0x58ef, 0x58f1, 0x58f2, 0x58f4, 0x58f5, 0x58f7, 0x58f8, 0x58fa, 0x58fb, 0x58fc, 0x58fd, 0x58fe, 0x58ff, 0x5900, 0x5901, 0x5903, 0x5905, 0x5906, 0x5908, 0x5909, 0x590a, 0x590b, 0x590c, 0x590e, 0x5910, 0x5911, 0x5912, 0x5913, 0x5917, 0x5918, 0x591b, 0x591d, 0x591e, 0x5920, 0x5921, 0x5922, 0x5923, 0x5926, 0x5928, 0x592c, 0x5930, 0x5932, 0x5933, 0x5935, 0x5936, 0x593b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ 192 ] = { 0x593d, 0x593e, 0x593f, 0x5940, 0x5943, 0x5945, 0x5946, 0x594a, 0x594c, 0x594d, 0x5950, 0x5952, 0x5953, 0x5959, 0x595b, 0x595c, 0x595d, 0x595e, 0x595f, 0x5961, 0x5963, 0x5964, 0x5966, 0x5967, 0x5968, 0x5969, 0x596a, 0x596b, 0x596c, 0x596d, 0x596e, 0x596f, 0x5970, 0x5971, 0x5972, 0x5975, 0x5977, 0x597a, 0x597b, 0x597c, 0x597e, 0x597f, 0x5980, 0x5985, 0x5989, 0x598b, 0x598c, 0x598e, 0x598f, 0x5990, 0x5991, 0x5994, 0x5995, 0x5998, 0x599a, 0x599b, 0x599c, 0x599d, 0x599f, 0x59a0, 0x59a1, 0x59a2, 0x59a6, 0xfffd, 0x59a7, 0x59ac, 0x59ad, 0x59b0, 0x59b1, 0x59b3, 0x59b4, 0x59b5, 0x59b6, 0x59b7, 0x59b8, 0x59ba, 0x59bc, 0x59bd, 0x59bf, 0x59c0, 0x59c1, 0x59c2, 0x59c3, 0x59c4, 0x59c5, 0x59c7, 0x59c8, 0x59c9, 0x59cc, 0x59cd, 0x59ce, 0x59cf, 0x59d5, 0x59d6, 0x59d9, 0x59db, 0x59de, 0x59df, 0x59e0, 0x59e1, 0x59e2, 0x59e4, 0x59e6, 0x59e7, 0x59e9, 0x59ea, 0x59eb, 0x59ed, 0x59ee, 0x59ef, 0x59f0, 0x59f1, 0x59f2, 0x59f3, 0x59f4, 0x59f5, 0x59f6, 0x59f7, 0x59f8, 0x59fa, 0x59fc, 0x59fd, 0x59fe, 0x5a00, 0x5a02, 0x5a0a, 0x5a0b, 0x5a0d, 0x5a0e, 0x5a0f, 0x5a10, 0x5a12, 0x5a14, 0x5a15, 0x5a16, 0x5a17, 0x5a19, 0x5a1a, 0x5a1b, 0x5a1d, 0x5a1e, 0x5a21, 0x5a22, 0x5a24, 0x5a26, 0x5a27, 0x5a28, 0x5a2a, 0x5a2b, 0x5a2c, 0x5a2d, 0x5a2e, 0x5a2f, 0x5a30, 0x5a33, 0x5a35, 0x5a37, 0x5a38, 0x5a39, 0x5a3a, 0x5a3b, 0x5a3d, 0x5a3e, 0x5a3f, 0x5a41, 0x5a42, 0x5a43, 0x5a44, 0x5a45, 0x5a47, 0x5a48, 0x5a4b, 0x5a4c, 0x5a4d, 0x5a4e, 0x5a4f, 0x5a50, 0x5a51, 0x5a52, 0x5a53, 0x5a54, 0x5a56, 0x5a57, 0x5a58, 0x5a59, 0x5a5b, 0x5a5c, 0x5a5d, 0x5a5e, 0x5a5f, 0x5a60, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ 192 ] = { 0x5a61, 0x5a63, 0x5a64, 0x5a65, 0x5a66, 0x5a68, 0x5a69, 0x5a6b, 0x5a6c, 0x5a6d, 0x5a6e, 0x5a6f, 0x5a70, 0x5a71, 0x5a72, 0x5a73, 0x5a78, 0x5a79, 0x5a7b, 0x5a7c, 0x5a7d, 0x5a7e, 0x5a80, 0x5a81, 0x5a82, 0x5a83, 0x5a84, 0x5a85, 0x5a86, 0x5a87, 0x5a88, 0x5a89, 0x5a8a, 0x5a8b, 0x5a8c, 0x5a8d, 0x5a8e, 0x5a8f, 0x5a90, 0x5a91, 0x5a93, 0x5a94, 0x5a95, 0x5a96, 0x5a97, 0x5a98, 0x5a99, 0x5a9c, 0x5a9d, 0x5a9e, 0x5a9f, 0x5aa0, 0x5aa1, 0x5aa2, 0x5aa3, 0x5aa4, 0x5aa5, 0x5aa6, 0x5aa7, 0x5aa8, 0x5aa9, 0x5aab, 0x5aac, 0xfffd, 0x5aad, 0x5aae, 0x5aaf, 0x5ab0, 0x5ab1, 0x5ab4, 0x5ab6, 0x5ab7, 0x5ab9, 0x5aba, 0x5abb, 0x5abc, 0x5abd, 0x5abf, 0x5ac0, 0x5ac3, 0x5ac4, 0x5ac5, 0x5ac6, 0x5ac7, 0x5ac8, 0x5aca, 0x5acb, 0x5acd, 0x5ace, 0x5acf, 0x5ad0, 0x5ad1, 0x5ad3, 0x5ad5, 0x5ad7, 0x5ad9, 0x5ada, 0x5adb, 0x5add, 0x5ade, 0x5adf, 0x5ae2, 0x5ae4, 0x5ae5, 0x5ae7, 0x5ae8, 0x5aea, 0x5aec, 0x5aed, 0x5aee, 0x5aef, 0x5af0, 0x5af2, 0x5af3, 0x5af4, 0x5af5, 0x5af6, 0x5af7, 0x5af8, 0x5af9, 0x5afa, 0x5afb, 0x5afc, 0x5afd, 0x5afe, 0x5aff, 0x5b00, 0x5b01, 0x5b02, 0x5b03, 0x5b04, 0x5b05, 0x5b06, 0x5b07, 0x5b08, 0x5b0a, 0x5b0b, 0x5b0c, 0x5b0d, 0x5b0e, 0x5b0f, 0x5b10, 0x5b11, 0x5b12, 0x5b13, 0x5b14, 0x5b15, 0x5b18, 0x5b19, 0x5b1a, 0x5b1b, 0x5b1c, 0x5b1d, 0x5b1e, 0x5b1f, 0x5b20, 0x5b21, 0x5b22, 0x5b23, 0x5b24, 0x5b25, 0x5b26, 0x5b27, 0x5b28, 0x5b29, 0x5b2a, 0x5b2b, 0x5b2c, 0x5b2d, 0x5b2e, 0x5b2f, 0x5b30, 0x5b31, 0x5b33, 0x5b35, 0x5b36, 0x5b38, 0x5b39, 0x5b3a, 0x5b3b, 0x5b3c, 0x5b3d, 0x5b3e, 0x5b3f, 0x5b41, 0x5b42, 0x5b43, 0x5b44, 0x5b45, 0x5b46, 0x5b47, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ 192 ] = { 0x5b48, 0x5b49, 0x5b4a, 0x5b4b, 0x5b4c, 0x5b4d, 0x5b4e, 0x5b4f, 0x5b52, 0x5b56, 0x5b5e, 0x5b60, 0x5b61, 0x5b67, 0x5b68, 0x5b6b, 0x5b6d, 0x5b6e, 0x5b6f, 0x5b72, 0x5b74, 0x5b76, 0x5b77, 0x5b78, 0x5b79, 0x5b7b, 0x5b7c, 0x5b7e, 0x5b7f, 0x5b82, 0x5b86, 0x5b8a, 0x5b8d, 0x5b8e, 0x5b90, 0x5b91, 0x5b92, 0x5b94, 0x5b96, 0x5b9f, 0x5ba7, 0x5ba8, 0x5ba9, 0x5bac, 0x5bad, 0x5bae, 0x5baf, 0x5bb1, 0x5bb2, 0x5bb7, 0x5bba, 0x5bbb, 0x5bbc, 0x5bc0, 0x5bc1, 0x5bc3, 0x5bc8, 0x5bc9, 0x5bca, 0x5bcb, 0x5bcd, 0x5bce, 0x5bcf, 0xfffd, 0x5bd1, 0x5bd4, 0x5bd5, 0x5bd6, 0x5bd7, 0x5bd8, 0x5bd9, 0x5bda, 0x5bdb, 0x5bdc, 0x5be0, 0x5be2, 0x5be3, 0x5be6, 0x5be7, 0x5be9, 0x5bea, 0x5beb, 0x5bec, 0x5bed, 0x5bef, 0x5bf1, 0x5bf2, 0x5bf3, 0x5bf4, 0x5bf5, 0x5bf6, 0x5bf7, 0x5bfd, 0x5bfe, 0x5c00, 0x5c02, 0x5c03, 0x5c05, 0x5c07, 0x5c08, 0x5c0b, 0x5c0c, 0x5c0d, 0x5c0e, 0x5c10, 0x5c12, 0x5c13, 0x5c17, 0x5c19, 0x5c1b, 0x5c1e, 0x5c1f, 0x5c20, 0x5c21, 0x5c23, 0x5c26, 0x5c28, 0x5c29, 0x5c2a, 0x5c2b, 0x5c2d, 0x5c2e, 0x5c2f, 0x5c30, 0x5c32, 0x5c33, 0x5c35, 0x5c36, 0x5c37, 0x5c43, 0x5c44, 0x5c46, 0x5c47, 0x5c4c, 0x5c4d, 0x5c52, 0x5c53, 0x5c54, 0x5c56, 0x5c57, 0x5c58, 0x5c5a, 0x5c5b, 0x5c5c, 0x5c5d, 0x5c5f, 0x5c62, 0x5c64, 0x5c67, 0x5c68, 0x5c69, 0x5c6a, 0x5c6b, 0x5c6c, 0x5c6d, 0x5c70, 0x5c72, 0x5c73, 0x5c74, 0x5c75, 0x5c76, 0x5c77, 0x5c78, 0x5c7b, 0x5c7c, 0x5c7d, 0x5c7e, 0x5c80, 0x5c83, 0x5c84, 0x5c85, 0x5c86, 0x5c87, 0x5c89, 0x5c8a, 0x5c8b, 0x5c8e, 0x5c8f, 0x5c92, 0x5c93, 0x5c95, 0x5c9d, 0x5c9e, 0x5c9f, 0x5ca0, 0x5ca1, 0x5ca4, 0x5ca5, 0x5ca6, 0x5ca7, 0x5ca8, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ 192 ] = { 0x5caa, 0x5cae, 0x5caf, 0x5cb0, 0x5cb2, 0x5cb4, 0x5cb6, 0x5cb9, 0x5cba, 0x5cbb, 0x5cbc, 0x5cbe, 0x5cc0, 0x5cc2, 0x5cc3, 0x5cc5, 0x5cc6, 0x5cc7, 0x5cc8, 0x5cc9, 0x5cca, 0x5ccc, 0x5ccd, 0x5cce, 0x5ccf, 0x5cd0, 0x5cd1, 0x5cd3, 0x5cd4, 0x5cd5, 0x5cd6, 0x5cd7, 0x5cd8, 0x5cda, 0x5cdb, 0x5cdc, 0x5cdd, 0x5cde, 0x5cdf, 0x5ce0, 0x5ce2, 0x5ce3, 0x5ce7, 0x5ce9, 0x5ceb, 0x5cec, 0x5cee, 0x5cef, 0x5cf1, 0x5cf2, 0x5cf3, 0x5cf4, 0x5cf5, 0x5cf6, 0x5cf7, 0x5cf8, 0x5cf9, 0x5cfa, 0x5cfc, 0x5cfd, 0x5cfe, 0x5cff, 0x5d00, 0xfffd, 0x5d01, 0x5d04, 0x5d05, 0x5d08, 0x5d09, 0x5d0a, 0x5d0b, 0x5d0c, 0x5d0d, 0x5d0f, 0x5d10, 0x5d11, 0x5d12, 0x5d13, 0x5d15, 0x5d17, 0x5d18, 0x5d19, 0x5d1a, 0x5d1c, 0x5d1d, 0x5d1f, 0x5d20, 0x5d21, 0x5d22, 0x5d23, 0x5d25, 0x5d28, 0x5d2a, 0x5d2b, 0x5d2c, 0x5d2f, 0x5d30, 0x5d31, 0x5d32, 0x5d33, 0x5d35, 0x5d36, 0x5d37, 0x5d38, 0x5d39, 0x5d3a, 0x5d3b, 0x5d3c, 0x5d3f, 0x5d40, 0x5d41, 0x5d42, 0x5d43, 0x5d44, 0x5d45, 0x5d46, 0x5d48, 0x5d49, 0x5d4d, 0x5d4e, 0x5d4f, 0x5d50, 0x5d51, 0x5d52, 0x5d53, 0x5d54, 0x5d55, 0x5d56, 0x5d57, 0x5d59, 0x5d5a, 0x5d5c, 0x5d5e, 0x5d5f, 0x5d60, 0x5d61, 0x5d62, 0x5d63, 0x5d64, 0x5d65, 0x5d66, 0x5d67, 0x5d68, 0x5d6a, 0x5d6d, 0x5d6e, 0x5d70, 0x5d71, 0x5d72, 0x5d73, 0x5d75, 0x5d76, 0x5d77, 0x5d78, 0x5d79, 0x5d7a, 0x5d7b, 0x5d7c, 0x5d7d, 0x5d7e, 0x5d7f, 0x5d80, 0x5d81, 0x5d83, 0x5d84, 0x5d85, 0x5d86, 0x5d87, 0x5d88, 0x5d89, 0x5d8a, 0x5d8b, 0x5d8c, 0x5d8d, 0x5d8e, 0x5d8f, 0x5d90, 0x5d91, 0x5d92, 0x5d93, 0x5d94, 0x5d95, 0x5d96, 0x5d97, 0x5d98, 0x5d9a, 0x5d9b, 0x5d9c, 0x5d9e, 0x5d9f, 0x5da0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ 192 ] = { 0x5da1, 0x5da2, 0x5da3, 0x5da4, 0x5da5, 0x5da6, 0x5da7, 0x5da8, 0x5da9, 0x5daa, 0x5dab, 0x5dac, 0x5dad, 0x5dae, 0x5daf, 0x5db0, 0x5db1, 0x5db2, 0x5db3, 0x5db4, 0x5db5, 0x5db6, 0x5db8, 0x5db9, 0x5dba, 0x5dbb, 0x5dbc, 0x5dbd, 0x5dbe, 0x5dbf, 0x5dc0, 0x5dc1, 0x5dc2, 0x5dc3, 0x5dc4, 0x5dc6, 0x5dc7, 0x5dc8, 0x5dc9, 0x5dca, 0x5dcb, 0x5dcc, 0x5dce, 0x5dcf, 0x5dd0, 0x5dd1, 0x5dd2, 0x5dd3, 0x5dd4, 0x5dd5, 0x5dd6, 0x5dd7, 0x5dd8, 0x5dd9, 0x5dda, 0x5ddc, 0x5ddf, 0x5de0, 0x5de3, 0x5de4, 0x5dea, 0x5dec, 0x5ded, 0xfffd, 0x5df0, 0x5df5, 0x5df6, 0x5df8, 0x5df9, 0x5dfa, 0x5dfb, 0x5dfc, 0x5dff, 0x5e00, 0x5e04, 0x5e07, 0x5e09, 0x5e0a, 0x5e0b, 0x5e0d, 0x5e0e, 0x5e12, 0x5e13, 0x5e17, 0x5e1e, 0x5e1f, 0x5e20, 0x5e21, 0x5e22, 0x5e23, 0x5e24, 0x5e25, 0x5e28, 0x5e29, 0x5e2a, 0x5e2b, 0x5e2c, 0x5e2f, 0x5e30, 0x5e32, 0x5e33, 0x5e34, 0x5e35, 0x5e36, 0x5e39, 0x5e3a, 0x5e3e, 0x5e3f, 0x5e40, 0x5e41, 0x5e43, 0x5e46, 0x5e47, 0x5e48, 0x5e49, 0x5e4a, 0x5e4b, 0x5e4d, 0x5e4e, 0x5e4f, 0x5e50, 0x5e51, 0x5e52, 0x5e53, 0x5e56, 0x5e57, 0x5e58, 0x5e59, 0x5e5a, 0x5e5c, 0x5e5d, 0x5e5f, 0x5e60, 0x5e63, 0x5e64, 0x5e65, 0x5e66, 0x5e67, 0x5e68, 0x5e69, 0x5e6a, 0x5e6b, 0x5e6c, 0x5e6d, 0x5e6e, 0x5e6f, 0x5e70, 0x5e71, 0x5e75, 0x5e77, 0x5e79, 0x5e7e, 0x5e81, 0x5e82, 0x5e83, 0x5e85, 0x5e88, 0x5e89, 0x5e8c, 0x5e8d, 0x5e8e, 0x5e92, 0x5e98, 0x5e9b, 0x5e9d, 0x5ea1, 0x5ea2, 0x5ea3, 0x5ea4, 0x5ea8, 0x5ea9, 0x5eaa, 0x5eab, 0x5eac, 0x5eae, 0x5eaf, 0x5eb0, 0x5eb1, 0x5eb2, 0x5eb4, 0x5eba, 0x5ebb, 0x5ebc, 0x5ebd, 0x5ebf, 0x5ec0, 0x5ec1, 0x5ec2, 0x5ec3, 0x5ec4, 0x5ec5, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ 192 ] = { 0x5ec6, 0x5ec7, 0x5ec8, 0x5ecb, 0x5ecc, 0x5ecd, 0x5ece, 0x5ecf, 0x5ed0, 0x5ed4, 0x5ed5, 0x5ed7, 0x5ed8, 0x5ed9, 0x5eda, 0x5edc, 0x5edd, 0x5ede, 0x5edf, 0x5ee0, 0x5ee1, 0x5ee2, 0x5ee3, 0x5ee4, 0x5ee5, 0x5ee6, 0x5ee7, 0x5ee9, 0x5eeb, 0x5eec, 0x5eed, 0x5eee, 0x5eef, 0x5ef0, 0x5ef1, 0x5ef2, 0x5ef3, 0x5ef5, 0x5ef8, 0x5ef9, 0x5efb, 0x5efc, 0x5efd, 0x5f05, 0x5f06, 0x5f07, 0x5f09, 0x5f0c, 0x5f0d, 0x5f0e, 0x5f10, 0x5f12, 0x5f14, 0x5f16, 0x5f19, 0x5f1a, 0x5f1c, 0x5f1d, 0x5f1e, 0x5f21, 0x5f22, 0x5f23, 0x5f24, 0xfffd, 0x5f28, 0x5f2b, 0x5f2c, 0x5f2e, 0x5f30, 0x5f32, 0x5f33, 0x5f34, 0x5f35, 0x5f36, 0x5f37, 0x5f38, 0x5f3b, 0x5f3d, 0x5f3e, 0x5f3f, 0x5f41, 0x5f42, 0x5f43, 0x5f44, 0x5f45, 0x5f46, 0x5f47, 0x5f48, 0x5f49, 0x5f4a, 0x5f4b, 0x5f4c, 0x5f4d, 0x5f4e, 0x5f4f, 0x5f51, 0x5f54, 0x5f59, 0x5f5a, 0x5f5b, 0x5f5c, 0x5f5e, 0x5f5f, 0x5f60, 0x5f63, 0x5f65, 0x5f67, 0x5f68, 0x5f6b, 0x5f6e, 0x5f6f, 0x5f72, 0x5f74, 0x5f75, 0x5f76, 0x5f78, 0x5f7a, 0x5f7d, 0x5f7e, 0x5f7f, 0x5f83, 0x5f86, 0x5f8d, 0x5f8e, 0x5f8f, 0x5f91, 0x5f93, 0x5f94, 0x5f96, 0x5f9a, 0x5f9b, 0x5f9d, 0x5f9e, 0x5f9f, 0x5fa0, 0x5fa2, 0x5fa3, 0x5fa4, 0x5fa5, 0x5fa6, 0x5fa7, 0x5fa9, 0x5fab, 0x5fac, 0x5faf, 0x5fb0, 0x5fb1, 0x5fb2, 0x5fb3, 0x5fb4, 0x5fb6, 0x5fb8, 0x5fb9, 0x5fba, 0x5fbb, 0x5fbe, 0x5fbf, 0x5fc0, 0x5fc1, 0x5fc2, 0x5fc7, 0x5fc8, 0x5fca, 0x5fcb, 0x5fce, 0x5fd3, 0x5fd4, 0x5fd5, 0x5fda, 0x5fdb, 0x5fdc, 0x5fde, 0x5fdf, 0x5fe2, 0x5fe3, 0x5fe5, 0x5fe6, 0x5fe8, 0x5fe9, 0x5fec, 0x5fef, 0x5ff0, 0x5ff2, 0x5ff3, 0x5ff4, 0x5ff6, 0x5ff7, 0x5ff9, 0x5ffa, 0x5ffc, 0x6007, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ 192 ] = { 0x6008, 0x6009, 0x600b, 0x600c, 0x6010, 0x6011, 0x6013, 0x6017, 0x6018, 0x601a, 0x601e, 0x601f, 0x6022, 0x6023, 0x6024, 0x602c, 0x602d, 0x602e, 0x6030, 0x6031, 0x6032, 0x6033, 0x6034, 0x6036, 0x6037, 0x6038, 0x6039, 0x603a, 0x603d, 0x603e, 0x6040, 0x6044, 0x6045, 0x6046, 0x6047, 0x6048, 0x6049, 0x604a, 0x604c, 0x604e, 0x604f, 0x6051, 0x6053, 0x6054, 0x6056, 0x6057, 0x6058, 0x605b, 0x605c, 0x605e, 0x605f, 0x6060, 0x6061, 0x6065, 0x6066, 0x606e, 0x6071, 0x6072, 0x6074, 0x6075, 0x6077, 0x607e, 0x6080, 0xfffd, 0x6081, 0x6082, 0x6085, 0x6086, 0x6087, 0x6088, 0x608a, 0x608b, 0x608e, 0x608f, 0x6090, 0x6091, 0x6093, 0x6095, 0x6097, 0x6098, 0x6099, 0x609c, 0x609e, 0x60a1, 0x60a2, 0x60a4, 0x60a5, 0x60a7, 0x60a9, 0x60aa, 0x60ae, 0x60b0, 0x60b3, 0x60b5, 0x60b6, 0x60b7, 0x60b9, 0x60ba, 0x60bd, 0x60be, 0x60bf, 0x60c0, 0x60c1, 0x60c2, 0x60c3, 0x60c4, 0x60c7, 0x60c8, 0x60c9, 0x60cc, 0x60cd, 0x60ce, 0x60cf, 0x60d0, 0x60d2, 0x60d3, 0x60d4, 0x60d6, 0x60d7, 0x60d9, 0x60db, 0x60de, 0x60e1, 0x60e2, 0x60e3, 0x60e4, 0x60e5, 0x60ea, 0x60f1, 0x60f2, 0x60f5, 0x60f7, 0x60f8, 0x60fb, 0x60fc, 0x60fd, 0x60fe, 0x60ff, 0x6102, 0x6103, 0x6104, 0x6105, 0x6107, 0x610a, 0x610b, 0x610c, 0x6110, 0x6111, 0x6112, 0x6113, 0x6114, 0x6116, 0x6117, 0x6118, 0x6119, 0x611b, 0x611c, 0x611d, 0x611e, 0x6121, 0x6122, 0x6125, 0x6128, 0x6129, 0x612a, 0x612c, 0x612d, 0x612e, 0x612f, 0x6130, 0x6131, 0x6132, 0x6133, 0x6134, 0x6135, 0x6136, 0x6137, 0x6138, 0x6139, 0x613a, 0x613b, 0x613c, 0x613d, 0x613e, 0x6140, 0x6141, 0x6142, 0x6143, 0x6144, 0x6145, 0x6146, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ 192 ] = { 0x6147, 0x6149, 0x614b, 0x614d, 0x614f, 0x6150, 0x6152, 0x6153, 0x6154, 0x6156, 0x6157, 0x6158, 0x6159, 0x615a, 0x615b, 0x615c, 0x615e, 0x615f, 0x6160, 0x6161, 0x6163, 0x6164, 0x6165, 0x6166, 0x6169, 0x616a, 0x616b, 0x616c, 0x616d, 0x616e, 0x616f, 0x6171, 0x6172, 0x6173, 0x6174, 0x6176, 0x6178, 0x6179, 0x617a, 0x617b, 0x617c, 0x617d, 0x617e, 0x617f, 0x6180, 0x6181, 0x6182, 0x6183, 0x6184, 0x6185, 0x6186, 0x6187, 0x6188, 0x6189, 0x618a, 0x618c, 0x618d, 0x618f, 0x6190, 0x6191, 0x6192, 0x6193, 0x6195, 0xfffd, 0x6196, 0x6197, 0x6198, 0x6199, 0x619a, 0x619b, 0x619c, 0x619e, 0x619f, 0x61a0, 0x61a1, 0x61a2, 0x61a3, 0x61a4, 0x61a5, 0x61a6, 0x61aa, 0x61ab, 0x61ad, 0x61ae, 0x61af, 0x61b0, 0x61b1, 0x61b2, 0x61b3, 0x61b4, 0x61b5, 0x61b6, 0x61b8, 0x61b9, 0x61ba, 0x61bb, 0x61bc, 0x61bd, 0x61bf, 0x61c0, 0x61c1, 0x61c3, 0x61c4, 0x61c5, 0x61c6, 0x61c7, 0x61c9, 0x61cc, 0x61cd, 0x61ce, 0x61cf, 0x61d0, 0x61d3, 0x61d5, 0x61d6, 0x61d7, 0x61d8, 0x61d9, 0x61da, 0x61db, 0x61dc, 0x61dd, 0x61de, 0x61df, 0x61e0, 0x61e1, 0x61e2, 0x61e3, 0x61e4, 0x61e5, 0x61e7, 0x61e8, 0x61e9, 0x61ea, 0x61eb, 0x61ec, 0x61ed, 0x61ee, 0x61ef, 0x61f0, 0x61f1, 0x61f2, 0x61f3, 0x61f4, 0x61f6, 0x61f7, 0x61f8, 0x61f9, 0x61fa, 0x61fb, 0x61fc, 0x61fd, 0x61fe, 0x6200, 0x6201, 0x6202, 0x6203, 0x6204, 0x6205, 0x6207, 0x6209, 0x6213, 0x6214, 0x6219, 0x621c, 0x621d, 0x621e, 0x6220, 0x6223, 0x6226, 0x6227, 0x6228, 0x6229, 0x622b, 0x622d, 0x622f, 0x6230, 0x6231, 0x6232, 0x6235, 0x6236, 0x6238, 0x6239, 0x623a, 0x623b, 0x623c, 0x6242, 0x6244, 0x6245, 0x6246, 0x624a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ 192 ] = { 0x624f, 0x6250, 0x6255, 0x6256, 0x6257, 0x6259, 0x625a, 0x625c, 0x625d, 0x625e, 0x625f, 0x6260, 0x6261, 0x6262, 0x6264, 0x6265, 0x6268, 0x6271, 0x6272, 0x6274, 0x6275, 0x6277, 0x6278, 0x627a, 0x627b, 0x627d, 0x6281, 0x6282, 0x6283, 0x6285, 0x6286, 0x6287, 0x6288, 0x628b, 0x628c, 0x628d, 0x628e, 0x628f, 0x6290, 0x6294, 0x6299, 0x629c, 0x629d, 0x629e, 0x62a3, 0x62a6, 0x62a7, 0x62a9, 0x62aa, 0x62ad, 0x62ae, 0x62af, 0x62b0, 0x62b2, 0x62b3, 0x62b4, 0x62b6, 0x62b7, 0x62b8, 0x62ba, 0x62be, 0x62c0, 0x62c1, 0xfffd, 0x62c3, 0x62cb, 0x62cf, 0x62d1, 0x62d5, 0x62dd, 0x62de, 0x62e0, 0x62e1, 0x62e4, 0x62ea, 0x62eb, 0x62f0, 0x62f2, 0x62f5, 0x62f8, 0x62f9, 0x62fa, 0x62fb, 0x6300, 0x6303, 0x6304, 0x6305, 0x6306, 0x630a, 0x630b, 0x630c, 0x630d, 0x630f, 0x6310, 0x6312, 0x6313, 0x6314, 0x6315, 0x6317, 0x6318, 0x6319, 0x631c, 0x6326, 0x6327, 0x6329, 0x632c, 0x632d, 0x632e, 0x6330, 0x6331, 0x6333, 0x6334, 0x6335, 0x6336, 0x6337, 0x6338, 0x633b, 0x633c, 0x633e, 0x633f, 0x6340, 0x6341, 0x6344, 0x6347, 0x6348, 0x634a, 0x6351, 0x6352, 0x6353, 0x6354, 0x6356, 0x6357, 0x6358, 0x6359, 0x635a, 0x635b, 0x635c, 0x635d, 0x6360, 0x6364, 0x6365, 0x6366, 0x6368, 0x636a, 0x636b, 0x636c, 0x636f, 0x6370, 0x6372, 0x6373, 0x6374, 0x6375, 0x6378, 0x6379, 0x637c, 0x637d, 0x637e, 0x637f, 0x6381, 0x6383, 0x6384, 0x6385, 0x6386, 0x638b, 0x638d, 0x6391, 0x6393, 0x6394, 0x6395, 0x6397, 0x6399, 0x639a, 0x639b, 0x639c, 0x639d, 0x639e, 0x639f, 0x63a1, 0x63a4, 0x63a6, 0x63ab, 0x63af, 0x63b1, 0x63b2, 0x63b5, 0x63b6, 0x63b9, 0x63bb, 0x63bd, 0x63bf, 0x63c0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ 192 ] = { 0x63c1, 0x63c2, 0x63c3, 0x63c5, 0x63c7, 0x63c8, 0x63ca, 0x63cb, 0x63cc, 0x63d1, 0x63d3, 0x63d4, 0x63d5, 0x63d7, 0x63d8, 0x63d9, 0x63da, 0x63db, 0x63dc, 0x63dd, 0x63df, 0x63e2, 0x63e4, 0x63e5, 0x63e6, 0x63e7, 0x63e8, 0x63eb, 0x63ec, 0x63ee, 0x63ef, 0x63f0, 0x63f1, 0x63f3, 0x63f5, 0x63f7, 0x63f9, 0x63fa, 0x63fb, 0x63fc, 0x63fe, 0x6403, 0x6404, 0x6406, 0x6407, 0x6408, 0x6409, 0x640a, 0x640d, 0x640e, 0x6411, 0x6412, 0x6415, 0x6416, 0x6417, 0x6418, 0x6419, 0x641a, 0x641d, 0x641f, 0x6422, 0x6423, 0x6424, 0xfffd, 0x6425, 0x6427, 0x6428, 0x6429, 0x642b, 0x642e, 0x642f, 0x6430, 0x6431, 0x6432, 0x6433, 0x6435, 0x6436, 0x6437, 0x6438, 0x6439, 0x643b, 0x643c, 0x643e, 0x6440, 0x6442, 0x6443, 0x6449, 0x644b, 0x644c, 0x644d, 0x644e, 0x644f, 0x6450, 0x6451, 0x6453, 0x6455, 0x6456, 0x6457, 0x6459, 0x645a, 0x645b, 0x645c, 0x645d, 0x645f, 0x6460, 0x6461, 0x6462, 0x6463, 0x6464, 0x6465, 0x6466, 0x6468, 0x646a, 0x646b, 0x646c, 0x646e, 0x646f, 0x6470, 0x6471, 0x6472, 0x6473, 0x6474, 0x6475, 0x6476, 0x6477, 0x647b, 0x647c, 0x647d, 0x647e, 0x647f, 0x6480, 0x6481, 0x6483, 0x6486, 0x6488, 0x6489, 0x648a, 0x648b, 0x648c, 0x648d, 0x648e, 0x648f, 0x6490, 0x6493, 0x6494, 0x6497, 0x6498, 0x649a, 0x649b, 0x649c, 0x649d, 0x649f, 0x64a0, 0x64a1, 0x64a2, 0x64a3, 0x64a5, 0x64a6, 0x64a7, 0x64a8, 0x64aa, 0x64ab, 0x64af, 0x64b1, 0x64b2, 0x64b3, 0x64b4, 0x64b6, 0x64b9, 0x64bb, 0x64bd, 0x64be, 0x64bf, 0x64c1, 0x64c3, 0x64c4, 0x64c6, 0x64c7, 0x64c8, 0x64c9, 0x64ca, 0x64cb, 0x64cc, 0x64cf, 0x64d1, 0x64d3, 0x64d4, 0x64d5, 0x64d6, 0x64d9, 0x64da, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ 192 ] = { 0x64db, 0x64dc, 0x64dd, 0x64df, 0x64e0, 0x64e1, 0x64e3, 0x64e5, 0x64e7, 0x64e8, 0x64e9, 0x64ea, 0x64eb, 0x64ec, 0x64ed, 0x64ee, 0x64ef, 0x64f0, 0x64f1, 0x64f2, 0x64f3, 0x64f4, 0x64f5, 0x64f6, 0x64f7, 0x64f8, 0x64f9, 0x64fa, 0x64fb, 0x64fc, 0x64fd, 0x64fe, 0x64ff, 0x6501, 0x6502, 0x6503, 0x6504, 0x6505, 0x6506, 0x6507, 0x6508, 0x650a, 0x650b, 0x650c, 0x650d, 0x650e, 0x650f, 0x6510, 0x6511, 0x6513, 0x6514, 0x6515, 0x6516, 0x6517, 0x6519, 0x651a, 0x651b, 0x651c, 0x651d, 0x651e, 0x651f, 0x6520, 0x6521, 0xfffd, 0x6522, 0x6523, 0x6524, 0x6526, 0x6527, 0x6528, 0x6529, 0x652a, 0x652c, 0x652d, 0x6530, 0x6531, 0x6532, 0x6533, 0x6537, 0x653a, 0x653c, 0x653d, 0x6540, 0x6541, 0x6542, 0x6543, 0x6544, 0x6546, 0x6547, 0x654a, 0x654b, 0x654d, 0x654e, 0x6550, 0x6552, 0x6553, 0x6554, 0x6557, 0x6558, 0x655a, 0x655c, 0x655f, 0x6560, 0x6561, 0x6564, 0x6565, 0x6567, 0x6568, 0x6569, 0x656a, 0x656d, 0x656e, 0x656f, 0x6571, 0x6573, 0x6575, 0x6576, 0x6578, 0x6579, 0x657a, 0x657b, 0x657c, 0x657d, 0x657e, 0x657f, 0x6580, 0x6581, 0x6582, 0x6583, 0x6584, 0x6585, 0x6586, 0x6588, 0x6589, 0x658a, 0x658d, 0x658e, 0x658f, 0x6592, 0x6594, 0x6595, 0x6596, 0x6598, 0x659a, 0x659d, 0x659e, 0x65a0, 0x65a2, 0x65a3, 0x65a6, 0x65a8, 0x65aa, 0x65ac, 0x65ae, 0x65b1, 0x65b2, 0x65b3, 0x65b4, 0x65b5, 0x65b6, 0x65b7, 0x65b8, 0x65ba, 0x65bb, 0x65be, 0x65bf, 0x65c0, 0x65c2, 0x65c7, 0x65c8, 0x65c9, 0x65ca, 0x65cd, 0x65d0, 0x65d1, 0x65d3, 0x65d4, 0x65d5, 0x65d8, 0x65d9, 0x65da, 0x65db, 0x65dc, 0x65dd, 0x65de, 0x65df, 0x65e1, 0x65e3, 0x65e4, 0x65ea, 0x65eb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ 192 ] = { 0x65f2, 0x65f3, 0x65f4, 0x65f5, 0x65f8, 0x65f9, 0x65fb, 0x65fc, 0x65fd, 0x65fe, 0x65ff, 0x6601, 0x6604, 0x6605, 0x6607, 0x6608, 0x6609, 0x660b, 0x660d, 0x6610, 0x6611, 0x6612, 0x6616, 0x6617, 0x6618, 0x661a, 0x661b, 0x661c, 0x661e, 0x6621, 0x6622, 0x6623, 0x6624, 0x6626, 0x6629, 0x662a, 0x662b, 0x662c, 0x662e, 0x6630, 0x6632, 0x6633, 0x6637, 0x6638, 0x6639, 0x663a, 0x663b, 0x663d, 0x663f, 0x6640, 0x6642, 0x6644, 0x6645, 0x6646, 0x6647, 0x6648, 0x6649, 0x664a, 0x664d, 0x664e, 0x6650, 0x6651, 0x6658, 0xfffd, 0x6659, 0x665b, 0x665c, 0x665d, 0x665e, 0x6660, 0x6662, 0x6663, 0x6665, 0x6667, 0x6669, 0x666a, 0x666b, 0x666c, 0x666d, 0x6671, 0x6672, 0x6673, 0x6675, 0x6678, 0x6679, 0x667b, 0x667c, 0x667d, 0x667f, 0x6680, 0x6681, 0x6683, 0x6685, 0x6686, 0x6688, 0x6689, 0x668a, 0x668b, 0x668d, 0x668e, 0x668f, 0x6690, 0x6692, 0x6693, 0x6694, 0x6695, 0x6698, 0x6699, 0x669a, 0x669b, 0x669c, 0x669e, 0x669f, 0x66a0, 0x66a1, 0x66a2, 0x66a3, 0x66a4, 0x66a5, 0x66a6, 0x66a9, 0x66aa, 0x66ab, 0x66ac, 0x66ad, 0x66af, 0x66b0, 0x66b1, 0x66b2, 0x66b3, 0x66b5, 0x66b6, 0x66b7, 0x66b8, 0x66ba, 0x66bb, 0x66bc, 0x66bd, 0x66bf, 0x66c0, 0x66c1, 0x66c2, 0x66c3, 0x66c4, 0x66c5, 0x66c6, 0x66c7, 0x66c8, 0x66c9, 0x66ca, 0x66cb, 0x66cc, 0x66cd, 0x66ce, 0x66cf, 0x66d0, 0x66d1, 0x66d2, 0x66d3, 0x66d4, 0x66d5, 0x66d6, 0x66d7, 0x66d8, 0x66da, 0x66de, 0x66df, 0x66e0, 0x66e1, 0x66e2, 0x66e3, 0x66e4, 0x66e5, 0x66e7, 0x66e8, 0x66ea, 0x66eb, 0x66ec, 0x66ed, 0x66ee, 0x66ef, 0x66f1, 0x66f5, 0x66f6, 0x66f8, 0x66fa, 0x66fb, 0x66fd, 0x6701, 0x6702, 0x6703, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ 192 ] = { 0x6704, 0x6705, 0x6706, 0x6707, 0x670c, 0x670e, 0x670f, 0x6711, 0x6712, 0x6713, 0x6716, 0x6718, 0x6719, 0x671a, 0x671c, 0x671e, 0x6720, 0x6721, 0x6722, 0x6723, 0x6724, 0x6725, 0x6727, 0x6729, 0x672e, 0x6730, 0x6732, 0x6733, 0x6736, 0x6737, 0x6738, 0x6739, 0x673b, 0x673c, 0x673e, 0x673f, 0x6741, 0x6744, 0x6745, 0x6747, 0x674a, 0x674b, 0x674d, 0x6752, 0x6754, 0x6755, 0x6757, 0x6758, 0x6759, 0x675a, 0x675b, 0x675d, 0x6762, 0x6763, 0x6764, 0x6766, 0x6767, 0x676b, 0x676c, 0x676e, 0x6771, 0x6774, 0x6776, 0xfffd, 0x6778, 0x6779, 0x677a, 0x677b, 0x677d, 0x6780, 0x6782, 0x6783, 0x6785, 0x6786, 0x6788, 0x678a, 0x678c, 0x678d, 0x678e, 0x678f, 0x6791, 0x6792, 0x6793, 0x6794, 0x6796, 0x6799, 0x679b, 0x679f, 0x67a0, 0x67a1, 0x67a4, 0x67a6, 0x67a9, 0x67ac, 0x67ae, 0x67b1, 0x67b2, 0x67b4, 0x67b9, 0x67ba, 0x67bb, 0x67bc, 0x67bd, 0x67be, 0x67bf, 0x67c0, 0x67c2, 0x67c5, 0x67c6, 0x67c7, 0x67c8, 0x67c9, 0x67ca, 0x67cb, 0x67cc, 0x67cd, 0x67ce, 0x67d5, 0x67d6, 0x67d7, 0x67db, 0x67df, 0x67e1, 0x67e3, 0x67e4, 0x67e6, 0x67e7, 0x67e8, 0x67ea, 0x67eb, 0x67ed, 0x67ee, 0x67f2, 0x67f5, 0x67f6, 0x67f7, 0x67f8, 0x67f9, 0x67fa, 0x67fb, 0x67fc, 0x67fe, 0x6801, 0x6802, 0x6803, 0x6804, 0x6806, 0x680d, 0x6810, 0x6812, 0x6814, 0x6815, 0x6818, 0x6819, 0x681a, 0x681b, 0x681c, 0x681e, 0x681f, 0x6820, 0x6822, 0x6823, 0x6824, 0x6825, 0x6826, 0x6827, 0x6828, 0x682b, 0x682c, 0x682d, 0x682e, 0x682f, 0x6830, 0x6831, 0x6834, 0x6835, 0x6836, 0x683a, 0x683b, 0x683f, 0x6847, 0x684b, 0x684d, 0x684f, 0x6852, 0x6856, 0x6857, 0x6858, 0x6859, 0x685a, 0x685b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ 192 ] = { 0x685c, 0x685d, 0x685e, 0x685f, 0x686a, 0x686c, 0x686d, 0x686e, 0x686f, 0x6870, 0x6871, 0x6872, 0x6873, 0x6875, 0x6878, 0x6879, 0x687a, 0x687b, 0x687c, 0x687d, 0x687e, 0x687f, 0x6880, 0x6882, 0x6884, 0x6887, 0x6888, 0x6889, 0x688a, 0x688b, 0x688c, 0x688d, 0x688e, 0x6890, 0x6891, 0x6892, 0x6894, 0x6895, 0x6896, 0x6898, 0x6899, 0x689a, 0x689b, 0x689c, 0x689d, 0x689e, 0x689f, 0x68a0, 0x68a1, 0x68a3, 0x68a4, 0x68a5, 0x68a9, 0x68aa, 0x68ab, 0x68ac, 0x68ae, 0x68b1, 0x68b2, 0x68b4, 0x68b6, 0x68b7, 0x68b8, 0xfffd, 0x68b9, 0x68ba, 0x68bb, 0x68bc, 0x68bd, 0x68be, 0x68bf, 0x68c1, 0x68c3, 0x68c4, 0x68c5, 0x68c6, 0x68c7, 0x68c8, 0x68ca, 0x68cc, 0x68ce, 0x68cf, 0x68d0, 0x68d1, 0x68d3, 0x68d4, 0x68d6, 0x68d7, 0x68d9, 0x68db, 0x68dc, 0x68dd, 0x68de, 0x68df, 0x68e1, 0x68e2, 0x68e4, 0x68e5, 0x68e6, 0x68e7, 0x68e8, 0x68e9, 0x68ea, 0x68eb, 0x68ec, 0x68ed, 0x68ef, 0x68f2, 0x68f3, 0x68f4, 0x68f6, 0x68f7, 0x68f8, 0x68fb, 0x68fd, 0x68fe, 0x68ff, 0x6900, 0x6902, 0x6903, 0x6904, 0x6906, 0x6907, 0x6908, 0x6909, 0x690a, 0x690c, 0x690f, 0x6911, 0x6913, 0x6914, 0x6915, 0x6916, 0x6917, 0x6918, 0x6919, 0x691a, 0x691b, 0x691c, 0x691d, 0x691e, 0x6921, 0x6922, 0x6923, 0x6925, 0x6926, 0x6927, 0x6928, 0x6929, 0x692a, 0x692b, 0x692c, 0x692e, 0x692f, 0x6931, 0x6932, 0x6933, 0x6935, 0x6936, 0x6937, 0x6938, 0x693a, 0x693b, 0x693c, 0x693e, 0x6940, 0x6941, 0x6943, 0x6944, 0x6945, 0x6946, 0x6947, 0x6948, 0x6949, 0x694a, 0x694b, 0x694c, 0x694d, 0x694e, 0x694f, 0x6950, 0x6951, 0x6952, 0x6953, 0x6955, 0x6956, 0x6958, 0x6959, 0x695b, 0x695c, 0x695f, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ 192 ] = { 0x6961, 0x6962, 0x6964, 0x6965, 0x6967, 0x6968, 0x6969, 0x696a, 0x696c, 0x696d, 0x696f, 0x6970, 0x6972, 0x6973, 0x6974, 0x6975, 0x6976, 0x697a, 0x697b, 0x697d, 0x697e, 0x697f, 0x6981, 0x6983, 0x6985, 0x698a, 0x698b, 0x698c, 0x698e, 0x698f, 0x6990, 0x6991, 0x6992, 0x6993, 0x6996, 0x6997, 0x6999, 0x699a, 0x699d, 0x699e, 0x699f, 0x69a0, 0x69a1, 0x69a2, 0x69a3, 0x69a4, 0x69a5, 0x69a6, 0x69a9, 0x69aa, 0x69ac, 0x69ae, 0x69af, 0x69b0, 0x69b2, 0x69b3, 0x69b5, 0x69b6, 0x69b8, 0x69b9, 0x69ba, 0x69bc, 0x69bd, 0xfffd, 0x69be, 0x69bf, 0x69c0, 0x69c2, 0x69c3, 0x69c4, 0x69c5, 0x69c6, 0x69c7, 0x69c8, 0x69c9, 0x69cb, 0x69cd, 0x69cf, 0x69d1, 0x69d2, 0x69d3, 0x69d5, 0x69d6, 0x69d7, 0x69d8, 0x69d9, 0x69da, 0x69dc, 0x69dd, 0x69de, 0x69e1, 0x69e2, 0x69e3, 0x69e4, 0x69e5, 0x69e6, 0x69e7, 0x69e8, 0x69e9, 0x69ea, 0x69eb, 0x69ec, 0x69ee, 0x69ef, 0x69f0, 0x69f1, 0x69f3, 0x69f4, 0x69f5, 0x69f6, 0x69f7, 0x69f8, 0x69f9, 0x69fa, 0x69fb, 0x69fc, 0x69fe, 0x6a00, 0x6a01, 0x6a02, 0x6a03, 0x6a04, 0x6a05, 0x6a06, 0x6a07, 0x6a08, 0x6a09, 0x6a0b, 0x6a0c, 0x6a0d, 0x6a0e, 0x6a0f, 0x6a10, 0x6a11, 0x6a12, 0x6a13, 0x6a14, 0x6a15, 0x6a16, 0x6a19, 0x6a1a, 0x6a1b, 0x6a1c, 0x6a1d, 0x6a1e, 0x6a20, 0x6a22, 0x6a23, 0x6a24, 0x6a25, 0x6a26, 0x6a27, 0x6a29, 0x6a2b, 0x6a2c, 0x6a2d, 0x6a2e, 0x6a30, 0x6a32, 0x6a33, 0x6a34, 0x6a36, 0x6a37, 0x6a38, 0x6a39, 0x6a3a, 0x6a3b, 0x6a3c, 0x6a3f, 0x6a40, 0x6a41, 0x6a42, 0x6a43, 0x6a45, 0x6a46, 0x6a48, 0x6a49, 0x6a4a, 0x6a4b, 0x6a4c, 0x6a4d, 0x6a4e, 0x6a4f, 0x6a51, 0x6a52, 0x6a53, 0x6a54, 0x6a55, 0x6a56, 0x6a57, 0x6a5a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ 192 ] = { 0x6a5c, 0x6a5d, 0x6a5e, 0x6a5f, 0x6a60, 0x6a62, 0x6a63, 0x6a64, 0x6a66, 0x6a67, 0x6a68, 0x6a69, 0x6a6a, 0x6a6b, 0x6a6c, 0x6a6d, 0x6a6e, 0x6a6f, 0x6a70, 0x6a72, 0x6a73, 0x6a74, 0x6a75, 0x6a76, 0x6a77, 0x6a78, 0x6a7a, 0x6a7b, 0x6a7d, 0x6a7e, 0x6a7f, 0x6a81, 0x6a82, 0x6a83, 0x6a85, 0x6a86, 0x6a87, 0x6a88, 0x6a89, 0x6a8a, 0x6a8b, 0x6a8c, 0x6a8d, 0x6a8f, 0x6a92, 0x6a93, 0x6a94, 0x6a95, 0x6a96, 0x6a98, 0x6a99, 0x6a9a, 0x6a9b, 0x6a9c, 0x6a9d, 0x6a9e, 0x6a9f, 0x6aa1, 0x6aa2, 0x6aa3, 0x6aa4, 0x6aa5, 0x6aa6, 0xfffd, 0x6aa7, 0x6aa8, 0x6aaa, 0x6aad, 0x6aae, 0x6aaf, 0x6ab0, 0x6ab1, 0x6ab2, 0x6ab3, 0x6ab4, 0x6ab5, 0x6ab6, 0x6ab7, 0x6ab8, 0x6ab9, 0x6aba, 0x6abb, 0x6abc, 0x6abd, 0x6abe, 0x6abf, 0x6ac0, 0x6ac1, 0x6ac2, 0x6ac3, 0x6ac4, 0x6ac5, 0x6ac6, 0x6ac7, 0x6ac8, 0x6ac9, 0x6aca, 0x6acb, 0x6acc, 0x6acd, 0x6ace, 0x6acf, 0x6ad0, 0x6ad1, 0x6ad2, 0x6ad3, 0x6ad4, 0x6ad5, 0x6ad6, 0x6ad7, 0x6ad8, 0x6ad9, 0x6ada, 0x6adb, 0x6adc, 0x6add, 0x6ade, 0x6adf, 0x6ae0, 0x6ae1, 0x6ae2, 0x6ae3, 0x6ae4, 0x6ae5, 0x6ae6, 0x6ae7, 0x6ae8, 0x6ae9, 0x6aea, 0x6aeb, 0x6aec, 0x6aed, 0x6aee, 0x6aef, 0x6af0, 0x6af1, 0x6af2, 0x6af3, 0x6af4, 0x6af5, 0x6af6, 0x6af7, 0x6af8, 0x6af9, 0x6afa, 0x6afb, 0x6afc, 0x6afd, 0x6afe, 0x6aff, 0x6b00, 0x6b01, 0x6b02, 0x6b03, 0x6b04, 0x6b05, 0x6b06, 0x6b07, 0x6b08, 0x6b09, 0x6b0a, 0x6b0b, 0x6b0c, 0x6b0d, 0x6b0e, 0x6b0f, 0x6b10, 0x6b11, 0x6b12, 0x6b13, 0x6b14, 0x6b15, 0x6b16, 0x6b17, 0x6b18, 0x6b19, 0x6b1a, 0x6b1b, 0x6b1c, 0x6b1d, 0x6b1e, 0x6b1f, 0x6b25, 0x6b26, 0x6b28, 0x6b29, 0x6b2a, 0x6b2b, 0x6b2c, 0x6b2d, 0x6b2e, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ 192 ] = { 0x6b2f, 0x6b30, 0x6b31, 0x6b33, 0x6b34, 0x6b35, 0x6b36, 0x6b38, 0x6b3b, 0x6b3c, 0x6b3d, 0x6b3f, 0x6b40, 0x6b41, 0x6b42, 0x6b44, 0x6b45, 0x6b48, 0x6b4a, 0x6b4b, 0x6b4d, 0x6b4e, 0x6b4f, 0x6b50, 0x6b51, 0x6b52, 0x6b53, 0x6b54, 0x6b55, 0x6b56, 0x6b57, 0x6b58, 0x6b5a, 0x6b5b, 0x6b5c, 0x6b5d, 0x6b5e, 0x6b5f, 0x6b60, 0x6b61, 0x6b68, 0x6b69, 0x6b6b, 0x6b6c, 0x6b6d, 0x6b6e, 0x6b6f, 0x6b70, 0x6b71, 0x6b72, 0x6b73, 0x6b74, 0x6b75, 0x6b76, 0x6b77, 0x6b78, 0x6b7a, 0x6b7d, 0x6b7e, 0x6b7f, 0x6b80, 0x6b85, 0x6b88, 0xfffd, 0x6b8c, 0x6b8e, 0x6b8f, 0x6b90, 0x6b91, 0x6b94, 0x6b95, 0x6b97, 0x6b98, 0x6b99, 0x6b9c, 0x6b9d, 0x6b9e, 0x6b9f, 0x6ba0, 0x6ba2, 0x6ba3, 0x6ba4, 0x6ba5, 0x6ba6, 0x6ba7, 0x6ba8, 0x6ba9, 0x6bab, 0x6bac, 0x6bad, 0x6bae, 0x6baf, 0x6bb0, 0x6bb1, 0x6bb2, 0x6bb6, 0x6bb8, 0x6bb9, 0x6bba, 0x6bbb, 0x6bbc, 0x6bbd, 0x6bbe, 0x6bc0, 0x6bc3, 0x6bc4, 0x6bc6, 0x6bc7, 0x6bc8, 0x6bc9, 0x6bca, 0x6bcc, 0x6bce, 0x6bd0, 0x6bd1, 0x6bd8, 0x6bda, 0x6bdc, 0x6bdd, 0x6bde, 0x6bdf, 0x6be0, 0x6be2, 0x6be3, 0x6be4, 0x6be5, 0x6be6, 0x6be7, 0x6be8, 0x6be9, 0x6bec, 0x6bed, 0x6bee, 0x6bf0, 0x6bf1, 0x6bf2, 0x6bf4, 0x6bf6, 0x6bf7, 0x6bf8, 0x6bfa, 0x6bfb, 0x6bfc, 0x6bfe, 0x6bff, 0x6c00, 0x6c01, 0x6c02, 0x6c03, 0x6c04, 0x6c08, 0x6c09, 0x6c0a, 0x6c0b, 0x6c0c, 0x6c0e, 0x6c12, 0x6c17, 0x6c1c, 0x6c1d, 0x6c1e, 0x6c20, 0x6c23, 0x6c25, 0x6c2b, 0x6c2c, 0x6c2d, 0x6c31, 0x6c33, 0x6c36, 0x6c37, 0x6c39, 0x6c3a, 0x6c3b, 0x6c3c, 0x6c3e, 0x6c3f, 0x6c43, 0x6c44, 0x6c45, 0x6c48, 0x6c4b, 0x6c4c, 0x6c4d, 0x6c4e, 0x6c4f, 0x6c51, 0x6c52, 0x6c53, 0x6c56, 0x6c58, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ 192 ] = { 0x6c59, 0x6c5a, 0x6c62, 0x6c63, 0x6c65, 0x6c66, 0x6c67, 0x6c6b, 0x6c6c, 0x6c6d, 0x6c6e, 0x6c6f, 0x6c71, 0x6c73, 0x6c75, 0x6c77, 0x6c78, 0x6c7a, 0x6c7b, 0x6c7c, 0x6c7f, 0x6c80, 0x6c84, 0x6c87, 0x6c8a, 0x6c8b, 0x6c8d, 0x6c8e, 0x6c91, 0x6c92, 0x6c95, 0x6c96, 0x6c97, 0x6c98, 0x6c9a, 0x6c9c, 0x6c9d, 0x6c9e, 0x6ca0, 0x6ca2, 0x6ca8, 0x6cac, 0x6caf, 0x6cb0, 0x6cb4, 0x6cb5, 0x6cb6, 0x6cb7, 0x6cba, 0x6cc0, 0x6cc1, 0x6cc2, 0x6cc3, 0x6cc6, 0x6cc7, 0x6cc8, 0x6ccb, 0x6ccd, 0x6cce, 0x6ccf, 0x6cd1, 0x6cd2, 0x6cd8, 0xfffd, 0x6cd9, 0x6cda, 0x6cdc, 0x6cdd, 0x6cdf, 0x6ce4, 0x6ce6, 0x6ce7, 0x6ce9, 0x6cec, 0x6ced, 0x6cf2, 0x6cf4, 0x6cf9, 0x6cff, 0x6d00, 0x6d02, 0x6d03, 0x6d05, 0x6d06, 0x6d08, 0x6d09, 0x6d0a, 0x6d0d, 0x6d0f, 0x6d10, 0x6d11, 0x6d13, 0x6d14, 0x6d15, 0x6d16, 0x6d18, 0x6d1c, 0x6d1d, 0x6d1f, 0x6d20, 0x6d21, 0x6d22, 0x6d23, 0x6d24, 0x6d26, 0x6d28, 0x6d29, 0x6d2c, 0x6d2d, 0x6d2f, 0x6d30, 0x6d34, 0x6d36, 0x6d37, 0x6d38, 0x6d3a, 0x6d3f, 0x6d40, 0x6d42, 0x6d44, 0x6d49, 0x6d4c, 0x6d50, 0x6d55, 0x6d56, 0x6d57, 0x6d58, 0x6d5b, 0x6d5d, 0x6d5f, 0x6d61, 0x6d62, 0x6d64, 0x6d65, 0x6d67, 0x6d68, 0x6d6b, 0x6d6c, 0x6d6d, 0x6d70, 0x6d71, 0x6d72, 0x6d73, 0x6d75, 0x6d76, 0x6d79, 0x6d7a, 0x6d7b, 0x6d7d, 0x6d7e, 0x6d7f, 0x6d80, 0x6d81, 0x6d83, 0x6d84, 0x6d86, 0x6d87, 0x6d8a, 0x6d8b, 0x6d8d, 0x6d8f, 0x6d90, 0x6d92, 0x6d96, 0x6d97, 0x6d98, 0x6d99, 0x6d9a, 0x6d9c, 0x6da2, 0x6da5, 0x6dac, 0x6dad, 0x6db0, 0x6db1, 0x6db3, 0x6db4, 0x6db6, 0x6db7, 0x6db9, 0x6dba, 0x6dbb, 0x6dbc, 0x6dbd, 0x6dbe, 0x6dc1, 0x6dc2, 0x6dc3, 0x6dc8, 0x6dc9, 0x6dca, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ 192 ] = { 0x6dcd, 0x6dce, 0x6dcf, 0x6dd0, 0x6dd2, 0x6dd3, 0x6dd4, 0x6dd5, 0x6dd7, 0x6dda, 0x6ddb, 0x6ddc, 0x6ddf, 0x6de2, 0x6de3, 0x6de5, 0x6de7, 0x6de8, 0x6de9, 0x6dea, 0x6ded, 0x6def, 0x6df0, 0x6df2, 0x6df4, 0x6df5, 0x6df6, 0x6df8, 0x6dfa, 0x6dfd, 0x6dfe, 0x6dff, 0x6e00, 0x6e01, 0x6e02, 0x6e03, 0x6e04, 0x6e06, 0x6e07, 0x6e08, 0x6e09, 0x6e0b, 0x6e0f, 0x6e12, 0x6e13, 0x6e15, 0x6e18, 0x6e19, 0x6e1b, 0x6e1c, 0x6e1e, 0x6e1f, 0x6e22, 0x6e26, 0x6e27, 0x6e28, 0x6e2a, 0x6e2c, 0x6e2e, 0x6e30, 0x6e31, 0x6e33, 0x6e35, 0xfffd, 0x6e36, 0x6e37, 0x6e39, 0x6e3b, 0x6e3c, 0x6e3d, 0x6e3e, 0x6e3f, 0x6e40, 0x6e41, 0x6e42, 0x6e45, 0x6e46, 0x6e47, 0x6e48, 0x6e49, 0x6e4a, 0x6e4b, 0x6e4c, 0x6e4f, 0x6e50, 0x6e51, 0x6e52, 0x6e55, 0x6e57, 0x6e59, 0x6e5a, 0x6e5c, 0x6e5d, 0x6e5e, 0x6e60, 0x6e61, 0x6e62, 0x6e63, 0x6e64, 0x6e65, 0x6e66, 0x6e67, 0x6e68, 0x6e69, 0x6e6a, 0x6e6c, 0x6e6d, 0x6e6f, 0x6e70, 0x6e71, 0x6e72, 0x6e73, 0x6e74, 0x6e75, 0x6e76, 0x6e77, 0x6e78, 0x6e79, 0x6e7a, 0x6e7b, 0x6e7c, 0x6e7d, 0x6e80, 0x6e81, 0x6e82, 0x6e84, 0x6e87, 0x6e88, 0x6e8a, 0x6e8b, 0x6e8c, 0x6e8d, 0x6e8e, 0x6e91, 0x6e92, 0x6e93, 0x6e94, 0x6e95, 0x6e96, 0x6e97, 0x6e99, 0x6e9a, 0x6e9b, 0x6e9d, 0x6e9e, 0x6ea0, 0x6ea1, 0x6ea3, 0x6ea4, 0x6ea6, 0x6ea8, 0x6ea9, 0x6eab, 0x6eac, 0x6ead, 0x6eae, 0x6eb0, 0x6eb3, 0x6eb5, 0x6eb8, 0x6eb9, 0x6ebc, 0x6ebe, 0x6ebf, 0x6ec0, 0x6ec3, 0x6ec4, 0x6ec5, 0x6ec6, 0x6ec8, 0x6ec9, 0x6eca, 0x6ecc, 0x6ecd, 0x6ece, 0x6ed0, 0x6ed2, 0x6ed6, 0x6ed8, 0x6ed9, 0x6edb, 0x6edc, 0x6edd, 0x6ee3, 0x6ee7, 0x6eea, 0x6eeb, 0x6eec, 0x6eed, 0x6eee, 0x6eef, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ 192 ] = { 0x6ef0, 0x6ef1, 0x6ef2, 0x6ef3, 0x6ef5, 0x6ef6, 0x6ef7, 0x6ef8, 0x6efa, 0x6efb, 0x6efc, 0x6efd, 0x6efe, 0x6eff, 0x6f00, 0x6f01, 0x6f03, 0x6f04, 0x6f05, 0x6f07, 0x6f08, 0x6f0a, 0x6f0b, 0x6f0c, 0x6f0d, 0x6f0e, 0x6f10, 0x6f11, 0x6f12, 0x6f16, 0x6f17, 0x6f18, 0x6f19, 0x6f1a, 0x6f1b, 0x6f1c, 0x6f1d, 0x6f1e, 0x6f1f, 0x6f21, 0x6f22, 0x6f23, 0x6f25, 0x6f26, 0x6f27, 0x6f28, 0x6f2c, 0x6f2e, 0x6f30, 0x6f32, 0x6f34, 0x6f35, 0x6f37, 0x6f38, 0x6f39, 0x6f3a, 0x6f3b, 0x6f3c, 0x6f3d, 0x6f3f, 0x6f40, 0x6f41, 0x6f42, 0xfffd, 0x6f43, 0x6f44, 0x6f45, 0x6f48, 0x6f49, 0x6f4a, 0x6f4c, 0x6f4e, 0x6f4f, 0x6f50, 0x6f51, 0x6f52, 0x6f53, 0x6f54, 0x6f55, 0x6f56, 0x6f57, 0x6f59, 0x6f5a, 0x6f5b, 0x6f5d, 0x6f5f, 0x6f60, 0x6f61, 0x6f63, 0x6f64, 0x6f65, 0x6f67, 0x6f68, 0x6f69, 0x6f6a, 0x6f6b, 0x6f6c, 0x6f6f, 0x6f70, 0x6f71, 0x6f73, 0x6f75, 0x6f76, 0x6f77, 0x6f79, 0x6f7b, 0x6f7d, 0x6f7e, 0x6f7f, 0x6f80, 0x6f81, 0x6f82, 0x6f83, 0x6f85, 0x6f86, 0x6f87, 0x6f8a, 0x6f8b, 0x6f8f, 0x6f90, 0x6f91, 0x6f92, 0x6f93, 0x6f94, 0x6f95, 0x6f96, 0x6f97, 0x6f98, 0x6f99, 0x6f9a, 0x6f9b, 0x6f9d, 0x6f9e, 0x6f9f, 0x6fa0, 0x6fa2, 0x6fa3, 0x6fa4, 0x6fa5, 0x6fa6, 0x6fa8, 0x6fa9, 0x6faa, 0x6fab, 0x6fac, 0x6fad, 0x6fae, 0x6faf, 0x6fb0, 0x6fb1, 0x6fb2, 0x6fb4, 0x6fb5, 0x6fb7, 0x6fb8, 0x6fba, 0x6fbb, 0x6fbc, 0x6fbd, 0x6fbe, 0x6fbf, 0x6fc1, 0x6fc3, 0x6fc4, 0x6fc5, 0x6fc6, 0x6fc7, 0x6fc8, 0x6fca, 0x6fcb, 0x6fcc, 0x6fcd, 0x6fce, 0x6fcf, 0x6fd0, 0x6fd3, 0x6fd4, 0x6fd5, 0x6fd6, 0x6fd7, 0x6fd8, 0x6fd9, 0x6fda, 0x6fdb, 0x6fdc, 0x6fdd, 0x6fdf, 0x6fe2, 0x6fe3, 0x6fe4, 0x6fe5, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ 192 ] = { 0x6fe6, 0x6fe7, 0x6fe8, 0x6fe9, 0x6fea, 0x6feb, 0x6fec, 0x6fed, 0x6ff0, 0x6ff1, 0x6ff2, 0x6ff3, 0x6ff4, 0x6ff5, 0x6ff6, 0x6ff7, 0x6ff8, 0x6ff9, 0x6ffa, 0x6ffb, 0x6ffc, 0x6ffd, 0x6ffe, 0x6fff, 0x7000, 0x7001, 0x7002, 0x7003, 0x7004, 0x7005, 0x7006, 0x7007, 0x7008, 0x7009, 0x700a, 0x700b, 0x700c, 0x700d, 0x700e, 0x700f, 0x7010, 0x7012, 0x7013, 0x7014, 0x7015, 0x7016, 0x7017, 0x7018, 0x7019, 0x701c, 0x701d, 0x701e, 0x701f, 0x7020, 0x7021, 0x7022, 0x7024, 0x7025, 0x7026, 0x7027, 0x7028, 0x7029, 0x702a, 0xfffd, 0x702b, 0x702c, 0x702d, 0x702e, 0x702f, 0x7030, 0x7031, 0x7032, 0x7033, 0x7034, 0x7036, 0x7037, 0x7038, 0x703a, 0x703b, 0x703c, 0x703d, 0x703e, 0x703f, 0x7040, 0x7041, 0x7042, 0x7043, 0x7044, 0x7045, 0x7046, 0x7047, 0x7048, 0x7049, 0x704a, 0x704b, 0x704d, 0x704e, 0x7050, 0x7051, 0x7052, 0x7053, 0x7054, 0x7055, 0x7056, 0x7057, 0x7058, 0x7059, 0x705a, 0x705b, 0x705c, 0x705d, 0x705f, 0x7060, 0x7061, 0x7062, 0x7063, 0x7064, 0x7065, 0x7066, 0x7067, 0x7068, 0x7069, 0x706a, 0x706e, 0x7071, 0x7072, 0x7073, 0x7074, 0x7077, 0x7079, 0x707a, 0x707b, 0x707d, 0x7081, 0x7082, 0x7083, 0x7084, 0x7086, 0x7087, 0x7088, 0x708b, 0x708c, 0x708d, 0x708f, 0x7090, 0x7091, 0x7093, 0x7097, 0x7098, 0x709a, 0x709b, 0x709e, 0x709f, 0x70a0, 0x70a1, 0x70a2, 0x70a3, 0x70a4, 0x70a5, 0x70a6, 0x70a7, 0x70a8, 0x70a9, 0x70aa, 0x70b0, 0x70b2, 0x70b4, 0x70b5, 0x70b6, 0x70ba, 0x70be, 0x70bf, 0x70c4, 0x70c5, 0x70c6, 0x70c7, 0x70c9, 0x70cb, 0x70cc, 0x70cd, 0x70ce, 0x70cf, 0x70d0, 0x70d1, 0x70d2, 0x70d3, 0x70d4, 0x70d5, 0x70d6, 0x70d7, 0x70da, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ 192 ] = { 0x70dc, 0x70dd, 0x70de, 0x70e0, 0x70e1, 0x70e2, 0x70e3, 0x70e5, 0x70ea, 0x70ee, 0x70f0, 0x70f1, 0x70f2, 0x70f3, 0x70f4, 0x70f5, 0x70f6, 0x70f8, 0x70fa, 0x70fb, 0x70fc, 0x70fe, 0x70ff, 0x7100, 0x7101, 0x7102, 0x7103, 0x7104, 0x7105, 0x7106, 0x7107, 0x7108, 0x710b, 0x710c, 0x710d, 0x710e, 0x710f, 0x7111, 0x7112, 0x7114, 0x7117, 0x711b, 0x711c, 0x711d, 0x711e, 0x711f, 0x7120, 0x7121, 0x7122, 0x7123, 0x7124, 0x7125, 0x7127, 0x7128, 0x7129, 0x712a, 0x712b, 0x712c, 0x712d, 0x712e, 0x7132, 0x7133, 0x7134, 0xfffd, 0x7135, 0x7137, 0x7138, 0x7139, 0x713a, 0x713b, 0x713c, 0x713d, 0x713e, 0x713f, 0x7140, 0x7141, 0x7142, 0x7143, 0x7144, 0x7146, 0x7147, 0x7148, 0x7149, 0x714b, 0x714d, 0x714f, 0x7150, 0x7151, 0x7152, 0x7153, 0x7154, 0x7155, 0x7156, 0x7157, 0x7158, 0x7159, 0x715a, 0x715b, 0x715d, 0x715f, 0x7160, 0x7161, 0x7162, 0x7163, 0x7165, 0x7169, 0x716a, 0x716b, 0x716c, 0x716d, 0x716f, 0x7170, 0x7171, 0x7174, 0x7175, 0x7176, 0x7177, 0x7179, 0x717b, 0x717c, 0x717e, 0x717f, 0x7180, 0x7181, 0x7182, 0x7183, 0x7185, 0x7186, 0x7187, 0x7188, 0x7189, 0x718b, 0x718c, 0x718d, 0x718e, 0x7190, 0x7191, 0x7192, 0x7193, 0x7195, 0x7196, 0x7197, 0x719a, 0x719b, 0x719c, 0x719d, 0x719e, 0x71a1, 0x71a2, 0x71a3, 0x71a4, 0x71a5, 0x71a6, 0x71a7, 0x71a9, 0x71aa, 0x71ab, 0x71ad, 0x71ae, 0x71af, 0x71b0, 0x71b1, 0x71b2, 0x71b4, 0x71b6, 0x71b7, 0x71b8, 0x71ba, 0x71bb, 0x71bc, 0x71bd, 0x71be, 0x71bf, 0x71c0, 0x71c1, 0x71c2, 0x71c4, 0x71c5, 0x71c6, 0x71c7, 0x71c8, 0x71c9, 0x71ca, 0x71cb, 0x71cc, 0x71cd, 0x71cf, 0x71d0, 0x71d1, 0x71d2, 0x71d3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ 192 ] = { 0x71d6, 0x71d7, 0x71d8, 0x71d9, 0x71da, 0x71db, 0x71dc, 0x71dd, 0x71de, 0x71df, 0x71e1, 0x71e2, 0x71e3, 0x71e4, 0x71e6, 0x71e8, 0x71e9, 0x71ea, 0x71eb, 0x71ec, 0x71ed, 0x71ef, 0x71f0, 0x71f1, 0x71f2, 0x71f3, 0x71f4, 0x71f5, 0x71f6, 0x71f7, 0x71f8, 0x71fa, 0x71fb, 0x71fc, 0x71fd, 0x71fe, 0x71ff, 0x7200, 0x7201, 0x7202, 0x7203, 0x7204, 0x7205, 0x7207, 0x7208, 0x7209, 0x720a, 0x720b, 0x720c, 0x720d, 0x720e, 0x720f, 0x7210, 0x7211, 0x7212, 0x7213, 0x7214, 0x7215, 0x7216, 0x7217, 0x7218, 0x7219, 0x721a, 0xfffd, 0x721b, 0x721c, 0x721e, 0x721f, 0x7220, 0x7221, 0x7222, 0x7223, 0x7224, 0x7225, 0x7226, 0x7227, 0x7229, 0x722b, 0x722d, 0x722e, 0x722f, 0x7232, 0x7233, 0x7234, 0x723a, 0x723c, 0x723e, 0x7240, 0x7241, 0x7242, 0x7243, 0x7244, 0x7245, 0x7246, 0x7249, 0x724a, 0x724b, 0x724e, 0x724f, 0x7250, 0x7251, 0x7253, 0x7254, 0x7255, 0x7257, 0x7258, 0x725a, 0x725c, 0x725e, 0x7260, 0x7263, 0x7264, 0x7265, 0x7268, 0x726a, 0x726b, 0x726c, 0x726d, 0x7270, 0x7271, 0x7273, 0x7274, 0x7276, 0x7277, 0x7278, 0x727b, 0x727c, 0x727d, 0x7282, 0x7283, 0x7285, 0x7286, 0x7287, 0x7288, 0x7289, 0x728c, 0x728e, 0x7290, 0x7291, 0x7293, 0x7294, 0x7295, 0x7296, 0x7297, 0x7298, 0x7299, 0x729a, 0x729b, 0x729c, 0x729d, 0x729e, 0x72a0, 0x72a1, 0x72a2, 0x72a3, 0x72a4, 0x72a5, 0x72a6, 0x72a7, 0x72a8, 0x72a9, 0x72aa, 0x72ab, 0x72ae, 0x72b1, 0x72b2, 0x72b3, 0x72b5, 0x72ba, 0x72bb, 0x72bc, 0x72bd, 0x72be, 0x72bf, 0x72c0, 0x72c5, 0x72c6, 0x72c7, 0x72c9, 0x72ca, 0x72cb, 0x72cc, 0x72cf, 0x72d1, 0x72d3, 0x72d4, 0x72d5, 0x72d6, 0x72d8, 0x72da, 0x72db, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ 96 ] = { 0xfffd, 0x3000, 0x3001, 0x3002, 0x00b7, 0x02c9, 0x02c7, 0x00a8, 0x3003, 0x3005, 0x2014, 0xff5e, 0x2016, 0x2026, 0x2018, 0x2019, 0x201c, 0x201d, 0x3014, 0x3015, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, 0x3016, 0x3017, 0x3010, 0x3011, 0x00b1, 0x00d7, 0x00f7, 0x2236, 0x2227, 0x2228, 0x2211, 0x220f, 0x222a, 0x2229, 0x2208, 0x2237, 0x221a, 0x22a5, 0x2225, 0x2220, 0x2312, 0x2299, 0x222b, 0x222e, 0x2261, 0x224c, 0x2248, 0x223d, 0x221d, 0x2260, 0x226e, 0x226f, 0x2264, 0x2265, 0x221e, 0x2235, 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xff04, 0x00a4, 0xffe0, 0xffe1, 0x2030, 0x00a7, 0x2116, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x203b, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ 96 ] = { 0xfffd, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2488, 0x2489, 0x248a, 0x248b, 0x248c, 0x248d, 0x248e, 0x248f, 0x2490, 0x2491, 0x2492, 0x2493, 0x2494, 0x2495, 0x2496, 0x2497, 0x2498, 0x2499, 0x249a, 0x249b, 0x2474, 0x2475, 0x2476, 0x2477, 0x2478, 0x2479, 0x247a, 0x247b, 0x247c, 0x247d, 0x247e, 0x247f, 0x2480, 0x2481, 0x2482, 0x2483, 0x2484, 0x2485, 0x2486, 0x2487, 0x2460, 0x2461, 0x2462, 0x2463, 0x2464, 0x2465, 0x2466, 0x2467, 0x2468, 0x2469, 0xfffd, 0xfffd, 0x3220, 0x3221, 0x3222, 0x3223, 0x3224, 0x3225, 0x3226, 0x3227, 0x3228, 0x3229, 0xfffd, 0xfffd, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0x216a, 0x216b, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ 96 ] = { 0xfffd, 0xff01, 0xff02, 0xff03, 0xffe5, 0xff05, 0xff06, 0xff07, 0xff08, 0xff09, 0xff0a, 0xff0b, 0xff0c, 0xff0d, 0xff0e, 0xff0f, 0xff10, 0xff11, 0xff12, 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0xff1a, 0xff1b, 0xff1c, 0xff1d, 0xff1e, 0xff1f, 0xff20, 0xff21, 0xff22, 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a, 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32, 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a, 0xff3b, 0xff3c, 0xff3d, 0xff3e, 0xff3f, 0xff40, 0xff41, 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49, 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51, 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58, 0xff59, 0xff5a, 0xff5b, 0xff5c, 0xff5d, 0xffe3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ 88 ] = { 0xfffd, 0x3041, 0x3042, 0x3043, 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, 0x304a, 0x304b, 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051, 0x3052, 0x3053, 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, 0x305a, 0x305b, 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, 0x3061, 0x3062, 0x3063, 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, 0x306a, 0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3070, 0x3071, 0x3072, 0x3073, 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, 0x307a, 0x307b, 0x307c, 0x307d, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3083, 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, 0x308a, 0x308b, 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ 88 ] = { 0xfffd, 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8, 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0, 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8, 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0, 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8, 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0, 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8, 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7, 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef, 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ 88 ] = { 0xfffd, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfe35, 0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e, 0xfe41, 0xfe42, 0xfe43, 0xfe44, 0xfffd, 0xfffd, 0xfe3b, 0xfe3c, 0xfe37, 0xfe38, 0xfe31, 0xfffd, 0xfe33, 0xfe34, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7a0[ 40 ] = { 0xfffd, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ 40 ] = { 0xfffd, 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa840[ 88 ] = { 0x02ca, 0x02cb, 0x02d9, 0x2013, 0x2015, 0x2025, 0x2035, 0x2105, 0x2109, 0x2196, 0x2197, 0x2198, 0x2199, 0x2215, 0x221f, 0x2223, 0x2252, 0x2266, 0x2267, 0x22bf, 0x2550, 0x2551, 0x2552, 0x2553, 0x2554, 0x2555, 0x2556, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x255c, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x2562, 0x2563, 0x2564, 0x2565, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x256d, 0x256e, 0x256f, 0x2570, 0x2571, 0x2572, 0x2573, 0x2581, 0x2582, 0x2583, 0x2584, 0x2585, 0x2586, 0x2587, 0xfffd, 0x2588, 0x2589, 0x258a, 0x258b, 0x258c, 0x258d, 0x258e, 0x258f, 0x2593, 0x2594, 0x2595, 0x25bc, 0x25bd, 0x25e2, 0x25e3, 0x25e4, 0x25e5, 0x2609, 0x2295, 0x3012, 0x301d, 0x301e, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ 80 ] = { 0xfffd, 0x0101, 0x00e1, 0x01ce, 0x00e0, 0x0113, 0x00e9, 0x011b, 0x00e8, 0x012b, 0x00ed, 0x01d0, 0x00ec, 0x014d, 0x00f3, 0x01d2, 0x00f2, 0x016b, 0x00fa, 0x01d4, 0x00f9, 0x01d6, 0x01d8, 0x01da, 0x01dc, 0x00fc, 0x00ea, 0x0251, 0xfffd, 0x0144, 0x0148, 0xfffd, 0x0261, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x3105, 0x3106, 0x3107, 0x3108, 0x3109, 0x310a, 0x310b, 0x310c, 0x310d, 0x310e, 0x310f, 0x3110, 0x3111, 0x3112, 0x3113, 0x3114, 0x3115, 0x3116, 0x3117, 0x3118, 0x3119, 0x311a, 0x311b, 0x311c, 0x311d, 0x311e, 0x311f, 0x3120, 0x3121, 0x3122, 0x3123, 0x3124, 0x3125, 0x3126, 0x3127, 0x3128, 0x3129, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ 72 ] = { 0x3021, 0x3022, 0x3023, 0x3024, 0x3025, 0x3026, 0x3027, 0x3028, 0x3029, 0x32a3, 0x338e, 0x338f, 0x339c, 0x339d, 0x339e, 0x33a1, 0x33c4, 0x33ce, 0x33d1, 0x33d2, 0x33d5, 0xfe30, 0xffe2, 0xffe4, 0xfffd, 0x2121, 0x3231, 0xfffd, 0x2010, 0xfffd, 0xfffd, 0xfffd, 0x30fc, 0x309b, 0x309c, 0x30fd, 0x30fe, 0x3006, 0x309d, 0x309e, 0xfe49, 0xfe4a, 0xfe4b, 0xfe4c, 0xfe4d, 0xfe4e, 0xfe4f, 0xfe50, 0xfe51, 0xfe52, 0xfe54, 0xfe55, 0xfe56, 0xfe57, 0xfe59, 0xfe5a, 0xfe5b, 0xfe5c, 0xfe5d, 0xfe5e, 0xfe5f, 0xfe60, 0xfe61, 0xfffd, 0xfe62, 0xfe63, 0xfe64, 0xfe65, 0xfe66, 0xfe68, 0xfe69, 0xfe6a }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ 80 ] = { 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2500, 0x2501, 0x2502, 0x2503, 0x2504, 0x2505, 0x2506, 0x2507, 0x2508, 0x2509, 0x250a, 0x250b, 0x250c, 0x250d, 0x250e, 0x250f, 0x2510, 0x2511, 0x2512, 0x2513, 0x2514, 0x2515, 0x2516, 0x2517, 0x2518, 0x2519, 0x251a, 0x251b, 0x251c, 0x251d, 0x251e, 0x251f, 0x2520, 0x2521, 0x2522, 0x2523, 0x2524, 0x2525, 0x2526, 0x2527, 0x2528, 0x2529, 0x252a, 0x252b, 0x252c, 0x252d, 0x252e, 0x252f, 0x2530, 0x2531, 0x2532, 0x2533, 0x2534, 0x2535, 0x2536, 0x2537, 0x2538, 0x2539, 0x253a, 0x253b, 0x253c, 0x253d, 0x253e, 0x253f, 0x2540, 0x2541, 0x2542, 0x2543, 0x2544, 0x2545, 0x2546, 0x2547, 0x2548, 0x2549, 0x254a, 0x254b }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ 96 ] = { 0x72dc, 0x72dd, 0x72df, 0x72e2, 0x72e3, 0x72e4, 0x72e5, 0x72e6, 0x72e7, 0x72ea, 0x72eb, 0x72f5, 0x72f6, 0x72f9, 0x72fd, 0x72fe, 0x72ff, 0x7300, 0x7302, 0x7304, 0x7305, 0x7306, 0x7307, 0x7308, 0x7309, 0x730b, 0x730c, 0x730d, 0x730f, 0x7310, 0x7311, 0x7312, 0x7314, 0x7318, 0x7319, 0x731a, 0x731f, 0x7320, 0x7323, 0x7324, 0x7326, 0x7327, 0x7328, 0x732d, 0x732f, 0x7330, 0x7332, 0x7333, 0x7335, 0x7336, 0x733a, 0x733b, 0x733c, 0x733d, 0x7340, 0x7341, 0x7342, 0x7343, 0x7344, 0x7345, 0x7346, 0x7347, 0x7348, 0xfffd, 0x7349, 0x734a, 0x734b, 0x734c, 0x734e, 0x734f, 0x7351, 0x7353, 0x7354, 0x7355, 0x7356, 0x7358, 0x7359, 0x735a, 0x735b, 0x735c, 0x735d, 0x735e, 0x735f, 0x7361, 0x7362, 0x7363, 0x7364, 0x7365, 0x7366, 0x7367, 0x7368, 0x7369, 0x736a, 0x736b, 0x736e, 0x7370 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ 96 ] = { 0x7372, 0x7373, 0x7374, 0x7375, 0x7376, 0x7377, 0x7378, 0x7379, 0x737a, 0x737b, 0x737c, 0x737d, 0x737f, 0x7380, 0x7381, 0x7382, 0x7383, 0x7385, 0x7386, 0x7388, 0x738a, 0x738c, 0x738d, 0x738f, 0x7390, 0x7392, 0x7393, 0x7394, 0x7395, 0x7397, 0x7398, 0x7399, 0x739a, 0x739c, 0x739d, 0x739e, 0x73a0, 0x73a1, 0x73a3, 0x73a4, 0x73a5, 0x73a6, 0x73a7, 0x73a8, 0x73aa, 0x73ac, 0x73ad, 0x73b1, 0x73b4, 0x73b5, 0x73b6, 0x73b8, 0x73b9, 0x73bc, 0x73bd, 0x73be, 0x73bf, 0x73c1, 0x73c3, 0x73c4, 0x73c5, 0x73c6, 0x73c7, 0xfffd, 0x73cb, 0x73cc, 0x73ce, 0x73d2, 0x73d3, 0x73d4, 0x73d5, 0x73d6, 0x73d7, 0x73d8, 0x73da, 0x73db, 0x73dc, 0x73dd, 0x73df, 0x73e1, 0x73e2, 0x73e3, 0x73e4, 0x73e6, 0x73e8, 0x73ea, 0x73eb, 0x73ec, 0x73ee, 0x73ef, 0x73f0, 0x73f1, 0x73f3, 0x73f4, 0x73f5, 0x73f6 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ 96 ] = { 0x73f8, 0x73f9, 0x73fa, 0x73fb, 0x73fc, 0x73fd, 0x73fe, 0x73ff, 0x7400, 0x7401, 0x7402, 0x7404, 0x7407, 0x7408, 0x740b, 0x740c, 0x740d, 0x740e, 0x7411, 0x7412, 0x7413, 0x7414, 0x7415, 0x7416, 0x7417, 0x7418, 0x7419, 0x741c, 0x741d, 0x741e, 0x741f, 0x7420, 0x7421, 0x7423, 0x7424, 0x7427, 0x7429, 0x742b, 0x742d, 0x742f, 0x7431, 0x7432, 0x7437, 0x7438, 0x7439, 0x743a, 0x743b, 0x743d, 0x743e, 0x743f, 0x7440, 0x7442, 0x7443, 0x7444, 0x7445, 0x7446, 0x7447, 0x7448, 0x7449, 0x744a, 0x744b, 0x744c, 0x744d, 0xfffd, 0x744e, 0x744f, 0x7450, 0x7451, 0x7452, 0x7453, 0x7454, 0x7456, 0x7458, 0x745d, 0x7460, 0x7461, 0x7462, 0x7463, 0x7464, 0x7465, 0x7466, 0x7467, 0x7468, 0x7469, 0x746a, 0x746b, 0x746c, 0x746e, 0x746f, 0x7471, 0x7472, 0x7473, 0x7474, 0x7475, 0x7478, 0x7479 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ 96 ] = { 0x747b, 0x747c, 0x747d, 0x747f, 0x7482, 0x7484, 0x7485, 0x7486, 0x7488, 0x7489, 0x748a, 0x748c, 0x748d, 0x748f, 0x7491, 0x7492, 0x7493, 0x7494, 0x7495, 0x7496, 0x7497, 0x7498, 0x7499, 0x749a, 0x749b, 0x749d, 0x749f, 0x74a0, 0x74a1, 0x74a2, 0x74a3, 0x74a4, 0x74a5, 0x74a6, 0x74aa, 0x74ab, 0x74ac, 0x74ad, 0x74ae, 0x74af, 0x74b0, 0x74b1, 0x74b2, 0x74b3, 0x74b4, 0x74b5, 0x74b6, 0x74b7, 0x74b8, 0x74b9, 0x74bb, 0x74bc, 0x74bd, 0x74be, 0x74bf, 0x74c0, 0x74c1, 0x74c2, 0x74c3, 0x74c4, 0x74c5, 0x74c6, 0x74c7, 0xfffd, 0x74c8, 0x74c9, 0x74ca, 0x74cb, 0x74cc, 0x74cd, 0x74ce, 0x74cf, 0x74d0, 0x74d1, 0x74d3, 0x74d4, 0x74d5, 0x74d6, 0x74d7, 0x74d8, 0x74d9, 0x74da, 0x74db, 0x74dd, 0x74df, 0x74e1, 0x74e5, 0x74e7, 0x74e8, 0x74e9, 0x74ea, 0x74eb, 0x74ec, 0x74ed, 0x74f0, 0x74f1 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ 96 ] = { 0x74f3, 0x74f5, 0x74f8, 0x74f9, 0x74fa, 0x74fb, 0x74fc, 0x74fd, 0x74fe, 0x7500, 0x7501, 0x7502, 0x7503, 0x7505, 0x7506, 0x7507, 0x7508, 0x7509, 0x750a, 0x750b, 0x750c, 0x750e, 0x7510, 0x7512, 0x7514, 0x7515, 0x7516, 0x7517, 0x751b, 0x751d, 0x751e, 0x7520, 0x7521, 0x7522, 0x7523, 0x7524, 0x7526, 0x7527, 0x752a, 0x752e, 0x7534, 0x7536, 0x7539, 0x753c, 0x753d, 0x753f, 0x7541, 0x7542, 0x7543, 0x7544, 0x7546, 0x7547, 0x7549, 0x754a, 0x754d, 0x7550, 0x7551, 0x7552, 0x7553, 0x7555, 0x7556, 0x7557, 0x7558, 0xfffd, 0x755d, 0x755e, 0x755f, 0x7560, 0x7561, 0x7562, 0x7563, 0x7564, 0x7567, 0x7568, 0x7569, 0x756b, 0x756c, 0x756d, 0x756e, 0x756f, 0x7570, 0x7571, 0x7573, 0x7575, 0x7576, 0x7577, 0x757a, 0x757b, 0x757c, 0x757d, 0x757e, 0x7580, 0x7581, 0x7582, 0x7584, 0x7585 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ 96 ] = { 0x7588, 0x7589, 0x758a, 0x758c, 0x758d, 0x758e, 0x7590, 0x7593, 0x7595, 0x7598, 0x759b, 0x759c, 0x759e, 0x75a2, 0x75a6, 0x75a7, 0x75a8, 0x75a9, 0x75aa, 0x75ad, 0x75b6, 0x75b7, 0x75ba, 0x75bb, 0x75bf, 0x75c0, 0x75c1, 0x75c6, 0x75cb, 0x75cc, 0x75ce, 0x75cf, 0x75d0, 0x75d1, 0x75d3, 0x75d7, 0x75d9, 0x75da, 0x75dc, 0x75dd, 0x75df, 0x75e0, 0x75e1, 0x75e5, 0x75e9, 0x75ec, 0x75ed, 0x75ee, 0x75ef, 0x75f2, 0x75f3, 0x75f5, 0x75f6, 0x75f7, 0x75f8, 0x75fa, 0x75fb, 0x75fd, 0x75fe, 0x7602, 0x7604, 0x7606, 0x7607, 0xfffd, 0x7608, 0x7609, 0x760b, 0x760d, 0x760e, 0x760f, 0x7611, 0x7612, 0x7613, 0x7614, 0x7616, 0x761a, 0x761c, 0x761d, 0x761e, 0x7621, 0x7623, 0x7627, 0x7628, 0x762c, 0x762e, 0x762f, 0x7631, 0x7632, 0x7636, 0x7637, 0x7639, 0x763a, 0x763b, 0x763d, 0x7641, 0x7642 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ 192 ] = { 0x7645, 0x7646, 0x7647, 0x7648, 0x7649, 0x764a, 0x764b, 0x764e, 0x764f, 0x7650, 0x7651, 0x7652, 0x7653, 0x7655, 0x7657, 0x7658, 0x7659, 0x765a, 0x765b, 0x765d, 0x765f, 0x7660, 0x7661, 0x7662, 0x7664, 0x7665, 0x7666, 0x7667, 0x7668, 0x7669, 0x766a, 0x766c, 0x766d, 0x766e, 0x7670, 0x7671, 0x7672, 0x7673, 0x7674, 0x7675, 0x7676, 0x7677, 0x7679, 0x767a, 0x767c, 0x767f, 0x7680, 0x7681, 0x7683, 0x7685, 0x7689, 0x768a, 0x768c, 0x768d, 0x768f, 0x7690, 0x7692, 0x7694, 0x7695, 0x7697, 0x7698, 0x769a, 0x769b, 0xfffd, 0x769c, 0x769d, 0x769e, 0x769f, 0x76a0, 0x76a1, 0x76a2, 0x76a3, 0x76a5, 0x76a6, 0x76a7, 0x76a8, 0x76a9, 0x76aa, 0x76ab, 0x76ac, 0x76ad, 0x76af, 0x76b0, 0x76b3, 0x76b5, 0x76b6, 0x76b7, 0x76b8, 0x76b9, 0x76ba, 0x76bb, 0x76bc, 0x76bd, 0x76be, 0x76c0, 0x76c1, 0x76c3, 0x554a, 0x963f, 0x57c3, 0x6328, 0x54ce, 0x5509, 0x54c0, 0x7691, 0x764c, 0x853c, 0x77ee, 0x827e, 0x788d, 0x7231, 0x9698, 0x978d, 0x6c28, 0x5b89, 0x4ffa, 0x6309, 0x6697, 0x5cb8, 0x80fa, 0x6848, 0x80ae, 0x6602, 0x76ce, 0x51f9, 0x6556, 0x71ac, 0x7ff1, 0x8884, 0x50b2, 0x5965, 0x61ca, 0x6fb3, 0x82ad, 0x634c, 0x6252, 0x53ed, 0x5427, 0x7b06, 0x516b, 0x75a4, 0x5df4, 0x62d4, 0x8dcb, 0x9776, 0x628a, 0x8019, 0x575d, 0x9738, 0x7f62, 0x7238, 0x767d, 0x67cf, 0x767e, 0x6446, 0x4f70, 0x8d25, 0x62dc, 0x7a17, 0x6591, 0x73ed, 0x642c, 0x6273, 0x822c, 0x9881, 0x677f, 0x7248, 0x626e, 0x62cc, 0x4f34, 0x74e3, 0x534a, 0x529e, 0x7eca, 0x90a6, 0x5e2e, 0x6886, 0x699c, 0x8180, 0x7ed1, 0x68d2, 0x78c5, 0x868c, 0x9551, 0x508d, 0x8c24, 0x82de, 0x80de, 0x5305, 0x8912, 0x5265, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ 192 ] = { 0x76c4, 0x76c7, 0x76c9, 0x76cb, 0x76cc, 0x76d3, 0x76d5, 0x76d9, 0x76da, 0x76dc, 0x76dd, 0x76de, 0x76e0, 0x76e1, 0x76e2, 0x76e3, 0x76e4, 0x76e6, 0x76e7, 0x76e8, 0x76e9, 0x76ea, 0x76eb, 0x76ec, 0x76ed, 0x76f0, 0x76f3, 0x76f5, 0x76f6, 0x76f7, 0x76fa, 0x76fb, 0x76fd, 0x76ff, 0x7700, 0x7702, 0x7703, 0x7705, 0x7706, 0x770a, 0x770c, 0x770e, 0x770f, 0x7710, 0x7711, 0x7712, 0x7713, 0x7714, 0x7715, 0x7716, 0x7717, 0x7718, 0x771b, 0x771c, 0x771d, 0x771e, 0x7721, 0x7723, 0x7724, 0x7725, 0x7727, 0x772a, 0x772b, 0xfffd, 0x772c, 0x772e, 0x7730, 0x7731, 0x7732, 0x7733, 0x7734, 0x7739, 0x773b, 0x773d, 0x773e, 0x773f, 0x7742, 0x7744, 0x7745, 0x7746, 0x7748, 0x7749, 0x774a, 0x774b, 0x774c, 0x774d, 0x774e, 0x774f, 0x7752, 0x7753, 0x7754, 0x7755, 0x7756, 0x7757, 0x7758, 0x7759, 0x775c, 0x8584, 0x96f9, 0x4fdd, 0x5821, 0x9971, 0x5b9d, 0x62b1, 0x62a5, 0x66b4, 0x8c79, 0x9c8d, 0x7206, 0x676f, 0x7891, 0x60b2, 0x5351, 0x5317, 0x8f88, 0x80cc, 0x8d1d, 0x94a1, 0x500d, 0x72c8, 0x5907, 0x60eb, 0x7119, 0x88ab, 0x5954, 0x82ef, 0x672c, 0x7b28, 0x5d29, 0x7ef7, 0x752d, 0x6cf5, 0x8e66, 0x8ff8, 0x903c, 0x9f3b, 0x6bd4, 0x9119, 0x7b14, 0x5f7c, 0x78a7, 0x84d6, 0x853d, 0x6bd5, 0x6bd9, 0x6bd6, 0x5e01, 0x5e87, 0x75f9, 0x95ed, 0x655d, 0x5f0a, 0x5fc5, 0x8f9f, 0x58c1, 0x81c2, 0x907f, 0x965b, 0x97ad, 0x8fb9, 0x7f16, 0x8d2c, 0x6241, 0x4fbf, 0x53d8, 0x535e, 0x8fa8, 0x8fa9, 0x8fab, 0x904d, 0x6807, 0x5f6a, 0x8198, 0x8868, 0x9cd6, 0x618b, 0x522b, 0x762a, 0x5f6c, 0x658c, 0x6fd2, 0x6ee8, 0x5bbe, 0x6448, 0x5175, 0x51b0, 0x67c4, 0x4e19, 0x79c9, 0x997c, 0x70b3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ 192 ] = { 0x775d, 0x775e, 0x775f, 0x7760, 0x7764, 0x7767, 0x7769, 0x776a, 0x776d, 0x776e, 0x776f, 0x7770, 0x7771, 0x7772, 0x7773, 0x7774, 0x7775, 0x7776, 0x7777, 0x7778, 0x777a, 0x777b, 0x777c, 0x7781, 0x7782, 0x7783, 0x7786, 0x7787, 0x7788, 0x7789, 0x778a, 0x778b, 0x778f, 0x7790, 0x7793, 0x7794, 0x7795, 0x7796, 0x7797, 0x7798, 0x7799, 0x779a, 0x779b, 0x779c, 0x779d, 0x779e, 0x77a1, 0x77a3, 0x77a4, 0x77a6, 0x77a8, 0x77ab, 0x77ad, 0x77ae, 0x77af, 0x77b1, 0x77b2, 0x77b4, 0x77b6, 0x77b7, 0x77b8, 0x77b9, 0x77ba, 0xfffd, 0x77bc, 0x77be, 0x77c0, 0x77c1, 0x77c2, 0x77c3, 0x77c4, 0x77c5, 0x77c6, 0x77c7, 0x77c8, 0x77c9, 0x77ca, 0x77cb, 0x77cc, 0x77ce, 0x77cf, 0x77d0, 0x77d1, 0x77d2, 0x77d3, 0x77d4, 0x77d5, 0x77d6, 0x77d8, 0x77d9, 0x77da, 0x77dd, 0x77de, 0x77df, 0x77e0, 0x77e1, 0x77e4, 0x75c5, 0x5e76, 0x73bb, 0x83e0, 0x64ad, 0x62e8, 0x94b5, 0x6ce2, 0x535a, 0x52c3, 0x640f, 0x94c2, 0x7b94, 0x4f2f, 0x5e1b, 0x8236, 0x8116, 0x818a, 0x6e24, 0x6cca, 0x9a73, 0x6355, 0x535c, 0x54fa, 0x8865, 0x57e0, 0x4e0d, 0x5e03, 0x6b65, 0x7c3f, 0x90e8, 0x6016, 0x64e6, 0x731c, 0x88c1, 0x6750, 0x624d, 0x8d22, 0x776c, 0x8e29, 0x91c7, 0x5f69, 0x83dc, 0x8521, 0x9910, 0x53c2, 0x8695, 0x6b8b, 0x60ed, 0x60e8, 0x707f, 0x82cd, 0x8231, 0x4ed3, 0x6ca7, 0x85cf, 0x64cd, 0x7cd9, 0x69fd, 0x66f9, 0x8349, 0x5395, 0x7b56, 0x4fa7, 0x518c, 0x6d4b, 0x5c42, 0x8e6d, 0x63d2, 0x53c9, 0x832c, 0x8336, 0x67e5, 0x78b4, 0x643d, 0x5bdf, 0x5c94, 0x5dee, 0x8be7, 0x62c6, 0x67f4, 0x8c7a, 0x6400, 0x63ba, 0x8749, 0x998b, 0x8c17, 0x7f20, 0x94f2, 0x4ea7, 0x9610, 0x98a4, 0x660c, 0x7316, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ 192 ] = { 0x77e6, 0x77e8, 0x77ea, 0x77ef, 0x77f0, 0x77f1, 0x77f2, 0x77f4, 0x77f5, 0x77f7, 0x77f9, 0x77fa, 0x77fb, 0x77fc, 0x7803, 0x7804, 0x7805, 0x7806, 0x7807, 0x7808, 0x780a, 0x780b, 0x780e, 0x780f, 0x7810, 0x7813, 0x7815, 0x7819, 0x781b, 0x781e, 0x7820, 0x7821, 0x7822, 0x7824, 0x7828, 0x782a, 0x782b, 0x782e, 0x782f, 0x7831, 0x7832, 0x7833, 0x7835, 0x7836, 0x783d, 0x783f, 0x7841, 0x7842, 0x7843, 0x7844, 0x7846, 0x7848, 0x7849, 0x784a, 0x784b, 0x784d, 0x784f, 0x7851, 0x7853, 0x7854, 0x7858, 0x7859, 0x785a, 0xfffd, 0x785b, 0x785c, 0x785e, 0x785f, 0x7860, 0x7861, 0x7862, 0x7863, 0x7864, 0x7865, 0x7866, 0x7867, 0x7868, 0x7869, 0x786f, 0x7870, 0x7871, 0x7872, 0x7873, 0x7874, 0x7875, 0x7876, 0x7878, 0x7879, 0x787a, 0x787b, 0x787d, 0x787e, 0x787f, 0x7880, 0x7881, 0x7882, 0x7883, 0x573a, 0x5c1d, 0x5e38, 0x957f, 0x507f, 0x80a0, 0x5382, 0x655e, 0x7545, 0x5531, 0x5021, 0x8d85, 0x6284, 0x949e, 0x671d, 0x5632, 0x6f6e, 0x5de2, 0x5435, 0x7092, 0x8f66, 0x626f, 0x64a4, 0x63a3, 0x5f7b, 0x6f88, 0x90f4, 0x81e3, 0x8fb0, 0x5c18, 0x6668, 0x5ff1, 0x6c89, 0x9648, 0x8d81, 0x886c, 0x6491, 0x79f0, 0x57ce, 0x6a59, 0x6210, 0x5448, 0x4e58, 0x7a0b, 0x60e9, 0x6f84, 0x8bda, 0x627f, 0x901e, 0x9a8b, 0x79e4, 0x5403, 0x75f4, 0x6301, 0x5319, 0x6c60, 0x8fdf, 0x5f1b, 0x9a70, 0x803b, 0x9f7f, 0x4f88, 0x5c3a, 0x8d64, 0x7fc5, 0x65a5, 0x70bd, 0x5145, 0x51b2, 0x866b, 0x5d07, 0x5ba0, 0x62bd, 0x916c, 0x7574, 0x8e0c, 0x7a20, 0x6101, 0x7b79, 0x4ec7, 0x7ef8, 0x7785, 0x4e11, 0x81ed, 0x521d, 0x51fa, 0x6a71, 0x53a8, 0x8e87, 0x9504, 0x96cf, 0x6ec1, 0x9664, 0x695a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ 192 ] = { 0x7884, 0x7885, 0x7886, 0x7888, 0x788a, 0x788b, 0x788f, 0x7890, 0x7892, 0x7894, 0x7895, 0x7896, 0x7899, 0x789d, 0x789e, 0x78a0, 0x78a2, 0x78a4, 0x78a6, 0x78a8, 0x78a9, 0x78aa, 0x78ab, 0x78ac, 0x78ad, 0x78ae, 0x78af, 0x78b5, 0x78b6, 0x78b7, 0x78b8, 0x78ba, 0x78bb, 0x78bc, 0x78bd, 0x78bf, 0x78c0, 0x78c2, 0x78c3, 0x78c4, 0x78c6, 0x78c7, 0x78c8, 0x78cc, 0x78cd, 0x78ce, 0x78cf, 0x78d1, 0x78d2, 0x78d3, 0x78d6, 0x78d7, 0x78d8, 0x78da, 0x78db, 0x78dc, 0x78dd, 0x78de, 0x78df, 0x78e0, 0x78e1, 0x78e2, 0x78e3, 0xfffd, 0x78e4, 0x78e5, 0x78e6, 0x78e7, 0x78e9, 0x78ea, 0x78eb, 0x78ed, 0x78ee, 0x78ef, 0x78f0, 0x78f1, 0x78f3, 0x78f5, 0x78f6, 0x78f8, 0x78f9, 0x78fb, 0x78fc, 0x78fd, 0x78fe, 0x78ff, 0x7900, 0x7902, 0x7903, 0x7904, 0x7906, 0x7907, 0x7908, 0x7909, 0x790a, 0x790b, 0x790c, 0x7840, 0x50a8, 0x77d7, 0x6410, 0x89e6, 0x5904, 0x63e3, 0x5ddd, 0x7a7f, 0x693d, 0x4f20, 0x8239, 0x5598, 0x4e32, 0x75ae, 0x7a97, 0x5e62, 0x5e8a, 0x95ef, 0x521b, 0x5439, 0x708a, 0x6376, 0x9524, 0x5782, 0x6625, 0x693f, 0x9187, 0x5507, 0x6df3, 0x7eaf, 0x8822, 0x6233, 0x7ef0, 0x75b5, 0x8328, 0x78c1, 0x96cc, 0x8f9e, 0x6148, 0x74f7, 0x8bcd, 0x6b64, 0x523a, 0x8d50, 0x6b21, 0x806a, 0x8471, 0x56f1, 0x5306, 0x4ece, 0x4e1b, 0x51d1, 0x7c97, 0x918b, 0x7c07, 0x4fc3, 0x8e7f, 0x7be1, 0x7a9c, 0x6467, 0x5d14, 0x50ac, 0x8106, 0x7601, 0x7cb9, 0x6dec, 0x7fe0, 0x6751, 0x5b58, 0x5bf8, 0x78cb, 0x64ae, 0x6413, 0x63aa, 0x632b, 0x9519, 0x642d, 0x8fbe, 0x7b54, 0x7629, 0x6253, 0x5927, 0x5446, 0x6b79, 0x50a3, 0x6234, 0x5e26, 0x6b86, 0x4ee3, 0x8d37, 0x888b, 0x5f85, 0x902e, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ 192 ] = { 0x790d, 0x790e, 0x790f, 0x7910, 0x7911, 0x7912, 0x7914, 0x7915, 0x7916, 0x7917, 0x7918, 0x7919, 0x791a, 0x791b, 0x791c, 0x791d, 0x791f, 0x7920, 0x7921, 0x7922, 0x7923, 0x7925, 0x7926, 0x7927, 0x7928, 0x7929, 0x792a, 0x792b, 0x792c, 0x792d, 0x792e, 0x792f, 0x7930, 0x7931, 0x7932, 0x7933, 0x7935, 0x7936, 0x7937, 0x7938, 0x7939, 0x793d, 0x793f, 0x7942, 0x7943, 0x7944, 0x7945, 0x7947, 0x794a, 0x794b, 0x794c, 0x794d, 0x794e, 0x794f, 0x7950, 0x7951, 0x7952, 0x7954, 0x7955, 0x7958, 0x7959, 0x7961, 0x7963, 0xfffd, 0x7964, 0x7966, 0x7969, 0x796a, 0x796b, 0x796c, 0x796e, 0x7970, 0x7971, 0x7972, 0x7973, 0x7974, 0x7975, 0x7976, 0x7979, 0x797b, 0x797c, 0x797d, 0x797e, 0x797f, 0x7982, 0x7983, 0x7986, 0x7987, 0x7988, 0x7989, 0x798b, 0x798c, 0x798d, 0x798e, 0x7990, 0x7991, 0x7992, 0x6020, 0x803d, 0x62c5, 0x4e39, 0x5355, 0x90f8, 0x63b8, 0x80c6, 0x65e6, 0x6c2e, 0x4f46, 0x60ee, 0x6de1, 0x8bde, 0x5f39, 0x86cb, 0x5f53, 0x6321, 0x515a, 0x8361, 0x6863, 0x5200, 0x6363, 0x8e48, 0x5012, 0x5c9b, 0x7977, 0x5bfc, 0x5230, 0x7a3b, 0x60bc, 0x9053, 0x76d7, 0x5fb7, 0x5f97, 0x7684, 0x8e6c, 0x706f, 0x767b, 0x7b49, 0x77aa, 0x51f3, 0x9093, 0x5824, 0x4f4e, 0x6ef4, 0x8fea, 0x654c, 0x7b1b, 0x72c4, 0x6da4, 0x7fdf, 0x5ae1, 0x62b5, 0x5e95, 0x5730, 0x8482, 0x7b2c, 0x5e1d, 0x5f1f, 0x9012, 0x7f14, 0x98a0, 0x6382, 0x6ec7, 0x7898, 0x70b9, 0x5178, 0x975b, 0x57ab, 0x7535, 0x4f43, 0x7538, 0x5e97, 0x60e6, 0x5960, 0x6dc0, 0x6bbf, 0x7889, 0x53fc, 0x96d5, 0x51cb, 0x5201, 0x6389, 0x540a, 0x9493, 0x8c03, 0x8dcc, 0x7239, 0x789f, 0x8776, 0x8fed, 0x8c0d, 0x53e0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ 192 ] = { 0x7993, 0x7994, 0x7995, 0x7996, 0x7997, 0x7998, 0x7999, 0x799b, 0x799c, 0x799d, 0x799e, 0x799f, 0x79a0, 0x79a1, 0x79a2, 0x79a3, 0x79a4, 0x79a5, 0x79a6, 0x79a8, 0x79a9, 0x79aa, 0x79ab, 0x79ac, 0x79ad, 0x79ae, 0x79af, 0x79b0, 0x79b1, 0x79b2, 0x79b4, 0x79b5, 0x79b6, 0x79b7, 0x79b8, 0x79bc, 0x79bf, 0x79c2, 0x79c4, 0x79c5, 0x79c7, 0x79c8, 0x79ca, 0x79cc, 0x79ce, 0x79cf, 0x79d0, 0x79d3, 0x79d4, 0x79d6, 0x79d7, 0x79d9, 0x79da, 0x79db, 0x79dc, 0x79dd, 0x79de, 0x79e0, 0x79e1, 0x79e2, 0x79e5, 0x79e8, 0x79ea, 0xfffd, 0x79ec, 0x79ee, 0x79f1, 0x79f2, 0x79f3, 0x79f4, 0x79f5, 0x79f6, 0x79f7, 0x79f9, 0x79fa, 0x79fc, 0x79fe, 0x79ff, 0x7a01, 0x7a04, 0x7a05, 0x7a07, 0x7a08, 0x7a09, 0x7a0a, 0x7a0c, 0x7a0f, 0x7a10, 0x7a11, 0x7a12, 0x7a13, 0x7a15, 0x7a16, 0x7a18, 0x7a19, 0x7a1b, 0x7a1c, 0x4e01, 0x76ef, 0x53ee, 0x9489, 0x9876, 0x9f0e, 0x952d, 0x5b9a, 0x8ba2, 0x4e22, 0x4e1c, 0x51ac, 0x8463, 0x61c2, 0x52a8, 0x680b, 0x4f97, 0x606b, 0x51bb, 0x6d1e, 0x515c, 0x6296, 0x6597, 0x9661, 0x8c46, 0x9017, 0x75d8, 0x90fd, 0x7763, 0x6bd2, 0x728a, 0x72ec, 0x8bfb, 0x5835, 0x7779, 0x8d4c, 0x675c, 0x9540, 0x809a, 0x5ea6, 0x6e21, 0x5992, 0x7aef, 0x77ed, 0x953b, 0x6bb5, 0x65ad, 0x7f0e, 0x5806, 0x5151, 0x961f, 0x5bf9, 0x58a9, 0x5428, 0x8e72, 0x6566, 0x987f, 0x56e4, 0x949d, 0x76fe, 0x9041, 0x6387, 0x54c6, 0x591a, 0x593a, 0x579b, 0x8eb2, 0x6735, 0x8dfa, 0x8235, 0x5241, 0x60f0, 0x5815, 0x86fe, 0x5ce8, 0x9e45, 0x4fc4, 0x989d, 0x8bb9, 0x5a25, 0x6076, 0x5384, 0x627c, 0x904f, 0x9102, 0x997f, 0x6069, 0x800c, 0x513f, 0x8033, 0x5c14, 0x9975, 0x6d31, 0x4e8c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ 192 ] = { 0x7a1d, 0x7a1f, 0x7a21, 0x7a22, 0x7a24, 0x7a25, 0x7a26, 0x7a27, 0x7a28, 0x7a29, 0x7a2a, 0x7a2b, 0x7a2c, 0x7a2d, 0x7a2e, 0x7a2f, 0x7a30, 0x7a31, 0x7a32, 0x7a34, 0x7a35, 0x7a36, 0x7a38, 0x7a3a, 0x7a3e, 0x7a40, 0x7a41, 0x7a42, 0x7a43, 0x7a44, 0x7a45, 0x7a47, 0x7a48, 0x7a49, 0x7a4a, 0x7a4b, 0x7a4c, 0x7a4d, 0x7a4e, 0x7a4f, 0x7a50, 0x7a52, 0x7a53, 0x7a54, 0x7a55, 0x7a56, 0x7a58, 0x7a59, 0x7a5a, 0x7a5b, 0x7a5c, 0x7a5d, 0x7a5e, 0x7a5f, 0x7a60, 0x7a61, 0x7a62, 0x7a63, 0x7a64, 0x7a65, 0x7a66, 0x7a67, 0x7a68, 0xfffd, 0x7a69, 0x7a6a, 0x7a6b, 0x7a6c, 0x7a6d, 0x7a6e, 0x7a6f, 0x7a71, 0x7a72, 0x7a73, 0x7a75, 0x7a7b, 0x7a7c, 0x7a7d, 0x7a7e, 0x7a82, 0x7a85, 0x7a87, 0x7a89, 0x7a8a, 0x7a8b, 0x7a8c, 0x7a8e, 0x7a8f, 0x7a90, 0x7a93, 0x7a94, 0x7a99, 0x7a9a, 0x7a9b, 0x7a9e, 0x7aa1, 0x7aa2, 0x8d30, 0x53d1, 0x7f5a, 0x7b4f, 0x4f10, 0x4e4f, 0x9600, 0x6cd5, 0x73d0, 0x85e9, 0x5e06, 0x756a, 0x7ffb, 0x6a0a, 0x77fe, 0x9492, 0x7e41, 0x51e1, 0x70e6, 0x53cd, 0x8fd4, 0x8303, 0x8d29, 0x72af, 0x996d, 0x6cdb, 0x574a, 0x82b3, 0x65b9, 0x80aa, 0x623f, 0x9632, 0x59a8, 0x4eff, 0x8bbf, 0x7eba, 0x653e, 0x83f2, 0x975e, 0x5561, 0x98de, 0x80a5, 0x532a, 0x8bfd, 0x5420, 0x80ba, 0x5e9f, 0x6cb8, 0x8d39, 0x82ac, 0x915a, 0x5429, 0x6c1b, 0x5206, 0x7eb7, 0x575f, 0x711a, 0x6c7e, 0x7c89, 0x594b, 0x4efd, 0x5fff, 0x6124, 0x7caa, 0x4e30, 0x5c01, 0x67ab, 0x8702, 0x5cf0, 0x950b, 0x98ce, 0x75af, 0x70fd, 0x9022, 0x51af, 0x7f1d, 0x8bbd, 0x5949, 0x51e4, 0x4f5b, 0x5426, 0x592b, 0x6577, 0x80a4, 0x5b75, 0x6276, 0x62c2, 0x8f90, 0x5e45, 0x6c1f, 0x7b26, 0x4f0f, 0x4fd8, 0x670d, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ 192 ] = { 0x7aa3, 0x7aa4, 0x7aa7, 0x7aa9, 0x7aaa, 0x7aab, 0x7aae, 0x7aaf, 0x7ab0, 0x7ab1, 0x7ab2, 0x7ab4, 0x7ab5, 0x7ab6, 0x7ab7, 0x7ab8, 0x7ab9, 0x7aba, 0x7abb, 0x7abc, 0x7abd, 0x7abe, 0x7ac0, 0x7ac1, 0x7ac2, 0x7ac3, 0x7ac4, 0x7ac5, 0x7ac6, 0x7ac7, 0x7ac8, 0x7ac9, 0x7aca, 0x7acc, 0x7acd, 0x7ace, 0x7acf, 0x7ad0, 0x7ad1, 0x7ad2, 0x7ad3, 0x7ad4, 0x7ad5, 0x7ad7, 0x7ad8, 0x7ada, 0x7adb, 0x7adc, 0x7add, 0x7ae1, 0x7ae2, 0x7ae4, 0x7ae7, 0x7ae8, 0x7ae9, 0x7aea, 0x7aeb, 0x7aec, 0x7aee, 0x7af0, 0x7af1, 0x7af2, 0x7af3, 0xfffd, 0x7af4, 0x7af5, 0x7af6, 0x7af7, 0x7af8, 0x7afb, 0x7afc, 0x7afe, 0x7b00, 0x7b01, 0x7b02, 0x7b05, 0x7b07, 0x7b09, 0x7b0c, 0x7b0d, 0x7b0e, 0x7b10, 0x7b12, 0x7b13, 0x7b16, 0x7b17, 0x7b18, 0x7b1a, 0x7b1c, 0x7b1d, 0x7b1f, 0x7b21, 0x7b22, 0x7b23, 0x7b27, 0x7b29, 0x7b2d, 0x6d6e, 0x6daa, 0x798f, 0x88b1, 0x5f17, 0x752b, 0x629a, 0x8f85, 0x4fef, 0x91dc, 0x65a7, 0x812f, 0x8151, 0x5e9c, 0x8150, 0x8d74, 0x526f, 0x8986, 0x8d4b, 0x590d, 0x5085, 0x4ed8, 0x961c, 0x7236, 0x8179, 0x8d1f, 0x5bcc, 0x8ba3, 0x9644, 0x5987, 0x7f1a, 0x5490, 0x5676, 0x560e, 0x8be5, 0x6539, 0x6982, 0x9499, 0x76d6, 0x6e89, 0x5e72, 0x7518, 0x6746, 0x67d1, 0x7aff, 0x809d, 0x8d76, 0x611f, 0x79c6, 0x6562, 0x8d63, 0x5188, 0x521a, 0x94a2, 0x7f38, 0x809b, 0x7eb2, 0x5c97, 0x6e2f, 0x6760, 0x7bd9, 0x768b, 0x9ad8, 0x818f, 0x7f94, 0x7cd5, 0x641e, 0x9550, 0x7a3f, 0x544a, 0x54e5, 0x6b4c, 0x6401, 0x6208, 0x9e3d, 0x80f3, 0x7599, 0x5272, 0x9769, 0x845b, 0x683c, 0x86e4, 0x9601, 0x9694, 0x94ec, 0x4e2a, 0x5404, 0x7ed9, 0x6839, 0x8ddf, 0x8015, 0x66f4, 0x5e9a, 0x7fb9, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ 192 ] = { 0x7b2f, 0x7b30, 0x7b32, 0x7b34, 0x7b35, 0x7b36, 0x7b37, 0x7b39, 0x7b3b, 0x7b3d, 0x7b3f, 0x7b40, 0x7b41, 0x7b42, 0x7b43, 0x7b44, 0x7b46, 0x7b48, 0x7b4a, 0x7b4d, 0x7b4e, 0x7b53, 0x7b55, 0x7b57, 0x7b59, 0x7b5c, 0x7b5e, 0x7b5f, 0x7b61, 0x7b63, 0x7b64, 0x7b65, 0x7b66, 0x7b67, 0x7b68, 0x7b69, 0x7b6a, 0x7b6b, 0x7b6c, 0x7b6d, 0x7b6f, 0x7b70, 0x7b73, 0x7b74, 0x7b76, 0x7b78, 0x7b7a, 0x7b7c, 0x7b7d, 0x7b7f, 0x7b81, 0x7b82, 0x7b83, 0x7b84, 0x7b86, 0x7b87, 0x7b88, 0x7b89, 0x7b8a, 0x7b8b, 0x7b8c, 0x7b8e, 0x7b8f, 0xfffd, 0x7b91, 0x7b92, 0x7b93, 0x7b96, 0x7b98, 0x7b99, 0x7b9a, 0x7b9b, 0x7b9e, 0x7b9f, 0x7ba0, 0x7ba3, 0x7ba4, 0x7ba5, 0x7bae, 0x7baf, 0x7bb0, 0x7bb2, 0x7bb3, 0x7bb5, 0x7bb6, 0x7bb7, 0x7bb9, 0x7bba, 0x7bbb, 0x7bbc, 0x7bbd, 0x7bbe, 0x7bbf, 0x7bc0, 0x7bc2, 0x7bc3, 0x7bc4, 0x57c2, 0x803f, 0x6897, 0x5de5, 0x653b, 0x529f, 0x606d, 0x9f9a, 0x4f9b, 0x8eac, 0x516c, 0x5bab, 0x5f13, 0x5de9, 0x6c5e, 0x62f1, 0x8d21, 0x5171, 0x94a9, 0x52fe, 0x6c9f, 0x82df, 0x72d7, 0x57a2, 0x6784, 0x8d2d, 0x591f, 0x8f9c, 0x83c7, 0x5495, 0x7b8d, 0x4f30, 0x6cbd, 0x5b64, 0x59d1, 0x9f13, 0x53e4, 0x86ca, 0x9aa8, 0x8c37, 0x80a1, 0x6545, 0x987e, 0x56fa, 0x96c7, 0x522e, 0x74dc, 0x5250, 0x5be1, 0x6302, 0x8902, 0x4e56, 0x62d0, 0x602a, 0x68fa, 0x5173, 0x5b98, 0x51a0, 0x89c2, 0x7ba1, 0x9986, 0x7f50, 0x60ef, 0x704c, 0x8d2f, 0x5149, 0x5e7f, 0x901b, 0x7470, 0x89c4, 0x572d, 0x7845, 0x5f52, 0x9f9f, 0x95fa, 0x8f68, 0x9b3c, 0x8be1, 0x7678, 0x6842, 0x67dc, 0x8dea, 0x8d35, 0x523d, 0x8f8a, 0x6eda, 0x68cd, 0x9505, 0x90ed, 0x56fd, 0x679c, 0x88f9, 0x8fc7, 0x54c8, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ 192 ] = { 0x7bc5, 0x7bc8, 0x7bc9, 0x7bca, 0x7bcb, 0x7bcd, 0x7bce, 0x7bcf, 0x7bd0, 0x7bd2, 0x7bd4, 0x7bd5, 0x7bd6, 0x7bd7, 0x7bd8, 0x7bdb, 0x7bdc, 0x7bde, 0x7bdf, 0x7be0, 0x7be2, 0x7be3, 0x7be4, 0x7be7, 0x7be8, 0x7be9, 0x7beb, 0x7bec, 0x7bed, 0x7bef, 0x7bf0, 0x7bf2, 0x7bf3, 0x7bf4, 0x7bf5, 0x7bf6, 0x7bf8, 0x7bf9, 0x7bfa, 0x7bfb, 0x7bfd, 0x7bff, 0x7c00, 0x7c01, 0x7c02, 0x7c03, 0x7c04, 0x7c05, 0x7c06, 0x7c08, 0x7c09, 0x7c0a, 0x7c0d, 0x7c0e, 0x7c10, 0x7c11, 0x7c12, 0x7c13, 0x7c14, 0x7c15, 0x7c17, 0x7c18, 0x7c19, 0xfffd, 0x7c1a, 0x7c1b, 0x7c1c, 0x7c1d, 0x7c1e, 0x7c20, 0x7c21, 0x7c22, 0x7c23, 0x7c24, 0x7c25, 0x7c28, 0x7c29, 0x7c2b, 0x7c2c, 0x7c2d, 0x7c2e, 0x7c2f, 0x7c30, 0x7c31, 0x7c32, 0x7c33, 0x7c34, 0x7c35, 0x7c36, 0x7c37, 0x7c39, 0x7c3a, 0x7c3b, 0x7c3c, 0x7c3d, 0x7c3e, 0x7c42, 0x9ab8, 0x5b69, 0x6d77, 0x6c26, 0x4ea5, 0x5bb3, 0x9a87, 0x9163, 0x61a8, 0x90af, 0x97e9, 0x542b, 0x6db5, 0x5bd2, 0x51fd, 0x558a, 0x7f55, 0x7ff0, 0x64bc, 0x634d, 0x65f1, 0x61be, 0x608d, 0x710a, 0x6c57, 0x6c49, 0x592f, 0x676d, 0x822a, 0x58d5, 0x568e, 0x8c6a, 0x6beb, 0x90dd, 0x597d, 0x8017, 0x53f7, 0x6d69, 0x5475, 0x559d, 0x8377, 0x83cf, 0x6838, 0x79be, 0x548c, 0x4f55, 0x5408, 0x76d2, 0x8c89, 0x9602, 0x6cb3, 0x6db8, 0x8d6b, 0x8910, 0x9e64, 0x8d3a, 0x563f, 0x9ed1, 0x75d5, 0x5f88, 0x72e0, 0x6068, 0x54fc, 0x4ea8, 0x6a2a, 0x8861, 0x6052, 0x8f70, 0x54c4, 0x70d8, 0x8679, 0x9e3f, 0x6d2a, 0x5b8f, 0x5f18, 0x7ea2, 0x5589, 0x4faf, 0x7334, 0x543c, 0x539a, 0x5019, 0x540e, 0x547c, 0x4e4e, 0x5ffd, 0x745a, 0x58f6, 0x846b, 0x80e1, 0x8774, 0x72d0, 0x7cca, 0x6e56, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ 192 ] = { 0x7c43, 0x7c44, 0x7c45, 0x7c46, 0x7c47, 0x7c48, 0x7c49, 0x7c4a, 0x7c4b, 0x7c4c, 0x7c4e, 0x7c4f, 0x7c50, 0x7c51, 0x7c52, 0x7c53, 0x7c54, 0x7c55, 0x7c56, 0x7c57, 0x7c58, 0x7c59, 0x7c5a, 0x7c5b, 0x7c5c, 0x7c5d, 0x7c5e, 0x7c5f, 0x7c60, 0x7c61, 0x7c62, 0x7c63, 0x7c64, 0x7c65, 0x7c66, 0x7c67, 0x7c68, 0x7c69, 0x7c6a, 0x7c6b, 0x7c6c, 0x7c6d, 0x7c6e, 0x7c6f, 0x7c70, 0x7c71, 0x7c72, 0x7c75, 0x7c76, 0x7c77, 0x7c78, 0x7c79, 0x7c7a, 0x7c7e, 0x7c7f, 0x7c80, 0x7c81, 0x7c82, 0x7c83, 0x7c84, 0x7c85, 0x7c86, 0x7c87, 0xfffd, 0x7c88, 0x7c8a, 0x7c8b, 0x7c8c, 0x7c8d, 0x7c8e, 0x7c8f, 0x7c90, 0x7c93, 0x7c94, 0x7c96, 0x7c99, 0x7c9a, 0x7c9b, 0x7ca0, 0x7ca1, 0x7ca3, 0x7ca6, 0x7ca7, 0x7ca8, 0x7ca9, 0x7cab, 0x7cac, 0x7cad, 0x7caf, 0x7cb0, 0x7cb4, 0x7cb5, 0x7cb6, 0x7cb7, 0x7cb8, 0x7cba, 0x7cbb, 0x5f27, 0x864e, 0x552c, 0x62a4, 0x4e92, 0x6caa, 0x6237, 0x82b1, 0x54d7, 0x534e, 0x733e, 0x6ed1, 0x753b, 0x5212, 0x5316, 0x8bdd, 0x69d0, 0x5f8a, 0x6000, 0x6dee, 0x574f, 0x6b22, 0x73af, 0x6853, 0x8fd8, 0x7f13, 0x6362, 0x60a3, 0x5524, 0x75ea, 0x8c62, 0x7115, 0x6da3, 0x5ba6, 0x5e7b, 0x8352, 0x614c, 0x9ec4, 0x78fa, 0x8757, 0x7c27, 0x7687, 0x51f0, 0x60f6, 0x714c, 0x6643, 0x5e4c, 0x604d, 0x8c0e, 0x7070, 0x6325, 0x8f89, 0x5fbd, 0x6062, 0x86d4, 0x56de, 0x6bc1, 0x6094, 0x6167, 0x5349, 0x60e0, 0x6666, 0x8d3f, 0x79fd, 0x4f1a, 0x70e9, 0x6c47, 0x8bb3, 0x8bf2, 0x7ed8, 0x8364, 0x660f, 0x5a5a, 0x9b42, 0x6d51, 0x6df7, 0x8c41, 0x6d3b, 0x4f19, 0x706b, 0x83b7, 0x6216, 0x60d1, 0x970d, 0x8d27, 0x7978, 0x51fb, 0x573e, 0x57fa, 0x673a, 0x7578, 0x7a3d, 0x79ef, 0x7b95, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ 192 ] = { 0x7cbf, 0x7cc0, 0x7cc2, 0x7cc3, 0x7cc4, 0x7cc6, 0x7cc9, 0x7ccb, 0x7cce, 0x7ccf, 0x7cd0, 0x7cd1, 0x7cd2, 0x7cd3, 0x7cd4, 0x7cd8, 0x7cda, 0x7cdb, 0x7cdd, 0x7cde, 0x7ce1, 0x7ce2, 0x7ce3, 0x7ce4, 0x7ce5, 0x7ce6, 0x7ce7, 0x7ce9, 0x7cea, 0x7ceb, 0x7cec, 0x7ced, 0x7cee, 0x7cf0, 0x7cf1, 0x7cf2, 0x7cf3, 0x7cf4, 0x7cf5, 0x7cf6, 0x7cf7, 0x7cf9, 0x7cfa, 0x7cfc, 0x7cfd, 0x7cfe, 0x7cff, 0x7d00, 0x7d01, 0x7d02, 0x7d03, 0x7d04, 0x7d05, 0x7d06, 0x7d07, 0x7d08, 0x7d09, 0x7d0b, 0x7d0c, 0x7d0d, 0x7d0e, 0x7d0f, 0x7d10, 0xfffd, 0x7d11, 0x7d12, 0x7d13, 0x7d14, 0x7d15, 0x7d16, 0x7d17, 0x7d18, 0x7d19, 0x7d1a, 0x7d1b, 0x7d1c, 0x7d1d, 0x7d1e, 0x7d1f, 0x7d21, 0x7d23, 0x7d24, 0x7d25, 0x7d26, 0x7d28, 0x7d29, 0x7d2a, 0x7d2c, 0x7d2d, 0x7d2e, 0x7d30, 0x7d31, 0x7d32, 0x7d33, 0x7d34, 0x7d35, 0x7d36, 0x808c, 0x9965, 0x8ff9, 0x6fc0, 0x8ba5, 0x9e21, 0x59ec, 0x7ee9, 0x7f09, 0x5409, 0x6781, 0x68d8, 0x8f91, 0x7c4d, 0x96c6, 0x53ca, 0x6025, 0x75be, 0x6c72, 0x5373, 0x5ac9, 0x7ea7, 0x6324, 0x51e0, 0x810a, 0x5df1, 0x84df, 0x6280, 0x5180, 0x5b63, 0x4f0e, 0x796d, 0x5242, 0x60b8, 0x6d4e, 0x5bc4, 0x5bc2, 0x8ba1, 0x8bb0, 0x65e2, 0x5fcc, 0x9645, 0x5993, 0x7ee7, 0x7eaa, 0x5609, 0x67b7, 0x5939, 0x4f73, 0x5bb6, 0x52a0, 0x835a, 0x988a, 0x8d3e, 0x7532, 0x94be, 0x5047, 0x7a3c, 0x4ef7, 0x67b6, 0x9a7e, 0x5ac1, 0x6b7c, 0x76d1, 0x575a, 0x5c16, 0x7b3a, 0x95f4, 0x714e, 0x517c, 0x80a9, 0x8270, 0x5978, 0x7f04, 0x8327, 0x68c0, 0x67ec, 0x78b1, 0x7877, 0x62e3, 0x6361, 0x7b80, 0x4fed, 0x526a, 0x51cf, 0x8350, 0x69db, 0x9274, 0x8df5, 0x8d31, 0x89c1, 0x952e, 0x7bad, 0x4ef6, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ 192 ] = { 0x7d37, 0x7d38, 0x7d39, 0x7d3a, 0x7d3b, 0x7d3c, 0x7d3d, 0x7d3e, 0x7d3f, 0x7d40, 0x7d41, 0x7d42, 0x7d43, 0x7d44, 0x7d45, 0x7d46, 0x7d47, 0x7d48, 0x7d49, 0x7d4a, 0x7d4b, 0x7d4c, 0x7d4d, 0x7d4e, 0x7d4f, 0x7d50, 0x7d51, 0x7d52, 0x7d53, 0x7d54, 0x7d55, 0x7d56, 0x7d57, 0x7d58, 0x7d59, 0x7d5a, 0x7d5b, 0x7d5c, 0x7d5d, 0x7d5e, 0x7d5f, 0x7d60, 0x7d61, 0x7d62, 0x7d63, 0x7d64, 0x7d65, 0x7d66, 0x7d67, 0x7d68, 0x7d69, 0x7d6a, 0x7d6b, 0x7d6c, 0x7d6d, 0x7d6f, 0x7d70, 0x7d71, 0x7d72, 0x7d73, 0x7d74, 0x7d75, 0x7d76, 0xfffd, 0x7d78, 0x7d79, 0x7d7a, 0x7d7b, 0x7d7c, 0x7d7d, 0x7d7e, 0x7d7f, 0x7d80, 0x7d81, 0x7d82, 0x7d83, 0x7d84, 0x7d85, 0x7d86, 0x7d87, 0x7d88, 0x7d89, 0x7d8a, 0x7d8b, 0x7d8c, 0x7d8d, 0x7d8e, 0x7d8f, 0x7d90, 0x7d91, 0x7d92, 0x7d93, 0x7d94, 0x7d95, 0x7d96, 0x7d97, 0x7d98, 0x5065, 0x8230, 0x5251, 0x996f, 0x6e10, 0x6e85, 0x6da7, 0x5efa, 0x50f5, 0x59dc, 0x5c06, 0x6d46, 0x6c5f, 0x7586, 0x848b, 0x6868, 0x5956, 0x8bb2, 0x5320, 0x9171, 0x964d, 0x8549, 0x6912, 0x7901, 0x7126, 0x80f6, 0x4ea4, 0x90ca, 0x6d47, 0x9a84, 0x5a07, 0x56bc, 0x6405, 0x94f0, 0x77eb, 0x4fa5, 0x811a, 0x72e1, 0x89d2, 0x997a, 0x7f34, 0x7ede, 0x527f, 0x6559, 0x9175, 0x8f7f, 0x8f83, 0x53eb, 0x7a96, 0x63ed, 0x63a5, 0x7686, 0x79f8, 0x8857, 0x9636, 0x622a, 0x52ab, 0x8282, 0x6854, 0x6770, 0x6377, 0x776b, 0x7aed, 0x6d01, 0x7ed3, 0x89e3, 0x59d0, 0x6212, 0x85c9, 0x82a5, 0x754c, 0x501f, 0x4ecb, 0x75a5, 0x8beb, 0x5c4a, 0x5dfe, 0x7b4b, 0x65a4, 0x91d1, 0x4eca, 0x6d25, 0x895f, 0x7d27, 0x9526, 0x4ec5, 0x8c28, 0x8fdb, 0x9773, 0x664b, 0x7981, 0x8fd1, 0x70ec, 0x6d78, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ 192 ] = { 0x7d99, 0x7d9a, 0x7d9b, 0x7d9c, 0x7d9d, 0x7d9e, 0x7d9f, 0x7da0, 0x7da1, 0x7da2, 0x7da3, 0x7da4, 0x7da5, 0x7da7, 0x7da8, 0x7da9, 0x7daa, 0x7dab, 0x7dac, 0x7dad, 0x7daf, 0x7db0, 0x7db1, 0x7db2, 0x7db3, 0x7db4, 0x7db5, 0x7db6, 0x7db7, 0x7db8, 0x7db9, 0x7dba, 0x7dbb, 0x7dbc, 0x7dbd, 0x7dbe, 0x7dbf, 0x7dc0, 0x7dc1, 0x7dc2, 0x7dc3, 0x7dc4, 0x7dc5, 0x7dc6, 0x7dc7, 0x7dc8, 0x7dc9, 0x7dca, 0x7dcb, 0x7dcc, 0x7dcd, 0x7dce, 0x7dcf, 0x7dd0, 0x7dd1, 0x7dd2, 0x7dd3, 0x7dd4, 0x7dd5, 0x7dd6, 0x7dd7, 0x7dd8, 0x7dd9, 0xfffd, 0x7dda, 0x7ddb, 0x7ddc, 0x7ddd, 0x7dde, 0x7ddf, 0x7de0, 0x7de1, 0x7de2, 0x7de3, 0x7de4, 0x7de5, 0x7de6, 0x7de7, 0x7de8, 0x7de9, 0x7dea, 0x7deb, 0x7dec, 0x7ded, 0x7dee, 0x7def, 0x7df0, 0x7df1, 0x7df2, 0x7df3, 0x7df4, 0x7df5, 0x7df6, 0x7df7, 0x7df8, 0x7df9, 0x7dfa, 0x5c3d, 0x52b2, 0x8346, 0x5162, 0x830e, 0x775b, 0x6676, 0x9cb8, 0x4eac, 0x60ca, 0x7cbe, 0x7cb3, 0x7ecf, 0x4e95, 0x8b66, 0x666f, 0x9888, 0x9759, 0x5883, 0x656c, 0x955c, 0x5f84, 0x75c9, 0x9756, 0x7adf, 0x7ade, 0x51c0, 0x70af, 0x7a98, 0x63ea, 0x7a76, 0x7ea0, 0x7396, 0x97ed, 0x4e45, 0x7078, 0x4e5d, 0x9152, 0x53a9, 0x6551, 0x65e7, 0x81fc, 0x8205, 0x548e, 0x5c31, 0x759a, 0x97a0, 0x62d8, 0x72d9, 0x75bd, 0x5c45, 0x9a79, 0x83ca, 0x5c40, 0x5480, 0x77e9, 0x4e3e, 0x6cae, 0x805a, 0x62d2, 0x636e, 0x5de8, 0x5177, 0x8ddd, 0x8e1e, 0x952f, 0x4ff1, 0x53e5, 0x60e7, 0x70ac, 0x5267, 0x6350, 0x9e43, 0x5a1f, 0x5026, 0x7737, 0x5377, 0x7ee2, 0x6485, 0x652b, 0x6289, 0x6398, 0x5014, 0x7235, 0x89c9, 0x51b3, 0x8bc0, 0x7edd, 0x5747, 0x83cc, 0x94a7, 0x519b, 0x541b, 0x5cfb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ 192 ] = { 0x7dfb, 0x7dfc, 0x7dfd, 0x7dfe, 0x7dff, 0x7e00, 0x7e01, 0x7e02, 0x7e03, 0x7e04, 0x7e05, 0x7e06, 0x7e07, 0x7e08, 0x7e09, 0x7e0a, 0x7e0b, 0x7e0c, 0x7e0d, 0x7e0e, 0x7e0f, 0x7e10, 0x7e11, 0x7e12, 0x7e13, 0x7e14, 0x7e15, 0x7e16, 0x7e17, 0x7e18, 0x7e19, 0x7e1a, 0x7e1b, 0x7e1c, 0x7e1d, 0x7e1e, 0x7e1f, 0x7e20, 0x7e21, 0x7e22, 0x7e23, 0x7e24, 0x7e25, 0x7e26, 0x7e27, 0x7e28, 0x7e29, 0x7e2a, 0x7e2b, 0x7e2c, 0x7e2d, 0x7e2e, 0x7e2f, 0x7e30, 0x7e31, 0x7e32, 0x7e33, 0x7e34, 0x7e35, 0x7e36, 0x7e37, 0x7e38, 0x7e39, 0xfffd, 0x7e3a, 0x7e3c, 0x7e3d, 0x7e3e, 0x7e3f, 0x7e40, 0x7e42, 0x7e43, 0x7e44, 0x7e45, 0x7e46, 0x7e48, 0x7e49, 0x7e4a, 0x7e4b, 0x7e4c, 0x7e4d, 0x7e4e, 0x7e4f, 0x7e50, 0x7e51, 0x7e52, 0x7e53, 0x7e54, 0x7e55, 0x7e56, 0x7e57, 0x7e58, 0x7e59, 0x7e5a, 0x7e5b, 0x7e5c, 0x7e5d, 0x4fca, 0x7ae3, 0x6d5a, 0x90e1, 0x9a8f, 0x5580, 0x5496, 0x5361, 0x54af, 0x5f00, 0x63e9, 0x6977, 0x51ef, 0x6168, 0x520a, 0x582a, 0x52d8, 0x574e, 0x780d, 0x770b, 0x5eb7, 0x6177, 0x7ce0, 0x625b, 0x6297, 0x4ea2, 0x7095, 0x8003, 0x62f7, 0x70e4, 0x9760, 0x5777, 0x82db, 0x67ef, 0x68f5, 0x78d5, 0x9897, 0x79d1, 0x58f3, 0x54b3, 0x53ef, 0x6e34, 0x514b, 0x523b, 0x5ba2, 0x8bfe, 0x80af, 0x5543, 0x57a6, 0x6073, 0x5751, 0x542d, 0x7a7a, 0x6050, 0x5b54, 0x63a7, 0x62a0, 0x53e3, 0x6263, 0x5bc7, 0x67af, 0x54ed, 0x7a9f, 0x82e6, 0x9177, 0x5e93, 0x88e4, 0x5938, 0x57ae, 0x630e, 0x8de8, 0x80ef, 0x5757, 0x7b77, 0x4fa9, 0x5feb, 0x5bbd, 0x6b3e, 0x5321, 0x7b50, 0x72c2, 0x6846, 0x77ff, 0x7736, 0x65f7, 0x51b5, 0x4e8f, 0x76d4, 0x5cbf, 0x7aa5, 0x8475, 0x594e, 0x9b41, 0x5080, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ 192 ] = { 0x7e5e, 0x7e5f, 0x7e60, 0x7e61, 0x7e62, 0x7e63, 0x7e64, 0x7e65, 0x7e66, 0x7e67, 0x7e68, 0x7e69, 0x7e6a, 0x7e6b, 0x7e6c, 0x7e6d, 0x7e6e, 0x7e6f, 0x7e70, 0x7e71, 0x7e72, 0x7e73, 0x7e74, 0x7e75, 0x7e76, 0x7e77, 0x7e78, 0x7e79, 0x7e7a, 0x7e7b, 0x7e7c, 0x7e7d, 0x7e7e, 0x7e7f, 0x7e80, 0x7e81, 0x7e83, 0x7e84, 0x7e85, 0x7e86, 0x7e87, 0x7e88, 0x7e89, 0x7e8a, 0x7e8b, 0x7e8c, 0x7e8d, 0x7e8e, 0x7e8f, 0x7e90, 0x7e91, 0x7e92, 0x7e93, 0x7e94, 0x7e95, 0x7e96, 0x7e97, 0x7e98, 0x7e99, 0x7e9a, 0x7e9c, 0x7e9d, 0x7e9e, 0xfffd, 0x7eae, 0x7eb4, 0x7ebb, 0x7ebc, 0x7ed6, 0x7ee4, 0x7eec, 0x7ef9, 0x7f0a, 0x7f10, 0x7f1e, 0x7f37, 0x7f39, 0x7f3b, 0x7f3c, 0x7f3d, 0x7f3e, 0x7f3f, 0x7f40, 0x7f41, 0x7f43, 0x7f46, 0x7f47, 0x7f48, 0x7f49, 0x7f4a, 0x7f4b, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f4f, 0x7f52, 0x7f53, 0x9988, 0x6127, 0x6e83, 0x5764, 0x6606, 0x6346, 0x56f0, 0x62ec, 0x6269, 0x5ed3, 0x9614, 0x5783, 0x62c9, 0x5587, 0x8721, 0x814a, 0x8fa3, 0x5566, 0x83b1, 0x6765, 0x8d56, 0x84dd, 0x5a6a, 0x680f, 0x62e6, 0x7bee, 0x9611, 0x5170, 0x6f9c, 0x8c30, 0x63fd, 0x89c8, 0x61d2, 0x7f06, 0x70c2, 0x6ee5, 0x7405, 0x6994, 0x72fc, 0x5eca, 0x90ce, 0x6717, 0x6d6a, 0x635e, 0x52b3, 0x7262, 0x8001, 0x4f6c, 0x59e5, 0x916a, 0x70d9, 0x6d9d, 0x52d2, 0x4e50, 0x96f7, 0x956d, 0x857e, 0x78ca, 0x7d2f, 0x5121, 0x5792, 0x64c2, 0x808b, 0x7c7b, 0x6cea, 0x68f1, 0x695e, 0x51b7, 0x5398, 0x68a8, 0x7281, 0x9ece, 0x7bf1, 0x72f8, 0x79bb, 0x6f13, 0x7406, 0x674e, 0x91cc, 0x9ca4, 0x793c, 0x8389, 0x8354, 0x540f, 0x6817, 0x4e3d, 0x5389, 0x52b1, 0x783e, 0x5386, 0x5229, 0x5088, 0x4f8b, 0x4fd0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ 192 ] = { 0x7f56, 0x7f59, 0x7f5b, 0x7f5c, 0x7f5d, 0x7f5e, 0x7f60, 0x7f63, 0x7f64, 0x7f65, 0x7f66, 0x7f67, 0x7f6b, 0x7f6c, 0x7f6d, 0x7f6f, 0x7f70, 0x7f73, 0x7f75, 0x7f76, 0x7f77, 0x7f78, 0x7f7a, 0x7f7b, 0x7f7c, 0x7f7d, 0x7f7f, 0x7f80, 0x7f82, 0x7f83, 0x7f84, 0x7f85, 0x7f86, 0x7f87, 0x7f88, 0x7f89, 0x7f8b, 0x7f8d, 0x7f8f, 0x7f90, 0x7f91, 0x7f92, 0x7f93, 0x7f95, 0x7f96, 0x7f97, 0x7f98, 0x7f99, 0x7f9b, 0x7f9c, 0x7fa0, 0x7fa2, 0x7fa3, 0x7fa5, 0x7fa6, 0x7fa8, 0x7fa9, 0x7faa, 0x7fab, 0x7fac, 0x7fad, 0x7fae, 0x7fb1, 0xfffd, 0x7fb3, 0x7fb4, 0x7fb5, 0x7fb6, 0x7fb7, 0x7fba, 0x7fbb, 0x7fbe, 0x7fc0, 0x7fc2, 0x7fc3, 0x7fc4, 0x7fc6, 0x7fc7, 0x7fc8, 0x7fc9, 0x7fcb, 0x7fcd, 0x7fcf, 0x7fd0, 0x7fd1, 0x7fd2, 0x7fd3, 0x7fd6, 0x7fd7, 0x7fd9, 0x7fda, 0x7fdb, 0x7fdc, 0x7fdd, 0x7fde, 0x7fe2, 0x7fe3, 0x75e2, 0x7acb, 0x7c92, 0x6ca5, 0x96b6, 0x529b, 0x7483, 0x54e9, 0x4fe9, 0x8054, 0x83b2, 0x8fde, 0x9570, 0x5ec9, 0x601c, 0x6d9f, 0x5e18, 0x655b, 0x8138, 0x94fe, 0x604b, 0x70bc, 0x7ec3, 0x7cae, 0x51c9, 0x6881, 0x7cb1, 0x826f, 0x4e24, 0x8f86, 0x91cf, 0x667e, 0x4eae, 0x8c05, 0x64a9, 0x804a, 0x50da, 0x7597, 0x71ce, 0x5be5, 0x8fbd, 0x6f66, 0x4e86, 0x6482, 0x9563, 0x5ed6, 0x6599, 0x5217, 0x88c2, 0x70c8, 0x52a3, 0x730e, 0x7433, 0x6797, 0x78f7, 0x9716, 0x4e34, 0x90bb, 0x9cde, 0x6dcb, 0x51db, 0x8d41, 0x541d, 0x62ce, 0x73b2, 0x83f1, 0x96f6, 0x9f84, 0x94c3, 0x4f36, 0x7f9a, 0x51cc, 0x7075, 0x9675, 0x5cad, 0x9886, 0x53e6, 0x4ee4, 0x6e9c, 0x7409, 0x69b4, 0x786b, 0x998f, 0x7559, 0x5218, 0x7624, 0x6d41, 0x67f3, 0x516d, 0x9f99, 0x804b, 0x5499, 0x7b3c, 0x7abf, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ 192 ] = { 0x7fe4, 0x7fe7, 0x7fe8, 0x7fea, 0x7feb, 0x7fec, 0x7fed, 0x7fef, 0x7ff2, 0x7ff4, 0x7ff5, 0x7ff6, 0x7ff7, 0x7ff8, 0x7ff9, 0x7ffa, 0x7ffd, 0x7ffe, 0x7fff, 0x8002, 0x8007, 0x8008, 0x8009, 0x800a, 0x800e, 0x800f, 0x8011, 0x8013, 0x801a, 0x801b, 0x801d, 0x801e, 0x801f, 0x8021, 0x8023, 0x8024, 0x802b, 0x802c, 0x802d, 0x802e, 0x802f, 0x8030, 0x8032, 0x8034, 0x8039, 0x803a, 0x803c, 0x803e, 0x8040, 0x8041, 0x8044, 0x8045, 0x8047, 0x8048, 0x8049, 0x804e, 0x804f, 0x8050, 0x8051, 0x8053, 0x8055, 0x8056, 0x8057, 0xfffd, 0x8059, 0x805b, 0x805c, 0x805d, 0x805e, 0x805f, 0x8060, 0x8061, 0x8062, 0x8063, 0x8064, 0x8065, 0x8066, 0x8067, 0x8068, 0x806b, 0x806c, 0x806d, 0x806e, 0x806f, 0x8070, 0x8072, 0x8073, 0x8074, 0x8075, 0x8076, 0x8077, 0x8078, 0x8079, 0x807a, 0x807b, 0x807c, 0x807d, 0x9686, 0x5784, 0x62e2, 0x9647, 0x697c, 0x5a04, 0x6402, 0x7bd3, 0x6f0f, 0x964b, 0x82a6, 0x5362, 0x9885, 0x5e90, 0x7089, 0x63b3, 0x5364, 0x864f, 0x9c81, 0x9e93, 0x788c, 0x9732, 0x8def, 0x8d42, 0x9e7f, 0x6f5e, 0x7984, 0x5f55, 0x9646, 0x622e, 0x9a74, 0x5415, 0x94dd, 0x4fa3, 0x65c5, 0x5c65, 0x5c61, 0x7f15, 0x8651, 0x6c2f, 0x5f8b, 0x7387, 0x6ee4, 0x7eff, 0x5ce6, 0x631b, 0x5b6a, 0x6ee6, 0x5375, 0x4e71, 0x63a0, 0x7565, 0x62a1, 0x8f6e, 0x4f26, 0x4ed1, 0x6ca6, 0x7eb6, 0x8bba, 0x841d, 0x87ba, 0x7f57, 0x903b, 0x9523, 0x7ba9, 0x9aa1, 0x88f8, 0x843d, 0x6d1b, 0x9a86, 0x7edc, 0x5988, 0x9ebb, 0x739b, 0x7801, 0x8682, 0x9a6c, 0x9a82, 0x561b, 0x5417, 0x57cb, 0x4e70, 0x9ea6, 0x5356, 0x8fc8, 0x8109, 0x7792, 0x9992, 0x86ee, 0x6ee1, 0x8513, 0x66fc, 0x6162, 0x6f2b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ 192 ] = { 0x807e, 0x8081, 0x8082, 0x8085, 0x8088, 0x808a, 0x808d, 0x808e, 0x808f, 0x8090, 0x8091, 0x8092, 0x8094, 0x8095, 0x8097, 0x8099, 0x809e, 0x80a3, 0x80a6, 0x80a7, 0x80a8, 0x80ac, 0x80b0, 0x80b3, 0x80b5, 0x80b6, 0x80b8, 0x80b9, 0x80bb, 0x80c5, 0x80c7, 0x80c8, 0x80c9, 0x80ca, 0x80cb, 0x80cf, 0x80d0, 0x80d1, 0x80d2, 0x80d3, 0x80d4, 0x80d5, 0x80d8, 0x80df, 0x80e0, 0x80e2, 0x80e3, 0x80e6, 0x80ee, 0x80f5, 0x80f7, 0x80f9, 0x80fb, 0x80fe, 0x80ff, 0x8100, 0x8101, 0x8103, 0x8104, 0x8105, 0x8107, 0x8108, 0x810b, 0xfffd, 0x810c, 0x8115, 0x8117, 0x8119, 0x811b, 0x811c, 0x811d, 0x811f, 0x8120, 0x8121, 0x8122, 0x8123, 0x8124, 0x8125, 0x8126, 0x8127, 0x8128, 0x8129, 0x812a, 0x812b, 0x812d, 0x812e, 0x8130, 0x8133, 0x8134, 0x8135, 0x8137, 0x8139, 0x813a, 0x813b, 0x813c, 0x813d, 0x813f, 0x8c29, 0x8292, 0x832b, 0x76f2, 0x6c13, 0x5fd9, 0x83bd, 0x732b, 0x8305, 0x951a, 0x6bdb, 0x77db, 0x94c6, 0x536f, 0x8302, 0x5192, 0x5e3d, 0x8c8c, 0x8d38, 0x4e48, 0x73ab, 0x679a, 0x6885, 0x9176, 0x9709, 0x7164, 0x6ca1, 0x7709, 0x5a92, 0x9541, 0x6bcf, 0x7f8e, 0x6627, 0x5bd0, 0x59b9, 0x5a9a, 0x95e8, 0x95f7, 0x4eec, 0x840c, 0x8499, 0x6aac, 0x76df, 0x9530, 0x731b, 0x68a6, 0x5b5f, 0x772f, 0x919a, 0x9761, 0x7cdc, 0x8ff7, 0x8c1c, 0x5f25, 0x7c73, 0x79d8, 0x89c5, 0x6ccc, 0x871c, 0x5bc6, 0x5e42, 0x68c9, 0x7720, 0x7ef5, 0x5195, 0x514d, 0x52c9, 0x5a29, 0x7f05, 0x9762, 0x82d7, 0x63cf, 0x7784, 0x85d0, 0x79d2, 0x6e3a, 0x5e99, 0x5999, 0x8511, 0x706d, 0x6c11, 0x62bf, 0x76bf, 0x654f, 0x60af, 0x95fd, 0x660e, 0x879f, 0x9e23, 0x94ed, 0x540d, 0x547d, 0x8c2c, 0x6478, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ 192 ] = { 0x8140, 0x8141, 0x8142, 0x8143, 0x8144, 0x8145, 0x8147, 0x8149, 0x814d, 0x814e, 0x814f, 0x8152, 0x8156, 0x8157, 0x8158, 0x815b, 0x815c, 0x815d, 0x815e, 0x815f, 0x8161, 0x8162, 0x8163, 0x8164, 0x8166, 0x8168, 0x816a, 0x816b, 0x816c, 0x816f, 0x8172, 0x8173, 0x8175, 0x8176, 0x8177, 0x8178, 0x8181, 0x8183, 0x8184, 0x8185, 0x8186, 0x8187, 0x8189, 0x818b, 0x818c, 0x818d, 0x818e, 0x8190, 0x8192, 0x8193, 0x8194, 0x8195, 0x8196, 0x8197, 0x8199, 0x819a, 0x819e, 0x819f, 0x81a0, 0x81a1, 0x81a2, 0x81a4, 0x81a5, 0xfffd, 0x81a7, 0x81a9, 0x81ab, 0x81ac, 0x81ad, 0x81ae, 0x81af, 0x81b0, 0x81b1, 0x81b2, 0x81b4, 0x81b5, 0x81b6, 0x81b7, 0x81b8, 0x81b9, 0x81bc, 0x81bd, 0x81be, 0x81bf, 0x81c4, 0x81c5, 0x81c7, 0x81c8, 0x81c9, 0x81cb, 0x81cd, 0x81ce, 0x81cf, 0x81d0, 0x81d1, 0x81d2, 0x81d3, 0x6479, 0x8611, 0x6a21, 0x819c, 0x78e8, 0x6469, 0x9b54, 0x62b9, 0x672b, 0x83ab, 0x58a8, 0x9ed8, 0x6cab, 0x6f20, 0x5bde, 0x964c, 0x8c0b, 0x725f, 0x67d0, 0x62c7, 0x7261, 0x4ea9, 0x59c6, 0x6bcd, 0x5893, 0x66ae, 0x5e55, 0x52df, 0x6155, 0x6728, 0x76ee, 0x7766, 0x7267, 0x7a46, 0x62ff, 0x54ea, 0x5450, 0x94a0, 0x90a3, 0x5a1c, 0x7eb3, 0x6c16, 0x4e43, 0x5976, 0x8010, 0x5948, 0x5357, 0x7537, 0x96be, 0x56ca, 0x6320, 0x8111, 0x607c, 0x95f9, 0x6dd6, 0x5462, 0x9981, 0x5185, 0x5ae9, 0x80fd, 0x59ae, 0x9713, 0x502a, 0x6ce5, 0x5c3c, 0x62df, 0x4f60, 0x533f, 0x817b, 0x9006, 0x6eba, 0x852b, 0x62c8, 0x5e74, 0x78be, 0x64b5, 0x637b, 0x5ff5, 0x5a18, 0x917f, 0x9e1f, 0x5c3f, 0x634f, 0x8042, 0x5b7d, 0x556e, 0x954a, 0x954d, 0x6d85, 0x60a8, 0x67e0, 0x72de, 0x51dd, 0x5b81, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ 192 ] = { 0x81d4, 0x81d5, 0x81d6, 0x81d7, 0x81d8, 0x81d9, 0x81da, 0x81db, 0x81dc, 0x81dd, 0x81de, 0x81df, 0x81e0, 0x81e1, 0x81e2, 0x81e4, 0x81e5, 0x81e6, 0x81e8, 0x81e9, 0x81eb, 0x81ee, 0x81ef, 0x81f0, 0x81f1, 0x81f2, 0x81f5, 0x81f6, 0x81f7, 0x81f8, 0x81f9, 0x81fa, 0x81fd, 0x81ff, 0x8203, 0x8207, 0x8208, 0x8209, 0x820a, 0x820b, 0x820e, 0x820f, 0x8211, 0x8213, 0x8215, 0x8216, 0x8217, 0x8218, 0x8219, 0x821a, 0x821d, 0x8220, 0x8224, 0x8225, 0x8226, 0x8227, 0x8229, 0x822e, 0x8232, 0x823a, 0x823c, 0x823d, 0x823f, 0xfffd, 0x8240, 0x8241, 0x8242, 0x8243, 0x8245, 0x8246, 0x8248, 0x824a, 0x824c, 0x824d, 0x824e, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256, 0x8257, 0x8259, 0x825b, 0x825c, 0x825d, 0x825e, 0x8260, 0x8261, 0x8262, 0x8263, 0x8264, 0x8265, 0x8266, 0x8267, 0x8269, 0x62e7, 0x6cde, 0x725b, 0x626d, 0x94ae, 0x7ebd, 0x8113, 0x6d53, 0x519c, 0x5f04, 0x5974, 0x52aa, 0x6012, 0x5973, 0x6696, 0x8650, 0x759f, 0x632a, 0x61e6, 0x7cef, 0x8bfa, 0x54e6, 0x6b27, 0x9e25, 0x6bb4, 0x85d5, 0x5455, 0x5076, 0x6ca4, 0x556a, 0x8db4, 0x722c, 0x5e15, 0x6015, 0x7436, 0x62cd, 0x6392, 0x724c, 0x5f98, 0x6e43, 0x6d3e, 0x6500, 0x6f58, 0x76d8, 0x78d0, 0x76fc, 0x7554, 0x5224, 0x53db, 0x4e53, 0x5e9e, 0x65c1, 0x802a, 0x80d6, 0x629b, 0x5486, 0x5228, 0x70ae, 0x888d, 0x8dd1, 0x6ce1, 0x5478, 0x80da, 0x57f9, 0x88f4, 0x8d54, 0x966a, 0x914d, 0x4f69, 0x6c9b, 0x55b7, 0x76c6, 0x7830, 0x62a8, 0x70f9, 0x6f8e, 0x5f6d, 0x84ec, 0x68da, 0x787c, 0x7bf7, 0x81a8, 0x670b, 0x9e4f, 0x6367, 0x78b0, 0x576f, 0x7812, 0x9739, 0x6279, 0x62ab, 0x5288, 0x7435, 0x6bd7, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ 192 ] = { 0x826a, 0x826b, 0x826c, 0x826d, 0x8271, 0x8275, 0x8276, 0x8277, 0x8278, 0x827b, 0x827c, 0x8280, 0x8281, 0x8283, 0x8285, 0x8286, 0x8287, 0x8289, 0x828c, 0x8290, 0x8293, 0x8294, 0x8295, 0x8296, 0x829a, 0x829b, 0x829e, 0x82a0, 0x82a2, 0x82a3, 0x82a7, 0x82b2, 0x82b5, 0x82b6, 0x82ba, 0x82bb, 0x82bc, 0x82bf, 0x82c0, 0x82c2, 0x82c3, 0x82c5, 0x82c6, 0x82c9, 0x82d0, 0x82d6, 0x82d9, 0x82da, 0x82dd, 0x82e2, 0x82e7, 0x82e8, 0x82e9, 0x82ea, 0x82ec, 0x82ed, 0x82ee, 0x82f0, 0x82f2, 0x82f3, 0x82f5, 0x82f6, 0x82f8, 0xfffd, 0x82fa, 0x82fc, 0x82fd, 0x82fe, 0x82ff, 0x8300, 0x830a, 0x830b, 0x830d, 0x8310, 0x8312, 0x8313, 0x8316, 0x8318, 0x8319, 0x831d, 0x831e, 0x831f, 0x8320, 0x8321, 0x8322, 0x8323, 0x8324, 0x8325, 0x8326, 0x8329, 0x832a, 0x832e, 0x8330, 0x8332, 0x8337, 0x833b, 0x833d, 0x5564, 0x813e, 0x75b2, 0x76ae, 0x5339, 0x75de, 0x50fb, 0x5c41, 0x8b6c, 0x7bc7, 0x504f, 0x7247, 0x9a97, 0x98d8, 0x6f02, 0x74e2, 0x7968, 0x6487, 0x77a5, 0x62fc, 0x9891, 0x8d2b, 0x54c1, 0x8058, 0x4e52, 0x576a, 0x82f9, 0x840d, 0x5e73, 0x51ed, 0x74f6, 0x8bc4, 0x5c4f, 0x5761, 0x6cfc, 0x9887, 0x5a46, 0x7834, 0x9b44, 0x8feb, 0x7c95, 0x5256, 0x6251, 0x94fa, 0x4ec6, 0x8386, 0x8461, 0x83e9, 0x84b2, 0x57d4, 0x6734, 0x5703, 0x666e, 0x6d66, 0x8c31, 0x66dd, 0x7011, 0x671f, 0x6b3a, 0x6816, 0x621a, 0x59bb, 0x4e03, 0x51c4, 0x6f06, 0x67d2, 0x6c8f, 0x5176, 0x68cb, 0x5947, 0x6b67, 0x7566, 0x5d0e, 0x8110, 0x9f50, 0x65d7, 0x7948, 0x7941, 0x9a91, 0x8d77, 0x5c82, 0x4e5e, 0x4f01, 0x542f, 0x5951, 0x780c, 0x5668, 0x6c14, 0x8fc4, 0x5f03, 0x6c7d, 0x6ce3, 0x8bab, 0x6390, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ 192 ] = { 0x833e, 0x833f, 0x8341, 0x8342, 0x8344, 0x8345, 0x8348, 0x834a, 0x834b, 0x834c, 0x834d, 0x834e, 0x8353, 0x8355, 0x8356, 0x8357, 0x8358, 0x8359, 0x835d, 0x8362, 0x8370, 0x8371, 0x8372, 0x8373, 0x8374, 0x8375, 0x8376, 0x8379, 0x837a, 0x837e, 0x837f, 0x8380, 0x8381, 0x8382, 0x8383, 0x8384, 0x8387, 0x8388, 0x838a, 0x838b, 0x838c, 0x838d, 0x838f, 0x8390, 0x8391, 0x8394, 0x8395, 0x8396, 0x8397, 0x8399, 0x839a, 0x839d, 0x839f, 0x83a1, 0x83a2, 0x83a3, 0x83a4, 0x83a5, 0x83a6, 0x83a7, 0x83ac, 0x83ad, 0x83ae, 0xfffd, 0x83af, 0x83b5, 0x83bb, 0x83be, 0x83bf, 0x83c2, 0x83c3, 0x83c4, 0x83c6, 0x83c8, 0x83c9, 0x83cb, 0x83cd, 0x83ce, 0x83d0, 0x83d1, 0x83d2, 0x83d3, 0x83d5, 0x83d7, 0x83d9, 0x83da, 0x83db, 0x83de, 0x83e2, 0x83e3, 0x83e4, 0x83e6, 0x83e7, 0x83e8, 0x83eb, 0x83ec, 0x83ed, 0x6070, 0x6d3d, 0x7275, 0x6266, 0x948e, 0x94c5, 0x5343, 0x8fc1, 0x7b7e, 0x4edf, 0x8c26, 0x4e7e, 0x9ed4, 0x94b1, 0x94b3, 0x524d, 0x6f5c, 0x9063, 0x6d45, 0x8c34, 0x5811, 0x5d4c, 0x6b20, 0x6b49, 0x67aa, 0x545b, 0x8154, 0x7f8c, 0x5899, 0x8537, 0x5f3a, 0x62a2, 0x6a47, 0x9539, 0x6572, 0x6084, 0x6865, 0x77a7, 0x4e54, 0x4fa8, 0x5de7, 0x9798, 0x64ac, 0x7fd8, 0x5ced, 0x4fcf, 0x7a8d, 0x5207, 0x8304, 0x4e14, 0x602f, 0x7a83, 0x94a6, 0x4fb5, 0x4eb2, 0x79e6, 0x7434, 0x52e4, 0x82b9, 0x64d2, 0x79bd, 0x5bdd, 0x6c81, 0x9752, 0x8f7b, 0x6c22, 0x503e, 0x537f, 0x6e05, 0x64ce, 0x6674, 0x6c30, 0x60c5, 0x9877, 0x8bf7, 0x5e86, 0x743c, 0x7a77, 0x79cb, 0x4e18, 0x90b1, 0x7403, 0x6c42, 0x56da, 0x914b, 0x6cc5, 0x8d8b, 0x533a, 0x86c6, 0x66f2, 0x8eaf, 0x5c48, 0x9a71, 0x6e20, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ 192 ] = { 0x83ee, 0x83ef, 0x83f3, 0x83f4, 0x83f5, 0x83f6, 0x83f7, 0x83fa, 0x83fb, 0x83fc, 0x83fe, 0x83ff, 0x8400, 0x8402, 0x8405, 0x8407, 0x8408, 0x8409, 0x840a, 0x8410, 0x8412, 0x8413, 0x8414, 0x8415, 0x8416, 0x8417, 0x8419, 0x841a, 0x841b, 0x841e, 0x841f, 0x8420, 0x8421, 0x8422, 0x8423, 0x8429, 0x842a, 0x842b, 0x842c, 0x842d, 0x842e, 0x842f, 0x8430, 0x8432, 0x8433, 0x8434, 0x8435, 0x8436, 0x8437, 0x8439, 0x843a, 0x843b, 0x843e, 0x843f, 0x8440, 0x8441, 0x8442, 0x8443, 0x8444, 0x8445, 0x8447, 0x8448, 0x8449, 0xfffd, 0x844a, 0x844b, 0x844c, 0x844d, 0x844e, 0x844f, 0x8450, 0x8452, 0x8453, 0x8454, 0x8455, 0x8456, 0x8458, 0x845d, 0x845e, 0x845f, 0x8460, 0x8462, 0x8464, 0x8465, 0x8466, 0x8467, 0x8468, 0x846a, 0x846e, 0x846f, 0x8470, 0x8472, 0x8474, 0x8477, 0x8479, 0x847b, 0x847c, 0x53d6, 0x5a36, 0x9f8b, 0x8da3, 0x53bb, 0x5708, 0x98a7, 0x6743, 0x919b, 0x6cc9, 0x5168, 0x75ca, 0x62f3, 0x72ac, 0x5238, 0x529d, 0x7f3a, 0x7094, 0x7638, 0x5374, 0x9e4a, 0x69b7, 0x786e, 0x96c0, 0x88d9, 0x7fa4, 0x7136, 0x71c3, 0x5189, 0x67d3, 0x74e4, 0x58e4, 0x6518, 0x56b7, 0x8ba9, 0x9976, 0x6270, 0x7ed5, 0x60f9, 0x70ed, 0x58ec, 0x4ec1, 0x4eba, 0x5fcd, 0x97e7, 0x4efb, 0x8ba4, 0x5203, 0x598a, 0x7eab, 0x6254, 0x4ecd, 0x65e5, 0x620e, 0x8338, 0x84c9, 0x8363, 0x878d, 0x7194, 0x6eb6, 0x5bb9, 0x7ed2, 0x5197, 0x63c9, 0x67d4, 0x8089, 0x8339, 0x8815, 0x5112, 0x5b7a, 0x5982, 0x8fb1, 0x4e73, 0x6c5d, 0x5165, 0x8925, 0x8f6f, 0x962e, 0x854a, 0x745e, 0x9510, 0x95f0, 0x6da6, 0x82e5, 0x5f31, 0x6492, 0x6d12, 0x8428, 0x816e, 0x9cc3, 0x585e, 0x8d5b, 0x4e09, 0x53c1, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ 192 ] = { 0x847d, 0x847e, 0x847f, 0x8480, 0x8481, 0x8483, 0x8484, 0x8485, 0x8486, 0x848a, 0x848d, 0x848f, 0x8490, 0x8491, 0x8492, 0x8493, 0x8494, 0x8495, 0x8496, 0x8498, 0x849a, 0x849b, 0x849d, 0x849e, 0x849f, 0x84a0, 0x84a2, 0x84a3, 0x84a4, 0x84a5, 0x84a6, 0x84a7, 0x84a8, 0x84a9, 0x84aa, 0x84ab, 0x84ac, 0x84ad, 0x84ae, 0x84b0, 0x84b1, 0x84b3, 0x84b5, 0x84b6, 0x84b7, 0x84bb, 0x84bc, 0x84be, 0x84c0, 0x84c2, 0x84c3, 0x84c5, 0x84c6, 0x84c7, 0x84c8, 0x84cb, 0x84cc, 0x84ce, 0x84cf, 0x84d2, 0x84d4, 0x84d5, 0x84d7, 0xfffd, 0x84d8, 0x84d9, 0x84da, 0x84db, 0x84dc, 0x84de, 0x84e1, 0x84e2, 0x84e4, 0x84e7, 0x84e8, 0x84e9, 0x84ea, 0x84eb, 0x84ed, 0x84ee, 0x84ef, 0x84f1, 0x84f2, 0x84f3, 0x84f4, 0x84f5, 0x84f6, 0x84f7, 0x84f8, 0x84f9, 0x84fa, 0x84fb, 0x84fd, 0x84fe, 0x8500, 0x8501, 0x8502, 0x4f1e, 0x6563, 0x6851, 0x55d3, 0x4e27, 0x6414, 0x9a9a, 0x626b, 0x5ac2, 0x745f, 0x8272, 0x6da9, 0x68ee, 0x50e7, 0x838e, 0x7802, 0x6740, 0x5239, 0x6c99, 0x7eb1, 0x50bb, 0x5565, 0x715e, 0x7b5b, 0x6652, 0x73ca, 0x82eb, 0x6749, 0x5c71, 0x5220, 0x717d, 0x886b, 0x95ea, 0x9655, 0x64c5, 0x8d61, 0x81b3, 0x5584, 0x6c55, 0x6247, 0x7f2e, 0x5892, 0x4f24, 0x5546, 0x8d4f, 0x664c, 0x4e0a, 0x5c1a, 0x88f3, 0x68a2, 0x634e, 0x7a0d, 0x70e7, 0x828d, 0x52fa, 0x97f6, 0x5c11, 0x54e8, 0x90b5, 0x7ecd, 0x5962, 0x8d4a, 0x86c7, 0x820c, 0x820d, 0x8d66, 0x6444, 0x5c04, 0x6151, 0x6d89, 0x793e, 0x8bbe, 0x7837, 0x7533, 0x547b, 0x4f38, 0x8eab, 0x6df1, 0x5a20, 0x7ec5, 0x795e, 0x6c88, 0x5ba1, 0x5a76, 0x751a, 0x80be, 0x614e, 0x6e17, 0x58f0, 0x751f, 0x7525, 0x7272, 0x5347, 0x7ef3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ 192 ] = { 0x8503, 0x8504, 0x8505, 0x8506, 0x8507, 0x8508, 0x8509, 0x850a, 0x850b, 0x850d, 0x850e, 0x850f, 0x8510, 0x8512, 0x8514, 0x8515, 0x8516, 0x8518, 0x8519, 0x851b, 0x851c, 0x851d, 0x851e, 0x8520, 0x8522, 0x8523, 0x8524, 0x8525, 0x8526, 0x8527, 0x8528, 0x8529, 0x852a, 0x852d, 0x852e, 0x852f, 0x8530, 0x8531, 0x8532, 0x8533, 0x8534, 0x8535, 0x8536, 0x853e, 0x853f, 0x8540, 0x8541, 0x8542, 0x8544, 0x8545, 0x8546, 0x8547, 0x854b, 0x854c, 0x854d, 0x854e, 0x854f, 0x8550, 0x8551, 0x8552, 0x8553, 0x8554, 0x8555, 0xfffd, 0x8557, 0x8558, 0x855a, 0x855b, 0x855c, 0x855d, 0x855f, 0x8560, 0x8561, 0x8562, 0x8563, 0x8565, 0x8566, 0x8567, 0x8569, 0x856a, 0x856b, 0x856c, 0x856d, 0x856e, 0x856f, 0x8570, 0x8571, 0x8573, 0x8575, 0x8576, 0x8577, 0x8578, 0x857c, 0x857d, 0x857f, 0x8580, 0x8581, 0x7701, 0x76db, 0x5269, 0x80dc, 0x5723, 0x5e08, 0x5931, 0x72ee, 0x65bd, 0x6e7f, 0x8bd7, 0x5c38, 0x8671, 0x5341, 0x77f3, 0x62fe, 0x65f6, 0x4ec0, 0x98df, 0x8680, 0x5b9e, 0x8bc6, 0x53f2, 0x77e2, 0x4f7f, 0x5c4e, 0x9a76, 0x59cb, 0x5f0f, 0x793a, 0x58eb, 0x4e16, 0x67ff, 0x4e8b, 0x62ed, 0x8a93, 0x901d, 0x52bf, 0x662f, 0x55dc, 0x566c, 0x9002, 0x4ed5, 0x4f8d, 0x91ca, 0x9970, 0x6c0f, 0x5e02, 0x6043, 0x5ba4, 0x89c6, 0x8bd5, 0x6536, 0x624b, 0x9996, 0x5b88, 0x5bff, 0x6388, 0x552e, 0x53d7, 0x7626, 0x517d, 0x852c, 0x67a2, 0x68b3, 0x6b8a, 0x6292, 0x8f93, 0x53d4, 0x8212, 0x6dd1, 0x758f, 0x4e66, 0x8d4e, 0x5b70, 0x719f, 0x85af, 0x6691, 0x66d9, 0x7f72, 0x8700, 0x9ecd, 0x9f20, 0x5c5e, 0x672f, 0x8ff0, 0x6811, 0x675f, 0x620d, 0x7ad6, 0x5885, 0x5eb6, 0x6570, 0x6f31, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ 192 ] = { 0x8582, 0x8583, 0x8586, 0x8588, 0x8589, 0x858a, 0x858b, 0x858c, 0x858d, 0x858e, 0x8590, 0x8591, 0x8592, 0x8593, 0x8594, 0x8595, 0x8596, 0x8597, 0x8598, 0x8599, 0x859a, 0x859d, 0x859e, 0x859f, 0x85a0, 0x85a1, 0x85a2, 0x85a3, 0x85a5, 0x85a6, 0x85a7, 0x85a9, 0x85ab, 0x85ac, 0x85ad, 0x85b1, 0x85b2, 0x85b3, 0x85b4, 0x85b5, 0x85b6, 0x85b8, 0x85ba, 0x85bb, 0x85bc, 0x85bd, 0x85be, 0x85bf, 0x85c0, 0x85c2, 0x85c3, 0x85c4, 0x85c5, 0x85c6, 0x85c7, 0x85c8, 0x85ca, 0x85cb, 0x85cc, 0x85cd, 0x85ce, 0x85d1, 0x85d2, 0xfffd, 0x85d4, 0x85d6, 0x85d7, 0x85d8, 0x85d9, 0x85da, 0x85db, 0x85dd, 0x85de, 0x85df, 0x85e0, 0x85e1, 0x85e2, 0x85e3, 0x85e5, 0x85e6, 0x85e7, 0x85e8, 0x85ea, 0x85eb, 0x85ec, 0x85ed, 0x85ee, 0x85ef, 0x85f0, 0x85f1, 0x85f2, 0x85f3, 0x85f4, 0x85f5, 0x85f6, 0x85f7, 0x85f8, 0x6055, 0x5237, 0x800d, 0x6454, 0x8870, 0x7529, 0x5e05, 0x6813, 0x62f4, 0x971c, 0x53cc, 0x723d, 0x8c01, 0x6c34, 0x7761, 0x7a0e, 0x542e, 0x77ac, 0x987a, 0x821c, 0x8bf4, 0x7855, 0x6714, 0x70c1, 0x65af, 0x6495, 0x5636, 0x601d, 0x79c1, 0x53f8, 0x4e1d, 0x6b7b, 0x8086, 0x5bfa, 0x55e3, 0x56db, 0x4f3a, 0x4f3c, 0x9972, 0x5df3, 0x677e, 0x8038, 0x6002, 0x9882, 0x9001, 0x5b8b, 0x8bbc, 0x8bf5, 0x641c, 0x8258, 0x64de, 0x55fd, 0x82cf, 0x9165, 0x4fd7, 0x7d20, 0x901f, 0x7c9f, 0x50f3, 0x5851, 0x6eaf, 0x5bbf, 0x8bc9, 0x8083, 0x9178, 0x849c, 0x7b97, 0x867d, 0x968b, 0x968f, 0x7ee5, 0x9ad3, 0x788e, 0x5c81, 0x7a57, 0x9042, 0x96a7, 0x795f, 0x5b59, 0x635f, 0x7b0b, 0x84d1, 0x68ad, 0x5506, 0x7f29, 0x7410, 0x7d22, 0x9501, 0x6240, 0x584c, 0x4ed6, 0x5b83, 0x5979, 0x5854, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ 192 ] = { 0x85f9, 0x85fa, 0x85fc, 0x85fd, 0x85fe, 0x8600, 0x8601, 0x8602, 0x8603, 0x8604, 0x8606, 0x8607, 0x8608, 0x8609, 0x860a, 0x860b, 0x860c, 0x860d, 0x860e, 0x860f, 0x8610, 0x8612, 0x8613, 0x8614, 0x8615, 0x8617, 0x8618, 0x8619, 0x861a, 0x861b, 0x861c, 0x861d, 0x861e, 0x861f, 0x8620, 0x8621, 0x8622, 0x8623, 0x8624, 0x8625, 0x8626, 0x8628, 0x862a, 0x862b, 0x862c, 0x862d, 0x862e, 0x862f, 0x8630, 0x8631, 0x8632, 0x8633, 0x8634, 0x8635, 0x8636, 0x8637, 0x8639, 0x863a, 0x863b, 0x863d, 0x863e, 0x863f, 0x8640, 0xfffd, 0x8641, 0x8642, 0x8643, 0x8644, 0x8645, 0x8646, 0x8647, 0x8648, 0x8649, 0x864a, 0x864b, 0x864c, 0x8652, 0x8653, 0x8655, 0x8656, 0x8657, 0x8658, 0x8659, 0x865b, 0x865c, 0x865d, 0x865f, 0x8660, 0x8661, 0x8663, 0x8664, 0x8665, 0x8666, 0x8667, 0x8668, 0x8669, 0x866a, 0x736d, 0x631e, 0x8e4b, 0x8e0f, 0x80ce, 0x82d4, 0x62ac, 0x53f0, 0x6cf0, 0x915e, 0x592a, 0x6001, 0x6c70, 0x574d, 0x644a, 0x8d2a, 0x762b, 0x6ee9, 0x575b, 0x6a80, 0x75f0, 0x6f6d, 0x8c2d, 0x8c08, 0x5766, 0x6bef, 0x8892, 0x78b3, 0x63a2, 0x53f9, 0x70ad, 0x6c64, 0x5858, 0x642a, 0x5802, 0x68e0, 0x819b, 0x5510, 0x7cd6, 0x5018, 0x8eba, 0x6dcc, 0x8d9f, 0x70eb, 0x638f, 0x6d9b, 0x6ed4, 0x7ee6, 0x8404, 0x6843, 0x9003, 0x6dd8, 0x9676, 0x8ba8, 0x5957, 0x7279, 0x85e4, 0x817e, 0x75bc, 0x8a8a, 0x68af, 0x5254, 0x8e22, 0x9511, 0x63d0, 0x9898, 0x8e44, 0x557c, 0x4f53, 0x66ff, 0x568f, 0x60d5, 0x6d95, 0x5243, 0x5c49, 0x5929, 0x6dfb, 0x586b, 0x7530, 0x751c, 0x606c, 0x8214, 0x8146, 0x6311, 0x6761, 0x8fe2, 0x773a, 0x8df3, 0x8d34, 0x94c1, 0x5e16, 0x5385, 0x542c, 0x70c3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ 192 ] = { 0x866d, 0x866f, 0x8670, 0x8672, 0x8673, 0x8674, 0x8675, 0x8676, 0x8677, 0x8678, 0x8683, 0x8684, 0x8685, 0x8686, 0x8687, 0x8688, 0x8689, 0x868e, 0x868f, 0x8690, 0x8691, 0x8692, 0x8694, 0x8696, 0x8697, 0x8698, 0x8699, 0x869a, 0x869b, 0x869e, 0x869f, 0x86a0, 0x86a1, 0x86a2, 0x86a5, 0x86a6, 0x86ab, 0x86ad, 0x86ae, 0x86b2, 0x86b3, 0x86b7, 0x86b8, 0x86b9, 0x86bb, 0x86bc, 0x86bd, 0x86be, 0x86bf, 0x86c1, 0x86c2, 0x86c3, 0x86c5, 0x86c8, 0x86cc, 0x86cd, 0x86d2, 0x86d3, 0x86d5, 0x86d6, 0x86d7, 0x86da, 0x86dc, 0xfffd, 0x86dd, 0x86e0, 0x86e1, 0x86e2, 0x86e3, 0x86e5, 0x86e6, 0x86e7, 0x86e8, 0x86ea, 0x86eb, 0x86ec, 0x86ef, 0x86f5, 0x86f6, 0x86f7, 0x86fa, 0x86fb, 0x86fc, 0x86fd, 0x86ff, 0x8701, 0x8704, 0x8705, 0x8706, 0x870b, 0x870c, 0x870e, 0x870f, 0x8710, 0x8711, 0x8714, 0x8716, 0x6c40, 0x5ef7, 0x505c, 0x4ead, 0x5ead, 0x633a, 0x8247, 0x901a, 0x6850, 0x916e, 0x77b3, 0x540c, 0x94dc, 0x5f64, 0x7ae5, 0x6876, 0x6345, 0x7b52, 0x7edf, 0x75db, 0x5077, 0x6295, 0x5934, 0x900f, 0x51f8, 0x79c3, 0x7a81, 0x56fe, 0x5f92, 0x9014, 0x6d82, 0x5c60, 0x571f, 0x5410, 0x5154, 0x6e4d, 0x56e2, 0x63a8, 0x9893, 0x817f, 0x8715, 0x892a, 0x9000, 0x541e, 0x5c6f, 0x81c0, 0x62d6, 0x6258, 0x8131, 0x9e35, 0x9640, 0x9a6e, 0x9a7c, 0x692d, 0x59a5, 0x62d3, 0x553e, 0x6316, 0x54c7, 0x86d9, 0x6d3c, 0x5a03, 0x74e6, 0x889c, 0x6b6a, 0x5916, 0x8c4c, 0x5f2f, 0x6e7e, 0x73a9, 0x987d, 0x4e38, 0x70f7, 0x5b8c, 0x7897, 0x633d, 0x665a, 0x7696, 0x60cb, 0x5b9b, 0x5a49, 0x4e07, 0x8155, 0x6c6a, 0x738b, 0x4ea1, 0x6789, 0x7f51, 0x5f80, 0x65fa, 0x671b, 0x5fd8, 0x5984, 0x5a01, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ 192 ] = { 0x8719, 0x871b, 0x871d, 0x871f, 0x8720, 0x8724, 0x8726, 0x8727, 0x8728, 0x872a, 0x872b, 0x872c, 0x872d, 0x872f, 0x8730, 0x8732, 0x8733, 0x8735, 0x8736, 0x8738, 0x8739, 0x873a, 0x873c, 0x873d, 0x8740, 0x8741, 0x8742, 0x8743, 0x8744, 0x8745, 0x8746, 0x874a, 0x874b, 0x874d, 0x874f, 0x8750, 0x8751, 0x8752, 0x8754, 0x8755, 0x8756, 0x8758, 0x875a, 0x875b, 0x875c, 0x875d, 0x875e, 0x875f, 0x8761, 0x8762, 0x8766, 0x8767, 0x8768, 0x8769, 0x876a, 0x876b, 0x876c, 0x876d, 0x876f, 0x8771, 0x8772, 0x8773, 0x8775, 0xfffd, 0x8777, 0x8778, 0x8779, 0x877a, 0x877f, 0x8780, 0x8781, 0x8784, 0x8786, 0x8787, 0x8789, 0x878a, 0x878c, 0x878e, 0x878f, 0x8790, 0x8791, 0x8792, 0x8794, 0x8795, 0x8796, 0x8798, 0x8799, 0x879a, 0x879b, 0x879c, 0x879d, 0x879e, 0x87a0, 0x87a1, 0x87a2, 0x87a3, 0x87a4, 0x5dcd, 0x5fae, 0x5371, 0x97e6, 0x8fdd, 0x6845, 0x56f4, 0x552f, 0x60df, 0x4e3a, 0x6f4d, 0x7ef4, 0x82c7, 0x840e, 0x59d4, 0x4f1f, 0x4f2a, 0x5c3e, 0x7eac, 0x672a, 0x851a, 0x5473, 0x754f, 0x80c3, 0x5582, 0x9b4f, 0x4f4d, 0x6e2d, 0x8c13, 0x5c09, 0x6170, 0x536b, 0x761f, 0x6e29, 0x868a, 0x6587, 0x95fb, 0x7eb9, 0x543b, 0x7a33, 0x7d0a, 0x95ee, 0x55e1, 0x7fc1, 0x74ee, 0x631d, 0x8717, 0x6da1, 0x7a9d, 0x6211, 0x65a1, 0x5367, 0x63e1, 0x6c83, 0x5deb, 0x545c, 0x94a8, 0x4e4c, 0x6c61, 0x8bec, 0x5c4b, 0x65e0, 0x829c, 0x68a7, 0x543e, 0x5434, 0x6bcb, 0x6b66, 0x4e94, 0x6342, 0x5348, 0x821e, 0x4f0d, 0x4fae, 0x575e, 0x620a, 0x96fe, 0x6664, 0x7269, 0x52ff, 0x52a1, 0x609f, 0x8bef, 0x6614, 0x7199, 0x6790, 0x897f, 0x7852, 0x77fd, 0x6670, 0x563b, 0x5438, 0x9521, 0x727a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ 192 ] = { 0x87a5, 0x87a6, 0x87a7, 0x87a9, 0x87aa, 0x87ae, 0x87b0, 0x87b1, 0x87b2, 0x87b4, 0x87b6, 0x87b7, 0x87b8, 0x87b9, 0x87bb, 0x87bc, 0x87be, 0x87bf, 0x87c1, 0x87c2, 0x87c3, 0x87c4, 0x87c5, 0x87c7, 0x87c8, 0x87c9, 0x87cc, 0x87cd, 0x87ce, 0x87cf, 0x87d0, 0x87d4, 0x87d5, 0x87d6, 0x87d7, 0x87d8, 0x87d9, 0x87da, 0x87dc, 0x87dd, 0x87de, 0x87df, 0x87e1, 0x87e2, 0x87e3, 0x87e4, 0x87e6, 0x87e7, 0x87e8, 0x87e9, 0x87eb, 0x87ec, 0x87ed, 0x87ef, 0x87f0, 0x87f1, 0x87f2, 0x87f3, 0x87f4, 0x87f5, 0x87f6, 0x87f7, 0x87f8, 0xfffd, 0x87fa, 0x87fb, 0x87fc, 0x87fd, 0x87ff, 0x8800, 0x8801, 0x8802, 0x8804, 0x8805, 0x8806, 0x8807, 0x8808, 0x8809, 0x880b, 0x880c, 0x880d, 0x880e, 0x880f, 0x8810, 0x8811, 0x8812, 0x8814, 0x8817, 0x8818, 0x8819, 0x881a, 0x881c, 0x881d, 0x881e, 0x881f, 0x8820, 0x8823, 0x7a00, 0x606f, 0x5e0c, 0x6089, 0x819d, 0x5915, 0x60dc, 0x7184, 0x70ef, 0x6eaa, 0x6c50, 0x7280, 0x6a84, 0x88ad, 0x5e2d, 0x4e60, 0x5ab3, 0x559c, 0x94e3, 0x6d17, 0x7cfb, 0x9699, 0x620f, 0x7ec6, 0x778e, 0x867e, 0x5323, 0x971e, 0x8f96, 0x6687, 0x5ce1, 0x4fa0, 0x72ed, 0x4e0b, 0x53a6, 0x590f, 0x5413, 0x6380, 0x9528, 0x5148, 0x4ed9, 0x9c9c, 0x7ea4, 0x54b8, 0x8d24, 0x8854, 0x8237, 0x95f2, 0x6d8e, 0x5f26, 0x5acc, 0x663e, 0x9669, 0x73b0, 0x732e, 0x53bf, 0x817a, 0x9985, 0x7fa1, 0x5baa, 0x9677, 0x9650, 0x7ebf, 0x76f8, 0x53a2, 0x9576, 0x9999, 0x7bb1, 0x8944, 0x6e58, 0x4e61, 0x7fd4, 0x7965, 0x8be6, 0x60f3, 0x54cd, 0x4eab, 0x9879, 0x5df7, 0x6a61, 0x50cf, 0x5411, 0x8c61, 0x8427, 0x785d, 0x9704, 0x524a, 0x54ee, 0x56a3, 0x9500, 0x6d88, 0x5bb5, 0x6dc6, 0x6653, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ 192 ] = { 0x8824, 0x8825, 0x8826, 0x8827, 0x8828, 0x8829, 0x882a, 0x882b, 0x882c, 0x882d, 0x882e, 0x882f, 0x8830, 0x8831, 0x8833, 0x8834, 0x8835, 0x8836, 0x8837, 0x8838, 0x883a, 0x883b, 0x883d, 0x883e, 0x883f, 0x8841, 0x8842, 0x8843, 0x8846, 0x8847, 0x8848, 0x8849, 0x884a, 0x884b, 0x884e, 0x884f, 0x8850, 0x8851, 0x8852, 0x8853, 0x8855, 0x8856, 0x8858, 0x885a, 0x885b, 0x885c, 0x885d, 0x885e, 0x885f, 0x8860, 0x8866, 0x8867, 0x886a, 0x886d, 0x886f, 0x8871, 0x8873, 0x8874, 0x8875, 0x8876, 0x8878, 0x8879, 0x887a, 0xfffd, 0x887b, 0x887c, 0x8880, 0x8883, 0x8886, 0x8887, 0x8889, 0x888a, 0x888c, 0x888e, 0x888f, 0x8890, 0x8891, 0x8893, 0x8894, 0x8895, 0x8897, 0x8898, 0x8899, 0x889a, 0x889b, 0x889d, 0x889e, 0x889f, 0x88a0, 0x88a1, 0x88a3, 0x88a5, 0x88a6, 0x88a7, 0x88a8, 0x88a9, 0x88aa, 0x5c0f, 0x5b5d, 0x6821, 0x8096, 0x5578, 0x7b11, 0x6548, 0x6954, 0x4e9b, 0x6b47, 0x874e, 0x978b, 0x534f, 0x631f, 0x643a, 0x90aa, 0x659c, 0x80c1, 0x8c10, 0x5199, 0x68b0, 0x5378, 0x87f9, 0x61c8, 0x6cc4, 0x6cfb, 0x8c22, 0x5c51, 0x85aa, 0x82af, 0x950c, 0x6b23, 0x8f9b, 0x65b0, 0x5ffb, 0x5fc3, 0x4fe1, 0x8845, 0x661f, 0x8165, 0x7329, 0x60fa, 0x5174, 0x5211, 0x578b, 0x5f62, 0x90a2, 0x884c, 0x9192, 0x5e78, 0x674f, 0x6027, 0x59d3, 0x5144, 0x51f6, 0x80f8, 0x5308, 0x6c79, 0x96c4, 0x718a, 0x4f11, 0x4fee, 0x7f9e, 0x673d, 0x55c5, 0x9508, 0x79c0, 0x8896, 0x7ee3, 0x589f, 0x620c, 0x9700, 0x865a, 0x5618, 0x987b, 0x5f90, 0x8bb8, 0x84c4, 0x9157, 0x53d9, 0x65ed, 0x5e8f, 0x755c, 0x6064, 0x7d6e, 0x5a7f, 0x7eea, 0x7eed, 0x8f69, 0x55a7, 0x5ba3, 0x60ac, 0x65cb, 0x7384, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ 192 ] = { 0x88ac, 0x88ae, 0x88af, 0x88b0, 0x88b2, 0x88b3, 0x88b4, 0x88b5, 0x88b6, 0x88b8, 0x88b9, 0x88ba, 0x88bb, 0x88bd, 0x88be, 0x88bf, 0x88c0, 0x88c3, 0x88c4, 0x88c7, 0x88c8, 0x88ca, 0x88cb, 0x88cc, 0x88cd, 0x88cf, 0x88d0, 0x88d1, 0x88d3, 0x88d6, 0x88d7, 0x88da, 0x88db, 0x88dc, 0x88dd, 0x88de, 0x88e0, 0x88e1, 0x88e6, 0x88e7, 0x88e9, 0x88ea, 0x88eb, 0x88ec, 0x88ed, 0x88ee, 0x88ef, 0x88f2, 0x88f5, 0x88f6, 0x88f7, 0x88fa, 0x88fb, 0x88fd, 0x88ff, 0x8900, 0x8901, 0x8903, 0x8904, 0x8905, 0x8906, 0x8907, 0x8908, 0xfffd, 0x8909, 0x890b, 0x890c, 0x890d, 0x890e, 0x890f, 0x8911, 0x8914, 0x8915, 0x8916, 0x8917, 0x8918, 0x891c, 0x891d, 0x891e, 0x891f, 0x8920, 0x8922, 0x8923, 0x8924, 0x8926, 0x8927, 0x8928, 0x8929, 0x892c, 0x892d, 0x892e, 0x892f, 0x8931, 0x8932, 0x8933, 0x8935, 0x8937, 0x9009, 0x7663, 0x7729, 0x7eda, 0x9774, 0x859b, 0x5b66, 0x7a74, 0x96ea, 0x8840, 0x52cb, 0x718f, 0x5faa, 0x65ec, 0x8be2, 0x5bfb, 0x9a6f, 0x5de1, 0x6b89, 0x6c5b, 0x8bad, 0x8baf, 0x900a, 0x8fc5, 0x538b, 0x62bc, 0x9e26, 0x9e2d, 0x5440, 0x4e2b, 0x82bd, 0x7259, 0x869c, 0x5d16, 0x8859, 0x6daf, 0x96c5, 0x54d1, 0x4e9a, 0x8bb6, 0x7109, 0x54bd, 0x9609, 0x70df, 0x6df9, 0x76d0, 0x4e25, 0x7814, 0x8712, 0x5ca9, 0x5ef6, 0x8a00, 0x989c, 0x960e, 0x708e, 0x6cbf, 0x5944, 0x63a9, 0x773c, 0x884d, 0x6f14, 0x8273, 0x5830, 0x71d5, 0x538c, 0x781a, 0x96c1, 0x5501, 0x5f66, 0x7130, 0x5bb4, 0x8c1a, 0x9a8c, 0x6b83, 0x592e, 0x9e2f, 0x79e7, 0x6768, 0x626c, 0x4f6f, 0x75a1, 0x7f8a, 0x6d0b, 0x9633, 0x6c27, 0x4ef0, 0x75d2, 0x517b, 0x6837, 0x6f3e, 0x9080, 0x8170, 0x5996, 0x7476, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ 192 ] = { 0x8938, 0x8939, 0x893a, 0x893b, 0x893c, 0x893d, 0x893e, 0x893f, 0x8940, 0x8942, 0x8943, 0x8945, 0x8946, 0x8947, 0x8948, 0x8949, 0x894a, 0x894b, 0x894c, 0x894d, 0x894e, 0x894f, 0x8950, 0x8951, 0x8952, 0x8953, 0x8954, 0x8955, 0x8956, 0x8957, 0x8958, 0x8959, 0x895a, 0x895b, 0x895c, 0x895d, 0x8960, 0x8961, 0x8962, 0x8963, 0x8964, 0x8965, 0x8967, 0x8968, 0x8969, 0x896a, 0x896b, 0x896c, 0x896d, 0x896e, 0x896f, 0x8970, 0x8971, 0x8972, 0x8973, 0x8974, 0x8975, 0x8976, 0x8977, 0x8978, 0x8979, 0x897a, 0x897c, 0xfffd, 0x897d, 0x897e, 0x8980, 0x8982, 0x8984, 0x8985, 0x8987, 0x8988, 0x8989, 0x898a, 0x898b, 0x898c, 0x898d, 0x898e, 0x898f, 0x8990, 0x8991, 0x8992, 0x8993, 0x8994, 0x8995, 0x8996, 0x8997, 0x8998, 0x8999, 0x899a, 0x899b, 0x899c, 0x899d, 0x899e, 0x899f, 0x89a0, 0x89a1, 0x6447, 0x5c27, 0x9065, 0x7a91, 0x8c23, 0x59da, 0x54ac, 0x8200, 0x836f, 0x8981, 0x8000, 0x6930, 0x564e, 0x8036, 0x7237, 0x91ce, 0x51b6, 0x4e5f, 0x9875, 0x6396, 0x4e1a, 0x53f6, 0x66f3, 0x814b, 0x591c, 0x6db2, 0x4e00, 0x58f9, 0x533b, 0x63d6, 0x94f1, 0x4f9d, 0x4f0a, 0x8863, 0x9890, 0x5937, 0x9057, 0x79fb, 0x4eea, 0x80f0, 0x7591, 0x6c82, 0x5b9c, 0x59e8, 0x5f5d, 0x6905, 0x8681, 0x501a, 0x5df2, 0x4e59, 0x77e3, 0x4ee5, 0x827a, 0x6291, 0x6613, 0x9091, 0x5c79, 0x4ebf, 0x5f79, 0x81c6, 0x9038, 0x8084, 0x75ab, 0x4ea6, 0x88d4, 0x610f, 0x6bc5, 0x5fc6, 0x4e49, 0x76ca, 0x6ea2, 0x8be3, 0x8bae, 0x8c0a, 0x8bd1, 0x5f02, 0x7ffc, 0x7fcc, 0x7ece, 0x8335, 0x836b, 0x56e0, 0x6bb7, 0x97f3, 0x9634, 0x59fb, 0x541f, 0x94f6, 0x6deb, 0x5bc5, 0x996e, 0x5c39, 0x5f15, 0x9690, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ 192 ] = { 0x89a2, 0x89a3, 0x89a4, 0x89a5, 0x89a6, 0x89a7, 0x89a8, 0x89a9, 0x89aa, 0x89ab, 0x89ac, 0x89ad, 0x89ae, 0x89af, 0x89b0, 0x89b1, 0x89b2, 0x89b3, 0x89b4, 0x89b5, 0x89b6, 0x89b7, 0x89b8, 0x89b9, 0x89ba, 0x89bb, 0x89bc, 0x89bd, 0x89be, 0x89bf, 0x89c0, 0x89c3, 0x89cd, 0x89d3, 0x89d4, 0x89d5, 0x89d7, 0x89d8, 0x89d9, 0x89db, 0x89dd, 0x89df, 0x89e0, 0x89e1, 0x89e2, 0x89e4, 0x89e7, 0x89e8, 0x89e9, 0x89ea, 0x89ec, 0x89ed, 0x89ee, 0x89f0, 0x89f1, 0x89f2, 0x89f4, 0x89f5, 0x89f6, 0x89f7, 0x89f8, 0x89f9, 0x89fa, 0xfffd, 0x89fb, 0x89fc, 0x89fd, 0x89fe, 0x89ff, 0x8a01, 0x8a02, 0x8a03, 0x8a04, 0x8a05, 0x8a06, 0x8a08, 0x8a09, 0x8a0a, 0x8a0b, 0x8a0c, 0x8a0d, 0x8a0e, 0x8a0f, 0x8a10, 0x8a11, 0x8a12, 0x8a13, 0x8a14, 0x8a15, 0x8a16, 0x8a17, 0x8a18, 0x8a19, 0x8a1a, 0x8a1b, 0x8a1c, 0x8a1d, 0x5370, 0x82f1, 0x6a31, 0x5a74, 0x9e70, 0x5e94, 0x7f28, 0x83b9, 0x8424, 0x8425, 0x8367, 0x8747, 0x8fce, 0x8d62, 0x76c8, 0x5f71, 0x9896, 0x786c, 0x6620, 0x54df, 0x62e5, 0x4f63, 0x81c3, 0x75c8, 0x5eb8, 0x96cd, 0x8e0a, 0x86f9, 0x548f, 0x6cf3, 0x6d8c, 0x6c38, 0x607f, 0x52c7, 0x7528, 0x5e7d, 0x4f18, 0x60a0, 0x5fe7, 0x5c24, 0x7531, 0x90ae, 0x94c0, 0x72b9, 0x6cb9, 0x6e38, 0x9149, 0x6709, 0x53cb, 0x53f3, 0x4f51, 0x91c9, 0x8bf1, 0x53c8, 0x5e7c, 0x8fc2, 0x6de4, 0x4e8e, 0x76c2, 0x6986, 0x865e, 0x611a, 0x8206, 0x4f59, 0x4fde, 0x903e, 0x9c7c, 0x6109, 0x6e1d, 0x6e14, 0x9685, 0x4e88, 0x5a31, 0x96e8, 0x4e0e, 0x5c7f, 0x79b9, 0x5b87, 0x8bed, 0x7fbd, 0x7389, 0x57df, 0x828b, 0x90c1, 0x5401, 0x9047, 0x55bb, 0x5cea, 0x5fa1, 0x6108, 0x6b32, 0x72f1, 0x80b2, 0x8a89, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ 192 ] = { 0x8a1e, 0x8a1f, 0x8a20, 0x8a21, 0x8a22, 0x8a23, 0x8a24, 0x8a25, 0x8a26, 0x8a27, 0x8a28, 0x8a29, 0x8a2a, 0x8a2b, 0x8a2c, 0x8a2d, 0x8a2e, 0x8a2f, 0x8a30, 0x8a31, 0x8a32, 0x8a33, 0x8a34, 0x8a35, 0x8a36, 0x8a37, 0x8a38, 0x8a39, 0x8a3a, 0x8a3b, 0x8a3c, 0x8a3d, 0x8a3f, 0x8a40, 0x8a41, 0x8a42, 0x8a43, 0x8a44, 0x8a45, 0x8a46, 0x8a47, 0x8a49, 0x8a4a, 0x8a4b, 0x8a4c, 0x8a4d, 0x8a4e, 0x8a4f, 0x8a50, 0x8a51, 0x8a52, 0x8a53, 0x8a54, 0x8a55, 0x8a56, 0x8a57, 0x8a58, 0x8a59, 0x8a5a, 0x8a5b, 0x8a5c, 0x8a5d, 0x8a5e, 0xfffd, 0x8a5f, 0x8a60, 0x8a61, 0x8a62, 0x8a63, 0x8a64, 0x8a65, 0x8a66, 0x8a67, 0x8a68, 0x8a69, 0x8a6a, 0x8a6b, 0x8a6c, 0x8a6d, 0x8a6e, 0x8a6f, 0x8a70, 0x8a71, 0x8a72, 0x8a73, 0x8a74, 0x8a75, 0x8a76, 0x8a77, 0x8a78, 0x8a7a, 0x8a7b, 0x8a7c, 0x8a7d, 0x8a7e, 0x8a7f, 0x8a80, 0x6d74, 0x5bd3, 0x88d5, 0x9884, 0x8c6b, 0x9a6d, 0x9e33, 0x6e0a, 0x51a4, 0x5143, 0x57a3, 0x8881, 0x539f, 0x63f4, 0x8f95, 0x56ed, 0x5458, 0x5706, 0x733f, 0x6e90, 0x7f18, 0x8fdc, 0x82d1, 0x613f, 0x6028, 0x9662, 0x66f0, 0x7ea6, 0x8d8a, 0x8dc3, 0x94a5, 0x5cb3, 0x7ca4, 0x6708, 0x60a6, 0x9605, 0x8018, 0x4e91, 0x90e7, 0x5300, 0x9668, 0x5141, 0x8fd0, 0x8574, 0x915d, 0x6655, 0x97f5, 0x5b55, 0x531d, 0x7838, 0x6742, 0x683d, 0x54c9, 0x707e, 0x5bb0, 0x8f7d, 0x518d, 0x5728, 0x54b1, 0x6512, 0x6682, 0x8d5e, 0x8d43, 0x810f, 0x846c, 0x906d, 0x7cdf, 0x51ff, 0x85fb, 0x67a3, 0x65e9, 0x6fa1, 0x86a4, 0x8e81, 0x566a, 0x9020, 0x7682, 0x7076, 0x71e5, 0x8d23, 0x62e9, 0x5219, 0x6cfd, 0x8d3c, 0x600e, 0x589e, 0x618e, 0x66fe, 0x8d60, 0x624e, 0x55b3, 0x6e23, 0x672d, 0x8f67, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ 192 ] = { 0x8a81, 0x8a82, 0x8a83, 0x8a84, 0x8a85, 0x8a86, 0x8a87, 0x8a88, 0x8a8b, 0x8a8c, 0x8a8d, 0x8a8e, 0x8a8f, 0x8a90, 0x8a91, 0x8a92, 0x8a94, 0x8a95, 0x8a96, 0x8a97, 0x8a98, 0x8a99, 0x8a9a, 0x8a9b, 0x8a9c, 0x8a9d, 0x8a9e, 0x8a9f, 0x8aa0, 0x8aa1, 0x8aa2, 0x8aa3, 0x8aa4, 0x8aa5, 0x8aa6, 0x8aa7, 0x8aa8, 0x8aa9, 0x8aaa, 0x8aab, 0x8aac, 0x8aad, 0x8aae, 0x8aaf, 0x8ab0, 0x8ab1, 0x8ab2, 0x8ab3, 0x8ab4, 0x8ab5, 0x8ab6, 0x8ab7, 0x8ab8, 0x8ab9, 0x8aba, 0x8abb, 0x8abc, 0x8abd, 0x8abe, 0x8abf, 0x8ac0, 0x8ac1, 0x8ac2, 0xfffd, 0x8ac3, 0x8ac4, 0x8ac5, 0x8ac6, 0x8ac7, 0x8ac8, 0x8ac9, 0x8aca, 0x8acb, 0x8acc, 0x8acd, 0x8ace, 0x8acf, 0x8ad0, 0x8ad1, 0x8ad2, 0x8ad3, 0x8ad4, 0x8ad5, 0x8ad6, 0x8ad7, 0x8ad8, 0x8ad9, 0x8ada, 0x8adb, 0x8adc, 0x8add, 0x8ade, 0x8adf, 0x8ae0, 0x8ae1, 0x8ae2, 0x8ae3, 0x94e1, 0x95f8, 0x7728, 0x6805, 0x69a8, 0x548b, 0x4e4d, 0x70b8, 0x8bc8, 0x6458, 0x658b, 0x5b85, 0x7a84, 0x503a, 0x5be8, 0x77bb, 0x6be1, 0x8a79, 0x7c98, 0x6cbe, 0x76cf, 0x65a9, 0x8f97, 0x5d2d, 0x5c55, 0x8638, 0x6808, 0x5360, 0x6218, 0x7ad9, 0x6e5b, 0x7efd, 0x6a1f, 0x7ae0, 0x5f70, 0x6f33, 0x5f20, 0x638c, 0x6da8, 0x6756, 0x4e08, 0x5e10, 0x8d26, 0x4ed7, 0x80c0, 0x7634, 0x969c, 0x62db, 0x662d, 0x627e, 0x6cbc, 0x8d75, 0x7167, 0x7f69, 0x5146, 0x8087, 0x53ec, 0x906e, 0x6298, 0x54f2, 0x86f0, 0x8f99, 0x8005, 0x9517, 0x8517, 0x8fd9, 0x6d59, 0x73cd, 0x659f, 0x771f, 0x7504, 0x7827, 0x81fb, 0x8d1e, 0x9488, 0x4fa6, 0x6795, 0x75b9, 0x8bca, 0x9707, 0x632f, 0x9547, 0x9635, 0x84b8, 0x6323, 0x7741, 0x5f81, 0x72f0, 0x4e89, 0x6014, 0x6574, 0x62ef, 0x6b63, 0x653f, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ 192 ] = { 0x8ae4, 0x8ae5, 0x8ae6, 0x8ae7, 0x8ae8, 0x8ae9, 0x8aea, 0x8aeb, 0x8aec, 0x8aed, 0x8aee, 0x8aef, 0x8af0, 0x8af1, 0x8af2, 0x8af3, 0x8af4, 0x8af5, 0x8af6, 0x8af7, 0x8af8, 0x8af9, 0x8afa, 0x8afb, 0x8afc, 0x8afd, 0x8afe, 0x8aff, 0x8b00, 0x8b01, 0x8b02, 0x8b03, 0x8b04, 0x8b05, 0x8b06, 0x8b08, 0x8b09, 0x8b0a, 0x8b0b, 0x8b0c, 0x8b0d, 0x8b0e, 0x8b0f, 0x8b10, 0x8b11, 0x8b12, 0x8b13, 0x8b14, 0x8b15, 0x8b16, 0x8b17, 0x8b18, 0x8b19, 0x8b1a, 0x8b1b, 0x8b1c, 0x8b1d, 0x8b1e, 0x8b1f, 0x8b20, 0x8b21, 0x8b22, 0x8b23, 0xfffd, 0x8b24, 0x8b25, 0x8b27, 0x8b28, 0x8b29, 0x8b2a, 0x8b2b, 0x8b2c, 0x8b2d, 0x8b2e, 0x8b2f, 0x8b30, 0x8b31, 0x8b32, 0x8b33, 0x8b34, 0x8b35, 0x8b36, 0x8b37, 0x8b38, 0x8b39, 0x8b3a, 0x8b3b, 0x8b3c, 0x8b3d, 0x8b3e, 0x8b3f, 0x8b40, 0x8b41, 0x8b42, 0x8b43, 0x8b44, 0x8b45, 0x5e27, 0x75c7, 0x90d1, 0x8bc1, 0x829d, 0x679d, 0x652f, 0x5431, 0x8718, 0x77e5, 0x80a2, 0x8102, 0x6c41, 0x4e4b, 0x7ec7, 0x804c, 0x76f4, 0x690d, 0x6b96, 0x6267, 0x503c, 0x4f84, 0x5740, 0x6307, 0x6b62, 0x8dbe, 0x53ea, 0x65e8, 0x7eb8, 0x5fd7, 0x631a, 0x63b7, 0x81f3, 0x81f4, 0x7f6e, 0x5e1c, 0x5cd9, 0x5236, 0x667a, 0x79e9, 0x7a1a, 0x8d28, 0x7099, 0x75d4, 0x6ede, 0x6cbb, 0x7a92, 0x4e2d, 0x76c5, 0x5fe0, 0x949f, 0x8877, 0x7ec8, 0x79cd, 0x80bf, 0x91cd, 0x4ef2, 0x4f17, 0x821f, 0x5468, 0x5dde, 0x6d32, 0x8bcc, 0x7ca5, 0x8f74, 0x8098, 0x5e1a, 0x5492, 0x76b1, 0x5b99, 0x663c, 0x9aa4, 0x73e0, 0x682a, 0x86db, 0x6731, 0x732a, 0x8bf8, 0x8bdb, 0x9010, 0x7af9, 0x70db, 0x716e, 0x62c4, 0x77a9, 0x5631, 0x4e3b, 0x8457, 0x67f1, 0x52a9, 0x86c0, 0x8d2e, 0x94f8, 0x7b51, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ 192 ] = { 0x8b46, 0x8b47, 0x8b48, 0x8b49, 0x8b4a, 0x8b4b, 0x8b4c, 0x8b4d, 0x8b4e, 0x8b4f, 0x8b50, 0x8b51, 0x8b52, 0x8b53, 0x8b54, 0x8b55, 0x8b56, 0x8b57, 0x8b58, 0x8b59, 0x8b5a, 0x8b5b, 0x8b5c, 0x8b5d, 0x8b5e, 0x8b5f, 0x8b60, 0x8b61, 0x8b62, 0x8b63, 0x8b64, 0x8b65, 0x8b67, 0x8b68, 0x8b69, 0x8b6a, 0x8b6b, 0x8b6d, 0x8b6e, 0x8b6f, 0x8b70, 0x8b71, 0x8b72, 0x8b73, 0x8b74, 0x8b75, 0x8b76, 0x8b77, 0x8b78, 0x8b79, 0x8b7a, 0x8b7b, 0x8b7c, 0x8b7d, 0x8b7e, 0x8b7f, 0x8b80, 0x8b81, 0x8b82, 0x8b83, 0x8b84, 0x8b85, 0x8b86, 0xfffd, 0x8b87, 0x8b88, 0x8b89, 0x8b8a, 0x8b8b, 0x8b8c, 0x8b8d, 0x8b8e, 0x8b8f, 0x8b90, 0x8b91, 0x8b92, 0x8b93, 0x8b94, 0x8b95, 0x8b96, 0x8b97, 0x8b98, 0x8b99, 0x8b9a, 0x8b9b, 0x8b9c, 0x8b9d, 0x8b9e, 0x8b9f, 0x8bac, 0x8bb1, 0x8bbb, 0x8bc7, 0x8bd0, 0x8bea, 0x8c09, 0x8c1e, 0x4f4f, 0x6ce8, 0x795d, 0x9a7b, 0x6293, 0x722a, 0x62fd, 0x4e13, 0x7816, 0x8f6c, 0x64b0, 0x8d5a, 0x7bc6, 0x6869, 0x5e84, 0x88c5, 0x5986, 0x649e, 0x58ee, 0x72b6, 0x690e, 0x9525, 0x8ffd, 0x8d58, 0x5760, 0x7f00, 0x8c06, 0x51c6, 0x6349, 0x62d9, 0x5353, 0x684c, 0x7422, 0x8301, 0x914c, 0x5544, 0x7740, 0x707c, 0x6d4a, 0x5179, 0x54a8, 0x8d44, 0x59ff, 0x6ecb, 0x6dc4, 0x5b5c, 0x7d2b, 0x4ed4, 0x7c7d, 0x6ed3, 0x5b50, 0x81ea, 0x6e0d, 0x5b57, 0x9b03, 0x68d5, 0x8e2a, 0x5b97, 0x7efc, 0x603b, 0x7eb5, 0x90b9, 0x8d70, 0x594f, 0x63cd, 0x79df, 0x8db3, 0x5352, 0x65cf, 0x7956, 0x8bc5, 0x963b, 0x7ec4, 0x94bb, 0x7e82, 0x5634, 0x9189, 0x6700, 0x7f6a, 0x5c0a, 0x9075, 0x6628, 0x5de6, 0x4f50, 0x67de, 0x505a, 0x4f5c, 0x5750, 0x5ea7, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ 192 ] = { 0x8c38, 0x8c39, 0x8c3a, 0x8c3b, 0x8c3c, 0x8c3d, 0x8c3e, 0x8c3f, 0x8c40, 0x8c42, 0x8c43, 0x8c44, 0x8c45, 0x8c48, 0x8c4a, 0x8c4b, 0x8c4d, 0x8c4e, 0x8c4f, 0x8c50, 0x8c51, 0x8c52, 0x8c53, 0x8c54, 0x8c56, 0x8c57, 0x8c58, 0x8c59, 0x8c5b, 0x8c5c, 0x8c5d, 0x8c5e, 0x8c5f, 0x8c60, 0x8c63, 0x8c64, 0x8c65, 0x8c66, 0x8c67, 0x8c68, 0x8c69, 0x8c6c, 0x8c6d, 0x8c6e, 0x8c6f, 0x8c70, 0x8c71, 0x8c72, 0x8c74, 0x8c75, 0x8c76, 0x8c77, 0x8c7b, 0x8c7c, 0x8c7d, 0x8c7e, 0x8c7f, 0x8c80, 0x8c81, 0x8c83, 0x8c84, 0x8c86, 0x8c87, 0xfffd, 0x8c88, 0x8c8b, 0x8c8d, 0x8c8e, 0x8c8f, 0x8c90, 0x8c91, 0x8c92, 0x8c93, 0x8c95, 0x8c96, 0x8c97, 0x8c99, 0x8c9a, 0x8c9b, 0x8c9c, 0x8c9d, 0x8c9e, 0x8c9f, 0x8ca0, 0x8ca1, 0x8ca2, 0x8ca3, 0x8ca4, 0x8ca5, 0x8ca6, 0x8ca7, 0x8ca8, 0x8ca9, 0x8caa, 0x8cab, 0x8cac, 0x8cad, 0x4e8d, 0x4e0c, 0x5140, 0x4e10, 0x5eff, 0x5345, 0x4e15, 0x4e98, 0x4e1e, 0x9b32, 0x5b6c, 0x5669, 0x4e28, 0x79ba, 0x4e3f, 0x5315, 0x4e47, 0x592d, 0x723b, 0x536e, 0x6c10, 0x56df, 0x80e4, 0x9997, 0x6bd3, 0x777e, 0x9f17, 0x4e36, 0x4e9f, 0x9f10, 0x4e5c, 0x4e69, 0x4e93, 0x8288, 0x5b5b, 0x556c, 0x560f, 0x4ec4, 0x538d, 0x539d, 0x53a3, 0x53a5, 0x53ae, 0x9765, 0x8d5d, 0x531a, 0x53f5, 0x5326, 0x532e, 0x533e, 0x8d5c, 0x5366, 0x5363, 0x5202, 0x5208, 0x520e, 0x522d, 0x5233, 0x523f, 0x5240, 0x524c, 0x525e, 0x5261, 0x525c, 0x84af, 0x527d, 0x5282, 0x5281, 0x5290, 0x5293, 0x5182, 0x7f54, 0x4ebb, 0x4ec3, 0x4ec9, 0x4ec2, 0x4ee8, 0x4ee1, 0x4eeb, 0x4ede, 0x4f1b, 0x4ef3, 0x4f22, 0x4f64, 0x4ef5, 0x4f25, 0x4f27, 0x4f09, 0x4f2b, 0x4f5e, 0x4f67, 0x6538, 0x4f5a, 0x4f5d, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ 192 ] = { 0x8cae, 0x8caf, 0x8cb0, 0x8cb1, 0x8cb2, 0x8cb3, 0x8cb4, 0x8cb5, 0x8cb6, 0x8cb7, 0x8cb8, 0x8cb9, 0x8cba, 0x8cbb, 0x8cbc, 0x8cbd, 0x8cbe, 0x8cbf, 0x8cc0, 0x8cc1, 0x8cc2, 0x8cc3, 0x8cc4, 0x8cc5, 0x8cc6, 0x8cc7, 0x8cc8, 0x8cc9, 0x8cca, 0x8ccb, 0x8ccc, 0x8ccd, 0x8cce, 0x8ccf, 0x8cd0, 0x8cd1, 0x8cd2, 0x8cd3, 0x8cd4, 0x8cd5, 0x8cd6, 0x8cd7, 0x8cd8, 0x8cd9, 0x8cda, 0x8cdb, 0x8cdc, 0x8cdd, 0x8cde, 0x8cdf, 0x8ce0, 0x8ce1, 0x8ce2, 0x8ce3, 0x8ce4, 0x8ce5, 0x8ce6, 0x8ce7, 0x8ce8, 0x8ce9, 0x8cea, 0x8ceb, 0x8cec, 0xfffd, 0x8ced, 0x8cee, 0x8cef, 0x8cf0, 0x8cf1, 0x8cf2, 0x8cf3, 0x8cf4, 0x8cf5, 0x8cf6, 0x8cf7, 0x8cf8, 0x8cf9, 0x8cfa, 0x8cfb, 0x8cfc, 0x8cfd, 0x8cfe, 0x8cff, 0x8d00, 0x8d01, 0x8d02, 0x8d03, 0x8d04, 0x8d05, 0x8d06, 0x8d07, 0x8d08, 0x8d09, 0x8d0a, 0x8d0b, 0x8d0c, 0x8d0d, 0x4f5f, 0x4f57, 0x4f32, 0x4f3d, 0x4f76, 0x4f74, 0x4f91, 0x4f89, 0x4f83, 0x4f8f, 0x4f7e, 0x4f7b, 0x4faa, 0x4f7c, 0x4fac, 0x4f94, 0x4fe6, 0x4fe8, 0x4fea, 0x4fc5, 0x4fda, 0x4fe3, 0x4fdc, 0x4fd1, 0x4fdf, 0x4ff8, 0x5029, 0x504c, 0x4ff3, 0x502c, 0x500f, 0x502e, 0x502d, 0x4ffe, 0x501c, 0x500c, 0x5025, 0x5028, 0x507e, 0x5043, 0x5055, 0x5048, 0x504e, 0x506c, 0x507b, 0x50a5, 0x50a7, 0x50a9, 0x50ba, 0x50d6, 0x5106, 0x50ed, 0x50ec, 0x50e6, 0x50ee, 0x5107, 0x510b, 0x4edd, 0x6c3d, 0x4f58, 0x4f65, 0x4fce, 0x9fa0, 0x6c46, 0x7c74, 0x516e, 0x5dfd, 0x9ec9, 0x9998, 0x5181, 0x5914, 0x52f9, 0x530d, 0x8a07, 0x5310, 0x51eb, 0x5919, 0x5155, 0x4ea0, 0x5156, 0x4eb3, 0x886e, 0x88a4, 0x4eb5, 0x8114, 0x88d2, 0x7980, 0x5b34, 0x8803, 0x7fb8, 0x51ab, 0x51b1, 0x51bd, 0x51bc, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ 192 ] = { 0x8d0e, 0x8d0f, 0x8d10, 0x8d11, 0x8d12, 0x8d13, 0x8d14, 0x8d15, 0x8d16, 0x8d17, 0x8d18, 0x8d19, 0x8d1a, 0x8d1b, 0x8d1c, 0x8d20, 0x8d51, 0x8d52, 0x8d57, 0x8d5f, 0x8d65, 0x8d68, 0x8d69, 0x8d6a, 0x8d6c, 0x8d6e, 0x8d6f, 0x8d71, 0x8d72, 0x8d78, 0x8d79, 0x8d7a, 0x8d7b, 0x8d7c, 0x8d7d, 0x8d7e, 0x8d7f, 0x8d80, 0x8d82, 0x8d83, 0x8d86, 0x8d87, 0x8d88, 0x8d89, 0x8d8c, 0x8d8d, 0x8d8e, 0x8d8f, 0x8d90, 0x8d92, 0x8d93, 0x8d95, 0x8d96, 0x8d97, 0x8d98, 0x8d99, 0x8d9a, 0x8d9b, 0x8d9c, 0x8d9d, 0x8d9e, 0x8da0, 0x8da1, 0xfffd, 0x8da2, 0x8da4, 0x8da5, 0x8da6, 0x8da7, 0x8da8, 0x8da9, 0x8daa, 0x8dab, 0x8dac, 0x8dad, 0x8dae, 0x8daf, 0x8db0, 0x8db2, 0x8db6, 0x8db7, 0x8db9, 0x8dbb, 0x8dbd, 0x8dc0, 0x8dc1, 0x8dc2, 0x8dc5, 0x8dc7, 0x8dc8, 0x8dc9, 0x8dca, 0x8dcd, 0x8dd0, 0x8dd2, 0x8dd3, 0x8dd4, 0x51c7, 0x5196, 0x51a2, 0x51a5, 0x8ba0, 0x8ba6, 0x8ba7, 0x8baa, 0x8bb4, 0x8bb5, 0x8bb7, 0x8bc2, 0x8bc3, 0x8bcb, 0x8bcf, 0x8bce, 0x8bd2, 0x8bd3, 0x8bd4, 0x8bd6, 0x8bd8, 0x8bd9, 0x8bdc, 0x8bdf, 0x8be0, 0x8be4, 0x8be8, 0x8be9, 0x8bee, 0x8bf0, 0x8bf3, 0x8bf6, 0x8bf9, 0x8bfc, 0x8bff, 0x8c00, 0x8c02, 0x8c04, 0x8c07, 0x8c0c, 0x8c0f, 0x8c11, 0x8c12, 0x8c14, 0x8c15, 0x8c16, 0x8c19, 0x8c1b, 0x8c18, 0x8c1d, 0x8c1f, 0x8c20, 0x8c21, 0x8c25, 0x8c27, 0x8c2a, 0x8c2b, 0x8c2e, 0x8c2f, 0x8c32, 0x8c33, 0x8c35, 0x8c36, 0x5369, 0x537a, 0x961d, 0x9622, 0x9621, 0x9631, 0x962a, 0x963d, 0x963c, 0x9642, 0x9649, 0x9654, 0x965f, 0x9667, 0x966c, 0x9672, 0x9674, 0x9688, 0x968d, 0x9697, 0x96b0, 0x9097, 0x909b, 0x909d, 0x9099, 0x90ac, 0x90a1, 0x90b4, 0x90b3, 0x90b6, 0x90ba, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ 192 ] = { 0x8dd5, 0x8dd8, 0x8dd9, 0x8ddc, 0x8de0, 0x8de1, 0x8de2, 0x8de5, 0x8de6, 0x8de7, 0x8de9, 0x8ded, 0x8dee, 0x8df0, 0x8df1, 0x8df2, 0x8df4, 0x8df6, 0x8dfc, 0x8dfe, 0x8dff, 0x8e00, 0x8e01, 0x8e02, 0x8e03, 0x8e04, 0x8e06, 0x8e07, 0x8e08, 0x8e0b, 0x8e0d, 0x8e0e, 0x8e10, 0x8e11, 0x8e12, 0x8e13, 0x8e15, 0x8e16, 0x8e17, 0x8e18, 0x8e19, 0x8e1a, 0x8e1b, 0x8e1c, 0x8e20, 0x8e21, 0x8e24, 0x8e25, 0x8e26, 0x8e27, 0x8e28, 0x8e2b, 0x8e2d, 0x8e30, 0x8e32, 0x8e33, 0x8e34, 0x8e36, 0x8e37, 0x8e38, 0x8e3b, 0x8e3c, 0x8e3e, 0xfffd, 0x8e3f, 0x8e43, 0x8e45, 0x8e46, 0x8e4c, 0x8e4d, 0x8e4e, 0x8e4f, 0x8e50, 0x8e53, 0x8e54, 0x8e55, 0x8e56, 0x8e57, 0x8e58, 0x8e5a, 0x8e5b, 0x8e5c, 0x8e5d, 0x8e5e, 0x8e5f, 0x8e60, 0x8e61, 0x8e62, 0x8e63, 0x8e64, 0x8e65, 0x8e67, 0x8e68, 0x8e6a, 0x8e6b, 0x8e6e, 0x8e71, 0x90b8, 0x90b0, 0x90cf, 0x90c5, 0x90be, 0x90d0, 0x90c4, 0x90c7, 0x90d3, 0x90e6, 0x90e2, 0x90dc, 0x90d7, 0x90db, 0x90eb, 0x90ef, 0x90fe, 0x9104, 0x9122, 0x911e, 0x9123, 0x9131, 0x912f, 0x9139, 0x9143, 0x9146, 0x520d, 0x5942, 0x52a2, 0x52ac, 0x52ad, 0x52be, 0x54ff, 0x52d0, 0x52d6, 0x52f0, 0x53df, 0x71ee, 0x77cd, 0x5ef4, 0x51f5, 0x51fc, 0x9b2f, 0x53b6, 0x5f01, 0x755a, 0x5def, 0x574c, 0x57a9, 0x57a1, 0x587e, 0x58bc, 0x58c5, 0x58d1, 0x5729, 0x572c, 0x572a, 0x5733, 0x5739, 0x572e, 0x572f, 0x575c, 0x573b, 0x5742, 0x5769, 0x5785, 0x576b, 0x5786, 0x577c, 0x577b, 0x5768, 0x576d, 0x5776, 0x5773, 0x57ad, 0x57a4, 0x578c, 0x57b2, 0x57cf, 0x57a7, 0x57b4, 0x5793, 0x57a0, 0x57d5, 0x57d8, 0x57da, 0x57d9, 0x57d2, 0x57b8, 0x57f4, 0x57ef, 0x57f8, 0x57e4, 0x57dd, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ 192 ] = { 0x8e73, 0x8e75, 0x8e77, 0x8e78, 0x8e79, 0x8e7a, 0x8e7b, 0x8e7d, 0x8e7e, 0x8e80, 0x8e82, 0x8e83, 0x8e84, 0x8e86, 0x8e88, 0x8e89, 0x8e8a, 0x8e8b, 0x8e8c, 0x8e8d, 0x8e8e, 0x8e91, 0x8e92, 0x8e93, 0x8e95, 0x8e96, 0x8e97, 0x8e98, 0x8e99, 0x8e9a, 0x8e9b, 0x8e9d, 0x8e9f, 0x8ea0, 0x8ea1, 0x8ea2, 0x8ea3, 0x8ea4, 0x8ea5, 0x8ea6, 0x8ea7, 0x8ea8, 0x8ea9, 0x8eaa, 0x8ead, 0x8eae, 0x8eb0, 0x8eb1, 0x8eb3, 0x8eb4, 0x8eb5, 0x8eb6, 0x8eb7, 0x8eb8, 0x8eb9, 0x8ebb, 0x8ebc, 0x8ebd, 0x8ebe, 0x8ebf, 0x8ec0, 0x8ec1, 0x8ec2, 0xfffd, 0x8ec3, 0x8ec4, 0x8ec5, 0x8ec6, 0x8ec7, 0x8ec8, 0x8ec9, 0x8eca, 0x8ecb, 0x8ecc, 0x8ecd, 0x8ecf, 0x8ed0, 0x8ed1, 0x8ed2, 0x8ed3, 0x8ed4, 0x8ed5, 0x8ed6, 0x8ed7, 0x8ed8, 0x8ed9, 0x8eda, 0x8edb, 0x8edc, 0x8edd, 0x8ede, 0x8edf, 0x8ee0, 0x8ee1, 0x8ee2, 0x8ee3, 0x8ee4, 0x580b, 0x580d, 0x57fd, 0x57ed, 0x5800, 0x581e, 0x5819, 0x5844, 0x5820, 0x5865, 0x586c, 0x5881, 0x5889, 0x589a, 0x5880, 0x99a8, 0x9f19, 0x61ff, 0x8279, 0x827d, 0x827f, 0x828f, 0x828a, 0x82a8, 0x8284, 0x828e, 0x8291, 0x8297, 0x8299, 0x82ab, 0x82b8, 0x82be, 0x82b0, 0x82c8, 0x82ca, 0x82e3, 0x8298, 0x82b7, 0x82ae, 0x82cb, 0x82cc, 0x82c1, 0x82a9, 0x82b4, 0x82a1, 0x82aa, 0x829f, 0x82c4, 0x82ce, 0x82a4, 0x82e1, 0x8309, 0x82f7, 0x82e4, 0x830f, 0x8307, 0x82dc, 0x82f4, 0x82d2, 0x82d8, 0x830c, 0x82fb, 0x82d3, 0x8311, 0x831a, 0x8306, 0x8314, 0x8315, 0x82e0, 0x82d5, 0x831c, 0x8351, 0x835b, 0x835c, 0x8308, 0x8392, 0x833c, 0x8334, 0x8331, 0x839b, 0x835e, 0x832f, 0x834f, 0x8347, 0x8343, 0x835f, 0x8340, 0x8317, 0x8360, 0x832d, 0x833a, 0x8333, 0x8366, 0x8365, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ 192 ] = { 0x8ee5, 0x8ee6, 0x8ee7, 0x8ee8, 0x8ee9, 0x8eea, 0x8eeb, 0x8eec, 0x8eed, 0x8eee, 0x8eef, 0x8ef0, 0x8ef1, 0x8ef2, 0x8ef3, 0x8ef4, 0x8ef5, 0x8ef6, 0x8ef7, 0x8ef8, 0x8ef9, 0x8efa, 0x8efb, 0x8efc, 0x8efd, 0x8efe, 0x8eff, 0x8f00, 0x8f01, 0x8f02, 0x8f03, 0x8f04, 0x8f05, 0x8f06, 0x8f07, 0x8f08, 0x8f09, 0x8f0a, 0x8f0b, 0x8f0c, 0x8f0d, 0x8f0e, 0x8f0f, 0x8f10, 0x8f11, 0x8f12, 0x8f13, 0x8f14, 0x8f15, 0x8f16, 0x8f17, 0x8f18, 0x8f19, 0x8f1a, 0x8f1b, 0x8f1c, 0x8f1d, 0x8f1e, 0x8f1f, 0x8f20, 0x8f21, 0x8f22, 0x8f23, 0xfffd, 0x8f24, 0x8f25, 0x8f26, 0x8f27, 0x8f28, 0x8f29, 0x8f2a, 0x8f2b, 0x8f2c, 0x8f2d, 0x8f2e, 0x8f2f, 0x8f30, 0x8f31, 0x8f32, 0x8f33, 0x8f34, 0x8f35, 0x8f36, 0x8f37, 0x8f38, 0x8f39, 0x8f3a, 0x8f3b, 0x8f3c, 0x8f3d, 0x8f3e, 0x8f3f, 0x8f40, 0x8f41, 0x8f42, 0x8f43, 0x8f44, 0x8368, 0x831b, 0x8369, 0x836c, 0x836a, 0x836d, 0x836e, 0x83b0, 0x8378, 0x83b3, 0x83b4, 0x83a0, 0x83aa, 0x8393, 0x839c, 0x8385, 0x837c, 0x83b6, 0x83a9, 0x837d, 0x83b8, 0x837b, 0x8398, 0x839e, 0x83a8, 0x83ba, 0x83bc, 0x83c1, 0x8401, 0x83e5, 0x83d8, 0x5807, 0x8418, 0x840b, 0x83dd, 0x83fd, 0x83d6, 0x841c, 0x8438, 0x8411, 0x8406, 0x83d4, 0x83df, 0x840f, 0x8403, 0x83f8, 0x83f9, 0x83ea, 0x83c5, 0x83c0, 0x8426, 0x83f0, 0x83e1, 0x845c, 0x8451, 0x845a, 0x8459, 0x8473, 0x8487, 0x8488, 0x847a, 0x8489, 0x8478, 0x843c, 0x8446, 0x8469, 0x8476, 0x848c, 0x848e, 0x8431, 0x846d, 0x84c1, 0x84cd, 0x84d0, 0x84e6, 0x84bd, 0x84d3, 0x84ca, 0x84bf, 0x84ba, 0x84e0, 0x84a1, 0x84b9, 0x84b4, 0x8497, 0x84e5, 0x84e3, 0x850c, 0x750d, 0x8538, 0x84f0, 0x8539, 0x851f, 0x853a, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ 192 ] = { 0x8f45, 0x8f46, 0x8f47, 0x8f48, 0x8f49, 0x8f4a, 0x8f4b, 0x8f4c, 0x8f4d, 0x8f4e, 0x8f4f, 0x8f50, 0x8f51, 0x8f52, 0x8f53, 0x8f54, 0x8f55, 0x8f56, 0x8f57, 0x8f58, 0x8f59, 0x8f5a, 0x8f5b, 0x8f5c, 0x8f5d, 0x8f5e, 0x8f5f, 0x8f60, 0x8f61, 0x8f62, 0x8f63, 0x8f64, 0x8f65, 0x8f6a, 0x8f80, 0x8f8c, 0x8f92, 0x8f9d, 0x8fa0, 0x8fa1, 0x8fa2, 0x8fa4, 0x8fa5, 0x8fa6, 0x8fa7, 0x8faa, 0x8fac, 0x8fad, 0x8fae, 0x8faf, 0x8fb2, 0x8fb3, 0x8fb4, 0x8fb5, 0x8fb7, 0x8fb8, 0x8fba, 0x8fbb, 0x8fbc, 0x8fbf, 0x8fc0, 0x8fc3, 0x8fc6, 0xfffd, 0x8fc9, 0x8fca, 0x8fcb, 0x8fcc, 0x8fcd, 0x8fcf, 0x8fd2, 0x8fd6, 0x8fd7, 0x8fda, 0x8fe0, 0x8fe1, 0x8fe3, 0x8fe7, 0x8fec, 0x8fef, 0x8ff1, 0x8ff2, 0x8ff4, 0x8ff5, 0x8ff6, 0x8ffa, 0x8ffb, 0x8ffc, 0x8ffe, 0x8fff, 0x9007, 0x9008, 0x900c, 0x900e, 0x9013, 0x9015, 0x9018, 0x8556, 0x853b, 0x84ff, 0x84fc, 0x8559, 0x8548, 0x8568, 0x8564, 0x855e, 0x857a, 0x77a2, 0x8543, 0x8572, 0x857b, 0x85a4, 0x85a8, 0x8587, 0x858f, 0x8579, 0x85ae, 0x859c, 0x8585, 0x85b9, 0x85b7, 0x85b0, 0x85d3, 0x85c1, 0x85dc, 0x85ff, 0x8627, 0x8605, 0x8629, 0x8616, 0x863c, 0x5efe, 0x5f08, 0x593c, 0x5941, 0x8037, 0x5955, 0x595a, 0x5958, 0x530f, 0x5c22, 0x5c25, 0x5c2c, 0x5c34, 0x624c, 0x626a, 0x629f, 0x62bb, 0x62ca, 0x62da, 0x62d7, 0x62ee, 0x6322, 0x62f6, 0x6339, 0x634b, 0x6343, 0x63ad, 0x63f6, 0x6371, 0x637a, 0x638e, 0x63b4, 0x636d, 0x63ac, 0x638a, 0x6369, 0x63ae, 0x63bc, 0x63f2, 0x63f8, 0x63e0, 0x63ff, 0x63c4, 0x63de, 0x63ce, 0x6452, 0x63c6, 0x63be, 0x6445, 0x6441, 0x640b, 0x641b, 0x6420, 0x640c, 0x6426, 0x6421, 0x645e, 0x6484, 0x646d, 0x6496, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ 192 ] = { 0x9019, 0x901c, 0x9023, 0x9024, 0x9025, 0x9027, 0x9028, 0x9029, 0x902a, 0x902b, 0x902c, 0x9030, 0x9031, 0x9032, 0x9033, 0x9034, 0x9037, 0x9039, 0x903a, 0x903d, 0x903f, 0x9040, 0x9043, 0x9045, 0x9046, 0x9048, 0x9049, 0x904a, 0x904b, 0x904c, 0x904e, 0x9054, 0x9055, 0x9056, 0x9059, 0x905a, 0x905c, 0x905d, 0x905e, 0x905f, 0x9060, 0x9061, 0x9064, 0x9066, 0x9067, 0x9069, 0x906a, 0x906b, 0x906c, 0x906f, 0x9070, 0x9071, 0x9072, 0x9073, 0x9076, 0x9077, 0x9078, 0x9079, 0x907a, 0x907b, 0x907c, 0x907e, 0x9081, 0xfffd, 0x9084, 0x9085, 0x9086, 0x9087, 0x9089, 0x908a, 0x908c, 0x908d, 0x908e, 0x908f, 0x9090, 0x9092, 0x9094, 0x9096, 0x9098, 0x909a, 0x909c, 0x909e, 0x909f, 0x90a0, 0x90a4, 0x90a5, 0x90a7, 0x90a8, 0x90a9, 0x90ab, 0x90ad, 0x90b2, 0x90b7, 0x90bc, 0x90bd, 0x90bf, 0x90c0, 0x647a, 0x64b7, 0x64b8, 0x6499, 0x64ba, 0x64c0, 0x64d0, 0x64d7, 0x64e4, 0x64e2, 0x6509, 0x6525, 0x652e, 0x5f0b, 0x5fd2, 0x7519, 0x5f11, 0x535f, 0x53f1, 0x53fd, 0x53e9, 0x53e8, 0x53fb, 0x5412, 0x5416, 0x5406, 0x544b, 0x5452, 0x5453, 0x5454, 0x5456, 0x5443, 0x5421, 0x5457, 0x5459, 0x5423, 0x5432, 0x5482, 0x5494, 0x5477, 0x5471, 0x5464, 0x549a, 0x549b, 0x5484, 0x5476, 0x5466, 0x549d, 0x54d0, 0x54ad, 0x54c2, 0x54b4, 0x54d2, 0x54a7, 0x54a6, 0x54d3, 0x54d4, 0x5472, 0x54a3, 0x54d5, 0x54bb, 0x54bf, 0x54cc, 0x54d9, 0x54da, 0x54dc, 0x54a9, 0x54aa, 0x54a4, 0x54dd, 0x54cf, 0x54de, 0x551b, 0x54e7, 0x5520, 0x54fd, 0x5514, 0x54f3, 0x5522, 0x5523, 0x550f, 0x5511, 0x5527, 0x552a, 0x5567, 0x558f, 0x55b5, 0x5549, 0x556d, 0x5541, 0x5555, 0x553f, 0x5550, 0x553c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ 192 ] = { 0x90c2, 0x90c3, 0x90c6, 0x90c8, 0x90c9, 0x90cb, 0x90cc, 0x90cd, 0x90d2, 0x90d4, 0x90d5, 0x90d6, 0x90d8, 0x90d9, 0x90da, 0x90de, 0x90df, 0x90e0, 0x90e3, 0x90e4, 0x90e5, 0x90e9, 0x90ea, 0x90ec, 0x90ee, 0x90f0, 0x90f1, 0x90f2, 0x90f3, 0x90f5, 0x90f6, 0x90f7, 0x90f9, 0x90fa, 0x90fb, 0x90fc, 0x90ff, 0x9100, 0x9101, 0x9103, 0x9105, 0x9106, 0x9107, 0x9108, 0x9109, 0x910a, 0x910b, 0x910c, 0x910d, 0x910e, 0x910f, 0x9110, 0x9111, 0x9112, 0x9113, 0x9114, 0x9115, 0x9116, 0x9117, 0x9118, 0x911a, 0x911b, 0x911c, 0xfffd, 0x911d, 0x911f, 0x9120, 0x9121, 0x9124, 0x9125, 0x9126, 0x9127, 0x9128, 0x9129, 0x912a, 0x912b, 0x912c, 0x912d, 0x912e, 0x9130, 0x9132, 0x9133, 0x9134, 0x9135, 0x9136, 0x9137, 0x9138, 0x913a, 0x913b, 0x913c, 0x913d, 0x913e, 0x913f, 0x9140, 0x9141, 0x9142, 0x9144, 0x5537, 0x5556, 0x5575, 0x5576, 0x5577, 0x5533, 0x5530, 0x555c, 0x558b, 0x55d2, 0x5583, 0x55b1, 0x55b9, 0x5588, 0x5581, 0x559f, 0x557e, 0x55d6, 0x5591, 0x557b, 0x55df, 0x55bd, 0x55be, 0x5594, 0x5599, 0x55ea, 0x55f7, 0x55c9, 0x561f, 0x55d1, 0x55eb, 0x55ec, 0x55d4, 0x55e6, 0x55dd, 0x55c4, 0x55ef, 0x55e5, 0x55f2, 0x55f3, 0x55cc, 0x55cd, 0x55e8, 0x55f5, 0x55e4, 0x8f94, 0x561e, 0x5608, 0x560c, 0x5601, 0x5624, 0x5623, 0x55fe, 0x5600, 0x5627, 0x562d, 0x5658, 0x5639, 0x5657, 0x562c, 0x564d, 0x5662, 0x5659, 0x565c, 0x564c, 0x5654, 0x5686, 0x5664, 0x5671, 0x566b, 0x567b, 0x567c, 0x5685, 0x5693, 0x56af, 0x56d4, 0x56d7, 0x56dd, 0x56e1, 0x56f5, 0x56eb, 0x56f9, 0x56ff, 0x5704, 0x570a, 0x5709, 0x571c, 0x5e0f, 0x5e19, 0x5e14, 0x5e11, 0x5e31, 0x5e3b, 0x5e3c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ 192 ] = { 0x9145, 0x9147, 0x9148, 0x9151, 0x9153, 0x9154, 0x9155, 0x9156, 0x9158, 0x9159, 0x915b, 0x915c, 0x915f, 0x9160, 0x9166, 0x9167, 0x9168, 0x916b, 0x916d, 0x9173, 0x917a, 0x917b, 0x917c, 0x9180, 0x9181, 0x9182, 0x9183, 0x9184, 0x9186, 0x9188, 0x918a, 0x918e, 0x918f, 0x9193, 0x9194, 0x9195, 0x9196, 0x9197, 0x9198, 0x9199, 0x919c, 0x919d, 0x919e, 0x919f, 0x91a0, 0x91a1, 0x91a4, 0x91a5, 0x91a6, 0x91a7, 0x91a8, 0x91a9, 0x91ab, 0x91ac, 0x91b0, 0x91b1, 0x91b2, 0x91b3, 0x91b6, 0x91b7, 0x91b8, 0x91b9, 0x91bb, 0xfffd, 0x91bc, 0x91bd, 0x91be, 0x91bf, 0x91c0, 0x91c1, 0x91c2, 0x91c3, 0x91c4, 0x91c5, 0x91c6, 0x91c8, 0x91cb, 0x91d0, 0x91d2, 0x91d3, 0x91d4, 0x91d5, 0x91d6, 0x91d7, 0x91d8, 0x91d9, 0x91da, 0x91db, 0x91dd, 0x91de, 0x91df, 0x91e0, 0x91e1, 0x91e2, 0x91e3, 0x91e4, 0x91e5, 0x5e37, 0x5e44, 0x5e54, 0x5e5b, 0x5e5e, 0x5e61, 0x5c8c, 0x5c7a, 0x5c8d, 0x5c90, 0x5c96, 0x5c88, 0x5c98, 0x5c99, 0x5c91, 0x5c9a, 0x5c9c, 0x5cb5, 0x5ca2, 0x5cbd, 0x5cac, 0x5cab, 0x5cb1, 0x5ca3, 0x5cc1, 0x5cb7, 0x5cc4, 0x5cd2, 0x5ce4, 0x5ccb, 0x5ce5, 0x5d02, 0x5d03, 0x5d27, 0x5d26, 0x5d2e, 0x5d24, 0x5d1e, 0x5d06, 0x5d1b, 0x5d58, 0x5d3e, 0x5d34, 0x5d3d, 0x5d6c, 0x5d5b, 0x5d6f, 0x5d5d, 0x5d6b, 0x5d4b, 0x5d4a, 0x5d69, 0x5d74, 0x5d82, 0x5d99, 0x5d9d, 0x8c73, 0x5db7, 0x5dc5, 0x5f73, 0x5f77, 0x5f82, 0x5f87, 0x5f89, 0x5f8c, 0x5f95, 0x5f99, 0x5f9c, 0x5fa8, 0x5fad, 0x5fb5, 0x5fbc, 0x8862, 0x5f61, 0x72ad, 0x72b0, 0x72b4, 0x72b7, 0x72b8, 0x72c3, 0x72c1, 0x72ce, 0x72cd, 0x72d2, 0x72e8, 0x72ef, 0x72e9, 0x72f2, 0x72f4, 0x72f7, 0x7301, 0x72f3, 0x7303, 0x72fa, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ 192 ] = { 0x91e6, 0x91e7, 0x91e8, 0x91e9, 0x91ea, 0x91eb, 0x91ec, 0x91ed, 0x91ee, 0x91ef, 0x91f0, 0x91f1, 0x91f2, 0x91f3, 0x91f4, 0x91f5, 0x91f6, 0x91f7, 0x91f8, 0x91f9, 0x91fa, 0x91fb, 0x91fc, 0x91fd, 0x91fe, 0x91ff, 0x9200, 0x9201, 0x9202, 0x9203, 0x9204, 0x9205, 0x9206, 0x9207, 0x9208, 0x9209, 0x920a, 0x920b, 0x920c, 0x920d, 0x920e, 0x920f, 0x9210, 0x9211, 0x9212, 0x9213, 0x9214, 0x9215, 0x9216, 0x9217, 0x9218, 0x9219, 0x921a, 0x921b, 0x921c, 0x921d, 0x921e, 0x921f, 0x9220, 0x9221, 0x9222, 0x9223, 0x9224, 0xfffd, 0x9225, 0x9226, 0x9227, 0x9228, 0x9229, 0x922a, 0x922b, 0x922c, 0x922d, 0x922e, 0x922f, 0x9230, 0x9231, 0x9232, 0x9233, 0x9234, 0x9235, 0x9236, 0x9237, 0x9238, 0x9239, 0x923a, 0x923b, 0x923c, 0x923d, 0x923e, 0x923f, 0x9240, 0x9241, 0x9242, 0x9243, 0x9244, 0x9245, 0x72fb, 0x7317, 0x7313, 0x7321, 0x730a, 0x731e, 0x731d, 0x7315, 0x7322, 0x7339, 0x7325, 0x732c, 0x7338, 0x7331, 0x7350, 0x734d, 0x7357, 0x7360, 0x736c, 0x736f, 0x737e, 0x821b, 0x5925, 0x98e7, 0x5924, 0x5902, 0x9963, 0x9967, 0x9968, 0x9969, 0x996a, 0x996b, 0x996c, 0x9974, 0x9977, 0x997d, 0x9980, 0x9984, 0x9987, 0x998a, 0x998d, 0x9990, 0x9991, 0x9993, 0x9994, 0x9995, 0x5e80, 0x5e91, 0x5e8b, 0x5e96, 0x5ea5, 0x5ea0, 0x5eb9, 0x5eb5, 0x5ebe, 0x5eb3, 0x8d53, 0x5ed2, 0x5ed1, 0x5edb, 0x5ee8, 0x5eea, 0x81ba, 0x5fc4, 0x5fc9, 0x5fd6, 0x5fcf, 0x6003, 0x5fee, 0x6004, 0x5fe1, 0x5fe4, 0x5ffe, 0x6005, 0x6006, 0x5fea, 0x5fed, 0x5ff8, 0x6019, 0x6035, 0x6026, 0x601b, 0x600f, 0x600d, 0x6029, 0x602b, 0x600a, 0x603f, 0x6021, 0x6078, 0x6079, 0x607b, 0x607a, 0x6042, 0xfffd, }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ 192 ] = { 0x9246, 0x9247, 0x9248, 0x9249, 0x924a, 0x924b, 0x924c, 0x924d, 0x924e, 0x924f, 0x9250, 0x9251, 0x9252, 0x9253, 0x9254, 0x9255, 0x9256, 0x9257, 0x9258, 0x9259, 0x925a, 0x925b, 0x925c, 0x925d, 0x925e, 0x925f, 0x9260, 0x9261, 0x9262, 0x9263, 0x9264, 0x9265, 0x9266, 0x9267, 0x9268, 0x9269, 0x926a, 0x926b, 0x926c, 0x926d, 0x926e, 0x926f, 0x9270, 0x9271, 0x9272, 0x9273, 0x9275, 0x9276, 0x9277, 0x9278, 0x9279, 0x927a, 0x927b, 0x927c, 0x927d, 0x927e, 0x927f, 0x9280, 0x9281, 0x9282, 0x9283, 0x9284, 0x9285, 0xfffd, 0x9286, 0x9287, 0x9288, 0x9289, 0x928a, 0x928b, 0x928c, 0x928d, 0x928f, 0x9290, 0x9291, 0x9292, 0x9293, 0x9294, 0x9295, 0x9296, 0x9297, 0x9298, 0x9299, 0x929a, 0x929b, 0x929c, 0x929d, 0x929e, 0x929f, 0x92a0, 0x92a1, 0x92a2, 0x92a3, 0x92a4, 0x92a5, 0x92a6, 0x92a7, 0x606a, 0x607d, 0x6096, 0x609a, 0x60ad, 0x609d, 0x6083, 0x6092, 0x608c, 0x609b, 0x60ec, 0x60bb, 0x60b1, 0x60dd, 0x60d8, 0x60c6, 0x60da, 0x60b4, 0x6120, 0x6126, 0x6115, 0x6123, 0x60f4, 0x6100, 0x610e, 0x612b, 0x614a, 0x6175, 0x61ac, 0x6194, 0x61a7, 0x61b7, 0x61d4, 0x61f5, 0x5fdd, 0x96b3, 0x95e9, 0x95eb, 0x95f1, 0x95f3, 0x95f5, 0x95f6, 0x95fc, 0x95fe, 0x9603, 0x9604, 0x9606, 0x9608, 0x960a, 0x960b, 0x960c, 0x960d, 0x960f, 0x9612, 0x9615, 0x9616, 0x9617, 0x9619, 0x961a, 0x4e2c, 0x723f, 0x6215, 0x6c35, 0x6c54, 0x6c5c, 0x6c4a, 0x6ca3, 0x6c85, 0x6c90, 0x6c94, 0x6c8c, 0x6c68, 0x6c69, 0x6c74, 0x6c76, 0x6c86, 0x6ca9, 0x6cd0, 0x6cd4, 0x6cad, 0x6cf7, 0x6cf8, 0x6cf1, 0x6cd7, 0x6cb2, 0x6ce0, 0x6cd6, 0x6cfa, 0x6ceb, 0x6cee, 0x6cb1, 0x6cd3, 0x6cef, 0x6cfe, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ 192 ] = { 0x92a8, 0x92a9, 0x92aa, 0x92ab, 0x92ac, 0x92ad, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92b3, 0x92b4, 0x92b5, 0x92b6, 0x92b7, 0x92b8, 0x92b9, 0x92ba, 0x92bb, 0x92bc, 0x92bd, 0x92be, 0x92bf, 0x92c0, 0x92c1, 0x92c2, 0x92c3, 0x92c4, 0x92c5, 0x92c6, 0x92c7, 0x92c9, 0x92ca, 0x92cb, 0x92cc, 0x92cd, 0x92ce, 0x92cf, 0x92d0, 0x92d1, 0x92d2, 0x92d3, 0x92d4, 0x92d5, 0x92d6, 0x92d7, 0x92d8, 0x92d9, 0x92da, 0x92db, 0x92dc, 0x92dd, 0x92de, 0x92df, 0x92e0, 0x92e1, 0x92e2, 0x92e3, 0x92e4, 0x92e5, 0x92e6, 0x92e7, 0x92e8, 0xfffd, 0x92e9, 0x92ea, 0x92eb, 0x92ec, 0x92ed, 0x92ee, 0x92ef, 0x92f0, 0x92f1, 0x92f2, 0x92f3, 0x92f4, 0x92f5, 0x92f6, 0x92f7, 0x92f8, 0x92f9, 0x92fa, 0x92fb, 0x92fc, 0x92fd, 0x92fe, 0x92ff, 0x9300, 0x9301, 0x9302, 0x9303, 0x9304, 0x9305, 0x9306, 0x9307, 0x9308, 0x9309, 0x6d39, 0x6d27, 0x6d0c, 0x6d43, 0x6d48, 0x6d07, 0x6d04, 0x6d19, 0x6d0e, 0x6d2b, 0x6d4d, 0x6d2e, 0x6d35, 0x6d1a, 0x6d4f, 0x6d52, 0x6d54, 0x6d33, 0x6d91, 0x6d6f, 0x6d9e, 0x6da0, 0x6d5e, 0x6d93, 0x6d94, 0x6d5c, 0x6d60, 0x6d7c, 0x6d63, 0x6e1a, 0x6dc7, 0x6dc5, 0x6dde, 0x6e0e, 0x6dbf, 0x6de0, 0x6e11, 0x6de6, 0x6ddd, 0x6dd9, 0x6e16, 0x6dab, 0x6e0c, 0x6dae, 0x6e2b, 0x6e6e, 0x6e4e, 0x6e6b, 0x6eb2, 0x6e5f, 0x6e86, 0x6e53, 0x6e54, 0x6e32, 0x6e25, 0x6e44, 0x6edf, 0x6eb1, 0x6e98, 0x6ee0, 0x6f2d, 0x6ee2, 0x6ea5, 0x6ea7, 0x6ebd, 0x6ebb, 0x6eb7, 0x6ed7, 0x6eb4, 0x6ecf, 0x6e8f, 0x6ec2, 0x6e9f, 0x6f62, 0x6f46, 0x6f47, 0x6f24, 0x6f15, 0x6ef9, 0x6f2f, 0x6f36, 0x6f4b, 0x6f74, 0x6f2a, 0x6f09, 0x6f29, 0x6f89, 0x6f8d, 0x6f8c, 0x6f78, 0x6f72, 0x6f7c, 0x6f7a, 0x6fd1, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ 192 ] = { 0x930a, 0x930b, 0x930c, 0x930d, 0x930e, 0x930f, 0x9310, 0x9311, 0x9312, 0x9313, 0x9314, 0x9315, 0x9316, 0x9317, 0x9318, 0x9319, 0x931a, 0x931b, 0x931c, 0x931d, 0x931e, 0x931f, 0x9320, 0x9321, 0x9322, 0x9323, 0x9324, 0x9325, 0x9326, 0x9327, 0x9328, 0x9329, 0x932a, 0x932b, 0x932c, 0x932d, 0x932e, 0x932f, 0x9330, 0x9331, 0x9332, 0x9333, 0x9334, 0x9335, 0x9336, 0x9337, 0x9338, 0x9339, 0x933a, 0x933b, 0x933c, 0x933d, 0x933f, 0x9340, 0x9341, 0x9342, 0x9343, 0x9344, 0x9345, 0x9346, 0x9347, 0x9348, 0x9349, 0xfffd, 0x934a, 0x934b, 0x934c, 0x934d, 0x934e, 0x934f, 0x9350, 0x9351, 0x9352, 0x9353, 0x9354, 0x9355, 0x9356, 0x9357, 0x9358, 0x9359, 0x935a, 0x935b, 0x935c, 0x935d, 0x935e, 0x935f, 0x9360, 0x9361, 0x9362, 0x9363, 0x9364, 0x9365, 0x9366, 0x9367, 0x9368, 0x9369, 0x936b, 0x6fc9, 0x6fa7, 0x6fb9, 0x6fb6, 0x6fc2, 0x6fe1, 0x6fee, 0x6fde, 0x6fe0, 0x6fef, 0x701a, 0x7023, 0x701b, 0x7039, 0x7035, 0x704f, 0x705e, 0x5b80, 0x5b84, 0x5b95, 0x5b93, 0x5ba5, 0x5bb8, 0x752f, 0x9a9e, 0x6434, 0x5be4, 0x5bee, 0x8930, 0x5bf0, 0x8e47, 0x8b07, 0x8fb6, 0x8fd3, 0x8fd5, 0x8fe5, 0x8fee, 0x8fe4, 0x8fe9, 0x8fe6, 0x8ff3, 0x8fe8, 0x9005, 0x9004, 0x900b, 0x9026, 0x9011, 0x900d, 0x9016, 0x9021, 0x9035, 0x9036, 0x902d, 0x902f, 0x9044, 0x9051, 0x9052, 0x9050, 0x9068, 0x9058, 0x9062, 0x905b, 0x66b9, 0x9074, 0x907d, 0x9082, 0x9088, 0x9083, 0x908b, 0x5f50, 0x5f57, 0x5f56, 0x5f58, 0x5c3b, 0x54ab, 0x5c50, 0x5c59, 0x5b71, 0x5c63, 0x5c66, 0x7fbc, 0x5f2a, 0x5f29, 0x5f2d, 0x8274, 0x5f3c, 0x9b3b, 0x5c6e, 0x5981, 0x5983, 0x598d, 0x59a9, 0x59aa, 0x59a3, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ 192 ] = { 0x936c, 0x936d, 0x936e, 0x936f, 0x9370, 0x9371, 0x9372, 0x9373, 0x9374, 0x9375, 0x9376, 0x9377, 0x9378, 0x9379, 0x937a, 0x937b, 0x937c, 0x937d, 0x937e, 0x937f, 0x9380, 0x9381, 0x9382, 0x9383, 0x9384, 0x9385, 0x9386, 0x9387, 0x9388, 0x9389, 0x938a, 0x938b, 0x938c, 0x938d, 0x938e, 0x9390, 0x9391, 0x9392, 0x9393, 0x9394, 0x9395, 0x9396, 0x9397, 0x9398, 0x9399, 0x939a, 0x939b, 0x939c, 0x939d, 0x939e, 0x939f, 0x93a0, 0x93a1, 0x93a2, 0x93a3, 0x93a4, 0x93a5, 0x93a6, 0x93a7, 0x93a8, 0x93a9, 0x93aa, 0x93ab, 0xfffd, 0x93ac, 0x93ad, 0x93ae, 0x93af, 0x93b0, 0x93b1, 0x93b2, 0x93b3, 0x93b4, 0x93b5, 0x93b6, 0x93b7, 0x93b8, 0x93b9, 0x93ba, 0x93bb, 0x93bc, 0x93bd, 0x93be, 0x93bf, 0x93c0, 0x93c1, 0x93c2, 0x93c3, 0x93c4, 0x93c5, 0x93c6, 0x93c7, 0x93c8, 0x93c9, 0x93cb, 0x93cc, 0x93cd, 0x5997, 0x59ca, 0x59ab, 0x599e, 0x59a4, 0x59d2, 0x59b2, 0x59af, 0x59d7, 0x59be, 0x5a05, 0x5a06, 0x59dd, 0x5a08, 0x59e3, 0x59d8, 0x59f9, 0x5a0c, 0x5a09, 0x5a32, 0x5a34, 0x5a11, 0x5a23, 0x5a13, 0x5a40, 0x5a67, 0x5a4a, 0x5a55, 0x5a3c, 0x5a62, 0x5a75, 0x80ec, 0x5aaa, 0x5a9b, 0x5a77, 0x5a7a, 0x5abe, 0x5aeb, 0x5ab2, 0x5ad2, 0x5ad4, 0x5ab8, 0x5ae0, 0x5ae3, 0x5af1, 0x5ad6, 0x5ae6, 0x5ad8, 0x5adc, 0x5b09, 0x5b17, 0x5b16, 0x5b32, 0x5b37, 0x5b40, 0x5c15, 0x5c1c, 0x5b5a, 0x5b65, 0x5b73, 0x5b51, 0x5b53, 0x5b62, 0x9a75, 0x9a77, 0x9a78, 0x9a7a, 0x9a7f, 0x9a7d, 0x9a80, 0x9a81, 0x9a85, 0x9a88, 0x9a8a, 0x9a90, 0x9a92, 0x9a93, 0x9a96, 0x9a98, 0x9a9b, 0x9a9c, 0x9a9d, 0x9a9f, 0x9aa0, 0x9aa2, 0x9aa3, 0x9aa5, 0x9aa7, 0x7e9f, 0x7ea1, 0x7ea3, 0x7ea5, 0x7ea8, 0x7ea9, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ 192 ] = { 0x93ce, 0x93cf, 0x93d0, 0x93d1, 0x93d2, 0x93d3, 0x93d4, 0x93d5, 0x93d7, 0x93d8, 0x93d9, 0x93da, 0x93db, 0x93dc, 0x93dd, 0x93de, 0x93df, 0x93e0, 0x93e1, 0x93e2, 0x93e3, 0x93e4, 0x93e5, 0x93e6, 0x93e7, 0x93e8, 0x93e9, 0x93ea, 0x93eb, 0x93ec, 0x93ed, 0x93ee, 0x93ef, 0x93f0, 0x93f1, 0x93f2, 0x93f3, 0x93f4, 0x93f5, 0x93f6, 0x93f7, 0x93f8, 0x93f9, 0x93fa, 0x93fb, 0x93fc, 0x93fd, 0x93fe, 0x93ff, 0x9400, 0x9401, 0x9402, 0x9403, 0x9404, 0x9405, 0x9406, 0x9407, 0x9408, 0x9409, 0x940a, 0x940b, 0x940c, 0x940d, 0xfffd, 0x940e, 0x940f, 0x9410, 0x9411, 0x9412, 0x9413, 0x9414, 0x9415, 0x9416, 0x9417, 0x9418, 0x9419, 0x941a, 0x941b, 0x941c, 0x941d, 0x941e, 0x941f, 0x9420, 0x9421, 0x9422, 0x9423, 0x9424, 0x9425, 0x9426, 0x9427, 0x9428, 0x9429, 0x942a, 0x942b, 0x942c, 0x942d, 0x942e, 0x7ead, 0x7eb0, 0x7ebe, 0x7ec0, 0x7ec1, 0x7ec2, 0x7ec9, 0x7ecb, 0x7ecc, 0x7ed0, 0x7ed4, 0x7ed7, 0x7edb, 0x7ee0, 0x7ee1, 0x7ee8, 0x7eeb, 0x7eee, 0x7eef, 0x7ef1, 0x7ef2, 0x7f0d, 0x7ef6, 0x7efa, 0x7efb, 0x7efe, 0x7f01, 0x7f02, 0x7f03, 0x7f07, 0x7f08, 0x7f0b, 0x7f0c, 0x7f0f, 0x7f11, 0x7f12, 0x7f17, 0x7f19, 0x7f1c, 0x7f1b, 0x7f1f, 0x7f21, 0x7f22, 0x7f23, 0x7f24, 0x7f25, 0x7f26, 0x7f27, 0x7f2a, 0x7f2b, 0x7f2c, 0x7f2d, 0x7f2f, 0x7f30, 0x7f31, 0x7f32, 0x7f33, 0x7f35, 0x5e7a, 0x757f, 0x5ddb, 0x753e, 0x9095, 0x738e, 0x7391, 0x73ae, 0x73a2, 0x739f, 0x73cf, 0x73c2, 0x73d1, 0x73b7, 0x73b3, 0x73c0, 0x73c9, 0x73c8, 0x73e5, 0x73d9, 0x987c, 0x740a, 0x73e9, 0x73e7, 0x73de, 0x73ba, 0x73f2, 0x740f, 0x742a, 0x745b, 0x7426, 0x7425, 0x7428, 0x7430, 0x742e, 0x742c, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ 192 ] = { 0x942f, 0x9430, 0x9431, 0x9432, 0x9433, 0x9434, 0x9435, 0x9436, 0x9437, 0x9438, 0x9439, 0x943a, 0x943b, 0x943c, 0x943d, 0x943f, 0x9440, 0x9441, 0x9442, 0x9443, 0x9444, 0x9445, 0x9446, 0x9447, 0x9448, 0x9449, 0x944a, 0x944b, 0x944c, 0x944d, 0x944e, 0x944f, 0x9450, 0x9451, 0x9452, 0x9453, 0x9454, 0x9455, 0x9456, 0x9457, 0x9458, 0x9459, 0x945a, 0x945b, 0x945c, 0x945d, 0x945e, 0x945f, 0x9460, 0x9461, 0x9462, 0x9463, 0x9464, 0x9465, 0x9466, 0x9467, 0x9468, 0x9469, 0x946a, 0x946c, 0x946d, 0x946e, 0x946f, 0xfffd, 0x9470, 0x9471, 0x9472, 0x9473, 0x9474, 0x9475, 0x9476, 0x9477, 0x9478, 0x9479, 0x947a, 0x947b, 0x947c, 0x947d, 0x947e, 0x947f, 0x9480, 0x9481, 0x9482, 0x9483, 0x9484, 0x9491, 0x9496, 0x9498, 0x94c7, 0x94cf, 0x94d3, 0x94d4, 0x94da, 0x94e6, 0x94fb, 0x951c, 0x9520, 0x741b, 0x741a, 0x7441, 0x745c, 0x7457, 0x7455, 0x7459, 0x7477, 0x746d, 0x747e, 0x749c, 0x748e, 0x7480, 0x7481, 0x7487, 0x748b, 0x749e, 0x74a8, 0x74a9, 0x7490, 0x74a7, 0x74d2, 0x74ba, 0x97ea, 0x97eb, 0x97ec, 0x674c, 0x6753, 0x675e, 0x6748, 0x6769, 0x67a5, 0x6787, 0x676a, 0x6773, 0x6798, 0x67a7, 0x6775, 0x67a8, 0x679e, 0x67ad, 0x678b, 0x6777, 0x677c, 0x67f0, 0x6809, 0x67d8, 0x680a, 0x67e9, 0x67b0, 0x680c, 0x67d9, 0x67b5, 0x67da, 0x67b3, 0x67dd, 0x6800, 0x67c3, 0x67b8, 0x67e2, 0x680e, 0x67c1, 0x67fd, 0x6832, 0x6833, 0x6860, 0x6861, 0x684e, 0x6862, 0x6844, 0x6864, 0x6883, 0x681d, 0x6855, 0x6866, 0x6841, 0x6867, 0x6840, 0x683e, 0x684a, 0x6849, 0x6829, 0x68b5, 0x688f, 0x6874, 0x6877, 0x6893, 0x686b, 0x68c2, 0x696e, 0x68fc, 0x691f, 0x6920, 0x68f9, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ 192 ] = { 0x9527, 0x9533, 0x953d, 0x9543, 0x9548, 0x954b, 0x9555, 0x955a, 0x9560, 0x956e, 0x9574, 0x9575, 0x9577, 0x9578, 0x9579, 0x957a, 0x957b, 0x957c, 0x957d, 0x957e, 0x9580, 0x9581, 0x9582, 0x9583, 0x9584, 0x9585, 0x9586, 0x9587, 0x9588, 0x9589, 0x958a, 0x958b, 0x958c, 0x958d, 0x958e, 0x958f, 0x9590, 0x9591, 0x9592, 0x9593, 0x9594, 0x9595, 0x9596, 0x9597, 0x9598, 0x9599, 0x959a, 0x959b, 0x959c, 0x959d, 0x959e, 0x959f, 0x95a0, 0x95a1, 0x95a2, 0x95a3, 0x95a4, 0x95a5, 0x95a6, 0x95a7, 0x95a8, 0x95a9, 0x95aa, 0xfffd, 0x95ab, 0x95ac, 0x95ad, 0x95ae, 0x95af, 0x95b0, 0x95b1, 0x95b2, 0x95b3, 0x95b4, 0x95b5, 0x95b6, 0x95b7, 0x95b8, 0x95b9, 0x95ba, 0x95bb, 0x95bc, 0x95bd, 0x95be, 0x95bf, 0x95c0, 0x95c1, 0x95c2, 0x95c3, 0x95c4, 0x95c5, 0x95c6, 0x95c7, 0x95c8, 0x95c9, 0x95ca, 0x95cb, 0x6924, 0x68f0, 0x690b, 0x6901, 0x6957, 0x68e3, 0x6910, 0x6971, 0x6939, 0x6960, 0x6942, 0x695d, 0x6984, 0x696b, 0x6980, 0x6998, 0x6978, 0x6934, 0x69cc, 0x6987, 0x6988, 0x69ce, 0x6989, 0x6966, 0x6963, 0x6979, 0x699b, 0x69a7, 0x69bb, 0x69ab, 0x69ad, 0x69d4, 0x69b1, 0x69c1, 0x69ca, 0x69df, 0x6995, 0x69e0, 0x698d, 0x69ff, 0x6a2f, 0x69ed, 0x6a17, 0x6a18, 0x6a65, 0x69f2, 0x6a44, 0x6a3e, 0x6aa0, 0x6a50, 0x6a5b, 0x6a35, 0x6a8e, 0x6a79, 0x6a3d, 0x6a28, 0x6a58, 0x6a7c, 0x6a91, 0x6a90, 0x6aa9, 0x6a97, 0x6aab, 0x7337, 0x7352, 0x6b81, 0x6b82, 0x6b87, 0x6b84, 0x6b92, 0x6b93, 0x6b8d, 0x6b9a, 0x6b9b, 0x6ba1, 0x6baa, 0x8f6b, 0x8f6d, 0x8f71, 0x8f72, 0x8f73, 0x8f75, 0x8f76, 0x8f78, 0x8f77, 0x8f79, 0x8f7a, 0x8f7c, 0x8f7e, 0x8f81, 0x8f82, 0x8f84, 0x8f87, 0x8f8b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ 192 ] = { 0x95cc, 0x95cd, 0x95ce, 0x95cf, 0x95d0, 0x95d1, 0x95d2, 0x95d3, 0x95d4, 0x95d5, 0x95d6, 0x95d7, 0x95d8, 0x95d9, 0x95da, 0x95db, 0x95dc, 0x95dd, 0x95de, 0x95df, 0x95e0, 0x95e1, 0x95e2, 0x95e3, 0x95e4, 0x95e5, 0x95e6, 0x95e7, 0x95ec, 0x95ff, 0x9607, 0x9613, 0x9618, 0x961b, 0x961e, 0x9620, 0x9623, 0x9624, 0x9625, 0x9626, 0x9627, 0x9628, 0x9629, 0x962b, 0x962c, 0x962d, 0x962f, 0x9630, 0x9637, 0x9638, 0x9639, 0x963a, 0x963e, 0x9641, 0x9643, 0x964a, 0x964e, 0x964f, 0x9651, 0x9652, 0x9653, 0x9656, 0x9657, 0xfffd, 0x9658, 0x9659, 0x965a, 0x965c, 0x965d, 0x965e, 0x9660, 0x9663, 0x9665, 0x9666, 0x966b, 0x966d, 0x966e, 0x966f, 0x9670, 0x9671, 0x9673, 0x9678, 0x9679, 0x967a, 0x967b, 0x967c, 0x967d, 0x967e, 0x967f, 0x9680, 0x9681, 0x9682, 0x9683, 0x9684, 0x9687, 0x9689, 0x968a, 0x8f8d, 0x8f8e, 0x8f8f, 0x8f98, 0x8f9a, 0x8ece, 0x620b, 0x6217, 0x621b, 0x621f, 0x6222, 0x6221, 0x6225, 0x6224, 0x622c, 0x81e7, 0x74ef, 0x74f4, 0x74ff, 0x750f, 0x7511, 0x7513, 0x6534, 0x65ee, 0x65ef, 0x65f0, 0x660a, 0x6619, 0x6772, 0x6603, 0x6615, 0x6600, 0x7085, 0x66f7, 0x661d, 0x6634, 0x6631, 0x6636, 0x6635, 0x8006, 0x665f, 0x6654, 0x6641, 0x664f, 0x6656, 0x6661, 0x6657, 0x6677, 0x6684, 0x668c, 0x66a7, 0x669d, 0x66be, 0x66db, 0x66dc, 0x66e6, 0x66e9, 0x8d32, 0x8d33, 0x8d36, 0x8d3b, 0x8d3d, 0x8d40, 0x8d45, 0x8d46, 0x8d48, 0x8d49, 0x8d47, 0x8d4d, 0x8d55, 0x8d59, 0x89c7, 0x89ca, 0x89cb, 0x89cc, 0x89ce, 0x89cf, 0x89d0, 0x89d1, 0x726e, 0x729f, 0x725d, 0x7266, 0x726f, 0x727e, 0x727f, 0x7284, 0x728b, 0x728d, 0x728f, 0x7292, 0x6308, 0x6332, 0x63b0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ 192 ] = { 0x968c, 0x968e, 0x9691, 0x9692, 0x9693, 0x9695, 0x9696, 0x969a, 0x969b, 0x969d, 0x969e, 0x969f, 0x96a0, 0x96a1, 0x96a2, 0x96a3, 0x96a4, 0x96a5, 0x96a6, 0x96a8, 0x96a9, 0x96aa, 0x96ab, 0x96ac, 0x96ad, 0x96ae, 0x96af, 0x96b1, 0x96b2, 0x96b4, 0x96b5, 0x96b7, 0x96b8, 0x96ba, 0x96bb, 0x96bf, 0x96c2, 0x96c3, 0x96c8, 0x96ca, 0x96cb, 0x96d0, 0x96d1, 0x96d3, 0x96d4, 0x96d6, 0x96d7, 0x96d8, 0x96d9, 0x96da, 0x96db, 0x96dc, 0x96dd, 0x96de, 0x96df, 0x96e1, 0x96e2, 0x96e3, 0x96e4, 0x96e5, 0x96e6, 0x96e7, 0x96eb, 0xfffd, 0x96ec, 0x96ed, 0x96ee, 0x96f0, 0x96f1, 0x96f2, 0x96f4, 0x96f5, 0x96f8, 0x96fa, 0x96fb, 0x96fc, 0x96fd, 0x96ff, 0x9702, 0x9703, 0x9705, 0x970a, 0x970b, 0x970c, 0x9710, 0x9711, 0x9712, 0x9714, 0x9715, 0x9717, 0x9718, 0x9719, 0x971a, 0x971b, 0x971d, 0x971f, 0x9720, 0x643f, 0x64d8, 0x8004, 0x6bea, 0x6bf3, 0x6bfd, 0x6bf5, 0x6bf9, 0x6c05, 0x6c07, 0x6c06, 0x6c0d, 0x6c15, 0x6c18, 0x6c19, 0x6c1a, 0x6c21, 0x6c29, 0x6c24, 0x6c2a, 0x6c32, 0x6535, 0x6555, 0x656b, 0x724d, 0x7252, 0x7256, 0x7230, 0x8662, 0x5216, 0x809f, 0x809c, 0x8093, 0x80bc, 0x670a, 0x80bd, 0x80b1, 0x80ab, 0x80ad, 0x80b4, 0x80b7, 0x80e7, 0x80e8, 0x80e9, 0x80ea, 0x80db, 0x80c2, 0x80c4, 0x80d9, 0x80cd, 0x80d7, 0x6710, 0x80dd, 0x80eb, 0x80f1, 0x80f4, 0x80ed, 0x810d, 0x810e, 0x80f2, 0x80fc, 0x6715, 0x8112, 0x8c5a, 0x8136, 0x811e, 0x812c, 0x8118, 0x8132, 0x8148, 0x814c, 0x8153, 0x8174, 0x8159, 0x815a, 0x8171, 0x8160, 0x8169, 0x817c, 0x817d, 0x816d, 0x8167, 0x584d, 0x5ab5, 0x8188, 0x8182, 0x8191, 0x6ed5, 0x81a3, 0x81aa, 0x81cc, 0x6726, 0x81ca, 0x81bb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ 192 ] = { 0x9721, 0x9722, 0x9723, 0x9724, 0x9725, 0x9726, 0x9727, 0x9728, 0x9729, 0x972b, 0x972c, 0x972e, 0x972f, 0x9731, 0x9733, 0x9734, 0x9735, 0x9736, 0x9737, 0x973a, 0x973b, 0x973c, 0x973d, 0x973f, 0x9740, 0x9741, 0x9742, 0x9743, 0x9744, 0x9745, 0x9746, 0x9747, 0x9748, 0x9749, 0x974a, 0x974b, 0x974c, 0x974d, 0x974e, 0x974f, 0x9750, 0x9751, 0x9754, 0x9755, 0x9757, 0x9758, 0x975a, 0x975c, 0x975d, 0x975f, 0x9763, 0x9764, 0x9766, 0x9767, 0x9768, 0x976a, 0x976b, 0x976c, 0x976d, 0x976e, 0x976f, 0x9770, 0x9771, 0xfffd, 0x9772, 0x9775, 0x9777, 0x9778, 0x9779, 0x977a, 0x977b, 0x977d, 0x977e, 0x977f, 0x9780, 0x9781, 0x9782, 0x9783, 0x9784, 0x9786, 0x9787, 0x9788, 0x9789, 0x978a, 0x978c, 0x978e, 0x978f, 0x9790, 0x9793, 0x9795, 0x9796, 0x9797, 0x9799, 0x979a, 0x979b, 0x979c, 0x979d, 0x81c1, 0x81a6, 0x6b24, 0x6b37, 0x6b39, 0x6b43, 0x6b46, 0x6b59, 0x98d1, 0x98d2, 0x98d3, 0x98d5, 0x98d9, 0x98da, 0x6bb3, 0x5f40, 0x6bc2, 0x89f3, 0x6590, 0x9f51, 0x6593, 0x65bc, 0x65c6, 0x65c4, 0x65c3, 0x65cc, 0x65ce, 0x65d2, 0x65d6, 0x7080, 0x709c, 0x7096, 0x709d, 0x70bb, 0x70c0, 0x70b7, 0x70ab, 0x70b1, 0x70e8, 0x70ca, 0x7110, 0x7113, 0x7116, 0x712f, 0x7131, 0x7173, 0x715c, 0x7168, 0x7145, 0x7172, 0x714a, 0x7178, 0x717a, 0x7198, 0x71b3, 0x71b5, 0x71a8, 0x71a0, 0x71e0, 0x71d4, 0x71e7, 0x71f9, 0x721d, 0x7228, 0x706c, 0x7118, 0x7166, 0x71b9, 0x623e, 0x623d, 0x6243, 0x6248, 0x6249, 0x793b, 0x7940, 0x7946, 0x7949, 0x795b, 0x795c, 0x7953, 0x795a, 0x7962, 0x7957, 0x7960, 0x796f, 0x7967, 0x797a, 0x7985, 0x798a, 0x799a, 0x79a7, 0x79b3, 0x5fd1, 0x5fd0, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ 192 ] = { 0x979e, 0x979f, 0x97a1, 0x97a2, 0x97a4, 0x97a5, 0x97a6, 0x97a7, 0x97a8, 0x97a9, 0x97aa, 0x97ac, 0x97ae, 0x97b0, 0x97b1, 0x97b3, 0x97b5, 0x97b6, 0x97b7, 0x97b8, 0x97b9, 0x97ba, 0x97bb, 0x97bc, 0x97bd, 0x97be, 0x97bf, 0x97c0, 0x97c1, 0x97c2, 0x97c3, 0x97c4, 0x97c5, 0x97c6, 0x97c7, 0x97c8, 0x97c9, 0x97ca, 0x97cb, 0x97cc, 0x97cd, 0x97ce, 0x97cf, 0x97d0, 0x97d1, 0x97d2, 0x97d3, 0x97d4, 0x97d5, 0x97d6, 0x97d7, 0x97d8, 0x97d9, 0x97da, 0x97db, 0x97dc, 0x97dd, 0x97de, 0x97df, 0x97e0, 0x97e1, 0x97e2, 0x97e3, 0xfffd, 0x97e4, 0x97e5, 0x97e8, 0x97ee, 0x97ef, 0x97f0, 0x97f1, 0x97f2, 0x97f4, 0x97f7, 0x97f8, 0x97f9, 0x97fa, 0x97fb, 0x97fc, 0x97fd, 0x97fe, 0x97ff, 0x9800, 0x9801, 0x9802, 0x9803, 0x9804, 0x9805, 0x9806, 0x9807, 0x9808, 0x9809, 0x980a, 0x980b, 0x980c, 0x980d, 0x980e, 0x603c, 0x605d, 0x605a, 0x6067, 0x6041, 0x6059, 0x6063, 0x60ab, 0x6106, 0x610d, 0x615d, 0x61a9, 0x619d, 0x61cb, 0x61d1, 0x6206, 0x8080, 0x807f, 0x6c93, 0x6cf6, 0x6dfc, 0x77f6, 0x77f8, 0x7800, 0x7809, 0x7817, 0x7818, 0x7811, 0x65ab, 0x782d, 0x781c, 0x781d, 0x7839, 0x783a, 0x783b, 0x781f, 0x783c, 0x7825, 0x782c, 0x7823, 0x7829, 0x784e, 0x786d, 0x7856, 0x7857, 0x7826, 0x7850, 0x7847, 0x784c, 0x786a, 0x789b, 0x7893, 0x789a, 0x7887, 0x789c, 0x78a1, 0x78a3, 0x78b2, 0x78b9, 0x78a5, 0x78d4, 0x78d9, 0x78c9, 0x78ec, 0x78f2, 0x7905, 0x78f4, 0x7913, 0x7924, 0x791e, 0x7934, 0x9f9b, 0x9ef9, 0x9efb, 0x9efc, 0x76f1, 0x7704, 0x770d, 0x76f9, 0x7707, 0x7708, 0x771a, 0x7722, 0x7719, 0x772d, 0x7726, 0x7735, 0x7738, 0x7750, 0x7751, 0x7747, 0x7743, 0x775a, 0x7768, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ 192 ] = { 0x980f, 0x9810, 0x9811, 0x9812, 0x9813, 0x9814, 0x9815, 0x9816, 0x9817, 0x9818, 0x9819, 0x981a, 0x981b, 0x981c, 0x981d, 0x981e, 0x981f, 0x9820, 0x9821, 0x9822, 0x9823, 0x9824, 0x9825, 0x9826, 0x9827, 0x9828, 0x9829, 0x982a, 0x982b, 0x982c, 0x982d, 0x982e, 0x982f, 0x9830, 0x9831, 0x9832, 0x9833, 0x9834, 0x9835, 0x9836, 0x9837, 0x9838, 0x9839, 0x983a, 0x983b, 0x983c, 0x983d, 0x983e, 0x983f, 0x9840, 0x9841, 0x9842, 0x9843, 0x9844, 0x9845, 0x9846, 0x9847, 0x9848, 0x9849, 0x984a, 0x984b, 0x984c, 0x984d, 0xfffd, 0x984e, 0x984f, 0x9850, 0x9851, 0x9852, 0x9853, 0x9854, 0x9855, 0x9856, 0x9857, 0x9858, 0x9859, 0x985a, 0x985b, 0x985c, 0x985d, 0x985e, 0x985f, 0x9860, 0x9861, 0x9862, 0x9863, 0x9864, 0x9865, 0x9866, 0x9867, 0x9868, 0x9869, 0x986a, 0x986b, 0x986c, 0x986d, 0x986e, 0x7762, 0x7765, 0x777f, 0x778d, 0x777d, 0x7780, 0x778c, 0x7791, 0x779f, 0x77a0, 0x77b0, 0x77b5, 0x77bd, 0x753a, 0x7540, 0x754e, 0x754b, 0x7548, 0x755b, 0x7572, 0x7579, 0x7583, 0x7f58, 0x7f61, 0x7f5f, 0x8a48, 0x7f68, 0x7f74, 0x7f71, 0x7f79, 0x7f81, 0x7f7e, 0x76cd, 0x76e5, 0x8832, 0x9485, 0x9486, 0x9487, 0x948b, 0x948a, 0x948c, 0x948d, 0x948f, 0x9490, 0x9494, 0x9497, 0x9495, 0x949a, 0x949b, 0x949c, 0x94a3, 0x94a4, 0x94ab, 0x94aa, 0x94ad, 0x94ac, 0x94af, 0x94b0, 0x94b2, 0x94b4, 0x94b6, 0x94b7, 0x94b8, 0x94b9, 0x94ba, 0x94bc, 0x94bd, 0x94bf, 0x94c4, 0x94c8, 0x94c9, 0x94ca, 0x94cb, 0x94cc, 0x94cd, 0x94ce, 0x94d0, 0x94d1, 0x94d2, 0x94d5, 0x94d6, 0x94d7, 0x94d9, 0x94d8, 0x94db, 0x94de, 0x94df, 0x94e0, 0x94e2, 0x94e4, 0x94e5, 0x94e7, 0x94e8, 0x94ea, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ 192 ] = { 0x986f, 0x9870, 0x9871, 0x9872, 0x9873, 0x9874, 0x988b, 0x988e, 0x9892, 0x9895, 0x9899, 0x98a3, 0x98a8, 0x98a9, 0x98aa, 0x98ab, 0x98ac, 0x98ad, 0x98ae, 0x98af, 0x98b0, 0x98b1, 0x98b2, 0x98b3, 0x98b4, 0x98b5, 0x98b6, 0x98b7, 0x98b8, 0x98b9, 0x98ba, 0x98bb, 0x98bc, 0x98bd, 0x98be, 0x98bf, 0x98c0, 0x98c1, 0x98c2, 0x98c3, 0x98c4, 0x98c5, 0x98c6, 0x98c7, 0x98c8, 0x98c9, 0x98ca, 0x98cb, 0x98cc, 0x98cd, 0x98cf, 0x98d0, 0x98d4, 0x98d6, 0x98d7, 0x98db, 0x98dc, 0x98dd, 0x98e0, 0x98e1, 0x98e2, 0x98e3, 0x98e4, 0xfffd, 0x98e5, 0x98e6, 0x98e9, 0x98ea, 0x98eb, 0x98ec, 0x98ed, 0x98ee, 0x98ef, 0x98f0, 0x98f1, 0x98f2, 0x98f3, 0x98f4, 0x98f5, 0x98f6, 0x98f7, 0x98f8, 0x98f9, 0x98fa, 0x98fb, 0x98fc, 0x98fd, 0x98fe, 0x98ff, 0x9900, 0x9901, 0x9902, 0x9903, 0x9904, 0x9905, 0x9906, 0x9907, 0x94e9, 0x94eb, 0x94ee, 0x94ef, 0x94f3, 0x94f4, 0x94f5, 0x94f7, 0x94f9, 0x94fc, 0x94fd, 0x94ff, 0x9503, 0x9502, 0x9506, 0x9507, 0x9509, 0x950a, 0x950d, 0x950e, 0x950f, 0x9512, 0x9513, 0x9514, 0x9515, 0x9516, 0x9518, 0x951b, 0x951d, 0x951e, 0x951f, 0x9522, 0x952a, 0x952b, 0x9529, 0x952c, 0x9531, 0x9532, 0x9534, 0x9536, 0x9537, 0x9538, 0x953c, 0x953e, 0x953f, 0x9542, 0x9535, 0x9544, 0x9545, 0x9546, 0x9549, 0x954c, 0x954e, 0x954f, 0x9552, 0x9553, 0x9554, 0x9556, 0x9557, 0x9558, 0x9559, 0x955b, 0x955e, 0x955f, 0x955d, 0x9561, 0x9562, 0x9564, 0x9565, 0x9566, 0x9567, 0x9568, 0x9569, 0x956a, 0x956b, 0x956c, 0x956f, 0x9571, 0x9572, 0x9573, 0x953a, 0x77e7, 0x77ec, 0x96c9, 0x79d5, 0x79ed, 0x79e3, 0x79eb, 0x7a06, 0x5d47, 0x7a03, 0x7a02, 0x7a1e, 0x7a14, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ 192 ] = { 0x9908, 0x9909, 0x990a, 0x990b, 0x990c, 0x990e, 0x990f, 0x9911, 0x9912, 0x9913, 0x9914, 0x9915, 0x9916, 0x9917, 0x9918, 0x9919, 0x991a, 0x991b, 0x991c, 0x991d, 0x991e, 0x991f, 0x9920, 0x9921, 0x9922, 0x9923, 0x9924, 0x9925, 0x9926, 0x9927, 0x9928, 0x9929, 0x992a, 0x992b, 0x992c, 0x992d, 0x992f, 0x9930, 0x9931, 0x9932, 0x9933, 0x9934, 0x9935, 0x9936, 0x9937, 0x9938, 0x9939, 0x993a, 0x993b, 0x993c, 0x993d, 0x993e, 0x993f, 0x9940, 0x9941, 0x9942, 0x9943, 0x9944, 0x9945, 0x9946, 0x9947, 0x9948, 0x9949, 0xfffd, 0x994a, 0x994b, 0x994c, 0x994d, 0x994e, 0x994f, 0x9950, 0x9951, 0x9952, 0x9953, 0x9956, 0x9957, 0x9958, 0x9959, 0x995a, 0x995b, 0x995c, 0x995d, 0x995e, 0x995f, 0x9960, 0x9961, 0x9962, 0x9964, 0x9966, 0x9973, 0x9978, 0x9979, 0x997b, 0x997e, 0x9982, 0x9983, 0x9989, 0x7a39, 0x7a37, 0x7a51, 0x9ecf, 0x99a5, 0x7a70, 0x7688, 0x768e, 0x7693, 0x7699, 0x76a4, 0x74de, 0x74e0, 0x752c, 0x9e20, 0x9e22, 0x9e28, 0x9e29, 0x9e2a, 0x9e2b, 0x9e2c, 0x9e32, 0x9e31, 0x9e36, 0x9e38, 0x9e37, 0x9e39, 0x9e3a, 0x9e3e, 0x9e41, 0x9e42, 0x9e44, 0x9e46, 0x9e47, 0x9e48, 0x9e49, 0x9e4b, 0x9e4c, 0x9e4e, 0x9e51, 0x9e55, 0x9e57, 0x9e5a, 0x9e5b, 0x9e5c, 0x9e5e, 0x9e63, 0x9e66, 0x9e67, 0x9e68, 0x9e69, 0x9e6a, 0x9e6b, 0x9e6c, 0x9e71, 0x9e6d, 0x9e73, 0x7592, 0x7594, 0x7596, 0x75a0, 0x759d, 0x75ac, 0x75a3, 0x75b3, 0x75b4, 0x75b8, 0x75c4, 0x75b1, 0x75b0, 0x75c3, 0x75c2, 0x75d6, 0x75cd, 0x75e3, 0x75e8, 0x75e6, 0x75e4, 0x75eb, 0x75e7, 0x7603, 0x75f1, 0x75fc, 0x75ff, 0x7610, 0x7600, 0x7605, 0x760c, 0x7617, 0x760a, 0x7625, 0x7618, 0x7615, 0x7619, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ 192 ] = { 0x998c, 0x998e, 0x999a, 0x999b, 0x999c, 0x999d, 0x999e, 0x999f, 0x99a0, 0x99a1, 0x99a2, 0x99a3, 0x99a4, 0x99a6, 0x99a7, 0x99a9, 0x99aa, 0x99ab, 0x99ac, 0x99ad, 0x99ae, 0x99af, 0x99b0, 0x99b1, 0x99b2, 0x99b3, 0x99b4, 0x99b5, 0x99b6, 0x99b7, 0x99b8, 0x99b9, 0x99ba, 0x99bb, 0x99bc, 0x99bd, 0x99be, 0x99bf, 0x99c0, 0x99c1, 0x99c2, 0x99c3, 0x99c4, 0x99c5, 0x99c6, 0x99c7, 0x99c8, 0x99c9, 0x99ca, 0x99cb, 0x99cc, 0x99cd, 0x99ce, 0x99cf, 0x99d0, 0x99d1, 0x99d2, 0x99d3, 0x99d4, 0x99d5, 0x99d6, 0x99d7, 0x99d8, 0xfffd, 0x99d9, 0x99da, 0x99db, 0x99dc, 0x99dd, 0x99de, 0x99df, 0x99e0, 0x99e1, 0x99e2, 0x99e3, 0x99e4, 0x99e5, 0x99e6, 0x99e7, 0x99e8, 0x99e9, 0x99ea, 0x99eb, 0x99ec, 0x99ed, 0x99ee, 0x99ef, 0x99f0, 0x99f1, 0x99f2, 0x99f3, 0x99f4, 0x99f5, 0x99f6, 0x99f7, 0x99f8, 0x99f9, 0x761b, 0x763c, 0x7622, 0x7620, 0x7640, 0x762d, 0x7630, 0x763f, 0x7635, 0x7643, 0x763e, 0x7633, 0x764d, 0x765e, 0x7654, 0x765c, 0x7656, 0x766b, 0x766f, 0x7fca, 0x7ae6, 0x7a78, 0x7a79, 0x7a80, 0x7a86, 0x7a88, 0x7a95, 0x7aa6, 0x7aa0, 0x7aac, 0x7aa8, 0x7aad, 0x7ab3, 0x8864, 0x8869, 0x8872, 0x887d, 0x887f, 0x8882, 0x88a2, 0x88c6, 0x88b7, 0x88bc, 0x88c9, 0x88e2, 0x88ce, 0x88e3, 0x88e5, 0x88f1, 0x891a, 0x88fc, 0x88e8, 0x88fe, 0x88f0, 0x8921, 0x8919, 0x8913, 0x891b, 0x890a, 0x8934, 0x892b, 0x8936, 0x8941, 0x8966, 0x897b, 0x758b, 0x80e5, 0x76b2, 0x76b4, 0x77dc, 0x8012, 0x8014, 0x8016, 0x801c, 0x8020, 0x8022, 0x8025, 0x8026, 0x8027, 0x8029, 0x8028, 0x8031, 0x800b, 0x8035, 0x8043, 0x8046, 0x804d, 0x8052, 0x8069, 0x8071, 0x8983, 0x9878, 0x9880, 0x9883, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ 192 ] = { 0x99fa, 0x99fb, 0x99fc, 0x99fd, 0x99fe, 0x99ff, 0x9a00, 0x9a01, 0x9a02, 0x9a03, 0x9a04, 0x9a05, 0x9a06, 0x9a07, 0x9a08, 0x9a09, 0x9a0a, 0x9a0b, 0x9a0c, 0x9a0d, 0x9a0e, 0x9a0f, 0x9a10, 0x9a11, 0x9a12, 0x9a13, 0x9a14, 0x9a15, 0x9a16, 0x9a17, 0x9a18, 0x9a19, 0x9a1a, 0x9a1b, 0x9a1c, 0x9a1d, 0x9a1e, 0x9a1f, 0x9a20, 0x9a21, 0x9a22, 0x9a23, 0x9a24, 0x9a25, 0x9a26, 0x9a27, 0x9a28, 0x9a29, 0x9a2a, 0x9a2b, 0x9a2c, 0x9a2d, 0x9a2e, 0x9a2f, 0x9a30, 0x9a31, 0x9a32, 0x9a33, 0x9a34, 0x9a35, 0x9a36, 0x9a37, 0x9a38, 0xfffd, 0x9a39, 0x9a3a, 0x9a3b, 0x9a3c, 0x9a3d, 0x9a3e, 0x9a3f, 0x9a40, 0x9a41, 0x9a42, 0x9a43, 0x9a44, 0x9a45, 0x9a46, 0x9a47, 0x9a48, 0x9a49, 0x9a4a, 0x9a4b, 0x9a4c, 0x9a4d, 0x9a4e, 0x9a4f, 0x9a50, 0x9a51, 0x9a52, 0x9a53, 0x9a54, 0x9a55, 0x9a56, 0x9a57, 0x9a58, 0x9a59, 0x9889, 0x988c, 0x988d, 0x988f, 0x9894, 0x989a, 0x989b, 0x989e, 0x989f, 0x98a1, 0x98a2, 0x98a5, 0x98a6, 0x864d, 0x8654, 0x866c, 0x866e, 0x867f, 0x867a, 0x867c, 0x867b, 0x86a8, 0x868d, 0x868b, 0x86ac, 0x869d, 0x86a7, 0x86a3, 0x86aa, 0x8693, 0x86a9, 0x86b6, 0x86c4, 0x86b5, 0x86ce, 0x86b0, 0x86ba, 0x86b1, 0x86af, 0x86c9, 0x86cf, 0x86b4, 0x86e9, 0x86f1, 0x86f2, 0x86ed, 0x86f3, 0x86d0, 0x8713, 0x86de, 0x86f4, 0x86df, 0x86d8, 0x86d1, 0x8703, 0x8707, 0x86f8, 0x8708, 0x870a, 0x870d, 0x8709, 0x8723, 0x873b, 0x871e, 0x8725, 0x872e, 0x871a, 0x873e, 0x8748, 0x8734, 0x8731, 0x8729, 0x8737, 0x873f, 0x8782, 0x8722, 0x877d, 0x877e, 0x877b, 0x8760, 0x8770, 0x874c, 0x876e, 0x878b, 0x8753, 0x8763, 0x877c, 0x8764, 0x8759, 0x8765, 0x8793, 0x87af, 0x87a8, 0x87d2, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ 192 ] = { 0x9a5a, 0x9a5b, 0x9a5c, 0x9a5d, 0x9a5e, 0x9a5f, 0x9a60, 0x9a61, 0x9a62, 0x9a63, 0x9a64, 0x9a65, 0x9a66, 0x9a67, 0x9a68, 0x9a69, 0x9a6a, 0x9a6b, 0x9a72, 0x9a83, 0x9a89, 0x9a8d, 0x9a8e, 0x9a94, 0x9a95, 0x9a99, 0x9aa6, 0x9aa9, 0x9aaa, 0x9aab, 0x9aac, 0x9aad, 0x9aae, 0x9aaf, 0x9ab2, 0x9ab3, 0x9ab4, 0x9ab5, 0x9ab9, 0x9abb, 0x9abd, 0x9abe, 0x9abf, 0x9ac3, 0x9ac4, 0x9ac6, 0x9ac7, 0x9ac8, 0x9ac9, 0x9aca, 0x9acd, 0x9ace, 0x9acf, 0x9ad0, 0x9ad2, 0x9ad4, 0x9ad5, 0x9ad6, 0x9ad7, 0x9ad9, 0x9ada, 0x9adb, 0x9adc, 0xfffd, 0x9add, 0x9ade, 0x9ae0, 0x9ae2, 0x9ae3, 0x9ae4, 0x9ae5, 0x9ae7, 0x9ae8, 0x9ae9, 0x9aea, 0x9aec, 0x9aee, 0x9af0, 0x9af1, 0x9af2, 0x9af3, 0x9af4, 0x9af5, 0x9af6, 0x9af7, 0x9af8, 0x9afa, 0x9afc, 0x9afd, 0x9afe, 0x9aff, 0x9b00, 0x9b01, 0x9b02, 0x9b04, 0x9b05, 0x9b06, 0x87c6, 0x8788, 0x8785, 0x87ad, 0x8797, 0x8783, 0x87ab, 0x87e5, 0x87ac, 0x87b5, 0x87b3, 0x87cb, 0x87d3, 0x87bd, 0x87d1, 0x87c0, 0x87ca, 0x87db, 0x87ea, 0x87e0, 0x87ee, 0x8816, 0x8813, 0x87fe, 0x880a, 0x881b, 0x8821, 0x8839, 0x883c, 0x7f36, 0x7f42, 0x7f44, 0x7f45, 0x8210, 0x7afa, 0x7afd, 0x7b08, 0x7b03, 0x7b04, 0x7b15, 0x7b0a, 0x7b2b, 0x7b0f, 0x7b47, 0x7b38, 0x7b2a, 0x7b19, 0x7b2e, 0x7b31, 0x7b20, 0x7b25, 0x7b24, 0x7b33, 0x7b3e, 0x7b1e, 0x7b58, 0x7b5a, 0x7b45, 0x7b75, 0x7b4c, 0x7b5d, 0x7b60, 0x7b6e, 0x7b7b, 0x7b62, 0x7b72, 0x7b71, 0x7b90, 0x7ba6, 0x7ba7, 0x7bb8, 0x7bac, 0x7b9d, 0x7ba8, 0x7b85, 0x7baa, 0x7b9c, 0x7ba2, 0x7bab, 0x7bb4, 0x7bd1, 0x7bc1, 0x7bcc, 0x7bdd, 0x7bda, 0x7be5, 0x7be6, 0x7bea, 0x7c0c, 0x7bfe, 0x7bfc, 0x7c0f, 0x7c16, 0x7c0b, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ 192 ] = { 0x9b07, 0x9b09, 0x9b0a, 0x9b0b, 0x9b0c, 0x9b0d, 0x9b0e, 0x9b10, 0x9b11, 0x9b12, 0x9b14, 0x9b15, 0x9b16, 0x9b17, 0x9b18, 0x9b19, 0x9b1a, 0x9b1b, 0x9b1c, 0x9b1d, 0x9b1e, 0x9b20, 0x9b21, 0x9b22, 0x9b24, 0x9b25, 0x9b26, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2b, 0x9b2c, 0x9b2d, 0x9b2e, 0x9b30, 0x9b31, 0x9b33, 0x9b34, 0x9b35, 0x9b36, 0x9b37, 0x9b38, 0x9b39, 0x9b3a, 0x9b3d, 0x9b3e, 0x9b3f, 0x9b40, 0x9b46, 0x9b4a, 0x9b4b, 0x9b4c, 0x9b4e, 0x9b50, 0x9b52, 0x9b53, 0x9b55, 0x9b56, 0x9b57, 0x9b58, 0x9b59, 0x9b5a, 0xfffd, 0x9b5b, 0x9b5c, 0x9b5d, 0x9b5e, 0x9b5f, 0x9b60, 0x9b61, 0x9b62, 0x9b63, 0x9b64, 0x9b65, 0x9b66, 0x9b67, 0x9b68, 0x9b69, 0x9b6a, 0x9b6b, 0x9b6c, 0x9b6d, 0x9b6e, 0x9b6f, 0x9b70, 0x9b71, 0x9b72, 0x9b73, 0x9b74, 0x9b75, 0x9b76, 0x9b77, 0x9b78, 0x9b79, 0x9b7a, 0x9b7b, 0x7c1f, 0x7c2a, 0x7c26, 0x7c38, 0x7c41, 0x7c40, 0x81fe, 0x8201, 0x8202, 0x8204, 0x81ec, 0x8844, 0x8221, 0x8222, 0x8223, 0x822d, 0x822f, 0x8228, 0x822b, 0x8238, 0x823b, 0x8233, 0x8234, 0x823e, 0x8244, 0x8249, 0x824b, 0x824f, 0x825a, 0x825f, 0x8268, 0x887e, 0x8885, 0x8888, 0x88d8, 0x88df, 0x895e, 0x7f9d, 0x7f9f, 0x7fa7, 0x7faf, 0x7fb0, 0x7fb2, 0x7c7c, 0x6549, 0x7c91, 0x7c9d, 0x7c9c, 0x7c9e, 0x7ca2, 0x7cb2, 0x7cbc, 0x7cbd, 0x7cc1, 0x7cc7, 0x7ccc, 0x7ccd, 0x7cc8, 0x7cc5, 0x7cd7, 0x7ce8, 0x826e, 0x66a8, 0x7fbf, 0x7fce, 0x7fd5, 0x7fe5, 0x7fe1, 0x7fe6, 0x7fe9, 0x7fee, 0x7ff3, 0x7cf8, 0x7d77, 0x7da6, 0x7dae, 0x7e47, 0x7e9b, 0x9eb8, 0x9eb4, 0x8d73, 0x8d84, 0x8d94, 0x8d91, 0x8db1, 0x8d67, 0x8d6d, 0x8c47, 0x8c49, 0x914a, 0x9150, 0x914e, 0x914f, 0x9164, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ 192 ] = { 0x9b7c, 0x9b7d, 0x9b7e, 0x9b7f, 0x9b80, 0x9b81, 0x9b82, 0x9b83, 0x9b84, 0x9b85, 0x9b86, 0x9b87, 0x9b88, 0x9b89, 0x9b8a, 0x9b8b, 0x9b8c, 0x9b8d, 0x9b8e, 0x9b8f, 0x9b90, 0x9b91, 0x9b92, 0x9b93, 0x9b94, 0x9b95, 0x9b96, 0x9b97, 0x9b98, 0x9b99, 0x9b9a, 0x9b9b, 0x9b9c, 0x9b9d, 0x9b9e, 0x9b9f, 0x9ba0, 0x9ba1, 0x9ba2, 0x9ba3, 0x9ba4, 0x9ba5, 0x9ba6, 0x9ba7, 0x9ba8, 0x9ba9, 0x9baa, 0x9bab, 0x9bac, 0x9bad, 0x9bae, 0x9baf, 0x9bb0, 0x9bb1, 0x9bb2, 0x9bb3, 0x9bb4, 0x9bb5, 0x9bb6, 0x9bb7, 0x9bb8, 0x9bb9, 0x9bba, 0xfffd, 0x9bbb, 0x9bbc, 0x9bbd, 0x9bbe, 0x9bbf, 0x9bc0, 0x9bc1, 0x9bc2, 0x9bc3, 0x9bc4, 0x9bc5, 0x9bc6, 0x9bc7, 0x9bc8, 0x9bc9, 0x9bca, 0x9bcb, 0x9bcc, 0x9bcd, 0x9bce, 0x9bcf, 0x9bd0, 0x9bd1, 0x9bd2, 0x9bd3, 0x9bd4, 0x9bd5, 0x9bd6, 0x9bd7, 0x9bd8, 0x9bd9, 0x9bda, 0x9bdb, 0x9162, 0x9161, 0x9170, 0x9169, 0x916f, 0x917d, 0x917e, 0x9172, 0x9174, 0x9179, 0x918c, 0x9185, 0x9190, 0x918d, 0x9191, 0x91a2, 0x91a3, 0x91aa, 0x91ad, 0x91ae, 0x91af, 0x91b5, 0x91b4, 0x91ba, 0x8c55, 0x9e7e, 0x8db8, 0x8deb, 0x8e05, 0x8e59, 0x8e69, 0x8db5, 0x8dbf, 0x8dbc, 0x8dba, 0x8dc4, 0x8dd6, 0x8dd7, 0x8dda, 0x8dde, 0x8dce, 0x8dcf, 0x8ddb, 0x8dc6, 0x8dec, 0x8df7, 0x8df8, 0x8de3, 0x8df9, 0x8dfb, 0x8de4, 0x8e09, 0x8dfd, 0x8e14, 0x8e1d, 0x8e1f, 0x8e2c, 0x8e2e, 0x8e23, 0x8e2f, 0x8e3a, 0x8e40, 0x8e39, 0x8e35, 0x8e3d, 0x8e31, 0x8e49, 0x8e41, 0x8e42, 0x8e51, 0x8e52, 0x8e4a, 0x8e70, 0x8e76, 0x8e7c, 0x8e6f, 0x8e74, 0x8e85, 0x8e8f, 0x8e94, 0x8e90, 0x8e9c, 0x8e9e, 0x8c78, 0x8c82, 0x8c8a, 0x8c85, 0x8c98, 0x8c94, 0x659b, 0x89d6, 0x89de, 0x89da, 0x89dc, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ 192 ] = { 0x9bdc, 0x9bdd, 0x9bde, 0x9bdf, 0x9be0, 0x9be1, 0x9be2, 0x9be3, 0x9be4, 0x9be5, 0x9be6, 0x9be7, 0x9be8, 0x9be9, 0x9bea, 0x9beb, 0x9bec, 0x9bed, 0x9bee, 0x9bef, 0x9bf0, 0x9bf1, 0x9bf2, 0x9bf3, 0x9bf4, 0x9bf5, 0x9bf6, 0x9bf7, 0x9bf8, 0x9bf9, 0x9bfa, 0x9bfb, 0x9bfc, 0x9bfd, 0x9bfe, 0x9bff, 0x9c00, 0x9c01, 0x9c02, 0x9c03, 0x9c04, 0x9c05, 0x9c06, 0x9c07, 0x9c08, 0x9c09, 0x9c0a, 0x9c0b, 0x9c0c, 0x9c0d, 0x9c0e, 0x9c0f, 0x9c10, 0x9c11, 0x9c12, 0x9c13, 0x9c14, 0x9c15, 0x9c16, 0x9c17, 0x9c18, 0x9c19, 0x9c1a, 0xfffd, 0x9c1b, 0x9c1c, 0x9c1d, 0x9c1e, 0x9c1f, 0x9c20, 0x9c21, 0x9c22, 0x9c23, 0x9c24, 0x9c25, 0x9c26, 0x9c27, 0x9c28, 0x9c29, 0x9c2a, 0x9c2b, 0x9c2c, 0x9c2d, 0x9c2e, 0x9c2f, 0x9c30, 0x9c31, 0x9c32, 0x9c33, 0x9c34, 0x9c35, 0x9c36, 0x9c37, 0x9c38, 0x9c39, 0x9c3a, 0x9c3b, 0x89e5, 0x89eb, 0x89ef, 0x8a3e, 0x8b26, 0x9753, 0x96e9, 0x96f3, 0x96ef, 0x9706, 0x9701, 0x9708, 0x970f, 0x970e, 0x972a, 0x972d, 0x9730, 0x973e, 0x9f80, 0x9f83, 0x9f85, 0x9f86, 0x9f87, 0x9f88, 0x9f89, 0x9f8a, 0x9f8c, 0x9efe, 0x9f0b, 0x9f0d, 0x96b9, 0x96bc, 0x96bd, 0x96ce, 0x96d2, 0x77bf, 0x96e0, 0x928e, 0x92ae, 0x92c8, 0x933e, 0x936a, 0x93ca, 0x938f, 0x943e, 0x946b, 0x9c7f, 0x9c82, 0x9c85, 0x9c86, 0x9c87, 0x9c88, 0x7a23, 0x9c8b, 0x9c8e, 0x9c90, 0x9c91, 0x9c92, 0x9c94, 0x9c95, 0x9c9a, 0x9c9b, 0x9c9e, 0x9c9f, 0x9ca0, 0x9ca1, 0x9ca2, 0x9ca3, 0x9ca5, 0x9ca6, 0x9ca7, 0x9ca8, 0x9ca9, 0x9cab, 0x9cad, 0x9cae, 0x9cb0, 0x9cb1, 0x9cb2, 0x9cb3, 0x9cb4, 0x9cb5, 0x9cb6, 0x9cb7, 0x9cba, 0x9cbb, 0x9cbc, 0x9cbd, 0x9cc4, 0x9cc5, 0x9cc6, 0x9cc7, 0x9cca, 0x9ccb, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ 192 ] = { 0x9c3c, 0x9c3d, 0x9c3e, 0x9c3f, 0x9c40, 0x9c41, 0x9c42, 0x9c43, 0x9c44, 0x9c45, 0x9c46, 0x9c47, 0x9c48, 0x9c49, 0x9c4a, 0x9c4b, 0x9c4c, 0x9c4d, 0x9c4e, 0x9c4f, 0x9c50, 0x9c51, 0x9c52, 0x9c53, 0x9c54, 0x9c55, 0x9c56, 0x9c57, 0x9c58, 0x9c59, 0x9c5a, 0x9c5b, 0x9c5c, 0x9c5d, 0x9c5e, 0x9c5f, 0x9c60, 0x9c61, 0x9c62, 0x9c63, 0x9c64, 0x9c65, 0x9c66, 0x9c67, 0x9c68, 0x9c69, 0x9c6a, 0x9c6b, 0x9c6c, 0x9c6d, 0x9c6e, 0x9c6f, 0x9c70, 0x9c71, 0x9c72, 0x9c73, 0x9c74, 0x9c75, 0x9c76, 0x9c77, 0x9c78, 0x9c79, 0x9c7a, 0xfffd, 0x9c7b, 0x9c7d, 0x9c7e, 0x9c80, 0x9c83, 0x9c84, 0x9c89, 0x9c8a, 0x9c8c, 0x9c8f, 0x9c93, 0x9c96, 0x9c97, 0x9c98, 0x9c99, 0x9c9d, 0x9caa, 0x9cac, 0x9caf, 0x9cb9, 0x9cbe, 0x9cbf, 0x9cc0, 0x9cc1, 0x9cc2, 0x9cc8, 0x9cc9, 0x9cd1, 0x9cd2, 0x9cda, 0x9cdb, 0x9ce0, 0x9ce1, 0x9ccc, 0x9ccd, 0x9cce, 0x9ccf, 0x9cd0, 0x9cd3, 0x9cd4, 0x9cd5, 0x9cd7, 0x9cd8, 0x9cd9, 0x9cdc, 0x9cdd, 0x9cdf, 0x9ce2, 0x977c, 0x9785, 0x9791, 0x9792, 0x9794, 0x97af, 0x97ab, 0x97a3, 0x97b2, 0x97b4, 0x9ab1, 0x9ab0, 0x9ab7, 0x9e58, 0x9ab6, 0x9aba, 0x9abc, 0x9ac1, 0x9ac0, 0x9ac5, 0x9ac2, 0x9acb, 0x9acc, 0x9ad1, 0x9b45, 0x9b43, 0x9b47, 0x9b49, 0x9b48, 0x9b4d, 0x9b51, 0x98e8, 0x990d, 0x992e, 0x9955, 0x9954, 0x9adf, 0x9ae1, 0x9ae6, 0x9aef, 0x9aeb, 0x9afb, 0x9aed, 0x9af9, 0x9b08, 0x9b0f, 0x9b13, 0x9b1f, 0x9b23, 0x9ebd, 0x9ebe, 0x7e3b, 0x9e82, 0x9e87, 0x9e88, 0x9e8b, 0x9e92, 0x93d6, 0x9e9d, 0x9e9f, 0x9edb, 0x9edc, 0x9edd, 0x9ee0, 0x9edf, 0x9ee2, 0x9ee9, 0x9ee7, 0x9ee5, 0x9eea, 0x9eef, 0x9f22, 0x9f2c, 0x9f2f, 0x9f39, 0x9f37, 0x9f3d, 0x9f3e, 0x9f44, 0xfffd }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ 96 ] = { 0x9ce3, 0x9ce4, 0x9ce5, 0x9ce6, 0x9ce7, 0x9ce8, 0x9ce9, 0x9cea, 0x9ceb, 0x9cec, 0x9ced, 0x9cee, 0x9cef, 0x9cf0, 0x9cf1, 0x9cf2, 0x9cf3, 0x9cf4, 0x9cf5, 0x9cf6, 0x9cf7, 0x9cf8, 0x9cf9, 0x9cfa, 0x9cfb, 0x9cfc, 0x9cfd, 0x9cfe, 0x9cff, 0x9d00, 0x9d01, 0x9d02, 0x9d03, 0x9d04, 0x9d05, 0x9d06, 0x9d07, 0x9d08, 0x9d09, 0x9d0a, 0x9d0b, 0x9d0c, 0x9d0d, 0x9d0e, 0x9d0f, 0x9d10, 0x9d11, 0x9d12, 0x9d13, 0x9d14, 0x9d15, 0x9d16, 0x9d17, 0x9d18, 0x9d19, 0x9d1a, 0x9d1b, 0x9d1c, 0x9d1d, 0x9d1e, 0x9d1f, 0x9d20, 0x9d21, 0xfffd, 0x9d22, 0x9d23, 0x9d24, 0x9d25, 0x9d26, 0x9d27, 0x9d28, 0x9d29, 0x9d2a, 0x9d2b, 0x9d2c, 0x9d2d, 0x9d2e, 0x9d2f, 0x9d30, 0x9d31, 0x9d32, 0x9d33, 0x9d34, 0x9d35, 0x9d36, 0x9d37, 0x9d38, 0x9d39, 0x9d3a, 0x9d3b, 0x9d3c, 0x9d3d, 0x9d3e, 0x9d3f, 0x9d40, 0x9d41 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ 96 ] = { 0x9d43, 0x9d44, 0x9d45, 0x9d46, 0x9d47, 0x9d48, 0x9d49, 0x9d4a, 0x9d4b, 0x9d4c, 0x9d4d, 0x9d4e, 0x9d4f, 0x9d50, 0x9d51, 0x9d52, 0x9d53, 0x9d54, 0x9d55, 0x9d56, 0x9d57, 0x9d58, 0x9d59, 0x9d5a, 0x9d5b, 0x9d5c, 0x9d5d, 0x9d5e, 0x9d5f, 0x9d60, 0x9d61, 0x9d62, 0x9d63, 0x9d64, 0x9d65, 0x9d66, 0x9d67, 0x9d68, 0x9d69, 0x9d6a, 0x9d6b, 0x9d6c, 0x9d6d, 0x9d6e, 0x9d6f, 0x9d70, 0x9d71, 0x9d72, 0x9d73, 0x9d74, 0x9d75, 0x9d76, 0x9d77, 0x9d78, 0x9d79, 0x9d7a, 0x9d7b, 0x9d7c, 0x9d7d, 0x9d7e, 0x9d7f, 0x9d80, 0x9d81, 0xfffd, 0x9d82, 0x9d83, 0x9d84, 0x9d85, 0x9d86, 0x9d87, 0x9d88, 0x9d89, 0x9d8a, 0x9d8b, 0x9d8c, 0x9d8d, 0x9d8e, 0x9d8f, 0x9d90, 0x9d91, 0x9d92, 0x9d93, 0x9d94, 0x9d95, 0x9d96, 0x9d97, 0x9d98, 0x9d99, 0x9d9a, 0x9d9b, 0x9d9c, 0x9d9d, 0x9d9e, 0x9d9f, 0x9da0, 0x9da1 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ 96 ] = { 0x9da3, 0x9da4, 0x9da5, 0x9da6, 0x9da7, 0x9da8, 0x9da9, 0x9daa, 0x9dab, 0x9dac, 0x9dad, 0x9dae, 0x9daf, 0x9db0, 0x9db1, 0x9db2, 0x9db3, 0x9db4, 0x9db5, 0x9db6, 0x9db7, 0x9db8, 0x9db9, 0x9dba, 0x9dbb, 0x9dbc, 0x9dbd, 0x9dbe, 0x9dbf, 0x9dc0, 0x9dc1, 0x9dc2, 0x9dc3, 0x9dc4, 0x9dc5, 0x9dc6, 0x9dc7, 0x9dc8, 0x9dc9, 0x9dca, 0x9dcb, 0x9dcc, 0x9dcd, 0x9dce, 0x9dcf, 0x9dd0, 0x9dd1, 0x9dd2, 0x9dd3, 0x9dd4, 0x9dd5, 0x9dd6, 0x9dd7, 0x9dd8, 0x9dd9, 0x9dda, 0x9ddb, 0x9ddc, 0x9ddd, 0x9dde, 0x9ddf, 0x9de0, 0x9de1, 0xfffd, 0x9de2, 0x9de3, 0x9de4, 0x9de5, 0x9de6, 0x9de7, 0x9de8, 0x9de9, 0x9dea, 0x9deb, 0x9dec, 0x9ded, 0x9dee, 0x9def, 0x9df0, 0x9df1, 0x9df2, 0x9df3, 0x9df4, 0x9df5, 0x9df6, 0x9df7, 0x9df8, 0x9df9, 0x9dfa, 0x9dfb, 0x9dfc, 0x9dfd, 0x9dfe, 0x9dff, 0x9e00, 0x9e01 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ 96 ] = { 0x9e03, 0x9e04, 0x9e05, 0x9e06, 0x9e07, 0x9e08, 0x9e09, 0x9e0a, 0x9e0b, 0x9e0c, 0x9e0d, 0x9e0e, 0x9e0f, 0x9e10, 0x9e11, 0x9e12, 0x9e13, 0x9e14, 0x9e15, 0x9e16, 0x9e17, 0x9e18, 0x9e19, 0x9e1a, 0x9e1b, 0x9e1c, 0x9e1d, 0x9e1e, 0x9e24, 0x9e27, 0x9e2e, 0x9e30, 0x9e34, 0x9e3b, 0x9e3c, 0x9e40, 0x9e4d, 0x9e50, 0x9e52, 0x9e53, 0x9e54, 0x9e56, 0x9e59, 0x9e5d, 0x9e5f, 0x9e60, 0x9e61, 0x9e62, 0x9e65, 0x9e6e, 0x9e6f, 0x9e72, 0x9e74, 0x9e75, 0x9e76, 0x9e77, 0x9e78, 0x9e79, 0x9e7a, 0x9e7b, 0x9e7c, 0x9e7d, 0x9e80, 0xfffd, 0x9e81, 0x9e83, 0x9e84, 0x9e85, 0x9e86, 0x9e89, 0x9e8a, 0x9e8c, 0x9e8d, 0x9e8e, 0x9e8f, 0x9e90, 0x9e91, 0x9e94, 0x9e95, 0x9e96, 0x9e97, 0x9e98, 0x9e99, 0x9e9a, 0x9e9b, 0x9e9c, 0x9e9e, 0x9ea0, 0x9ea1, 0x9ea2, 0x9ea3, 0x9ea4, 0x9ea5, 0x9ea7, 0x9ea8, 0x9ea9 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ 96 ] = { 0x9eab, 0x9eac, 0x9ead, 0x9eae, 0x9eaf, 0x9eb0, 0x9eb1, 0x9eb2, 0x9eb3, 0x9eb5, 0x9eb6, 0x9eb7, 0x9eb9, 0x9eba, 0x9ebc, 0x9ebf, 0x9ec0, 0x9ec1, 0x9ec2, 0x9ec3, 0x9ec5, 0x9ec6, 0x9ec7, 0x9ec8, 0x9eca, 0x9ecb, 0x9ecc, 0x9ed0, 0x9ed2, 0x9ed3, 0x9ed5, 0x9ed6, 0x9ed7, 0x9ed9, 0x9eda, 0x9ede, 0x9ee1, 0x9ee3, 0x9ee4, 0x9ee6, 0x9ee8, 0x9eeb, 0x9eec, 0x9eed, 0x9eee, 0x9ef0, 0x9ef1, 0x9ef2, 0x9ef3, 0x9ef4, 0x9ef5, 0x9ef6, 0x9ef7, 0x9ef8, 0x9efa, 0x9efd, 0x9eff, 0x9f00, 0x9f01, 0x9f02, 0x9f03, 0x9f04, 0x9f05, 0xfffd, 0x9f06, 0x9f07, 0x9f08, 0x9f09, 0x9f0a, 0x9f0c, 0x9f0f, 0x9f11, 0x9f12, 0x9f14, 0x9f15, 0x9f16, 0x9f18, 0x9f1a, 0x9f1b, 0x9f1c, 0x9f1d, 0x9f1e, 0x9f1f, 0x9f21, 0x9f23, 0x9f24, 0x9f25, 0x9f26, 0x9f27, 0x9f28, 0x9f29, 0x9f2a, 0x9f2b, 0x9f2d, 0x9f2e, 0x9f30 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ 96 ] = { 0x9f32, 0x9f33, 0x9f34, 0x9f35, 0x9f36, 0x9f38, 0x9f3a, 0x9f3c, 0x9f3f, 0x9f40, 0x9f41, 0x9f42, 0x9f43, 0x9f45, 0x9f46, 0x9f47, 0x9f48, 0x9f49, 0x9f4a, 0x9f4b, 0x9f4c, 0x9f4d, 0x9f4e, 0x9f4f, 0x9f52, 0x9f53, 0x9f54, 0x9f55, 0x9f56, 0x9f57, 0x9f58, 0x9f59, 0x9f5a, 0x9f5b, 0x9f5c, 0x9f5d, 0x9f5e, 0x9f5f, 0x9f60, 0x9f61, 0x9f62, 0x9f63, 0x9f64, 0x9f65, 0x9f66, 0x9f67, 0x9f68, 0x9f69, 0x9f6a, 0x9f6b, 0x9f6c, 0x9f6d, 0x9f6e, 0x9f6f, 0x9f70, 0x9f71, 0x9f72, 0x9f73, 0x9f74, 0x9f75, 0x9f76, 0x9f77, 0x9f78, 0xfffd, 0x9f79, 0x9f7a, 0x9f7b, 0x9f7c, 0x9f7d, 0x9f7e, 0x9f81, 0x9f82, 0x9f8d, 0x9f8e, 0x9f8f, 0x9f90, 0x9f91, 0x9f92, 0x9f93, 0x9f94, 0x9f95, 0x9f96, 0x9f97, 0x9f98, 0x9f9c, 0x9f9d, 0x9f9e, 0x9fa1, 0x9fa2, 0x9fa3, 0x9fa4, 0x9fa5, 0xf92c, 0xf979, 0xf995, 0xf9e7 }; const uint16_t libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ 16 ] = { 0xfa0c, 0xfa0d, 0xfa0e, 0xfa0f, 0xfa11, 0xfa13, 0xfa14, 0xfa18, 0xfa1f, 0xfa20, 0xfa21, 0xfa23, 0xfa24, 0xfa27, 0xfa28, 0xfa29 }; /* Unicode to ASCII character lookup table for Windows 936 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ 1024 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8a1, 0x001a, 0x001a, 0xeca1, 0xa7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3a1, 0xc0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a8, 0xa2a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8a8, 0xa6a8, 0xbaa8, 0x001a, 0xaca8, 0xaaa8, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0a8, 0xaea8, 0x001a, 0x001a, 0x001a, 0xc2a1, 0x001a, 0xb4a8, 0xb2a8, 0x001a, 0xb9a8, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa9a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbda8, 0x001a, 0x001a, 0x001a, 0xbea8, 0x001a, 0x001a, 0x001a, 0x001a, 0xada8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3a8, 0x001a, 0xaba8, 0x001a, 0xafa8, 0x001a, 0xb3a8, 0x001a, 0xb5a8, 0x001a, 0xb6a8, 0x001a, 0xb7a8, 0x001a, 0xb8a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbba8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6a1, 0x001a, 0xa5a1, 0x40a8, 0x41a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x42a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a6, 0xa2a6, 0xa3a6, 0xa4a6, 0xa5a6, 0xa6a6, 0xa7a6, 0xa8a6, 0xa9a6, 0xaaa6, 0xaba6, 0xaca6, 0xada6, 0xaea6, 0xafa6, 0xb0a6, 0xb1a6, 0x001a, 0xb2a6, 0xb3a6, 0xb4a6, 0xb5a6, 0xb6a6, 0xb7a6, 0xb8a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1a6, 0xc2a6, 0xc3a6, 0xc4a6, 0xc5a6, 0xc6a6, 0xc7a6, 0xc8a6, 0xc9a6, 0xcaa6, 0xcba6, 0xcca6, 0xcda6, 0xcea6, 0xcfa6, 0xd0a6, 0xd1a6, 0x001a, 0xd2a6, 0xd3a6, 0xd4a6, 0xd5a6, 0xd6a6, 0xd7a6, 0xd8a6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a7, 0xa2a7, 0xa3a7, 0xa4a7, 0xa5a7, 0xa6a7, 0xa8a7, 0xa9a7, 0xaaa7, 0xaba7, 0xaca7, 0xada7, 0xaea7, 0xafa7, 0xb0a7, 0xb1a7, 0xb2a7, 0xb3a7, 0xb4a7, 0xb5a7, 0xb6a7, 0xb7a7, 0xb8a7, 0xb9a7, 0xbaa7, 0xbba7, 0xbca7, 0xbda7, 0xbea7, 0xbfa7, 0xc0a7, 0xc1a7, 0xd1a7, 0xd2a7, 0xd3a7, 0xd4a7, 0xd5a7, 0xd6a7, 0xd8a7, 0xd9a7, 0xdaa7, 0xdba7, 0xdca7, 0xdda7, 0xdea7, 0xdfa7, 0xe0a7, 0xe1a7, 0xe2a7, 0xe3a7, 0xe4a7, 0xe5a7, 0xe6a7, 0xe7a7, 0xe8a7, 0xe9a7, 0xeaa7, 0xeba7, 0xeca7, 0xeda7, 0xeea7, 0xefa7, 0xf0a7, 0xf1a7, 0x001a, 0xd7a7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2000[ 832 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ca9, 0x001a, 0x001a, 0x43a8, 0xaaa1, 0x44a8, 0xaca1, 0x001a, 0xaea1, 0xafa1, 0x001a, 0x001a, 0xb0a1, 0xb1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45a8, 0xada1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeba1, 0x001a, 0xe4a1, 0xe5a1, 0x001a, 0x46a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x0080, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6a1, 0x001a, 0x47a8, 0x001a, 0x001a, 0x001a, 0x48a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1a2, 0xf2a2, 0xf3a2, 0xf4a2, 0xf5a2, 0xf6a2, 0xf7a2, 0xf8a2, 0xf9a2, 0xfaa2, 0xfba2, 0xfca2, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a2, 0xa2a2, 0xa3a2, 0xa4a2, 0xa5a2, 0xa6a2, 0xa7a2, 0xa8a2, 0xa9a2, 0xaaa2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfba1, 0xfca1, 0xfaa1, 0xfda1, 0x001a, 0x001a, 0x49a8, 0x4aa8, 0x4ba8, 0x4ca8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcaa1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7a1, 0x001a, 0xc6a1, 0x001a, 0x001a, 0x001a, 0x4da8, 0x001a, 0x001a, 0x001a, 0x001a, 0xcca1, 0x001a, 0x001a, 0xd8a1, 0xdea1, 0x4ea8, 0xcfa1, 0x001a, 0x001a, 0x4fa8, 0x001a, 0xcea1, 0x001a, 0xc4a1, 0xc5a1, 0xc9a1, 0xc8a1, 0xd2a1, 0x001a, 0x001a, 0xd3a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0a1, 0xdfa1, 0xc3a1, 0xcba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6a1, 0x001a, 0x001a, 0x001a, 0xd5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9a1, 0xd4a1, 0x001a, 0x001a, 0xdca1, 0xdda1, 0x51a8, 0x52a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdaa1, 0xdba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x92a8, 0x001a, 0x001a, 0x001a, 0xd1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2440[ 576 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9a2, 0xdaa2, 0xdba2, 0xdca2, 0xdda2, 0xdea2, 0xdfa2, 0xe0a2, 0xe1a2, 0xe2a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a2, 0xc6a2, 0xc7a2, 0xc8a2, 0xc9a2, 0xcaa2, 0xcba2, 0xcca2, 0xcda2, 0xcea2, 0xcfa2, 0xd0a2, 0xd1a2, 0xd2a2, 0xd3a2, 0xd4a2, 0xd5a2, 0xd6a2, 0xd7a2, 0xd8a2, 0xb1a2, 0xb2a2, 0xb3a2, 0xb4a2, 0xb5a2, 0xb6a2, 0xb7a2, 0xb8a2, 0xb9a2, 0xbaa2, 0xbba2, 0xbca2, 0xbda2, 0xbea2, 0xbfa2, 0xc0a2, 0xc1a2, 0xc2a2, 0xc3a2, 0xc4a2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4a9, 0xa5a9, 0xa6a9, 0xa7a9, 0xa8a9, 0xa9a9, 0xaaa9, 0xaba9, 0xaca9, 0xada9, 0xaea9, 0xafa9, 0xb0a9, 0xb1a9, 0xb2a9, 0xb3a9, 0xb4a9, 0xb5a9, 0xb6a9, 0xb7a9, 0xb8a9, 0xb9a9, 0xbaa9, 0xbba9, 0xbca9, 0xbda9, 0xbea9, 0xbfa9, 0xc0a9, 0xc1a9, 0xc2a9, 0xc3a9, 0xc4a9, 0xc5a9, 0xc6a9, 0xc7a9, 0xc8a9, 0xc9a9, 0xcaa9, 0xcba9, 0xcca9, 0xcda9, 0xcea9, 0xcfa9, 0xd0a9, 0xd1a9, 0xd2a9, 0xd3a9, 0xd4a9, 0xd5a9, 0xd6a9, 0xd7a9, 0xd8a9, 0xd9a9, 0xdaa9, 0xdba9, 0xdca9, 0xdda9, 0xdea9, 0xdfa9, 0xe0a9, 0xe1a9, 0xe2a9, 0xe3a9, 0xe4a9, 0xe5a9, 0xe6a9, 0xe7a9, 0xe8a9, 0xe9a9, 0xeaa9, 0xeba9, 0xeca9, 0xeda9, 0xeea9, 0xefa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x54a8, 0x55a8, 0x56a8, 0x57a8, 0x58a8, 0x59a8, 0x5aa8, 0x5ba8, 0x5ca8, 0x5da8, 0x5ea8, 0x5fa8, 0x60a8, 0x61a8, 0x62a8, 0x63a8, 0x64a8, 0x65a8, 0x66a8, 0x67a8, 0x68a8, 0x69a8, 0x6aa8, 0x6ba8, 0x6ca8, 0x6da8, 0x6ea8, 0x6fa8, 0x70a8, 0x71a8, 0x72a8, 0x73a8, 0x74a8, 0x75a8, 0x76a8, 0x77a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78a8, 0x79a8, 0x7aa8, 0x7ba8, 0x7ca8, 0x7da8, 0x7ea8, 0x80a8, 0x81a8, 0x82a8, 0x83a8, 0x84a8, 0x85a8, 0x86a8, 0x87a8, 0x001a, 0x001a, 0x001a, 0x88a8, 0x89a8, 0x8aa8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6a1, 0xf5a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8a1, 0xf7a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ba8, 0x8ca8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4a1, 0xf3a1, 0x001a, 0x001a, 0x001a, 0xf0a1, 0x001a, 0x001a, 0xf2a1, 0xf1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8da8, 0x8ea8, 0x8fa8, 0x90a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefa1, 0xeea1, 0x001a, 0x001a, 0x91a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2a1, 0x001a, 0xe1a1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x3000[ 1024 ] = { 0xa1a1, 0xa2a1, 0xa3a1, 0xa8a1, 0x001a, 0xa9a1, 0x65a9, 0x96a9, 0xb4a1, 0xb5a1, 0xb6a1, 0xb7a1, 0xb8a1, 0xb9a1, 0xbaa1, 0xbba1, 0xbea1, 0xbfa1, 0x93a8, 0xfea1, 0xb2a1, 0xb3a1, 0xbca1, 0xbda1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x94a8, 0x95a8, 0x001a, 0x001a, 0x40a9, 0x41a9, 0x42a9, 0x43a9, 0x44a9, 0x45a9, 0x46a9, 0x47a9, 0x48a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a4, 0xa2a4, 0xa3a4, 0xa4a4, 0xa5a4, 0xa6a4, 0xa7a4, 0xa8a4, 0xa9a4, 0xaaa4, 0xaba4, 0xaca4, 0xada4, 0xaea4, 0xafa4, 0xb0a4, 0xb1a4, 0xb2a4, 0xb3a4, 0xb4a4, 0xb5a4, 0xb6a4, 0xb7a4, 0xb8a4, 0xb9a4, 0xbaa4, 0xbba4, 0xbca4, 0xbda4, 0xbea4, 0xbfa4, 0xc0a4, 0xc1a4, 0xc2a4, 0xc3a4, 0xc4a4, 0xc5a4, 0xc6a4, 0xc7a4, 0xc8a4, 0xc9a4, 0xcaa4, 0xcba4, 0xcca4, 0xcda4, 0xcea4, 0xcfa4, 0xd0a4, 0xd1a4, 0xd2a4, 0xd3a4, 0xd4a4, 0xd5a4, 0xd6a4, 0xd7a4, 0xd8a4, 0xd9a4, 0xdaa4, 0xdba4, 0xdca4, 0xdda4, 0xdea4, 0xdfa4, 0xe0a4, 0xe1a4, 0xe2a4, 0xe3a4, 0xe4a4, 0xe5a4, 0xe6a4, 0xe7a4, 0xe8a4, 0xe9a4, 0xeaa4, 0xeba4, 0xeca4, 0xeda4, 0xeea4, 0xefa4, 0xf0a4, 0xf1a4, 0xf2a4, 0xf3a4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x61a9, 0x62a9, 0x66a9, 0x67a9, 0x001a, 0x001a, 0xa1a5, 0xa2a5, 0xa3a5, 0xa4a5, 0xa5a5, 0xa6a5, 0xa7a5, 0xa8a5, 0xa9a5, 0xaaa5, 0xaba5, 0xaca5, 0xada5, 0xaea5, 0xafa5, 0xb0a5, 0xb1a5, 0xb2a5, 0xb3a5, 0xb4a5, 0xb5a5, 0xb6a5, 0xb7a5, 0xb8a5, 0xb9a5, 0xbaa5, 0xbba5, 0xbca5, 0xbda5, 0xbea5, 0xbfa5, 0xc0a5, 0xc1a5, 0xc2a5, 0xc3a5, 0xc4a5, 0xc5a5, 0xc6a5, 0xc7a5, 0xc8a5, 0xc9a5, 0xcaa5, 0xcba5, 0xcca5, 0xcda5, 0xcea5, 0xcfa5, 0xd0a5, 0xd1a5, 0xd2a5, 0xd3a5, 0xd4a5, 0xd5a5, 0xd6a5, 0xd7a5, 0xd8a5, 0xd9a5, 0xdaa5, 0xdba5, 0xdca5, 0xdda5, 0xdea5, 0xdfa5, 0xe0a5, 0xe1a5, 0xe2a5, 0xe3a5, 0xe4a5, 0xe5a5, 0xe6a5, 0xe7a5, 0xe8a5, 0xe9a5, 0xeaa5, 0xeba5, 0xeca5, 0xeda5, 0xeea5, 0xefa5, 0xf0a5, 0xf1a5, 0xf2a5, 0xf3a5, 0xf4a5, 0xf5a5, 0xf6a5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60a9, 0x63a9, 0x64a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5a8, 0xc6a8, 0xc7a8, 0xc8a8, 0xc9a8, 0xcaa8, 0xcba8, 0xcca8, 0xcda8, 0xcea8, 0xcfa8, 0xd0a8, 0xd1a8, 0xd2a8, 0xd3a8, 0xd4a8, 0xd5a8, 0xd6a8, 0xd7a8, 0xd8a8, 0xd9a8, 0xdaa8, 0xdba8, 0xdca8, 0xdda8, 0xdea8, 0xdfa8, 0xe0a8, 0xe1a8, 0xe2a8, 0xe3a8, 0xe4a8, 0xe5a8, 0xe6a8, 0xe7a8, 0xe8a8, 0xe9a8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5a2, 0xe6a2, 0xe7a2, 0xe8a2, 0xe9a2, 0xeaa2, 0xeba2, 0xeca2, 0xeda2, 0xeea2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5aa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x49a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4aa9, 0x4ba9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ca9, 0x4da9, 0x4ea9, 0x001a, 0x001a, 0x4fa9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x51a9, 0x001a, 0x001a, 0x52a9, 0x53a9, 0x001a, 0x001a, 0x54a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0x4e00[ 20902 ] = { 0xbbd2, 0xa1b6, 0x4081, 0xdfc6, 0x4181, 0x4281, 0x4381, 0xf2cd, 0xc9d5, 0xfdc8, 0xcfc9, 0xc2cf, 0xa2d8, 0xbbb2, 0xebd3, 0x4481, 0xa4d8, 0xf3b3, 0x4581, 0xa8d7, 0xd2c7, 0xa7d8, 0xc0ca, 0x4681, 0xf0c7, 0xfbb1, 0xb5d2, 0xd4b4, 0xabb6, 0xbfcb, 0xa9d8, 0x4781, 0x4881, 0x4981, 0xaab6, 0x4a81, 0xbdc1, 0xcfd1, 0x4b81, 0xa5c9, 0xadd8, 0x4c81, 0xf6b8, 0xbed1, 0xdce3, 0xd0d6, 0x4d81, 0x4e81, 0xe1b7, 0x4f81, 0xaeb4, 0x5081, 0xd9c1, 0x5181, 0xbcd8, 0x5281, 0xe8cd, 0xa4b5, 0xaace, 0xf7d6, 0x5381, 0xf6c0, 0xd9be, 0xafd8, 0x5481, 0x5581, 0x5681, 0xcbc4, 0x5781, 0xc3be, 0x5881, 0xb1d8, 0xb4c3, 0xe5d2, 0x5981, 0xaed6, 0xdace, 0xa7d5, 0xf5ba, 0xa6b7, 0xd6c0, 0x5a81, 0xb9c6, 0xd2c5, 0xc7c7, 0x5b81, 0xd4b9, 0x5c81, 0xcbb3, 0xd2d2, 0x5d81, 0x5e81, 0xbfd8, 0xc5be, 0xf2c6, 0xb2d2, 0xb0cf, 0xe7cf, 0x5f81, 0x6081, 0x6181, 0x6281, 0xe9ca, 0x6381, 0x6481, 0xc0d8, 0x6581, 0x6681, 0x6781, 0x6881, 0x6981, 0x6a81, 0xf2c2, 0xd2c2, 0x6b81, 0xe9c8, 0x6c81, 0x6d81, 0x6e81, 0x6f81, 0x7081, 0x7181, 0x7281, 0x7381, 0x7481, 0x7581, 0xacc7, 0x7681, 0x7781, 0x7881, 0x7981, 0x7a81, 0x7b81, 0x7c81, 0xcbc1, 0x7d81, 0xe8d3, 0xf9d5, 0x7e81, 0xc2ca, 0xfeb6, 0xa1d8, 0xdad3, 0xf7bf, 0x8081, 0xc6d4, 0xa5bb, 0xc1d8, 0xe5ce, 0xaebe, 0x8181, 0x8281, 0xa8d8, 0x8381, 0xc7d1, 0xa9d0, 0x8481, 0x8581, 0x8681, 0xbdd8, 0xefd9, 0xf6cd, 0xbabf, 0x8781, 0xbbbd, 0xa5ba, 0xe0d2, 0xfab2, 0xe0ba, 0xb6c4, 0x8881, 0xedcf, 0xa9be, 0xa4cd, 0xc1c1, 0x8981, 0x8a81, 0x8b81, 0xd7c7, 0xf1d9, 0x8c81, 0xf4d9, 0x8d81, 0x8e81, 0x8f81, 0x9081, 0xcbc8, 0xe9d8, 0x9181, 0x9281, 0x9381, 0xdad2, 0xb2ca, 0xcac8, 0xecd8, 0xead8, 0xc6d8, 0xf6bd, 0xcdc6, 0xf0b3, 0x9481, 0xebd8, 0xf1bd, 0xe9bd, 0x9581, 0xd4c8, 0xd3b4, 0x9681, 0x9781, 0xd8c2, 0x9881, 0xd6b2, 0xd0d7, 0xcbca, 0xfbcb, 0xccd5, 0xb6b8, 0xc9cf, 0x9981, 0x9a81, 0x9b81, 0xdad9, 0xf0d8, 0xaac7, 0x9c81, 0xeed8, 0x9d81, 0xfab4, 0xeec1, 0xd4d2, 0x9e81, 0x9f81, 0xedd8, 0xa081, 0xc7d2, 0xefd8, 0xc7c3, 0xa181, 0xa281, 0xa381, 0xf6d1, 0xa481, 0xd9d6, 0xf2d8, 0xa581, 0xf5d8, 0xfebc, 0xdbbc, 0xa681, 0xa781, 0xa881, 0xcec8, 0xa981, 0xddb7, 0xaa81, 0xc2b7, 0xab81, 0xf3c6, 0xac81, 0xad81, 0xae81, 0xaf81, 0xb081, 0xb181, 0xb281, 0xf8d8, 0xc1d2, 0xb381, 0xb481, 0xe9ce, 0xbfbc, 0xfcb7, 0xa5b7, 0xddd0, 0xb581, 0xb681, 0xb781, 0xb881, 0xb981, 0xdad6, 0xc5d3, 0xefbb, 0xe1bb, 0xf1d8, 0xba81, 0xbb81, 0xa1c9, 0xb0ce, 0xabb4, 0xbc81, 0xf3d8, 0xbd81, 0xcbc9, 0xf6d8, 0xd7c2, 0xf7d8, 0xbe81, 0xbf81, 0xb1ce, 0xf9d8, 0xc081, 0xc181, 0xc281, 0xaeb2, 0xc0b9, 0xc381, 0xa3d9, 0xc481, 0xe9b0, 0xc581, 0xe6c1, 0xc681, 0xecc9, 0xc781, 0xc5cb, 0xc881, 0xc6cb, 0xa4d9, 0xc981, 0xca81, 0xcb81, 0xcc81, 0xcd81, 0xe8b5, 0xce81, 0xcf81, 0xabb5, 0xd081, 0xd181, 0xd281, 0xd381, 0xd481, 0xd581, 0xbbce, 0xcdb5, 0xa1d7, 0xf4d7, 0xd3d3, 0xd681, 0xe5cc, 0xd781, 0xceba, 0xd881, 0xa2d9, 0xdcd9, 0xe0d3, 0xfdd8, 0xf0b7, 0xf7d7, 0xfed8, 0xfad8, 0xa1d9, 0xe3c4, 0xd981, 0xda81, 0xb6d3, 0xf4d8, 0xddd9, 0xdb81, 0xfbd8, 0xdc81, 0xe5c5, 0xdd81, 0xde81, 0xd0c0, 0xdf81, 0xe081, 0xf0d1, 0xdbb0, 0xe181, 0xe281, 0xd1bc, 0xa6d9, 0xe381, 0xa5d9, 0xe481, 0xe581, 0xe681, 0xe781, 0xacd9, 0xaed9, 0xe881, 0xabd9, 0xb9ca, 0xe981, 0xea81, 0xeb81, 0xa9d9, 0xb6d6, 0xec81, 0xed81, 0xee81, 0xdeb3, 0xa8d9, 0xef81, 0xfdc0, 0xf081, 0xccca, 0xf181, 0xaad9, 0xf281, 0xa7d9, 0xf381, 0xf481, 0xb0d9, 0xf581, 0xf681, 0xb1b6, 0xf781, 0xf881, 0xf981, 0xa9b9, 0xfa81, 0xc0d2, 0xfb81, 0xfc81, 0xc0cf, 0xfd81, 0xfe81, 0xc2c2, 0x4082, 0xc4bd, 0xecd5, 0xe0b2, 0xc8c7, 0xebbf, 0xadd9, 0x4182, 0xafd9, 0x4282, 0xeace, 0xeeba, 0x4382, 0x4482, 0x4582, 0x4682, 0x4782, 0xd6c7, 0x4882, 0x4982, 0x4a82, 0x4b82, 0x4c82, 0x4d82, 0x4e82, 0x4f82, 0x5082, 0xe3b1, 0x5182, 0x5282, 0x5382, 0xd9b4, 0xedb6, 0xb4d9, 0x5482, 0x5582, 0x5682, 0x5782, 0xa1bf, 0x5882, 0x5982, 0x5a82, 0xded9, 0xcec7, 0xfec0, 0xb8d9, 0x5b82, 0x5c82, 0x5d82, 0x5e82, 0x5f82, 0xd7cb, 0xfdb7, 0x6082, 0xb5d9, 0x6182, 0xb7d9, 0xa3b1, 0xe1d3, 0xb9d9, 0x6282, 0xc5d0, 0x6382, 0xb6d9, 0x6482, 0x6582, 0xb1d9, 0x6682, 0xb2d9, 0xa9c1, 0xb3d9, 0x6782, 0x6882, 0xf3bc, 0xded0, 0xa9b8, 0x6982, 0xe3be, 0x6a82, 0xbdd9, 0x6b82, 0x6c82, 0x6d82, 0x6e82, 0xbad9, 0x6f82, 0xb3b0, 0x7082, 0x7182, 0x7282, 0xc2d9, 0x7382, 0x7482, 0x7582, 0x7682, 0x7782, 0x7882, 0x7982, 0x7a82, 0x7b82, 0x7c82, 0x7d82, 0x7e82, 0x8082, 0xc4d9, 0xb6b1, 0x8182, 0xbfd9, 0x8282, 0x8382, 0xb9b5, 0x8482, 0xf3be, 0x8582, 0x8682, 0x8782, 0xc8cc, 0xf2ba, 0xd0d2, 0x8882, 0xc3d9, 0x8982, 0x8a82, 0xe8bd, 0x8b82, 0xabb3, 0x8c82, 0x8d82, 0x8e82, 0xc5d9, 0xebbe, 0x8f82, 0xc6d9, 0xbbd9, 0xdfc4, 0x9082, 0xbed9, 0xc1d9, 0xc0d9, 0x9182, 0x9282, 0x9382, 0x9482, 0x9582, 0x9682, 0x9782, 0x9882, 0x9982, 0x9a82, 0x9b82, 0xaed5, 0x9c82, 0xb5d6, 0x9d82, 0xe3c7, 0x9e82, 0x9f82, 0xa082, 0xa182, 0xc8d9, 0xa282, 0xa382, 0xa482, 0xd9bc, 0xcad9, 0xa582, 0xa682, 0xa782, 0xbcd9, 0xa882, 0xcbd9, 0xabc6, 0xa982, 0xaa82, 0xab82, 0xac82, 0xad82, 0xc9d9, 0xae82, 0xaf82, 0xb082, 0xb182, 0xf6d7, 0xb282, 0xa3cd, 0xb382, 0xb482, 0xb582, 0xb682, 0xb782, 0xb882, 0xb982, 0xba82, 0xa1bd, 0xbb82, 0xbc82, 0xbd82, 0xbe82, 0xbf82, 0xc082, 0xccd9, 0xc182, 0xc282, 0xc382, 0xc482, 0xc582, 0xc682, 0xc782, 0xc882, 0xc982, 0xbcc5, 0xb5cd, 0xca82, 0xcb82, 0xcc82, 0xcdd9, 0xcd82, 0xce82, 0xc7d9, 0xa5b3, 0xfebf, 0xcf82, 0xd082, 0xd182, 0xd282, 0xb5b8, 0xd382, 0xd482, 0xfcc0, 0xd582, 0xd682, 0xd782, 0xd882, 0xf8b0, 0xd982, 0xda82, 0xdb82, 0xdc82, 0xdd82, 0xde82, 0xdf82, 0xe082, 0xe182, 0xe282, 0xe382, 0xe482, 0xe582, 0xe682, 0xe782, 0xe882, 0xe982, 0xea82, 0xeb82, 0xec82, 0xed82, 0xf6b4, 0xee82, 0xced9, 0xef82, 0xcfd9, 0xa2b4, 0xd0d9, 0xf082, 0xf182, 0xdfb4, 0xf282, 0xf382, 0xf482, 0xf582, 0xf682, 0xc1b0, 0xf782, 0xf882, 0xf982, 0xfa82, 0xfb82, 0xfc82, 0xfd82, 0xd1d9, 0xb5c9, 0xfe82, 0x4083, 0x4183, 0x4283, 0x4383, 0x4483, 0x4583, 0x4683, 0x4783, 0x4883, 0x4983, 0x4a83, 0x4b83, 0x4c83, 0x4d83, 0x4e83, 0x4f83, 0x5083, 0x5183, 0xf1cf, 0x5283, 0x5383, 0x5483, 0x5583, 0x5683, 0x5783, 0xd2d9, 0x5883, 0x5983, 0x5a83, 0xc5c1, 0x5b83, 0x5c83, 0x5d83, 0x5e83, 0x5f83, 0x6083, 0x6183, 0x6283, 0x6383, 0x6483, 0x6583, 0xd6d9, 0xaec9, 0x6683, 0x6783, 0x6883, 0x6983, 0xd5d9, 0xd4d9, 0xd7d9, 0x6a83, 0x6b83, 0x6c83, 0x6d83, 0xdbcb, 0x6e83, 0xa9bd, 0x6f83, 0x7083, 0x7183, 0x7283, 0x7383, 0xa7c6, 0x7483, 0x7583, 0x7683, 0x7783, 0x7883, 0x7983, 0x7a83, 0x7b83, 0x7c83, 0x7d83, 0xd3d9, 0xd8d9, 0x7e83, 0x8083, 0x8183, 0xd9d9, 0x8283, 0x8383, 0x8483, 0x8583, 0x8683, 0x8783, 0xe5c8, 0x8883, 0x8983, 0x8a83, 0x8b83, 0x8c83, 0x8d83, 0x8e83, 0x8f83, 0x9083, 0x9183, 0x9283, 0x9383, 0x9483, 0x9583, 0xdcc0, 0x9683, 0x9783, 0x9883, 0x9983, 0x9a83, 0x9b83, 0x9c83, 0x9d83, 0x9e83, 0x9f83, 0xa083, 0xa183, 0xa283, 0xa383, 0xa483, 0xa583, 0xa683, 0xa783, 0xa883, 0xa983, 0xaa83, 0xab83, 0xac83, 0xad83, 0xae83, 0xaf83, 0xb083, 0xb183, 0xb283, 0xf9b6, 0xa3d8, 0xcad4, 0xb383, 0xaad4, 0xd6d0, 0xe4b3, 0xd7d5, 0xb483, 0xc8cf, 0xe2b9, 0xb583, 0xcbbf, 0xb683, 0xe2c3, 0xb783, 0xb883, 0xb983, 0xd2b6, 0xba83, 0xbb83, 0xc3cd, 0xeed9, 0xf0d9, 0xbc83, 0xbd83, 0xbe83, 0xb3b5, 0xbf83, 0xb5b6, 0xc083, 0xc183, 0xc283, 0xc383, 0xc483, 0xa4be, 0xc583, 0xc683, 0xebc8, 0xc783, 0xc883, 0xabc8, 0xc983, 0xca83, 0xcbb0, 0xabb9, 0xf9c1, 0xe2d9, 0xcb83, 0xbcc0, 0xb2b9, 0xcc83, 0xd8b9, 0xcbd0, 0xf8b1, 0xe4c6, 0xdfbe, 0xe4b5, 0xc8d7, 0xcd83, 0xf8d1, 0xe6bc, 0xdeca, 0xce83, 0xcf83, 0xbdbc, 0xe6d9, 0xe7d8, 0xd083, 0xd183, 0xdac4, 0xd283, 0xd383, 0xd4b8, 0xbdc8, 0xd483, 0xd583, 0xe1b2, 0xd9d4, 0xd683, 0xd783, 0xd883, 0xd983, 0xb0c3, 0xda83, 0xdb83, 0xe1c3, 0xa2da, 0xdfc8, 0xdc83, 0xb4d0, 0xdd83, 0xfcbe, 0xa9c5, 0xde83, 0xdf83, 0xe083, 0xdab9, 0xe183, 0xa3da, 0xe283, 0xa9d4, 0xa4da, 0xe383, 0xe483, 0xe583, 0xe683, 0xe783, 0xfbd9, 0xacb6, 0xe883, 0xe983, 0xebb7, 0xf9b1, 0xfcd9, 0xe5b3, 0xf6be, 0xea83, 0xf6bf, 0xb1d2, 0xe4c0, 0xeb83, 0xec83, 0xed83, 0xb3b6, 0xfed9, 0xfdd9, 0xee83, 0xef83, 0xbbbe, 0xf083, 0xf183, 0xf283, 0xe0c6, 0xf383, 0xbcd7, 0xa1da, 0xf483, 0xb9c1, 0xf583, 0xf2b5, 0xe8c1, 0xf683, 0xf783, 0xf5bc, 0xf883, 0xd5b4, 0xf983, 0xfa83, 0xfb83, 0xfc83, 0xfd83, 0xfe83, 0x4084, 0x4184, 0x4284, 0xddc1, 0x4384, 0xfdc4, 0x4484, 0x4584, 0xb8bc, 0xb2b7, 0x4684, 0x4784, 0xefb7, 0x4884, 0x4984, 0x4a84, 0x4b84, 0x4c84, 0x4d84, 0xecd9, 0x4e84, 0xbec6, 0x4f84, 0xadbf, 0xcbbb, 0x5084, 0x5184, 0xcab5, 0x5284, 0xc9db, 0xd7d0, 0x5384, 0xb9cd, 0xbcb0, 0xf6b3, 0xf7bb, 0xcadb, 0xafba, 0x5484, 0xe4d4, 0xb6b5, 0xf3b5, 0xd6d8, 0xd0c8, 0x5584, 0x5684, 0xd6b7, 0xd0c7, 0xd7d8, 0x5784, 0xafbf, 0x5884, 0x5984, 0xbbdb, 0xd8d8, 0x5a84, 0x5b84, 0xccd0, 0xaebb, 0x5c84, 0x5d84, 0x5e84, 0xbeeb, 0xd0c1, 0xf5c1, 0xf2d4, 0xd5b8, 0xb4b4, 0x5f84, 0xf5b3, 0x6084, 0x6184, 0xbec9, 0x6284, 0x6384, 0x6484, 0xd0c5, 0x6584, 0x6684, 0x6784, 0xd9c5, 0xfbc0, 0x6884, 0xf0b1, 0x6984, 0xd9d8, 0xceb9, 0x6a84, 0xbdb5, 0x6b84, 0x6c84, 0xdad8, 0x6d84, 0x6e84, 0xc6d6, 0xa2cb, 0xafc8, 0xb2c9, 0xccb4, 0xccbf, 0x6f84, 0xf4b9, 0x7084, 0xdbd8, 0xdcd8, 0xe7b6, 0xc1bc, 0xeacc, 0x7184, 0x7284, 0x7384, 0x7484, 0x7584, 0x7684, 0xf7cf, 0x7784, 0xddd8, 0xb0c7, 0x7884, 0x7984, 0xd0b9, 0xa3bd, 0x7a84, 0x7b84, 0xdecc, 0x7c84, 0xcac6, 0x7d84, 0x7e84, 0x8084, 0x8184, 0x8284, 0xe0d8, 0x8384, 0xded8, 0x8484, 0x8584, 0xdfd8, 0x8684, 0x8784, 0x8884, 0xfeb0, 0x8984, 0xe7be, 0x8a84, 0xa3ca, 0xf4bc, 0x8b84, 0x8c84, 0x8d84, 0x8e84, 0xb1b8, 0x8f84, 0x9084, 0xeeb8, 0x9184, 0x9284, 0x9384, 0x9484, 0x9584, 0x9684, 0x9784, 0x9884, 0x9984, 0x9a84, 0xe2d8, 0x9b84, 0xcbbd, 0x9c84, 0xe4d8, 0xe3d8, 0x9d84, 0x9e84, 0x9f84, 0xa084, 0xa184, 0xfcc5, 0xa284, 0xa384, 0xa484, 0xa584, 0xa684, 0xa784, 0xa884, 0xe5d8, 0xa984, 0xaa84, 0xe6d8, 0xab84, 0xac84, 0xad84, 0xae84, 0xaf84, 0xb084, 0xb184, 0xa6c1, 0xb284, 0xb0c8, 0xecb0, 0xa6b9, 0xd3bc, 0xf1ce, 0xbddb, 0xd3c1, 0xb384, 0xb484, 0xb584, 0xb684, 0xafb6, 0xfad6, 0xacc5, 0xd9bd, 0xbedb, 0xbfdb, 0xb784, 0xb884, 0xb984, 0xf8c0, 0xa2be, 0xcdc0, 0xba84, 0xbb84, 0xbc84, 0xbd84, 0xbe84, 0xbf84, 0xc084, 0xc184, 0xc284, 0xc384, 0xc0db, 0xc6ca, 0xc484, 0xc584, 0xc684, 0xaab2, 0xc784, 0xc884, 0xc984, 0xc2d3, 0xca84, 0xe3c3, 0xcb84, 0xabd1, 0xcc84, 0xcd84, 0xce84, 0xcf84, 0xc2db, 0xd084, 0xd5c0, 0xd184, 0xd284, 0xd384, 0xc3db, 0xd484, 0xb1bf, 0xd584, 0xd684, 0xd784, 0xd884, 0xd984, 0xda84, 0xbcc4, 0xdb84, 0xdc84, 0xdd84, 0xde84, 0xdac7, 0xdf84, 0xe084, 0xe184, 0xe284, 0xe384, 0xe484, 0xe584, 0xe684, 0xe784, 0xe884, 0xe984, 0xc4db, 0xea84, 0xeb84, 0xec84, 0xed84, 0xee84, 0xef84, 0xf084, 0xf184, 0xe8d9, 0xd7c9, 0xf284, 0xf384, 0xf484, 0xb4b9, 0xf0ce, 0xc8d4, 0xf584, 0xf684, 0xf784, 0xf884, 0xfcb0, 0xd2b4, 0xf984, 0xd9d0, 0xfa84, 0xfb84, 0xfc84, 0xfd84, 0xe9d9, 0xfe84, 0xcbde, 0xebd9, 0x4085, 0x4185, 0x4285, 0x4385, 0xb0d8, 0xafbb, 0xb1b1, 0x4485, 0xd7b3, 0xced8, 0x4585, 0x4685, 0xd1d4, 0x4785, 0x4885, 0xb3bd, 0xefbf, 0x4985, 0xbbcf, 0x4a85, 0x4b85, 0xd0d8, 0x4c85, 0x4d85, 0x4e85, 0xcbb7, 0x4f85, 0x5085, 0x5185, 0xd1d8, 0x5285, 0x5385, 0x5485, 0x5585, 0x5685, 0x5785, 0x5885, 0x5985, 0x5a85, 0x5b85, 0xa5c6, 0xf8c7, 0xbdd2, 0x5c85, 0x5d85, 0xd2d8, 0xe4c4, 0x5e85, 0xaeca, 0x5f85, 0xa7c7, 0x6085, 0xa6d8, 0x6185, 0xfdc9, 0xe7ce, 0xdcbb, 0xebb0, 0x6285, 0x6385, 0x6485, 0xaabb, 0xadd0, 0x6585, 0xb0b1, 0xe4d7, 0xbfd7, 0x6685, 0xa5b5, 0xf4c2, 0xcfc4, 0x6785, 0x6885, 0xa9b2, 0x6985, 0xb7b2, 0x6a85, 0xe5b1, 0xb2df, 0xbcd5, 0xa8bf, 0xacc2, 0xd5d8, 0xb1c2, 0x6b85, 0xd4d8, 0xd4ce, 0x6c85, 0xe0da, 0x6d85, 0xc0ce, 0x6e85, 0x6f85, 0xb4d8, 0xaec3, 0xa1d3, 0xa3ce, 0x7085, 0xb4bc, 0xb4c8, 0xd1c2, 0x7185, 0xedbe, 0xb6d0, 0x7285, 0xe1da, 0x7385, 0x7485, 0x7585, 0x7685, 0xe4c7, 0x7785, 0x7885, 0xa7b3, 0x7985, 0xf2b6, 0xfccc, 0xfac0, 0x7a85, 0x7b85, 0xf7c0, 0x7c85, 0xb9d1, 0xe1d1, 0xc7d8, 0x7d85, 0x7e85, 0x8085, 0x8185, 0x8285, 0x8385, 0x8485, 0xdeb2, 0x8585, 0x8685, 0xe5c0, 0x8785, 0xf1ba, 0x8885, 0x8985, 0xc8d8, 0x8a85, 0xadd4, 0x8b85, 0x8c85, 0xe1cf, 0xc9d8, 0x8d85, 0xcad8, 0xc3cf, 0x8e85, 0xf8b3, 0xc7be, 0x8f85, 0x9085, 0x9185, 0x9285, 0xcbd8, 0x9385, 0x9485, 0x9585, 0x9685, 0x9785, 0x9885, 0x9985, 0xccdb, 0x9a85, 0x9b85, 0x9c85, 0x9d85, 0xa5c8, 0x9e85, 0x9f85, 0xa085, 0xd8cf, 0xa185, 0xfec8, 0xceb2, 0xa285, 0xa385, 0xa485, 0xa585, 0xa685, 0xd6d3, 0xe6b2, 0xb0bc, 0xd1d3, 0xabcb, 0xb4b7, 0xa785, 0xa885, 0xa985, 0xa2b7, 0xaa85, 0xab85, 0xe5ca, 0xac85, 0xa1c8, 0xdcca, 0xe4b1, 0xf0d0, 0xad85, 0xd1c5, 0xae85, 0xaf85, 0xb085, 0xc5db, 0xfeb5, 0xb185, 0xb285, 0xdabf, 0xc5b9, 0xe4be, 0xedc1, 0xb385, 0xb6df, 0xb5df, 0xbbd6, 0xd0bd, 0xd9d5, 0xc8b0, 0xa3b6, 0xc9bf, 0xa8cc, 0xb3df, 0xb7ca, 0xd2d3, 0xb485, 0xcfd8, 0xb6d2, 0xc5ba, 0xbecb, 0xbecc, 0xb585, 0xb7df, 0xf0b5, 0xb4df, 0xb685, 0xb785, 0xb885, 0xf5d3, 0xb985, 0xd4b3, 0xf7b8, 0xba85, 0xbadf, 0xbb85, 0xcfba, 0xaabc, 0xf5b5, 0xbc85, 0xaccd, 0xfbc3, 0xf3ba, 0xf4c0, 0xc2cd, 0xf2cf, 0xb8df, 0xc5cf, 0xbd85, 0xc0c2, 0xb9df, 0xf0c2, 0xbe85, 0xbf85, 0xc085, 0xfdbe, 0xc185, 0xdfc1, 0xcccd, 0xf7d2, 0xcdb7, 0xc1df, 0xc285, 0xc4df, 0xc385, 0xc485, 0xf1b7, 0xc9b0, 0xd6b6, 0xd4b7, 0xc585, 0xacba, 0xfdcc, 0xd4bf, 0xb1cb, 0xf4c6, 0xc685, 0xa8d6, 0xc5df, 0xc785, 0xe2ce, 0xb3b3, 0xc885, 0xc985, 0xfcce, 0xb5b4, 0xca85, 0xc7ce, 0xf0ba, 0xcb85, 0xe1ce, 0xcc85, 0xbdd1, 0xcd85, 0xce85, 0xc0df, 0xcf85, 0xd085, 0xf4b4, 0xd185, 0xcab3, 0xd285, 0xe6b8, 0xbbdf, 0xd385, 0xd485, 0xd585, 0xd685, 0xc5c4, 0xd785, 0xbcdf, 0xbddf, 0xbedf, 0xbbc5, 0xbfdf, 0xc2df, 0xb1d4, 0xc3df, 0xd885, 0xbac7, 0xd8ce, 0xd985, 0xda85, 0xdb85, 0xdc85, 0xdd85, 0xd8c4, 0xde85, 0xcadf, 0xdf85, 0xcfdf, 0xe085, 0xdcd6, 0xe185, 0xe285, 0xe385, 0xe485, 0xe585, 0xe685, 0xe785, 0xe885, 0xc9df, 0xdadf, 0xb6ce, 0xe985, 0xc7ba, 0xcedf, 0xc8df, 0xdec5, 0xea85, 0xeb85, 0xebc9, 0xf4ba, 0xfcc3, 0xec85, 0xed85, 0xd7be, 0xee85, 0xc6df, 0xef85, 0xcddf, 0xf085, 0xd8c5, 0xf185, 0xf285, 0xf385, 0xf485, 0xa6d5, 0xcdba, 0xf585, 0xccbe, 0xbdd3, 0xc0b8, 0xf685, 0xe4d6, 0xf785, 0xc7df, 0xbeb9, 0xa7bf, 0xf885, 0xf985, 0xfcc1, 0xcbdf, 0xccdf, 0xfa85, 0xd0df, 0xfb85, 0xfc85, 0xfd85, 0xfe85, 0x4086, 0xdbdf, 0xe5df, 0x4186, 0xd7df, 0xd6df, 0xc9d7, 0xe3df, 0xe4df, 0xebe5, 0xa7d2, 0xd2df, 0x4286, 0xa9bf, 0x4386, 0xdbd4, 0x4486, 0xc8bf, 0xd4df, 0x4586, 0x4686, 0x4786, 0xcccf, 0x4886, 0x4986, 0xdddf, 0x4a86, 0xcad1, 0x4b86, 0xdedf, 0xa7b0, 0xb7c6, 0xd3df, 0x4c86, 0xe5ba, 0x4d86, 0xdfb6, 0xdbcd, 0xfeb9, 0xd5d4, 0x4e86, 0x4f86, 0xdfdf, 0xeccf, 0xa5b0, 0xe7df, 0xd1df, 0xc6d1, 0xd5df, 0xd8df, 0xd9df, 0xdcdf, 0x5086, 0xa9bb, 0x5186, 0xe0df, 0xe1df, 0x5286, 0xe2df, 0xe6df, 0xe8df, 0xb4d3, 0x5386, 0x5486, 0x5586, 0x5686, 0x5786, 0xe7b8, 0xb6c5, 0xeadf, 0xdac9, 0xa8c1, 0xc4c4, 0x5886, 0x5986, 0xdebf, 0xf8cf, 0x5a86, 0x5b86, 0x5c86, 0xdcd5, 0xeedf, 0x5d86, 0x5e86, 0x5f86, 0x6086, 0x6186, 0x6286, 0xb8b2, 0x6386, 0xdfba, 0xecdf, 0x6486, 0xc1db, 0x6586, 0xe4d1, 0x6686, 0x6786, 0x6886, 0x6986, 0xf4cb, 0xbdb4, 0x6a86, 0xa6b0, 0x6b86, 0x6c86, 0x6d86, 0x6e86, 0x6f86, 0xf1df, 0xc6cc, 0xf2df, 0x7086, 0x7186, 0xeddf, 0x7286, 0x7386, 0x7486, 0x7586, 0x7686, 0x7786, 0xe9df, 0x7886, 0x7986, 0x7a86, 0x7b86, 0xebdf, 0x7c86, 0xefdf, 0xf0df, 0xbdbb, 0x7d86, 0x7e86, 0xf3df, 0x8086, 0x8186, 0xf4df, 0x8286, 0xa3bb, 0x8386, 0xdbca, 0xa8ce, 0xa7e0, 0xaab3, 0x8486, 0xa6e0, 0x8586, 0x8686, 0x8786, 0xa1e0, 0x8886, 0x8986, 0x8a86, 0x8b86, 0xfedf, 0x8c86, 0xd9cd, 0xfcdf, 0x8d86, 0xfadf, 0x8e86, 0xd0bf, 0xc4d7, 0x8f86, 0xccc9, 0x9086, 0x9186, 0xf8df, 0xa1b0, 0x9286, 0x9386, 0x9486, 0x9586, 0x9686, 0xfddf, 0x9786, 0x9886, 0x9986, 0x9a86, 0xfbdf, 0xa2e0, 0x9b86, 0x9c86, 0x9d86, 0x9e86, 0x9f86, 0xa8e0, 0xa086, 0xa186, 0xa286, 0xa386, 0xc8b7, 0xa486, 0xa586, 0xa1c6, 0xb6c9, 0xb2c0, 0xf5df, 0xa686, 0xa786, 0xbec5, 0xa886, 0xc4d8, 0xf9df, 0xf6c4, 0xa986, 0xaa86, 0xab86, 0xac86, 0xad86, 0xae86, 0xa3e0, 0xa4e0, 0xa5e0, 0xa5d0, 0xaf86, 0xb086, 0xb4e0, 0xe4cc, 0xb186, 0xb1e0, 0xb286, 0xa6bf, 0xafe0, 0xb9ce, 0xabe0, 0xc6c9, 0xb386, 0xb486, 0xaec0, 0xaee0, 0xedba, 0xb0ba, 0xa9e0, 0xb586, 0xb686, 0xb786, 0xf6df, 0xb886, 0xb3e0, 0xb986, 0xba86, 0xb8e0, 0xbb86, 0xbc86, 0xbd86, 0xadb4, 0xb9e0, 0xbe86, 0xbf86, 0xb2cf, 0xc8ba, 0xc086, 0xb0e0, 0xc186, 0xc286, 0xc386, 0xc486, 0xc586, 0xc686, 0xc786, 0xfad0, 0xc886, 0xc986, 0xca86, 0xcb86, 0xcc86, 0xcd86, 0xce86, 0xcf86, 0xd086, 0xace0, 0xd186, 0xfbd4, 0xd286, 0xf7df, 0xd386, 0xe7c5, 0xd486, 0xade0, 0xd586, 0xf7d3, 0xd686, 0xb6e0, 0xb7e0, 0xd786, 0xd886, 0xd986, 0xda86, 0xdb86, 0xc4e0, 0xe1d0, 0xdc86, 0xdd86, 0xde86, 0xbce0, 0xdf86, 0xe086, 0xc9e0, 0xcae0, 0xe186, 0xe286, 0xe386, 0xbee0, 0xaae0, 0xa4c9, 0xc1e0, 0xe486, 0xb2e0, 0xe586, 0xe686, 0xe786, 0xe886, 0xe986, 0xc8ca, 0xc3e0, 0xea86, 0xb5e0, 0xeb86, 0xcbce, 0xec86, 0xc3cb, 0xcde0, 0xc6e0, 0xc2e0, 0xed86, 0xcbe0, 0xee86, 0xbae0, 0xbfe0, 0xc0e0, 0xef86, 0xf086, 0xc5e0, 0xf186, 0xf286, 0xc7e0, 0xc8e0, 0xf386, 0xcce0, 0xf486, 0xbbe0, 0xf586, 0xf686, 0xf786, 0xf886, 0xf986, 0xd4cb, 0xd5e0, 0xfa86, 0xd6e0, 0xd2e0, 0xfb86, 0xfc86, 0xfd86, 0xfe86, 0x4087, 0x4187, 0xd0e0, 0xcebc, 0x4287, 0x4387, 0xd1e0, 0x4487, 0xc2b8, 0xc5d8, 0x4587, 0x4687, 0x4787, 0x4887, 0x4987, 0x4a87, 0x4b87, 0x4c87, 0xead0, 0x4d87, 0x4e87, 0xefc2, 0x4f87, 0x5087, 0xcfe0, 0xbde0, 0x5187, 0x5287, 0x5387, 0xd4e0, 0xd3e0, 0x5487, 0x5587, 0xd7e0, 0x5687, 0x5787, 0x5887, 0x5987, 0xdce0, 0xd8e0, 0x5a87, 0x5b87, 0x5c87, 0xf6d6, 0xb0b3, 0x5d87, 0xecd7, 0x5e87, 0xbbcb, 0x5f87, 0x6087, 0xdae0, 0x6187, 0xfbce, 0x6287, 0x6387, 0x6487, 0xd9ba, 0x6587, 0x6687, 0x6787, 0x6887, 0x6987, 0x6a87, 0x6b87, 0x6c87, 0x6d87, 0x6e87, 0x6f87, 0x7087, 0xe1e0, 0xdde0, 0xadd2, 0x7187, 0x7287, 0x7387, 0x7487, 0x7587, 0xe2e0, 0x7687, 0x7787, 0xdbe0, 0xd9e0, 0xdfe0, 0x7887, 0x7987, 0xe0e0, 0x7a87, 0x7b87, 0x7c87, 0x7d87, 0x7e87, 0xdee0, 0x8087, 0xe4e0, 0x8187, 0x8287, 0x8387, 0xf7c6, 0xacd8, 0xebd4, 0xe6e0, 0xc9ca, 0x8487, 0x8587, 0x8687, 0x8787, 0xe5e0, 0x8887, 0x8987, 0x8a87, 0x8b87, 0xc1b8, 0x8c87, 0x8d87, 0x8e87, 0x8f87, 0xe7e0, 0xe8e0, 0x9087, 0x9187, 0x9287, 0x9387, 0x9487, 0x9587, 0x9687, 0x9787, 0xe9e0, 0xe3e0, 0x9887, 0x9987, 0x9a87, 0x9b87, 0x9c87, 0x9d87, 0x9e87, 0xbfba, 0xe7cc, 0x9f87, 0xa087, 0xa187, 0xeae0, 0xa287, 0xa387, 0xa487, 0xa587, 0xa687, 0xa787, 0xa887, 0xa987, 0xaa87, 0xab87, 0xac87, 0xad87, 0xae87, 0xaf87, 0xb087, 0xf9cf, 0xb187, 0xb287, 0xb387, 0xb487, 0xb587, 0xb687, 0xb787, 0xb887, 0xb987, 0xba87, 0xbb87, 0xebe0, 0xbc87, 0xbd87, 0xbe87, 0xbf87, 0xc087, 0xc187, 0xc287, 0xc2c8, 0xc387, 0xc487, 0xc587, 0xc687, 0xc0bd, 0xc787, 0xc887, 0xc987, 0xca87, 0xcb87, 0xcc87, 0xcd87, 0xce87, 0xcf87, 0xd087, 0xd187, 0xd287, 0xd387, 0xd2c4, 0xd487, 0xd587, 0xd687, 0xd787, 0xd887, 0xd987, 0xda87, 0xdb87, 0xdc87, 0xece0, 0xdd87, 0xde87, 0xede0, 0xdf87, 0xe087, 0xf4c7, 0xc4cb, 0xe187, 0xeee0, 0xd8bb, 0xb6d8, 0xf2d2, 0xefe0, 0xc5cd, 0xe287, 0xdab6, 0xe387, 0xe487, 0xe587, 0xe687, 0xe787, 0xe887, 0xf1e0, 0xe987, 0xb0d4, 0xea87, 0xeb87, 0xa7c0, 0xd1b4, 0xec87, 0xed87, 0xa7ce, 0xf0e0, 0xee87, 0xef87, 0xf087, 0xf2e0, 0xccb9, 0xf187, 0xf287, 0xfab9, 0xbccd, 0xf3e0, 0xf387, 0xf487, 0xf587, 0xd4c6, 0xf4e0, 0xf687, 0xb2d4, 0xf787, 0xa6c8, 0xf6e0, 0xf5e0, 0xf887, 0xf987, 0xfa87, 0xfb87, 0xfc87, 0xfd87, 0xfe87, 0x4088, 0x4188, 0x4288, 0x4388, 0x4488, 0x4588, 0x4688, 0x4788, 0x4888, 0x4988, 0xf7e0, 0x4a88, 0x4b88, 0xc1cd, 0x4c88, 0x4d88, 0x4e88, 0xa5ca, 0x4f88, 0x5088, 0x5188, 0x5288, 0xdad4, 0xd7db, 0xd9db, 0x5388, 0xd8db, 0xe7b9, 0xdcdb, 0xdddb, 0xd8b5, 0x5488, 0x5588, 0xdadb, 0x5688, 0x5788, 0x5888, 0x5988, 0x5a88, 0xdbdb, 0xa1b3, 0xdfdb, 0x5b88, 0x5c88, 0xf8bb, 0x5d88, 0xb7d6, 0x5e88, 0xe0db, 0x5f88, 0x6088, 0x6188, 0x6288, 0xf9be, 0x6388, 0x6488, 0xbbb7, 0x6588, 0xd0db, 0xaecc, 0xb2bf, 0xb5bb, 0xf8d7, 0xd3bf, 0x6688, 0x6788, 0x6888, 0x6988, 0x6a88, 0xe9bf, 0x6b88, 0x6c88, 0xe1bc, 0xb3cc, 0xdedb, 0xd3b0, 0xebce, 0xd8b7, 0xb9d7, 0xc2c6, 0x6d88, 0x6e88, 0xa4c0, 0x6f88, 0xb9cc, 0x7088, 0xe7db, 0xe1db, 0xbac6, 0xe3db, 0x7188, 0xe8db, 0x7288, 0xf7c5, 0x7388, 0x7488, 0x7588, 0xeadb, 0x7688, 0x7788, 0xe9db, 0xc0bf, 0x7888, 0x7988, 0x7a88, 0xe6db, 0xe5db, 0x7b88, 0x7c88, 0x7d88, 0x7e88, 0x8088, 0xb9b4, 0xacc0, 0xa2c2, 0xe2db, 0xe4db, 0x8188, 0x8288, 0x8388, 0x8488, 0xcdd0, 0xeddb, 0x8588, 0x8688, 0x8788, 0x8888, 0x8988, 0xddc0, 0xf2db, 0x8a88, 0x8b88, 0x8c88, 0x8d88, 0x8e88, 0x8f88, 0x9088, 0xe2b6, 0x9188, 0x9288, 0x9388, 0x9488, 0xf3db, 0xd2db, 0xb8b9, 0xabd4, 0xecdb, 0x9588, 0xd1bf, 0xf0db, 0x9688, 0xd1db, 0x9788, 0xe6b5, 0x9888, 0xebdb, 0xe5bf, 0x9988, 0x9a88, 0x9b88, 0xeedb, 0x9c88, 0xf1db, 0x9d88, 0x9e88, 0x9f88, 0xf9db, 0xa088, 0xa188, 0xa288, 0xa388, 0xa488, 0xa588, 0xa688, 0xa788, 0xa888, 0xa1b9, 0xa3b0, 0xa988, 0xaa88, 0xab88, 0xac88, 0xad88, 0xae88, 0xaf88, 0xf1c2, 0xb088, 0xb188, 0xc7b3, 0xefdb, 0xb288, 0xb388, 0xf8db, 0xb488, 0xd2c6, 0xf4db, 0xb588, 0xb688, 0xf5db, 0xf7db, 0xf6db, 0xb788, 0xb888, 0xfedb, 0xb988, 0xf2d3, 0xbab2, 0xba88, 0xbb88, 0xbc88, 0xfddb, 0xbd88, 0xbe88, 0xbf88, 0xc088, 0xc188, 0xc288, 0xc388, 0xc488, 0xa4dc, 0xc588, 0xfbdb, 0xc688, 0xc788, 0xc888, 0xc988, 0xfadb, 0xca88, 0xcb88, 0xcc88, 0xfcdb, 0xe0c5, 0xf9bb, 0xcd88, 0xce88, 0xa3dc, 0xcf88, 0xd088, 0xa5dc, 0xd188, 0xc3cc, 0xd288, 0xd388, 0xd488, 0xd1b6, 0xc0dd, 0xd588, 0xd688, 0xd788, 0xa1dc, 0xd888, 0xa2dc, 0xd988, 0xda88, 0xdb88, 0xb5c7, 0xdc88, 0xdd88, 0xde88, 0xe9b6, 0xdf88, 0xe088, 0xe188, 0xa7dc, 0xe288, 0xe388, 0xe488, 0xe588, 0xa6dc, 0xe688, 0xa9dc, 0xa4b1, 0xe788, 0xe888, 0xccb5, 0xe988, 0xea88, 0xeb88, 0xec88, 0xed88, 0xb0bf, 0xee88, 0xef88, 0xf088, 0xf188, 0xf288, 0xdfd1, 0xf388, 0xf488, 0xf588, 0xf688, 0xc2b6, 0xf788, 0xf888, 0xf988, 0xfa88, 0xfb88, 0xfc88, 0xfd88, 0xfe88, 0x4089, 0x4189, 0x4289, 0x4389, 0x4489, 0x4589, 0xa8dc, 0x4689, 0x4789, 0x4889, 0x4989, 0x4a89, 0x4b89, 0x4c89, 0xfacb, 0xf3eb, 0x4d89, 0x4e89, 0x4f89, 0xdccb, 0x5089, 0x5189, 0xfecb, 0x5289, 0x5389, 0x5489, 0xc1cc, 0x5589, 0x5689, 0x5789, 0x5889, 0x5989, 0xfbc8, 0x5a89, 0x5b89, 0x5c89, 0x5d89, 0x5e89, 0x5f89, 0xaadc, 0x6089, 0x6189, 0x6289, 0x6389, 0x6489, 0xeecc, 0xabdc, 0x6589, 0x6689, 0x6789, 0x6889, 0x6989, 0x6a89, 0x6b89, 0x6c89, 0x6d89, 0x6e89, 0x6f89, 0x7089, 0x7189, 0x7289, 0x7389, 0x7489, 0x7589, 0xd3db, 0x7689, 0xafdc, 0xacdc, 0x7789, 0xb3be, 0x7889, 0xfbca, 0x7989, 0x7a89, 0x7b89, 0xaddc, 0x7c89, 0x7d89, 0x7e89, 0x8089, 0x8189, 0x8289, 0x8389, 0x8489, 0xcac9, 0xb9c4, 0x8589, 0x8689, 0x8789, 0x8889, 0x8989, 0xbdc7, 0xaedc, 0x8a89, 0x8b89, 0x8c89, 0xf6d4, 0xe6d0, 0x8d89, 0x8e89, 0x8f89, 0x9089, 0x9189, 0x9289, 0x9389, 0x9489, 0xabc4, 0xd5b6, 0x9589, 0x9689, 0x9789, 0x9889, 0x9989, 0x9a89, 0x9b89, 0x9c89, 0x9d89, 0x9e89, 0x9f89, 0xa089, 0xa189, 0xa289, 0xa389, 0xa489, 0xa589, 0xa689, 0xd4db, 0xa789, 0xa889, 0xa989, 0xaa89, 0xdab1, 0xab89, 0xac89, 0xad89, 0xd5db, 0xae89, 0xaf89, 0xb089, 0xb189, 0xb289, 0xb389, 0xb489, 0xb589, 0xb689, 0xb789, 0xb889, 0xd6db, 0xb989, 0xba89, 0xbb89, 0xbeba, 0xbc89, 0xbd89, 0xbe89, 0xbf89, 0xc089, 0xc189, 0xc289, 0xc389, 0xc489, 0xc589, 0xc689, 0xc789, 0xc889, 0xc989, 0xc0c8, 0xca89, 0xcb89, 0xcc89, 0xcd89, 0xce89, 0xcf89, 0xbfca, 0xc9c8, 0xd089, 0xb3d7, 0xd189, 0xf9c9, 0xd289, 0xd389, 0xc7bf, 0xd489, 0xd589, 0xf8ba, 0xd689, 0xd789, 0xbcd2, 0xd889, 0xd989, 0xda89, 0xdb89, 0xdc89, 0xdd89, 0xde89, 0xdf89, 0xbae2, 0xe089, 0xa6b4, 0xe189, 0xe289, 0xb8b1, 0xe389, 0xe489, 0xe589, 0xe689, 0xe789, 0xb4b8, 0xe889, 0xc4cf, 0xe989, 0xea89, 0xeb89, 0xec89, 0xe7d9, 0xa6cf, 0xe2cd, 0xed89, 0xee89, 0xedd9, 0xe0b6, 0xef89, 0xb9d2, 0xf089, 0xf189, 0xbbb9, 0xf289, 0xf389, 0xf489, 0xf589, 0xb9e2, 0xb7e2, 0xf689, 0xf3b4, 0xf789, 0xeccc, 0xabcc, 0xf2b7, 0xf889, 0xb2d8, 0xebd1, 0xbbba, 0xf989, 0xa7ca, 0xfa89, 0xfb89, 0xb7cd, 0xfc89, 0xfd89, 0xc4d2, 0xe4bf, 0xd0bc, 0xe1b6, 0xfe89, 0xc5de, 0x408a, 0x418a, 0x428a, 0x438a, 0xc6de, 0xbcdb, 0x448a, 0xd9d1, 0x458a, 0x468a, 0xe6c6, 0xcec4, 0xeeb7, 0x478a, 0xdcb7, 0x488a, 0x498a, 0xfcbf, 0xe0d7, 0x4a8a, 0xf5c6, 0x4b8a, 0x4c8a, 0xbcb1, 0xc8de, 0xb1bd, 0xd7cc, 0xcade, 0x4d8a, 0xc9de, 0x4e8a, 0x4f8a, 0x508a, 0x518a, 0x528a, 0xecb5, 0x538a, 0xddc9, 0x548a, 0x558a, 0xc2b0, 0x568a, 0x578a, 0x588a, 0x598a, 0x5a8a, 0x5b8a, 0x5c8a, 0x5d8a, 0x5e8a, 0x5f8a, 0x608a, 0x618a, 0x628a, 0xaec5, 0xabc5, 0x638a, 0xccc4, 0x648a, 0xe9bc, 0xfdcb, 0x658a, 0x668a, 0x678a, 0xc3ba, 0x688a, 0x698a, 0x6a8a, 0xf9e5, 0xe7c8, 0xfae5, 0xfdcd, 0x6b8a, 0xb1d7, 0xbeb8, 0xe8c2, 0x6c8a, 0xd1c8, 0x6d8a, 0x6e8a, 0xfbe5, 0x6f8a, 0x708a, 0x718a, 0x728a, 0xcab6, 0xcbbc, 0x738a, 0x748a, 0xfdd1, 0xa1e6, 0x758a, 0xeec3, 0x768a, 0x778a, 0x788a, 0x798a, 0xa4e6, 0x7a8a, 0x7b8a, 0x7c8a, 0x7d8a, 0xfee5, 0xa5e6, 0xd7cd, 0x7e8a, 0x808a, 0xc1b7, 0xfce5, 0xfde5, 0xa3e6, 0x818a, 0x828a, 0xddc4, 0xa8e6, 0x838a, 0x848a, 0xa7e6, 0x858a, 0x868a, 0x878a, 0x888a, 0x898a, 0x8a8a, 0xc3c3, 0x8b8a, 0xdec6, 0x8c8a, 0x8d8a, 0xaae6, 0x8e8a, 0x8f8a, 0x908a, 0x918a, 0x928a, 0x938a, 0x948a, 0xb7c4, 0x958a, 0x968a, 0x978a, 0xa2e6, 0xbcca, 0x988a, 0x998a, 0x9a8a, 0x9b8a, 0xe3bd, 0xc3b9, 0xa6e6, 0xd5d0, 0xafce, 0x9c8a, 0x9d8a, 0xa9e6, 0xb0e6, 0x9e8a, 0xa6d2, 0x9f8a, 0xaabd, 0xade6, 0xa08a, 0xa18a, 0xa28a, 0xa38a, 0xa48a, 0xafe6, 0xa58a, 0xd1c0, 0xa68a, 0xa78a, 0xccd2, 0xa88a, 0xa98a, 0xaa8a, 0xa7bc, 0xab8a, 0xac8a, 0xad8a, 0xae8a, 0xaf8a, 0xb08a, 0xb18a, 0xb28a, 0xb38a, 0xb48a, 0xb58a, 0xb68a, 0xb1e6, 0xb78a, 0xf6d2, 0xb88a, 0xb98a, 0xba8a, 0xcbd7, 0xbb8a, 0xfecd, 0xbc8a, 0xdecd, 0xa6c2, 0xabe6, 0xace6, 0xbfbd, 0xaee6, 0xb3e6, 0xbd8a, 0xbe8a, 0xb2e6, 0xbf8a, 0xc08a, 0xc18a, 0xc28a, 0xb6e6, 0xc38a, 0xb8e6, 0xc48a, 0xc58a, 0xc68a, 0xc78a, 0xefc4, 0xc88a, 0xc98a, 0xca8a, 0xc8c4, 0xcb8a, 0xcc8a, 0xeabe, 0xefc9, 0xcd8a, 0xce8a, 0xb7e6, 0xcf8a, 0xf0b6, 0xd08a, 0xd18a, 0xd28a, 0xe4c3, 0xd38a, 0xd48a, 0xd58a, 0xd68a, 0xd78a, 0xd88a, 0xd98a, 0xe9d3, 0xb4e6, 0xda8a, 0xb5e6, 0xdb8a, 0xa2c8, 0xdc8a, 0xdd8a, 0xde8a, 0xdf8a, 0xe08a, 0xbde6, 0xe18a, 0xe28a, 0xe38a, 0xb9e6, 0xe48a, 0xe58a, 0xe68a, 0xe78a, 0xe88a, 0xc5c6, 0xe98a, 0xea8a, 0xf1cd, 0xbbe6, 0xeb8a, 0xec8a, 0xed8a, 0xee8a, 0xef8a, 0xf08a, 0xf18a, 0xf28a, 0xf38a, 0xf48a, 0xbce6, 0xf58a, 0xf68a, 0xf78a, 0xf88a, 0xe9bb, 0xf98a, 0xfa8a, 0xfb8a, 0xfc8a, 0xfd8a, 0xfe8a, 0x408b, 0xbee6, 0x418b, 0x428b, 0x438b, 0x448b, 0xbae6, 0x458b, 0x468b, 0xb7c0, 0x478b, 0x488b, 0x498b, 0x4a8b, 0x4b8b, 0x4c8b, 0x4d8b, 0x4e8b, 0x4f8b, 0xa4d3, 0xbfe6, 0xf4c9, 0xc3e6, 0x508b, 0x518b, 0xc4e6, 0x528b, 0x538b, 0x548b, 0x558b, 0xf6d0, 0x568b, 0x578b, 0x588b, 0x598b, 0x5a8b, 0x5b8b, 0x5c8b, 0x5d8b, 0x5e8b, 0x5f8b, 0x608b, 0x618b, 0x628b, 0x638b, 0x648b, 0x658b, 0x668b, 0x678b, 0xbdc3, 0x688b, 0x698b, 0x6a8b, 0x6b8b, 0x6c8b, 0x6d8b, 0x6e8b, 0xc4c3, 0xc2e6, 0x6f8b, 0x708b, 0x718b, 0x728b, 0x738b, 0x748b, 0x758b, 0x768b, 0x778b, 0x788b, 0x798b, 0x7a8b, 0x7b8b, 0x7c8b, 0xc1e6, 0x7d8b, 0x7e8b, 0x808b, 0x818b, 0x828b, 0x838b, 0x848b, 0xc7e6, 0xb1cf, 0x858b, 0xf4eb, 0x868b, 0x878b, 0xcae6, 0x888b, 0x898b, 0x8a8b, 0x8b8b, 0x8c8b, 0xc5e6, 0x8d8b, 0x8e8b, 0xdebc, 0xa9c9, 0x8f8b, 0x908b, 0x918b, 0x928b, 0x938b, 0x948b, 0xb5bc, 0x958b, 0x968b, 0xd3cf, 0x978b, 0x988b, 0x998b, 0x9a8b, 0x9b8b, 0xc8e6, 0x9c8b, 0xc9e6, 0x9d8b, 0xcee6, 0x9e8b, 0xd0e6, 0x9f8b, 0xa08b, 0xa18b, 0xd1e6, 0xa28b, 0xa38b, 0xa48b, 0xcbe6, 0xd5b5, 0xa58b, 0xcce6, 0xa68b, 0xa78b, 0xcfe6, 0xa88b, 0xa98b, 0xdbc4, 0xaa8b, 0xc6e6, 0xab8b, 0xac8b, 0xad8b, 0xae8b, 0xaf8b, 0xcde6, 0xb08b, 0xb18b, 0xb28b, 0xb38b, 0xb48b, 0xb58b, 0xb68b, 0xb78b, 0xb88b, 0xb98b, 0xba8b, 0xbb8b, 0xbc8b, 0xbd8b, 0xbe8b, 0xbf8b, 0xc08b, 0xc18b, 0xc28b, 0xc38b, 0xc48b, 0xc58b, 0xc68b, 0xd2e6, 0xc78b, 0xc88b, 0xc98b, 0xca8b, 0xcb8b, 0xcc8b, 0xcd8b, 0xce8b, 0xcf8b, 0xd08b, 0xd18b, 0xd28b, 0xd4e6, 0xd3e6, 0xd38b, 0xd48b, 0xd58b, 0xd68b, 0xd78b, 0xd88b, 0xd98b, 0xda8b, 0xdb8b, 0xdc8b, 0xdd8b, 0xde8b, 0xdf8b, 0xe08b, 0xe18b, 0xe28b, 0xe38b, 0xe48b, 0xe58b, 0xe68b, 0xe78b, 0xe88b, 0xe98b, 0xea8b, 0xeb8b, 0xec8b, 0xd5e6, 0xed8b, 0xf8d9, 0xee8b, 0xef8b, 0xd6e6, 0xf08b, 0xf18b, 0xf28b, 0xf38b, 0xf48b, 0xf58b, 0xf68b, 0xf78b, 0xd7e6, 0xf88b, 0xf98b, 0xfa8b, 0xfb8b, 0xfc8b, 0xfd8b, 0xfe8b, 0x408c, 0x418c, 0x428c, 0x438c, 0x448c, 0x458c, 0x468c, 0x478c, 0xd3d7, 0xdde6, 0x488c, 0xdee6, 0xd7bf, 0xd0d4, 0x498c, 0xd6d7, 0xe6b4, 0xefcb, 0xdae6, 0xc3d8, 0xced7, 0xa2d0, 0x4a8c, 0xcfc3, 0x4b8c, 0x4c8c, 0xdfe6, 0xbebc, 0xc2b9, 0xdbe6, 0xa7d1, 0x4d8c, 0x4e8c, 0xa2ba, 0xcfc2, 0x4f8c, 0xabd8, 0x508c, 0x518c, 0x528c, 0xebca, 0xeee5, 0x538c, 0xdce6, 0x548c, 0xf5b7, 0x558c, 0x568c, 0x578c, 0x588c, 0xe6c8, 0x598c, 0x5a8c, 0xf5c4, 0x5b8c, 0x5c8c, 0xb2e5, 0xfec4, 0x5d8c, 0xfccb, 0xb3e5, 0xacd5, 0x5e8c, 0xeed3, 0xd8ca, 0xb2b0, 0x5f8c, 0xcecb, 0xeacd, 0x608c, 0x618c, 0xeaba, 0x628c, 0x638c, 0x648c, 0xb5e5, 0x658c, 0xb4e5, 0x668c, 0xdad7, 0xd9b9, 0xe6d6, 0xa8b6, 0xf0cd, 0xcbd2, 0xa6b1, 0xb5ca, 0x678c, 0xe8b3, 0xf3c9, 0xcdbf, 0xfbd0, 0xd2ca, 0xb6e5, 0xc2bb, 0x688c, 0x698c, 0x6a8c, 0xdccf, 0xacb9, 0x6b8c, 0x6c8c, 0x6d8c, 0x6e8c, 0xd7d4, 0x6f8c, 0x708c, 0xa6ba, 0xe7d1, 0xfccf, 0xd2bc, 0x718c, 0xb7e5, 0xddc8, 0x728c, 0x738c, 0x748c, 0xedbf, 0xf6b1, 0xdecb, 0x758c, 0x768c, 0xc5bc, 0x778c, 0xc4bc, 0xfad2, 0xdcc3, 0xdcbf, 0x788c, 0x798c, 0x7a8c, 0x7b8c, 0xbbb8, 0x7c8c, 0x7d8c, 0x7e8c, 0xc2c3, 0x808c, 0xaeba, 0xa2d4, 0x818c, 0x828c, 0x838c, 0x848c, 0x858c, 0x868c, 0x878c, 0x888c, 0x898c, 0xdec7, 0xafc4, 0xecb2, 0x8a8c, 0xd1b9, 0x8b8c, 0x8c8c, 0xbbe5, 0xc8c1, 0x8d8c, 0x8e8c, 0xafd5, 0x8f8c, 0x908c, 0x918c, 0x928c, 0x938c, 0xbce5, 0x948c, 0xbee5, 0x958c, 0x968c, 0x978c, 0x988c, 0x998c, 0x9a8c, 0x9b8c, 0xe7b4, 0xd4b6, 0xc2cb, 0xb0d1, 0xbcb5, 0x9c8c, 0x9d8c, 0xd9ca, 0x9e8c, 0xe2b7, 0x9f8c, 0xa08c, 0xe4c9, 0xa18c, 0xabbd, 0xa28c, 0xa38c, 0xbece, 0xf0d7, 0xa48c, 0xa58c, 0xa68c, 0xa78c, 0xa1d0, 0xa88c, 0xd9c9, 0xa98c, 0xaa8c, 0xfbb6, 0xd8e6, 0xe2bc, 0xab8c, 0xbeb3, 0xac8c, 0xd0c9, 0xad8c, 0xd9e6, 0xa2b3, 0xae8c, 0xaf8c, 0xb08c, 0xb18c, 0xccde, 0xb28c, 0xc8d3, 0xcdde, 0xb38c, 0xa2d2, 0xb48c, 0xb58c, 0xb68c, 0xb78c, 0xcede, 0xb88c, 0xb98c, 0xba8c, 0xbb8c, 0xcdbe, 0xbc8c, 0xbd8c, 0xcfde, 0xbe8c, 0xbf8c, 0xc08c, 0xacca, 0xfcd2, 0xdfb3, 0xeae5, 0xe1c4, 0xa1be, 0xb2ce, 0xf2c4, 0xd6be, 0xa8c6, 0xe3b2, 0xc18c, 0xc28c, 0xd3be, 0xc38c, 0xc48c, 0xfcc7, 0xebcc, 0xecbd, 0xddce, 0xc58c, 0xc68c, 0xbaca, 0xc1c6, 0xece5, 0xbcd0, 0xc78c, 0xc88c, 0xc98c, 0xb9d5, 0xca8c, 0xcb8c, 0xcc8c, 0xede5, 0xcd8c, 0xce8c, 0xcf8c, 0xd08c, 0xf4ca, 0xd18c, 0xc0cd, 0xc5c2, 0xd28c, 0xefe5, 0xd38c, 0xc4c2, 0xf0e5, 0xd48c, 0xd58c, 0xd68c, 0xd78c, 0xd88c, 0xd98c, 0xda8c, 0xf8e5, 0xcdcd, 0xdb8c, 0xbdc9, 0xdc8c, 0xdd8c, 0xde8c, 0xdf8c, 0xe08c, 0xe18c, 0xe28c, 0xd9d2, 0xa8e1, 0xe38c, 0xe48c, 0xe58c, 0xe68c, 0xecd3, 0xe78c, 0xeacb, 0xf1c6, 0xe88c, 0xe98c, 0xea8c, 0xeb8c, 0xec8c, 0xace1, 0xed8c, 0xee8c, 0xef8c, 0xa7e1, 0xa9e1, 0xf08c, 0xf18c, 0xaae1, 0xafe1, 0xf28c, 0xf38c, 0xedb2, 0xf48c, 0xabe1, 0xdab8, 0xade1, 0xaee1, 0xb0e1, 0xbab5, 0xb1e1, 0xf58c, 0xf68c, 0xf78c, 0xf88c, 0xf98c, 0xb3e1, 0xb8e1, 0xfa8c, 0xfb8c, 0xfc8c, 0xfd8c, 0xfe8c, 0xd2d1, 0x408d, 0xb6e1, 0xb5e1, 0xebc1, 0x418d, 0x428d, 0x438d, 0xb7e1, 0x448d, 0xc0d4, 0x458d, 0xb2e1, 0x468d, 0xbae1, 0xb6b0, 0x478d, 0x488d, 0x498d, 0x4a8d, 0xb4e1, 0x4b8d, 0xf9bf, 0x4c8d, 0xb9e1, 0x4d8d, 0x4e8d, 0xbbe1, 0x4f8d, 0x508d, 0x518d, 0x528d, 0x538d, 0x548d, 0xbee1, 0x558d, 0x568d, 0x578d, 0x588d, 0x598d, 0x5a8d, 0xbce1, 0x5b8d, 0x5c8d, 0x5d8d, 0x5e8d, 0x5f8d, 0x608d, 0xc5d6, 0x618d, 0x628d, 0x638d, 0x648d, 0x658d, 0x668d, 0x678d, 0xbfcf, 0x688d, 0x698d, 0xbde1, 0xbfe1, 0xcdc2, 0x6a8d, 0xebb6, 0x6b8d, 0xf8d3, 0x6c8d, 0x6d8d, 0xcdc7, 0x6e8d, 0x6f8d, 0xe5b7, 0x708d, 0x718d, 0x728d, 0x738d, 0x748d, 0x758d, 0x768d, 0x778d, 0x788d, 0x798d, 0xfebe, 0x7a8d, 0x7b8d, 0x7c8d, 0x7d8d, 0x7e8d, 0x808d, 0xc0e1, 0xc1e1, 0x818d, 0x828d, 0xc7e1, 0xe7b3, 0x838d, 0x848d, 0x858d, 0x868d, 0x878d, 0x888d, 0xe9c6, 0x898d, 0x8a8d, 0x8b8d, 0x8c8d, 0x8d8d, 0xdeb4, 0x8e8d, 0xc2d1, 0x8f8d, 0x908d, 0x918d, 0x928d, 0xc8e1, 0x938d, 0x948d, 0xc6e1, 0x958d, 0x968d, 0x978d, 0x988d, 0x998d, 0xc5e1, 0x9a8d, 0xc3e1, 0xc2e1, 0x9b8d, 0xc0b1, 0x9c8d, 0x9d8d, 0x9e8d, 0xb8d5, 0xc4e1, 0x9f8d, 0xa08d, 0xa18d, 0xa28d, 0xa38d, 0xcbe1, 0xa48d, 0xa58d, 0xa68d, 0xa78d, 0xa88d, 0xa98d, 0xaa8d, 0xab8d, 0xcce1, 0xcae1, 0xac8d, 0xad8d, 0xae8d, 0xaf8d, 0xb08d, 0xb18d, 0xb28d, 0xb38d, 0xfaef, 0xb48d, 0xb58d, 0xd3e1, 0xd2e1, 0xb6c7, 0xb68d, 0xb78d, 0xb88d, 0xb98d, 0xba8d, 0xbb8d, 0xbc8d, 0xbd8d, 0xbe8d, 0xbf8d, 0xc08d, 0xc9e1, 0xc18d, 0xc28d, 0xcee1, 0xc38d, 0xd0e1, 0xc48d, 0xc58d, 0xc68d, 0xc78d, 0xc88d, 0xc98d, 0xca8d, 0xcb8d, 0xcc8d, 0xcd8d, 0xce8d, 0xd4e1, 0xcf8d, 0xd1e1, 0xcde1, 0xd08d, 0xd18d, 0xcfe1, 0xd28d, 0xd38d, 0xd48d, 0xd58d, 0xd5e1, 0xd68d, 0xd78d, 0xd88d, 0xd98d, 0xda8d, 0xdb8d, 0xdc8d, 0xdd8d, 0xde8d, 0xdf8d, 0xe08d, 0xe18d, 0xe28d, 0xd6e1, 0xe38d, 0xe48d, 0xe58d, 0xe68d, 0xe78d, 0xe88d, 0xe98d, 0xea8d, 0xeb8d, 0xec8d, 0xed8d, 0xee8d, 0xef8d, 0xf08d, 0xf18d, 0xf28d, 0xf38d, 0xf48d, 0xf58d, 0xf68d, 0xf78d, 0xf88d, 0xd7e1, 0xf98d, 0xfa8d, 0xfb8d, 0xd8e1, 0xfc8d, 0xfd8d, 0xfe8d, 0x408e, 0x418e, 0x428e, 0x438e, 0x448e, 0x458e, 0x468e, 0x478e, 0x488e, 0x498e, 0x4a8e, 0x4b8e, 0x4c8e, 0x4d8e, 0x4e8e, 0x4f8e, 0x508e, 0x518e, 0x528e, 0x538e, 0x548e, 0x558e, 0xdae1, 0x568e, 0x578e, 0x588e, 0x598e, 0x5a8e, 0x5b8e, 0x5c8e, 0x5d8e, 0x5e8e, 0x5f8e, 0x608e, 0x618e, 0x628e, 0xdbe1, 0x638e, 0x648e, 0x658e, 0x668e, 0x678e, 0x688e, 0x698e, 0xa1ce, 0x6a8e, 0x6b8e, 0x6c8e, 0x6d8e, 0x6e8e, 0x6f8e, 0x708e, 0x718e, 0x728e, 0x738e, 0x748e, 0x758e, 0x768e, 0xdde7, 0x778e, 0xa8b4, 0xddd6, 0x788e, 0x798e, 0xb2d1, 0xb2b3, 0x7a8e, 0x7b8e, 0xa4b9, 0xf3d7, 0xc9c7, 0xdebe, 0xaeb9, 0x7c8e, 0xd7ce, 0x7d8e, 0x7e8e, 0xeeb2, 0xcfdb, 0x808e, 0xbabc, 0xd1d2, 0xc8cb, 0xcdb0, 0x818e, 0x828e, 0xefcf, 0x838e, 0x848e, 0x858e, 0x868e, 0x878e, 0xe3d9, 0xedbd, 0x888e, 0x898e, 0xd2b1, 0xd0ca, 0xbcb2, 0x8a8e, 0xa7cb, 0xabb7, 0x8b8e, 0xa6ca, 0x8c8e, 0x8d8e, 0x8e8e, 0xa3cf, 0x8f8e, 0x908e, 0xf8e0, 0xcad5, 0xfbe0, 0x918e, 0x928e, 0xfae0, 0xc1c5, 0xfbcc, 0x938e, 0xb1c1, 0xf9e0, 0xe3d6, 0xafb2, 0xc4d6, 0xdbb5, 0x948e, 0x958e, 0x968e, 0x978e, 0x988e, 0x998e, 0x9a8e, 0x9b8e, 0xf8b4, 0xa1d6, 0x9c8e, 0x9d8e, 0x9e8e, 0x9f8e, 0xa08e, 0xafcf, 0xefb0, 0xa18e, 0xa28e, 0xfce0, 0xa38e, 0xa48e, 0xa58e, 0xa68e, 0xa78e, 0xa1e1, 0xa3b3, 0xa88e, 0xa98e, 0xfde0, 0xfee0, 0xb1c3, 0xaa8e, 0xab8e, 0xac8e, 0xad8e, 0xddc3, 0xae8e, 0xa2e1, 0xf9b7, 0xaf8e, 0xb08e, 0xb18e, 0xb28e, 0xb38e, 0xb48e, 0xcfbb, 0xb58e, 0xb68e, 0xb78e, 0xb88e, 0xb98e, 0xba8e, 0xbb8e, 0xa3e1, 0xbbc4, 0xbc8e, 0xbd8e, 0xbe8e, 0xbf8e, 0xc08e, 0xa4e1, 0xc18e, 0xc28e, 0xa5e1, 0xc38e, 0xc48e, 0xa6e1, 0xb1b4, 0xc58e, 0xc68e, 0xc78e, 0xc88e, 0xc98e, 0xca8e, 0xcb8e, 0xcc8e, 0xcd8e, 0xce8e, 0xcf8e, 0xd08e, 0xd18e, 0xd28e, 0xd38e, 0xc9b8, 0xbdc6, 0xeac4, 0xd48e, 0xa2b2, 0xd58e, 0xd2d0, 0xd68e, 0xdbe7, 0xc3bb, 0xd7d3, 0xc4d3, 0xd78e, 0xe3b9, 0xcfe2, 0xd88e, 0xd98e, 0xda8e, 0xafd7, 0xdb8e, 0xecc7, 0xd3b1, 0xdc8e, 0xdd8e, 0xb2b4, 0xd1e2, 0xde8e, 0xdf8e, 0xe08e, 0xf2d0, 0xaec2, 0xd0e2, 0xe18e, 0xe2bf, 0xa6d3, 0xd7b5, 0xd2e2, 0xeab5, 0xe28e, 0xedc3, 0xfdb8, 0xe38e, 0xaeb8, 0xe48e, 0xd3c5, 0xcfb7, 0xd4e2, 0xe58e, 0xe68e, 0xe78e, 0xe88e, 0xd3e2, 0xc8b6, 0xf9d7, 0xe98e, 0xea8e, 0xeb8e, 0xec8e, 0xed8e, 0xa5cd, 0xee8e, 0xef8e, 0xf08e, 0xf18e, 0xf28e, 0xd8e2, 0xf38e, 0xd6e2, 0xfcca, 0xb5bf, 0xb9d3, 0xd5e2, 0xf48e, 0xf58e, 0xf68e, 0xf78e, 0xd7e2, 0xf88e, 0xf98e, 0xfa8e, 0xfb8e, 0xfc8e, 0xfd8e, 0xfe8e, 0x408f, 0x418f, 0x428f, 0xaec1, 0xc8c0, 0x438f, 0x448f, 0x458f, 0x468f, 0x478f, 0x488f, 0xdbe2, 0xdae2, 0xaac0, 0x498f, 0x4a8f, 0xcec1, 0x4b8f, 0x4c8f, 0x4d8f, 0x4e8f, 0xdce2, 0x4f8f, 0x508f, 0x518f, 0x528f, 0x538f, 0x548f, 0x558f, 0x568f, 0x578f, 0x588f, 0x598f, 0x5a8f, 0xdde2, 0x5b8f, 0xdee2, 0x5c8f, 0x5d8f, 0x5e8f, 0x5f8f, 0x608f, 0x618f, 0x628f, 0x638f, 0x648f, 0xc8db, 0x658f, 0xd3d1, 0xa2cd, 0x668f, 0x678f, 0xa8bd, 0x688f, 0x698f, 0x6a8f, 0xc3de, 0xa5d8, 0xaabf, 0xcddb, 0xecd2, 0xfac6, 0xaac5, 0x6b8f, 0x6c8f, 0x6d8f, 0xc4de, 0x6e8f, 0xd7b1, 0xaedf, 0x6f8f, 0x708f, 0x718f, 0xbdca, 0x728f, 0xb1df, 0x738f, 0xadb9, 0x748f, 0xfdd2, 0x758f, 0xa5b8, 0xebba, 0x768f, 0x778f, 0xdab3, 0x788f, 0x798f, 0x7a8f, 0xdcb5, 0xc5d5, 0x7b8f, 0x7c8f, 0x7d8f, 0x7e8f, 0xd6c3, 0xd2cf, 0xa1bb, 0x808f, 0xf3e5, 0xf2e5, 0x818f, 0x828f, 0xf4e5, 0x838f, 0xe4cd, 0x848f, 0xf5c8, 0x858f, 0x868f, 0x878f, 0x888f, 0x898f, 0x8a8f, 0x8b8f, 0xafb5, 0xbfc7, 0x8c8f, 0xf6e5, 0x8d8f, 0x8e8f, 0x8f8f, 0xb0ec, 0x908f, 0x918f, 0x928f, 0x938f, 0x948f, 0x958f, 0x968f, 0x978f, 0x988f, 0x998f, 0x9a8f, 0x9b8f, 0x9c8f, 0x9d8f, 0x9e8f, 0xe6e5, 0x9f8f, 0xe9b9, 0xb1b5, 0xa08f, 0xbcc2, 0xe8e5, 0xe7e5, 0xe9e5, 0xa18f, 0xa28f, 0xa38f, 0xa48f, 0xcdd2, 0xa58f, 0xa68f, 0xa78f, 0xeae1, 0xced0, 0xa88f, 0xaecd, 0xa98f, 0xe5d1, 0xaa8f, 0xab8f, 0xcab2, 0xebb1, 0xac8f, 0xf2b1, 0xedc5, 0xad8f, 0xae8f, 0xc3d5, 0xb0d3, 0xaf8f, 0xdce1, 0xb08f, 0xb18f, 0xb28f, 0xdde1, 0xb38f, 0xdbd2, 0xb48f, 0xb9b3, 0xcbb1, 0xb58f, 0xb68f, 0xb78f, 0xf9cd, 0xf7d5, 0xdee1, 0xb88f, 0xb6be, 0xfdb4, 0xb98f, 0xdfe1, 0xdcba, 0xe0e1, 0xb2bb, 0xc9c2, 0xe1e1, 0xba8f, 0xbb8f, 0xbc8f, 0xecd0, 0xbd8f, 0xbdcd, 0xbe8f, 0xbf8f, 0xe2e1, 0xc08f, 0xc3b5, 0xc7c5, 0xe3e1, 0xc18f, 0xc28f, 0xe4e1, 0xc38f, 0xc48f, 0xc58f, 0xc68f, 0xf9d3, 0xc78f, 0xc88f, 0xc98f, 0xca8f, 0xcb8f, 0xcc8f, 0xe5e1, 0xcd8f, 0xadd1, 0xce8f, 0xcf8f, 0xe6e1, 0xa2ce, 0xd08f, 0xd18f, 0xd28f, 0xd38f, 0xd48f, 0xd58f, 0xe7e1, 0xd68f, 0xc2b5, 0xd78f, 0xd88f, 0xd98f, 0xda8f, 0xe8e1, 0xd5bb, 0xdb8f, 0xdc8f, 0xdd8f, 0xde8f, 0xdf8f, 0xc4d0, 0xe0e2, 0xd8b1, 0xe4d2, 0xe08f, 0xe18f, 0xe1e2, 0xe28f, 0xe38f, 0xc9bc, 0xccc8, 0xe48f, 0xe3e2, 0xfeec, 0xfdec, 0xafdf, 0xe58f, 0xe68f, 0xe78f, 0xe2e2, 0xbed6, 0xfccd, 0xa6c3, 0xe88f, 0xe98f, 0xea8f, 0xc3e3, 0xeb8f, 0xec8f, 0xd2d6, 0xe7e2, 0xed8f, 0xee8f, 0xe8e2, 0xef8f, 0xf08f, 0xc7d3, 0xf18f, 0xf28f, 0xece2, 0xecbf, 0xf38f, 0xede2, 0xe5e2, 0xf48f, 0xf58f, 0xc0b3, 0xf68f, 0xf78f, 0xf88f, 0xeec4, 0xf98f, 0xfa8f, 0xeee2, 0xfb8f, 0xfc8f, 0xc3d0, 0xfd8f, 0xf6ba, 0xe9e2, 0xdeb7, 0xb3bb, 0xaccc, 0xcbcb, 0xe4e2, 0xe6e2, 0xeae2, 0xebe2, 0xfe8f, 0x4090, 0x4190, 0xf7e2, 0x4290, 0x4390, 0xf4e2, 0xf5d4, 0xf3e2, 0x4490, 0x4590, 0xadc5, 0x4690, 0xfad5, 0xc2c5, 0xc0b2, 0x4790, 0x4890, 0xefe2, 0x4990, 0xf2e2, 0xafc1, 0xbccb, 0x4a90, 0x4b90, 0xa1b5, 0xf9e2, 0x4c90, 0x4d90, 0x4e90, 0xb1bc, 0xf1e2, 0xd4d0, 0xb9d4, 0xf5e2, 0xd6b9, 0xf6e2, 0x4f90, 0x5090, 0x5190, 0xd3c7, 0x5290, 0x5390, 0x5490, 0x5590, 0x5690, 0xf0e2, 0x5790, 0x5890, 0x5990, 0x5a90, 0x5b90, 0xdcd7, 0xa1ed, 0x5c90, 0x5d90, 0xf8e2, 0x5e90, 0xa5ed, 0xfee2, 0xd1ca, 0x5f90, 0x6090, 0x6190, 0x6290, 0x6390, 0x6490, 0x6590, 0xb5c1, 0x6690, 0xd0bb, 0x6790, 0x6890, 0xd6bf, 0x6990, 0xe3ba, 0x6a90, 0x6b90, 0xa1cb, 0x6c90, 0x6d90, 0x6e90, 0xa6ed, 0xa3ed, 0x6f90, 0x7090, 0xa2ed, 0x7190, 0x7290, 0x7390, 0x7490, 0xd6bb, 0xa7ed, 0xf4d0, 0x7590, 0x7690, 0xa4ed, 0xdeba, 0xf7b6, 0xa1e3, 0xb2b6, 0xf1cc, 0xa7b9, 0x7790, 0xa2cf, 0xa1c7, 0x7890, 0x7990, 0xd2bf, 0x7a90, 0x7b90, 0xf1b6, 0x7c90, 0xfae2, 0xfbe2, 0xfde2, 0xfce2, 0xd5c4, 0xa2e3, 0x7d90, 0xc1d3, 0x7e90, 0x8090, 0x8190, 0xa7e3, 0xc4c7, 0x8290, 0x8390, 0x8490, 0x8590, 0xa4cf, 0x8690, 0x8790, 0xa9e3, 0xb7ba, 0x8890, 0x8990, 0x8a90, 0x8b90, 0xa8e3, 0x8c90, 0xdabb, 0x8d90, 0xa3e3, 0x8e90, 0x8f90, 0x9090, 0xa4e3, 0xaae3, 0x9190, 0xa6e3, 0x9290, 0xf2ce, 0xc6d3, 0x9390, 0x9490, 0xbcbb, 0x9590, 0x9690, 0xc3d4, 0x9790, 0xfac4, 0x9890, 0x9990, 0xa8ed, 0xfcd0, 0xa5e3, 0x9a90, 0xf5c3, 0x9b90, 0xade3, 0xafb1, 0x9c90, 0xb2e3, 0x9d90, 0x9e90, 0x9f90, 0xc2bc, 0xa090, 0xa190, 0xace3, 0xbfb5, 0xa290, 0xa390, 0xa490, 0xa590, 0xa690, 0xa790, 0xa890, 0xa990, 0xe9c7, 0xb0e3, 0xaa90, 0xab90, 0xac90, 0xaabe, 0xefcd, 0xad90, 0xae90, 0xaf90, 0xb090, 0xb190, 0xf3bb, 0xb290, 0xb390, 0xb490, 0xe8cc, 0xb590, 0xb690, 0xafe3, 0xb790, 0xb1e3, 0xb890, 0xa7cf, 0xaee3, 0xb990, 0xa9ce, 0xddbb, 0xba90, 0xbb90, 0xbc90, 0xbd90, 0xbe90, 0xebb5, 0xe5be, 0xd2b2, 0xcdb3, 0xbf90, 0xb9b1, 0xabe3, 0xd1b2, 0xacb5, 0xdfb9, 0xe8b6, 0xc090, 0xc190, 0xebcf, 0xb7e3, 0xc290, 0xccbb, 0xc390, 0xc490, 0xc7c8, 0xcad0, 0xc590, 0xc690, 0xc790, 0xc890, 0xc990, 0xb8e3, 0xeeb3, 0xca90, 0xcb90, 0xcc90, 0xcd90, 0xa9ed, 0xce90, 0xfad3, 0xe4d3, 0xcf90, 0xd090, 0xd190, 0xaaed, 0xb9e3, 0xe2d2, 0xd290, 0xd390, 0xd490, 0xd590, 0xd690, 0xb5e3, 0xd790, 0xd890, 0xd990, 0xda90, 0xded3, 0xdb90, 0xdc90, 0xdd90, 0xde90, 0xd0b8, 0xb3e3, 0xdf90, 0xe090, 0xb6e3, 0xdfb7, 0xe190, 0xb4e3, 0xa2c0, 0xe290, 0xe390, 0xe490, 0xbae3, 0xe590, 0xe690, 0xe790, 0xe890, 0xe990, 0xea90, 0xeb90, 0xec90, 0xed90, 0xee90, 0xef90, 0xf090, 0xf190, 0xf290, 0xf390, 0xf490, 0xf590, 0xf690, 0xf790, 0xb8d4, 0xf890, 0xf990, 0xfa90, 0xfb90, 0xfc90, 0xfd90, 0xfe90, 0x4091, 0xc8b4, 0x4191, 0xbbe3, 0x4291, 0xc5bb, 0x4391, 0xf7c9, 0x4491, 0x4591, 0xe5c9, 0x4691, 0x4791, 0x4891, 0xbdc4, 0x4991, 0x4a91, 0x4b91, 0x4c91, 0x4d91, 0x4e91, 0x4f91, 0xabed, 0x5091, 0x5191, 0x5291, 0x5391, 0xfdc2, 0x5491, 0x5591, 0x5691, 0x5791, 0xdbbb, 0xaebf, 0x5891, 0x5991, 0x5a91, 0x5b91, 0x5c91, 0x5d91, 0x5e91, 0xbfce, 0x5f91, 0x6091, 0x6191, 0x6291, 0xbce3, 0x6391, 0xb6bf, 0x6491, 0x6591, 0x6691, 0x6791, 0x6891, 0x6991, 0x6a91, 0x6b91, 0x6c91, 0x6d91, 0x6e91, 0x6f91, 0x7091, 0x7191, 0x7291, 0x7391, 0x7491, 0x7591, 0x7691, 0xefb1, 0x7791, 0x7891, 0xf7d4, 0x7991, 0x7a91, 0x7b91, 0x7c91, 0x7d91, 0xbee3, 0x7e91, 0x8091, 0x8191, 0x8291, 0x8391, 0x8491, 0x8591, 0x8691, 0xaded, 0x8791, 0x8891, 0x8991, 0x8a91, 0x8b91, 0x8c91, 0x8d91, 0x8e91, 0x8f91, 0xbfe3, 0xa9ba, 0xaced, 0x9091, 0x9191, 0xbde3, 0x9291, 0x9391, 0x9491, 0x9591, 0x9691, 0x9791, 0x9891, 0x9991, 0x9a91, 0x9b91, 0xc0e3, 0x9c91, 0x9d91, 0x9e91, 0x9f91, 0xa091, 0xa191, 0xb6ba, 0xa291, 0xa391, 0xa491, 0xaeb6, 0xa591, 0xa691, 0xa791, 0xa891, 0xa991, 0xb8d0, 0xaa91, 0xc3b0, 0xaeed, 0xab91, 0xac91, 0xad91, 0xae91, 0xaf91, 0xafed, 0xc1c0, 0xb091, 0xc1e3, 0xb191, 0xb291, 0xb391, 0xb491, 0xb591, 0xb691, 0xb791, 0xb891, 0xb991, 0xba91, 0xbb91, 0xbc91, 0xbd91, 0xbe91, 0xbf91, 0xc091, 0xc191, 0xb3c5, 0xc291, 0xc391, 0xc491, 0xc591, 0xc691, 0xc791, 0xc891, 0xc991, 0xca91, 0xcb91, 0xcc91, 0xcd91, 0xce91, 0xcf91, 0xc2e3, 0xd091, 0xd191, 0xd291, 0xd391, 0xd491, 0xd591, 0xd691, 0xd791, 0xd891, 0xb2dc, 0xd991, 0xda91, 0xdb91, 0xdc91, 0xdd91, 0xde91, 0xb0ed, 0xdf91, 0xeab8, 0xe091, 0xecce, 0xa7ea, 0xe7d0, 0xf9ca, 0xd6c8, 0xb7cf, 0xc9b3, 0xd2ce, 0xe4bd, 0xe191, 0xe291, 0xdee3, 0xf2bb, 0xa8ea, 0xbdd5, 0xe391, 0xddc6, 0xa9ea, 0xe491, 0xe591, 0xe691, 0xaaea, 0xe791, 0xacea, 0xabea, 0xe891, 0xaeea, 0xadea, 0xe991, 0xea91, 0xeb91, 0xec91, 0xd8bd, 0xed91, 0xafea, 0xee91, 0xbec2, 0xef91, 0xf091, 0xf191, 0xf291, 0xc1b4, 0xf7b4, 0xf391, 0xf491, 0xa7bb, 0xf591, 0xf691, 0xf791, 0xf891, 0xf991, 0xe6ec, 0xe5ec, 0xbfb7, 0xf9cb, 0xe2b1, 0xfa91, 0xe7ec, 0xfb91, 0xfc91, 0xfd91, 0xc8c9, 0xe8ec, 0xe9ec, 0xfe91, 0xd6ca, 0xd0de, 0xc5b2, 0xfad4, 0x4092, 0x4192, 0xcbc6, 0xc7b0, 0xf2b4, 0xd3c8, 0x4292, 0x4392, 0x4492, 0xd0cd, 0x4592, 0x4692, 0xb8bf, 0x4792, 0x4892, 0x4992, 0x4a92, 0x4b92, 0x4c92, 0x4d92, 0xdbbf, 0x4e92, 0x4f92, 0xa4c7, 0xb4d6, 0x5092, 0xa9c0, 0xd1de, 0xa8c9, 0xefd1, 0xa4c5, 0xe7b0, 0xb6b3, 0xc5c8, 0x5192, 0x5292, 0xe2b0, 0x5392, 0x5492, 0xf6b7, 0x5592, 0x5692, 0xfac5, 0x5792, 0x5892, 0xf3b6, 0x5992, 0xd2d5, 0xd0b3, 0xbcbc, 0x5a92, 0x5b92, 0x5c92, 0xadb3, 0x5d92, 0x5e92, 0x5f92, 0x6092, 0xf1be, 0xd1b0, 0x6192, 0x6292, 0x6392, 0x6492, 0x6592, 0x6692, 0xd6d2, 0xe3ca, 0xa5d7, 0x6792, 0xb6cd, 0xb6b6, 0xb9bf, 0xdbd5, 0x6892, 0xa7b8, 0xd7c5, 0x6992, 0x6a92, 0x6b92, 0xd2de, 0xd9bf, 0xd5c2, 0xc0c7, 0x6c92, 0xa4bb, 0xa8b1, 0x6d92, 0x6e92, 0xeac5, 0x6f92, 0x7092, 0xfbc5, 0xa7cc, 0x7192, 0x7292, 0x7392, 0x7492, 0xa7b1, 0x7592, 0x7692, 0x7792, 0xd6b5, 0x7892, 0x7992, 0x7a92, 0xa8c4, 0x7b92, 0xd3de, 0xbad1, 0xe9b3, 0x7c92, 0xf2c3, 0x7d92, 0x7e92, 0xf7b7, 0x8092, 0xf4d6, 0xa3b5, 0xf0b2, 0xb4c4, 0xe9c4, 0xadc0, 0xd4de, 0x8192, 0xe8b0, 0xc4c5, 0xe0c1, 0x8292, 0xd5b9, 0x8392, 0xdcbe, 0xd8cd, 0xceb0, 0x8492, 0xcfcd, 0xd6de, 0xd0be, 0xbed7, 0xd5de, 0xd0d5, 0xddb0, 0x8592, 0x8692, 0xe2c4, 0x8792, 0x8892, 0xa3c2, 0xf0bc, 0x8992, 0xb5d3, 0xb9c0, 0xa1c5, 0xa6b2, 0xf1d4, 0x8a92, 0x8b92, 0xa8c0, 0xc3ca, 0xd7de, 0xfcd5, 0x8c92, 0xb0b9, 0x8d92, 0xadc8, 0xa9cb, 0x8e92, 0xd9de, 0xbdbf, 0x8f92, 0x9092, 0x9192, 0x9292, 0xb4c6, 0xa7d7, 0xb0ca, 0xc3c4, 0x9392, 0xd6b3, 0xd2b9, 0x9492, 0x9592, 0x9692, 0x9792, 0xb8d6, 0xfcea, 0xb4b0, 0x9892, 0x9992, 0x9a92, 0x9b92, 0xe6bf, 0x9c92, 0x9d92, 0xf4cc, 0x9e92, 0x9f92, 0xa092, 0xa192, 0xdacd, 0xa292, 0xa392, 0xa492, 0xbfd6, 0xcec2, 0xa592, 0xcece, 0xa2cc, 0xaed0, 0xd3c4, 0xb2b5, 0xd8de, 0xf5d5, 0xb7bc, 0xd3bb, 0xa692, 0xa792, 0xa4b0, 0xa892, 0xb2c5, 0xecb4, 0xa992, 0xaa92, 0xab92, 0xf1d5, 0xac92, 0xad92, 0xfdea, 0xae92, 0xaf92, 0xb092, 0xb192, 0xb292, 0xb392, 0xdade, 0xa6cd, 0xb492, 0xb592, 0xeccd, 0xb692, 0xb792, 0xb892, 0xb992, 0xe6ce, 0xdcde, 0xba92, 0xb1cd, 0xa6c0, 0xbb92, 0xbc92, 0xbdd7, 0xbd92, 0xdbde, 0xc6b0, 0xb4ba, 0xd3c9, 0xf3c4, 0xe8be, 0xbe92, 0xbf92, 0xc092, 0xc192, 0xb6b2, 0xc292, 0xc392, 0xc492, 0xc592, 0xc692, 0xc792, 0xc892, 0xc992, 0xccc0, 0xf0cb, 0xca92, 0xf1bc, 0xbbbb, 0xb7b5, 0xcb92, 0xcc92, 0xcd92, 0xf5c5, 0xce92, 0xe6de, 0xcf92, 0xd092, 0xd192, 0xe3de, 0xddbe, 0xd292, 0xd392, 0xdfde, 0xd492, 0xd592, 0xd692, 0xd792, 0xb7b4, 0xddbd, 0xd892, 0xd992, 0xe0de, 0xedc4, 0xda92, 0xdb92, 0xdc92, 0xdd92, 0xc6cf, 0xde92, 0xe0b5, 0xdf92, 0xe092, 0xe192, 0xe292, 0xdeb6, 0xdaca, 0xf4b5, 0xe5de, 0xe392, 0xc6d5, 0xe492, 0xe1de, 0xcdcc, 0xfec6, 0xe592, 0xc5c5, 0xe692, 0xe792, 0xe892, 0xb4d2, 0xe992, 0xf2be, 0xea92, 0xeb92, 0xec92, 0xed92, 0xee92, 0xef92, 0xf092, 0xd3c2, 0xf192, 0xbdcc, 0xb8b3, 0xf292, 0xd3bd, 0xf392, 0xd8bf, 0xc6cd, 0xdad1, 0xebb4, 0xf492, 0xe4de, 0xddde, 0xe7de, 0xf592, 0xfeea, 0xf692, 0xf792, 0xb0c2, 0xe2de, 0xf892, 0xf992, 0xc0d6, 0xa7b5, 0xfa92, 0xf4b2, 0xfb92, 0xe8de, 0xfc92, 0xf2de, 0xfd92, 0xfe92, 0x4093, 0x4193, 0x4293, 0xedde, 0x4393, 0xf1de, 0x4493, 0x4593, 0xe0c8, 0x4693, 0x4793, 0x4893, 0xe1d7, 0xefde, 0xe8c3, 0xe1cc, 0x4993, 0xe5b2, 0x4a93, 0x4b93, 0x4c93, 0xbed2, 0x4d93, 0x4e93, 0x4f93, 0x5093, 0x5193, 0x5293, 0x5393, 0xeede, 0x5493, 0xebde, 0xd5ce, 0x5593, 0xa7b4, 0x5693, 0x5793, 0x5893, 0x5993, 0x5a93, 0xabbf, 0xbebe, 0x5b93, 0x5c93, 0xd2bd, 0x5d93, 0x5e93, 0x5f93, 0x6093, 0xe9de, 0x6193, 0xaed4, 0x6293, 0xdede, 0x6393, 0xeade, 0x6493, 0x6593, 0x6693, 0x6793, 0xbfc0, 0x6893, 0xecde, 0xf3b2, 0xe9b8, 0xa7c2, 0x6993, 0x6a93, 0xc1bd, 0x6b93, 0x6c93, 0x6d93, 0x6e93, 0x6f93, 0xf5de, 0xf8de, 0x7093, 0x7193, 0xabb2, 0xa4b4, 0x7293, 0x7393, 0xeab4, 0xa6c9, 0x7493, 0x7593, 0x7693, 0x7793, 0x7893, 0x7993, 0xf6de, 0xd1cb, 0x7a93, 0xe3b8, 0x7b93, 0xf7de, 0xfade, 0x7c93, 0x7d93, 0x7e93, 0x8093, 0xf9de, 0x8193, 0x8293, 0x8393, 0xc2cc, 0x8493, 0xe1b0, 0xeeb4, 0x8593, 0x8693, 0x8793, 0x8893, 0x8993, 0x8a93, 0xbae5, 0x8b93, 0x8c93, 0x8d93, 0x8e93, 0x8f93, 0xafd0, 0x9093, 0x9193, 0xebb2, 0x9293, 0xa1eb, 0x9393, 0xf4de, 0x9493, 0x9593, 0xe3c9, 0xf3de, 0xdab0, 0xa1d2, 0xf7b1, 0x9693, 0xafcc, 0x9793, 0x9893, 0x9993, 0x9a93, 0x9b93, 0x9c93, 0x9d93, 0xf0de, 0x9e93, 0xa4cb, 0x9f93, 0xa093, 0xa193, 0xaad5, 0xa293, 0xa393, 0xa493, 0xa593, 0xa693, 0xfbde, 0xa793, 0xa893, 0xa993, 0xaa93, 0xab93, 0xac93, 0xad93, 0xae93, 0xddb4, 0xaf93, 0xa6c4, 0xb093, 0xb193, 0xb293, 0xfdde, 0xb393, 0xb493, 0xb593, 0xb693, 0xb793, 0xb893, 0xb993, 0xba93, 0xbb93, 0xbc93, 0xfec3, 0xa1c4, 0xa1df, 0xbd93, 0xbe93, 0xbf93, 0xc093, 0xc193, 0xc293, 0xc393, 0xccc1, 0xc493, 0xfcde, 0xefbe, 0xc593, 0xb2c6, 0xc693, 0xc793, 0xc893, 0xc993, 0xca93, 0xcb93, 0xcc93, 0xcd93, 0xce93, 0xc5b3, 0xf6c8, 0xcf93, 0xd093, 0xbacb, 0xfede, 0xd193, 0xd293, 0xa4df, 0xd393, 0xd493, 0xd593, 0xd693, 0xb2d7, 0xd793, 0xd893, 0xd993, 0xda93, 0xdb93, 0xb7b3, 0xdc93, 0xdd93, 0xde93, 0xdf93, 0xc3c1, 0xe093, 0xe193, 0xcbc7, 0xa5b2, 0xe9b4, 0xe293, 0xabd7, 0xe393, 0xe493, 0xe593, 0xe693, 0xecc4, 0xe793, 0xa2df, 0xa3df, 0xe893, 0xa5df, 0xe993, 0xb3ba, 0xea93, 0xeb93, 0xec93, 0xa6df, 0xed93, 0xdec0, 0xee93, 0xef93, 0xc3c9, 0xf093, 0xf193, 0xf293, 0xf393, 0xf493, 0xf593, 0xf693, 0xd9b2, 0xe6c7, 0xf793, 0xa7df, 0xf893, 0xdcc7, 0xf993, 0xfa93, 0xfb93, 0xfc93, 0xa8df, 0xa2eb, 0xfd93, 0xfe93, 0x4094, 0x4194, 0x4294, 0xd3cb, 0x4394, 0x4494, 0x4594, 0xaadf, 0x4694, 0xa9df, 0x4794, 0xc1b2, 0x4894, 0x4994, 0x4a94, 0x4b94, 0x4c94, 0x4d94, 0x4e94, 0x4f94, 0x5094, 0x5194, 0x5294, 0x5394, 0x5494, 0x5594, 0x5694, 0x5794, 0x5894, 0x5994, 0x5a94, 0x5b94, 0x5c94, 0x5d94, 0x5e94, 0x5f94, 0x6094, 0xcac5, 0x6194, 0x6294, 0x6394, 0x6494, 0x6594, 0x6694, 0x6794, 0x6894, 0xabdf, 0x6994, 0x6a94, 0x6b94, 0x6c94, 0x6d94, 0x6e94, 0x6f94, 0x7094, 0xdcd4, 0x7194, 0x7294, 0x7394, 0x7494, 0x7594, 0xc1c8, 0x7694, 0x7794, 0x7894, 0x7994, 0x7a94, 0x7b94, 0x7c94, 0x7d94, 0x7e94, 0x8094, 0x8194, 0x8294, 0xacdf, 0x8394, 0x8494, 0x8594, 0x8694, 0x8794, 0xf0be, 0x8894, 0x8994, 0xaddf, 0xa7d6, 0x8a94, 0x8b94, 0x8c94, 0x8d94, 0xb7ea, 0xb6eb, 0xd5ca, 0x8e94, 0xfcd8, 0xc4b8, 0x8f94, 0xa5b9, 0x9094, 0x9194, 0xc5b7, 0xfed5, 0x9294, 0x9394, 0x9494, 0x9594, 0x9694, 0xcab9, 0x9794, 0x9894, 0xa7d0, 0xcdf4, 0x9994, 0x9a94, 0xd0b5, 0x9b94, 0x9c94, 0xf4c3, 0x9d94, 0xc8be, 0x9e94, 0x9f94, 0xa094, 0xb7eb, 0xbdb0, 0xa194, 0xa294, 0xccbd, 0xa394, 0xb2c1, 0xa494, 0xd6b1, 0xa8b3, 0xa594, 0xa694, 0xa794, 0xd2b8, 0xa2c9, 0xa894, 0xa994, 0xd8b6, 0xaa94, 0xab94, 0xac94, 0xad94, 0xb8eb, 0xb4be, 0xae94, 0xaf94, 0xb094, 0xfdca, 0xb194, 0xc3c7, 0xb294, 0xfbd5, 0xb394, 0xb494, 0xf3b7, 0xb594, 0xb694, 0xb794, 0xb894, 0xb994, 0xba94, 0xbb94, 0xbc94, 0xbd94, 0xbe94, 0xbf94, 0xc094, 0xc194, 0xc294, 0xc394, 0xc4ce, 0xc494, 0xc594, 0xc694, 0xabd5, 0xf3b1, 0xc794, 0xc894, 0xc994, 0xb3ec, 0xdfb0, 0xca94, 0xb5ec, 0xcb94, 0xcc94, 0xcd94, 0xb7b6, 0xce94, 0xcfc1, 0xcf94, 0xfaf5, 0xb1d0, 0xd094, 0xd194, 0xe5d5, 0xd294, 0xd3ce, 0xd394, 0xd494, 0xefbd, 0xe2b3, 0xd594, 0xabb8, 0xd694, 0xb6d5, 0xd794, 0xbded, 0xd894, 0xcfb6, 0xd994, 0xb9cb, 0xc2d0, 0xda94, 0xdb94, 0xdc94, 0xdd94, 0xde94, 0xdf94, 0xe094, 0xe194, 0xbdb7, 0xe294, 0xe394, 0xb6ec, 0xa9ca, 0xe494, 0xe594, 0xe694, 0xd4c5, 0xe794, 0xb9ec, 0xb8ec, 0xc3c2, 0xb7ec, 0xe894, 0xe994, 0xea94, 0xeb94, 0xfdd0, 0xbaec, 0xec94, 0xbbec, 0xe5d7, 0xed94, 0xee94, 0xbcec, 0xef94, 0xf094, 0xf194, 0xbdec, 0xecc6, 0xf294, 0xf394, 0xf494, 0xf594, 0xf694, 0xf794, 0xf894, 0xf994, 0xdece, 0xfa94, 0xc8bc, 0xfb94, 0xfc94, 0xd5c8, 0xa9b5, 0xc9be, 0xbcd6, 0xe7d4, 0xfd94, 0xfe94, 0xaed1, 0xf1d0, 0xb8ea, 0xb9ea, 0xbaea, 0xb5ba, 0x4095, 0x4195, 0x4295, 0x4395, 0xb1ca, 0xf5bf, 0x4495, 0x4595, 0xfacd, 0x4695, 0x4795, 0x4895, 0x4995, 0x4a95, 0xc0ea, 0x4b95, 0xbab0, 0xbeea, 0x4c95, 0x4d95, 0xa5c0, 0x4e95, 0x4f95, 0x5095, 0xbbea, 0x5195, 0xfdb2, 0x5295, 0xf7c3, 0xe8bb, 0x5395, 0x5495, 0x5595, 0xd7d2, 0xf4ce, 0xbfea, 0x5695, 0x5795, 0x5895, 0xbcea, 0x5995, 0x5a95, 0x5b95, 0xc3ea, 0x5c95, 0xc7d0, 0xb3d3, 0x5d95, 0x5e95, 0x5f95, 0x6095, 0xbab4, 0x6195, 0xc1c3, 0xf2d7, 0x6295, 0x6395, 0x6495, 0x6595, 0xd1d5, 0x6695, 0xc7ca, 0x6795, 0xc5ea, 0x6895, 0x6995, 0xc4ea, 0xc7ea, 0xc6ea, 0x6a95, 0x6b95, 0x6c95, 0x6d95, 0x6e95, 0xe7d6, 0x6f95, 0xd4cf, 0x7095, 0x7195, 0xcbea, 0x7295, 0xcebb, 0x7395, 0x7495, 0x7595, 0x7695, 0x7795, 0x7895, 0x7995, 0xfabd, 0xcec9, 0x7a95, 0x7b95, 0xccea, 0x7c95, 0x7d95, 0xb9c9, 0xfecf, 0xcaea, 0xced4, 0xcdea, 0xcfea, 0x7e95, 0x8095, 0xedcd, 0x8195, 0x8295, 0x8395, 0x8495, 0xc9ea, 0x8595, 0xceea, 0x8695, 0x8795, 0xeece, 0x8895, 0xdebb, 0x8995, 0xbfb3, 0x8a95, 0x8b95, 0x8c95, 0x8d95, 0x8e95, 0xd5c6, 0xb0be, 0xface, 0x8f95, 0x9095, 0x9195, 0xe7c7, 0x9295, 0xa7be, 0xd0ea, 0x9395, 0x9495, 0xc7d6, 0x9595, 0x9695, 0x9795, 0xc0c1, 0x9895, 0x9995, 0x9a95, 0xddd4, 0x9b95, 0xd1ea, 0x9c95, 0x9d95, 0xbecf, 0x9e95, 0x9f95, 0xa095, 0xa195, 0xd2ea, 0xa295, 0xa395, 0xa495, 0xa595, 0xeeca, 0xa695, 0xa795, 0xa895, 0xa995, 0xafc5, 0xb5b0, 0xaa95, 0xab95, 0xac95, 0xad95, 0xae95, 0xd4ea, 0xaf95, 0xb095, 0xb195, 0xb295, 0xb395, 0xb495, 0xb595, 0xb695, 0xb795, 0xd3ea, 0xdff4, 0xb895, 0xb995, 0xba95, 0xbb95, 0xbc95, 0xbac4, 0xbd95, 0xbe95, 0xbf95, 0xc095, 0xc195, 0xa9b1, 0xc295, 0xc395, 0xc495, 0xc595, 0xdfe5, 0xc695, 0xc795, 0xc895, 0xc995, 0xd5ea, 0xca95, 0xcb95, 0xcc95, 0xcd95, 0xce95, 0xcf95, 0xd095, 0xd195, 0xd295, 0xd395, 0xd495, 0xd595, 0xd695, 0xd795, 0xd895, 0xd995, 0xda95, 0xdb95, 0xdc95, 0xdd95, 0xde95, 0xdf95, 0xe095, 0xe195, 0xe295, 0xe395, 0xefca, 0xe495, 0xd6ea, 0xd7ea, 0xd8c6, 0xe595, 0xe695, 0xe795, 0xe895, 0xe995, 0xea95, 0xeb95, 0xec95, 0xd8ea, 0xed95, 0xee95, 0xd9ea, 0xef95, 0xf095, 0xf195, 0xf295, 0xf395, 0xf495, 0xbbd4, 0xf595, 0xfac7, 0xb7d2, 0xfcb8, 0xf695, 0xf795, 0xc2ea, 0xf895, 0xdcb2, 0xf995, 0xfa95, 0xfcc2, 0xfb95, 0xf8d4, 0xe6cc, 0xeed7, 0xfc95, 0xfd95, 0xfe95, 0x4096, 0x4196, 0x4296, 0x4396, 0xc2d4, 0xd0d3, 0xc3eb, 0xf3c5, 0x4496, 0xfeb7, 0x4596, 0x4696, 0xd4eb, 0x4796, 0x4896, 0x4996, 0xb7cb, 0xdeeb, 0x4a96, 0xcac0, 0x4b96, 0x4c96, 0x4d96, 0xfbcd, 0x4e96, 0xafb3, 0x4f96, 0xdac6, 0x5096, 0x5196, 0x5296, 0x5396, 0x5496, 0x5596, 0xfceb, 0x5696, 0xbec4, 0x5796, 0xb4ce, 0xa9c4, 0xbeb1, 0xfdd4, 0x5896, 0xf5ca, 0x5996, 0xecd6, 0x5a96, 0x5b96, 0xd3c6, 0xe4b6, 0x5c96, 0x5d96, 0x5e96, 0x5f96, 0xfabb, 0x6096, 0x6196, 0xe0d0, 0x6296, 0x6396, 0xb1c9, 0x6496, 0xd3d4, 0xa8c8, 0x6596, 0x6696, 0xcbb8, 0x6796, 0xbee8, 0xbcc9, 0x6896, 0x6996, 0xbbe8, 0x6a96, 0xeec0, 0xd3d0, 0xc4b2, 0xe5b4, 0x6b96, 0xbce8, 0x6c96, 0x6d96, 0xc8d5, 0x6e96, 0x6f96, 0x7096, 0x7196, 0x7296, 0xc5b6, 0x7396, 0xbde8, 0xf8ca, 0xdcb8, 0xf5cc, 0x7496, 0x7596, 0x7696, 0xb4c0, 0x7796, 0x7896, 0xeed1, 0xbfe8, 0xc2e8, 0x7996, 0x7a96, 0xbcba, 0x7b96, 0xadb1, 0xdcbd, 0x7c96, 0xbdea, 0xc3e8, 0x7d96, 0xc6e8, 0x7e96, 0xcbe8, 0x8096, 0x8196, 0x8296, 0x8396, 0xcce8, 0x8496, 0xc9cb, 0xe5b0, 0x8596, 0xabbc, 0x8696, 0x8796, 0xb9b9, 0x8896, 0x8996, 0xc1e8, 0x8a96, 0xf7cd, 0x8b96, 0xcae8, 0x8c96, 0x8d96, 0x8e96, 0x8f96, 0xf6ce, 0x9096, 0x9196, 0x9296, 0x9396, 0xedd5, 0x9496, 0xd6c1, 0xc4e8, 0x9596, 0xb6c3, 0x9696, 0xfbb9, 0xa6d6, 0xc8e8, 0x9796, 0x9896, 0x9996, 0xe0ca, 0xe6d4, 0x9a96, 0xc0e8, 0x9b96, 0xc5e8, 0xc7e8, 0x9c96, 0xb9c7, 0xe3b7, 0x9d96, 0xc9e8, 0x9e96, 0xddbf, 0xd2e8, 0x9f96, 0xa096, 0xd7e8, 0xa196, 0xd5e8, 0xdcbc, 0xcfbc, 0xdbe8, 0xa296, 0xa396, 0xa496, 0xa596, 0xa696, 0xa796, 0xa896, 0xa996, 0xdee8, 0xaa96, 0xdae8, 0xfab1, 0xab96, 0xac96, 0xad96, 0xae96, 0xaf96, 0xb096, 0xb196, 0xb296, 0xb396, 0xb496, 0xd8b0, 0xb3c4, 0xccb8, 0xe2c6, 0xbec8, 0xe1c8, 0xb596, 0xb696, 0xb796, 0xcfe8, 0xd4e8, 0xd6e8, 0xb896, 0xf1b9, 0xd8e8, 0xf5d7, 0xb996, 0xfbc4, 0xba96, 0xdce8, 0xbb96, 0xbc96, 0xe9b2, 0xbd96, 0xbe96, 0xbf96, 0xd1e8, 0xc096, 0xc196, 0xedbc, 0xc296, 0xc396, 0xc2bf, 0xcde8, 0xf9d6, 0xc496, 0xf8c1, 0xf1b2, 0xc596, 0xc696, 0xc796, 0xc896, 0xc996, 0xca96, 0xcb96, 0xcc96, 0xdfe8, 0xcd96, 0xc1ca, 0xd9e8, 0xce96, 0xcf96, 0xd096, 0xd196, 0xa4d5, 0xd296, 0xeab1, 0xbbd5, 0xcee8, 0xd0e8, 0xb0b6, 0xd3e8, 0xd396, 0xdde8, 0xb8c0, 0xd496, 0xf7ca, 0xd596, 0xa8cb, 0xd696, 0xd796, 0xdcc6, 0xf5c0, 0xd896, 0xd996, 0xda96, 0xdb96, 0xdc96, 0xe9e8, 0xdd96, 0xde96, 0xdf96, 0xa3d0, 0xe096, 0xe196, 0xe296, 0xe396, 0xe496, 0xe596, 0xe696, 0xf2e8, 0xead6, 0xe796, 0xe896, 0xe996, 0xea96, 0xeb96, 0xec96, 0xed96, 0xe0e8, 0xe1e8, 0xee96, 0xef96, 0xf096, 0xf9d1, 0xcbba, 0xf9b8, 0xf196, 0xf296, 0xf1b8, 0xd4d4, 0xefe8, 0xf396, 0xeee8, 0xece8, 0xf0b9, 0xd2cc, 0xe6e8, 0xa6ce, 0xf2bf, 0xf496, 0xb8b0, 0xf1e8, 0xf0e8, 0xf596, 0xc0d7, 0xf696, 0xe4e8, 0xf796, 0xa9cd, 0xa3c9, 0xf896, 0xb8bb, 0xdbbd, 0xeae8, 0xf996, 0xfa96, 0xfb96, 0xfc96, 0xfd96, 0xfe96, 0x4097, 0x4197, 0x4297, 0x4397, 0xe2e8, 0xe3e8, 0xe5e8, 0xb5b5, 0xe7e8, 0xc5c7, 0xebe8, 0xede8, 0xb0bd, 0xaed7, 0x4497, 0xf8e8, 0x4597, 0x4697, 0x4797, 0x4897, 0x4997, 0x4a97, 0x4b97, 0x4c97, 0xf5e8, 0x4d97, 0xb0cd, 0xf6e8, 0x4e97, 0x4f97, 0x5097, 0x5197, 0x5297, 0x5397, 0x5497, 0x5597, 0x5697, 0xbac1, 0x5797, 0xe8e8, 0x5897, 0xb7c3, 0xf0b0, 0x5997, 0x5a97, 0x5b97, 0x5c97, 0x5d97, 0x5e97, 0x5f97, 0x6097, 0xf4e8, 0x6197, 0x6297, 0x6397, 0xf7e8, 0x6497, 0x6597, 0x6697, 0xa3b9, 0x6797, 0x6897, 0x6997, 0x6a97, 0x6b97, 0x6c97, 0x6d97, 0x6e97, 0x6f97, 0x7097, 0xd2c9, 0x7197, 0x7297, 0x7397, 0xcec3, 0xe0ce, 0xe6c0, 0x7497, 0x7597, 0x7697, 0x7797, 0xf3cb, 0x7897, 0xddcc, 0xb5d0, 0x7997, 0x7a97, 0xe1ca, 0x7b97, 0xf3e8, 0x7c97, 0x7d97, 0x7e97, 0x8097, 0x8197, 0x8297, 0x8397, 0x8497, 0x8597, 0x8697, 0xecbc, 0x8797, 0xf9e8, 0x8897, 0x8997, 0x8a97, 0x8b97, 0x8c97, 0x8d97, 0xdec3, 0x8e97, 0xe5c6, 0x8f97, 0xf7b9, 0x9097, 0x9197, 0x9297, 0x9397, 0xf4b0, 0x9497, 0x9597, 0xd8d7, 0x9697, 0x9797, 0xacbc, 0x9897, 0xefc5, 0x9997, 0x9a97, 0x9b97, 0x9c97, 0x9d97, 0xc4cc, 0x9e97, 0x9f97, 0xa6e9, 0xa097, 0xa197, 0xa297, 0xa397, 0xa497, 0xa597, 0xa697, 0xa797, 0xa897, 0xa997, 0xadc9, 0xaa97, 0xa2e9, 0xe2c0, 0xab97, 0xac97, 0xad97, 0xc3bf, 0xae97, 0xaf97, 0xb097, 0xfee8, 0xd7b9, 0xb197, 0xfbe8, 0xb297, 0xb397, 0xb497, 0xb597, 0xa4e9, 0xb697, 0xb797, 0xb897, 0xced2, 0xb997, 0xba97, 0xbb97, 0xbc97, 0xbd97, 0xa3e9, 0xbe97, 0xb2d6, 0xb5d7, 0xbf97, 0xa7e9, 0xc097, 0xb7bd, 0xc197, 0xc297, 0xc397, 0xc497, 0xc597, 0xc697, 0xc797, 0xc897, 0xc997, 0xca97, 0xcb97, 0xcc97, 0xfce8, 0xfde8, 0xcd97, 0xce97, 0xcf97, 0xa1e9, 0xd097, 0xd197, 0xd297, 0xd397, 0xd497, 0xd597, 0xd697, 0xd797, 0xd6cd, 0xd897, 0xd997, 0xacd2, 0xda97, 0xdb97, 0xdc97, 0xb2e9, 0xdd97, 0xde97, 0xdf97, 0xe097, 0xa9e9, 0xe197, 0xe297, 0xe397, 0xaab4, 0xe497, 0xbbb4, 0xe597, 0xe697, 0xabe9, 0xe797, 0xe897, 0xe997, 0xea97, 0xeb97, 0xec97, 0xed97, 0xee97, 0xef97, 0xf097, 0xf197, 0xf297, 0xf397, 0xf497, 0xf597, 0xf697, 0xf797, 0xa8d0, 0xf897, 0xf997, 0xa5e9, 0xfa97, 0xfb97, 0xfeb3, 0xfc97, 0xfd97, 0xace9, 0xe3c0, 0xfe97, 0xaae9, 0x4098, 0x4198, 0xb9e9, 0x4298, 0x4398, 0xb8e9, 0x4498, 0x4598, 0x4698, 0x4798, 0xaee9, 0x4898, 0x4998, 0xfae8, 0x4a98, 0x4b98, 0xa8e9, 0x4c98, 0x4d98, 0x4e98, 0x4f98, 0x5098, 0xacbf, 0xb1e9, 0xbae9, 0x5198, 0x5298, 0xa5c2, 0x5398, 0x5498, 0x5598, 0xafe9, 0x5698, 0xc5b8, 0x5798, 0xade9, 0x5898, 0xdcd3, 0xb4e9, 0xb5e9, 0xb7e9, 0x5998, 0x5a98, 0x5b98, 0xc7e9, 0x5c98, 0x5d98, 0x5e98, 0x5f98, 0x6098, 0x6198, 0xc6c0, 0xc5e9, 0x6298, 0x6398, 0xb0e9, 0x6498, 0x6598, 0xbbe9, 0xf1b0, 0x6698, 0x6798, 0x6898, 0x6998, 0x6a98, 0x6b98, 0x6c98, 0x6d98, 0x6e98, 0x6f98, 0xbce9, 0xa5d5, 0x7098, 0x7198, 0xbee9, 0x7298, 0xbfe9, 0x7398, 0x7498, 0x7598, 0xc1e9, 0x7698, 0x7798, 0xf1c1, 0x7898, 0x7998, 0xb6c8, 0x7a98, 0x7b98, 0x7c98, 0xbde9, 0x7d98, 0x7e98, 0x8098, 0x8198, 0x8298, 0xc2e9, 0x8398, 0x8498, 0x8598, 0x8698, 0x8798, 0x8898, 0x8998, 0x8a98, 0xc3e9, 0x8b98, 0xb3e9, 0x8c98, 0xb6e9, 0x8d98, 0xb1bb, 0x8e98, 0x8f98, 0x9098, 0xc0e9, 0x9198, 0x9298, 0x9398, 0x9498, 0x9598, 0x9698, 0xf7bc, 0x9798, 0x9898, 0x9998, 0xc4e9, 0xc6e9, 0x9a98, 0x9b98, 0x9c98, 0x9d98, 0x9e98, 0x9f98, 0xa098, 0xa198, 0xa298, 0xa398, 0xa498, 0xa598, 0xcae9, 0xa698, 0xa798, 0xa898, 0xa998, 0xcee9, 0xaa98, 0xab98, 0xac98, 0xad98, 0xae98, 0xaf98, 0xb098, 0xb198, 0xb298, 0xb398, 0xdbb2, 0xb498, 0xc8e9, 0xb598, 0xb698, 0xb798, 0xb898, 0xb998, 0xba98, 0xbb98, 0xbc98, 0xbd98, 0xbe98, 0xaeb7, 0xbf98, 0xc098, 0xc198, 0xc298, 0xc398, 0xc498, 0xc598, 0xc698, 0xc798, 0xc898, 0xc998, 0xca98, 0xcbe9, 0xcce9, 0xcb98, 0xcc98, 0xcd98, 0xce98, 0xcf98, 0xd098, 0xc1d5, 0xd198, 0xa3c4, 0xd298, 0xd398, 0xd498, 0xd598, 0xd698, 0xd798, 0xd8e9, 0xd898, 0xe1ba, 0xd998, 0xda98, 0xdb98, 0xdc98, 0xc9e9, 0xdd98, 0xa3d3, 0xde98, 0xdf98, 0xe098, 0xd4e9, 0xe198, 0xe298, 0xe398, 0xe498, 0xe598, 0xe698, 0xe798, 0xd7e9, 0xd0e9, 0xe898, 0xe998, 0xea98, 0xeb98, 0xec98, 0xcfe9, 0xed98, 0xee98, 0xc1c7, 0xef98, 0xf098, 0xf198, 0xf298, 0xf398, 0xf498, 0xf598, 0xf698, 0xd2e9, 0xf798, 0xf898, 0xf998, 0xfa98, 0xfb98, 0xfc98, 0xfd98, 0xd9e9, 0xc8b3, 0xfe98, 0xd3e9, 0x4099, 0x4199, 0x4299, 0x4399, 0x4499, 0xf0cf, 0x4599, 0x4699, 0x4799, 0xcde9, 0x4899, 0x4999, 0x4a99, 0x4b99, 0x4c99, 0x4d99, 0x4e99, 0x4f99, 0x5099, 0x5199, 0x5299, 0xf7b3, 0x5399, 0x5499, 0x5599, 0x5699, 0x5799, 0x5899, 0x5999, 0xd6e9, 0x5a99, 0x5b99, 0xdae9, 0x5c99, 0x5d99, 0x5e99, 0xb4cc, 0x5f99, 0x6099, 0x6199, 0xadcf, 0x6299, 0x6399, 0x6499, 0x6599, 0x6699, 0x6799, 0x6899, 0x6999, 0x6a99, 0xd5e9, 0x6b99, 0xdce9, 0xdbe9, 0x6c99, 0x6d99, 0x6e99, 0x6f99, 0x7099, 0xdee9, 0x7199, 0x7299, 0x7399, 0x7499, 0x7599, 0x7699, 0x7799, 0x7899, 0xd1e9, 0x7999, 0x7a99, 0x7b99, 0x7c99, 0x7d99, 0x7e99, 0x8099, 0x8199, 0xdde9, 0x8299, 0xdfe9, 0xcac3, 0x8399, 0x8499, 0x8599, 0x8699, 0x8799, 0x8899, 0x8999, 0x8a99, 0x8b99, 0x8c99, 0x8d99, 0x8e99, 0x8f99, 0x9099, 0x9199, 0x9299, 0x9399, 0x9499, 0x9599, 0x9699, 0x9799, 0x9899, 0x9999, 0x9a99, 0x9b99, 0x9c99, 0x9d99, 0x9e99, 0x9f99, 0xa099, 0xa199, 0xa299, 0xa399, 0xa499, 0xa599, 0xa699, 0xa799, 0xa899, 0xa999, 0xaa99, 0xab99, 0xac99, 0xad99, 0xae99, 0xaf99, 0xb099, 0xb199, 0xb299, 0xb399, 0xb499, 0xb599, 0xb699, 0xb799, 0xb899, 0xb999, 0xba99, 0xbb99, 0xbc99, 0xbd99, 0xbe99, 0xbf99, 0xc099, 0xc199, 0xc299, 0xc399, 0xc499, 0xc599, 0xc699, 0xc799, 0xc899, 0xc999, 0xca99, 0xcb99, 0xcc99, 0xcd99, 0xce99, 0xcf99, 0xd099, 0xd199, 0xd299, 0xd399, 0xd499, 0xd599, 0xd699, 0xd799, 0xd899, 0xd999, 0xda99, 0xdb99, 0xdc99, 0xdd99, 0xde99, 0xdf99, 0xe099, 0xe199, 0xe299, 0xe399, 0xe499, 0xe599, 0xe699, 0xe799, 0xe899, 0xe999, 0xea99, 0xeb99, 0xec99, 0xed99, 0xee99, 0xef99, 0xf099, 0xf199, 0xf299, 0xf399, 0xf499, 0xf599, 0xb7c7, 0xceb4, 0xb6bb, 0xc0d0, 0xa3ec, 0xf699, 0xf799, 0xb7c5, 0xf899, 0xf999, 0xfa99, 0xfb99, 0xfc99, 0xfd99, 0xfe99, 0x409a, 0x419a, 0x429a, 0xfbd3, 0x439a, 0x449a, 0x459a, 0x469a, 0xa4ec, 0x479a, 0xa5ec, 0xdbc6, 0x489a, 0x499a, 0x4a9a, 0xeebf, 0x4b9a, 0x4c9a, 0x4d9a, 0x4e9a, 0xa6ec, 0x4f9a, 0x509a, 0xa7ec, 0xaad0, 0x519a, 0xb8c7, 0x529a, 0x539a, 0xe8b8, 0x549a, 0x559a, 0x569a, 0x579a, 0x589a, 0x599a, 0x5a9a, 0x5b9a, 0x5c9a, 0x5d9a, 0x5e9a, 0x5f9a, 0xa8ec, 0x609a, 0x619a, 0x629a, 0x639a, 0x649a, 0x659a, 0x669a, 0x679a, 0xb9d6, 0xfdd5, 0xcbb4, 0xbdb2, 0xe4ce, 0xe7c6, 0x689a, 0x699a, 0xe1cd, 0x6a9a, 0x6b9a, 0x6c9a, 0x6d9a, 0x6e9a, 0x6f9a, 0x709a, 0x719a, 0x729a, 0x739a, 0x749a, 0x759a, 0x769a, 0x779a, 0xf5b4, 0x789a, 0xc0cb, 0xdfbc, 0x799a, 0x7a9a, 0x7b9a, 0x7c9a, 0xe2e9, 0xe3e9, 0xead1, 0xe5e9, 0x7d9a, 0xf9b4, 0xe4e9, 0x7e9a, 0xb3d1, 0xe2ca, 0xd0b2, 0x809a, 0xe8e9, 0x819a, 0x829a, 0x839a, 0x849a, 0xe6e9, 0xe7e9, 0x859a, 0x869a, 0xb3d6, 0x879a, 0x889a, 0x899a, 0xe9e9, 0xeae9, 0x8a9a, 0x8b9a, 0x8c9a, 0x8d9a, 0x8e9a, 0xebe9, 0x8f9a, 0x909a, 0x919a, 0x929a, 0x939a, 0x949a, 0x959a, 0x969a, 0xece9, 0x979a, 0x989a, 0x999a, 0x9a9a, 0x9b9a, 0x9c9a, 0x9d9a, 0x9e9a, 0xafec, 0xb9c5, 0xceb6, 0x9f9a, 0xf3d2, 0xa09a, 0xa19a, 0xa29a, 0xa39a, 0xa49a, 0xa59a, 0xa69a, 0xeeb5, 0xa79a, 0xd9bb, 0xb1ec, 0xa89a, 0xa99a, 0xe3d2, 0xaa9a, 0xab9a, 0xac9a, 0xad9a, 0xae9a, 0xe3ce, 0xaf9a, 0xb8c4, 0xb09a, 0xbfc3, 0xb19a, 0xb29a, 0xbeb6, 0xb9d8, 0xc8b1, 0xcfb1, 0xd1b1, 0xfec5, 0xb39a, 0xd0b1, 0xb49a, 0xabc3, 0xb59a, 0xb69a, 0xb79a, 0xb89a, 0xb99a, 0xb1d5, 0xba9a, 0xbb9a, 0xbc9a, 0xbd9a, 0xbe9a, 0xbf9a, 0xc09a, 0xc19a, 0xa4eb, 0xc1ba, 0xc29a, 0xc39a, 0xc49a, 0xbacc, 0xc59a, 0xc69a, 0xc79a, 0xa5eb, 0xc89a, 0xa7eb, 0xc99a, 0xca9a, 0xcb9a, 0xa8eb, 0xcc9a, 0xcd9a, 0xce9a, 0xa6eb, 0xcf9a, 0xd09a, 0xd19a, 0xd29a, 0xd39a, 0xd49a, 0xd59a, 0xa9eb, 0xabeb, 0xaaeb, 0xd69a, 0xd79a, 0xd89a, 0xd99a, 0xda9a, 0xaceb, 0xdb9a, 0xcfca, 0xb5d8, 0xf1c3, 0xdc9a, 0xa5c3, 0xf8c6, 0xadeb, 0xcac4, 0xdd9a, 0xaeeb, 0xafeb, 0xb0eb, 0xd5b7, 0xde9a, 0xdf9a, 0xe09a, 0xfab7, 0xe19a, 0xb1eb, 0xe2c7, 0xe29a, 0xb3eb, 0xe39a, 0xa4ba, 0xf5d1, 0xb1b0, 0xb2eb, 0xb4eb, 0xe49a, 0xe59a, 0xe69a, 0xaab5, 0xc8c2, 0xe8c7, 0xe79a, 0xb5eb, 0xe89a, 0xaecb, 0xdfe3, 0xe99a, 0xea9a, 0xc0d3, 0xeb9a, 0xec9a, 0xed9a, 0xee9a, 0xdbd9, 0xef9a, 0xf09a, 0xa1cd, 0xadd6, 0xf3c7, 0xf19a, 0xf29a, 0xf39a, 0xe0d9, 0xe3bb, 0xf49a, 0xbaba, 0xe2e3, 0xf59a, 0xf69a, 0xf79a, 0xf89a, 0xf99a, 0xabcf, 0xfa9a, 0xfb9a, 0xfc9a, 0xe0e3, 0xc7c9, 0xfd9a, 0xb9ba, 0xfe9a, 0x409b, 0x419b, 0xb4d1, 0xe1e3, 0xeac8, 0xafb9, 0xadbd, 0xd8b3, 0xdbce, 0x429b, 0x439b, 0xc0cc, 0x449b, 0x459b, 0x469b, 0xe8e3, 0xe9e3, 0xf4cd, 0x479b, 0x489b, 0x499b, 0x4a9b, 0x4b9b, 0xadcc, 0x4c9b, 0xb3bc, 0x4d9b, 0xeae3, 0x4e9b, 0xebe3, 0x4f9b, 0x509b, 0xdad0, 0x519b, 0x529b, 0x539b, 0xfbc6, 0xdab7, 0x549b, 0x559b, 0xdfc7, 0xcad2, 0xd6ce, 0x569b, 0xe4e3, 0xece3, 0x579b, 0xf2c9, 0xc1b3, 0x589b, 0x599b, 0xe7e3, 0x5a9b, 0x5b9b, 0xe3c6, 0xe5e3, 0x5c9b, 0x5d9b, 0xb3ed, 0xe6e3, 0x5e9b, 0x5f9b, 0x609b, 0x619b, 0xb3c9, 0x629b, 0xe6c5, 0x639b, 0x649b, 0x659b, 0xb5b9, 0x669b, 0xbbc3, 0x679b, 0xe3e3, 0xbdc5, 0xa4c1, 0xd9c2, 0xd7b2, 0x689b, 0xede3, 0xa6bb, 0xadc4, 0x699b, 0xf0e3, 0xdabe, 0x6a9b, 0x6b9b, 0xfbe3, 0xf5e3, 0xd3ba, 0x6c9b, 0x6d9b, 0x6e9b, 0x6f9b, 0xd0b7, 0xcdd3, 0x709b, 0xced6, 0xd3d5, 0xc1b9, 0xb4d5, 0xd8d1, 0x719b, 0x729b, 0x739b, 0x749b, 0xb9d0, 0xf6c7, 0x759b, 0x769b, 0x779b, 0xaac8, 0xb4b2, 0x789b, 0xdac3, 0x799b, 0x7a9b, 0x7b9b, 0xeee3, 0x7c9b, 0x7d9b, 0xfce3, 0xefe3, 0xa8b7, 0xf7e3, 0xf4e3, 0x7e9b, 0x809b, 0x819b, 0xbab7, 0x829b, 0x839b, 0xa2c5, 0x849b, 0xf6e3, 0xddc5, 0xa8b2, 0xfcc6, 0x859b, 0xe0c4, 0x869b, 0x879b, 0xa2d7, 0x889b, 0xe1c0, 0xf9e3, 0x899b, 0x8a9b, 0xfae3, 0xfde3, 0xa9cc, 0xf3e3, 0x8b9b, 0xbed3, 0x8c9b, 0xc3b1, 0xb4ed, 0xf1e3, 0xf2e3, 0x8d9b, 0xf8e3, 0xbad0, 0xc3c6, 0xf3d4, 0xfee3, 0x8e9b, 0x8f9b, 0xe0bd, 0x909b, 0x919b, 0xa7e4, 0x929b, 0x939b, 0xa6e4, 0x949b, 0x959b, 0x969b, 0xf3d1, 0xa3e4, 0x979b, 0xa9e4, 0x989b, 0x999b, 0x9a9b, 0xf7c8, 0x9b9b, 0x9c9b, 0x9d9b, 0x9e9b, 0xb4cf, 0x9f9b, 0xa8e4, 0xaee4, 0xe5c2, 0xa09b, 0xa19b, 0xb4b6, 0xa29b, 0xa39b, 0xa49b, 0xa59b, 0xa69b, 0xa79b, 0xf2bd, 0xa89b, 0xa2e4, 0xa99b, 0xaa9b, 0xe9ba, 0xaae4, 0xab9b, 0xac9b, 0xace4, 0xad9b, 0xae9b, 0xfdb6, 0xded6, 0xb2e4, 0xaf9b, 0xade4, 0xb09b, 0xb19b, 0xb29b, 0xa1e4, 0xb39b, 0xeebb, 0xddcd, 0xa2c7, 0xc9c5, 0xb49b, 0xb59b, 0xf7c1, 0xb69b, 0xa4e4, 0xb79b, 0xb3c7, 0xacbd, 0xbdbd, 0xa5e4, 0xb89b, 0xc7d7, 0xe2b2, 0xb99b, 0xabe4, 0xc3bc, 0xafe4, 0xba9b, 0xebbb, 0xb0e4, 0xa8c5, 0xb1e4, 0xbb9b, 0xbc9b, 0xbd9b, 0xbe9b, 0xe3d5, 0xa3bf, 0xbf9b, 0xbae4, 0xc09b, 0xb7e4, 0xc19b, 0xbbe4, 0xc29b, 0xc39b, 0xbde4, 0xc49b, 0xc59b, 0xd6c6, 0xc69b, 0xc79b, 0xc6ba, 0xcbc0, 0xc89b, 0xc99b, 0xca9b, 0xa1b8, 0xb4e4, 0xcb9b, 0xcc9b, 0xcd9b, 0xce9b, 0xa1d4, 0xcf9b, 0xd09b, 0xa3ba, 0xfebd, 0xd19b, 0xd29b, 0xd39b, 0xbce4, 0xd49b, 0xd59b, 0xd69b, 0xd79b, 0xd89b, 0xbfcd, 0xd99b, 0xda9b, 0xf9c4, 0xdb9b, 0xdc9b, 0xfbcf, 0xe6c9, 0xdd9b, 0xde9b, 0xbfd3, 0xdf9b, 0xd1cf, 0xe09b, 0xe19b, 0xb3e4, 0xe29b, 0xb8e4, 0xb9e4, 0xe9cc, 0xe39b, 0xe49b, 0xe59b, 0xe69b, 0xe79b, 0xcecc, 0xe89b, 0xd4c0, 0xb5e4, 0xb0c1, 0xb6e4, 0xd0ce, 0xe99b, 0xc1bb, 0xd3b5, 0xea9b, 0xf3c8, 0xa7bd, 0xc7d5, 0xacc9, 0xa2b8, 0xcae4, 0xeb9b, 0xec9b, 0xcce4, 0xc4d1, 0xed9b, 0xee9b, 0xbad2, 0xef9b, 0xf09b, 0xadba, 0xf19b, 0xf29b, 0xd4ba, 0xf39b, 0xf49b, 0xf59b, 0xf69b, 0xf79b, 0xf89b, 0xc3e4, 0xedb5, 0xf99b, 0xfa9b, 0xfb9b, 0xcdd7, 0xc0e4, 0xfdcf, 0xbfe4, 0xfc9b, 0xfd9b, 0xfe9b, 0xdcc1, 0xcacc, 0x409c, 0x419c, 0x429c, 0x439c, 0xe7ca, 0x449c, 0x459c, 0x469c, 0x479c, 0xd7c4, 0x489c, 0xd4cc, 0xc8e4, 0x499c, 0x4a9c, 0x4b9c, 0xc7e4, 0xc1e4, 0x4c9c, 0xc4e4, 0xadb5, 0x4d9c, 0x4e9c, 0xd9d3, 0x4f9c, 0xc6e4, 0x509c, 0x519c, 0x529c, 0x539c, 0xf9d2, 0xe3b4, 0x549c, 0xb4bb, 0x559c, 0x569c, 0xeec9, 0x579c, 0xbeb4, 0x589c, 0x599c, 0x5a9c, 0xecbb, 0x5b9c, 0xcdd1, 0x5c9c, 0xedcc, 0xb5ed, 0x5d9c, 0x5e9c, 0x5f9c, 0x609c, 0x619c, 0x629c, 0x639c, 0x649c, 0xe5c7, 0x659c, 0x669c, 0x679c, 0x689c, 0xa8d4, 0x699c, 0xcbe4, 0xd5d7, 0xc2e4, 0x6a9c, 0xa5bd, 0xc5e4, 0x6b9c, 0x6c9c, 0xe6d3, 0x6d9c, 0xc9e4, 0xf8c9, 0x6e9c, 0x6f9c, 0xbee4, 0x709c, 0x719c, 0xe5d3, 0x729c, 0x739c, 0xfec7, 0xc9b6, 0x749c, 0xfcd4, 0xb3b2, 0xd7e4, 0x759c, 0x769c, 0x779c, 0xc2ce, 0x789c, 0xcde4, 0x799c, 0xbcce, 0x7a9c, 0xdbb8, 0x7b9c, 0x7c9c, 0xd6e4, 0x7d9c, 0xcabf, 0x7e9c, 0x809c, 0x819c, 0xced3, 0x829c, 0xecc3, 0x839c, 0x849c, 0x859c, 0x869c, 0x879c, 0x889c, 0x899c, 0x8a9c, 0xc8c5, 0xd8e4, 0x8b9c, 0x8c9c, 0x8d9c, 0x8e9c, 0x8f9c, 0x909c, 0x919c, 0x929c, 0xc4cd, 0xcfe4, 0x939c, 0x949c, 0x959c, 0x969c, 0xd4e4, 0xd5e4, 0x979c, 0xfeba, 0x989c, 0xe6cf, 0x999c, 0x9a9c, 0xbfd5, 0x9b9c, 0x9c9c, 0x9d9c, 0xd2e4, 0x9e9c, 0x9f9c, 0xa09c, 0xa19c, 0xa29c, 0xa39c, 0xa49c, 0xa59c, 0xa69c, 0xa79c, 0xa89c, 0xd0e4, 0xa99c, 0xaa9c, 0xcee4, 0xab9c, 0xac9c, 0xad9c, 0xae9c, 0xaf9c, 0xb09c, 0xb19c, 0xb29c, 0xb39c, 0xb49c, 0xb59c, 0xb69c, 0xb79c, 0xb89c, 0xb99c, 0xe5cd, 0xaaca, 0xba9c, 0xbb9c, 0xbc9c, 0xa3c0, 0xbd9c, 0xa6bd, 0xd3e4, 0xbe9c, 0xbf9c, 0xc8b8, 0xc09c, 0xc19c, 0xc29c, 0xc39c, 0xc49c, 0xe7e4, 0xb4d4, 0xc59c, 0xc69c, 0xc79c, 0xc89c, 0xc99c, 0xca9c, 0xcb9c, 0xdbe4, 0xcc9c, 0xcd9c, 0xce9c, 0xefc1, 0xcf9c, 0xd09c, 0xe9e4, 0xd19c, 0xd29c, 0xe7d2, 0xd39c, 0xd49c, 0xdfe4, 0xd59c, 0xe0e4, 0xd69c, 0xd79c, 0xaacf, 0xd89c, 0xd99c, 0xda9c, 0xdb9c, 0xddcb, 0xdc9c, 0xdae4, 0xd1e4, 0xdd9c, 0xe5e4, 0xde9c, 0xdcc8, 0xe3e4, 0xdf9c, 0xe09c, 0xe7c4, 0xe2e4, 0xe19c, 0xe1e4, 0xe29c, 0xe39c, 0xe49c, 0xfcb3, 0xe8e4, 0xe59c, 0xe69c, 0xe79c, 0xe89c, 0xe1b5, 0xe99c, 0xea9c, 0xeb9c, 0xccd7, 0xec9c, 0xed9c, 0xee9c, 0xe6e4, 0xef9c, 0xacbb, 0xf09c, 0xd2d7, 0xcfcc, 0xf8eb, 0xf19c, 0xe4e4, 0xf29c, 0xf39c, 0xf6b9, 0xf49c, 0xf59c, 0xf69c, 0xcdd6, 0xd9e4, 0xdce4, 0xfac2, 0xdee4, 0xf79c, 0xcbc2, 0xc4c0, 0xd0c2, 0xf89c, 0xf5b1, 0xb2cc, 0xf99c, 0xfa9c, 0xfb9c, 0xfc9c, 0xfd9c, 0xfe9c, 0x409d, 0x419d, 0x429d, 0x439d, 0xceb5, 0x449d, 0x459d, 0x469d, 0x479d, 0xefe4, 0x489d, 0x499d, 0x4a9d, 0x4b9d, 0x4c9d, 0x4d9d, 0x4e9d, 0x4f9d, 0xafc6, 0x509d, 0x519d, 0x529d, 0xe1c6, 0x539d, 0x549d, 0xf5e4, 0x559d, 0x569d, 0x579d, 0x589d, 0x599d, 0xa9c2, 0x5a9d, 0x5b9d, 0x5c9d, 0xecc0, 0xddd1, 0xeee4, 0x5d9d, 0x5e9d, 0x5f9d, 0x609d, 0x619d, 0x629d, 0x639d, 0x649d, 0x659d, 0x669d, 0xaec4, 0x679d, 0x689d, 0x699d, 0xede4, 0x6a9d, 0x6b9d, 0x6c9d, 0x6d9d, 0xf6e4, 0xf4e4, 0xfec2, 0x6e9d, 0xdde4, 0x6f9d, 0xf0e4, 0x709d, 0xfeca, 0x719d, 0xc4d5, 0x729d, 0x739d, 0xf1e4, 0x749d, 0x759d, 0x769d, 0x779d, 0x789d, 0x799d, 0x7a9d, 0xfad1, 0x7b9d, 0x7c9d, 0x7d9d, 0x7e9d, 0x809d, 0x819d, 0x829d, 0xebe4, 0xece4, 0x839d, 0x849d, 0x859d, 0xf2e4, 0x869d, 0xabce, 0x879d, 0x889d, 0x899d, 0x8a9d, 0x8b9d, 0x8c9d, 0x8d9d, 0x8e9d, 0x8f9d, 0x909d, 0xcbc5, 0x919d, 0x929d, 0x939d, 0xb1c7, 0x949d, 0xbac2, 0x959d, 0x969d, 0x979d, 0xeae4, 0x989d, 0x999d, 0x9a9d, 0xcac1, 0x9b9d, 0x9c9d, 0x9d9d, 0x9e9d, 0x9f9d, 0xa09d, 0xb6cc, 0xb1b3, 0xa19d, 0xa29d, 0xa39d, 0xfbe4, 0xa49d, 0xf3e4, 0xa59d, 0xa69d, 0xa79d, 0xfae4, 0xa89d, 0xfde4, 0xa99d, 0xfce4, 0xaa9d, 0xab9d, 0xac9d, 0xad9d, 0xae9d, 0xaf9d, 0xb09d, 0xceb3, 0xb19d, 0xb29d, 0xb39d, 0xbab3, 0xf7e4, 0xb49d, 0xb59d, 0xf9e4, 0xf8e4, 0xecc5, 0xb69d, 0xb79d, 0xb89d, 0xb99d, 0xba9d, 0xbb9d, 0xbc9d, 0xbd9d, 0xbe9d, 0xbf9d, 0xc09d, 0xc19d, 0xc29d, 0xbdc0, 0xc39d, 0xc49d, 0xc59d, 0xc69d, 0xe8d4, 0xc79d, 0xc89d, 0xc99d, 0xca9d, 0xcb9d, 0xa2e5, 0xcc9d, 0xcd9d, 0xce9d, 0xcf9d, 0xd09d, 0xd19d, 0xd29d, 0xd39d, 0xd49d, 0xd59d, 0xd69d, 0xc4b0, 0xd79d, 0xd89d, 0xa4e5, 0xd99d, 0xda9d, 0xa3e5, 0xdb9d, 0xdc9d, 0xdd9d, 0xde9d, 0xdf9d, 0xe09d, 0xa4bc, 0xe19d, 0xa5e5, 0xe29d, 0xe39d, 0xe49d, 0xe59d, 0xe69d, 0xe79d, 0xa1e5, 0xe89d, 0xe99d, 0xea9d, 0xeb9d, 0xec9d, 0xed9d, 0xee9d, 0xfee4, 0xf4b1, 0xef9d, 0xf09d, 0xf19d, 0xf29d, 0xf39d, 0xf49d, 0xf59d, 0xf69d, 0xf79d, 0xf89d, 0xf99d, 0xa8e5, 0xfa9d, 0xa9e5, 0xa6e5, 0xfb9d, 0xfc9d, 0xfd9d, 0xfe9d, 0x409e, 0x419e, 0x429e, 0x439e, 0x449e, 0x459e, 0x469e, 0x479e, 0xa7e5, 0xaae5, 0x489e, 0x499e, 0x4a9e, 0x4b9e, 0x4c9e, 0x4d9e, 0x4e9e, 0x4f9e, 0x509e, 0x519e, 0x529e, 0x539e, 0x549e, 0x559e, 0x569e, 0x579e, 0x589e, 0x599e, 0x5a9e, 0x5b9e, 0x5c9e, 0x5d9e, 0x5e9e, 0x5f9e, 0x609e, 0x619e, 0x629e, 0x639e, 0x649e, 0x659e, 0x669e, 0x679e, 0x689e, 0xd9c6, 0x699e, 0x6a9e, 0x6b9e, 0x6c9e, 0x6d9e, 0x6e9e, 0x6f9e, 0x709e, 0xabe5, 0xade5, 0x719e, 0x729e, 0x739e, 0x749e, 0x759e, 0x769e, 0x779e, 0xace5, 0x789e, 0x799e, 0x7a9e, 0x7b9e, 0x7c9e, 0x7d9e, 0x7e9e, 0x809e, 0x819e, 0x829e, 0x839e, 0x849e, 0x859e, 0x869e, 0x879e, 0x889e, 0x899e, 0xafe5, 0x8a9e, 0x8b9e, 0x8c9e, 0xaee5, 0x8d9e, 0x8e9e, 0x8f9e, 0x909e, 0x919e, 0x929e, 0x939e, 0x949e, 0x959e, 0x969e, 0x979e, 0x989e, 0x999e, 0x9a9e, 0x9b9e, 0x9c9e, 0x9d9e, 0x9e9e, 0xe0b9, 0x9f9e, 0xa09e, 0xb0e5, 0xa19e, 0xa29e, 0xa39e, 0xa49e, 0xa59e, 0xa69e, 0xa79e, 0xa89e, 0xa99e, 0xaa9e, 0xab9e, 0xac9e, 0xad9e, 0xae9e, 0xb1e5, 0xaf9e, 0xb09e, 0xb19e, 0xb29e, 0xb39e, 0xb49e, 0xb59e, 0xb69e, 0xb79e, 0xb89e, 0xb99e, 0xba9e, 0xf0bb, 0xe1ec, 0xf0c3, 0xbb9e, 0xc6b5, 0xd2bb, 0xbc9e, 0xbd9e, 0xbe9e, 0xbf9e, 0xe9c1, 0xeed4, 0xc09e, 0xc4be, 0xc19e, 0xc29e, 0xc39e, 0xc6d7, 0xc49e, 0xd6d4, 0xd3b2, 0xbeec, 0xc59e, 0xc69e, 0xc79e, 0xc89e, 0xc1ea, 0xc99e, 0xca9e, 0xcb9e, 0xafc2, 0xb6b4, 0xcc9e, 0xcd9e, 0xce9e, 0xd7d1, 0xcf9e, 0xd09e, 0xd19e, 0xb4b3, 0xd29e, 0xb2c8, 0xbbbf, 0xc0ec, 0xd39e, 0xd49e, 0xcbd6, 0xd59e, 0xd69e, 0xbfec, 0xc1ec, 0xd79e, 0xd89e, 0xd99e, 0xda9e, 0xdb9e, 0xdc9e, 0xdd9e, 0xde9e, 0xdf9e, 0xe09e, 0xe19e, 0xe29e, 0xe39e, 0xc5ec, 0xe6be, 0xbfcc, 0xdac5, 0xbcbe, 0xe49e, 0xc6ec, 0xe59e, 0xfeb1, 0xe69e, 0xe79e, 0xe89e, 0xc4ec, 0xa8d5, 0xe3b5, 0xe99e, 0xc2ec, 0xb6c1, 0xe3b3, 0xea9e, 0xeb9e, 0xc3ec, 0xb8cb, 0xc3c0, 0xfecc, 0xec9e, 0xed9e, 0xee9e, 0xef9e, 0xd2c1, 0xf09e, 0xc8ec, 0xf19e, 0xf29e, 0xf39e, 0xf49e, 0xf59e, 0xf69e, 0xf79e, 0xf89e, 0xf99e, 0xfa9e, 0xfb9e, 0xfc9e, 0xfd9e, 0xe6ba, 0xd3c0, 0xfe9e, 0xf2d6, 0x409f, 0x419f, 0x429f, 0xccd1, 0x439f, 0x449f, 0x459f, 0x469f, 0xbebf, 0x479f, 0xb3b7, 0xd5c9, 0xc7ec, 0xe2bb, 0x489f, 0xcccc, 0xfdbd, 0xc8c8, 0x499f, 0xa9cf, 0x4a9f, 0x4b9f, 0x4c9f, 0x4d9f, 0x4e9f, 0x4f9f, 0x509f, 0xe9cd, 0x519f, 0xebc5, 0x529f, 0x539f, 0x549f, 0xe9b7, 0x559f, 0x569f, 0x579f, 0x589f, 0x599f, 0x5a9f, 0x5b9f, 0x5c9f, 0x5d9f, 0x5e9f, 0x5f9f, 0xc9d1, 0xb8ba, 0x609f, 0x619f, 0x629f, 0x639f, 0x649f, 0xc9ec, 0x659f, 0x669f, 0xcaec, 0x679f, 0xc0bb, 0xcbec, 0x689f, 0xe2ec, 0xbab1, 0xd9b7, 0x699f, 0x6a9f, 0x6b9f, 0x6c9f, 0x6d9f, 0x6e9f, 0x6f9f, 0x709f, 0x719f, 0x729f, 0x739f, 0xb9bd, 0x749f, 0x759f, 0x769f, 0x779f, 0x789f, 0x799f, 0x7a9f, 0x7b9f, 0xccec, 0xe6d1, 0xcdec, 0x7c9f, 0x7d9f, 0x7e9f, 0x809f, 0xbbc8, 0x819f, 0x829f, 0x839f, 0x849f, 0x859f, 0x869f, 0x879f, 0x889f, 0x899f, 0x8a9f, 0x8b9f, 0x8c9f, 0x8d9f, 0x8e9f, 0xd1ec, 0x8f9f, 0x909f, 0x919f, 0x929f, 0xd3ec, 0x939f, 0xcdbb, 0x949f, 0xe5bc, 0x959f, 0x969f, 0x979f, 0x989f, 0x999f, 0x9a9f, 0x9b9f, 0x9c9f, 0x9d9f, 0x9e9f, 0x9f9f, 0xa09f, 0xa19f, 0xcfec, 0xa29f, 0xb7c9, 0xa39f, 0xa49f, 0xa59f, 0xa69f, 0xa79f, 0xbac3, 0xa89f, 0xe3ec, 0xd5d5, 0xd0ec, 0xa99f, 0xaa9f, 0xab9f, 0xac9f, 0xad9f, 0xf3d6, 0xae9f, 0xaf9f, 0xb09f, 0xd2ec, 0xceec, 0xb19f, 0xb29f, 0xb39f, 0xb49f, 0xd4ec, 0xb59f, 0xd5ec, 0xb69f, 0xb79f, 0xbfc9, 0xb89f, 0xb99f, 0xba9f, 0xbb9f, 0xbc9f, 0xbd9f, 0xa8cf, 0xbe9f, 0xbf9f, 0xc09f, 0xc19f, 0xc29f, 0xdcd0, 0xc39f, 0xc49f, 0xc59f, 0xc69f, 0xacd1, 0xc79f, 0xc89f, 0xc99f, 0xca9f, 0xdbc8, 0xcb9f, 0xcc9f, 0xcd9f, 0xd6ec, 0xf5ce, 0xce9f, 0xcf9f, 0xd09f, 0xd19f, 0xd29f, 0xecca, 0xdaec, 0xd39f, 0xd49f, 0xd59f, 0xd69f, 0xd79f, 0xd89f, 0xd99f, 0xd9ec, 0xda9f, 0xdb9f, 0xdc9f, 0xbeb0, 0xdd9f, 0xde9f, 0xdf9f, 0xe09f, 0xe19f, 0xe29f, 0xd7ec, 0xe39f, 0xd8ec, 0xe49f, 0xe59f, 0xe69f, 0xe4ec, 0xe79f, 0xe89f, 0xe99f, 0xea9f, 0xeb9f, 0xec9f, 0xed9f, 0xee9f, 0xef9f, 0xbcc8, 0xf09f, 0xf19f, 0xf29f, 0xf39f, 0xf49f, 0xf59f, 0xf69f, 0xf79f, 0xf89f, 0xf99f, 0xc7c1, 0xfa9f, 0xfb9f, 0xfc9f, 0xfd9f, 0xfe9f, 0xdcec, 0xe0d1, 0x40a0, 0x41a0, 0x42a0, 0x43a0, 0x44a0, 0x45a0, 0x46a0, 0x47a0, 0x48a0, 0x49a0, 0xdbec, 0x4aa0, 0x4ba0, 0x4ca0, 0x4da0, 0xefd4, 0x4ea0, 0xddec, 0x4fa0, 0x50a0, 0x51a0, 0x52a0, 0x53a0, 0x54a0, 0xc6db, 0x55a0, 0x56a0, 0x57a0, 0x58a0, 0x59a0, 0x5aa0, 0x5ba0, 0x5ca0, 0x5da0, 0x5ea0, 0xdeec, 0x5fa0, 0x60a0, 0x61a0, 0x62a0, 0x63a0, 0x64a0, 0x65a0, 0x66a0, 0x67a0, 0x68a0, 0x69a0, 0x6aa0, 0xacb1, 0x6ba0, 0x6ca0, 0x6da0, 0x6ea0, 0x6fa0, 0x70a0, 0x71a0, 0x72a0, 0x73a0, 0x74a0, 0x75a0, 0x76a0, 0x77a0, 0x78a0, 0x79a0, 0x7aa0, 0x7ba0, 0x7ca0, 0x7da0, 0x7ea0, 0x80a0, 0x81a0, 0xdfec, 0x82a0, 0x83a0, 0x84a0, 0x85a0, 0x86a0, 0x87a0, 0x88a0, 0x89a0, 0x8aa0, 0x8ba0, 0xe0ec, 0x8ca0, 0xa6d7, 0x8da0, 0xc0c5, 0x8ea0, 0x8fa0, 0x90a0, 0xbceb, 0xaeb0, 0x91a0, 0x92a0, 0x93a0, 0xf4be, 0xb8b8, 0xafd2, 0xd6b0, 0xf9b5, 0x94a0, 0xb3d8, 0x95a0, 0xaccb, 0x96a0, 0xdde3, 0x97a0, 0x98a0, 0x99a0, 0x9aa0, 0x9ba0, 0x9ca0, 0x9da0, 0xacc6, 0xe6b0, 0x9ea0, 0x9fa0, 0xa0a0, 0xc6c5, 0xb9eb, 0xa1a0, 0xa2a0, 0xa3a0, 0xa4a0, 0xbaeb, 0xa5a0, 0xa6a0, 0xa7a0, 0xbbeb, 0xa8a0, 0xa9a0, 0xc0d1, 0xaaa0, 0xa3c5, 0xaba0, 0xf2ea, 0xaca0, 0xb2c4, 0xada0, 0xb5c4, 0xcec0, 0xaea0, 0xafa0, 0xb0a0, 0xf3ea, 0xc1c4, 0xb1a0, 0xefce, 0xb2a0, 0xb3a0, 0xb4a0, 0xb5a0, 0xf0ea, 0xf4ea, 0xb6a0, 0xb7a0, 0xfcc9, 0xb8a0, 0xb9a0, 0xa3c7, 0xbaa0, 0xbba0, 0xbca0, 0xd8cc, 0xfece, 0xbda0, 0xbea0, 0xbfa0, 0xf5ea, 0xf6ea, 0xaccf, 0xe7c0, 0xc0a0, 0xc1a0, 0xf7ea, 0xc2a0, 0xc3a0, 0xc4a0, 0xc5a0, 0xc6a0, 0xbfb6, 0xf8ea, 0xc7a0, 0xf9ea, 0xc8a0, 0xfaea, 0xc9a0, 0xcaa0, 0xfbea, 0xcba0, 0xcca0, 0xcda0, 0xcea0, 0xcfa0, 0xd0a0, 0xd1a0, 0xd2a0, 0xd3a0, 0xd4a0, 0xd5a0, 0xd6a0, 0xf1ea, 0xd7a0, 0xd8a0, 0xd9a0, 0xdaa0, 0xdba0, 0xdca0, 0xdda0, 0xdea0, 0xdfa0, 0xe0a0, 0xe1a0, 0xe2a0, 0xaec8, 0xebe1, 0xe3a0, 0xb8b7, 0xece1, 0xe4a0, 0xe5a0, 0xe6a0, 0xede1, 0xe7a0, 0xb4d7, 0xeee1, 0xefe1, 0xccd3, 0xe8a0, 0xe9a0, 0xeaa0, 0xeba0, 0xeca0, 0xeda0, 0xeea0, 0xf1e1, 0xf1bf, 0xf0e1, 0xd2b5, 0xefa0, 0xf0a0, 0xf1a0, 0xb7b1, 0xf2a0, 0xf3a0, 0xf4a0, 0xf5a0, 0xf3e1, 0xf2e1, 0xf6a0, 0xfcba, 0xf7a0, 0xf4e1, 0xf8a0, 0xf9a0, 0xfaa0, 0xfba0, 0xb7b9, 0xfca0, 0xd1be, 0xfda0, 0xfea0, 0x40aa, 0x41aa, 0xfcc4, 0x42aa, 0xddba, 0xc6bd, 0x43aa, 0x44aa, 0x45aa, 0x46aa, 0x47aa, 0x48aa, 0xf5e1, 0xf7e1, 0x49aa, 0x4aaa, 0xc0b6, 0xc1cf, 0xa8ca, 0xf6e1, 0xf8d5, 0xfcd3, 0xf8e1, 0xfce1, 0xf9e1, 0x4baa, 0x4caa, 0xfae1, 0xeac0, 0x4daa, 0xfee1, 0xa1e2, 0xc7c0, 0x4eaa, 0x4faa, 0x50aa, 0x51aa, 0xfbe1, 0x52aa, 0xfde1, 0x53aa, 0x54aa, 0x55aa, 0x56aa, 0x57aa, 0x58aa, 0xa5e2, 0x59aa, 0x5aaa, 0x5baa, 0xd4c1, 0x5caa, 0x5daa, 0x5eaa, 0x5faa, 0xa3e2, 0x60aa, 0xa8e2, 0xfeb2, 0xa2e2, 0x61aa, 0x62aa, 0x63aa, 0xcdc3, 0xc2b2, 0xa7e2, 0xa6e2, 0x64aa, 0x65aa, 0xa4e2, 0xa9e2, 0x66aa, 0x67aa, 0xabe2, 0x68aa, 0x69aa, 0x6aaa, 0xc9d0, 0xedd6, 0xa8c3, 0xace2, 0x6baa, 0xd7cf, 0x6caa, 0x6daa, 0xaee2, 0x6eaa, 0x6faa, 0xefba, 0x70aa, 0x71aa, 0xe0e9, 0xade2, 0xaae2, 0x72aa, 0x73aa, 0x74aa, 0x75aa, 0xabbb, 0xb3d4, 0x76aa, 0x77aa, 0x78aa, 0x79aa, 0x7aaa, 0x7baa, 0x7caa, 0x7daa, 0x7eaa, 0x80aa, 0x81aa, 0x82aa, 0x83aa, 0xb0e2, 0x84aa, 0x85aa, 0xafe2, 0x86aa, 0xe1e9, 0x87aa, 0x88aa, 0x89aa, 0x8aaa, 0xb1e2, 0x8baa, 0x8caa, 0x8daa, 0x8eaa, 0x8faa, 0x90aa, 0x91aa, 0x92aa, 0xb2e2, 0x93aa, 0x94aa, 0x95aa, 0x96aa, 0x97aa, 0x98aa, 0x99aa, 0x9aaa, 0x9baa, 0x9caa, 0x9daa, 0xb3e2, 0xa1cc, 0x9eaa, 0xb4e2, 0x9faa, 0xa0aa, 0x40ab, 0x41ab, 0x42ab, 0x43ab, 0x44ab, 0x45ab, 0x46ab, 0x47ab, 0x48ab, 0x49ab, 0x4aab, 0x4bab, 0xb5e2, 0x4cab, 0x4dab, 0x4eab, 0x4fab, 0x50ab, 0xfed0, 0x51ab, 0x52ab, 0xcac2, 0x53ab, 0xf1d3, 0x54ab, 0xf5cd, 0x55ab, 0x56ab, 0xe0e7, 0x57ab, 0x58ab, 0xe1e7, 0x59ab, 0x5aab, 0x5bab, 0x5cab, 0xc1be, 0x5dab, 0x5eab, 0x5fab, 0x60ab, 0xeac2, 0x61ab, 0x62ab, 0x63ab, 0xe4e7, 0x64ab, 0x65ab, 0xe3e7, 0x66ab, 0x67ab, 0x68ab, 0x69ab, 0x6aab, 0x6bab, 0xe6cd, 0x6cab, 0xb5c3, 0x6dab, 0x6eab, 0xe2e7, 0xb7bb, 0xd6cf, 0x6fab, 0xe1c1, 0xe9e7, 0x70ab, 0x71ab, 0x72ab, 0xe8e7, 0x73ab, 0x74ab, 0xf4e7, 0xa3b2, 0x75ab, 0x76ab, 0x77ab, 0x78ab, 0xeae7, 0x79ab, 0xe6e7, 0x7aab, 0x7bab, 0x7cab, 0x7dab, 0x7eab, 0xece7, 0xebe7, 0xbac9, 0x80ab, 0x81ab, 0xe4d5, 0x82ab, 0xe5e7, 0xa9b7, 0xe7e7, 0x83ab, 0x84ab, 0x85ab, 0x86ab, 0x87ab, 0x88ab, 0x89ab, 0xeee7, 0x8aab, 0x8bab, 0x8cab, 0x8dab, 0xf3e7, 0x8eab, 0xe9d6, 0x8fab, 0x90ab, 0x91ab, 0x92ab, 0xede7, 0x93ab, 0xf2e7, 0x94ab, 0xf1e7, 0x95ab, 0x96ab, 0x97ab, 0xe0b0, 0x98ab, 0x99ab, 0x9aab, 0x9bab, 0xf5e7, 0x9cab, 0x9dab, 0x9eab, 0x9fab, 0xa0ab, 0x40ac, 0x41ac, 0x42ac, 0x43ac, 0x44ac, 0x45ac, 0x46ac, 0x47ac, 0x48ac, 0x49ac, 0x4aac, 0xf2c7, 0x4bac, 0xc5c0, 0xedc0, 0x4cac, 0x4dac, 0xf0c1, 0xf0e7, 0x4eac, 0x4fac, 0x50ac, 0x51ac, 0xf6e7, 0xf6cb, 0x52ac, 0x53ac, 0x54ac, 0x55ac, 0x56ac, 0x57ac, 0x58ac, 0x59ac, 0x5aac, 0xa2e8, 0xa1e8, 0x5bac, 0x5cac, 0x5dac, 0x5eac, 0x5fac, 0x60ac, 0xc1d7, 0x61ac, 0x62ac, 0xfae7, 0xf9e7, 0x63ac, 0xfbe7, 0x64ac, 0xf7e7, 0x65ac, 0xfee7, 0x66ac, 0xfde7, 0x67ac, 0xfce7, 0x68ac, 0x69ac, 0xd5c1, 0xd9c7, 0xfdc5, 0xc3c5, 0x6aac, 0x6bac, 0x6cac, 0x6dac, 0x6eac, 0xedc7, 0x6fac, 0x70ac, 0x71ac, 0x72ac, 0xa3e8, 0x73ac, 0x74ac, 0x75ac, 0x76ac, 0x77ac, 0x78ac, 0x79ac, 0x7aac, 0x7bac, 0x7cac, 0x7dac, 0x7eac, 0x80ac, 0x81ac, 0x82ac, 0x83ac, 0x84ac, 0x85ac, 0x86ac, 0xa6e8, 0x87ac, 0xa5e8, 0x88ac, 0xa7e8, 0xf7ba, 0xf8e7, 0xa4e8, 0x89ac, 0xf0c8, 0xaac9, 0x8aac, 0x8bac, 0x8cac, 0x8dac, 0x8eac, 0x8fac, 0x90ac, 0x91ac, 0x92ac, 0x93ac, 0x94ac, 0x95ac, 0x96ac, 0xa9e8, 0x97ac, 0x98ac, 0xe5b9, 0x99ac, 0x9aac, 0x9bac, 0x9cac, 0x9dac, 0xfed1, 0xa8e8, 0x9eac, 0x9fac, 0xa0ac, 0x40ad, 0x41ad, 0x42ad, 0xaae8, 0x43ad, 0xade8, 0xaee8, 0x44ad, 0xa7c1, 0x45ad, 0x46ad, 0x47ad, 0xafe8, 0x48ad, 0x49ad, 0x4aad, 0xb0e8, 0x4bad, 0x4cad, 0xace8, 0x4dad, 0xb4e8, 0x4ead, 0x4fad, 0x50ad, 0x51ad, 0x52ad, 0x53ad, 0x54ad, 0x55ad, 0x56ad, 0x57ad, 0x58ad, 0xabe8, 0x59ad, 0xb1e8, 0x5aad, 0x5bad, 0x5cad, 0x5dad, 0x5ead, 0x5fad, 0x60ad, 0x61ad, 0xb5e8, 0xb2e8, 0xb3e8, 0x62ad, 0x63ad, 0x64ad, 0x65ad, 0x66ad, 0x67ad, 0x68ad, 0x69ad, 0x6aad, 0x6bad, 0x6cad, 0x6dad, 0x6ead, 0x6fad, 0x70ad, 0x71ad, 0xb7e8, 0x72ad, 0x73ad, 0x74ad, 0x75ad, 0x76ad, 0x77ad, 0x78ad, 0x79ad, 0x7aad, 0x7bad, 0x7cad, 0x7dad, 0x7ead, 0x80ad, 0x81ad, 0x82ad, 0x83ad, 0x84ad, 0x85ad, 0x86ad, 0x87ad, 0x88ad, 0x89ad, 0xb6e8, 0x8aad, 0x8bad, 0x8cad, 0x8dad, 0x8ead, 0x8fad, 0x90ad, 0x91ad, 0x92ad, 0xcfb9, 0x93ad, 0xacf0, 0x94ad, 0xadf0, 0x95ad, 0xb0c6, 0xeab0, 0xbfc8, 0x96ad, 0xdfcd, 0x97ad, 0x98ad, 0x99ad, 0x9aad, 0x9bad, 0x9cad, 0x9dad, 0xcdce, 0xb1ea, 0x9ead, 0x9fad, 0xa0ad, 0x40ae, 0xb2ea, 0x41ae, 0xbfc6, 0xc9b4, 0x42ae, 0x43ae, 0x44ae, 0x45ae, 0x46ae, 0x47ae, 0x48ae, 0xb3ea, 0x49ae, 0x4aae, 0x4bae, 0x4cae, 0xe7d5, 0x4dae, 0x4eae, 0x4fae, 0x50ae, 0x51ae, 0x52ae, 0x53ae, 0x54ae, 0xf9dd, 0x55ae, 0xb4ea, 0x56ae, 0xb5ea, 0x57ae, 0xb6ea, 0x58ae, 0x59ae, 0x5aae, 0x5bae, 0xcab8, 0xb0df, 0xf5c9, 0x5cae, 0xf0cc, 0x5dae, 0x5eae, 0xfac9, 0x5fae, 0x60ae, 0x61ae, 0x62ae, 0x63ae, 0xfbc9, 0x64ae, 0x65ae, 0xc3d3, 0xa6cb, 0x66ae, 0xa6b8, 0xaef0, 0xc2b1, 0x67ae, 0xb8e5, 0xefcc, 0xc9d3, 0xd7bc, 0xeac9, 0x68ae, 0xe7b5, 0x69ae, 0xd0c4, 0xe9b5, 0x6aae, 0xaeee, 0xadbb, 0x6bae, 0x6cae, 0xdee7, 0x6dae, 0xafee, 0x6eae, 0x6fae, 0x70ae, 0x71ae, 0xa9b3, 0x72ae, 0x73ae, 0xb2ee, 0x74ae, 0x75ae, 0xb1ee, 0xe7bd, 0x76ae, 0xb0ee, 0xb7ce, 0x77ae, 0x78ae, 0x79ae, 0x7aae, 0xcfc5, 0x7bae, 0x7cae, 0x7dae, 0x7eae, 0xf4c1, 0xcedb, 0xb3ee, 0xf3d0, 0x80ae, 0x81ae, 0x82ae, 0x83ae, 0x84ae, 0x85ae, 0x86ae, 0x87ae, 0xd4c2, 0xe8c6, 0x88ae, 0x89ae, 0x8aae, 0xacb7, 0x8bae, 0x8cae, 0x8dae, 0x8eae, 0x8fae, 0x90ae, 0x91ae, 0xb4ee, 0x92ae, 0xebb3, 0x93ae, 0x94ae, 0x95ae, 0xfbbb, 0xb5ee, 0x96ae, 0x97ae, 0x98ae, 0x99ae, 0x9aae, 0xdce7, 0x9bae, 0x9cae, 0x9dae, 0xb6ee, 0x9eae, 0x9fae, 0xaebd, 0xa0ae, 0x40af, 0x41af, 0x42af, 0xe2f1, 0x43af, 0x44af, 0x45af, 0xe8ca, 0x46af, 0xc9d2, 0xdaf0, 0x47af, 0xdbf0, 0x48af, 0xdcf0, 0xc6c1, 0x49af, 0xedb8, 0xcebe, 0x4aaf, 0x4baf, 0xdef0, 0x4caf, 0xb1c5, 0xddf0, 0xf1d1, 0x4daf, 0xe0f0, 0xccb0, 0xeabd, 0x4eaf, 0x4faf, 0x50af, 0x51af, 0x52af, 0xdfd2, 0xdff0, 0x53af, 0xafb4, 0xe8b7, 0xe6f0, 0xe5f0, 0xa3c6, 0xe1f0, 0xe2f0, 0xc3b4, 0x54af, 0x55af, 0xe3f0, 0xeed5, 0x56af, 0x57af, 0xdbcc, 0xd2be, 0xb2bc, 0x58af, 0x59af, 0x5aaf, 0xe8f0, 0xe7f0, 0xe4f0, 0xa1b2, 0x5baf, 0xa2d6, 0xb8d3, 0xb7be, 0xacc8, 0x5caf, 0x5daf, 0xeaf0, 0x5eaf, 0x5faf, 0x60af, 0x61af, 0xf7d1, 0x62af, 0xccd6, 0xdbba, 0xe9f0, 0x63af, 0xbbb6, 0x64af, 0x65af, 0xb4cd, 0x66af, 0x67af, 0xa6c6, 0x68af, 0x69af, 0x6aaf, 0xa1c1, 0xebf0, 0xeef0, 0x6baf, 0xedf0, 0xf0f0, 0xecf0, 0x6caf, 0xbebb, 0xeff0, 0x6daf, 0x6eaf, 0x6faf, 0x70af, 0xb5cc, 0xf2f0, 0x71af, 0x72af, 0xd5b3, 0x73af, 0x74af, 0x75af, 0x76af, 0xd4b1, 0x77af, 0x78af, 0xf3f0, 0x79af, 0x7aaf, 0xf4f0, 0xf6f0, 0xe1b4, 0x7baf, 0xf1f0, 0x7caf, 0xf7f0, 0x7daf, 0x7eaf, 0x80af, 0x81af, 0xfaf0, 0x82af, 0xf8f0, 0x83af, 0x84af, 0x85af, 0xf5f0, 0x86af, 0x87af, 0x88af, 0x89af, 0xfdf0, 0x8aaf, 0xf9f0, 0xfcf0, 0xfef0, 0x8baf, 0xa1f1, 0x8caf, 0x8daf, 0x8eaf, 0xc1ce, 0xa4f1, 0x8faf, 0xa3f1, 0x90af, 0xf6c1, 0xfbf0, 0xddca, 0x91af, 0x92af, 0xf1b4, 0xf1b1, 0xb1cc, 0x93af, 0xa6f1, 0x94af, 0x95af, 0xa7f1, 0x96af, 0x97af, 0xacf1, 0xced5, 0xa9f1, 0x98af, 0x99af, 0xb3c8, 0x9aaf, 0x9baf, 0x9caf, 0xa2f1, 0x9daf, 0xabf1, 0xa8f1, 0xa5f1, 0x9eaf, 0x9faf, 0xaaf1, 0xa0af, 0x40b0, 0x41b0, 0x42b0, 0x43b0, 0x44b0, 0x45b0, 0x46b0, 0xa9b0, 0xadf1, 0x47b0, 0x48b0, 0x49b0, 0x4ab0, 0x4bb0, 0x4cb0, 0xaff1, 0x4db0, 0xb1f1, 0x4eb0, 0x4fb0, 0x50b0, 0x51b0, 0x52b0, 0xb0f1, 0x53b0, 0xaef1, 0x54b0, 0x55b0, 0x56b0, 0x57b0, 0xa2d1, 0x58b0, 0x59b0, 0x5ab0, 0x5bb0, 0x5cb0, 0x5db0, 0x5eb0, 0xb2f1, 0x5fb0, 0x60b0, 0x61b0, 0xb3f1, 0x62b0, 0x63b0, 0x64b0, 0x65b0, 0x66b0, 0x67b0, 0x68b0, 0x69b0, 0xefb9, 0x6ab0, 0x6bb0, 0xc7b5, 0x6cb0, 0xd7b0, 0xd9b0, 0x6db0, 0x6eb0, 0x6fb0, 0xedd4, 0x70b0, 0xc4b5, 0x71b0, 0xd4bd, 0xcabb, 0xa7f0, 0x72b0, 0x73b0, 0xdeb8, 0x74b0, 0x75b0, 0xa8f0, 0x76b0, 0x77b0, 0xa8b0, 0x78b0, 0xa9f0, 0x79b0, 0x7ab0, 0xeecd, 0x7bb0, 0x7cb0, 0xaaf0, 0x7db0, 0x7eb0, 0x80b0, 0x81b0, 0x82b0, 0x83b0, 0x84b0, 0x85b0, 0x86b0, 0x87b0, 0xabf0, 0x88b0, 0x89b0, 0x8ab0, 0x8bb0, 0x8cb0, 0x8db0, 0x8eb0, 0x8fb0, 0x90b0, 0xa4c6, 0x91b0, 0x92b0, 0xe5d6, 0xe4f1, 0x93b0, 0xe5f1, 0x94b0, 0x95b0, 0x96b0, 0x97b0, 0x98b0, 0x99b0, 0x9ab0, 0x9bb0, 0x9cb0, 0x9db0, 0xf3c3, 0x9eb0, 0x9fb0, 0xdbd3, 0xa0b0, 0x40b1, 0xd1d6, 0xe8c5, 0x41b1, 0xafd3, 0x42b1, 0xe6d2, 0x43b1, 0x44b1, 0xc1ee, 0xbbb0, 0xb5d5, 0xced1, 0xe0bc, 0xd0ba, 0x45b1, 0xf8bf, 0x46b1, 0xc7b8, 0xc1b5, 0xccc5, 0x47b1, 0x48b1, 0xa2ca, 0x49b1, 0x4ab1, 0x4bb1, 0xcbc3, 0x4cb1, 0x4db1, 0x4eb1, 0x4fb1, 0x50b1, 0xc2ee, 0x51b1, 0x52b1, 0x53b1, 0x54b1, 0x55b1, 0x56b1, 0x57b1, 0x58b1, 0xbfc4, 0xa2b6, 0x59b1, 0xeced, 0xa4c3, 0x5ab1, 0xb1d6, 0x5bb1, 0x5cb1, 0x5db1, 0xe0cf, 0xefed, 0x5eb1, 0x5fb1, 0xcec5, 0x60b1, 0xdcb6, 0x61b1, 0x62b1, 0xa1ca, 0x63b1, 0x64b1, 0xeded, 0x65b1, 0x66b1, 0xf0ed, 0xf1ed, 0xbcc3, 0x67b1, 0xb4bf, 0x68b1, 0xeeed, 0x69b1, 0x6ab1, 0x6bb1, 0x6cb1, 0x6db1, 0x6eb1, 0x6fb1, 0x70b1, 0x71b1, 0x72b1, 0x73b1, 0xf4ed, 0xf2ed, 0x74b1, 0x75b1, 0x76b1, 0x77b1, 0xe6d5, 0xdfc3, 0x78b1, 0xf3ed, 0x79b1, 0x7ab1, 0x7bb1, 0xf6ed, 0x7cb1, 0xa3d5, 0xa3d1, 0x7db1, 0x7eb1, 0x80b1, 0xf5ed, 0x81b1, 0xd0c3, 0x82b1, 0x83b1, 0x84b1, 0x85b1, 0x86b1, 0xf7ed, 0xf4bf, 0xecbe, 0xf8ed, 0x87b1, 0xf7cc, 0x88b1, 0xdbd1, 0x89b1, 0x8ab1, 0x8bb1, 0xc5d7, 0xf6d5, 0x8cb1, 0xfced, 0x8db1, 0x8eb1, 0x8fb1, 0xfbed, 0x90b1, 0x91b1, 0x92b1, 0x93b1, 0x94b1, 0x95b1, 0x96b1, 0x97b1, 0xf9ed, 0xfaed, 0x98b1, 0x99b1, 0x9ab1, 0x9bb1, 0x9cb1, 0x9db1, 0x9eb1, 0x9fb1, 0xfded, 0xa6be, 0xa0b1, 0x40b2, 0x41b2, 0x42b2, 0x43b2, 0xafcb, 0xa1ee, 0xbdb6, 0x44b2, 0xa2ee, 0xc0c4, 0x45b2, 0xfeed, 0x46b2, 0x47b2, 0xdebd, 0xc7b2, 0x48b2, 0x49b2, 0x4ab2, 0x4bb2, 0x4cb2, 0x4db2, 0x4eb2, 0x4fb2, 0x50b2, 0x51b2, 0x52b2, 0x53b2, 0xc3b6, 0x54b2, 0x55b2, 0x56b2, 0xa5ee, 0xbad8, 0xa3ee, 0xa6ee, 0x57b2, 0x58b2, 0x59b2, 0xe9c3, 0xf2b3, 0x5ab2, 0x5bb2, 0x5cb2, 0x5db2, 0x5eb2, 0x5fb2, 0xa7ee, 0xa4ee, 0xb9cf, 0x60b2, 0x61b2, 0xa8ee, 0xf7c2, 0x62b2, 0x63b2, 0x64b2, 0x65b2, 0x66b2, 0x67b2, 0x68b2, 0x69b2, 0x6ab2, 0x6bb2, 0x6cb2, 0x6db2, 0xa9ee, 0xaaee, 0x6eb2, 0xabde, 0x6fb2, 0x70b2, 0xb3c6, 0x71b2, 0xc6c7, 0x72b2, 0xf5d6, 0xc9b5, 0x73b2, 0xb2cb, 0x74b2, 0x75b2, 0x76b2, 0xabee, 0x77b2, 0x78b2, 0xabcd, 0x79b2, 0xacee, 0x7ab2, 0x7bb2, 0x7cb2, 0x7db2, 0x7eb2, 0xb0d5, 0x80b2, 0xadee, 0x81b2, 0xc4f6, 0x82b2, 0x83b2, 0x84b2, 0x85b2, 0x86b2, 0x87b2, 0x88b2, 0x89b2, 0x8ab2, 0x8bb2, 0x8cb2, 0x8db2, 0x8eb2, 0xc7db, 0x8fb2, 0x90b2, 0x91b2, 0x92b2, 0x93b2, 0x94b2, 0x95b2, 0x96b2, 0x97b2, 0xa3b4, 0x98b2, 0x99b2, 0x9ab2, 0xacc3, 0xe6f1, 0x9bb2, 0x9cb2, 0x9db2, 0x9eb2, 0x9fb2, 0xb8ca, 0xd3d2, 0xa0b2, 0xaad6, 0x40b3, 0xf2ef, 0x41b3, 0xd8be, 0x42b3, 0xc3bd, 0xf3ef, 0xccb6, 0xabb0, 0x43b3, 0x44b3, 0x45b3, 0x46b3, 0xafca, 0x47b3, 0x48b3, 0xb6ed, 0x49b3, 0xb7ed, 0x4ab3, 0x4bb3, 0x4cb3, 0x4db3, 0xf9ce, 0xafb7, 0xf3bf, 0xb8ed, 0xebc2, 0xb0c9, 0x4eb3, 0x4fb3, 0x50b3, 0x51b3, 0x52b3, 0x53b3, 0xb9ed, 0x54b3, 0x55b3, 0xf6c6, 0xb3bf, 0x56b3, 0x57b3, 0x58b3, 0xbced, 0xf8c5, 0x59b3, 0xd0d1, 0x5ab3, 0xa9d7, 0xbaed, 0xbbed, 0x5bb3, 0xe2d1, 0x5cb3, 0xbfed, 0xc0ed, 0x5db3, 0xc4ed, 0x5eb3, 0x5fb3, 0x60b3, 0xc8ed, 0x61b3, 0xc6ed, 0xceed, 0xe8d5, 0x62b3, 0xc9ed, 0x63b3, 0x64b3, 0xc7ed, 0xbeed, 0x65b3, 0x66b3, 0xe9c5, 0x67b3, 0x68b3, 0x69b3, 0xc6c6, 0x6ab3, 0x6bb3, 0xe9c9, 0xd2d4, 0xc1ed, 0xc2ed, 0xc3ed, 0xc5ed, 0x6cb3, 0xf9c0, 0x6db3, 0xa1b4, 0x6eb3, 0x6fb3, 0x70b3, 0x71b3, 0xe8b9, 0x72b3, 0xd0ed, 0x73b3, 0x74b3, 0x75b3, 0x76b3, 0xd1ed, 0x77b3, 0xcaed, 0x78b3, 0xcfed, 0x79b3, 0xf8ce, 0x7ab3, 0x7bb3, 0xb6cb, 0xcced, 0xcded, 0x7cb3, 0x7db3, 0x7eb3, 0x80b3, 0x81b3, 0xf5cf, 0x82b3, 0x83b3, 0x84b3, 0x85b3, 0x86b3, 0x87b3, 0x88b3, 0x89b3, 0x8ab3, 0x8bb3, 0x8cb3, 0x8db3, 0xd2ed, 0xf2c1, 0xb2d3, 0xcbed, 0xb7c8, 0x8eb3, 0x8fb3, 0x90b3, 0x91b3, 0x92b3, 0x93b3, 0x94b3, 0x95b3, 0xefbc, 0x96b3, 0x97b3, 0x98b3, 0x99b3, 0xf0c5, 0x9ab3, 0x9bb3, 0x9cb3, 0x9db3, 0x9eb3, 0x9fb3, 0xa0b3, 0x40b4, 0x41b4, 0x42b4, 0xd6ed, 0x43b4, 0xefb5, 0x44b4, 0x45b4, 0xb5c2, 0xadb0, 0xe9cb, 0x46b4, 0x47b4, 0xaeb1, 0x48b4, 0xd4ed, 0x49b4, 0x4ab4, 0x4bb4, 0xebcd, 0xe2b5, 0x4cb4, 0xd5ed, 0xd3ed, 0xd7ed, 0x4db4, 0x4eb4, 0xfab5, 0x4fb4, 0xd8ed, 0x50b4, 0xd9ed, 0x51b4, 0xdced, 0x52b4, 0xccb1, 0x53b4, 0x54b4, 0x55b4, 0x56b4, 0x57b4, 0x58b4, 0x59b4, 0x5ab4, 0xf6c5, 0xeebc, 0xdaed, 0xbccc, 0xeab2, 0x5bb4, 0x5cb4, 0x5db4, 0x5eb4, 0xdbed, 0x5fb4, 0x60b4, 0x61b4, 0x62b4, 0xebc4, 0x63b4, 0x64b4, 0xc5b4, 0x65b4, 0x66b4, 0x67b4, 0xf5b0, 0x68b4, 0x69b4, 0x6ab4, 0xdfed, 0xdac0, 0xe8b4, 0x6bb4, 0x6cb4, 0x6db4, 0x6eb4, 0xcdc5, 0x6fb4, 0x70b4, 0x71b4, 0xdded, 0xc4bf, 0x72b4, 0x73b4, 0x74b4, 0xdeed, 0x75b4, 0x76b4, 0x77b4, 0x78b4, 0x79b4, 0x7ab4, 0x7bb4, 0x7cb4, 0x7db4, 0x7eb4, 0x80b4, 0x81b4, 0x82b4, 0x83b4, 0xa5c4, 0x84b4, 0x85b4, 0x86b4, 0xe0ed, 0x87b4, 0x88b4, 0x89b4, 0x8ab4, 0x8bb4, 0xe1ed, 0x8cb4, 0xe3ed, 0x8db4, 0x8eb4, 0xd7c1, 0x8fb4, 0x90b4, 0xc7bb, 0x91b4, 0x92b4, 0x93b4, 0x94b4, 0x95b4, 0x96b4, 0xb8bd, 0x97b4, 0x98b4, 0x99b4, 0xe2ed, 0x9ab4, 0x9bb4, 0x9cb4, 0x9db4, 0x9eb4, 0x9fb4, 0xa0b4, 0x40b5, 0x41b5, 0x42b5, 0x43b5, 0x44b5, 0x45b5, 0xe4ed, 0x46b5, 0x47b5, 0x48b5, 0x49b5, 0x4ab5, 0x4bb5, 0x4cb5, 0x4db5, 0x4eb5, 0x4fb5, 0xe6ed, 0x50b5, 0x51b5, 0x52b5, 0x53b5, 0x54b5, 0xe5ed, 0x55b5, 0x56b5, 0x57b5, 0x58b5, 0x59b5, 0x5ab5, 0x5bb5, 0x5cb5, 0x5db5, 0x5eb5, 0x5fb5, 0x60b5, 0x61b5, 0x62b5, 0x63b5, 0xe7ed, 0x64b5, 0x65b5, 0x66b5, 0x67b5, 0x68b5, 0xbeca, 0xeaec, 0xf1c0, 0x69b5, 0xe7c9, 0x6ab5, 0xebec, 0xeec6, 0x6bb5, 0x6cb5, 0x6db5, 0x6eb5, 0xecec, 0x6fb5, 0xedc6, 0xedec, 0x70b5, 0x71b5, 0x72b5, 0x73b5, 0x74b5, 0x75b5, 0x76b5, 0x77b5, 0x78b5, 0xf0ec, 0x79b5, 0x7ab5, 0xe6d7, 0xf3ec, 0x7bb5, 0x7cb5, 0xf1ec, 0xeeec, 0xefec, 0xa3d7, 0xf1c9, 0xeecb, 0xf4ec, 0x7db5, 0xf2ec, 0x7eb5, 0x80b5, 0xe9cf, 0x81b5, 0xf6ec, 0xb1c6, 0x82b5, 0x83b5, 0x84b5, 0x85b5, 0xc0bc, 0x86b5, 0xf5ec, 0x87b5, 0x88b5, 0x89b5, 0x8ab5, 0x8bb5, 0x8cb5, 0x8db5, 0xbbb5, 0xf6bb, 0x8eb5, 0xf7ec, 0x8fb5, 0x90b5, 0x91b5, 0x92b5, 0x93b5, 0xf7d9, 0xfbbd, 0x94b5, 0x95b5, 0xbbc2, 0xf8ec, 0x96b5, 0x97b5, 0x98b5, 0x99b5, 0xf9ec, 0x9ab5, 0x9bb5, 0x9cb5, 0x9db5, 0xa3b8, 0x9eb5, 0x9fb5, 0xa0b5, 0x40b6, 0x41b6, 0x42b6, 0x43b6, 0x44b6, 0x45b6, 0x46b6, 0xfaec, 0x47b6, 0x48b6, 0x49b6, 0x4ab6, 0x4bb6, 0x4cb6, 0x4db6, 0x4eb6, 0x4fb6, 0x50b6, 0x51b6, 0x52b6, 0xfbec, 0x53b6, 0x54b6, 0x55b6, 0x56b6, 0x57b6, 0x58b6, 0x59b6, 0x5ab6, 0x5bb6, 0x5cb6, 0x5db6, 0xfcec, 0x5eb6, 0x5fb6, 0x60b6, 0x61b6, 0x62b6, 0xedd3, 0xaed8, 0xebc0, 0x63b6, 0xddc7, 0xccba, 0x64b6, 0xe3d0, 0xbdcb, 0x65b6, 0xbacd, 0x66b6, 0x67b6, 0xd1b8, 0x68b6, 0x69b6, 0xfcb1, 0x6ab6, 0xefc7, 0x6bb6, 0xd6d6, 0x6cb6, 0x6db6, 0x6eb6, 0xc6bf, 0xebc3, 0x6fb6, 0x70b6, 0xf5ef, 0x71b6, 0x72b6, 0xd8c3, 0x73b6, 0x74b6, 0x75b6, 0x76b6, 0x77b6, 0x78b6, 0xe2d7, 0x79b6, 0x7ab6, 0x7bb6, 0xf7ef, 0xd3b3, 0x7cb6, 0xd8c7, 0xedd1, 0x7db6, 0xc8d6, 0x7eb6, 0xf8ef, 0x80b6, 0xf6ef, 0x81b6, 0xfdbb, 0xc6b3, 0x82b6, 0x83b6, 0x84b6, 0x85b6, 0x86b6, 0x87b6, 0x88b6, 0xd5bd, 0x89b6, 0x8ab6, 0xc6d2, 0x8bb6, 0xe0bb, 0x8cb6, 0x8db6, 0xa1cf, 0x8eb6, 0xfcef, 0xfbef, 0x8fb6, 0x90b6, 0xf9ef, 0x91b6, 0x92b6, 0x93b6, 0x94b6, 0xccb3, 0x95b6, 0xd4c9, 0xb0cb, 0x96b6, 0x97b6, 0x98b6, 0x99b6, 0x9ab6, 0xfeef, 0x9bb6, 0x9cb6, 0xdeb0, 0x9db6, 0x9eb6, 0xc9d6, 0x9fb6, 0xa0b6, 0x40b7, 0xfdef, 0x41b7, 0xedb3, 0x42b7, 0x43b7, 0xd5f6, 0x44b7, 0x45b7, 0x46b7, 0x47b7, 0x48b7, 0x49b7, 0x4ab7, 0x4bb7, 0x4cb7, 0x4db7, 0x4eb7, 0x4fb7, 0x50b7, 0x51b7, 0x52b7, 0xc8ce, 0x53b7, 0x54b7, 0x55b7, 0xa2f0, 0x56b7, 0xa1f0, 0x57b7, 0xbeb5, 0xdabc, 0xfcbb, 0x58b7, 0xe5b8, 0x59b7, 0x5ab7, 0x5bb7, 0x5cb7, 0x5db7, 0x5eb7, 0xc2c4, 0x5fb7, 0x60b7, 0x61b7, 0x62b7, 0x63b7, 0x64b7, 0x65b7, 0x66b7, 0x67b7, 0x68b7, 0xa3f0, 0x69b7, 0x6ab7, 0x6bb7, 0x6cb7, 0x6db7, 0xebcb, 0x6eb7, 0x6fb7, 0x70b7, 0x71b7, 0x72b7, 0x73b7, 0x74b7, 0x75b7, 0x76b7, 0x77b7, 0x78b7, 0x79b7, 0x7ab7, 0x7bb7, 0x7cb7, 0x7db7, 0x7eb7, 0x80b7, 0x81b7, 0x82b7, 0x83b7, 0x84b7, 0x85b7, 0x86b7, 0xa6f0, 0x87b7, 0x88b7, 0x89b7, 0xa8d1, 0x8ab7, 0xbfbe, 0xeec7, 0xb6f1, 0xb7f1, 0xd5bf, 0x8bb7, 0x8cb7, 0x8db7, 0x8eb7, 0xa9b4, 0xb8f1, 0xbbcd, 0x8fb7, 0xd4c7, 0xadd5, 0x90b7, 0xb9f1, 0x91b7, 0xbaf1, 0x92b7, 0x93b7, 0x94b7, 0x95b7, 0xcfc7, 0x96b7, 0x97b7, 0x98b7, 0xa4d2, 0xcfd6, 0x99b7, 0x9ab7, 0xbbf1, 0xd1bd, 0xb0b4, 0xbdbe, 0x9bb7, 0x9cb7, 0x9db7, 0xdcb4, 0xd1ce, 0x9eb7, 0xdfbf, 0xbdf1, 0x9fb7, 0xa0b7, 0x40b8, 0x41b8, 0xfabf, 0xbcf1, 0x42b8, 0xbff1, 0x43b8, 0x44b8, 0x45b8, 0xbef1, 0xc0f1, 0x46b8, 0x47b8, 0x48b8, 0x49b8, 0x4ab8, 0xc1f1, 0x4bb8, 0x4cb8, 0x4db8, 0x4eb8, 0x4fb8, 0x50b8, 0x51b8, 0x52b8, 0x53b8, 0x54b8, 0x55b8, 0xfec1, 0x56b8, 0x57b8, 0x58b8, 0x59b8, 0x5ab8, 0x5bb8, 0x5cb8, 0x5db8, 0x5eb8, 0x5fb8, 0x60b8, 0xa2c1, 0x61b8, 0x62b8, 0x63b8, 0x64b8, 0x65b8, 0x66b8, 0x67b8, 0x68b8, 0x69b8, 0x6ab8, 0xfaca, 0x6bb8, 0x6cb8, 0xbed5, 0x6db8, 0x6eb8, 0x6fb8, 0x70b8, 0xbabe, 0xb9be, 0xc2d5, 0x71b8, 0x72b8, 0xa2bf, 0x73b8, 0xafcd, 0xb5f1, 0x74b8, 0x75b8, 0x76b8, 0x77b8, 0x78b8, 0x79b8, 0xdfbd, 0x7ab8, 0xcbb6, 0x7bb8, 0x7cb8, 0x7db8, 0x7eb8, 0x80b8, 0x81b8, 0x82b8, 0x83b8, 0x84b8, 0xf1d6, 0xc3f3, 0x85b8, 0x86b8, 0xc4f3, 0x87b8, 0xcdb8, 0x88b8, 0x89b8, 0x8ab8, 0xc6f3, 0xc7f3, 0x8bb8, 0xcab0, 0x8cb8, 0xc5f3, 0x8db8, 0xc9f3, 0xf1cb, 0x8eb8, 0x8fb8, 0x90b8, 0xcbf3, 0x91b8, 0xa6d0, 0x92b8, 0x93b8, 0xcab1, 0xc8f3, 0x94b8, 0x95b8, 0x96b8, 0xcff3, 0x97b8, 0xd1b5, 0x98b8, 0x99b8, 0xd7f3, 0x9ab8, 0xd2f3, 0x9bb8, 0x9cb8, 0x9db8, 0xd4f3, 0xd3f3, 0xfbb7, 0x9eb8, 0xbfb1, 0x9fb8, 0xcef3, 0xcaf3, 0xdab5, 0xa0b8, 0xd0f3, 0x40b9, 0x41b9, 0xd1f3, 0x42b9, 0xd5f3, 0x43b9, 0x44b9, 0x45b9, 0x46b9, 0xcdf3, 0x47b9, 0xe3bc, 0x48b9, 0xfdc1, 0x49b9, 0xd6f3, 0x4ab9, 0x4bb9, 0x4cb9, 0x4db9, 0x4eb9, 0x4fb9, 0xdaf3, 0x50b9, 0xccf3, 0x51b9, 0xc8b5, 0x52b9, 0xeebd, 0xdcf3, 0x53b9, 0x54b9, 0xa4b7, 0xf0bf, 0xfed6, 0xb2cd, 0x55b9, 0xf0b4, 0x56b9, 0xdfb2, 0x57b9, 0xd8f3, 0x58b9, 0xd9f3, 0xb8c9, 0x59b9, 0xddf3, 0x5ab9, 0x5bb9, 0xdef3, 0x5cb9, 0xe1f3, 0x5db9, 0x5eb9, 0x5fb9, 0x60b9, 0x61b9, 0x62b9, 0x63b9, 0x64b9, 0x65b9, 0x66b9, 0x67b9, 0xdff3, 0x68b9, 0x69b9, 0xe3f3, 0xe2f3, 0x6ab9, 0x6bb9, 0xdbf3, 0x6cb9, 0xeabf, 0x6db9, 0xefb3, 0x6eb9, 0xe0f3, 0x6fb9, 0x70b9, 0xa9c7, 0x71b9, 0xf2bc, 0x72b9, 0x73b9, 0x74b9, 0x75b9, 0xebf3, 0x76b9, 0x77b9, 0x78b9, 0x79b9, 0x7ab9, 0x7bb9, 0x7cb9, 0xbfb9, 0x7db9, 0x7eb9, 0xe4f3, 0x80b9, 0x81b9, 0x82b9, 0xadb2, 0xfebb, 0x83b9, 0xe3cb, 0x84b9, 0x85b9, 0x86b9, 0x87b9, 0xedf3, 0xe9f3, 0x88b9, 0x89b9, 0x8ab9, 0xdcb9, 0xeef3, 0x8bb9, 0x8cb9, 0x8db9, 0xe5f3, 0xe6f3, 0xeaf3, 0xe1c2, 0xecf3, 0xeff3, 0xe8f3, 0xfdbc, 0x8eb9, 0x8fb9, 0x90b9, 0xe4cf, 0x91b9, 0x92b9, 0xf0f3, 0x93b9, 0x94b9, 0x95b9, 0xe7f3, 0x96b9, 0x97b9, 0x98b9, 0x99b9, 0x9ab9, 0x9bb9, 0x9cb9, 0x9db9, 0xf2f3, 0x9eb9, 0x9fb9, 0xa0b9, 0x40ba, 0xadd7, 0xaac6, 0x41ba, 0x42ba, 0x43ba, 0x44ba, 0xf3f3, 0x45ba, 0x46ba, 0x47ba, 0x48ba, 0xf1f3, 0x49ba, 0xa8c2, 0x4aba, 0x4bba, 0x4cba, 0x4dba, 0x4eba, 0xddb8, 0xf5f3, 0x4fba, 0x50ba, 0xf4f3, 0x51ba, 0x52ba, 0x53ba, 0xdbb4, 0x54ba, 0x55ba, 0x56ba, 0xf6f3, 0xf7f3, 0x57ba, 0x58ba, 0x59ba, 0xf8f3, 0x5aba, 0x5bba, 0x5cba, 0xbac0, 0x5dba, 0x5eba, 0xe9c0, 0x5fba, 0x60ba, 0x61ba, 0x62ba, 0x63ba, 0xf1c5, 0x64ba, 0x65ba, 0x66ba, 0x67ba, 0xfbf3, 0x68ba, 0xfaf3, 0x69ba, 0x6aba, 0x6bba, 0x6cba, 0x6dba, 0x6eba, 0x6fba, 0x70ba, 0xd8b4, 0x71ba, 0x72ba, 0x73ba, 0xfef3, 0xf9f3, 0x74ba, 0x75ba, 0xfcf3, 0x76ba, 0x77ba, 0x78ba, 0x79ba, 0x7aba, 0x7bba, 0xfdf3, 0x7cba, 0x7dba, 0x7eba, 0x80ba, 0x81ba, 0x82ba, 0x83ba, 0x84ba, 0xa1f4, 0x85ba, 0x86ba, 0x87ba, 0x88ba, 0x89ba, 0x8aba, 0xa3f4, 0xc9bb, 0x8bba, 0x8cba, 0xa2f4, 0x8dba, 0x8eba, 0x8fba, 0x90ba, 0x91ba, 0x92ba, 0x93ba, 0x94ba, 0x95ba, 0x96ba, 0x97ba, 0x98ba, 0x99ba, 0xa4f4, 0x9aba, 0x9bba, 0x9cba, 0x9dba, 0x9eba, 0x9fba, 0xbeb2, 0xa6f4, 0xa5f4, 0xa0ba, 0x40bb, 0x41bb, 0x42bb, 0x43bb, 0x44bb, 0x45bb, 0x46bb, 0x47bb, 0x48bb, 0x49bb, 0xaebc, 0x4abb, 0x4bbb, 0x4cbb, 0x4dbb, 0x4ebb, 0x4fbb, 0x50bb, 0x51bb, 0x52bb, 0x53bb, 0x54bb, 0x55bb, 0x56bb, 0x57bb, 0x58bb, 0x59bb, 0x5abb, 0x5bbb, 0x5cbb, 0x5dbb, 0x5ebb, 0x5fbb, 0x60bb, 0x61bb, 0x62bb, 0x63bb, 0x64bb, 0x65bb, 0x66bb, 0x67bb, 0x68bb, 0x69bb, 0x6abb, 0x6bbb, 0x6cbb, 0x6dbb, 0x6ebb, 0xd7c3, 0xe1d9, 0x6fbb, 0x70bb, 0x71bb, 0x72bb, 0x73bb, 0x74bb, 0xe0c0, 0xccf4, 0xd1d7, 0x75bb, 0x76bb, 0x77bb, 0x78bb, 0x79bb, 0x7abb, 0x7bbb, 0x7cbb, 0x7dbb, 0x7ebb, 0x80bb, 0xdbb7, 0x81bb, 0x82bb, 0x83bb, 0x84bb, 0x85bb, 0x86bb, 0x87bb, 0xcef4, 0xa3c1, 0x88bb, 0x89bb, 0xc9c6, 0x8abb, 0xd6b4, 0xb3d5, 0x8bbb, 0x8cbb, 0x8dbb, 0xd0f4, 0xcff4, 0xd1f4, 0xdacb, 0x8ebb, 0x8fbb, 0xd2f4, 0x90bb, 0xc1d4, 0xe0d6, 0x91bb, 0x92bb, 0x93bb, 0x94bb, 0xe0b7, 0x95bb, 0x96bb, 0x97bb, 0xb8c1, 0x98bb, 0x99bb, 0xbbc1, 0xd3f4, 0xacbe, 0x9abb, 0x9bbb, 0x9cbb, 0x9dbb, 0x9ebb, 0xe2b4, 0x9fbb, 0xa0bb, 0xd4f4, 0xd5f4, 0xabbe, 0x40bc, 0x41bc, 0xd6f4, 0x42bc, 0x43bc, 0x44bc, 0xdbf4, 0x45bc, 0xd7f4, 0xdaf4, 0x46bc, 0xfdba, 0x47bc, 0xd8f4, 0xd9f4, 0x48bc, 0x49bc, 0x4abc, 0x4bbc, 0x4cbc, 0x4dbc, 0x4ebc, 0xe2b8, 0xc7cc, 0xdcf4, 0x4fbc, 0xdab2, 0x50bc, 0x51bc, 0xd3c3, 0x52bc, 0x53bc, 0xe3d4, 0xb7bf, 0x54bc, 0x55bc, 0x56bc, 0x57bc, 0x58bc, 0x59bc, 0x5abc, 0xddf4, 0x5bbc, 0x5cbc, 0x5dbc, 0x5ebc, 0x5fbc, 0x60bc, 0xb4c5, 0x61bc, 0x62bc, 0x63bc, 0x64bc, 0x65bc, 0x66bc, 0x67bc, 0x68bc, 0xe9f4, 0x69bc, 0x6abc, 0xb5cf, 0x6bbc, 0x6cbc, 0x6dbc, 0x6ebc, 0x6fbc, 0x70bc, 0x71bc, 0x72bc, 0x73bc, 0x74bc, 0x75bc, 0x76bc, 0x77bc, 0x78bc, 0xc9ce, 0x79bc, 0x7abc, 0x7bbc, 0x7cbc, 0x7dbc, 0x7ebc, 0x80bc, 0x81bc, 0x82bc, 0x83bc, 0x84bc, 0x85bc, 0x86bc, 0x87bc, 0x88bc, 0x89bc, 0x8abc, 0x8bbc, 0x8cbc, 0x8dbc, 0x8ebc, 0xd8cb, 0x8fbc, 0xf7cb, 0x90bc, 0x91bc, 0x92bc, 0x93bc, 0xf4bd, 0x94bc, 0x95bc, 0x96bc, 0xcfd7, 0x97bc, 0x98bc, 0x99bc, 0xdbc0, 0x9abc, 0x9bbc, 0x9cbc, 0x9dbc, 0x9ebc, 0x9fbc, 0xa0bc, 0x40bd, 0x41bd, 0x42bd, 0x43bd, 0x44bd, 0x45bd, 0x46bd, 0x47bd, 0x48bd, 0x49bd, 0x4abd, 0x4bbd, 0x4cbd, 0x4dbd, 0x4ebd, 0x4fbd, 0x50bd, 0x51bd, 0x52bd, 0x53bd, 0x54bd, 0x55bd, 0x56bd, 0x57bd, 0x58bd, 0x59bd, 0x5abd, 0x5bbd, 0x5cbd, 0x5dbd, 0x5ebd, 0x5fbd, 0x60bd, 0x61bd, 0x62bd, 0x63bd, 0x64bd, 0x65bd, 0x66bd, 0x67bd, 0x68bd, 0x69bd, 0x6abd, 0x6bbd, 0x6cbd, 0x6dbd, 0x6ebd, 0x6fbd, 0x70bd, 0x71bd, 0x72bd, 0x73bd, 0x74bd, 0x75bd, 0x76bd, 0xf5d0, 0x77bd, 0x78bd, 0x79bd, 0x7abd, 0x7bbd, 0x7cbd, 0x7dbd, 0x7ebd, 0xeaf4, 0x80bd, 0x81bd, 0x82bd, 0x83bd, 0x84bd, 0x85bd, 0x86bd, 0x87bd, 0x88bd, 0x89bd, 0x8abd, 0x8bbd, 0x8cbd, 0x8dbd, 0x8ebd, 0x8fbd, 0x90bd, 0x91bd, 0x92bd, 0x93bd, 0x94bd, 0x95bd, 0x96bd, 0x97bd, 0x98bd, 0x99bd, 0x9abd, 0x9bbd, 0x9cbd, 0x9dbd, 0x9ebd, 0x9fbd, 0xa0bd, 0x40be, 0x41be, 0x42be, 0x43be, 0x44be, 0x45be, 0x46be, 0x47be, 0x48be, 0x49be, 0x4abe, 0x4bbe, 0x4cbe, 0xebf4, 0x4dbe, 0x4ebe, 0x4fbe, 0x50be, 0x51be, 0x52be, 0x53be, 0xecf4, 0x54be, 0x55be, 0x56be, 0x57be, 0x58be, 0x59be, 0x5abe, 0x5bbe, 0x5cbe, 0x5dbe, 0x5ebe, 0x5fbe, 0x60be, 0x61be, 0x62be, 0x63be, 0x64be, 0x65be, 0x66be, 0x67be, 0x68be, 0x69be, 0x6abe, 0x6bbe, 0x6cbe, 0x6dbe, 0x6ebe, 0x6fbe, 0x70be, 0x71be, 0x72be, 0x73be, 0x74be, 0x75be, 0x76be, 0x77be, 0x78be, 0x79be, 0x7abe, 0x7bbe, 0x7cbe, 0x7dbe, 0x7ebe, 0x80be, 0x81be, 0x82be, 0x83be, 0x84be, 0x85be, 0x86be, 0x87be, 0x88be, 0x89be, 0x8abe, 0x8bbe, 0x8cbe, 0x8dbe, 0x8ebe, 0x8fbe, 0x90be, 0x91be, 0x92be, 0x93be, 0x94be, 0x95be, 0x96be, 0x97be, 0x98be, 0x99be, 0x9abe, 0x9bbe, 0x9cbe, 0x9dbe, 0x9ebe, 0x9fbe, 0xa0be, 0x40bf, 0x41bf, 0x42bf, 0x43bf, 0x44bf, 0x45bf, 0x46bf, 0x47bf, 0x48bf, 0x49bf, 0x4abf, 0x4bbf, 0x4cbf, 0x4dbf, 0x4ebf, 0x4fbf, 0x50bf, 0x51bf, 0x52bf, 0x53bf, 0x54bf, 0x55bf, 0x56bf, 0x57bf, 0x58bf, 0x59bf, 0x5abf, 0x5bbf, 0x5cbf, 0x5dbf, 0x5ebf, 0x5fbf, 0x60bf, 0x61bf, 0x62bf, 0x63bf, 0x64bf, 0x65bf, 0x66bf, 0x67bf, 0x68bf, 0x69bf, 0x6abf, 0x6bbf, 0x6cbf, 0x6dbf, 0x6ebf, 0x6fbf, 0x70bf, 0x71bf, 0x72bf, 0x73bf, 0x74bf, 0x75bf, 0x76bf, 0x77bf, 0x78bf, 0x79bf, 0x7abf, 0x7bbf, 0x7cbf, 0x7dbf, 0x7ebf, 0x80bf, 0xe3f7, 0x81bf, 0x82bf, 0x83bf, 0x84bf, 0x85bf, 0xb1b7, 0x86bf, 0x87bf, 0x88bf, 0x89bf, 0x8abf, 0xedf4, 0x8bbf, 0x8cbf, 0x8dbf, 0x8ebf, 0x8fbf, 0x90bf, 0x91bf, 0x92bf, 0x93bf, 0x94bf, 0x95bf, 0x96bf, 0x97bf, 0x98bf, 0x99bf, 0x9abf, 0x9bbf, 0x9cbf, 0x9dbf, 0x9ebf, 0x9fbf, 0xa0bf, 0x40c0, 0x41c0, 0x42c0, 0x43c0, 0x44c0, 0x45c0, 0x46c0, 0x47c0, 0x48c0, 0x49c0, 0x4ac0, 0x4bc0, 0x4cc0, 0x4dc0, 0x4ec0, 0x4fc0, 0x50c0, 0x51c0, 0x52c0, 0x53c0, 0x54c0, 0x55c0, 0x56c0, 0x57c0, 0x58c0, 0x59c0, 0x5ac0, 0x5bc0, 0x5cc0, 0x5dc0, 0x5ec0, 0x5fc0, 0x60c0, 0x61c0, 0x62c0, 0x63c0, 0xebd7, 0x64c0, 0x65c0, 0x66c0, 0x67c0, 0x68c0, 0x69c0, 0x6ac0, 0x6bc0, 0x6cc0, 0x6dc0, 0x6ec0, 0x6fc0, 0x70c0, 0x71c0, 0x72c0, 0x73c0, 0x74c0, 0x75c0, 0x76c0, 0x77c0, 0x78c0, 0x79c0, 0x7ac0, 0x7bc0, 0xeef4, 0x7cc0, 0x7dc0, 0x7ec0, 0xf9e6, 0xc0be, 0xfae6, 0xecba, 0xfbe6, 0xcbcf, 0xfce6, 0xbcd4, 0xb6bc, 0xfde6, 0xfee6, 0xcdbc, 0xd2c8, 0xb3ce, 0xa1e7, 0x80c0, 0xbfb4, 0xa2e7, 0xb4c9, 0xd9b8, 0xc9c4, 0x81c0, 0xddd7, 0xdac2, 0xd7b7, 0xbdd6, 0xc6ce, 0xc4b7, 0x82c0, 0x83c0, 0xa6c5, 0xa3e7, 0xdfcf, 0xa4e7, 0xa5e7, 0xa6e7, 0xb7c1, 0xe9d7, 0xf0c9, 0xb8cf, 0xafd6, 0xd5d6, 0xa7e7, 0xedb0, 0xa8e7, 0xa9e7, 0xdcc9, 0xefd2, 0xadbe, 0xaae7, 0xf3b0, 0xdec8, 0xe1bd, 0xabe7, 0xc6c8, 0x84c0, 0xace7, 0xe6bb, 0xf8b8, 0xa4d1, 0xade7, 0xe7c2, 0xf8be, 0xcabd, 0xb3cd, 0xaee7, 0xafe7, 0xeebe, 0xe5d0, 0x85c0, 0xe7cb, 0xd0cc, 0xccbc, 0xb0e7, 0xa8bc, 0xf7d0, 0xb1e7, 0x86c0, 0xf8d0, 0xb2e7, 0xb3e7, 0xc2b4, 0xb4e7, 0xb5e7, 0xfec9, 0xacce, 0xe0c3, 0xb7e7, 0xc1b1, 0xf1b3, 0x87c0, 0xb8e7, 0xb9e7, 0xdbd7, 0xc0d5, 0xbae7, 0xccc2, 0xbad7, 0xbbe7, 0xbce7, 0xbde7, 0xeabc, 0xe5c3, 0xc2c0, 0xbee7, 0xbfe7, 0xa9bc, 0x88c0, 0xc0e7, 0xc1e7, 0xb6e7, 0xd0b6, 0xc2e7, 0x89c0, 0xc3e7, 0xc4e7, 0xbabb, 0xdeb5, 0xc6c2, 0xe0b1, 0xc5e7, 0xb5d4, 0xc6e7, 0xbfb8, 0xc8e7, 0xc7e7, 0xecb7, 0x8ac0, 0xc9e7, 0xf8b2, 0xcae7, 0xcbe7, 0xcce7, 0xcde7, 0xcee7, 0xcfe7, 0xd0e7, 0xa7d3, 0xf5cb, 0xd1e7, 0xd2e7, 0xd3e7, 0xd4e7, 0xc9c9, 0xd5e7, 0xd6e7, 0xd7e7, 0xd8e7, 0xd9e7, 0xc9bd, 0xdae7, 0xbef3, 0x8bc0, 0xd7b8, 0x8cc0, 0xb1c8, 0x8dc0, 0x8ec0, 0x8fc0, 0x90c0, 0x91c0, 0x92c0, 0x93c0, 0xbff3, 0x94c0, 0xc0f3, 0xc1f3, 0x95c0, 0x96c0, 0x97c0, 0x98c0, 0x99c0, 0x9ac0, 0x9bc0, 0x9cc0, 0x9dc0, 0x9ec0, 0xdeb9, 0xf8cd, 0x9fc0, 0xa0c0, 0xe8d8, 0xb1ba, 0x40c1, 0xdec2, 0xb7ee, 0x41c1, 0xa3b7, 0x42c1, 0x43c1, 0x44c1, 0x45c1, 0xb9ee, 0x46c1, 0xb8ee, 0xd5b0, 0x47c1, 0x48c1, 0x49c1, 0x4ac1, 0x4bc1, 0xbbee, 0xd6d5, 0xefd7, 0x4cc1, 0x4dc1, 0x4ec1, 0xc3d6, 0x4fc1, 0x50c1, 0xbdee, 0xf0ca, 0x51c1, 0xbcee, 0x52c1, 0x53c1, 0x54c1, 0x55c1, 0xbeee, 0x56c1, 0x57c1, 0x58c1, 0x59c1, 0xc0ee, 0x5ac1, 0x5bc1, 0xbfee, 0x5cc1, 0x5dc1, 0x5ec1, 0x5fc1, 0x60c1, 0x61c1, 0x62c1, 0x63c1, 0xf2d1, 0x64c1, 0xbcc7, 0x65c1, 0xc0c3, 0x66c1, 0x67c1, 0x68c1, 0x69c1, 0x6ac1, 0xe1b8, 0x6bc1, 0x6cc1, 0x6dc1, 0x6ec1, 0x6fc1, 0xe7c1, 0x70c1, 0x71c1, 0xc6f4, 0xdfd0, 0xc7f4, 0x72c1, 0xdbcf, 0x73c1, 0x74c1, 0xbac8, 0x75c1, 0x76c1, 0xc8f4, 0x77c1, 0x78c1, 0x79c1, 0x7ac1, 0x7bc1, 0x7cc1, 0x7dc1, 0xc9f4, 0xcaf4, 0x7ec1, 0xcbf4, 0x80c1, 0x81c1, 0x82c1, 0x83c1, 0x84c1, 0xfad9, 0xfeb8, 0x85c1, 0x86c1, 0xf1e5, 0xf0d3, 0x87c1, 0xe0f4, 0x88c1, 0xccce, 0x89c1, 0x8ac1, 0x8bc1, 0xe1b3, 0x8cc1, 0x8dc1, 0x8ec1, 0x8fc1, 0xb4f1, 0x90c1, 0xeed2, 0x91c1, 0xe1f4, 0x92c1, 0x93c1, 0x94c1, 0x95c1, 0x96c1, 0xe8cf, 0xe2f4, 0x97c1, 0x98c1, 0xccc7, 0x99c1, 0x9ac1, 0x9bc1, 0x9cc1, 0x9dc1, 0x9ec1, 0xd4b5, 0xe4b4, 0xe4f4, 0x9fc1, 0xa0c1, 0x40c2, 0xe3f4, 0xe5f4, 0x41c2, 0x42c2, 0xe6f4, 0x43c2, 0x44c2, 0x45c2, 0x46c2, 0xe7f4, 0x47c2, 0xb2ba, 0xbfb0, 0x48c2, 0xe8f4, 0x49c2, 0x4ac2, 0x4bc2, 0x4cc2, 0x4dc2, 0x4ec2, 0x4fc2, 0xadb7, 0xedd2, 0x50c2, 0x51c2, 0x52c2, 0xabd2, 0xcfc0, 0x53c2, 0xbcbf, 0xa3eb, 0xdfd5, 0xc8ea, 0x54c2, 0x55c2, 0x56c2, 0x57c2, 0xf3f1, 0xf8b6, 0xa3cb, 0x58c2, 0x59c2, 0xcdc4, 0x5ac2, 0xe7f1, 0x5bc2, 0xe8f1, 0xfbb8, 0xe9f1, 0xc4ba, 0xc5d4, 0xd2b0, 0x5cc2, 0x5dc2, 0xeaf1, 0x5ec2, 0x5fc2, 0x60c2, 0xebf1, 0x61c2, 0xecf1, 0x62c2, 0x63c2, 0xedf1, 0xeef1, 0xeff1, 0xf1f1, 0xf0f1, 0xd5c5, 0x64c2, 0x65c2, 0x66c2, 0x67c2, 0x68c2, 0x69c2, 0xf2f1, 0x6ac2, 0xfab6, 0x6bc2, 0xf4f1, 0xaed2, 0xc7de, 0xcacb, 0x6cc2, 0x6dc2, 0xdcb3, 0x6ec2, 0xa2b5, 0x6fc2, 0xa2b9, 0x70c2, 0x71c2, 0xf4c4, 0xf5f1, 0x72c2, 0x73c2, 0xf6f1, 0x74c2, 0x75c2, 0x76c2, 0xc4c1, 0xfbc1, 0xb0d6, 0xf7f1, 0x77c2, 0x78c2, 0x79c2, 0x7ac2, 0xf8f1, 0x7bc2, 0xaac1, 0x7cc2, 0x7dc2, 0x7ec2, 0xb8c6, 0x80c2, 0xdbbe, 0x81c2, 0x82c2, 0x83c2, 0x84c2, 0x85c2, 0x86c2, 0x87c2, 0x88c2, 0x89c2, 0x8ac2, 0x8bc2, 0x8cc2, 0x8dc2, 0x8ec2, 0xf9f1, 0xcfb4, 0x8fc2, 0x90c2, 0x91c2, 0x92c2, 0x93c2, 0x94c2, 0xfaf1, 0x95c2, 0x96c2, 0x97c2, 0x98c2, 0x99c2, 0x9ac2, 0x9bc2, 0x9cc2, 0x9dc2, 0x9ec2, 0x9fc2, 0xa0c2, 0x40c3, 0xb2ed, 0xb1ed, 0x41c3, 0x42c3, 0xe0cb, 0xded2, 0x43c3, 0xc1cb, 0xd8d5, 0x44c3, 0xe2c8, 0x45c3, 0xdfc0, 0xa1bc, 0x46c3, 0x47c3, 0x48c3, 0x49c3, 0x4ac3, 0x4bc3, 0xc1eb, 0x4cc3, 0x4dc3, 0xa4d0, 0x4ec3, 0xe2d6, 0x4fc3, 0xc7b6, 0xd8b8, 0xc0eb, 0xceb8, 0x50c3, 0xbfeb, 0xa6b3, 0xc9b9, 0xabd6, 0x51c3, 0xf4b7, 0xcab7, 0x52c3, 0x53c3, 0x54c3, 0xe7bc, 0xbeb7, 0xc6eb, 0x55c3, 0xc7eb, 0xb9b0, 0xcfbf, 0x56c3, 0xc5eb, 0xfdd3, 0x57c3, 0xc8eb, 0x58c3, 0x59c3, 0xc9eb, 0x5ac3, 0x5bc3, 0xceb7, 0x5cc3, 0xc2eb, 0xc4eb, 0xf6c9, 0xd7d6, 0xcdd5, 0xb2d0, 0xcfeb, 0xb8ce, 0xd0eb, 0x5dc3, 0xa8b5, 0x5ec3, 0x5fc3, 0x60c3, 0x61c3, 0x62c3, 0xb3b1, 0xd2eb, 0xa5cc, 0x63c3, 0x64c3, 0x65c3, 0x66c3, 0x67c3, 0x68c3, 0x69c3, 0xd6c5, 0xd3eb, 0x6ac3, 0xd1eb, 0xdfc5, 0xceeb, 0xa4ca, 0xd5eb, 0xfbb0, 0x6bc3, 0x6cc3, 0xfaba, 0x6dc3, 0x6ec3, 0xb7d8, 0xe3f1, 0x6fc3, 0xcaeb, 0xcbeb, 0xcceb, 0xcdeb, 0xd6eb, 0xc0e6, 0xd9eb, 0x70c3, 0xe8bf, 0xc8d2, 0xd7eb, 0xdceb, 0xecb8, 0xd8eb, 0x71c3, 0xbabd, 0x72c3, 0xd8d0, 0x73c3, 0xb7b0, 0x74c3, 0xddeb, 0xdcc4, 0x75c3, 0x76c3, 0x77c3, 0x78c3, 0xacd6, 0x79c3, 0x7ac3, 0x7bc3, 0xe0b4, 0x7cc3, 0x7dc3, 0xf6c2, 0xb9bc, 0x7ec3, 0x80c3, 0xdaeb, 0xdbeb, 0xe0d4, 0xeac6, 0xd4c4, 0xdfeb, 0xa7c5, 0xf5d9, 0x81c3, 0xb1b2, 0x82c3, 0xe4eb, 0x83c3, 0xc5bd, 0x84c3, 0x85c3, 0x86c3, 0xe2eb, 0x87c3, 0x88c3, 0x89c3, 0x8ac3, 0x8bc3, 0x8cc3, 0x8dc3, 0x8ec3, 0x8fc3, 0x90c3, 0x91c3, 0x92c3, 0x93c3, 0xe3eb, 0x94c3, 0x95c3, 0xacb8, 0x96c3, 0xd1cd, 0xe5eb, 0x97c3, 0x98c3, 0x99c3, 0xe1eb, 0x9ac3, 0xb3c1, 0x9bc3, 0x9cc3, 0x9dc3, 0x9ec3, 0x9fc3, 0xa2c6, 0xa0c3, 0x40c4, 0x41c4, 0x42c4, 0x43c4, 0x44c4, 0x45c4, 0xf3cc, 0x46c4, 0xe6eb, 0x47c4, 0xb0c0, 0xb8d2, 0xe7eb, 0x48c4, 0x49c4, 0x4ac4, 0xafb8, 0xadb8, 0x4bc4, 0xe8eb, 0xbbc7, 0xf3cd, 0x4cc4, 0x4dc4, 0x4ec4, 0xeaeb, 0xebeb, 0x4fc4, 0x50c4, 0x51c4, 0x52c4, 0x53c4, 0xedeb, 0x54c4, 0x55c4, 0x56c4, 0x57c4, 0xc8d0, 0x58c4, 0xf2eb, 0x59c4, 0xeeeb, 0x5ac4, 0x5bc4, 0x5cc4, 0xf1eb, 0xf9c8, 0x5dc4, 0xfcd1, 0xeceb, 0x5ec4, 0x5fc4, 0xe9eb, 0x60c4, 0x61c4, 0x62c4, 0x63c4, 0xb9b8, 0xd9cf, 0xe5c4, 0xefeb, 0xf0eb, 0xdacc, 0xc8cd, 0xf2b0, 0x64c4, 0xf6eb, 0x65c4, 0x66c4, 0x67c4, 0x68c4, 0x69c4, 0xf5eb, 0x6ac4, 0xb2b2, 0x6bc4, 0x6cc4, 0x6dc4, 0x6ec4, 0xe0b8, 0x6fc4, 0xf7eb, 0x70c4, 0x71c4, 0x72c4, 0x73c4, 0x74c4, 0x75c4, 0xecb1, 0x76c4, 0x77c4, 0xc5cc, 0xa4c4, 0xa5cf, 0x78c4, 0x79c4, 0x7ac4, 0x7bc4, 0x7cc4, 0xf9eb, 0x7dc4, 0x7ec4, 0xa2ec, 0x80c4, 0xf2c5, 0x81c4, 0xfaeb, 0x82c4, 0x83c4, 0x84c4, 0x85c4, 0x86c4, 0x87c4, 0x88c4, 0x89c4, 0xc5c9, 0x8ac4, 0x8bc4, 0x8cc4, 0x8dc4, 0x8ec4, 0x8fc4, 0xdfe2, 0xfeeb, 0x90c4, 0x91c4, 0x92c4, 0x93c4, 0xcecd, 0xa1ec, 0xdbb1, 0xb7d3, 0x94c4, 0x95c4, 0xdcd2, 0x96c4, 0x97c4, 0x98c4, 0xfdeb, 0x99c4, 0xfbeb, 0x9ac4, 0x9bc4, 0x9cc4, 0x9dc4, 0x9ec4, 0x9fc4, 0xa0c4, 0x40c5, 0x41c5, 0x42c5, 0x43c5, 0x44c5, 0x45c5, 0x46c5, 0x47c5, 0x48c5, 0x49c5, 0x4ac5, 0x4bc5, 0x4cc5, 0x4dc5, 0x4ec5, 0xbcb3, 0x4fc5, 0x50c5, 0x51c5, 0xb0ea, 0x52c5, 0x53c5, 0xd4d7, 0x54c5, 0xabf4, 0xf4b3, 0x55c5, 0x56c5, 0x57c5, 0x58c5, 0x59c5, 0xc1d6, 0xc2d6, 0x5ac5, 0x5bc5, 0x5cc5, 0x5dc5, 0x5ec5, 0x5fc5, 0xe9d5, 0xcabe, 0x60c5, 0xa7f4, 0x61c5, 0xa8d2, 0xa8f4, 0xa9f4, 0x62c5, 0xaaf4, 0xcbbe, 0xdfd3, 0x63c5, 0x64c5, 0x65c5, 0x66c5, 0x67c5, 0xe0c9, 0xe1c9, 0x68c5, 0x69c5, 0xc2f3, 0x6ac5, 0xe6ca, 0x6bc5, 0xf2cc, 0x6cc5, 0x6dc5, 0x6ec5, 0x6fc5, 0x70c5, 0x71c5, 0xb6e2, 0xb4cb, 0x72c5, 0xe8ce, 0xdbd6, 0x73c5, 0xadf4, 0xaef4, 0xaff4, 0x74c5, 0x75c5, 0x76c5, 0x77c5, 0xb2f4, 0x78c5, 0xbdba, 0xb3f4, 0xe3b0, 0xb0f4, 0x79c5, 0xb1f4, 0xa2bd, 0xd5b2, 0x7ac5, 0xb6f4, 0xb7f4, 0xe6b6, 0xb0b2, 0xcfcf, 0xb4f4, 0xacb4, 0x7bc5, 0xb5f4, 0x7cc5, 0x7dc5, 0xb8f4, 0x7ec5, 0x80c5, 0x81c5, 0x82c5, 0x83c5, 0xb9f4, 0x84c5, 0x85c5, 0xa7cd, 0x86c5, 0xbaf4, 0x87c5, 0xbbf4, 0x88c5, 0x89c5, 0x8ac5, 0xbcf4, 0x8bc5, 0x8cc5, 0x8dc5, 0x8ec5, 0x8fc5, 0x90c5, 0x91c5, 0x92c5, 0xd2cb, 0x93c5, 0xbdf4, 0x94c5, 0x95c5, 0x96c5, 0x97c5, 0xbef4, 0x98c5, 0x99c5, 0x9ac5, 0x9bc5, 0x9cc5, 0x9dc5, 0x9ec5, 0x9fc5, 0xbff4, 0xa0c5, 0x40c6, 0x41c6, 0x42c6, 0x43c6, 0xdef4, 0xbcc1, 0xe8bc, 0x44c6, 0xabc9, 0xded1, 0xf5e5, 0x45c6, 0x46c6, 0x47c6, 0x48c6, 0xb3dc, 0xd5d2, 0x49c6, 0x4ac6, 0xb4dc, 0xacb0, 0xb5dc, 0x4bc6, 0x4cc6, 0xdabd, 0x4dc6, 0xb9dc, 0x4ec6, 0x4fc6, 0x50c6, 0xc2d8, 0x51c6, 0xb7dc, 0xf3d3, 0x52c6, 0xd6c9, 0xbadc, 0xb6dc, 0x53c6, 0xbbdc, 0xa2c3, 0x54c6, 0x55c6, 0x56c6, 0x57c6, 0xbcdc, 0xc5dc, 0xbddc, 0x58c6, 0x59c6, 0xdfce, 0xa5d6, 0x5ac6, 0xcfdc, 0x5bc6, 0xcddc, 0x5cc6, 0x5dc6, 0xd2dc, 0xe6bd, 0xabc2, 0x5ec6, 0xb8dc, 0xcbdc, 0xcedc, 0xbedc, 0xd2b7, 0xc5b0, 0xc7dc, 0xbed0, 0xc1dc, 0xa8bb, 0x5fc6, 0xbcb7, 0xccdc, 0x60c6, 0x61c6, 0xc6dc, 0xbfdc, 0xdbc7, 0x62c6, 0x63c6, 0x64c6, 0xbfd1, 0xc0dc, 0x65c6, 0x66c6, 0xcadc, 0x67c6, 0x68c6, 0xd0dc, 0x69c6, 0x6ac6, 0xadce, 0xc2dc, 0x6bc6, 0xc3dc, 0xc8dc, 0xc9dc, 0xd4b2, 0xd1dc, 0xd5cb, 0x6cc6, 0xb7d4, 0xdbdc, 0xdfdc, 0xa6cc, 0xe6dc, 0x6dc6, 0xe7c3, 0xdcdc, 0x6ec6, 0x6fc6, 0xc1bf, 0xd9dc, 0x70c6, 0xfab0, 0xb6b9, 0xe5dc, 0xd3dc, 0x71c6, 0xc4dc, 0xd6dc, 0xf4c8, 0xe0bf, 0x72c6, 0x73c6, 0x74c6, 0x75c6, 0xbbc9, 0x76c6, 0x77c6, 0x78c6, 0xbdb1, 0x79c6, 0xa2d3, 0x7ac6, 0x7bc6, 0xdadc, 0x7cc6, 0x7dc6, 0xd5dc, 0x7ec6, 0xbbc6, 0x80c6, 0xdedc, 0x81c6, 0x82c6, 0x83c6, 0x84c6, 0x85c6, 0xc2d7, 0xafc3, 0xb6b7, 0xd1c7, 0xa9c3, 0xe2dc, 0xd8dc, 0xebdc, 0xd4dc, 0x86c6, 0x87c6, 0xdddc, 0x88c6, 0xa5be, 0xd7dc, 0x89c6, 0xe0dc, 0x8ac6, 0x8bc6, 0xe3dc, 0xe4dc, 0x8cc6, 0xf8dc, 0x8dc6, 0x8ec6, 0xe1dc, 0xa2dd, 0xe7dc, 0x8fc6, 0x90c6, 0x91c6, 0x92c6, 0x93c6, 0x94c6, 0x95c6, 0x96c6, 0x97c6, 0x98c6, 0xebbc, 0xc4b4, 0x99c6, 0x9ac6, 0xa3c3, 0xe7b2, 0xfadc, 0x9bc6, 0xf2dc, 0x9cc6, 0xefdc, 0x9dc6, 0xfcdc, 0xeedc, 0xf0d2, 0xe8b2, 0x9ec6, 0xd7c8, 0xe3c8, 0xfbdc, 0x9fc6, 0xeddc, 0xa0c6, 0x40c7, 0x41c7, 0xf7dc, 0x42c7, 0x43c7, 0xf5dc, 0x44c7, 0x45c7, 0xa3be, 0xf4dc, 0x46c7, 0xddb2, 0x47c7, 0x48c7, 0x49c7, 0x4ac7, 0x4bc7, 0xf3dc, 0xf6bc, 0xe8dc, 0xc4bb, 0x4cc7, 0xf3c0, 0x4dc7, 0x4ec7, 0x4fc7, 0x50c7, 0x51c7, 0xd4bc, 0xe9dc, 0xeadc, 0x52c7, 0xf1dc, 0xf6dc, 0xf9dc, 0xb4b5, 0x53c7, 0xd9c8, 0xe7bb, 0xfedc, 0xfddc, 0xabd3, 0xa1dd, 0xa3dd, 0xa5dd, 0xf1d2, 0xa4dd, 0xa6dd, 0xa7dd, 0xa9d2, 0x54c7, 0x55c7, 0x56c7, 0x57c7, 0x58c7, 0x59c7, 0x5ac7, 0xc9ba, 0xa9dd, 0x5bc7, 0x5cc7, 0xb6dd, 0xb1dd, 0xb4dd, 0x5dc7, 0x5ec7, 0x5fc7, 0x60c7, 0x61c7, 0x62c7, 0x63c7, 0xb0dd, 0xcec6, 0x64c7, 0x65c7, 0xf2c0, 0x66c7, 0x67c7, 0x68c7, 0x69c7, 0xafc9, 0x6ac7, 0x6bc7, 0x6cc7, 0xecdc, 0xaedd, 0x6dc7, 0x6ec7, 0x6fc7, 0x70c7, 0xb7dd, 0x71c7, 0x72c7, 0xf0dc, 0xafdd, 0x73c7, 0xb8dd, 0x74c7, 0xacdd, 0x75c7, 0x76c7, 0x77c7, 0x78c7, 0x79c7, 0x7ac7, 0x7bc7, 0xb9dd, 0xb3dd, 0xaddd, 0xaac4, 0x7cc7, 0x7dc7, 0x7ec7, 0x80c7, 0xa8dd, 0xb3c0, 0xabc1, 0xaadd, 0xabdd, 0x81c7, 0xb2dd, 0xf1bb, 0xb5dd, 0xa8d3, 0xbadd, 0x82c7, 0xbbdd, 0xa7c3, 0x83c7, 0x84c7, 0xd2dd, 0xbcdd, 0x85c7, 0x86c7, 0x87c7, 0xd1dd, 0x88c7, 0xbdb9, 0x89c7, 0x8ac7, 0xd5be, 0x8bc7, 0xfabe, 0x8cc7, 0x8dc7, 0xcaba, 0x8ec7, 0x8fc7, 0x90c7, 0x91c7, 0xcadd, 0x92c7, 0xc5dd, 0x93c7, 0xbfdd, 0x94c7, 0x95c7, 0x96c7, 0xcbb2, 0xc3dd, 0x97c7, 0xcbdd, 0xa4b2, 0xd5dd, 0x98c7, 0x99c7, 0x9ac7, 0xbedd, 0x9bc7, 0x9cc7, 0x9dc7, 0xd0c6, 0xd0dd, 0x9ec7, 0x9fc7, 0xa0c7, 0x40c8, 0x41c8, 0xd4dd, 0xe2c1, 0xc6b7, 0x42c8, 0x43c8, 0x44c8, 0x45c8, 0x46c8, 0xcedd, 0xcfdd, 0x47c8, 0x48c8, 0x49c8, 0xc4dd, 0x4ac8, 0x4bc8, 0x4cc8, 0xbddd, 0x4dc8, 0xcddd, 0xd1cc, 0x4ec8, 0xc9dd, 0x4fc8, 0x50c8, 0x51c8, 0x52c8, 0xc2dd, 0xc8c3, 0xbcc6, 0xaece, 0xccdd, 0x53c8, 0xc8dd, 0x54c8, 0x55c8, 0x56c8, 0x57c8, 0x58c8, 0x59c8, 0xc1dd, 0x5ac8, 0x5bc8, 0x5cc8, 0xc6dd, 0xdcc2, 0x5dc8, 0x5ec8, 0x5fc8, 0x60c8, 0x61c8, 0x62c8, 0xa9d3, 0xaad3, 0xd3dd, 0xf4cf, 0xf8c8, 0x63c8, 0x64c8, 0x65c8, 0x66c8, 0x67c8, 0x68c8, 0x69c8, 0x6ac8, 0xe6dd, 0x6bc8, 0x6cc8, 0x6dc8, 0x6ec8, 0x6fc8, 0x70c8, 0xc7dd, 0x71c8, 0x72c8, 0x73c8, 0xe0dd, 0xe4c2, 0x74c8, 0x75c8, 0x76c8, 0x77c8, 0x78c8, 0x79c8, 0x7ac8, 0x7bc8, 0xe1dd, 0x7cc8, 0x7dc8, 0x7ec8, 0x80c8, 0x81c8, 0x82c8, 0x83c8, 0x84c8, 0x85c8, 0x86c8, 0xd7dd, 0x87c8, 0x88c8, 0x89c8, 0x8ac8, 0x8bc8, 0xf8d6, 0x8cc8, 0xd9dd, 0xd8dd, 0xf0b8, 0xd6dd, 0x8dc8, 0x8ec8, 0x8fc8, 0x90c8, 0xcfc6, 0x91c8, 0xadb6, 0x92c8, 0x93c8, 0x94c8, 0x95c8, 0x96c8, 0xe2dd, 0x97c8, 0xf9ba, 0xe1d4, 0xe7dd, 0x98c8, 0x99c8, 0x9ac8, 0xd0b4, 0x9bc8, 0xdadd, 0x9cc8, 0xfbbf, 0xe3dd, 0x9dc8, 0xdfdd, 0x9ec8, 0xdddd, 0x9fc8, 0xa0c8, 0x40c9, 0x41c9, 0x42c9, 0x43c9, 0x44c9, 0xd9b5, 0x45c9, 0x46c9, 0x47c9, 0x48c9, 0xdbdd, 0xdcdd, 0xdedd, 0x49c9, 0xafbd, 0xe4dd, 0x4ac9, 0xe5dd, 0x4bc9, 0x4cc9, 0x4dc9, 0x4ec9, 0x4fc9, 0x50c9, 0x51c9, 0x52c9, 0xf5dd, 0x53c9, 0xc9c3, 0x54c9, 0x55c9, 0xe2cb, 0x56c9, 0x57c9, 0x58c9, 0x59c9, 0xf2dd, 0x5ac9, 0x5bc9, 0x5cc9, 0x5dc9, 0x5ec9, 0x5fc9, 0x60c9, 0x61c9, 0x62c9, 0x63c9, 0x64c9, 0x65c9, 0x66c9, 0xe1d8, 0x67c9, 0x68c9, 0xd1c6, 0x69c9, 0xf4dd, 0x6ac9, 0x6bc9, 0x6cc9, 0xf4d5, 0xf3dd, 0xf0dd, 0x6dc9, 0x6ec9, 0xecdd, 0x6fc9, 0xefdd, 0x70c9, 0xe8dd, 0x71c9, 0x72c9, 0xeed0, 0x73c9, 0x74c9, 0x75c9, 0x76c9, 0xd8c8, 0xeedd, 0x77c9, 0x78c9, 0xe9dd, 0x79c9, 0x7ac9, 0xeadd, 0xf2cb, 0x7bc9, 0xeddd, 0x7cc9, 0x7dc9, 0xcdb1, 0x7ec9, 0x80c9, 0x81c9, 0x82c9, 0x83c9, 0x84c9, 0xb6c0, 0x85c9, 0xbbbc, 0xf1dd, 0x86c9, 0x87c9, 0xf7dd, 0x88c9, 0xf6dd, 0xebdd, 0x89c9, 0x8ac9, 0x8bc9, 0x8cc9, 0x8dc9, 0xeec5, 0x8ec9, 0x8fc9, 0x90c9, 0xfbdd, 0x91c9, 0x92c9, 0x93c9, 0x94c9, 0x95c9, 0x96c9, 0x97c9, 0x98c9, 0x99c9, 0x9ac9, 0x9bc9, 0xa4de, 0x9cc9, 0x9dc9, 0xa3de, 0x9ec9, 0x9fc9, 0xa0c9, 0x40ca, 0x41ca, 0x42ca, 0x43ca, 0x44ca, 0x45ca, 0x46ca, 0x47ca, 0x48ca, 0xf8dd, 0x49ca, 0x4aca, 0x4bca, 0x4cca, 0xefc3, 0x4dca, 0xfbc2, 0x4eca, 0x4fca, 0x50ca, 0xe1d5, 0x51ca, 0x52ca, 0xb5ce, 0x53ca, 0x54ca, 0x55ca, 0x56ca, 0xfddd, 0x57ca, 0xccb2, 0x58ca, 0x59ca, 0x5aca, 0x5bca, 0x5cca, 0x5dca, 0x5eca, 0x5fca, 0x60ca, 0xe8c4, 0xdfca, 0x61ca, 0x62ca, 0x63ca, 0x64ca, 0x65ca, 0x66ca, 0x67ca, 0x68ca, 0x69ca, 0x6aca, 0xbec7, 0xfadd, 0xfcdd, 0xfedd, 0xa2de, 0xaab0, 0xceb1, 0x6bca, 0x6cca, 0x6dca, 0x6eca, 0x6fca, 0xacde, 0x70ca, 0x71ca, 0x72ca, 0x73ca, 0xa6de, 0xb6bd, 0xefc8, 0x74ca, 0x75ca, 0x76ca, 0x77ca, 0x78ca, 0x79ca, 0x7aca, 0x7bca, 0x7cca, 0x7dca, 0x7eca, 0xa1de, 0x80ca, 0x81ca, 0xa5de, 0x82ca, 0x83ca, 0x84ca, 0x85ca, 0xa9de, 0x86ca, 0x87ca, 0x88ca, 0x89ca, 0x8aca, 0xa8de, 0x8bca, 0x8cca, 0x8dca, 0xa7de, 0x8eca, 0x8fca, 0x90ca, 0x91ca, 0x92ca, 0x93ca, 0x94ca, 0x95ca, 0x96ca, 0xadde, 0x97ca, 0xccd4, 0x98ca, 0x99ca, 0x9aca, 0x9bca, 0xb3de, 0xaade, 0xaede, 0x9cca, 0x9dca, 0xd9c0, 0x9eca, 0x9fca, 0xa0ca, 0x40cb, 0x41cb, 0xa1b1, 0xb6de, 0x42cb, 0xb1de, 0x43cb, 0x44cb, 0x45cb, 0x46cb, 0x47cb, 0x48cb, 0x49cb, 0xb2de, 0x4acb, 0x4bcb, 0x4ccb, 0x4dcb, 0x4ecb, 0x4fcb, 0x50cb, 0x51cb, 0x52cb, 0x53cb, 0x54cb, 0xa6d1, 0xb5de, 0x55cb, 0x56cb, 0x57cb, 0x58cb, 0x59cb, 0x5acb, 0x5bcb, 0xafde, 0x5ccb, 0x5dcb, 0x5ecb, 0xb0de, 0x5fcb, 0xbdd0, 0x60cb, 0x61cb, 0x62cb, 0xb4de, 0xedca, 0xb9de, 0x63cb, 0x64cb, 0x65cb, 0x66cb, 0x67cb, 0x68cb, 0xb8de, 0x69cb, 0xb7de, 0x6acb, 0x6bcb, 0x6ccb, 0x6dcb, 0x6ecb, 0x6fcb, 0x70cb, 0xbbde, 0x71cb, 0x72cb, 0x73cb, 0x74cb, 0x75cb, 0x76cb, 0x77cb, 0xe5bd, 0x78cb, 0x79cb, 0x7acb, 0x7bcb, 0x7ccb, 0xd8b2, 0xeac3, 0x7dcb, 0x7ecb, 0xbade, 0x80cb, 0xbac5, 0x81cb, 0x82cb, 0x83cb, 0x84cb, 0x85cb, 0x86cb, 0xbcde, 0x87cb, 0x88cb, 0x89cb, 0x8acb, 0x8bcb, 0x8ccb, 0x8dcb, 0xd9cc, 0x8ecb, 0x8fcb, 0x90cb, 0x91cb, 0xaab7, 0x92cb, 0x93cb, 0x94cb, 0x95cb, 0x96cb, 0x97cb, 0x98cb, 0x99cb, 0x9acb, 0x9bcb, 0x9ccb, 0x9dcb, 0x9ecb, 0x9fcb, 0xa0cb, 0x40cc, 0x41cc, 0xe5d4, 0x42cc, 0x43cc, 0x44cc, 0xbdde, 0x45cc, 0x46cc, 0x47cc, 0x48cc, 0x49cc, 0xbfde, 0x4acc, 0x4bcc, 0x4ccc, 0x4dcc, 0x4ecc, 0x4fcc, 0x50cc, 0x51cc, 0x52cc, 0x53cc, 0x54cc, 0xa2c4, 0x55cc, 0x56cc, 0x57cc, 0x58cc, 0xc1de, 0x59cc, 0x5acc, 0x5bcc, 0x5ccc, 0x5dcc, 0x5ecc, 0x5fcc, 0x60cc, 0x61cc, 0x62cc, 0x63cc, 0x64cc, 0x65cc, 0x66cc, 0x67cc, 0x68cc, 0xbede, 0x69cc, 0xc0de, 0x6acc, 0x6bcc, 0x6ccc, 0x6dcc, 0x6ecc, 0x6fcc, 0x70cc, 0x71cc, 0x72cc, 0x73cc, 0x74cc, 0x75cc, 0x76cc, 0x77cc, 0xbad5, 0x78cc, 0x79cc, 0x7acc, 0xc2de, 0x7bcc, 0x7ccc, 0x7dcc, 0x7ecc, 0x80cc, 0x81cc, 0x82cc, 0x83cc, 0x84cc, 0x85cc, 0x86cc, 0x87cc, 0x88cc, 0x89cc, 0x8acc, 0x8bcc, 0xaef2, 0xa2bb, 0xb2c2, 0xb0c5, 0xc7c2, 0x8ccc, 0x8dcc, 0xaff2, 0x8ecc, 0x8fcc, 0x90cc, 0x91cc, 0x92cc, 0xe9d0, 0x93cc, 0x94cc, 0x95cc, 0xddd3, 0x96cc, 0x97cc, 0x98cc, 0xbdeb, 0x99cc, 0x9acc, 0x9bcc, 0x9ccc, 0x9dcc, 0x9ecc, 0x9fcc, 0xa0cc, 0xe6b3, 0xb0f2, 0x40cd, 0xb1f2, 0x41cd, 0x42cd, 0xadca, 0x43cd, 0x44cd, 0x45cd, 0x46cd, 0x47cd, 0x48cd, 0x49cd, 0xe7ba, 0xb3f2, 0xb5f2, 0xb4f2, 0xe4cb, 0xbacf, 0xb2f2, 0xb4ca, 0xcfd2, 0xecc2, 0x4acd, 0x4bcd, 0x4ccd, 0x4dcd, 0x4ecd, 0x4fcd, 0x50cd, 0xc3ce, 0xb8f2, 0xf6b0, 0xb7f2, 0x51cd, 0x52cd, 0x53cd, 0x54cd, 0x55cd, 0xbef2, 0x56cd, 0xcfb2, 0x57cd, 0x58cd, 0x59cd, 0x5acd, 0x5bcd, 0x5ccd, 0xc1d1, 0xbaf2, 0x5dcd, 0x5ecd, 0x5fcd, 0x60cd, 0x61cd, 0xbcf2, 0xe9d4, 0x62cd, 0x63cd, 0xbbf2, 0xb6f2, 0xbff2, 0xbdf2, 0x64cd, 0xb9f2, 0x65cd, 0x66cd, 0xc7f2, 0xc4f2, 0xc6f2, 0x67cd, 0x68cd, 0xcaf2, 0xc2f2, 0xc0f2, 0x69cd, 0x6acd, 0x6bcd, 0xc5f2, 0x6ccd, 0x6dcd, 0x6ecd, 0x6fcd, 0x70cd, 0xfbd6, 0x71cd, 0x72cd, 0x73cd, 0xc1f2, 0x74cd, 0xf9c7, 0xdfc9, 0x75cd, 0xc8f2, 0xc6b9, 0xb0b5, 0x76cd, 0x77cd, 0xc3f2, 0xc9f2, 0xd0f2, 0xd6f2, 0x78cd, 0x79cd, 0xd7bb, 0x7acd, 0x7bcd, 0x7ccd, 0xd5f2, 0xdccd, 0x7dcd, 0xebd6, 0x7ecd, 0x80cd, 0xd2f2, 0xd4f2, 0x81cd, 0x82cd, 0x83cd, 0x84cd, 0xf2b8, 0x85cd, 0x86cd, 0x87cd, 0x88cd, 0xcbf2, 0x89cd, 0x8acd, 0x8bcd, 0xcef2, 0xf9c2, 0x8ccd, 0xddd5, 0xccf2, 0xcdf2, 0xcff2, 0xd3f2, 0x8dcd, 0x8ecd, 0x8fcd, 0xd9f2, 0xbcd3, 0x90cd, 0x91cd, 0x92cd, 0x93cd, 0xeab6, 0x94cd, 0xf1ca, 0x95cd, 0xe4b7, 0xd7f2, 0x96cd, 0x97cd, 0x98cd, 0xd8f2, 0xdaf2, 0xddf2, 0xdbf2, 0x99cd, 0x9acd, 0xdcf2, 0x9bcd, 0x9ccd, 0x9dcd, 0x9ecd, 0xd1d1, 0xd1f2, 0x9fcd, 0xc9cd, 0xa0cd, 0xcfce, 0xa9d6, 0x40ce, 0xe3f2, 0x41ce, 0xdbc3, 0x42ce, 0xe0f2, 0x43ce, 0x44ce, 0xafc0, 0xecf2, 0xdef2, 0x45ce, 0xe1f2, 0x46ce, 0x47ce, 0x48ce, 0xe8f2, 0x49ce, 0x4ace, 0x4bce, 0x4cce, 0xe2f2, 0x4dce, 0x4ece, 0xe7f2, 0x4fce, 0x50ce, 0xe6f2, 0x51ce, 0x52ce, 0xe9f2, 0x53ce, 0x54ce, 0x55ce, 0xdff2, 0x56ce, 0x57ce, 0xe4f2, 0xeaf2, 0x58ce, 0x59ce, 0x5ace, 0x5bce, 0x5cce, 0x5dce, 0x5ece, 0xacd3, 0xe5f2, 0xf5b2, 0x5fce, 0x60ce, 0xf2f2, 0x61ce, 0xabd0, 0x62ce, 0x63ce, 0x64ce, 0x65ce, 0xf5f2, 0x66ce, 0x67ce, 0x68ce, 0xc8bb, 0x69ce, 0xf9f2, 0x6ace, 0x6bce, 0x6cce, 0x6dce, 0x6ece, 0x6fce, 0xf0f2, 0x70ce, 0x71ce, 0xf6f2, 0xf8f2, 0xfaf2, 0x72ce, 0x73ce, 0x74ce, 0x75ce, 0x76ce, 0x77ce, 0x78ce, 0x79ce, 0xf3f2, 0x7ace, 0xf1f2, 0x7bce, 0x7cce, 0x7dce, 0xfbba, 0x7ece, 0xfbb5, 0x80ce, 0x81ce, 0x82ce, 0x83ce, 0xeff2, 0xf7f2, 0xedf2, 0xeef2, 0x84ce, 0x85ce, 0x86ce, 0xebf2, 0xa6f3, 0x87ce, 0xa3f3, 0x88ce, 0x89ce, 0xa2f3, 0x8ace, 0x8bce, 0xf4f2, 0x8cce, 0xdac8, 0x8dce, 0x8ece, 0x8fce, 0x90ce, 0x91ce, 0xfbf2, 0x92ce, 0x93ce, 0x94ce, 0xa5f3, 0x95ce, 0x96ce, 0x97ce, 0x98ce, 0x99ce, 0x9ace, 0x9bce, 0xf8c3, 0x9cce, 0x9dce, 0x9ece, 0x9fce, 0xa0ce, 0x40cf, 0x41cf, 0x42cf, 0xfdf2, 0x43cf, 0x44cf, 0xa7f3, 0xa9f3, 0xa4f3, 0x45cf, 0xfcf2, 0x46cf, 0x47cf, 0x48cf, 0xabf3, 0x49cf, 0xaaf3, 0x4acf, 0x4bcf, 0x4ccf, 0x4dcf, 0xddc2, 0x4ecf, 0x4fcf, 0xaef3, 0x50cf, 0x51cf, 0xb0f3, 0x52cf, 0x53cf, 0x54cf, 0x55cf, 0x56cf, 0xa1f3, 0x57cf, 0x58cf, 0x59cf, 0xb1f3, 0xacf3, 0x5acf, 0x5bcf, 0x5ccf, 0x5dcf, 0x5ecf, 0xaff3, 0xfef2, 0xadf3, 0x5fcf, 0x60cf, 0x61cf, 0x62cf, 0x63cf, 0x64cf, 0x65cf, 0xb2f3, 0x66cf, 0x67cf, 0x68cf, 0x69cf, 0xb4f3, 0x6acf, 0x6bcf, 0x6ccf, 0x6dcf, 0xa8f3, 0x6ecf, 0x6fcf, 0x70cf, 0x71cf, 0xb3f3, 0x72cf, 0x73cf, 0x74cf, 0xb5f3, 0x75cf, 0x76cf, 0x77cf, 0x78cf, 0x79cf, 0x7acf, 0x7bcf, 0x7ccf, 0x7dcf, 0x7ecf, 0xb7d0, 0x80cf, 0x81cf, 0x82cf, 0x83cf, 0xb8f3, 0x84cf, 0x85cf, 0x86cf, 0x87cf, 0xf9d9, 0x88cf, 0x89cf, 0x8acf, 0x8bcf, 0x8ccf, 0x8dcf, 0xb9f3, 0x8ecf, 0x8fcf, 0x90cf, 0x91cf, 0x92cf, 0x93cf, 0x94cf, 0x95cf, 0xb7f3, 0x96cf, 0xe4c8, 0xb6f3, 0x97cf, 0x98cf, 0x99cf, 0x9acf, 0xbaf3, 0x9bcf, 0x9ccf, 0x9dcf, 0x9ecf, 0x9fcf, 0xbbf3, 0xc0b4, 0xa0cf, 0x40d0, 0x41d0, 0x42d0, 0x43d0, 0x44d0, 0x45d0, 0x46d0, 0x47d0, 0x48d0, 0x49d0, 0x4ad0, 0x4bd0, 0x4cd0, 0x4dd0, 0xc3ee, 0x4ed0, 0x4fd0, 0x50d0, 0x51d0, 0x52d0, 0x53d0, 0xbcf3, 0x54d0, 0x55d0, 0xbdf3, 0x56d0, 0x57d0, 0x58d0, 0xaad1, 0x59d0, 0x5ad0, 0x5bd0, 0xacf4, 0xc6d0, 0x5cd0, 0x5dd0, 0x5ed0, 0x5fd0, 0x60d0, 0x61d0, 0xd0d0, 0xdcd1, 0x62d0, 0x63d0, 0x64d0, 0x65d0, 0x66d0, 0x67d0, 0xcecf, 0x68d0, 0x69d0, 0xd6bd, 0x6ad0, 0xc3d1, 0x6bd0, 0x6cd0, 0x6dd0, 0x6ed0, 0x6fd0, 0x70d0, 0x71d0, 0xe2ba, 0xe9e1, 0xc2d2, 0xc2f1, 0xb9b2, 0x72d0, 0x73d0, 0xedb1, 0xc3f1, 0x74d0, 0xc0c9, 0xc4b3, 0x75d0, 0xf2d9, 0x76d0, 0xa5cb, 0x77d0, 0xc4f1, 0x78d0, 0x79d0, 0x7ad0, 0x7bd0, 0xd4d6, 0x7cd0, 0x7dd0, 0x7ed0, 0x80d0, 0x81d0, 0xc5f1, 0xc0f4, 0xc6f1, 0x82d0, 0xacd4, 0xc7f1, 0x83d0, 0xc0b0, 0xc1f4, 0x84d0, 0x85d0, 0xc2f4, 0x86d0, 0x87d0, 0xfcb4, 0x88d0, 0xdbc5, 0x89d0, 0x8ad0, 0x8bd0, 0x8cd0, 0xbbcc, 0x8dd0, 0x8ed0, 0x8fd0, 0xe4d0, 0x90d0, 0x91d0, 0x92d0, 0x93d0, 0x94d0, 0xe0cd, 0x95d0, 0x96d0, 0x97d0, 0x98d0, 0x99d0, 0xc8f1, 0x9ad0, 0xf3d9, 0x9bd0, 0x9cd0, 0x9dd0, 0x9ed0, 0x9fd0, 0xa0d0, 0xbbb1, 0x40d1, 0xaecf, 0x41d1, 0x42d1, 0x43d1, 0xa4b8, 0x44d1, 0x45d1, 0x46d1, 0x47d1, 0x48d1, 0xcaf1, 0x49d1, 0x4ad1, 0x4bd1, 0x4cd1, 0xcbf1, 0x4dd1, 0x4ed1, 0x4fd1, 0x50d1, 0xc3b2, 0xd1c1, 0x51d1, 0x52d1, 0xb0d7, 0xc9f1, 0x53d1, 0x54d1, 0xccf1, 0x55d1, 0x56d1, 0x57d1, 0x58d1, 0xcef1, 0x59d1, 0x5ad1, 0x5bd1, 0xf6d9, 0x5cd1, 0xe1d2, 0xa3d4, 0x5dd1, 0x5ed1, 0xc3f4, 0xb9c8, 0x5fd1, 0x60d1, 0x61d1, 0x62d1, 0x63d1, 0xc4f4, 0x64d1, 0x65d1, 0xcdf1, 0xcff1, 0xe3bf, 0xd0f1, 0x66d1, 0x67d1, 0xd4f1, 0x68d1, 0x69d1, 0x6ad1, 0x6bd1, 0x6cd1, 0x6dd1, 0x6ed1, 0xd6f1, 0xd1f1, 0x6fd1, 0xd1c9, 0xe1c5, 0x70d1, 0x71d1, 0x72d1, 0xe3c2, 0xfcb9, 0x73d1, 0x74d1, 0xd3f1, 0x75d1, 0xd5f1, 0x76d1, 0x77d1, 0x78d1, 0xd3b9, 0x79d1, 0x7ad1, 0x7bd1, 0x7cd1, 0x7dd1, 0x7ed1, 0x80d1, 0xdbf1, 0x81d1, 0x82d1, 0x83d1, 0x84d1, 0x85d1, 0xd6ba, 0x86d1, 0xfdb0, 0xd9f1, 0x87d1, 0x88d1, 0x89d1, 0x8ad1, 0x8bd1, 0xd8f1, 0xd2f1, 0xdaf1, 0x8cd1, 0x8dd1, 0x8ed1, 0x8fd1, 0x90d1, 0xd7f1, 0x91d1, 0x92d1, 0x93d1, 0xecc8, 0x94d1, 0x95d1, 0x96d1, 0x97d1, 0xcacd, 0xddf1, 0x98d1, 0x99d1, 0x9ad1, 0x9bd1, 0xbde5, 0x9cd1, 0x9dd1, 0x9ed1, 0xdcf1, 0x9fd1, 0xdef1, 0xa0d1, 0x40d2, 0x41d2, 0x42d2, 0x43d2, 0x44d2, 0x45d2, 0x46d2, 0x47d2, 0x48d2, 0xdff1, 0x49d2, 0x4ad2, 0xe5cf, 0x4bd2, 0x4cd2, 0x4dd2, 0x4ed2, 0x4fd2, 0x50d2, 0x51d2, 0x52d2, 0x53d2, 0x54d2, 0x55d2, 0x56d2, 0x57d2, 0x58d2, 0x59d2, 0x5ad2, 0x5bd2, 0x5cd2, 0x5dd2, 0x5ed2, 0x5fd2, 0x60d2, 0x61d2, 0x62d2, 0x63d2, 0xc5f4, 0xf3bd, 0x64d2, 0x65d2, 0x66d2, 0x67d2, 0x68d2, 0x69d2, 0xe0f1, 0x6ad2, 0x6bd2, 0x6cd2, 0x6dd2, 0x6ed2, 0x6fd2, 0x70d2, 0x71d2, 0x72d2, 0x73d2, 0x74d2, 0x75d2, 0x76d2, 0x77d2, 0x78d2, 0x79d2, 0x7ad2, 0x7bd2, 0x7cd2, 0x7dd2, 0xe1f1, 0x7ed2, 0x80d2, 0x81d2, 0xf7ce, 0x82d2, 0xaad2, 0x83d2, 0xfbf1, 0x84d2, 0x85d2, 0xb2b8, 0x86d2, 0x87d2, 0x88d2, 0x89d2, 0x8ad2, 0x8bd2, 0x8cd2, 0x8dd2, 0x8ed2, 0x8fd2, 0x90d2, 0x91d2, 0x92d2, 0x93d2, 0x94d2, 0x95d2, 0x96d2, 0x97d2, 0x98d2, 0x99d2, 0x9ad2, 0x9bd2, 0x9cd2, 0x9dd2, 0x9ed2, 0x9fd2, 0xa0d2, 0x40d3, 0x41d3, 0x42d3, 0x43d3, 0x44d3, 0x45d3, 0x46d3, 0x47d3, 0x48d3, 0x49d3, 0x4ad3, 0x4bd3, 0x4cd3, 0x4dd3, 0x4ed3, 0x4fd3, 0x50d3, 0x51d3, 0x52d3, 0x53d3, 0x54d3, 0x55d3, 0x56d3, 0x57d3, 0x58d3, 0x59d3, 0x5ad3, 0x5bd3, 0x5cd3, 0x5dd3, 0x5ed3, 0xfbbc, 0xdbb9, 0x5fd3, 0xe6b9, 0xd9c3, 0xd3ca, 0xe8ea, 0xc0c0, 0xf5be, 0xe9ea, 0xeaea, 0xebea, 0x60d3, 0xecea, 0xedea, 0xeeea, 0xefea, 0xc7bd, 0x61d3, 0x62d3, 0x63d3, 0xfbf5, 0x64d3, 0x65d3, 0x66d3, 0xfdf5, 0x67d3, 0xfef5, 0x68d3, 0xfcf5, 0x69d3, 0x6ad3, 0x6bd3, 0x6cd3, 0xe2bd, 0x6dd3, 0xa1f6, 0xa5b4, 0x6ed3, 0x6fd3, 0x70d3, 0x71d3, 0xa2f6, 0x72d3, 0x73d3, 0x74d3, 0xa3f6, 0x75d3, 0x76d3, 0x77d3, 0xb2ec, 0x78d3, 0x79d3, 0x7ad3, 0x7bd3, 0x7cd3, 0x7dd3, 0x7ed3, 0x80d3, 0x81d3, 0x82d3, 0x83d3, 0x84d3, 0xd4d1, 0x85d3, 0x86d3, 0x87d3, 0x88d3, 0x89d3, 0x8ad3, 0xead9, 0x8bd3, 0x8cd3, 0x8dd3, 0x8ed3, 0x8fd3, 0x90d3, 0x91d3, 0x92d3, 0x93d3, 0x94d3, 0x95d3, 0x96d3, 0x97d3, 0x98d3, 0x99d3, 0x9ad3, 0x9bd3, 0x9cd3, 0x9dd3, 0x9ed3, 0x9fd3, 0xa0d3, 0x40d4, 0x41d4, 0x42d4, 0x43d4, 0x44d4, 0x45d4, 0x46d4, 0x47d4, 0x48d4, 0x49d4, 0x4ad4, 0x4bd4, 0x4cd4, 0x4dd4, 0x4ed4, 0x4fd4, 0x50d4, 0x51d4, 0x52d4, 0x53d4, 0x54d4, 0x55d4, 0x56d4, 0x57d4, 0x58d4, 0x59d4, 0x5ad4, 0x5bd4, 0x5cd4, 0x5dd4, 0x5ed4, 0x5fd4, 0xa4f6, 0x60d4, 0x61d4, 0x62d4, 0x63d4, 0x64d4, 0x65d4, 0x66d4, 0x67d4, 0x68d4, 0xbaee, 0x69d4, 0x6ad4, 0x6bd4, 0x6cd4, 0x6dd4, 0x6ed4, 0x6fd4, 0x70d4, 0x71d4, 0x72d4, 0x73d4, 0x74d4, 0x75d4, 0x76d4, 0x77d4, 0x78d4, 0x79d4, 0x7ad4, 0x7bd4, 0x7cd4, 0x7dd4, 0x7ed4, 0x80d4, 0x81d4, 0x82d4, 0x83d4, 0x84d4, 0x85d4, 0x86d4, 0x87d4, 0x88d4, 0x89d4, 0x8ad4, 0x8bd4, 0x8cd4, 0x8dd4, 0x8ed4, 0x8fd4, 0x90d4, 0x91d4, 0x92d4, 0x93d4, 0x94d4, 0x95d4, 0x96d4, 0x97d4, 0x98d4, 0x99d4, 0xb2d5, 0x9ad4, 0x9bd4, 0x9cd4, 0x9dd4, 0x9ed4, 0x9fd4, 0xa0d4, 0x40d5, 0x41d5, 0x42d5, 0x43d5, 0x44d5, 0x45d5, 0x46d5, 0x47d5, 0xfed3, 0xdccc, 0x48d5, 0x49d5, 0x4ad5, 0x4bd5, 0x4cd5, 0x4dd5, 0x4ed5, 0x4fd5, 0xc4ca, 0x50d5, 0x51d5, 0x52d5, 0x53d5, 0x54d5, 0x55d5, 0x56d5, 0x57d5, 0x58d5, 0x59d5, 0x5ad5, 0x5bd5, 0x5cd5, 0x5dd5, 0x5ed5, 0x5fd5, 0x60d5, 0x61d5, 0x62d5, 0x63d5, 0x64d5, 0x65d5, 0x66d5, 0x67d5, 0x68d5, 0x69d5, 0x6ad5, 0x6bd5, 0x6cd5, 0x6dd5, 0x6ed5, 0x6fd5, 0x70d5, 0x71d5, 0x72d5, 0x73d5, 0x74d5, 0x75d5, 0x76d5, 0x77d5, 0x78d5, 0x79d5, 0x7ad5, 0x7bd5, 0x7cd5, 0x7dd5, 0x7ed5, 0x80d5, 0x81d5, 0x82d5, 0x83d5, 0x84d5, 0x85d5, 0x86d5, 0x87d5, 0x88d5, 0x89d5, 0x8ad5, 0x8bd5, 0x8cd5, 0x8dd5, 0x8ed5, 0x8fd5, 0x90d5, 0x91d5, 0x92d5, 0x93d5, 0x94d5, 0x95d5, 0x96d5, 0x97d5, 0x98d5, 0x99d5, 0x9ad5, 0x9bd5, 0x9cd5, 0x9dd5, 0x9ed5, 0x9fd5, 0xa0d5, 0x40d6, 0x41d6, 0x42d6, 0x43d6, 0x44d6, 0x45d6, 0x46d6, 0x47d6, 0x48d6, 0x49d6, 0x4ad6, 0x4bd6, 0x4cd6, 0x4dd6, 0x4ed6, 0x4fd6, 0x50d6, 0x51d6, 0x52d6, 0x53d6, 0x54d6, 0x55d6, 0x56d6, 0x57d6, 0x58d6, 0x59d6, 0x5ad6, 0x5bd6, 0x5cd6, 0x5dd6, 0x5ed6, 0x5fd6, 0x60d6, 0x61d6, 0x62d6, 0xc0e5, 0x63d6, 0x64d6, 0x65d6, 0x66d6, 0x67d6, 0x68d6, 0x69d6, 0x6ad6, 0x6bd6, 0x6cd6, 0x6dd6, 0x6ed6, 0x6fd6, 0x70d6, 0x71d6, 0x72d6, 0x73d6, 0x74d6, 0x75d6, 0x76d6, 0x77d6, 0x78d6, 0x79d6, 0x7ad6, 0x7bd6, 0x7cd6, 0x7dd6, 0x7ed6, 0x80d6, 0x81d6, 0xa5f6, 0x82d6, 0x83d6, 0x84d6, 0x85d6, 0x86d6, 0x87d6, 0x88d6, 0x89d6, 0x8ad6, 0x8bd6, 0x8cd6, 0x8dd6, 0x8ed6, 0x8fd6, 0x90d6, 0x91d6, 0x92d6, 0x93d6, 0x94d6, 0x95d6, 0x96d6, 0x97d6, 0x98d6, 0x99d6, 0x9ad6, 0x9bd6, 0x9cd6, 0x9dd6, 0x9ed6, 0x9fd6, 0xa0d6, 0x40d7, 0x41d7, 0x42d7, 0x43d7, 0x44d7, 0x45d7, 0x46d7, 0x47d7, 0x48d7, 0x49d7, 0x4ad7, 0x4bd7, 0x4cd7, 0x4dd7, 0x4ed7, 0x4fd7, 0x50d7, 0x51d7, 0x52d7, 0x53d7, 0x54d7, 0x55d7, 0x56d7, 0x57d7, 0x58d7, 0x59d7, 0x5ad7, 0x5bd7, 0x5cd7, 0x5dd7, 0x5ed7, 0x5fd7, 0xafbe, 0x60d7, 0x61d7, 0x62d7, 0x63d7, 0x64d7, 0xa9c6, 0x65d7, 0x66d7, 0x67d7, 0x68d7, 0x69d7, 0x6ad7, 0x6bd7, 0x6cd7, 0x6dd7, 0x6ed7, 0x6fd7, 0x70d7, 0x71d7, 0x72d7, 0x73d7, 0x74d7, 0x75d7, 0x76d7, 0x77d7, 0x78d7, 0x79d7, 0x7ad7, 0x7bd7, 0x7cd7, 0x7dd7, 0x7ed7, 0x80d7, 0x81d7, 0x82d7, 0x83d7, 0x84d7, 0x85d7, 0x86d7, 0x87d7, 0x88d7, 0x89d7, 0x8ad7, 0x8bd7, 0x8cd7, 0x8dd7, 0x8ed7, 0x8fd7, 0x90d7, 0x91d7, 0x92d7, 0x93d7, 0x94d7, 0x95d7, 0x96d7, 0x97d7, 0x98d7, 0xa5da, 0xc6bc, 0xa9b6, 0xbcb8, 0xcfc8, 0xa5bc, 0xa6da, 0xa7da, 0xd6cc, 0xc3c8, 0xa8da, 0xfdc6, 0x99d7, 0xb5d1, 0xe9d2, 0xb6d1, 0xc7bc, 0x9ad7, 0xb2bd, 0xe4bb, 0xa9da, 0xaada, 0xc8d1, 0xabda, 0xedd0, 0xefb6, 0xdbc2, 0x9bd7, 0xcfcb, 0xedb7, 0xe8c9, 0xc3b7, 0xf7be, 0xa4d6, 0xacda, 0xadda, 0xc0c6, 0xe7d7, 0xb6ca, 0x9cd7, 0xa9d5, 0xdfcb, 0xefd5, 0xaeda, 0xdfd6, 0xcab4, 0xb0da, 0xafda, 0x9dd7, 0xebd2, 0xb1da, 0xb2da, 0xb3da, 0xd4ca, 0xb4da, 0xabca, 0xb5da, 0xb6da, 0xcfb3, 0xefd6, 0xb7da, 0xb0bb, 0xaeb5, 0xb8da, 0xb9da, 0xeeb9, 0xafd1, 0xe8d2, 0xbada, 0xc3b8, 0xeacf, 0xefb2, 0xbbda, 0xbcda, 0x9ed7, 0xebbd, 0xdcce, 0xefd3, 0xbdda, 0xf3ce, 0xbeda, 0xd5d3, 0xe5bb, 0xbfda, 0xb5cb, 0xd0cb, 0xc0da, 0xebc7, 0xeed6, 0xc1da, 0xb5c5, 0xc1b6, 0xc2da, 0xccb7, 0xcebf, 0xc3da, 0xc4da, 0xadcb, 0xc5da, 0xf7b5, 0xc6da, 0xc2c1, 0xbbd7, 0xc7da, 0xb8cc, 0x9fd7, 0xead2, 0xb1c4, 0xc8da, 0xfdb5, 0xd1bb, 0xc9da, 0xb3d0, 0xcada, 0xcbda, 0xbdce, 0xccda, 0xcdda, 0xceda, 0xf7b2, 0xd1da, 0xcfda, 0xe8d1, 0xd0da, 0xd5c3, 0xd2da, 0xa0d7, 0xd3da, 0xd4da, 0xd5da, 0xbbd0, 0xa5d2, 0xf9b0, 0xd6da, 0xabc7, 0xd7da, 0xf7bd, 0xa1c3, 0xd8da, 0xd9da, 0xfdc3, 0xb7cc, 0xdada, 0xdbda, 0xbec0, 0xd7c6, 0xdcda, 0xddda, 0xb4c7, 0xdeda, 0xdfda, 0xc8b9, 0x40d8, 0x41d8, 0x42d8, 0x43d8, 0x44d8, 0x45d8, 0x46d8, 0x47d8, 0x48d8, 0xedbb, 0x49d8, 0x4ad8, 0x4bd8, 0x4cd8, 0xb9b6, 0xf8f4, 0x4dd8, 0xf9f4, 0x4ed8, 0x4fd8, 0xe3cd, 0x50d8, 0x51d8, 0x52d8, 0x53d8, 0x54d8, 0x55d8, 0x56d8, 0x57d8, 0xb9f5, 0x58d8, 0x59d8, 0x5ad8, 0x5bd8, 0xe0eb, 0x5cd8, 0x5dd8, 0x5ed8, 0x5fd8, 0x60d8, 0x61d8, 0xf3cf, 0xbfbb, 0x62d8, 0x63d8, 0x64d8, 0x65d8, 0x66d8, 0x67d8, 0x68d8, 0xc0ba, 0xa5d4, 0x69d8, 0x6ad8, 0x6bd8, 0x6cd8, 0x6dd8, 0x6ed8, 0x6fd8, 0xd9e1, 0x70d8, 0x71d8, 0x72d8, 0x73d8, 0xf4f5, 0xaab1, 0xf2b2, 0x74d8, 0x75d8, 0x76d8, 0x77d8, 0x78d8, 0x79d8, 0x7ad8, 0xf5f5, 0x7bd8, 0x7cd8, 0xf7f5, 0x7dd8, 0x7ed8, 0x80d8, 0xd1ba, 0xf6f5, 0x81d8, 0xb2c3, 0x82d8, 0x83d8, 0x84d8, 0x85d8, 0x86d8, 0x87d8, 0x88d8, 0xf9f5, 0x89d8, 0x8ad8, 0x8bd8, 0xf8f5, 0x8cd8, 0x8dd8, 0x8ed8, 0x8fd8, 0x90d8, 0x91d8, 0x92d8, 0x93d8, 0x94d8, 0x95d8, 0x96d8, 0x97d8, 0x98d8, 0x99d8, 0x9ad8, 0x9bd8, 0x9cd8, 0x9dd8, 0x9ed8, 0x9fd8, 0xa0d8, 0x40d9, 0x41d9, 0x42d9, 0x43d9, 0x44d9, 0x45d9, 0x46d9, 0x47d9, 0x48d9, 0x49d9, 0x4ad9, 0x4bd9, 0x4cd9, 0x4dd9, 0x4ed9, 0x4fd9, 0x50d9, 0x51d9, 0x52d9, 0x53d9, 0x54d9, 0x55d9, 0x56d9, 0x57d9, 0x58d9, 0x59d9, 0x5ad9, 0x5bd9, 0x5cd9, 0x5dd9, 0x5ed9, 0x5fd9, 0x60d9, 0x61d9, 0x62d9, 0x63d9, 0x64d9, 0x65d9, 0x66d9, 0x67d9, 0x68d9, 0x69d9, 0x6ad9, 0x6bd9, 0x6cd9, 0x6dd9, 0x6ed9, 0x6fd9, 0x70d9, 0x71d9, 0x72d9, 0x73d9, 0x74d9, 0x75d9, 0x76d9, 0x77d9, 0x78d9, 0x79d9, 0x7ad9, 0x7bd9, 0x7cd9, 0x7dd9, 0x7ed9, 0x80d9, 0x81d9, 0x82d9, 0x83d9, 0x84d9, 0x85d9, 0x86d9, 0x87d9, 0x88d9, 0x89d9, 0x8ad9, 0x8bd9, 0x8cd9, 0x8dd9, 0x8ed9, 0x8fd9, 0x90d9, 0x91d9, 0x92d9, 0x93d9, 0x94d9, 0x95d9, 0x96d9, 0x97d9, 0x98d9, 0x99d9, 0x9ad9, 0x9bd9, 0x9cd9, 0x9dd9, 0x9ed9, 0x9fd9, 0xa0d9, 0x40da, 0x41da, 0x42da, 0x43da, 0x44da, 0x45da, 0x46da, 0x47da, 0x48da, 0x49da, 0x4ada, 0x4bda, 0x4cda, 0x4dda, 0x4eda, 0xb4b1, 0xead5, 0xbab8, 0x4fda, 0xb1b9, 0xc6b2, 0xf0d4, 0xcdcf, 0xdcb0, 0xcbd5, 0xf5bb, 0xcad6, 0xb7b7, 0xb0cc, 0xb6c6, 0xe1b1, 0xbab9, 0xfcd6, 0xe1b9, 0xa1b7, 0xfabc, 0xdaea, 0xdbea, 0xf9cc, 0xf3b9, 0xdcea, 0xfbb4, 0xb3c3, 0xd1b7, 0xd8ba, 0xddea, 0xf4d4, 0xdeea, 0xd6bc, 0xdfbb, 0xdfea, 0xdec1, 0xb8c2, 0xdfd4, 0xcad7, 0xe0ea, 0xe1ea, 0xe4ea, 0xe2ea, 0xe3ea, 0xdec9, 0xb3b8, 0xc4b6, 0xe5ea, 0xeaca, 0xcdc9, 0xcdb4, 0x50da, 0x51da, 0xd9e2, 0xe2c5, 0xe6ea, 0xb5c0, 0x52da, 0xb8d7, 0xe7ea, 0xacd7, 0xfcc8, 0xd3d8, 0xcdd8, 0xded4, 0x53da, 0xf9d4, 0xc4c9, 0xaed3, 0xd3b8, 0xe0b3, 0x54da, 0xe2c9, 0xf6f4, 0x55da, 0x56da, 0x57da, 0xd5ba, 0x58da, 0xf7f4, 0x59da, 0x5ada, 0xdfd7, 0x5bda, 0x5cda, 0xf1f4, 0xb0b8, 0xd4d5, 0xcfb8, 0xf0c6, 0x5dda, 0x5eda, 0x5fda, 0x60da, 0x61da, 0x62da, 0x63da, 0x64da, 0x65da, 0xc3b3, 0x66da, 0x67da, 0xf2f4, 0xacb3, 0x68da, 0x69da, 0x6ada, 0x6bda, 0xbdd4, 0xf7c7, 0x6cda, 0x6dda, 0x6eda, 0x6fda, 0x70da, 0xf4f4, 0x71da, 0x72da, 0xf3f4, 0x73da, 0x74da, 0x75da, 0x76da, 0x77da, 0x78da, 0x79da, 0x7ada, 0x7bda, 0x7cda, 0xcbcc, 0x7dda, 0x7eda, 0x80da, 0xa4c8, 0x81da, 0x82da, 0x83da, 0x84da, 0x85da, 0x86da, 0x87da, 0x88da, 0x89da, 0x8ada, 0x8bda, 0x8cda, 0x8dda, 0xf5f4, 0x8eda, 0xe3d7, 0xbfc5, 0xc0f5, 0x8fda, 0x90da, 0xbbf5, 0x91da, 0xc3f5, 0x92da, 0xc2f5, 0x93da, 0xbad6, 0xc1f5, 0x94da, 0x95da, 0x96da, 0xbed4, 0xc4f5, 0x97da, 0xccf5, 0x98da, 0x99da, 0x9ada, 0x9bda, 0xcfb0, 0xf8b5, 0x9cda, 0xc9f5, 0xcaf5, 0x9dda, 0xdcc5, 0x9eda, 0x9fda, 0xa0da, 0x40db, 0xc5f5, 0xc6f5, 0x41db, 0x42db, 0xc7f5, 0xcbf5, 0x43db, 0xe0be, 0xc8f5, 0xfab8, 0x44db, 0x45db, 0x46db, 0xd0f5, 0xd3f5, 0x47db, 0x48db, 0x49db, 0xe7bf, 0x4adb, 0xf2b9, 0xbcf5, 0xcdf5, 0x4bdb, 0x4cdb, 0xb7c2, 0x4ddb, 0x4edb, 0x4fdb, 0xf8cc, 0x50db, 0xf9bc, 0x51db, 0xcef5, 0xcff5, 0xd1f5, 0xe5b6, 0xd2f5, 0x52db, 0xd5f5, 0x53db, 0x54db, 0x55db, 0x56db, 0x57db, 0x58db, 0x59db, 0xbdf5, 0x5adb, 0x5bdb, 0x5cdb, 0xd4f5, 0xbbd3, 0x5ddb, 0xecb3, 0x5edb, 0x5fdb, 0xa4cc, 0x60db, 0x61db, 0x62db, 0x63db, 0xd6f5, 0x64db, 0x65db, 0x66db, 0x67db, 0x68db, 0x69db, 0x6adb, 0x6bdb, 0xd7f5, 0xe1be, 0xd8f5, 0x6cdb, 0x6ddb, 0xdfcc, 0xdbf5, 0x6edb, 0x6fdb, 0x70db, 0x71db, 0x72db, 0xc8b2, 0xd9d7, 0x73db, 0xd9f5, 0x74db, 0xdaf5, 0xdcf5, 0x75db, 0xe2f5, 0x76db, 0x77db, 0x78db, 0xe0f5, 0x79db, 0x7adb, 0x7bdb, 0xdff5, 0xddf5, 0x7cdb, 0x7ddb, 0xe1f5, 0x7edb, 0x80db, 0xdef5, 0xe4f5, 0xe5f5, 0x81db, 0xe3cc, 0x82db, 0x83db, 0xbfe5, 0xb8b5, 0xe3f5, 0xe8f5, 0xa3cc, 0x84db, 0x85db, 0x86db, 0x87db, 0x88db, 0xe6f5, 0xe7f5, 0x89db, 0x8adb, 0x8bdb, 0x8cdb, 0x8ddb, 0x8edb, 0xbef5, 0x8fdb, 0x90db, 0x91db, 0x92db, 0x93db, 0x94db, 0x95db, 0x96db, 0x97db, 0x98db, 0x99db, 0x9adb, 0xc4b1, 0x9bdb, 0x9cdb, 0xbff5, 0x9ddb, 0x9edb, 0xc5b5, 0xe4b2, 0x9fdb, 0xecf5, 0xe9f5, 0xa0db, 0xd7b6, 0x40dc, 0xedf5, 0x41dc, 0xeaf5, 0x42dc, 0x43dc, 0x44dc, 0x45dc, 0x46dc, 0xebf5, 0x47dc, 0x48dc, 0xdab4, 0x49dc, 0xead4, 0x4adc, 0x4bdc, 0x4cdc, 0xeef5, 0x4ddc, 0xf9b3, 0x4edc, 0x4fdc, 0x50dc, 0x51dc, 0x52dc, 0x53dc, 0x54dc, 0xeff5, 0xf1f5, 0x55dc, 0x56dc, 0x57dc, 0xf0f5, 0x58dc, 0x59dc, 0x5adc, 0x5bdc, 0x5cdc, 0x5ddc, 0x5edc, 0xf2f5, 0x5fdc, 0xf3f5, 0x60dc, 0x61dc, 0x62dc, 0x63dc, 0x64dc, 0x65dc, 0x66dc, 0x67dc, 0x68dc, 0x69dc, 0x6adc, 0x6bdc, 0xedc9, 0xaab9, 0x6cdc, 0x6ddc, 0xfbc7, 0x6edc, 0x6fdc, 0xe3b6, 0x70dc, 0x71dc, 0x72dc, 0x73dc, 0x74dc, 0x75dc, 0x76dc, 0xc9cc, 0x77dc, 0x78dc, 0x79dc, 0x7adc, 0x7bdc, 0x7cdc, 0x7ddc, 0x7edc, 0x80dc, 0x81dc, 0x82dc, 0x83dc, 0x84dc, 0x85dc, 0x86dc, 0x87dc, 0x88dc, 0x89dc, 0x8adc, 0xa6ea, 0x8bdc, 0x8cdc, 0x8ddc, 0x8edc, 0x8fdc, 0x90dc, 0x91dc, 0x92dc, 0x93dc, 0x94dc, 0x95dc, 0x96dc, 0x97dc, 0x98dc, 0x99dc, 0x9adc, 0x9bdc, 0x9cdc, 0x9ddc, 0x9edc, 0x9fdc, 0xa0dc, 0x40dd, 0x41dd, 0x42dd, 0x43dd, 0x44dd, 0x45dd, 0x46dd, 0x47dd, 0x48dd, 0x49dd, 0x4add, 0x4bdd, 0x4cdd, 0x4ddd, 0x4edd, 0x4fdd, 0x50dd, 0x51dd, 0x52dd, 0x53dd, 0x54dd, 0x55dd, 0x56dd, 0x57dd, 0x58dd, 0x59dd, 0x5add, 0x5bdd, 0x5cdd, 0x5ddd, 0x5edd, 0x5fdd, 0x60dd, 0x61dd, 0x62dd, 0x63dd, 0x64dd, 0x65dd, 0x66dd, 0x67dd, 0x68dd, 0x69dd, 0x6add, 0x6bdd, 0x6cdd, 0x6ddd, 0x6edd, 0x6fdd, 0x70dd, 0x71dd, 0x72dd, 0x73dd, 0x74dd, 0x75dd, 0x76dd, 0x77dd, 0x78dd, 0x79dd, 0x7add, 0x7bdd, 0x7cdd, 0x7ddd, 0x7edd, 0x80dd, 0x81dd, 0x82dd, 0x83dd, 0x84dd, 0x85dd, 0x86dd, 0x87dd, 0x88dd, 0x89dd, 0x8add, 0x8bdd, 0x8cdd, 0x8ddd, 0x8edd, 0x8fdd, 0x90dd, 0x91dd, 0x92dd, 0x93dd, 0x94dd, 0x95dd, 0x96dd, 0x97dd, 0x98dd, 0x99dd, 0x9add, 0x9bdd, 0x9cdd, 0x9ddd, 0x9edd, 0x9fdd, 0xa0dd, 0x40de, 0x41de, 0x42de, 0x43de, 0x44de, 0x45de, 0x46de, 0x47de, 0x48de, 0x49de, 0x4ade, 0x4bde, 0x4cde, 0x4dde, 0x4ede, 0x4fde, 0x50de, 0x51de, 0x52de, 0x53de, 0x54de, 0x55de, 0x56de, 0x57de, 0x58de, 0x59de, 0x5ade, 0x5bde, 0x5cde, 0x5dde, 0x5ede, 0x5fde, 0x60de, 0xb5b3, 0xfed4, 0xecb9, 0xf9d0, 0x61de, 0xede9, 0xaad7, 0xeee9, 0xd6c2, 0xedc8, 0xe4ba, 0xefe9, 0xf0e9, 0xf1e9, 0xe1d6, 0xf2e9, 0xf3e9, 0xf5e9, 0xf4e9, 0xf6e9, 0xf7e9, 0xe1c7, 0xf8e9, 0xd8d4, 0xf9e9, 0xcebd, 0x62de, 0xfae9, 0xfbe9, 0xcfbd, 0xfce9, 0xa8b8, 0xbec1, 0xfde9, 0xb2b1, 0xd4bb, 0xf5b9, 0xfee9, 0x63de, 0xa1ea, 0xa2ea, 0xa3ea, 0xf8b7, 0xadbc, 0x64de, 0xe4ca, 0xcee0, 0xafd4, 0xbdcf, 0xb7d5, 0xa4ea, 0xded5, 0xa5ea, 0xc1d0, 0xbcb9, 0x65de, 0xc7b4, 0xd9b1, 0x66de, 0x67de, 0x68de, 0xb1c0, 0x69de, 0x6ade, 0x6bde, 0x6cde, 0xe6b1, 0xe7b1, 0x6dde, 0xe8b1, 0x6ede, 0x6fde, 0x70de, 0x71de, 0xbdb3, 0xe8c8, 0x72de, 0x73de, 0x74de, 0x75de, 0xc1e5, 0x76de, 0x77de, 0xdfb1, 0x78de, 0x79de, 0x7ade, 0xc9c1, 0xefb4, 0x7bde, 0x7cde, 0xa8c7, 0xd8d3, 0x7dde, 0xf9c6, 0xb8d1, 0x7ede, 0xfdb9, 0xf5c2, 0x80de, 0x81de, 0x82de, 0x83de, 0x84de, 0xadd3, 0x85de, 0xcbd4, 0xfcbd, 0x86de, 0xc2e5, 0xb5b7, 0xc3e5, 0x87de, 0x88de, 0xb9bb, 0xe2d5, 0x89de, 0xf8bd, 0xb6d4, 0xa5ce, 0xacc1, 0xd9b3, 0x8ade, 0x8bde, 0xf6cc, 0x8cde, 0xc6e5, 0xc4e5, 0xc8e5, 0x8dde, 0xcae5, 0xc7e5, 0xcfb5, 0xc8c6, 0x8ede, 0xfcb5, 0xc5e5, 0x8fde, 0xf6ca, 0x90de, 0x91de, 0xc9e5, 0x92de, 0x93de, 0x94de, 0xd4c3, 0xc5b1, 0xa3bc, 0x95de, 0x96de, 0x97de, 0xb7d7, 0x98de, 0x99de, 0xcbcd, 0xcdcb, 0xcaca, 0xd3cc, 0xcce5, 0xcbe5, 0xe6c4, 0x9ade, 0x9bde, 0xa1d1, 0xb7d1, 0xcde5, 0x9cde, 0xd0e5, 0x9dde, 0xb8cd, 0xf0d6, 0xcfe5, 0xddb5, 0x9ede, 0xbecd, 0x9fde, 0xd1e5, 0xbab6, 0xa0de, 0x40df, 0xa8cd, 0xe4b9, 0x41df, 0xc5ca, 0xd1b3, 0xd9cb, 0xecd4, 0xd2e5, 0xeab7, 0x42df, 0x43df, 0x44df, 0xcee5, 0x45df, 0x46df, 0x47df, 0x48df, 0x49df, 0x4adf, 0xd5e5, 0xfeb4, 0xd6e5, 0x4bdf, 0x4cdf, 0x4ddf, 0x4edf, 0x4fdf, 0xd3e5, 0xd4e5, 0x50df, 0xddd2, 0x51df, 0x52df, 0xdfc2, 0xc6b1, 0x53df, 0xe2d3, 0x54df, 0x55df, 0xddb6, 0xeccb, 0x56df, 0xd7e5, 0x57df, 0x58df, 0xf6d3, 0x59df, 0x5adf, 0x5bdf, 0x5cdf, 0x5ddf, 0xe9b1, 0x5edf, 0xf4b6, 0xdae5, 0xd8e5, 0xd9e5, 0xc0b5, 0x5fdf, 0x60df, 0x61df, 0xc5d2, 0xdce5, 0x62df, 0x63df, 0xdee5, 0x64df, 0x65df, 0x66df, 0x67df, 0x68df, 0x69df, 0xdde5, 0xb2c7, 0x6adf, 0xa3d2, 0x6bdf, 0x6cdf, 0xdbe5, 0x6ddf, 0x6edf, 0x6fdf, 0x70df, 0xe2d4, 0xdad5, 0x71df, 0x72df, 0x73df, 0x74df, 0x75df, 0xe0e5, 0xf1d7, 0x76df, 0x77df, 0x78df, 0x79df, 0x7adf, 0x7bdf, 0x7cdf, 0xe1e5, 0x7ddf, 0xdcb1, 0xfbd1, 0x7edf, 0xe2e5, 0xe4e5, 0x80df, 0x81df, 0x82df, 0x83df, 0xe3e5, 0x84df, 0x85df, 0xe5e5, 0x86df, 0x87df, 0x88df, 0x89df, 0x8adf, 0xd8d2, 0x8bdf, 0xcbb5, 0x8cdf, 0xdfe7, 0x8ddf, 0xf5da, 0x8edf, 0xf8da, 0x8fdf, 0xf6da, 0x90df, 0xf7da, 0x91df, 0x92df, 0x93df, 0xfada, 0xcfd0, 0xc7c4, 0x94df, 0x95df, 0xeeb0, 0x96df, 0x97df, 0x98df, 0xb0d0, 0x99df, 0xf9da, 0x9adf, 0xcad3, 0xaaba, 0xa2db, 0xf1c7, 0x9bdf, 0xfcda, 0xfbda, 0xdbc9, 0xfdda, 0x9cdf, 0xa1db, 0xded7, 0xfeda, 0xdac1, 0x9ddf, 0x9edf, 0xa5db, 0x9fdf, 0xa0df, 0xf4d3, 0x40e0, 0x41e0, 0xa7db, 0xa4db, 0x42e0, 0xa8db, 0x43e0, 0x44e0, 0xbcbd, 0x45e0, 0x46e0, 0x47e0, 0xc9c0, 0xa3db, 0xa6db, 0xa3d6, 0x48e0, 0xa9db, 0x49e0, 0x4ae0, 0x4be0, 0xaddb, 0x4ce0, 0x4de0, 0x4ee0, 0xaedb, 0xacdb, 0xc2ba, 0x4fe0, 0x50e0, 0x51e0, 0xa4bf, 0xabdb, 0x52e0, 0x53e0, 0x54e0, 0xaadb, 0xc7d4, 0xbfb2, 0x55e0, 0x56e0, 0xafdb, 0x57e0, 0xf9b9, 0x58e0, 0xb0db, 0x59e0, 0x5ae0, 0x5be0, 0x5ce0, 0xbbb3, 0x5de0, 0x5ee0, 0x5fe0, 0xa6b5, 0x60e0, 0x61e0, 0x62e0, 0x63e0, 0xbcb6, 0xb1db, 0x64e0, 0x65e0, 0x66e0, 0xf5b6, 0x67e0, 0xb2db, 0x68e0, 0x69e0, 0x6ae0, 0x6be0, 0x6ce0, 0x6de0, 0x6ee0, 0x6fe0, 0x70e0, 0x71e0, 0x72e0, 0x73e0, 0x74e0, 0x75e0, 0x76e0, 0x77e0, 0x78e0, 0x79e0, 0x7ae0, 0x7be0, 0xc9b1, 0x7ce0, 0x7de0, 0x7ee0, 0x80e0, 0xb4db, 0x81e0, 0x82e0, 0x83e0, 0xb3db, 0xb5db, 0x84e0, 0x85e0, 0x86e0, 0x87e0, 0x88e0, 0x89e0, 0x8ae0, 0x8be0, 0x8ce0, 0x8de0, 0x8ee0, 0xb7db, 0x8fe0, 0xb6db, 0x90e0, 0x91e0, 0x92e0, 0x93e0, 0x94e0, 0x95e0, 0x96e0, 0xb8db, 0x97e0, 0x98e0, 0x99e0, 0x9ae0, 0x9be0, 0x9ce0, 0x9de0, 0x9ee0, 0x9fe0, 0xb9db, 0xa0e0, 0x40e1, 0xbadb, 0x41e1, 0x42e1, 0xcfd3, 0xfaf4, 0xf5c7, 0xc3d7, 0xe4c5, 0xfcf4, 0xfdf4, 0xfbf4, 0x43e1, 0xc6be, 0x44e1, 0x45e1, 0x46e1, 0x47e1, 0xefd0, 0x48e1, 0x49e1, 0xd3b7, 0x4ae1, 0x4be1, 0xcdd4, 0xaacc, 0x4ce1, 0x4de1, 0xa2f5, 0xa1f5, 0xa8ba, 0xfef4, 0xd6cb, 0x4ee1, 0x4fe1, 0x50e1, 0xa4f5, 0xd2c0, 0x51e1, 0xeab3, 0x52e1, 0xaacd, 0xa5f5, 0xa3f5, 0xb4bd, 0xa8f5, 0x53e1, 0xa9f5, 0xcdbd, 0xb8c3, 0xe1bf, 0xe1cb, 0xaaf5, 0x54e1, 0x55e1, 0x56e1, 0xa6f5, 0xa7f5, 0xf0c4, 0x57e1, 0x58e1, 0x59e1, 0x5ae1, 0x5be1, 0xacf5, 0x5ce1, 0xbcb4, 0x5de1, 0xedd7, 0x5ee1, 0xd7b4, 0xabf5, 0xaef5, 0x5fe1, 0x60e1, 0xadf5, 0xaff5, 0xd1d0, 0x61e1, 0x62e1, 0x63e1, 0x64e1, 0x65e1, 0x66e1, 0x67e1, 0xd1c3, 0xa9c8, 0x68e1, 0x69e1, 0x6ae1, 0x6be1, 0x6ce1, 0x6de1, 0xb0f5, 0xb1f5, 0x6ee1, 0x6fe1, 0x70e1, 0x71e1, 0x72e1, 0x73e1, 0xb2f5, 0x74e1, 0x75e1, 0xb3f5, 0xb4f5, 0xb5f5, 0x76e1, 0x77e1, 0x78e1, 0x79e1, 0xb7f5, 0xb6f5, 0x7ae1, 0x7be1, 0x7ce1, 0x7de1, 0xb8f5, 0x7ee1, 0x80e1, 0x81e1, 0x82e1, 0x83e1, 0x84e1, 0x85e1, 0x86e1, 0x87e1, 0x88e1, 0x89e1, 0x8ae1, 0xc9b2, 0x8be1, 0xd4d3, 0xcdca, 0x8ce1, 0xefc0, 0xd8d6, 0xb0d2, 0xbfc1, 0x8de1, 0xf0bd, 0x8ee1, 0x8fe1, 0x90e1, 0x91e1, 0x92e1, 0x93e1, 0x94e1, 0x95e1, 0x96e1, 0x97e1, 0xaab8, 0x98e1, 0x99e1, 0x9ae1, 0x9be1, 0x9ce1, 0x9de1, 0x9ee1, 0x9fe1, 0xa0e1, 0x40e2, 0x41e2, 0x42e2, 0x43e2, 0x44e2, 0x45e2, 0x46e2, 0x47e2, 0x48e2, 0x49e2, 0x4ae2, 0x4be2, 0x4ce2, 0x4de2, 0x4ee2, 0x4fe2, 0x50e2, 0x51e2, 0x52e2, 0x53e2, 0x54e2, 0x55e2, 0x56e2, 0x57e2, 0x58e2, 0x59e2, 0x5ae2, 0x5be2, 0x5ce2, 0x5de2, 0x5ee2, 0x5fe2, 0x60e2, 0x61e2, 0x62e2, 0x63e2, 0x64e2, 0x65e2, 0x66e2, 0x67e2, 0x68e2, 0x69e2, 0x6ae2, 0x6be2, 0x6ce2, 0x6de2, 0x6ee2, 0x6fe2, 0x70e2, 0x71e2, 0x72e2, 0x73e2, 0x74e2, 0x75e2, 0x76e2, 0x77e2, 0x78e2, 0x79e2, 0x7ae2, 0x7be2, 0x7ce2, 0x7de2, 0x7ee2, 0x80e2, 0x81e2, 0x82e2, 0x83e2, 0x84e2, 0x85e2, 0x86e2, 0x87e2, 0x88e2, 0x89e2, 0x8ae2, 0x8be2, 0x8ce2, 0x8de2, 0x8ee2, 0x8fe2, 0x90e2, 0x91e2, 0x92e2, 0x93e2, 0x94e2, 0x95e2, 0x96e2, 0x97e2, 0x98e2, 0x99e2, 0x9ae2, 0x9be2, 0x9ce2, 0x9de2, 0x9ee2, 0x9fe2, 0xa0e2, 0x40e3, 0x41e3, 0x42e3, 0x43e3, 0x44e3, 0x45e3, 0x46e3, 0x47e3, 0x48e3, 0x49e3, 0x4ae3, 0x4be3, 0x4ce3, 0x4de3, 0x4ee3, 0x4fe3, 0x50e3, 0x51e3, 0x52e3, 0x53e3, 0x54e3, 0x55e3, 0x56e3, 0x57e3, 0x58e3, 0x59e3, 0x5ae3, 0x5be3, 0x5ce3, 0x5de3, 0x5ee3, 0x5fe3, 0x60e3, 0x61e3, 0x62e3, 0x63e3, 0x64e3, 0x65e3, 0x66e3, 0x67e3, 0x68e3, 0x69e3, 0x6ae3, 0x6be3, 0x6ce3, 0x6de3, 0xf8bc, 0x6ee3, 0x6fe3, 0x70e3, 0x71e3, 0x72e3, 0x73e3, 0x74e3, 0x75e3, 0x76e3, 0x77e3, 0x78e3, 0x79e3, 0x7ae3, 0x7be3, 0x7ce3, 0x7de3, 0x7ee3, 0x80e3, 0x81e3, 0x82e3, 0x83e3, 0x84e3, 0x85e3, 0x86e3, 0x87e3, 0xc6f6, 0x88e3, 0x89e3, 0x8ae3, 0x8be3, 0x8ce3, 0x8de3, 0x8ee3, 0x8fe3, 0x90e3, 0x91e3, 0x92e3, 0x93e3, 0x94e3, 0x95e3, 0x96e3, 0x97e3, 0x98e3, 0x99e3, 0x9ae3, 0x9be3, 0x9ce3, 0x9de3, 0x9ee3, 0x9fe3, 0xa0e3, 0x40e4, 0x41e4, 0x42e4, 0x43e4, 0x44e4, 0x45e4, 0xc7f6, 0x46e4, 0x47e4, 0x48e4, 0x49e4, 0x4ae4, 0x4be4, 0x4ce4, 0x4de4, 0x4ee4, 0x4fe4, 0x50e4, 0x51e4, 0x52e4, 0x53e4, 0x54e4, 0x55e4, 0x56e4, 0x57e4, 0x58e4, 0x59e4, 0x5ae4, 0x5be4, 0x5ce4, 0x5de4, 0x5ee4, 0xc8f6, 0x5fe4, 0x60e4, 0x61e4, 0x62e4, 0x63e4, 0x64e4, 0x65e4, 0x66e4, 0x67e4, 0x68e4, 0x69e4, 0x6ae4, 0x6be4, 0x6ce4, 0x6de4, 0x6ee4, 0x6fe4, 0x70e4, 0x71e4, 0x72e4, 0x73e4, 0x74e4, 0x75e4, 0x76e4, 0x77e4, 0x78e4, 0x79e4, 0x7ae4, 0x7be4, 0x7ce4, 0x7de4, 0x7ee4, 0x80e4, 0x81e4, 0x82e4, 0x83e4, 0x84e4, 0x85e4, 0x86e4, 0x87e4, 0x88e4, 0x89e4, 0x8ae4, 0x8be4, 0x8ce4, 0x8de4, 0x8ee4, 0x8fe4, 0x90e4, 0x91e4, 0x92e4, 0x93e4, 0x94e4, 0x95e4, 0x96e4, 0x97e4, 0x98e4, 0x99e4, 0x9ae4, 0x9be4, 0x9ce4, 0x9de4, 0x9ee4, 0x9fe4, 0xa0e4, 0x40e5, 0x41e5, 0x42e5, 0x43e5, 0x44e5, 0x45e5, 0x46e5, 0x47e5, 0x48e5, 0x49e5, 0x4ae5, 0x4be5, 0x4ce5, 0x4de5, 0x4ee5, 0x4fe5, 0x50e5, 0x51e5, 0x52e5, 0x53e5, 0x54e5, 0x55e5, 0x56e5, 0x57e5, 0x58e5, 0x59e5, 0x5ae5, 0x5be5, 0x5ce5, 0x5de5, 0x5ee5, 0x5fe5, 0x60e5, 0x61e5, 0x62e5, 0x63e5, 0x64e5, 0x65e5, 0x66e5, 0x67e5, 0x68e5, 0x69e5, 0x6ae5, 0x6be5, 0x6ce5, 0x6de5, 0x6ee5, 0x6fe5, 0x70e5, 0x71e5, 0x72e5, 0x73e5, 0xc9f6, 0x74e5, 0x75e5, 0x76e5, 0x77e5, 0x78e5, 0x79e5, 0x7ae5, 0x7be5, 0x7ce5, 0x7de5, 0x7ee5, 0x80e5, 0x81e5, 0x82e5, 0x83e5, 0x84e5, 0x85e5, 0x86e5, 0x87e5, 0x88e5, 0x89e5, 0x8ae5, 0x8be5, 0x8ce5, 0x8de5, 0x8ee5, 0x8fe5, 0x90e5, 0x91e5, 0x92e5, 0x93e5, 0x94e5, 0x95e5, 0x96e5, 0x97e5, 0x98e5, 0x99e5, 0x9ae5, 0x9be5, 0x9ce5, 0x9de5, 0x9ee5, 0x9fe5, 0xcaf6, 0xa0e5, 0x40e6, 0x41e6, 0x42e6, 0x43e6, 0x44e6, 0x45e6, 0x46e6, 0x47e6, 0x48e6, 0x49e6, 0x4ae6, 0x4be6, 0x4ce6, 0x4de6, 0x4ee6, 0x4fe6, 0x50e6, 0x51e6, 0x52e6, 0x53e6, 0x54e6, 0x55e6, 0x56e6, 0x57e6, 0x58e6, 0x59e6, 0x5ae6, 0x5be6, 0x5ce6, 0x5de6, 0x5ee6, 0x5fe6, 0x60e6, 0x61e6, 0x62e6, 0xccf6, 0x63e6, 0x64e6, 0x65e6, 0x66e6, 0x67e6, 0x68e6, 0x69e6, 0x6ae6, 0x6be6, 0x6ce6, 0x6de6, 0x6ee6, 0x6fe6, 0x70e6, 0x71e6, 0x72e6, 0x73e6, 0x74e6, 0x75e6, 0x76e6, 0x77e6, 0x78e6, 0x79e6, 0x7ae6, 0x7be6, 0x7ce6, 0x7de6, 0x7ee6, 0x80e6, 0x81e6, 0x82e6, 0x83e6, 0x84e6, 0x85e6, 0x86e6, 0x87e6, 0x88e6, 0x89e6, 0x8ae6, 0x8be6, 0x8ce6, 0x8de6, 0x8ee6, 0x8fe6, 0x90e6, 0x91e6, 0x92e6, 0x93e6, 0x94e6, 0x95e6, 0x96e6, 0x97e6, 0x98e6, 0x99e6, 0x9ae6, 0x9be6, 0x9ce6, 0x9de6, 0xcbf6, 0x9ee6, 0x9fe6, 0xa0e6, 0x40e7, 0x41e7, 0x42e7, 0x43e7, 0x44e7, 0x45e7, 0x46e7, 0x47e7, 0xe9f7, 0x48e7, 0x49e7, 0x4ae7, 0x4be7, 0x4ce7, 0x4de7, 0x4ee7, 0x4fe7, 0x50e7, 0x51e7, 0x52e7, 0x53e7, 0x54e7, 0x55e7, 0x56e7, 0x57e7, 0x58e7, 0x59e7, 0x5ae7, 0x5be7, 0x5ce7, 0x5de7, 0x5ee7, 0x5fe7, 0x60e7, 0x61e7, 0x62e7, 0x63e7, 0x64e7, 0x65e7, 0x66e7, 0x67e7, 0x68e7, 0x69e7, 0x6ae7, 0x6be7, 0x6ce7, 0x6de7, 0x6ee7, 0x6fe7, 0x70e7, 0x71e7, 0x72e7, 0x73e7, 0x74e7, 0x75e7, 0x76e7, 0x77e7, 0x78e7, 0x79e7, 0x7ae7, 0x7be7, 0x7ce7, 0x7de7, 0x7ee7, 0x80e7, 0x81e7, 0x82e7, 0x83e7, 0x84e7, 0x85e7, 0x86e7, 0x87e7, 0x88e7, 0x89e7, 0x8ae7, 0x8be7, 0x8ce7, 0x8de7, 0x8ee7, 0x8fe7, 0x90e7, 0x91e7, 0x92e7, 0x93e7, 0x94e7, 0x95e7, 0x96e7, 0x97e7, 0x98e7, 0x99e7, 0x9ae7, 0x9be7, 0x9ce7, 0x9de7, 0x9ee7, 0x9fe7, 0xa0e7, 0x40e8, 0x41e8, 0x42e8, 0x43e8, 0x44e8, 0x45e8, 0x46e8, 0x47e8, 0x48e8, 0x49e8, 0x4ae8, 0x4be8, 0x4ce8, 0x4de8, 0x4ee8, 0xcdf6, 0x4fe8, 0x50e8, 0x51e8, 0x52e8, 0x53e8, 0x54e8, 0x55e8, 0x56e8, 0x57e8, 0x58e8, 0x59e8, 0x5ae8, 0x5be8, 0x5ce8, 0x5de8, 0x5ee8, 0x5fe8, 0x60e8, 0x61e8, 0x62e8, 0x63e8, 0x64e8, 0x65e8, 0x66e8, 0x67e8, 0x68e8, 0x69e8, 0x6ae8, 0x6be8, 0x6ce8, 0x6de8, 0x6ee8, 0x6fe8, 0x70e8, 0x71e8, 0x72e8, 0x73e8, 0x74e8, 0x75e8, 0x76e8, 0x77e8, 0x78e8, 0x79e8, 0x7ae8, 0xcef6, 0x7be8, 0x7ce8, 0x7de8, 0x7ee8, 0x80e8, 0x81e8, 0x82e8, 0x83e8, 0x84e8, 0x85e8, 0x86e8, 0x87e8, 0x88e8, 0x89e8, 0x8ae8, 0x8be8, 0x8ce8, 0x8de8, 0x8ee8, 0x8fe8, 0x90e8, 0x91e8, 0x92e8, 0x93e8, 0x94e8, 0xc4ee, 0xc5ee, 0xc6ee, 0xebd5, 0xa4b6, 0xc8ee, 0xc7ee, 0xc9ee, 0xcaee, 0xa5c7, 0xcbee, 0xccee, 0x95e8, 0xb0b7, 0xf6b5, 0xcdee, 0xcfee, 0x96e8, 0xceee, 0x97e8, 0xc6b8, 0xd0ee, 0xd1ee, 0xd2ee, 0xdbb6, 0xaeb3, 0xd3d6, 0xc6c4, 0xb5b1, 0xd6b8, 0xd3ee, 0xd4ee, 0xbfd4, 0xd5c7, 0xfbbe, 0xd9ce, 0xb3b9, 0xd6ee, 0xd5ee, 0xd8ee, 0xd7ee, 0xa5c5, 0xd9ee, 0xdaee, 0xaec7, 0xdbee, 0xafc7, 0xdcee, 0xa7b2, 0xddee, 0xdeee, 0xdfee, 0xe0ee, 0xe1ee, 0xead7, 0xe2ee, 0xe3ee, 0xd8bc, 0xe4ee, 0xcbd3, 0xfacc, 0xacb2, 0xe5c1, 0xe5ee, 0xa6c7, 0xadc3, 0x98e8, 0xe6ee, 0xe7ee, 0xe8ee, 0xe9ee, 0xeaee, 0xebee, 0xecee, 0x99e8, 0xedee, 0xeeee, 0xefee, 0x9ae8, 0x9be8, 0xf0ee, 0xf1ee, 0xf2ee, 0xf4ee, 0xf3ee, 0x9ce8, 0xf5ee, 0xadcd, 0xc1c2, 0xf6ee, 0xf7ee, 0xf8ee, 0xa1d5, 0xf9ee, 0xb3cf, 0xfaee, 0xfbee, 0x9de8, 0xfcee, 0xfdee, 0xa1ef, 0xfeee, 0xa2ef, 0xf5b8, 0xfac3, 0xa3ef, 0xa4ef, 0xc2bd, 0xbfd2, 0xf9b2, 0xa5ef, 0xa6ef, 0xa7ef, 0xf8d2, 0xa8ef, 0xfdd6, 0xa9ef, 0xccc6, 0x9ee8, 0xaaef, 0xabef, 0xb4c1, 0xacef, 0xfacf, 0xf8cb, 0xaeef, 0xadef, 0xfab3, 0xf8b9, 0xafef, 0xb0ef, 0xe2d0, 0xb1ef, 0xb2ef, 0xe6b7, 0xbfd0, 0xb3ef, 0xb4ef, 0xb5ef, 0xf1c8, 0xe0cc, 0xb6ef, 0xb7ef, 0xb8ef, 0xb9ef, 0xbaef, 0xe0d5, 0xbbef, 0xedb4, 0xaac3, 0xbcef, 0x9fe8, 0xbdef, 0xbeef, 0xbfef, 0xa0e8, 0xfdce, 0xc0ef, 0xe0c2, 0xb8b4, 0xb6d7, 0xf5bd, 0x40e9, 0xc7cf, 0xc3ef, 0xc1ef, 0xc2ef, 0xc4ef, 0xa7b6, 0xfcbc, 0xe2be, 0xccc3, 0xc5ef, 0xc6ef, 0x41e9, 0xc7ef, 0xcfef, 0xc8ef, 0xc9ef, 0xcaef, 0xc2c7, 0xf1ef, 0xcdb6, 0xcbef, 0x42e9, 0xccef, 0xcdef, 0xc6b6, 0xbec3, 0xceef, 0x43e9, 0xd0ef, 0xd1ef, 0xd2ef, 0xf2d5, 0x44e9, 0xd3ef, 0xf7c4, 0x45e9, 0xd4ef, 0xf8c4, 0xd5ef, 0xd6ef, 0xe4b8, 0xf7b0, 0xd7ef, 0xd8ef, 0xd9ef, 0x46e9, 0xdaef, 0xdbef, 0xdcef, 0xddef, 0x47e9, 0xdeef, 0xb5be, 0xe1ef, 0xdfef, 0xe0ef, 0x48e9, 0xe2ef, 0xe3ef, 0xcdc1, 0xe4ef, 0xe5ef, 0xe6ef, 0xe7ef, 0xe8ef, 0xe9ef, 0xeaef, 0xebef, 0xecef, 0xd8c0, 0x49e9, 0xedef, 0xadc1, 0xeeef, 0xefef, 0xf0ef, 0x4ae9, 0x4be9, 0xe2cf, 0x4ce9, 0x4de9, 0x4ee9, 0x4fe9, 0x50e9, 0x51e9, 0x52e9, 0x53e9, 0xa4b3, 0x54e9, 0x55e9, 0x56e9, 0x57e9, 0x58e9, 0x59e9, 0x5ae9, 0x5be9, 0x5ce9, 0x5de9, 0x5ee9, 0x5fe9, 0x60e9, 0x61e9, 0x62e9, 0x63e9, 0x64e9, 0x65e9, 0x66e9, 0x67e9, 0x68e9, 0x69e9, 0x6ae9, 0x6be9, 0x6ce9, 0x6de9, 0x6ee9, 0x6fe9, 0x70e9, 0x71e9, 0x72e9, 0x73e9, 0x74e9, 0x75e9, 0x76e9, 0x77e9, 0x78e9, 0x79e9, 0x7ae9, 0x7be9, 0x7ce9, 0x7de9, 0x7ee9, 0x80e9, 0x81e9, 0x82e9, 0x83e9, 0x84e9, 0x85e9, 0x86e9, 0x87e9, 0x88e9, 0x89e9, 0x8ae9, 0x8be9, 0x8ce9, 0x8de9, 0x8ee9, 0x8fe9, 0x90e9, 0x91e9, 0x92e9, 0x93e9, 0x94e9, 0x95e9, 0x96e9, 0x97e9, 0x98e9, 0x99e9, 0x9ae9, 0x9be9, 0x9ce9, 0x9de9, 0x9ee9, 0x9fe9, 0xa0e9, 0x40ea, 0x41ea, 0x42ea, 0x43ea, 0x44ea, 0x45ea, 0x46ea, 0x47ea, 0x48ea, 0x49ea, 0x4aea, 0x4bea, 0x4cea, 0x4dea, 0x4eea, 0x4fea, 0x50ea, 0x51ea, 0x52ea, 0x53ea, 0x54ea, 0x55ea, 0x56ea, 0x57ea, 0x58ea, 0x59ea, 0x5aea, 0x5bea, 0xc5c3, 0xc5e3, 0xc1c9, 0xc6e3, 0x5cea, 0xd5b1, 0xcace, 0xb3b4, 0xf2c8, 0xc7e3, 0xd0cf, 0xc8e3, 0xe4bc, 0xc9e3, 0xcae3, 0xc6c3, 0xa2d5, 0xd6c4, 0xebb9, 0xc5ce, 0xcbe3, 0xf6c3, 0xcce3, 0x5dea, 0xa7b7, 0xf3b8, 0xd2ba, 0xcde3, 0xcee3, 0xc4d4, 0xcfe3, 0x5eea, 0xd0e3, 0xcbd1, 0xd1e3, 0xd2e3, 0xd3e3, 0xd4e3, 0xd6d1, 0xd5e3, 0xfbb2, 0xbbc0, 0xd6e3, 0x5fea, 0xabc0, 0xd7e3, 0xd8e3, 0xd9e3, 0x60ea, 0xdae3, 0xdbe3, 0x61ea, 0xb7b8, 0xe2da, 0x62ea, 0xd3b6, 0x63ea, 0xe4da, 0xe3da, 0x64ea, 0x65ea, 0x66ea, 0x67ea, 0x68ea, 0x69ea, 0x6aea, 0xe6da, 0x6bea, 0x6cea, 0x6dea, 0xeec8, 0x6eea, 0x6fea, 0xe5da, 0xc0b7, 0xf4d1, 0xf5d2, 0xf3d5, 0xd7bd, 0x70ea, 0x71ea, 0x72ea, 0x73ea, 0xe8d7, 0xe8da, 0xe7da, 0x74ea, 0xa2b0, 0xd3cd, 0x75ea, 0xe9da, 0x76ea, 0xbdb8, 0xcabc, 0xbdc2, 0xa4c2, 0xc2b3, 0xeada, 0x77ea, 0xaac2, 0xb0c4, 0xb5bd, 0x78ea, 0x79ea, 0xdecf, 0x7aea, 0x7bea, 0x7cea, 0xebda, 0xc2c9, 0x7dea, 0x7eea, 0x80ea, 0x81ea, 0x82ea, 0xddb1, 0x83ea, 0x84ea, 0x85ea, 0xecda, 0x86ea, 0xb8b6, 0xbad4, 0x87ea, 0xfdb3, 0x88ea, 0x89ea, 0xedda, 0xc9d4, 0xd5cf, 0xe3c5, 0x8aea, 0xeeda, 0x8bea, 0x8cea, 0x8dea, 0x8eea, 0x8fea, 0xefda, 0x90ea, 0xf0da, 0xeac1, 0xd5cc, 0xddcf, 0x91ea, 0x92ea, 0x93ea, 0x94ea, 0x95ea, 0x96ea, 0x97ea, 0x98ea, 0x99ea, 0x9aea, 0x9bea, 0x9cea, 0x9dea, 0xe7d3, 0xa1c2, 0x9eea, 0xf1da, 0x9fea, 0xa0ea, 0xe5cb, 0x40eb, 0xf2da, 0x41eb, 0xe6cb, 0xfed2, 0x42eb, 0x43eb, 0x44eb, 0xf4b8, 0x45eb, 0x46eb, 0xf3da, 0xafb0, 0xb6cf, 0x47eb, 0x48eb, 0xcfd5, 0x49eb, 0x4aeb, 0x4beb, 0x4ceb, 0x4deb, 0x4eeb, 0x4feb, 0x50eb, 0x51eb, 0x52eb, 0xedcb, 0x53eb, 0x54eb, 0x55eb, 0x56eb, 0x57eb, 0x58eb, 0x59eb, 0x5aeb, 0xf4da, 0x5beb, 0x5ceb, 0xc4e3, 0x5deb, 0x5eeb, 0xa5c1, 0x5feb, 0x60eb, 0xbff6, 0x61eb, 0x62eb, 0xc0f6, 0xc1f6, 0xd1c4, 0x63eb, 0xb8c8, 0xe3d1, 0x64eb, 0x65eb, 0xdbd0, 0xc5d1, 0xafbc, 0xcdb9, 0x66eb, 0xf4ef, 0x67eb, 0x68eb, 0xc6b4, 0xbad3, 0xc2f6, 0xfbb3, 0x69eb, 0x6aeb, 0xc3f6, 0x6beb, 0x6ceb, 0xf1b5, 0x6deb, 0x6eeb, 0x6feb, 0x70eb, 0x71eb, 0x72eb, 0x73eb, 0x74eb, 0x75eb, 0x76eb, 0xc5f6, 0x77eb, 0x78eb, 0x79eb, 0x7aeb, 0x7beb, 0x7ceb, 0x7deb, 0xead3, 0xa7f6, 0xa9d1, 0x7eeb, 0x80eb, 0x81eb, 0x82eb, 0xa9f6, 0x83eb, 0x84eb, 0x85eb, 0xa8f6, 0x86eb, 0x87eb, 0xe3c1, 0xd7c0, 0x88eb, 0xa2b1, 0x89eb, 0x8aeb, 0x8beb, 0x8ceb, 0xedce, 0x8deb, 0xe8d0, 0xabf6, 0x8eeb, 0x8feb, 0xf6cf, 0x90eb, 0xaaf6, 0xf0d5, 0xacf6, 0xb9c3, 0x91eb, 0x92eb, 0x93eb, 0xf4bb, 0xaef6, 0xadf6, 0x94eb, 0x95eb, 0x96eb, 0xdec4, 0x97eb, 0x98eb, 0xd8c1, 0x99eb, 0x9aeb, 0x9beb, 0x9ceb, 0x9deb, 0xaacb, 0x9eeb, 0xbccf, 0x9feb, 0xa0eb, 0x40ec, 0x41ec, 0x42ec, 0x43ec, 0x44ec, 0x45ec, 0x46ec, 0x47ec, 0x48ec, 0xaff6, 0x49ec, 0x4aec, 0xb0f6, 0x4bec, 0x4cec, 0xb1f6, 0x4dec, 0xb6c2, 0x4eec, 0x4fec, 0x50ec, 0x51ec, 0x52ec, 0xd4b0, 0xf9c5, 0x53ec, 0x54ec, 0x55ec, 0x56ec, 0xb2f6, 0x57ec, 0x58ec, 0x59ec, 0x5aec, 0x5bec, 0x5cec, 0x5dec, 0x5eec, 0x5fec, 0x60ec, 0x61ec, 0x62ec, 0x63ec, 0x64ec, 0x65ec, 0x66ec, 0x67ec, 0x68ec, 0x69ec, 0xe0c7, 0xa6f6, 0x6aec, 0x6bec, 0xb8be, 0x6cec, 0x6dec, 0xb2be, 0x6eec, 0xe5b5, 0x6fec, 0x70ec, 0xc7b7, 0x71ec, 0xbfbf, 0xd2c3, 0xe6c3, 0x72ec, 0x73ec, 0xccd8, 0x74ec, 0x75ec, 0x76ec, 0xefb8, 0x77ec, 0x78ec, 0x79ec, 0x7aec, 0x7bec, 0x7cec, 0x7dec, 0x7eec, 0x80ec, 0xf9bd, 0xa5d1, 0x81ec, 0xd0b0, 0x82ec, 0x83ec, 0x84ec, 0x85ec, 0x86ec, 0xb0f7, 0x87ec, 0x88ec, 0x89ec, 0x8aec, 0x8bec, 0x8cec, 0x8dec, 0x8eec, 0xb1f7, 0x8fec, 0x90ec, 0x91ec, 0x92ec, 0x93ec, 0xacd0, 0x94ec, 0xb0b0, 0x95ec, 0x96ec, 0x97ec, 0xb2f7, 0xb3f7, 0x98ec, 0xb4f7, 0x99ec, 0x9aec, 0x9bec, 0xcac7, 0x9cec, 0x9dec, 0x9eec, 0x9fec, 0xa0ec, 0x40ed, 0x41ed, 0xcfbe, 0x42ed, 0x43ed, 0xb7f7, 0x44ed, 0x45ed, 0x46ed, 0x47ed, 0x48ed, 0x49ed, 0x4aed, 0xb6f7, 0x4bed, 0xdeb1, 0x4ced, 0xb5f7, 0x4ded, 0x4eed, 0xb8f7, 0x4fed, 0xb9f7, 0x50ed, 0x51ed, 0x52ed, 0x53ed, 0x54ed, 0x55ed, 0x56ed, 0x57ed, 0x58ed, 0x59ed, 0x5aed, 0x5bed, 0x5ced, 0x5ded, 0x5eed, 0x5fed, 0x60ed, 0x61ed, 0x62ed, 0x63ed, 0x64ed, 0x65ed, 0x66ed, 0x67ed, 0x68ed, 0x69ed, 0x6aed, 0x6bed, 0x6ced, 0x6ded, 0x6eed, 0x6fed, 0x70ed, 0x71ed, 0x72ed, 0x73ed, 0x74ed, 0x75ed, 0x76ed, 0x77ed, 0x78ed, 0x79ed, 0x7aed, 0x7bed, 0x7ced, 0x7ded, 0x7eed, 0x80ed, 0x81ed, 0xa4ce, 0xcdc8, 0x82ed, 0xabba, 0xb8e8, 0xb9e8, 0xbae8, 0xc2be, 0x83ed, 0x84ed, 0x85ed, 0x86ed, 0x87ed, 0xf4d2, 0x88ed, 0xcfd4, 0xd8c9, 0x89ed, 0x8aed, 0x8bed, 0x8ced, 0x8ded, 0x8eed, 0x8fed, 0x90ed, 0x91ed, 0x92ed, 0x93ed, 0x94ed, 0x95ed, 0x96ed, 0x97ed, 0x98ed, 0x99ed, 0x9aed, 0x9bed, 0x9ced, 0x9ded, 0x9eed, 0x9fed, 0xa0ed, 0x40ee, 0x41ee, 0x42ee, 0x43ee, 0x44ee, 0x45ee, 0x46ee, 0x47ee, 0x48ee, 0x49ee, 0x4aee, 0x4bee, 0x4cee, 0x4dee, 0x4eee, 0x4fee, 0x50ee, 0x51ee, 0x52ee, 0x53ee, 0x54ee, 0x55ee, 0x56ee, 0x57ee, 0x58ee, 0x59ee, 0x5aee, 0x5bee, 0x5cee, 0x5dee, 0x5eee, 0x5fee, 0x60ee, 0x61ee, 0x62ee, 0x63ee, 0x64ee, 0x65ee, 0x66ee, 0x67ee, 0x68ee, 0x69ee, 0x6aee, 0x6bee, 0x6cee, 0x6dee, 0x6eee, 0x6fee, 0x70ee, 0x71ee, 0x72ee, 0x73ee, 0x74ee, 0x75ee, 0x76ee, 0x77ee, 0x78ee, 0x79ee, 0x7aee, 0x7bee, 0x7cee, 0x7dee, 0x7eee, 0x80ee, 0x81ee, 0x82ee, 0x83ee, 0x84ee, 0x85ee, 0x86ee, 0x87ee, 0x88ee, 0x89ee, 0x8aee, 0x8bee, 0x8cee, 0x8dee, 0x8eee, 0x8fee, 0x90ee, 0x91ee, 0x92ee, 0x93ee, 0x94ee, 0x95ee, 0x96ee, 0x97ee, 0x98ee, 0x99ee, 0x9aee, 0x9bee, 0x9cee, 0x9dee, 0x9eee, 0x9fee, 0xa0ee, 0x40ef, 0x41ef, 0x42ef, 0x43ef, 0x44ef, 0x45ef, 0xb3d2, 0xa5b6, 0xeac7, 0xfcf1, 0xeecf, 0xb3cb, 0xebd0, 0xefe7, 0xe7cd, 0xcbb9, 0xd9b6, 0xfdf1, 0xe4b0, 0xcccb, 0xfef1, 0xa4d4, 0xadc2, 0xecc1, 0xc4c6, 0xb1be, 0xa1f2, 0xd5bc, 0x46ef, 0xa2f2, 0xa3f2, 0x47ef, 0xa4f2, 0xc3d2, 0xb5c6, 0x48ef, 0xc7cd, 0xa5f2, 0x49ef, 0xb1d3, 0xc5bf, 0xe2cc, 0x4aef, 0xa6f2, 0xa7f2, 0xd5d1, 0xeeb6, 0xa8f2, 0xa9f2, 0xdfb5, 0xaaf2, 0xabf2, 0x4bef, 0xfcb2, 0xacf2, 0xadf2, 0xa7c8, 0x4cef, 0x4def, 0x4eef, 0x4fef, 0x50ef, 0x51ef, 0x52ef, 0x53ef, 0x54ef, 0x55ef, 0x56ef, 0x57ef, 0x58ef, 0x59ef, 0x5aef, 0x5bef, 0x5cef, 0x5def, 0x5eef, 0x5fef, 0x60ef, 0x61ef, 0x62ef, 0x63ef, 0x64ef, 0x65ef, 0x66ef, 0x67ef, 0x68ef, 0x69ef, 0x6aef, 0x6bef, 0x6cef, 0x6def, 0x6eef, 0x6fef, 0x70ef, 0x71ef, 0xe7b7, 0x72ef, 0x73ef, 0xa9ec, 0xaaec, 0xabec, 0x74ef, 0xacec, 0x75ef, 0x76ef, 0xaec6, 0xadec, 0xaeec, 0x77ef, 0x78ef, 0x79ef, 0xc9b7, 0xb3ca, 0x7aef, 0x7bef, 0x7cef, 0x7def, 0x7eef, 0x80ef, 0x81ef, 0xb8e2, 0xcff7, 0x82ef, 0x83ef, 0x84ef, 0x85ef, 0x86ef, 0x87ef, 0x88ef, 0x89ef, 0x8aef, 0x8bef, 0x8cef, 0x8def, 0x8eef, 0x8fef, 0x90ef, 0x91ef, 0x92ef, 0x93ef, 0x94ef, 0x95ef, 0x96ef, 0x97ef, 0x98ef, 0x99ef, 0x9aef, 0x9bef, 0x9cef, 0x9def, 0x9eef, 0x9fef, 0xa0ef, 0x40f0, 0x41f0, 0x42f0, 0x43f0, 0x44f0, 0xd0f7, 0x45f0, 0x46f0, 0xcdb2, 0x47f0, 0x48f0, 0x49f0, 0x4af0, 0x4bf0, 0x4cf0, 0x4df0, 0x4ef0, 0x4ff0, 0x50f0, 0x51f0, 0x52f0, 0x53f0, 0x54f0, 0x55f0, 0x56f0, 0x57f0, 0x58f0, 0x59f0, 0x5af0, 0x5bf0, 0x5cf0, 0x5df0, 0x5ef0, 0x5ff0, 0x60f0, 0x61f0, 0x62f0, 0x63f0, 0xd1f7, 0x64f0, 0x65f0, 0x66f0, 0x67f0, 0x68f0, 0x69f0, 0x6af0, 0x6bf0, 0x6cf0, 0x6df0, 0x6ef0, 0x6ff0, 0x70f0, 0x71f0, 0x72f0, 0x73f0, 0x74f0, 0x75f0, 0x76f0, 0x77f0, 0x78f0, 0x79f0, 0x7af0, 0x7bf0, 0x7cf0, 0x7df0, 0x7ef0, 0x80f0, 0x81f0, 0x82f0, 0x83f0, 0x84f0, 0x85f0, 0x86f0, 0x87f0, 0x88f0, 0x89f0, 0xd3f7, 0xd2f7, 0x8af0, 0x8bf0, 0x8cf0, 0x8df0, 0x8ef0, 0x8ff0, 0x90f0, 0x91f0, 0x92f0, 0x93f0, 0x94f0, 0x95f0, 0x96f0, 0xbbe2, 0x97f0, 0xa2bc, 0x98f0, 0xbce2, 0xbde2, 0xbee2, 0xbfe2, 0xc0e2, 0xc1e2, 0xb9b7, 0xfbd2, 0xa4bd, 0xceca, 0xa5b1, 0xc7cb, 0x99f0, 0xc2e2, 0xfcb6, 0xc4c8, 0xc3e2, 0x9af0, 0x9bf0, 0xc8bd, 0x9cf0, 0xfdb1, 0xc4e2, 0x9df0, 0xf6b6, 0xc5e2, 0xd9c4, 0x9ef0, 0x9ff0, 0xc6e2, 0xdacf, 0xddb9, 0xc7e2, 0xa1c0, 0xa0f0, 0xc8e2, 0xf6b2, 0x40f1, 0xc9e2, 0x41f1, 0xf3c1, 0xcae2, 0xcbe2, 0xf8c2, 0xcce2, 0xcde2, 0xcee2, 0xd7ca, 0xb8d8, 0xe5d9, 0xe3cf, 0x42f1, 0x43f1, 0x44f1, 0x45f1, 0x46f1, 0x47f1, 0x48f1, 0x49f1, 0x4af1, 0x4bf1, 0x4cf1, 0xa5f0, 0x4df1, 0x4ef1, 0xb0dc, 0x4ff1, 0x50f1, 0x51f1, 0x52f1, 0x53f1, 0x54f1, 0x55f1, 0x56f1, 0x57f1, 0x58f1, 0x59f1, 0x5af1, 0x5bf1, 0x5cf1, 0x5df1, 0x5ef1, 0x5ff1, 0x60f1, 0x61f1, 0x62f1, 0x63f1, 0x64f1, 0x65f1, 0x66f1, 0x67f1, 0x68f1, 0x69f1, 0x6af1, 0x6bf1, 0x6cf1, 0x6df1, 0x6ef1, 0x6ff1, 0x70f1, 0x71f1, 0x72f1, 0x73f1, 0x74f1, 0x75f1, 0x76f1, 0x77f1, 0x78f1, 0x79f1, 0x7af1, 0x7bf1, 0x7cf1, 0x7df1, 0x7ef1, 0x80f1, 0x81f1, 0x82f1, 0x83f1, 0x84f1, 0x85f1, 0x86f1, 0x87f1, 0x88f1, 0x89f1, 0x8af1, 0x8bf1, 0x8cf1, 0x8df1, 0x8ef1, 0x8ff1, 0x90f1, 0x91f1, 0x92f1, 0x93f1, 0x94f1, 0x95f1, 0x96f1, 0x97f1, 0x98f1, 0x99f1, 0x9af1, 0x9bf1, 0x9cf1, 0x9df1, 0x9ef1, 0x9ff1, 0xa0f1, 0x40f2, 0x41f2, 0x42f2, 0x43f2, 0x44f2, 0x45f2, 0x46f2, 0x47f2, 0x48f2, 0x49f2, 0x4af2, 0x4bf2, 0x4cf2, 0x4df2, 0x4ef2, 0x4ff2, 0x50f2, 0x51f2, 0x52f2, 0x53f2, 0x54f2, 0x55f2, 0x56f2, 0x57f2, 0x58f2, 0x59f2, 0x5af2, 0x5bf2, 0x5cf2, 0x5df2, 0x5ef2, 0x5ff2, 0x60f2, 0x61f2, 0x62f2, 0x63f2, 0x64f2, 0x65f2, 0x66f2, 0x67f2, 0x68f2, 0x69f2, 0x6af2, 0x6bf2, 0x6cf2, 0x6df2, 0x6ef2, 0x6ff2, 0x70f2, 0x71f2, 0x72f2, 0x73f2, 0x74f2, 0x75f2, 0x76f2, 0x77f2, 0x78f2, 0x79f2, 0x7af2, 0x7bf2, 0x7cf2, 0x7df2, 0x7ef2, 0x80f2, 0x81f2, 0x82f2, 0x83f2, 0x84f2, 0x85f2, 0x86f2, 0x87f2, 0x88f2, 0x89f2, 0x8af2, 0x8bf2, 0x8cf2, 0x8df2, 0x8ef2, 0x8ff2, 0x90f2, 0x91f2, 0x92f2, 0x93f2, 0x94f2, 0x95f2, 0x96f2, 0x97f2, 0x98f2, 0x99f2, 0x9af2, 0x9bf2, 0x9cf2, 0x9df2, 0x9ef2, 0x9ff2, 0xa0f2, 0x40f3, 0x41f3, 0x42f3, 0x43f3, 0x44f3, 0x45f3, 0x46f3, 0x47f3, 0x48f3, 0x49f3, 0x4af3, 0x4bf3, 0x4cf3, 0x4df3, 0x4ef3, 0x4ff3, 0x50f3, 0x51f3, 0xedc2, 0xa6d4, 0xd4cd, 0xb1d1, 0xdbb3, 0xfdc7, 0x52f3, 0xb5b2, 0xbfc2, 0xe0e6, 0xbbca, 0xe1e6, 0xe2e6, 0xd4be, 0xe3e6, 0xa4d7, 0xd5cd, 0xe5e6, 0xddbc, 0xe4e6, 0xe6e6, 0xe7e6, 0xeec2, 0x53f3, 0xbebd, 0xe8e6, 0xe6c2, 0xa7ba, 0xe9e6, 0x54f3, 0xeae6, 0xd2b3, 0xe9d1, 0x55f3, 0x56f3, 0xa5bf, 0xebe6, 0xefc6, 0xece6, 0xede6, 0x57f3, 0x58f3, 0xeee6, 0xadc6, 0xefe6, 0x59f3, 0xa7c9, 0xf0e6, 0xf1e6, 0xf2e6, 0xb9e5, 0xf3e6, 0xf4e6, 0xe2c2, 0xf5e6, 0xf6e6, 0xe8d6, 0xf7e6, 0x5af3, 0xf8e6, 0xc7b9, 0x5bf3, 0x5cf3, 0x5df3, 0x5ef3, 0x5ff3, 0x60f3, 0x61f3, 0xbbf7, 0xbaf7, 0x62f3, 0x63f3, 0x64f3, 0x65f3, 0xbef7, 0xbcf7, 0xa1ba, 0x66f3, 0xbff7, 0x67f3, 0xc0f7, 0x68f3, 0x69f3, 0x6af3, 0xc2f7, 0xc1f7, 0xc4f7, 0x6bf3, 0x6cf3, 0xc3f7, 0x6df3, 0x6ef3, 0x6ff3, 0x70f3, 0x71f3, 0xc5f7, 0xc6f7, 0x72f3, 0x73f3, 0x74f3, 0x75f3, 0xc7f7, 0x76f3, 0xe8cb, 0x77f3, 0x78f3, 0x79f3, 0x7af3, 0xdfb8, 0x7bf3, 0x7cf3, 0x7df3, 0x7ef3, 0x80f3, 0x81f3, 0xd4f7, 0x82f3, 0xd5f7, 0x83f3, 0x84f3, 0x85f3, 0x86f3, 0xd6f7, 0x87f3, 0x88f3, 0x89f3, 0x8af3, 0xd8f7, 0x8bf3, 0xdaf7, 0x8cf3, 0xd7f7, 0x8df3, 0x8ef3, 0x8ff3, 0x90f3, 0x91f3, 0x92f3, 0x93f3, 0x94f3, 0x95f3, 0xdbf7, 0x96f3, 0xd9f7, 0x97f3, 0x98f3, 0x99f3, 0x9af3, 0x9bf3, 0x9cf3, 0x9df3, 0xd7d7, 0x9ef3, 0x9ff3, 0xa0f3, 0x40f4, 0xdcf7, 0x41f4, 0x42f4, 0x43f4, 0x44f4, 0x45f4, 0x46f4, 0xddf7, 0x47f4, 0x48f4, 0x49f4, 0xdef7, 0x4af4, 0x4bf4, 0x4cf4, 0x4df4, 0x4ef4, 0x4ff4, 0x50f4, 0x51f4, 0x52f4, 0x53f4, 0x54f4, 0xdff7, 0x55f4, 0x56f4, 0x57f4, 0xe0f7, 0x58f4, 0x59f4, 0x5af4, 0x5bf4, 0x5cf4, 0x5df4, 0x5ef4, 0x5ff4, 0x60f4, 0x61f4, 0x62f4, 0xcbdb, 0x63f4, 0x64f4, 0xaad8, 0x65f4, 0x66f4, 0x67f4, 0x68f4, 0x69f4, 0x6af4, 0x6bf4, 0x6cf4, 0xf7e5, 0xedb9, 0x6df4, 0x6ef4, 0x6ff4, 0x70f4, 0xfdbf, 0xeabb, 0xc9f7, 0xc7c6, 0xc8f7, 0x71f4, 0xcaf7, 0xccf7, 0xcbf7, 0x72f4, 0x73f4, 0x74f4, 0xcdf7, 0x75f4, 0xbace, 0x76f4, 0xcef7, 0x77f4, 0x78f4, 0xa7c4, 0x79f4, 0x7af4, 0x7bf4, 0x7cf4, 0x7df4, 0x7ef4, 0x80f4, 0x81f4, 0x82f4, 0x83f4, 0x84f4, 0x85f4, 0x86f4, 0x87f4, 0x88f4, 0x89f4, 0x8af4, 0x8bf4, 0x8cf4, 0x8df4, 0x8ef4, 0x8ff4, 0x90f4, 0x91f4, 0x92f4, 0x93f4, 0x94f4, 0x95f4, 0x96f4, 0x97f4, 0x98f4, 0x99f4, 0x9af4, 0x9bf4, 0x9cf4, 0x9df4, 0x9ef4, 0x9ff4, 0xa0f4, 0x40f5, 0x41f5, 0x42f5, 0x43f5, 0x44f5, 0x45f5, 0x46f5, 0x47f5, 0x48f5, 0x49f5, 0x4af5, 0x4bf5, 0x4cf5, 0x4df5, 0x4ef5, 0x4ff5, 0x50f5, 0x51f5, 0x52f5, 0x53f5, 0x54f5, 0x55f5, 0x56f5, 0x57f5, 0x58f5, 0x59f5, 0x5af5, 0x5bf5, 0x5cf5, 0x5df5, 0x5ef5, 0x5ff5, 0x60f5, 0x61f5, 0x62f5, 0x63f5, 0x64f5, 0x65f5, 0x66f5, 0x67f5, 0x68f5, 0x69f5, 0x6af5, 0x6bf5, 0x6cf5, 0x6df5, 0x6ef5, 0x6ff5, 0x70f5, 0x71f5, 0x72f5, 0x73f5, 0x74f5, 0x75f5, 0x76f5, 0x77f5, 0x78f5, 0x79f5, 0x7af5, 0x7bf5, 0x7cf5, 0x7df5, 0x7ef5, 0x80f5, 0x81f5, 0x82f5, 0x83f5, 0x84f5, 0x85f5, 0x86f5, 0x87f5, 0x88f5, 0x89f5, 0x8af5, 0x8bf5, 0x8cf5, 0x8df5, 0x8ef5, 0x8ff5, 0x90f5, 0x91f5, 0x92f5, 0x93f5, 0x94f5, 0x95f5, 0x96f5, 0x97f5, 0x98f5, 0x99f5, 0x9af5, 0x9bf5, 0x9cf5, 0x9df5, 0x9ef5, 0x9ff5, 0xa0f5, 0x40f6, 0x41f6, 0x42f6, 0x43f6, 0x44f6, 0x45f6, 0x46f6, 0x47f6, 0x48f6, 0x49f6, 0x4af6, 0x4bf6, 0x4cf6, 0x4df6, 0x4ef6, 0x4ff6, 0x50f6, 0x51f6, 0x52f6, 0x53f6, 0x54f6, 0x55f6, 0x56f6, 0x57f6, 0x58f6, 0x59f6, 0x5af6, 0x5bf6, 0x5cf6, 0x5df6, 0x5ef6, 0x5ff6, 0x60f6, 0x61f6, 0x62f6, 0x63f6, 0x64f6, 0x65f6, 0x66f6, 0x67f6, 0x68f6, 0x69f6, 0x6af6, 0x6bf6, 0x6cf6, 0x6df6, 0x6ef6, 0x6ff6, 0x70f6, 0x71f6, 0x72f6, 0x73f6, 0x74f6, 0x75f6, 0x76f6, 0x77f6, 0x78f6, 0x79f6, 0x7af6, 0x7bf6, 0x7cf6, 0x7df6, 0x7ef6, 0x80f6, 0x81f6, 0x82f6, 0x83f6, 0x84f6, 0x85f6, 0x86f6, 0x87f6, 0x88f6, 0x89f6, 0x8af6, 0x8bf6, 0x8cf6, 0x8df6, 0x8ef6, 0x8ff6, 0x90f6, 0x91f6, 0x92f6, 0x93f6, 0x94f6, 0x95f6, 0x96f6, 0x97f6, 0x98f6, 0x99f6, 0x9af6, 0x9bf6, 0x9cf6, 0x9df6, 0x9ef6, 0x9ff6, 0xa0f6, 0x40f7, 0x41f7, 0x42f7, 0x43f7, 0x44f7, 0x45f7, 0x46f7, 0x47f7, 0x48f7, 0x49f7, 0x4af7, 0x4bf7, 0x4cf7, 0x4df7, 0x4ef7, 0x4ff7, 0x50f7, 0x51f7, 0x52f7, 0x53f7, 0x54f7, 0x55f7, 0x56f7, 0x57f7, 0x58f7, 0x59f7, 0x5af7, 0x5bf7, 0x5cf7, 0x5df7, 0x5ef7, 0x5ff7, 0x60f7, 0x61f7, 0x62f7, 0x63f7, 0x64f7, 0x65f7, 0x66f7, 0x67f7, 0x68f7, 0x69f7, 0x6af7, 0x6bf7, 0x6cf7, 0x6df7, 0x6ef7, 0x6ff7, 0x70f7, 0x71f7, 0x72f7, 0x73f7, 0x74f7, 0x75f7, 0x76f7, 0x77f7, 0x78f7, 0x79f7, 0x7af7, 0x7bf7, 0x7cf7, 0x7df7, 0x7ef7, 0x80f7, 0xe3d3, 0x81f7, 0x82f7, 0xcff6, 0x83f7, 0xb3c2, 0xd0f6, 0x84f7, 0x85f7, 0xd1f6, 0xd2f6, 0xd3f6, 0xd4f6, 0x86f7, 0x87f7, 0xd6f6, 0x88f7, 0xabb1, 0xd7f6, 0x89f7, 0xd8f6, 0xd9f6, 0xdaf6, 0x8af7, 0xdbf6, 0xdcf6, 0x8bf7, 0x8cf7, 0x8df7, 0x8ef7, 0xddf6, 0xdef6, 0xcacf, 0x8ff7, 0xdff6, 0xe0f6, 0xe1f6, 0xe2f6, 0xe3f6, 0xe4f6, 0xf0c0, 0xe5f6, 0xe6f6, 0xe7f6, 0xe8f6, 0xe9f6, 0x90f7, 0xeaf6, 0x91f7, 0xebf6, 0xecf6, 0x92f7, 0xedf6, 0xeef6, 0xeff6, 0xf0f6, 0xf1f6, 0xf2f6, 0xf3f6, 0xf4f6, 0xa8be, 0x93f7, 0xf5f6, 0xf6f6, 0xf7f6, 0xf8f6, 0x94f7, 0x95f7, 0x96f7, 0x97f7, 0x98f7, 0xfac8, 0xf9f6, 0xfaf6, 0xfbf6, 0xfcf6, 0x99f7, 0x9af7, 0xfdf6, 0xfef6, 0xa1f7, 0xa2f7, 0xa3f7, 0xa4f7, 0xa5f7, 0x9bf7, 0x9cf7, 0xa6f7, 0xa7f7, 0xa8f7, 0xeeb1, 0xa9f7, 0xaaf7, 0xabf7, 0x9df7, 0x9ef7, 0xacf7, 0xadf7, 0xdbc1, 0xaef7, 0x9ff7, 0xa0f7, 0xaff7, 0x40f8, 0x41f8, 0x42f8, 0x43f8, 0x44f8, 0x45f8, 0x46f8, 0x47f8, 0x48f8, 0x49f8, 0x4af8, 0x4bf8, 0x4cf8, 0x4df8, 0x4ef8, 0x4ff8, 0x50f8, 0x51f8, 0x52f8, 0x53f8, 0x54f8, 0x55f8, 0x56f8, 0x57f8, 0x58f8, 0x59f8, 0x5af8, 0x5bf8, 0x5cf8, 0x5df8, 0x5ef8, 0x5ff8, 0x60f8, 0x61f8, 0x62f8, 0x63f8, 0x64f8, 0x65f8, 0x66f8, 0x67f8, 0x68f8, 0x69f8, 0x6af8, 0x6bf8, 0x6cf8, 0x6df8, 0x6ef8, 0x6ff8, 0x70f8, 0x71f8, 0x72f8, 0x73f8, 0x74f8, 0x75f8, 0x76f8, 0x77f8, 0x78f8, 0x79f8, 0x7af8, 0x7bf8, 0x7cf8, 0x7df8, 0x7ef8, 0x80f8, 0x81f8, 0x82f8, 0x83f8, 0x84f8, 0x85f8, 0x86f8, 0x87f8, 0x88f8, 0x89f8, 0x8af8, 0x8bf8, 0x8cf8, 0x8df8, 0x8ef8, 0x8ff8, 0x90f8, 0x91f8, 0x92f8, 0x93f8, 0x94f8, 0x95f8, 0x96f8, 0x97f8, 0x98f8, 0x99f8, 0x9af8, 0x9bf8, 0x9cf8, 0x9df8, 0x9ef8, 0x9ff8, 0xa0f8, 0x40f9, 0x41f9, 0x42f9, 0x43f9, 0x44f9, 0x45f9, 0x46f9, 0x47f9, 0x48f9, 0x49f9, 0x4af9, 0x4bf9, 0x4cf9, 0x4df9, 0x4ef9, 0x4ff9, 0x50f9, 0x51f9, 0x52f9, 0x53f9, 0x54f9, 0x55f9, 0x56f9, 0x57f9, 0x58f9, 0x59f9, 0x5af9, 0x5bf9, 0x5cf9, 0x5df9, 0x5ef9, 0x5ff9, 0x60f9, 0x61f9, 0x62f9, 0x63f9, 0x64f9, 0x65f9, 0x66f9, 0x67f9, 0x68f9, 0x69f9, 0x6af9, 0x6bf9, 0x6cf9, 0x6df9, 0x6ef9, 0x6ff9, 0x70f9, 0x71f9, 0x72f9, 0x73f9, 0x74f9, 0x75f9, 0x76f9, 0x77f9, 0x78f9, 0x79f9, 0x7af9, 0x7bf9, 0x7cf9, 0x7df9, 0x7ef9, 0x80f9, 0x81f9, 0x82f9, 0x83f9, 0x84f9, 0x85f9, 0x86f9, 0x87f9, 0x88f9, 0x89f9, 0x8af9, 0x8bf9, 0x8cf9, 0x8df9, 0x8ef9, 0x8ff9, 0x90f9, 0x91f9, 0x92f9, 0x93f9, 0x94f9, 0x95f9, 0x96f9, 0x97f9, 0x98f9, 0x99f9, 0x9af9, 0x9bf9, 0x9cf9, 0x9df9, 0x9ef9, 0x9ff9, 0xa0f9, 0x40fa, 0x41fa, 0x42fa, 0x43fa, 0x44fa, 0x45fa, 0x46fa, 0x47fa, 0x48fa, 0x49fa, 0x4afa, 0x4bfa, 0x4cfa, 0x4dfa, 0x4efa, 0x4ffa, 0x50fa, 0x51fa, 0x52fa, 0x53fa, 0x54fa, 0x55fa, 0x56fa, 0x57fa, 0x58fa, 0x59fa, 0x5afa, 0x5bfa, 0x5cfa, 0x5dfa, 0x5efa, 0x5ffa, 0x60fa, 0x61fa, 0x62fa, 0x63fa, 0x64fa, 0x65fa, 0x66fa, 0x67fa, 0x68fa, 0x69fa, 0x6afa, 0x6bfa, 0x6cfa, 0x6dfa, 0x6efa, 0x6ffa, 0x70fa, 0x71fa, 0x72fa, 0x73fa, 0x74fa, 0x75fa, 0x76fa, 0x77fa, 0x78fa, 0x79fa, 0x7afa, 0x7bfa, 0x7cfa, 0x7dfa, 0x7efa, 0x80fa, 0x81fa, 0x82fa, 0x83fa, 0x84fa, 0x85fa, 0x86fa, 0x87fa, 0x88fa, 0x89fa, 0x8afa, 0x8bfa, 0x8cfa, 0x8dfa, 0x8efa, 0x8ffa, 0x90fa, 0x91fa, 0x92fa, 0x93fa, 0x94fa, 0x95fa, 0x96fa, 0x97fa, 0x98fa, 0x99fa, 0x9afa, 0x9bfa, 0x9cfa, 0x9dfa, 0x9efa, 0x9ffa, 0xa0fa, 0x40fb, 0x41fb, 0x42fb, 0x43fb, 0x44fb, 0x45fb, 0x46fb, 0x47fb, 0x48fb, 0x49fb, 0x4afb, 0x4bfb, 0x4cfb, 0x4dfb, 0x4efb, 0x4ffb, 0x50fb, 0x51fb, 0x52fb, 0x53fb, 0x54fb, 0x55fb, 0x56fb, 0x57fb, 0x58fb, 0x59fb, 0x5afb, 0x5bfb, 0xf1c4, 0xaff0, 0xa6bc, 0xb0f0, 0xf9c3, 0x5cfb, 0xb8c5, 0xbbd1, 0x5dfb, 0xb1f0, 0xb2f0, 0xb3f0, 0xb4f0, 0xb5f0, 0xbcd1, 0x5efb, 0xecd1, 0x5ffb, 0xb7f0, 0xb6f0, 0xa7d4, 0x60fb, 0xd2cd, 0xb8f0, 0xbaf0, 0xb9f0, 0xbbf0, 0xbcf0, 0x61fb, 0x62fb, 0xebb8, 0xbdf0, 0xe8ba, 0x63fb, 0xbef0, 0xbff0, 0xe9be, 0xc0f0, 0xecb6, 0xc1f0, 0xc2f0, 0xc3f0, 0xc4f0, 0xb5c8, 0xc5f0, 0xc6f0, 0x64fb, 0xc7f0, 0xf4c5, 0x65fb, 0xc8f0, 0x66fb, 0x67fb, 0x68fb, 0xc9f0, 0x69fb, 0xcaf0, 0xbdf7, 0x6afb, 0xcbf0, 0xccf0, 0xcdf0, 0x6bfb, 0xcef0, 0x6cfb, 0x6dfb, 0x6efb, 0x6ffb, 0xcff0, 0xd7ba, 0x70fb, 0xd0f0, 0xd1f0, 0xd2f0, 0xd3f0, 0xd4f0, 0xd5f0, 0xd6f0, 0xd8f0, 0x71fb, 0x72fb, 0xa5d3, 0xd7f0, 0x73fb, 0xd9f0, 0x74fb, 0x75fb, 0x76fb, 0x77fb, 0x78fb, 0x79fb, 0x7afb, 0x7bfb, 0x7cfb, 0x7dfb, 0xbaf5, 0xb9c2, 0x7efb, 0x80fb, 0xe4f7, 0x81fb, 0x82fb, 0x83fb, 0x84fb, 0xe5f7, 0xe6f7, 0x85fb, 0x86fb, 0xe7f7, 0x87fb, 0x88fb, 0x89fb, 0x8afb, 0x8bfb, 0x8cfb, 0xe8f7, 0xb4c2, 0x8dfb, 0x8efb, 0x8ffb, 0x90fb, 0x91fb, 0x92fb, 0x93fb, 0x94fb, 0x95fb, 0xeaf7, 0x96fb, 0xebf7, 0x97fb, 0x98fb, 0x99fb, 0x9afb, 0x9bfb, 0x9cfb, 0xf3c2, 0x9dfb, 0x9efb, 0x9ffb, 0xa0fb, 0x40fc, 0x41fc, 0x42fc, 0x43fc, 0x44fc, 0x45fc, 0x46fc, 0x47fc, 0x48fc, 0xf0f4, 0x49fc, 0x4afc, 0x4bfc, 0xeff4, 0x4cfc, 0x4dfc, 0xe9c2, 0x4efc, 0xe1f7, 0xe2f7, 0x4ffc, 0x50fc, 0x51fc, 0x52fc, 0x53fc, 0xc6bb, 0x54fc, 0x55fc, 0x56fc, 0x57fc, 0xe4d9, 0x58fc, 0x59fc, 0x5afc, 0xf2ca, 0xe8c0, 0xa4f0, 0x5bfc, 0xdaba, 0x5cfc, 0x5dfc, 0xadc7, 0x5efc, 0x5ffc, 0x60fc, 0xacc4, 0x61fc, 0x62fc, 0xecf7, 0xedf7, 0xeef7, 0x63fc, 0xf0f7, 0xeff7, 0x64fc, 0xf1f7, 0x65fc, 0x66fc, 0xf4f7, 0x67fc, 0xf3f7, 0x68fc, 0xf2f7, 0xf5f7, 0x69fc, 0x6afc, 0x6bfc, 0x6cfc, 0xf6f7, 0x6dfc, 0x6efc, 0x6ffc, 0x70fc, 0x71fc, 0x72fc, 0x73fc, 0x74fc, 0x75fc, 0xe9ed, 0x76fc, 0xeaed, 0xebed, 0x77fc, 0xbcf6, 0x78fc, 0x79fc, 0x7afc, 0x7bfc, 0x7cfc, 0x7dfc, 0x7efc, 0x80fc, 0x81fc, 0x82fc, 0x83fc, 0x84fc, 0xbdf6, 0x85fc, 0xbef6, 0xa6b6, 0x86fc, 0xbed8, 0x87fc, 0x88fc, 0xc4b9, 0x89fc, 0x8afc, 0x8bfc, 0xbbd8, 0x8cfc, 0xb1dc, 0x8dfc, 0x8efc, 0x8ffc, 0x90fc, 0x91fc, 0x92fc, 0xf3ca, 0x93fc, 0xf7f7, 0x94fc, 0x95fc, 0x96fc, 0x97fc, 0x98fc, 0x99fc, 0x9afc, 0x9bfc, 0x9cfc, 0xf8f7, 0x9dfc, 0x9efc, 0xf9f7, 0x9ffc, 0xa0fc, 0x40fd, 0x41fd, 0x42fd, 0x43fd, 0x44fd, 0xfbf7, 0x45fd, 0xfaf7, 0x46fd, 0xc7b1, 0x47fd, 0xfcf7, 0xfdf7, 0x48fd, 0x49fd, 0x4afd, 0x4bfd, 0x4cfd, 0xfef7, 0x4dfd, 0x4efd, 0x4ffd, 0x50fd, 0x51fd, 0x52fd, 0x53fd, 0x54fd, 0x55fd, 0x56fd, 0x57fd, 0xebc6, 0xb4ec, 0x58fd, 0x59fd, 0x5afd, 0x5bfd, 0x5cfd, 0x5dfd, 0x5efd, 0x5ffd, 0x60fd, 0x61fd, 0x62fd, 0x63fd, 0x64fd, 0x65fd, 0x66fd, 0x67fd, 0x68fd, 0x69fd, 0x6afd, 0x6bfd, 0x6cfd, 0x6dfd, 0x6efd, 0x6ffd, 0x70fd, 0x71fd, 0x72fd, 0x73fd, 0x74fd, 0x75fd, 0x76fd, 0x77fd, 0x78fd, 0x79fd, 0x7afd, 0x7bfd, 0x7cfd, 0x7dfd, 0x7efd, 0x80fd, 0x81fd, 0x82fd, 0x83fd, 0x84fd, 0x85fd, 0xddb3, 0xb3f6, 0x86fd, 0x87fd, 0xb4f6, 0xe4c1, 0xb5f6, 0xb6f6, 0xb7f6, 0xb8f6, 0xb9f6, 0xbaf6, 0xa3c8, 0xbbf6, 0x88fd, 0x89fd, 0x8afd, 0x8bfd, 0x8cfd, 0x8dfd, 0x8efd, 0x8ffd, 0x90fd, 0x91fd, 0x92fd, 0x93fd, 0xfac1, 0xa8b9, 0xe8ed, 0x94fd, 0x95fd, 0x96fd, 0xeab9, 0xdfd9, 0x97fd, 0x98fd, 0x99fd, 0x9afd, 0x9bfd }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0xf900[ 320 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9cfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9dfd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9efd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ffd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa0fd, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40fe, 0x41fe, 0x42fe, 0x43fe, 0x001a, 0x44fe, 0x001a, 0x45fe, 0x46fe, 0x001a, 0x001a, 0x001a, 0x47fe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48fe, 0x49fe, 0x4afe, 0x001a, 0x4bfe, 0x4cfe, 0x001a, 0x001a, 0x4dfe, 0x4efe, 0x4ffe, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ 512 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55a9, 0xf2a6, 0x001a, 0xf4a6, 0xf5a6, 0xe0a6, 0xe1a6, 0xf0a6, 0xf1a6, 0xe2a6, 0xe3a6, 0xeea6, 0xefa6, 0xe6a6, 0xe7a6, 0xe4a6, 0xe5a6, 0xe8a6, 0xe9a6, 0xeaa6, 0xeba6, 0x001a, 0x001a, 0x001a, 0x001a, 0x68a9, 0x69a9, 0x6aa9, 0x6ba9, 0x6ca9, 0x6da9, 0x6ea9, 0x6fa9, 0x70a9, 0x71a9, 0x001a, 0x72a9, 0x73a9, 0x74a9, 0x75a9, 0x001a, 0x76a9, 0x77a9, 0x78a9, 0x79a9, 0x7aa9, 0x7ba9, 0x7ca9, 0x7da9, 0x7ea9, 0x80a9, 0x81a9, 0x82a9, 0x83a9, 0x84a9, 0x001a, 0x85a9, 0x86a9, 0x87a9, 0x88a9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1a3, 0xa2a3, 0xa3a3, 0xe7a1, 0xa5a3, 0xa6a3, 0xa7a3, 0xa8a3, 0xa9a3, 0xaaa3, 0xaba3, 0xaca3, 0xada3, 0xaea3, 0xafa3, 0xb0a3, 0xb1a3, 0xb2a3, 0xb3a3, 0xb4a3, 0xb5a3, 0xb6a3, 0xb7a3, 0xb8a3, 0xb9a3, 0xbaa3, 0xbba3, 0xbca3, 0xbda3, 0xbea3, 0xbfa3, 0xc0a3, 0xc1a3, 0xc2a3, 0xc3a3, 0xc4a3, 0xc5a3, 0xc6a3, 0xc7a3, 0xc8a3, 0xc9a3, 0xcaa3, 0xcba3, 0xcca3, 0xcda3, 0xcea3, 0xcfa3, 0xd0a3, 0xd1a3, 0xd2a3, 0xd3a3, 0xd4a3, 0xd5a3, 0xd6a3, 0xd7a3, 0xd8a3, 0xd9a3, 0xdaa3, 0xdba3, 0xdca3, 0xdda3, 0xdea3, 0xdfa3, 0xe0a3, 0xe1a3, 0xe2a3, 0xe3a3, 0xe4a3, 0xe5a3, 0xe6a3, 0xe7a3, 0xe8a3, 0xe9a3, 0xeaa3, 0xeba3, 0xeca3, 0xeda3, 0xeea3, 0xefa3, 0xf0a3, 0xf1a3, 0xf2a3, 0xf3a3, 0xf4a3, 0xf5a3, 0xf6a3, 0xf7a3, 0xf8a3, 0xf9a3, 0xfaa3, 0xfba3, 0xfca3, 0xfda3, 0xaba1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9a1, 0xeaa1, 0x56a9, 0xfea3, 0x57a9, 0xa4a3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_936_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_936_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fa6 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_936_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_936_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character == 0x80 ) { *unicode_character = 0x20ac; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( ( byte_stream_character >= 0x81 ) && ( byte_stream_character <= 0xa0 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x81: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8140[ additional_character ]; break; case 0x82: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8240[ additional_character ]; break; case 0x83: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8340[ additional_character ]; break; case 0x84: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8440[ additional_character ]; break; case 0x85: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8540[ additional_character ]; break; case 0x86: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8640[ additional_character ]; break; case 0x87: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8740[ additional_character ]; break; case 0x88: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8840[ additional_character ]; break; case 0x89: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; case 0x98: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9840[ additional_character ]; break; case 0x99: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; case 0xa0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa040[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character <= 0xa3 ) ) { if( additional_character >= 0xa0 ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xa1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa1a0[ additional_character ]; break; case 0xa2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa2a0[ additional_character ]; break; case 0xa3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa3a0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xa4 ) && ( byte_stream_character <= 0xa6 ) ) { if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xa0; switch( byte_stream_character ) { case 0xa4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa4a0[ additional_character ]; break; case 0xa5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa5a0[ additional_character ]; break; case 0xa6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa6a0[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa7 ) { if( ( additional_character >= 0xa0 ) && ( additional_character < 0xc8 ) ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7a0[ additional_character ]; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xd0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa7d0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa8 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x98 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa840[ additional_character ]; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa8a0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xa9 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x88 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa940[ additional_character ]; } else if( additional_character == 0x88 ) { *unicode_character = 0xfe6b; } else if( additional_character == 0x96 ) { *unicode_character = 0x3007; } else if( ( additional_character >= 0xa0 ) && ( additional_character < 0xf0 ) ) { additional_character -= 0xa0; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xa9a0[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xaa ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaa40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x7371; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xab ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xab40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x73f7; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xac ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xac40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x747a; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xad ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xad40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x74f2; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xae ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xae40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x7587; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xaf ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xaf40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x7644; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xb0 ) && ( byte_stream_character <= 0xf7 ) ) { if( additional_character >= 0x40 ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xb0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb040[ additional_character ]; break; case 0xb1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb140[ additional_character ]; break; case 0xb2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb240[ additional_character ]; break; case 0xb3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb340[ additional_character ]; break; case 0xb4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb440[ additional_character ]; break; case 0xb5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb540[ additional_character ]; break; case 0xb6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb640[ additional_character ]; break; case 0xb7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb740[ additional_character ]; break; case 0xb8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb840[ additional_character ]; break; case 0xb9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xb940[ additional_character ]; break; case 0xba: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xba40[ additional_character ]; break; case 0xbb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbb40[ additional_character ]; break; case 0xbc: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbc40[ additional_character ]; break; case 0xbd: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbd40[ additional_character ]; break; case 0xbe: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbe40[ additional_character ]; break; case 0xbf: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xbf40[ additional_character ]; break; case 0xc0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc040[ additional_character ]; break; case 0xc1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc140[ additional_character ]; break; case 0xc2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc240[ additional_character ]; break; case 0xc3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc340[ additional_character ]; break; case 0xc4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc440[ additional_character ]; break; case 0xc5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc540[ additional_character ]; break; case 0xc6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc640[ additional_character ]; break; case 0xc7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc740[ additional_character ]; break; case 0xc8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc840[ additional_character ]; break; case 0xc9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xc940[ additional_character ]; break; case 0xca: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xca40[ additional_character ]; break; case 0xcb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcb40[ additional_character ]; break; case 0xcc: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcc40[ additional_character ]; break; case 0xcd: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcd40[ additional_character ]; break; case 0xce: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xce40[ additional_character ]; break; case 0xcf: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xcf40[ additional_character ]; break; case 0xd0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd040[ additional_character ]; break; case 0xd1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd140[ additional_character ]; break; case 0xd2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd240[ additional_character ]; break; case 0xd3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd340[ additional_character ]; break; case 0xd4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd440[ additional_character ]; break; case 0xd5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd540[ additional_character ]; break; case 0xd6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd640[ additional_character ]; break; case 0xd7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd740[ additional_character ]; break; case 0xd8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd840[ additional_character ]; break; case 0xd9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xd940[ additional_character ]; break; case 0xda: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xda40[ additional_character ]; break; case 0xdb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdb40[ additional_character ]; break; case 0xdc: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdc40[ additional_character ]; break; case 0xdd: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdd40[ additional_character ]; break; case 0xde: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xde40[ additional_character ]; break; case 0xdf: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xdf40[ additional_character ]; break; case 0xe0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; case 0xea: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xea40[ additional_character ]; break; case 0xeb: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xeb40[ additional_character ]; break; case 0xec: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xec40[ additional_character ]; break; case 0xed: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; case 0xef: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xef40[ additional_character ]; break; case 0xf0: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf040[ additional_character ]; break; case 0xf1: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf140[ additional_character ]; break; case 0xf2: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf240[ additional_character ]; break; case 0xf3: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf340[ additional_character ]; break; case 0xf4: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf440[ additional_character ]; break; case 0xf5: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf540[ additional_character ]; break; case 0xf6: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf640[ additional_character ]; break; case 0xf7: *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf740[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xf8 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf840[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9d42; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xf9 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xf940[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9da2; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfa ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfa40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9e02; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfb ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfb40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9eaa; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfc ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0x9f31; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfd ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa0 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfd40[ additional_character ]; } else if( additional_character == 0xa0 ) { *unicode_character = 0xf9f1; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfe ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x50 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_936_byte_stream_to_unicode_base_0xfe40[ additional_character ]; } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_936_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_936_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fa6 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xfe00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xfe00; byte_stream_value = libuna_codepage_windows_936_unicode_to_byte_stream_base_0xfe00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libpff-20120802/libuna/libuna_unicode_character.c0000644000175000017500000043400012005152764016552 00000000000000/* * Unicode character functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_base64_stream.h" #include "libuna_codepage_iso_8859_2.h" #include "libuna_codepage_iso_8859_3.h" #include "libuna_codepage_iso_8859_4.h" #include "libuna_codepage_iso_8859_5.h" #include "libuna_codepage_iso_8859_6.h" #include "libuna_codepage_iso_8859_7.h" #include "libuna_codepage_iso_8859_8.h" #include "libuna_codepage_iso_8859_9.h" #include "libuna_codepage_iso_8859_10.h" #include "libuna_codepage_iso_8859_13.h" #include "libuna_codepage_iso_8859_14.h" #include "libuna_codepage_iso_8859_15.h" #include "libuna_codepage_iso_8859_16.h" #include "libuna_codepage_koi8_r.h" #include "libuna_codepage_koi8_u.h" #include "libuna_codepage_windows_874.h" #include "libuna_codepage_windows_932.h" #include "libuna_codepage_windows_936.h" #include "libuna_codepage_windows_949.h" #include "libuna_codepage_windows_950.h" #include "libuna_codepage_windows_1250.h" #include "libuna_codepage_windows_1251.h" #include "libuna_codepage_windows_1252.h" #include "libuna_codepage_windows_1253.h" #include "libuna_codepage_windows_1254.h" #include "libuna_codepage_windows_1255.h" #include "libuna_codepage_windows_1256.h" #include "libuna_codepage_windows_1257.h" #include "libuna_codepage_windows_1258.h" #include "libuna_definitions.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_unused.h" /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, int codepage, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_byte_stream"; int result = 1; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: case LIBUNA_CODEPAGE_ISO_8859_1: case LIBUNA_CODEPAGE_ISO_8859_2: case LIBUNA_CODEPAGE_ISO_8859_3: case LIBUNA_CODEPAGE_ISO_8859_4: case LIBUNA_CODEPAGE_ISO_8859_5: case LIBUNA_CODEPAGE_ISO_8859_6: case LIBUNA_CODEPAGE_ISO_8859_7: case LIBUNA_CODEPAGE_ISO_8859_8: case LIBUNA_CODEPAGE_ISO_8859_9: case LIBUNA_CODEPAGE_ISO_8859_10: case LIBUNA_CODEPAGE_ISO_8859_11: case LIBUNA_CODEPAGE_ISO_8859_13: case LIBUNA_CODEPAGE_ISO_8859_14: case LIBUNA_CODEPAGE_ISO_8859_15: case LIBUNA_CODEPAGE_ISO_8859_16: case LIBUNA_CODEPAGE_KOI8_R: case LIBUNA_CODEPAGE_KOI8_U: case LIBUNA_CODEPAGE_WINDOWS_874: case LIBUNA_CODEPAGE_WINDOWS_1250: case LIBUNA_CODEPAGE_WINDOWS_1251: case LIBUNA_CODEPAGE_WINDOWS_1252: case LIBUNA_CODEPAGE_WINDOWS_1253: case LIBUNA_CODEPAGE_WINDOWS_1254: case LIBUNA_CODEPAGE_WINDOWS_1255: case LIBUNA_CODEPAGE_WINDOWS_1256: case LIBUNA_CODEPAGE_WINDOWS_1257: case LIBUNA_CODEPAGE_WINDOWS_1258: *byte_stream_character_size += 1; break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_unicode_character_size_to_byte_stream( unicode_character, byte_stream_character_size, error ); break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage: %d.", function, codepage ); return( -1 ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream character size.", function ); return( -1 ); } return( result ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, int codepage, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_byte_stream"; uint8_t byte_stream_character = 0; int result = 1; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_1: *unicode_character = byte_stream_character; *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_2: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_2_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_3: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_4: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_5: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_6: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_6_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_7: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_8: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_9: if( byte_stream_character < 0xd0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xd0; *unicode_character = libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_10: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_11: if( byte_stream_character < 0xa1 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character < 0xdb ) { *unicode_character = byte_stream_character + 0x0d60; } else if( byte_stream_character < 0xdf ) { *unicode_character = 0xfffd; } else if( byte_stream_character < 0xfc ) { *unicode_character = byte_stream_character + 0x0d60; } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_13: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_14: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_15: if( ( byte_stream_character >= 0xa0 ) && ( byte_stream_character < 0xc0 ) ) { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } else { *unicode_character = byte_stream_character; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_16: if( byte_stream_character < 0xa0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xa0; *unicode_character = libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_R: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_U: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_874: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_874_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_copy_from_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1250: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1251: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1251_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1252: if( ( byte_stream_character < 0x80 ) || ( byte_stream_character >= 0xa0 ) ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1253: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1253_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1254: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character < 0xa0 ) { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } else if( byte_stream_character < 0xd0 ) { *unicode_character = byte_stream_character; } else if( byte_stream_character < 0xe0 ) { byte_stream_character -= 0xd0; *unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ byte_stream_character ]; } else if( byte_stream_character < 0xf0 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0xf0; *unicode_character = libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1255: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1256: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1256_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1257: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1257_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1258: if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else { byte_stream_character -= 0x80; *unicode_character = libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ byte_stream_character ]; } *byte_stream_index += 1; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage: %d.", function, codepage ); return( -1 ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } return( result ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, int codepage, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_byte_stream"; int result = 1; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } switch( codepage ) { case LIBUNA_CODEPAGE_ASCII: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_1: if( unicode_character < 0x0100 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_2: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0120 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0138 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0138; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x0138[ unicode_character ]; } else if( ( unicode_character >= 0x02d8 ) && ( unicode_character < 0x02e0 ) ) { unicode_character -= 0x02d8; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_2_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; } else if( unicode_character == 0x02c7 ) { byte_stream[ *byte_stream_index ] = 0xb7; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_3: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0108 ) && ( unicode_character < 0x0110 ) ) { unicode_character -= 0x0108; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ unicode_character ]; } else if( ( unicode_character >= 0x0118 ) && ( unicode_character < 0x0128 ) ) { unicode_character -= 0x0118; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ unicode_character ]; } else if( ( unicode_character >= 0x0130 ) && ( unicode_character < 0x0138 ) ) { unicode_character -= 0x0130; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ unicode_character ]; } else if( ( unicode_character >= 0x0158 ) && ( unicode_character < 0x0160 ) ) { unicode_character -= 0x0158; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ unicode_character ]; } else switch( unicode_character ) { case 0x016c: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x016d: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x017b: byte_stream[ *byte_stream_index ] = 0xaf; break; case 0x017c: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x02d8: byte_stream[ *byte_stream_index ] = 0xa2; break; case 0x02d9: byte_stream[ *byte_stream_index ] = 0xff; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_4: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0158 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0160 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0160; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x02d9: byte_stream[ *byte_stream_index ] = 0xff; break; case 0x02db: byte_stream[ *byte_stream_index ] = 0xb2; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_5: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x2116: byte_stream[ *byte_stream_index ] = 0xf0; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_6: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0618 ) && ( unicode_character < 0x658 ) ) { unicode_character -= 0x0618; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_6_unicode_to_byte_stream_base_0x0618[ unicode_character ]; } else switch( unicode_character ) { case 0x00a4: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x060c: byte_stream[ *byte_stream_index ] = 0xac; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_7: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00b8 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x03d0 ) ) { unicode_character -= 0x0380; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else switch( unicode_character ) { case 0x00bb: byte_stream[ *byte_stream_index ] = 0xbb; break; case 0x00bd: byte_stream[ *byte_stream_index ] = 0xbd; break; case 0x037a: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x2015: byte_stream[ *byte_stream_index ] = 0xaf; break; case 0x2018: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x2019: byte_stream[ *byte_stream_index ] = 0xa2; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x20af: byte_stream[ *byte_stream_index ] = 0xa5; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_8: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x05d0 ) && ( unicode_character < 0x05f0 ) ) { unicode_character -= 0x05d0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0xba; break; case 0x200e: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x200f: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x2017: byte_stream[ *byte_stream_index ] = 0xdf; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_9: if( unicode_character < 0x00d0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00d0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00d0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x011f: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0130: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x0131: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x015e: byte_stream[ *byte_stream_index ] = 0xde; break; case 0x015f: byte_stream[ *byte_stream_index ] = 0xfe; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_10: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0150 ) ) { unicode_character -= 0x00c0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; } else if( ( unicode_character >= 0x0160 ) && ( unicode_character < 0x0170 ) ) { unicode_character -= 0x0160; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x00b0: byte_stream[ *byte_stream_index ] = 0xb0; break; case 0x00b7: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x0172: byte_stream[ *byte_stream_index ] = 0xd9; break; case 0x0173: byte_stream[ *byte_stream_index ] = 0xf9; break; case 0x017d: byte_stream[ *byte_stream_index ] = 0xac; break; case 0x017e: byte_stream[ *byte_stream_index ] = 0xbc; break; case 0x2015: byte_stream[ *byte_stream_index ] = 0xbd; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_11: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0e01 ) && ( unicode_character < 0x0e3b ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) ( unicode_character - 0x0d60 ); } else if( ( unicode_character >= 0x0e3f ) && ( unicode_character < 0x0e5c ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) ( unicode_character - 0x0d60 ); } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_13: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2018 ) && ( unicode_character < 0x2020 ) ) { unicode_character -= 0x2018; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ unicode_character ]; } else { byte_stream[ *byte_stream_index ] = 0x1a; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_14: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00c0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; } else if( ( unicode_character >= 0x0170 ) && ( unicode_character < 0x0178 ) ) { unicode_character -= 0x0170; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ unicode_character ]; } else if( ( unicode_character >= 0x1e80 ) && ( unicode_character < 0x1e88 ) ) { unicode_character -= 0x1e80; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ unicode_character ]; } else switch( unicode_character ) { case 0x00a3: byte_stream[ *byte_stream_index ] = 0xa3; break; case 0x00a7: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x00a9: byte_stream[ *byte_stream_index ] = 0xa9; break; case 0x00ad: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x00ae: byte_stream[ *byte_stream_index ] = 0xae; break; case 0x00b6: byte_stream[ *byte_stream_index ] = 0xb6; break; case 0x010a: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x010b: byte_stream[ *byte_stream_index ] = 0xa5; break; case 0x0120: byte_stream[ *byte_stream_index ] = 0xb2; break; case 0x0121: byte_stream[ *byte_stream_index ] = 0xb3; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0xaf; break; case 0x1e02: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x1e03: byte_stream[ *byte_stream_index ] = 0xa2; break; case 0x1e0a: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x1e0b: byte_stream[ *byte_stream_index ] = 0xab; break; case 0x1e1e: byte_stream[ *byte_stream_index ] = 0xb0; break; case 0x1e1f: byte_stream[ *byte_stream_index ] = 0xb1; break; case 0x1e40: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x1e41: byte_stream[ *byte_stream_index ] = 0xb5; break; case 0x1e56: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x1e57: byte_stream[ *byte_stream_index ] = 0xb9; break; case 0x1e60: byte_stream[ *byte_stream_index ] = 0xbb; break; case 0x1e61: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x1e6a: byte_stream[ *byte_stream_index ] = 0xd7; break; case 0x1e6b: byte_stream[ *byte_stream_index ] = 0xf7; break; case 0x1ef2: byte_stream[ *byte_stream_index ] = 0xac; break; case 0x1ef3: byte_stream[ *byte_stream_index ] = 0xbc; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_15: if( unicode_character < 0x00a0 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( unicode_character < 0x0100 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else switch( unicode_character ) { case 0x0152: byte_stream[ *byte_stream_index ] = 0xbc; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0xbd; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0xa8; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0xbe; break; case 0x017d: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x017e: byte_stream[ *byte_stream_index ] = 0xb8; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0xa4; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_ISO_8859_16: if( unicode_character < 0x00a1 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a8 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00a8; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ unicode_character ]; } else if( ( unicode_character >= 0x0140 ) && ( unicode_character < 0x0148 ) ) { unicode_character -= 0x0140; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ unicode_character ]; } else if( ( unicode_character >= 0x0150 ) && ( unicode_character < 0x0158 ) ) { unicode_character -= 0x0150; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ unicode_character ]; } else if( ( unicode_character >= 0x0178 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0178; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ unicode_character ]; } else if( ( unicode_character >= 0x0218 ) && ( unicode_character < 0x0220 ) ) { unicode_character -= 0x0218; byte_stream[ *byte_stream_index ] = libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ unicode_character ]; } else switch( unicode_character ) { case 0x00a7: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x010c: byte_stream[ *byte_stream_index ] = 0xb2; break; case 0x010d: byte_stream[ *byte_stream_index ] = 0xb9; break; case 0x0110: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x0111: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0118: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x0119: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x015a: byte_stream[ *byte_stream_index ] = 0xd7; break; case 0x015b: byte_stream[ *byte_stream_index ] = 0xf7; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0xa8; break; case 0x0170: byte_stream[ *byte_stream_index ] = 0xd8; break; case 0x0171: byte_stream[ *byte_stream_index ] = 0xf8; break; case 0x201d: byte_stream[ *byte_stream_index ] = 0xb5; break; case 0x201e: byte_stream[ *byte_stream_index ] = 0xa5; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0xa4; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_R: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0410 ) && ( unicode_character < 0x0450 ) ) { unicode_character -= 0x0410; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ unicode_character ]; } else if( ( unicode_character >= 0x2550 ) && ( unicode_character < 0x2570 ) ) { unicode_character -= 0x2550; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x00a9: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x00b0: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x00b2: byte_stream[ *byte_stream_index ] = 0x9d; break; case 0x00b7: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0401: byte_stream[ *byte_stream_index ] = 0xb3; break; case 0x0451: byte_stream[ *byte_stream_index ] = 0xa3; break; case 0x2219: byte_stream[ *byte_stream_index ] = 0x95; break; case 0x221a: byte_stream[ *byte_stream_index ] = 0x96; break; case 0x2248: byte_stream[ *byte_stream_index ] = 0x97; break; case 0x2264: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2265: byte_stream[ *byte_stream_index ] = 0x99; break; case 0x2320: byte_stream[ *byte_stream_index ] = 0x93; break; case 0x2321: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x2500: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2502: byte_stream[ *byte_stream_index ] = 0x81; break; case 0x250c: byte_stream[ *byte_stream_index ] = 0x82; break; case 0x2510: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x2514: byte_stream[ *byte_stream_index ] = 0x84; break; case 0x2518: byte_stream[ *byte_stream_index ] = 0x85; break; case 0x251c: byte_stream[ *byte_stream_index ] = 0x86; break; case 0x2524: byte_stream[ *byte_stream_index ] = 0x87; break; case 0x252c: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x2534: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x253c: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x2580: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x2584: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x2588: byte_stream[ *byte_stream_index ] = 0x8d; break; case 0x258c: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x2590: byte_stream[ *byte_stream_index ] = 0x8f; break; case 0x2591: byte_stream[ *byte_stream_index ] = 0x90; break; case 0x2592: byte_stream[ *byte_stream_index ] = 0x91; break; case 0x2593: byte_stream[ *byte_stream_index ] = 0x92; break; case 0x25a0: byte_stream[ *byte_stream_index ] = 0x94; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_KOI8_U: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0410 ) && ( unicode_character < 0x0450 ) ) { unicode_character -= 0x0410; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ unicode_character ]; } else if( ( unicode_character >= 0x2550 ) && ( unicode_character < 0x2570 ) ) { unicode_character -= 0x2550; byte_stream[ *byte_stream_index ] = libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ unicode_character ]; } else switch( unicode_character ) { case 0x00a0: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x00a9: byte_stream[ *byte_stream_index ] = 0xbf; break; case 0x00b0: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x00b2: byte_stream[ *byte_stream_index ] = 0x9d; break; case 0x00b7: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0401: byte_stream[ *byte_stream_index ] = 0xb3; break; case 0x0404: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x0406: byte_stream[ *byte_stream_index ] = 0xb6; break; case 0x0407: byte_stream[ *byte_stream_index ] = 0xb7; break; case 0x0451: byte_stream[ *byte_stream_index ] = 0xa3; break; case 0x0454: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x0456: byte_stream[ *byte_stream_index ] = 0xa6; break; case 0x0457: byte_stream[ *byte_stream_index ] = 0xa7; break; case 0x0490: byte_stream[ *byte_stream_index ] = 0xbd; break; case 0x0491: byte_stream[ *byte_stream_index ] = 0xad; break; case 0x2219: byte_stream[ *byte_stream_index ] = 0x95; break; case 0x221a: byte_stream[ *byte_stream_index ] = 0x96; break; case 0x2248: byte_stream[ *byte_stream_index ] = 0x97; break; case 0x2264: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2265: byte_stream[ *byte_stream_index ] = 0x99; break; case 0x2320: byte_stream[ *byte_stream_index ] = 0x93; break; case 0x2321: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x2500: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2502: byte_stream[ *byte_stream_index ] = 0x81; break; case 0x250c: byte_stream[ *byte_stream_index ] = 0x82; break; case 0x2510: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x2514: byte_stream[ *byte_stream_index ] = 0x84; break; case 0x2518: byte_stream[ *byte_stream_index ] = 0x85; break; case 0x251c: byte_stream[ *byte_stream_index ] = 0x86; break; case 0x2524: byte_stream[ *byte_stream_index ] = 0x87; break; case 0x252c: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x2534: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x253c: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x2580: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x2584: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x2588: byte_stream[ *byte_stream_index ] = 0x8d; break; case 0x258c: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x2590: byte_stream[ *byte_stream_index ] = 0x8f; break; case 0x2591: byte_stream[ *byte_stream_index ] = 0x90; break; case 0x2592: byte_stream[ *byte_stream_index ] = 0x91; break; case 0x2593: byte_stream[ *byte_stream_index ] = 0x92; break; case 0x25a0: byte_stream[ *byte_stream_index ] = 0x94; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_874: if( ( unicode_character < 0x0080 ) || ( unicode_character == 0x00a0 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x0e00 ) && ( unicode_character < 0x0e60 ) ) { unicode_character -= 0x0e00; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x0e00[ unicode_character ]; } else if( ( unicode_character >= 0x2018 ) && ( unicode_character < 0x2020 ) ) { unicode_character -= 0x2018; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_874_unicode_to_byte_stream_base_0x2018[ unicode_character ]; } else switch( unicode_character ) { case 0x2013: byte_stream[ *byte_stream_index ] = 0x96; break; case 0x2014: byte_stream[ *byte_stream_index ] = 0x97; break; case 0x2022: byte_stream[ *byte_stream_index ] = 0x95; break; case 0x2026: byte_stream[ *byte_stream_index ] = 0x85; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_932: result = libuna_codepage_windows_932_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_936: result = libuna_codepage_windows_936_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_949: result = libuna_codepage_windows_949_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_950: result = libuna_codepage_windows_950_copy_to_byte_stream( unicode_character, byte_stream, byte_stream_size, byte_stream_index, error ); break; case LIBUNA_CODEPAGE_WINDOWS_1250: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0120 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0138 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x0138; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ unicode_character ]; } else if( ( unicode_character >= 0x02d8 ) && ( unicode_character < 0x02e0 ) ) { unicode_character -= 0x02d8; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else if( ( unicode_character >= 0x2030 ) && ( unicode_character < 0x2040 ) ) { unicode_character -= 0x2030; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1251: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0400 ) && ( unicode_character < 0x0460 ) ) { unicode_character -= 0x0400; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x0400[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1251_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0490: byte_stream[ *byte_stream_index ] = 0xa5; break; case 0x0491: byte_stream[ *byte_stream_index ] = 0xb4; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x2116: byte_stream[ *byte_stream_index ] = 0xb9; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1252: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0100 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x017d: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x017e: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1253: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x03d0 ) ) { unicode_character -= 0x0380; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1253_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1254: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00d0 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00d0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00d0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x011e: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x011f: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0130: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x0131: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x015e: byte_stream[ *byte_stream_index ] = 0xde; break; case 0x015f: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x0160: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x0161: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1255: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x05b0 ) && ( unicode_character < 0x05c8 ) ) { unicode_character -= 0x05b0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ unicode_character ]; } else if( ( unicode_character >= 0x05d0 ) && ( unicode_character < 0x05f8 ) ) { unicode_character -= 0x05d0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x00f7: byte_stream[ *byte_stream_index ] = 0xba; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x200e: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x200f: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20aa: byte_stream[ *byte_stream_index ] = 0xa4; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1256: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x00e0 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x00e0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x00e0[ unicode_character ]; } else if( ( unicode_character >= 0x0618 ) && ( unicode_character < 0x0658 ) ) { unicode_character -= 0x0618; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x0618[ unicode_character ]; } else if( ( unicode_character >= 0x2008 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2008; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1256_unicode_to_byte_stream_base_0x2008[ unicode_character ]; } else switch( unicode_character ) { case 0x00d7: byte_stream[ *byte_stream_index ] = 0xd7; break; case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x060c: byte_stream[ *byte_stream_index ] = 0xa1; break; case 0x0679: byte_stream[ *byte_stream_index ] = 0x8a; break; case 0x067e: byte_stream[ *byte_stream_index ] = 0x81; break; case 0x0686: byte_stream[ *byte_stream_index ] = 0x8d; break; case 0x0688: byte_stream[ *byte_stream_index ] = 0x8f; break; case 0x0691: byte_stream[ *byte_stream_index ] = 0x9a; break; case 0x0698: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x06a9: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x06af: byte_stream[ *byte_stream_index ] = 0x90; break; case 0x06ba: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x06be: byte_stream[ *byte_stream_index ] = 0xaa; break; case 0x06c1: byte_stream[ *byte_stream_index ] = 0xc0; break; case 0x06d2: byte_stream[ *byte_stream_index ] = 0xff; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1257: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x0180 ) ) { unicode_character -= 0x00a0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x00a0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1257_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x02c7: byte_stream[ *byte_stream_index ] = 0x8e; break; case 0x02d9: byte_stream[ *byte_stream_index ] = 0xff; break; case 0x02db: byte_stream[ *byte_stream_index ] = 0x9e; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; case LIBUNA_CODEPAGE_WINDOWS_1258: if( unicode_character < 0x0080 ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00a0 ) && ( unicode_character < 0x00c0 ) ) { byte_stream[ *byte_stream_index ] = (uint8_t) unicode_character; } else if( ( unicode_character >= 0x00c0 ) && ( unicode_character < 0x0108 ) ) { unicode_character -= 0x00c0; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ unicode_character ]; } else if( ( unicode_character >= 0x2010 ) && ( unicode_character < 0x2028 ) ) { unicode_character -= 0x2010; byte_stream[ *byte_stream_index ] = libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ unicode_character ]; } else switch( unicode_character ) { case 0x0110: byte_stream[ *byte_stream_index ] = 0xd0; break; case 0x0111: byte_stream[ *byte_stream_index ] = 0xf0; break; case 0x0152: byte_stream[ *byte_stream_index ] = 0x8c; break; case 0x0153: byte_stream[ *byte_stream_index ] = 0x9c; break; case 0x0178: byte_stream[ *byte_stream_index ] = 0x9f; break; case 0x0192: byte_stream[ *byte_stream_index ] = 0x83; break; case 0x01a0: byte_stream[ *byte_stream_index ] = 0xd5; break; case 0x01a1: byte_stream[ *byte_stream_index ] = 0xf5; break; case 0x01af: byte_stream[ *byte_stream_index ] = 0xdd; break; case 0x01b0: byte_stream[ *byte_stream_index ] = 0xfd; break; case 0x02c6: byte_stream[ *byte_stream_index ] = 0x88; break; case 0x02dc: byte_stream[ *byte_stream_index ] = 0x98; break; case 0x0300: byte_stream[ *byte_stream_index ] = 0xcc; break; case 0x0301: byte_stream[ *byte_stream_index ] = 0xec; break; case 0x0303: byte_stream[ *byte_stream_index ] = 0xde; break; case 0x0309: byte_stream[ *byte_stream_index ] = 0xd2; break; case 0x0323: byte_stream[ *byte_stream_index ] = 0xf2; break; case 0x2030: byte_stream[ *byte_stream_index ] = 0x89; break; case 0x2039: byte_stream[ *byte_stream_index ] = 0x8b; break; case 0x203a: byte_stream[ *byte_stream_index ] = 0x9b; break; case 0x20ab: byte_stream[ *byte_stream_index ] = 0xfe; break; case 0x20ac: byte_stream[ *byte_stream_index ] = 0x80; break; case 0x2122: byte_stream[ *byte_stream_index ] = 0x99; break; default: byte_stream[ *byte_stream_index ] = 0x1a; break; } *byte_stream_index += 1; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported codepage: %d.", function, codepage ); return( -1 ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy Unicode character to byte stream.", function ); return( -1 ); } return( 1 ); } /* Determines the size of an UTF-7 stream character from an Unicode character * Adds the size to the UTF-7 stream character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf7_stream( libuna_unicode_character_t unicode_character, size_t *utf7_stream_character_size, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ) { libuna_utf16_character_t utf16_surrogate = 0; static char *function = "libuna_unicode_character_size_to_utf7_stream"; uint8_t base64_encode_character = 0; uint32_t base64_triplet = 0; uint8_t number_of_bytes = 0; uint8_t current_byte = 0; uint8_t byte_bit_shift = 0; if( utf7_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream character size.", function ); return( -1 ); } if( utf7_stream_base64_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream base64 data.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( unicode_character >= 0x41 ) && ( unicode_character <= 0x49 ) ) { } else if( ( unicode_character >= 0x4a ) && ( unicode_character <= 0x52 ) ) { } else if( ( unicode_character >= 0x53 ) && ( unicode_character <= 0x5a ) ) { } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( unicode_character >= 0x61 ) && ( unicode_character <= 0x69 ) ) { } else if( ( unicode_character >= 0x6a ) && ( unicode_character <= 0x72 ) ) { } else if( ( unicode_character >= 0x73 ) && ( unicode_character <= 0x7a ) ) { } /* 0-9 */ else if( ( unicode_character >= 0x30 ) && ( unicode_character <= 0x39 ) ) { } /* Valid directly encoded whitespace */ else if( ( unicode_character == (libuna_unicode_character_t) '\t' ) || ( unicode_character == (libuna_unicode_character_t) '\n' ) || ( unicode_character == (libuna_unicode_character_t) '\r' ) || ( unicode_character == (libuna_unicode_character_t) ' ' ) ) { } /* The + character must be escaped */ else if( unicode_character == (libuna_unicode_character_t) '+' ) { } /* Valid directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '\'' ) || ( unicode_character == (libuna_unicode_character_t) '(' ) || ( unicode_character == (libuna_unicode_character_t) ')' ) || ( unicode_character == (libuna_unicode_character_t) ',' ) || ( unicode_character == (libuna_unicode_character_t) '-' ) || ( unicode_character == (libuna_unicode_character_t) '.' ) || ( unicode_character == (libuna_unicode_character_t) '/' ) || ( unicode_character == (libuna_unicode_character_t) ':' ) || ( unicode_character == (libuna_unicode_character_t) '?' ) ) { } /* Valid optional directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '!' ) || ( unicode_character == (libuna_unicode_character_t) '"' ) || ( unicode_character == (libuna_unicode_character_t) '#' ) || ( unicode_character == (libuna_unicode_character_t) '$' ) || ( unicode_character == (libuna_unicode_character_t) '%' ) || ( unicode_character == (libuna_unicode_character_t) '&' ) || ( unicode_character == (libuna_unicode_character_t) '*' ) || ( unicode_character == (libuna_unicode_character_t) ';' ) || ( unicode_character == (libuna_unicode_character_t) '<' ) || ( unicode_character == (libuna_unicode_character_t) '=' ) || ( unicode_character == (libuna_unicode_character_t) '>' ) || ( unicode_character == (libuna_unicode_character_t) '@' ) || ( unicode_character == (libuna_unicode_character_t) '[' ) || ( unicode_character == (libuna_unicode_character_t) ']' ) || ( unicode_character == (libuna_unicode_character_t) '^' ) || ( unicode_character == (libuna_unicode_character_t) '_' ) || ( unicode_character == (libuna_unicode_character_t) '`' ) || ( unicode_character == (libuna_unicode_character_t) '{' ) || ( unicode_character == (libuna_unicode_character_t) '|' ) || ( unicode_character == (libuna_unicode_character_t) '}' ) ) { } /* Allow for the end of string character */ else if( unicode_character == 0 ) { } else { base64_encode_character = 1; } if( base64_encode_character == 0 ) { if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = 0; } *utf7_stream_character_size += 1; /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { *utf7_stream_character_size += 1; } } else { /* Escape the base64 encoded characters with a + */ if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { *utf7_stream_character_size += 1; } /* Otherwise continue the previously base64 encoded characters */ else { base64_triplet = *utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( *utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( *utf7_stream_base64_data >> 28 ) & 0x03; if( number_of_bytes > 0 ) { if( *utf7_stream_character_size < (size_t) ( number_of_bytes + 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-7 stream character size value out of bounds.", function ); return( -1 ); } /* Correct the size for the last partial base64 stream */ *utf7_stream_character_size -= number_of_bytes + 1; } if( *utf7_stream_character_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-7 stream character size value out of bounds.", function ); return( -1 ); } /* Correct the size for the base64 stream termination character */ *utf7_stream_character_size -= 1; } *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { unicode_character -= 0x010000; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( utf16_surrogate >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( utf16_surrogate & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } unicode_character = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( unicode_character >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( unicode_character & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { *utf7_stream_character_size += 4; number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } /* Terminate the base64 encoded characters */ if( number_of_bytes > 0 ) { *utf7_stream_character_size += number_of_bytes + 1; } *utf7_stream_character_size += 1; } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_base64_data |= (uint32_t) current_byte << 28; *utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; *utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } return( 1 ); } /* Copies a Unicode character from an UTF-7 stream * The bits of the base64 data contain: * 0 - 23 the base64 triplet * 24 - 25 the number of bytes in the triplet * 26 - 27 unused * 28 - 29 the current byte * 30 unused * 31 flag to indicate the current UTF-7 characters are (modified) base64 encoded * * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf7_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf7_stream_index, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf7_stream"; libuna_utf16_character_t utf16_surrogate = 0; uint32_t base64_triplet = 0; uint8_t number_of_bytes = 0; uint8_t current_byte = 0; uint8_t padding_size = 0; uint8_t byte_bit_shift = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream index.", function ); return( -1 ); } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } if( utf7_stream_base64_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 base64 data.", function ); return( -1 ); } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { base64_triplet = *utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( *utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( *utf7_stream_base64_data >> 28 ) & 0x03; if( current_byte >= number_of_bytes ) { /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'A' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'I' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'J' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'R' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'S' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'Z' ) ) { } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'a' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'i' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'j' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'r' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 's' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'z' ) ) { } /* 0-9 */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) '0' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) '9' ) ) { } /* + or / */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '+' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '/' ) ) { } /* Any character not in the modified base64 alphabet * terminates the base64 encoded sequence */ else { *utf7_stream_base64_data = 0; } } } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { /* Determine if the character is modified base64 encoded * or a + character */ if( utf7_stream[ *utf7_stream_index ] == (uint8_t) '+' ) { if( utf7_stream[ *utf7_stream_index + 1 ] != (uint8_t) '-' ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_index += 1; } } /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'A' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'I' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'J' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'R' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'S' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'Z' ) ) { } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'a' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'i' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 'j' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'r' ) ) { } else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) 's' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) 'z' ) ) { } /* 0-9 */ else if( ( utf7_stream[ *utf7_stream_index ] >= (uint8_t) '0' ) && ( utf7_stream[ *utf7_stream_index ] <= (uint8_t) '9' ) ) { } /* Valid directly encoded whitespace */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\t' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\n' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\r' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ' ' ) ) { } /* Valid directly encoded characters */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '\'' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '(' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ')' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ',' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '-' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '.' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '/' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ':' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '?' ) ) { } /* Valid optional directly encoded characters */ else if( ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '!' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '"' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '#' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '$' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '%' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '&' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '*' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ';' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '<' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '=' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '>' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '@' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '[' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) ']' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '^' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '_' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '`' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '{' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '|' ) || ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '}' ) ) { } /* Allow for the end of string character */ else if( utf7_stream[ *utf7_stream_index ] == 0 ) { } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid directly encoded UTF-7 character byte: 0x%02" PRIx8 ".", function, utf7_stream[ *utf7_stream_index ] ); return( -1 ); } } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { *unicode_character = utf7_stream[ *utf7_stream_index ]; *utf7_stream_index += 1; if( ( *unicode_character == (libuna_unicode_character_t) '+' ) && ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '-' ) ) { *utf7_stream_index += 1; } } else if( ( number_of_bytes == 0 ) || ( current_byte >= number_of_bytes ) ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { byte_bit_shift = 16 - ( current_byte * 8 ); *unicode_character = ( ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL ) << 8; current_byte += 1; if( current_byte >= number_of_bytes ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); *unicode_character += ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL; current_byte += 1; if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( current_byte >= number_of_bytes ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); utf16_surrogate = ( ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL ) << 8; current_byte += 1; if( current_byte >= number_of_bytes ) { if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, &padding_size, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve base64 encoded UTF-7 characters.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported padding in base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 3 - padding_size; current_byte = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); utf16_surrogate += ( base64_triplet >> byte_bit_shift ) & 0x000000ffUL; current_byte += 1; /* Determine if the UTF-16 character is within the low surrogate range */ if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; *unicode_character <<= 10; *unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END; *unicode_character += 0x010000; } else { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } if( ( current_byte >= number_of_bytes ) && ( utf7_stream[ *utf7_stream_index ] == (uint8_t) '-' ) ) { *utf7_stream_base64_data = 0; *utf7_stream_index += 1; } } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_base64_data |= (uint32_t) current_byte << 28; *utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; *utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } return( 1 ); } /* Copies a Unicode character into a UTF-7 stream * The bits of the base64 data contain: * 0 - 23 the base64 triplet * 24 - 25 the number of bytes in the triplet * 26 - 27 unused * 28 - 29 the current byte * 30 unused * 31 flag to indicate the current UTF-7 characters are (modified) base64 encoded * * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf7_stream( libuna_unicode_character_t unicode_character, uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf7_stream_index, uint32_t *utf7_stream_base64_data, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf7_stream"; libuna_utf16_character_t utf16_surrogate = 0; uint32_t base64_triplet = 0; uint8_t number_of_bytes = 0; uint8_t base64_encode_character = 0; uint8_t current_byte = 0; uint8_t byte_bit_shift = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream index.", function ); return( -1 ); } if( utf7_stream_base64_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream base64 data.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( unicode_character >= 0x41 ) && ( unicode_character <= 0x49 ) ) { unicode_character = ( unicode_character - 0x41 ) + (libuna_unicode_character_t) 'A'; } else if( ( unicode_character >= 0x4a ) && ( unicode_character <= 0x52 ) ) { unicode_character = ( unicode_character - 0x4a ) + (libuna_unicode_character_t) 'J'; } else if( ( unicode_character >= 0x53 ) && ( unicode_character <= 0x5a ) ) { unicode_character = ( unicode_character - 0x53 ) + (libuna_unicode_character_t) 'S'; } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( unicode_character >= 0x61 ) && ( unicode_character <= 0x69 ) ) { unicode_character = ( unicode_character - 0x61 ) + (libuna_unicode_character_t) 'a'; } else if( ( unicode_character >= 0x6a ) && ( unicode_character <= 0x72 ) ) { unicode_character = ( unicode_character - 0x6a ) + (libuna_unicode_character_t) 'j'; } else if( ( unicode_character >= 0x73 ) && ( unicode_character <= 0x7a ) ) { unicode_character = ( unicode_character - 0x73 ) + (libuna_unicode_character_t) 's'; } /* 0-9 */ else if( ( unicode_character >= 0x30 ) && ( unicode_character <= 0x39 ) ) { unicode_character = ( unicode_character - 0x30 ) + (libuna_unicode_character_t) '0'; } /* Valid directly encoded whitespace */ else if( ( unicode_character == (libuna_unicode_character_t) '\t' ) || ( unicode_character == (libuna_unicode_character_t) '\n' ) || ( unicode_character == (libuna_unicode_character_t) '\r' ) || ( unicode_character == (libuna_unicode_character_t) ' ' ) ) { } /* The + character must be escaped */ else if( unicode_character == (libuna_unicode_character_t) '+' ) { } /* Valid directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '\'' ) || ( unicode_character == (libuna_unicode_character_t) '(' ) || ( unicode_character == (libuna_unicode_character_t) ')' ) || ( unicode_character == (libuna_unicode_character_t) ',' ) || ( unicode_character == (libuna_unicode_character_t) '-' ) || ( unicode_character == (libuna_unicode_character_t) '.' ) || ( unicode_character == (libuna_unicode_character_t) '/' ) || ( unicode_character == (libuna_unicode_character_t) ':' ) || ( unicode_character == (libuna_unicode_character_t) '?' ) ) { } /* Valid optional directly encoded characters */ else if( ( unicode_character == (libuna_unicode_character_t) '!' ) || ( unicode_character == (libuna_unicode_character_t) '"' ) || ( unicode_character == (libuna_unicode_character_t) '#' ) || ( unicode_character == (libuna_unicode_character_t) '$' ) || ( unicode_character == (libuna_unicode_character_t) '%' ) || ( unicode_character == (libuna_unicode_character_t) '&' ) || ( unicode_character == (libuna_unicode_character_t) '*' ) || ( unicode_character == (libuna_unicode_character_t) ';' ) || ( unicode_character == (libuna_unicode_character_t) '<' ) || ( unicode_character == (libuna_unicode_character_t) '=' ) || ( unicode_character == (libuna_unicode_character_t) '>' ) || ( unicode_character == (libuna_unicode_character_t) '@' ) || ( unicode_character == (libuna_unicode_character_t) '[' ) || ( unicode_character == (libuna_unicode_character_t) ']' ) || ( unicode_character == (libuna_unicode_character_t) '^' ) || ( unicode_character == (libuna_unicode_character_t) '_' ) || ( unicode_character == (libuna_unicode_character_t) '`' ) || ( unicode_character == (libuna_unicode_character_t) '{' ) || ( unicode_character == (libuna_unicode_character_t) '|' ) || ( unicode_character == (libuna_unicode_character_t) '}' ) ) { } /* Allow for the end of string character */ else if( unicode_character == 0 ) { } else { base64_encode_character = 1; } if( base64_encode_character == 0 ) { if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = 0; } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) unicode_character; *utf7_stream_index += 1; /* The + character must be escaped */ if( unicode_character == (libuna_unicode_character_t) '+' ) { if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) '-'; *utf7_stream_index += 1; } } else { /* Escape the base64 encoded chracters with a + */ if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) == 0 ) { if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) '+'; *utf7_stream_index += 1; } /* Otherwise continue the previously base64 encoded characters */ else { base64_triplet = *utf7_stream_base64_data & 0x00ffffff; number_of_bytes = ( *utf7_stream_base64_data >> 24 ) & 0x03; current_byte = ( *utf7_stream_base64_data >> 28 ) & 0x03; if( number_of_bytes > 0 ) { /* Correct the index for the last partial base64 stream */ *utf7_stream_index -= number_of_bytes + 1; } /* Correct the index for the base64 stream termination character */ *utf7_stream_index -= 1; } *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; if( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { unicode_character -= 0x010000; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( utf16_surrogate >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( utf16_surrogate & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } unicode_character = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( ( unicode_character >> 8 ) & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } byte_bit_shift = 16 - ( current_byte * 8 ); base64_triplet += (uint32_t) ( unicode_character & 0xff ) << byte_bit_shift; current_byte += 1; number_of_bytes += 1; if( number_of_bytes == 3 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 0, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } number_of_bytes = 0; current_byte = 0; base64_triplet = 0; } /* Terminate the base64 encoded characters */ if( number_of_bytes > 0 ) { if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, utf7_stream, utf7_stream_size, utf7_stream_index, 3 - number_of_bytes, LIBUNA_BASE64_VARIANT_UTF7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set base64 encoded UTF-7 characters.", function ); return( -1 ); } } if( *utf7_stream_index >= utf7_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-7 stream too small.", function ); return( -1 ); } utf7_stream[ *utf7_stream_index ] = (uint8_t) '-'; *utf7_stream_index += 1; } if( ( *utf7_stream_base64_data & LIBUNA_UTF7_IS_BASE64_ENCODED ) != 0 ) { *utf7_stream_base64_data = LIBUNA_UTF7_IS_BASE64_ENCODED; *utf7_stream_base64_data |= (uint32_t) current_byte << 28; *utf7_stream_base64_data |= (uint32_t) number_of_bytes << 24; *utf7_stream_base64_data |= base64_triplet & 0x00ffffff; } return( 1 ); } /* Determines the size of an UTF-8 character from an Unicode character * Adds the size to the UTF-8 character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf8( libuna_unicode_character_t unicode_character, size_t *utf8_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf8"; if( utf8_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 character size.", function ); return( -1 ); } if( unicode_character < 0x080 ) { *utf8_character_size += 1; } else if( unicode_character < 0x0800 ) { *utf8_character_size += 2; } else if( unicode_character < 0x010000 ) { *utf8_character_size += 3; } else if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { *utf8_character_size += 3; } else { *utf8_character_size += 4; } /* If UTF-8 USC support is needed it should be implemented in * utf8_usc or something, but for now leave this here as a reminder else if( unicode_character < 0x010000 ) { *utf8_character_size += 3; } else if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { *utf8_character_size += 2; } else if( unicode_character < 0x0200000 ) { *utf8_character_size += 4; } else if( unicode_character < 0x0400000 ) { *utf8_character_size += 5; } else { *utf8_character_size += 6; } */ return( 1 ); } /* Copies a Unicode character from an UTF-8 string * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf8( libuna_unicode_character_t *unicode_character, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf8"; uint8_t utf8_character_additional_bytes = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } /* Determine the number of additional bytes of the UTF-8 character */ if( utf8_string[ *utf8_string_index ] < 0xc0 ) { utf8_character_additional_bytes = 0; } else if( utf8_string[ *utf8_string_index ] < 0xe0 ) { utf8_character_additional_bytes = 1; } else if( utf8_string[ *utf8_string_index ] < 0xf0 ) { utf8_character_additional_bytes = 2; } else if( utf8_string[ *utf8_string_index ] < 0xf8 ) { utf8_character_additional_bytes = 3; } else if( utf8_string[ *utf8_string_index ] < 0xfc ) { utf8_character_additional_bytes = 4; } else { utf8_character_additional_bytes = 5; } if( ( *utf8_string_index + utf8_character_additional_bytes + 1 ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 character bytes.", function ); return( -1 ); } /* Determine the UTF-8 character and make sure it is valid * Unicode limits the UTF-8 character to consist of a maximum of 4 bytes * while ISO 10646 Universal Character Set (UCS) allows up to 6 bytes */ if( utf8_string[ *utf8_string_index ] > 0xf4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index ] ); return( -1 ); } *unicode_character = utf8_string[ *utf8_string_index ]; if( utf8_character_additional_bytes == 0 ) { if( ( utf8_string[ *utf8_string_index ] >= 0x80 ) && ( utf8_string[ *utf8_string_index ] < 0xc2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index ] ); return( -1 ); } } if( utf8_character_additional_bytes >= 1 ) { if( utf8_string[ *utf8_string_index + 1 ] > 0xbf ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } if( ( utf8_string[ *utf8_string_index ] == 0xe0 ) && ( utf8_string[ *utf8_string_index + 1 ] < 0xa0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( ( utf8_string[ *utf8_string_index ] == 0xed ) && ( utf8_string[ *utf8_string_index + 1 ] > 0x9f ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( ( utf8_string[ *utf8_string_index ] == 0xf0 ) && ( utf8_string[ *utf8_string_index + 1 ] < 0x90 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( ( utf8_string[ *utf8_string_index ] == 0xf4 ) && ( utf8_string[ *utf8_string_index + 1 ] > 0x8f ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } else if( utf8_string[ *utf8_string_index + 1 ] < 0x80 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 1 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 1 ]; if( utf8_character_additional_bytes == 1 ) { *unicode_character -= 0x03080; } } if( utf8_character_additional_bytes >= 2 ) { if( ( utf8_string[ *utf8_string_index + 2 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 2 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 2 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 2 ]; if( utf8_character_additional_bytes == 2 ) { *unicode_character -= 0x0e2080; } } if( utf8_character_additional_bytes >= 3 ) { if( ( utf8_string[ *utf8_string_index + 3 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 3 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 3 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 3 ]; if( utf8_character_additional_bytes == 3 ) { *unicode_character -= 0x03c82080; } } if( utf8_character_additional_bytes >= 4 ) { if( ( utf8_string[ *utf8_string_index + 4 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 4 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 4 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 4 ]; if( utf8_character_additional_bytes == 4 ) { *unicode_character -= 0x0fa082080; } } if( utf8_character_additional_bytes == 5 ) { if( ( utf8_string[ *utf8_string_index + 5 ] < 0x80 ) || ( utf8_string[ *utf8_string_index + 5 ] > 0xbf ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th UTF-8 character byte: 0x%02" PRIx8 ".", function, utf8_string[ *utf8_string_index + 5 ] ); return( -1 ); } *unicode_character <<= 6; *unicode_character += utf8_string[ *utf8_string_index + 5 ]; *unicode_character -= 0x082082080; } /* Determine if the Unicode character is valid */ if( *unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } *utf8_string_index += 1 + utf8_character_additional_bytes; return( 1 ); } /* Copies a Unicode character into a UTF-8 string * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf8( libuna_unicode_character_t unicode_character, libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf8"; uint8_t utf8_character_additional_bytes = 0; uint8_t utf8_character_iterator = 0; uint8_t utf8_first_character_mark = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( unicode_character > LIBUNA_UNICODE_CHARACTER_MAX ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } /* Determine how many UTF-8 character bytes are required */ if( unicode_character < 0x080 ) { utf8_character_additional_bytes = 0; utf8_first_character_mark = 0; } else if( unicode_character < 0x0800 ) { utf8_character_additional_bytes = 1; utf8_first_character_mark = 0x0c0; } else if( unicode_character < 0x010000 ) { utf8_character_additional_bytes = 2; utf8_first_character_mark = 0x0e0; } else if( unicode_character < 0x0200000 ) { utf8_character_additional_bytes = 3; utf8_first_character_mark = 0x0f0; } else if( unicode_character < 0x0400000 ) { utf8_character_additional_bytes = 4; utf8_first_character_mark = 0x0f8; } else { utf8_character_additional_bytes = 5; utf8_first_character_mark = 0x0fc; } /* Convert Unicode character into UTF-8 character bytes */ if( ( *utf8_string_index + utf8_character_additional_bytes ) >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } for( utf8_character_iterator = utf8_character_additional_bytes; utf8_character_iterator > 0; utf8_character_iterator-- ) { utf8_string[ *utf8_string_index + utf8_character_iterator ] = (libuna_utf8_character_t) ( ( unicode_character & 0x0bf ) | 0x080 ); unicode_character >>= 6; } utf8_string[ *utf8_string_index ] = (libuna_utf8_character_t) ( unicode_character | utf8_first_character_mark ); *utf8_string_index += 1 + utf8_character_additional_bytes; return( 1 ); } /* Determines the size of an UTF-16 character from an Unicode character * Adds the size to the UTF-16 character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf16( libuna_unicode_character_t unicode_character, size_t *utf16_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf16"; if( utf16_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 character size.", function ); return( -1 ); } if( ( unicode_character > LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) && ( unicode_character <= LIBUNA_UTF16_CHARACTER_MAX ) ) { *utf16_character_size += 2; } else { *utf16_character_size += 1; } return( 1 ); } /* Copies a Unicode character from an UTF-16 string * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf16( libuna_unicode_character_t *unicode_character, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf16"; libuna_utf16_character_t utf16_surrogate = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } *unicode_character = utf16_string[ *utf16_string_index ]; *utf16_string_index += 1; /* Determine if the UTF-16 character is within the high surrogate range */ if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: missing surrogate UTF-16 character bytes.", function ); return( -1 ); } utf16_surrogate = utf16_string[ *utf16_string_index ]; *utf16_string_index += 1; /* Determine if the UTF-16 character is within the low surrogate range */ if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; *unicode_character <<= 10; *unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END; *unicode_character += 0x010000; } else { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } } /* Determine if the Unicode character is valid */ else if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } return( 1 ); } /* Copies a Unicode character into a UTF-16 string * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf16( libuna_unicode_character_t unicode_character, libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf16"; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF16_CHARACTER_MAX ) ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { utf16_string[ *utf16_string_index ] = (libuna_utf16_character_t) unicode_character; *utf16_string_index += 1; } else { if( ( *utf16_string_index + 1 ) >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } unicode_character -= 0x010000; utf16_string[ *utf16_string_index ] = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); utf16_string[ *utf16_string_index + 1 ] = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); *utf16_string_index += 2; } return( 1 ); } /* Copies a Unicode character from an UTF-16 stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf16_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf16_stream"; libuna_utf16_character_t utf16_surrogate = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream index.", function ); return( -1 ); } if( *utf16_stream_index >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { *unicode_character = utf16_stream[ *utf16_stream_index ]; *unicode_character <<= 8; *unicode_character += utf16_stream[ *utf16_stream_index + 1 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { *unicode_character = utf16_stream[ *utf16_stream_index + 1 ]; *unicode_character <<= 8; *unicode_character += utf16_stream[ *utf16_stream_index ]; } *utf16_stream_index += 2; /* Determine if the UTF-16 character is within the high surrogate range */ if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END ) ) { if( *utf16_stream_index >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: missing surrogate UTF-16 character bytes.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_surrogate = utf16_stream[ *utf16_stream_index ]; utf16_surrogate <<= 8; utf16_surrogate += utf16_stream[ *utf16_stream_index + 1 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_surrogate = utf16_stream[ *utf16_stream_index + 1 ]; utf16_surrogate <<= 8; utf16_surrogate += utf16_stream[ *utf16_stream_index ]; } *utf16_stream_index += 2; /* Determine if the UTF-16 character is within the low surrogate range */ if( ( utf16_surrogate >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf16_surrogate <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character -= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START; *unicode_character <<= 10; *unicode_character += utf16_surrogate - LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END; *unicode_character += 0x010000; } else { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } } /* Determine if the Unicode character is valid */ else if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } return( 1 ); } /* Copies a Unicode character to an UTF-16 stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf16_stream( libuna_unicode_character_t unicode_character, uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf16_stream"; libuna_utf16_character_t utf16_surrogate = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream index.", function ); return( -1 ); } if( ( *utf16_stream_index + 1 ) >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF16_CHARACTER_MAX ) ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } if( unicode_character <= LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX ) { if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf16_stream[ *utf16_stream_index ] = (uint8_t) ( unicode_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); } *utf16_stream_index += 2; } else { if( ( *utf16_stream_index + 3 ) >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } unicode_character -= 0x010000; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character >> 10 ) + LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ); if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); } *utf16_stream_index += 2; utf16_surrogate = (libuna_utf16_character_t) ( ( unicode_character & 0x03ff ) + LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ); if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = (uint8_t) ( utf16_surrogate & 0xff ); utf16_surrogate >>= 8; utf16_stream[ *utf16_stream_index + 1 ] = (uint8_t) ( utf16_surrogate & 0xff ); } *utf16_stream_index += 2; } return( 1 ); } /* Determines the size of an UTF-32 character from an Unicode character * Adds the size to the UTF-32 character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_size_to_utf32( libuna_unicode_character_t unicode_character LIBUNA_ATTRIBUTE_UNUSED, size_t *utf32_character_size, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_size_to_utf32"; LIBUNA_UNREFERENCED_PARAMETER( unicode_character ) if( utf32_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 character size.", function ); return( -1 ); } *utf32_character_size += 1; return( 1 ); } /* Copies a Unicode character from an UTF-32 string * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf32( libuna_unicode_character_t *unicode_character, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf32"; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( utf32_string[ *utf32_string_index ] >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( utf32_string[ *utf32_string_index ] <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } else { *unicode_character = utf32_string[ *utf32_string_index ]; } *utf32_string_index += 1; return( 1 ); } /* Copies a Unicode character into a UTF-32 string * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf32( libuna_unicode_character_t unicode_character, libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf32"; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string too small.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF32_CHARACTER_MAX ) ) { utf32_string[ *utf32_string_index ] = (libuna_utf32_character_t) LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } else { utf32_string[ *utf32_string_index ] = (libuna_utf32_character_t) unicode_character; } *utf32_string_index += 1; return( 1 ); } /* Copies a Unicode character from an UTF-32 stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_from_utf32_stream( libuna_unicode_character_t *unicode_character, const uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_from_utf32_stream"; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream index.", function ); return( -1 ); } if( *utf32_stream_index >= utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { *unicode_character = utf32_stream[ *utf32_stream_index ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index + 1 ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index + 2 ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index + 3 ]; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { *unicode_character = utf32_stream[ *utf32_stream_index + 3 ]; *unicode_character <<= 8; *unicode_character = utf32_stream[ *utf32_stream_index + 2 ]; *unicode_character <<= 8; *unicode_character = utf32_stream[ *utf32_stream_index + 1 ]; *unicode_character <<= 8; *unicode_character += utf32_stream[ *utf32_stream_index ]; } /* Determine if the Unicode character is valid */ if( ( *unicode_character >= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START ) && ( *unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) { *unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } *utf32_stream_index += 4; return( 1 ); } /* Copies a Unicode character to an UTF-32 stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_unicode_character_copy_to_utf32_stream( libuna_unicode_character_t unicode_character, uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_unicode_character_copy_to_utf32_stream"; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream index.", function ); return( -1 ); } if( ( *utf32_stream_index + 1 ) >= utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Determine if the Unicode character is valid */ if( ( ( unicode_character >= LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START ) && ( unicode_character <= LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END ) ) || ( unicode_character > LIBUNA_UTF32_CHARACTER_MAX ) ) { unicode_character = LIBUNA_UNICODE_REPLACEMENT_CHARACTER; } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf32_stream[ *utf32_stream_index + 3 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 2 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index ] = (uint8_t) ( unicode_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf32_stream[ *utf32_stream_index ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 1 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 2 ] = (uint8_t) ( unicode_character & 0xff ); unicode_character >>= 8; utf32_stream[ *utf32_stream_index + 3 ] = (uint8_t) ( unicode_character & 0xff ); } *utf32_stream_index += 4; return( 1 ); } libpff-20120802/libuna/libuna_utf8_string.c0000644000175000017500000022742612005152764015400 00000000000000/* * UTF-8 string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf8_string.h" /* Determines the size of an UTF-8 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if the byte stream is terminated with a zero byte */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { *utf8_string_size += 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_byte_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, &utf8_string_index, byte_stream, byte_stream_size, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_byte_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with a byte stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_byte_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_byte_stream"; size_t byte_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t byte_stream_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] == 0 ) { byte_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( byte_stream_index < byte_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &byte_stream_unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } if( utf8_unicode_character != byte_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( byte_stream_index != byte_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if the UTF-7 stream is terminated with a zero byte */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { *utf8_string_size += 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf7_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf7_stream( utf8_string, utf8_string_size, &utf8_string_index, utf7_stream, utf7_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-7 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf7_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; uint8_t zero_byte = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-7 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf7_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf7_stream"; size_t utf7_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf7_stream_unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] == 0 ) { utf7_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf7_stream_index < utf7_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-7 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &utf7_stream_unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf7_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf7_stream_index != utf7_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with a zero byte */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { *utf8_string_size += 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf8_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf8_stream( utf8_string, utf8_string_size, &utf8_string_index, utf8_stream, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-8 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf8_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-8 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf8_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf8_stream"; size_t utf8_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf8_stream_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] == 0 ) { utf8_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf8_stream_index < utf8_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_stream_unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf8_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf8_stream_index != utf8_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf16"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf16( utf8_string, utf8_string_size, &utf8_string_index, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf16( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Compares an UTF-8 string with an UTF-16 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf16( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf16"; size_t utf16_string_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf16_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf16_string_index < utf16_string_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } if( utf8_unicode_character != utf16_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf16_string_index != utf16_string_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { *utf8_string_size += 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf16_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf16_stream( utf8_string, utf8_string_size, &utf8_string_index, utf16_stream, utf16_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf16_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-16 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf16_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf16_stream"; size_t utf16_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] == 0 ) && ( utf16_stream[ utf16_stream_size - 1 ] == 0 ) ) { utf16_stream_size -= 2; } while( ( utf8_string_index < utf8_string_size ) && ( utf16_stream_index < utf16_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &utf16_stream_unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf16_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf16_stream_index != utf16_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf32"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf32( utf8_string, utf8_string_size, &utf8_string_index, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 string to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf32( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Compares an UTF-8 string with an UTF-32 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf32( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf32"; size_t utf32_string_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf32_unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } if( utf32_string[ utf32_string_size - 1 ] == 0 ) { utf32_string_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf32_string_index < utf32_string_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } if( utf8_unicode_character != utf32_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf32_string_index != utf32_string_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-8 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_size_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 0; /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { *utf8_string_size += 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_copy_from_utf32_stream"; size_t utf8_string_index = 0; if( libuna_utf8_string_with_index_copy_from_utf32_stream( utf8_string, utf8_string_size, &utf8_string_index, utf32_stream, utf32_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf8_string_with_index_copy_from_utf32_stream( libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_with_index_copy_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_string, utf8_string_size, utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } return( 1 ); } /* Compares an UTF-8 string with an UTF-32 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf8_string_compare_with_utf32_stream( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf8_string_compare_with_utf32_stream"; size_t utf32_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t utf8_unicode_character = 0; libuna_unicode_character_t utf32_stream_unicode_character = 0; int read_byte_order = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string[ utf8_string_size - 1 ] == 0 ) { utf8_string_size -= 1; } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 3 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 2 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 1 ] == 0 ) ) { utf32_stream_size -= 1; } while( ( utf8_string_index < utf8_string_size ) && ( utf32_stream_index < utf32_stream_size ) ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &utf32_stream_unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } if( utf8_unicode_character != utf32_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf8_string_index != utf8_string_size ) || ( utf32_stream_index != utf32_stream_size ) ) { return( 0 ); } return( 1 ); } libpff-20120802/libuna/libuna_base32_stream.c0000644000175000017500000017251012005152764015547 00000000000000/* * Base32 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_base32_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" static uint8_t *libuna_base32_quintet_to_character_table = \ (uint8_t *) "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; static uint8_t *libuna_base32hex_quintet_to_character_table = \ (uint8_t *) "0123456789ABCDEFGHIJKLMNOPQRSTUV"; /* Copies a base32 character to a base32 quintet * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base32_character_copy_to_quintet( uint8_t base32_character, uint8_t *base32_quintet, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_character_copy_to_quintet"; if( base32_quintet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 quintet.", function ); return( -1 ); } switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base32_character >= (uint8_t) 'A' ) && ( base32_character <= (uint8_t) 'I' ) ) { *base32_quintet = base32_character - (uint8_t) 'A'; } else if( ( base32_character >= (uint8_t) 'J' ) && ( base32_character <= (uint8_t) 'R' ) ) { *base32_quintet = base32_character - (uint8_t) 'J' + 9; } else if( ( base32_character >= (uint8_t) 'S' ) && ( base32_character <= (uint8_t) 'Z' ) ) { *base32_quintet = base32_character - (uint8_t) 'S' + 18; } else if( ( base32_character >= (uint8_t) '2' ) && ( base32_character <= (uint8_t) '7' ) ) { *base32_quintet = base32_character - (uint8_t) '2' + 26; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base32 character: 0x%02" PRIx8 ".", function, base32_character ); return( -1 ); } break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: if( ( base32_character >= (uint8_t) '0' ) && ( base32_character <= (uint8_t) '9' ) ) { *base32_quintet = base32_character - (uint8_t) '0'; } /* A-V is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-V */ else if( ( base32_character >= (uint8_t) 'A' ) && ( base32_character <= (uint8_t) 'I' ) ) { *base32_quintet = base32_character - (uint8_t) 'A' + 10; } else if( ( base32_character >= (uint8_t) 'J' ) && ( base32_character <= (uint8_t) 'R' ) ) { *base32_quintet = base32_character - (uint8_t) 'J' + 19; } else if( ( base32_character >= (uint8_t) 'S' ) && ( base32_character <= (uint8_t) 'V' ) ) { *base32_quintet = base32_character - (uint8_t) 'J' + 27; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base32 character: 0x%02" PRIx8 ".", function, base32_character ); return( -1 ); } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } return( 1 ); } /* Copies a base32 quintuplet from a base32 stream * * The padding size will still be set to indicate the number of * quintets in the quintuplet * * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_from_base32_stream( uint64_t *base32_quintuplet, const uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, uint8_t *padding_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_quintuplet_copy_from_base32_stream"; size_t base32_character_size = 0; size_t stream_index = 0; uint32_t base32_character1 = 0; uint32_t base32_character2 = 0; uint8_t padding_character = 0; uint8_t quintet1 = 0; uint8_t quintet2 = 0; uint8_t quintet3 = 0; uint8_t quintet4 = 0; uint8_t quintet5 = 0; uint8_t quintet6 = 0; uint8_t quintet7 = 0; uint8_t quintet8 = 0; if( base32_quintuplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 quintuplet.", function ); return( -1 ); } if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream index.", function ); return( -1 ); } if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream string too small.", function ); return( -1 ); } if( padding_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid padding size.", function ); return( -1 ); } switch( base32_variant & 0x0f000000UL ) { case LIBUNA_BASE32_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE32_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character_size = 1; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base32_character_size = 2; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base32_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } stream_index = *base32_stream_index; if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 1st base32 character.", function ); return( -1 ); } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet1, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 character to 1st quintet.", function ); return( -1 ); } if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 2nd base32 character.", function ); return( -1 ); } switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd base32 character.", function ); return( -1 ); } if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet2, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 character to 2nd quintet.", function ); return( -1 ); } *padding_size = 6; if( ( stream_index + ( 2 * base32_character_size ) ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; base32_character2 = base32_stream[ stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; } stream_index += 2 * base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 character.", function ); return( -1 ); } if( ( base32_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( ( base32_character1 == (uint32_t) padding_character ) || ( base32_character2 == (uint32_t) padding_character ) ) ) { if( base32_character1 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 character.", function ); return( -1 ); } if( base32_character2 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 character.", function ); return( -1 ); } quintet3 = 0; quintet4 = 0; } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet3, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character2, &quintet4, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 2; } } else if( padding_character != 0 ) { if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 3rd base32 character.", function ); return( -1 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 4th base32 character.", function ); return( -1 ); } } if( ( stream_index + base32_character_size ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base32_character1 == (uint32_t) padding_character ) ) { quintet5 = 0; } else if( *padding_size > 4 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 quintet.", function ); return( -1 ); } } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet5, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 5th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 5th base32 character.", function ); return( -1 ); } if( ( stream_index + ( 2 * base32_character_size ) ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; base32_character2 = base32_stream[ stream_index + 1 ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index + 2 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index + 4 ] ), base32_character2 ); break; } stream_index += 2 * base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 character.", function ); return( -1 ); } if( ( base32_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( ( base32_character1 == (uint32_t) padding_character ) || ( base32_character2 == (uint32_t) padding_character ) ) ) { if( base32_character1 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 quintet.", function ); return( -1 ); } if( base32_character2 != (uint32_t) padding_character ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 quintet.", function ); return( -1 ); } quintet6 = 0; quintet7 = 0; } else if( *padding_size > 3 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th and 7th base32 quintet.", function ); return( -1 ); } } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet6, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 6th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character2, &quintet7, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 7th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 2; } } else if( padding_character != 0 ) { if( ( stream_index + base32_character_size ) > base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 6th base32 character.", function ); return( -1 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 7th base32 character.", function ); return( -1 ); } } if( ( stream_index + base32_character_size ) <= base32_stream_size ) { switch( base32_variant & 0xf0000000UL ) { case LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM: base32_character1 = base32_stream[ stream_index ]; break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; case LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base32_stream[ stream_index ] ), base32_character1 ); break; } stream_index += base32_character_size; if( ( base32_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base32_character1 == (uint32_t) padding_character ) ) { quintet8 = 0; } else if( *padding_size > 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 quintet.", function ); return( -1 ); } } else if( libuna_base32_character_copy_to_quintet( (uint8_t) base32_character1, &quintet8, base32_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 8th base32 quintet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 8th base32 character.", function ); return( -1 ); } *base32_quintuplet = quintet1; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet2; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet3; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet4; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet5; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet6; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet7; *base32_quintuplet <<= 5; *base32_quintuplet |= quintet8; *base32_stream_index = stream_index; return( 1 ); } /* Copies a base32 quintuplet to a base32 stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_to_base32_stream( uint64_t base32_quintuplet, uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, uint8_t padding_size, uint32_t base32_variant, libcerror_error_t **error ) { uint8_t *quintet_to_character_table = NULL; static char *function = "libuna_base32_quintuplet_copy_to_base32_stream"; uint8_t padding_character = 0; uint8_t quintet1 = 0; uint8_t quintet2 = 0; uint8_t quintet3 = 0; uint8_t quintet4 = 0; uint8_t quintet5 = 0; uint8_t quintet6 = 0; uint8_t quintet7 = 0; uint8_t quintet8 = 0; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream index.", function ); return( -1 ); } if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream string too small.", function ); return( -1 ); } if( padding_size > 6 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: quintet_to_character_table = libuna_base32_quintet_to_character_table; break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: quintet_to_character_table = libuna_base32hex_quintet_to_character_table; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } switch( base32_variant & 0x0f000000UL ) { case LIBUNA_BASE32_VARIANT_PADDING_NONE: case LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL: padding_character = 0; break; case LIBUNA_BASE32_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } /* TODO encoding support */ /* Separate the 3 bytes value into 8 x 5 bit values */ quintet8 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet7 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet6 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet5 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet4 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet3 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet2 = (uint8_t) ( base32_quintuplet & 0x1f ); base32_quintuplet >>= 5; quintet1 = (uint8_t) ( base32_quintuplet & 0x1f ); /* Spread the encoding over 2 characters if 1 byte is available */ if( ( *base32_stream_index + 1 ) >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet1 ]; base32_stream[ *base32_stream_index + 1 ] = quintet_to_character_table[ quintet2 ]; *base32_stream_index += 2; /* Spread the encoding over 4 characters if 2 bytes are available * Otherwise pad the remaining bytes if required */ if( ( *base32_stream_index + 1 ) >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 6 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet3 ]; base32_stream[ *base32_stream_index + 1 ] = quintet_to_character_table[ quintet4 ]; *base32_stream_index += 2; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; base32_stream[ *base32_stream_index + 1 ] = padding_character; *base32_stream_index += 2; } /* Spread the encoding over 5 characters if 3 bytes are available * Otherwise pad the remaining bytes if required */ if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 4 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet5 ]; *base32_stream_index += 1; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; *base32_stream_index += 1; } /* Spread the encoding over 7 characters if 4 bytes are available * Otherwise pad the remaining bytes if required */ if( ( *base32_stream_index + 1 ) >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 3 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet6 ]; base32_stream[ *base32_stream_index + 1 ] = quintet_to_character_table[ quintet7 ]; *base32_stream_index += 2; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; base32_stream[ *base32_stream_index + 1 ] = padding_character; *base32_stream_index += 2; } /* Spread the encoding over 8 characters if 5 bytes are available * Otherwise pad the remaining bytes if required */ if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } if( padding_size < 1 ) { base32_stream[ *base32_stream_index ] = quintet_to_character_table[ quintet8 ]; *base32_stream_index += 1; } else if( padding_character != 0 ) { base32_stream[ *base32_stream_index ] = padding_character; *base32_stream_index += 1; } return( 1 ); } /* Copies a base32 quintuplet from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_from_byte_stream( uint64_t *base32_quintuplet, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t *padding_size, libcerror_error_t **error ) { static char *function = "libuna_base32_quintuplet_copy_from_byte_stream"; if( base32_quintuplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 quintuplet.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } /* Determine the value of 5 bytes (40 bits) */ *base32_quintuplet = (uint64_t) byte_stream[ *byte_stream_index ] << 32; *byte_stream_index += 1; *padding_size = 6; if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ] << 24; *byte_stream_index += 1; *padding_size -= 2; } if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ] << 16; *byte_stream_index += 1; *padding_size -= 1; } if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ] << 8; *byte_stream_index += 1; *padding_size -= 2; } if( *byte_stream_index < byte_stream_size ) { *base32_quintuplet |= (uint64_t) byte_stream[ *byte_stream_index ]; *byte_stream_index += 1; *padding_size -= 1; } return( 1 ); } /* Copies a base32 quintuplet to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_to_byte_stream( uint64_t base32_quintuplet, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t padding_size, libcerror_error_t **error ) { static char *function = "libuna_base32_quintuplet_copy_to_byte_stream"; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } if( padding_size > 6 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 32 ) & 0xff ); *byte_stream_index += 1; if( padding_size <= 4 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 24 ) & 0xff ); *byte_stream_index += 1; } if( padding_size <= 3 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 16 ) & 0xff ); *byte_stream_index += 1; } if( padding_size <= 2 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base32_quintuplet >> 8 ) & 0xff ); *byte_stream_index += 1; } if( padding_size == 0 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( base32_quintuplet & 0xff ); *byte_stream_index += 1; } return( 1 ); } /* Determines the size of a byte stream from a base32 stream * * LIBUNA_BASE32_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base32_stream_size_to_byte_stream( const uint8_t *base32_stream, size_t base32_stream_size, size_t *byte_stream_size, uint32_t base32_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_size_to_byte_stream"; size_t base32_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( ( base32_stream_size == 0 ) || ( base32_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid base32 stream size value out of bounds.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base32_stream_index = base32_stream_size - 1; whitespace_size = 0; while( base32_stream_index > 0 ) { if( ( base32_stream[ base32_stream_index ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\r' ) ) { whitespace_size++; } else if( ( base32_stream[ base32_stream_index ] == (uint8_t) ' ' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\t' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) != 0 ) { whitespace_size++; } else { break; } } else { break; } base32_stream_index--; } base32_stream_size -= whitespace_size; if( base32_stream[ base32_stream_size - 1 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 2 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 3 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 4 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 5 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 6 ] == (uint8_t) '=' ) { padding_size += 1; } if( base32_stream[ base32_stream_size - 7 ] == (uint8_t) '=' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid number of padding bytes.", function ); return( -1 ); } base32_stream_index = 0; whitespace_size = 0; while( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\r' ) ) { base32_stream_index++; whitespace_size++; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } whitespace_size++; } else if( ( base32_stream[ base32_stream_index ] == (uint8_t) ' ' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\t' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { whitespace_size++; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { switch( base32_variant & 0x000f0000UL ) { case LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL: /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'A' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'I' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'J' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'R' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'S' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'Z' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) '2' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) '7' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } break; case LIBUNA_BASE32_VARIANT_ALPHABET_HEX: if( ( base32_stream[ base32_stream_index ] >= (uint8_t) '0' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) '9' ) ) { number_of_characters++; } /* A-V is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-V */ else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'A' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'I' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'J' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'R' ) ) { number_of_characters++; } else if( ( base32_stream[ base32_stream_index ] >= (uint8_t) 'S' ) && ( base32_stream[ base32_stream_index ] <= (uint8_t) 'V' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } break; default: strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base32 stream at index: %d.", function, base32_stream_index ); return( -1 ); } base32_stream_index++; } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } base32_stream_size -= whitespace_size; /* Make sure the byte stream is able to hold * at least 5 bytes for each 8 base32 characters */ *byte_stream_size = base32_stream_size / 8; if( ( base32_stream_size % 8 ) != 0 ) { *byte_stream_size += 1; } *byte_stream_size *= 5; if( padding_size == 1 ) { base32_stream_size -= 1; } else if( padding_size == 3 ) { base32_stream_size -= 2; } else if( padding_size == 4 ) { base32_stream_size -= 3; } else if( padding_size == 6 ) { base32_stream_size -= 4; } return( 1 ); } /* Copies a byte stream from a base32 stream * * LIBUNA_BASE32_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base32_stream_copy_to_byte_stream( const uint8_t *base32_stream, size_t base32_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_copy_to_byte_stream"; size_t base32_stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; uint64_t base32_quintuplet = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } while( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( base32_stream_index < base32_stream_size ) { if( ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\n' ) || ( base32_stream[ base32_stream_index + 1 ] == (uint8_t) '\r' ) ) { base32_stream_index++; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; base32_stream_index++; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base32_stream[ base32_stream_index ] == (uint8_t) ' ' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\t' ) || ( base32_stream[ base32_stream_index ] == (uint8_t) '\v' ) ) { if( ( flags & LIBUNA_BASE32_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } base32_stream_index++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base32 stream at index: %d.", function, base32_stream_index ); return( -1 ); } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { if( padding_size > 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base32 quintet.", function ); return( -1 ); } /* Convert the base32 stream into a base32 quintuplet */ if( libuna_base32_quintuplet_copy_from_base32_stream( &base32_quintuplet, base32_stream, base32_stream_size, &base32_stream_index, &padding_size, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet from base32 stream.", function ); return( -1 ); } /* Convert the base32 quintuplet into a byte stream */ if( libuna_base32_quintuplet_copy_to_byte_stream( base32_quintuplet, byte_stream, byte_stream_size, &byte_stream_index, padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet to byte stream.", function ); return( -1 ); } number_of_characters += 8 - padding_size; } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a base32 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base32_stream_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_size_from_byte_stream"; size_t whitespace_size = 0; uint8_t character_limit = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream size.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } /* Make sure the base32 stream is able to hold * at least 8 base32 characters for each 5 bytes */ *base32_stream_size = byte_stream_size / 5; if( ( byte_stream_size % 5 ) != 0 ) { *base32_stream_size += 1; } *base32_stream_size *= 8; if( character_limit != 0 ) { whitespace_size = *base32_stream_size / character_limit; if( ( *base32_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } *base32_stream_size += whitespace_size; } return( 1 ); } /* Copies a base32 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_stream_copy_from_byte_stream( uint8_t *base32_stream, size_t base32_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_copy_from_byte_stream"; size_t base32_stream_index = 0; if( libuna_base32_stream_with_index_copy_from_byte_stream( base32_stream, base32_stream_size, &base32_stream_index, byte_stream, byte_stream_size, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base32 stream from byte stream.", function ); return( -1 ); } return( 1 ); } /* Copies a base32 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base32_stream_with_index_copy_from_byte_stream( uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, libcerror_error_t **error ) { static char *function = "libuna_base32_stream_with_index_copy_from_byte_stream"; size_t calculated_base32_stream_size = 0; size_t stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint64_t base32_quintuplet = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; if( base32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream.", function ); return( -1 ); } if( base32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base32 stream size value exceeds maximum.", function ); return( -1 ); } if( base32_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base32 stream index.", function ); return( -1 ); } if( *base32_stream_index >= base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream string too small.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base32_variant & 0x000000ffUL ) { case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base32 variant.", function ); return( -1 ); } stream_index = *base32_stream_index; /* Make sure the base32 stream is able to hold * at least 8 base32 characters for each 5 bytes */ calculated_base32_stream_size = byte_stream_size / 5; if( ( byte_stream_size % 5 ) != 0 ) { calculated_base32_stream_size += 1; } calculated_base32_stream_size *= 8; if( character_limit != 0 ) { whitespace_size = calculated_base32_stream_size / character_limit; if( ( calculated_base32_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } calculated_base32_stream_size += whitespace_size; } if( base32_stream_size < calculated_base32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base32 stream is too small.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream into a base32 quintuplet */ if( libuna_base32_quintuplet_copy_from_byte_stream( &base32_quintuplet, byte_stream, byte_stream_size, &byte_stream_index, &padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet from byte stream.", function ); return( -1 ); } /* Convert the base32 quintuplet into a base32 stream */ if( libuna_base32_quintuplet_copy_to_base32_stream( base32_quintuplet, base32_stream, base32_stream_size, &stream_index, padding_size, base32_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base32 quintuplet to base32 stream.", function ); return( -1 ); } if( character_limit != 0 ) { number_of_characters += 8; if( number_of_characters >= (size_t) character_limit ) { base32_stream[ stream_index++ ] = (uint8_t) '\n'; number_of_characters = 0; } } } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base32_stream[ stream_index++ ] = (uint8_t) '\n'; } } *base32_stream_index = stream_index; return( 1 ); } libpff-20120802/libuna/libuna_codepage_windows_950.h0000644000175000017500000000361612005152764017040 00000000000000/* * Windows 950 codepage (Traditional Chinese) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_950_H ) #define _LIBUNA_CODEPAGE_WINDOWS_950_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_950_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_950_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_950_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_error.h0000644000175000017500000000324712005152764014253 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_ERROR_H ) #define _LIBUNA_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBUNA ) #include #endif #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBUNA ) LIBUNA_EXTERN \ void libuna_error_free( libuna_error_t **error ); LIBUNA_EXTERN \ int libuna_error_fprint( libuna_error_t *error, FILE *stream ); LIBUNA_EXTERN \ int libuna_error_sprint( libuna_error_t *error, char *string, size_t size ); LIBUNA_EXTERN \ int libuna_error_backtrace_fprint( libuna_error_t *error, FILE *stream ); LIBUNA_EXTERN \ int libuna_error_backtrace_sprint( libuna_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_932.h0000644000175000017500000000361512005152764017037 00000000000000/* * Windows 932 codepage (Japanese Shift-JIS) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_932_H ) #define _LIBUNA_CODEPAGE_WINDOWS_932_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_932_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_932_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_932_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf8_stream.c0000644000175000017500000003724012005152764015356 00000000000000/* * UTF-8 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_definitions.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf8_stream.h" /* Copies an UTF-8 stream byte order mark (BOM) * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_utf8_stream_copy_byte_order_mark( uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf8_stream_index, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_byte_order_mark"; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream index.", function ); return( -1 ); } if( ( *utf8_stream_index + 2 ) >= utf8_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 stream too small.", function ); return( -1 ); } utf8_stream[ *utf8_stream_index ] = 0xef; utf8_stream[ *utf8_stream_index + 1 ] = 0xbb; utf8_stream[ *utf8_stream_index + 2 ] = 0xbf; *utf8_stream_index += 3; return( 1 ); } /* Determines the size of an UTF-8 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_size_from_utf8"; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream size.", function ); return( -1 ); } /* Add the byte order mark * Assumes the UTF-8 string is santized */ *utf8_stream_size = 3 + utf8_string_size; return( 1 ); } /* Copies an UTF-8 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_copy_from_utf8( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_from_utf8"; size_t utf8_stream_index = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 stream is too small.", function ); return( -1 ); } if( libuna_utf8_stream_copy_byte_order_mark( utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-8 byte order mark.", function ); return( -1 ); } /* Assumes the UTF-8 string is santized */ if( memory_copy( &utf8_stream[ utf8_stream_index ], utf8_string, utf8_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: unable to copy UTF-8 string to stream.", function ); return( -1 ); } return( 1 ); } /* Determines the size of an UTF-8 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf8_stream_size = 3; while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_copy_from_utf16( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_from_utf16"; size_t utf16_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf8_stream_copy_byte_order_mark( utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-8 byte order mark.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 stream bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-8 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf8_stream_size = 3; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-8 character bytes are required */ if( libuna_unicode_character_size_to_utf8( unicode_character, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-8.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-8 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf8_stream_copy_from_utf32( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf8_stream_copy_from_utf32"; size_t utf32_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf8_stream_copy_byte_order_mark( utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-8 byte order mark.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-8 character bytes */ if( libuna_unicode_character_copy_to_utf8( unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-8 stream.", function ); return( -1 ); } } return( 1 ); } libpff-20120802/libuna/libuna_codepage_koi8_r.h0000644000175000017500000000243212005152764016137 00000000000000/* * KOI8-R codepage (Russian Cyrillic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_KOI8_R_H ) #define _LIBUNA_CODEPAGE_KOI8_R_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_koi8_r_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x0410[ 64 ]; extern const uint8_t libuna_codepage_koi8_r_unicode_to_byte_stream_base_0x2550[ 32 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_base16_stream.c0000644000175000017500000012370012005152764015546 00000000000000/* * Base16 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_base16_stream.h" #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Determines the size of a byte stream from a base16 stream * * LIBUNA_BASE16_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base16_stream_size_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, size_t *byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_size_to_byte_stream"; size_t base16_character_size = 0; size_t base16_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base16_character1 = 0; uint32_t base16_character2 = 0; uint8_t character_case = 0; uint8_t character_limit = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } if( ( base16_stream_size == 0 ) || ( base16_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid base16 stream size value out of bounds.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: character_case = LIBUNA_CASE_LOWER; break; case LIBUNA_BASE16_VARIANT_CASE_MIXED: character_case = LIBUNA_CASE_MIXED; break; case LIBUNA_BASE16_VARIANT_CASE_UPPER: character_case = LIBUNA_CASE_UPPER; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base16_stream_index = base16_stream_size - base16_character_size; whitespace_size = 0; while( base16_stream_index > base16_character_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } base16_stream_index -= base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { whitespace_size += base16_character_size; } else if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { whitespace_size += base16_character_size; } else { break; } } base16_stream_size -= whitespace_size; if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } base16_stream_index = 0; whitespace_size = 0; while( base16_stream_index < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } base16_stream_index += base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base16_stream_index + base16_character_size ) < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character2 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; } if( ( base16_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } if( ( base16_character2 == (uint32_t) '\n' ) || ( base16_character2 == (uint32_t) '\r' ) ) { base16_stream_index += base16_character_size; whitespace_size += base16_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } whitespace_size += base16_character_size; } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { whitespace_size += base16_character_size; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { if( ( base16_character1 >= (uint32_t) 'A' ) && ( base16_character1 <= (uint32_t) 'F' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_UPPER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } number_of_characters++; } else if( ( base16_character1 >= (uint32_t) 'a' ) && ( base16_character1 <= (uint32_t) 'f' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_LOWER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } number_of_characters++; } else if( ( base16_character1 >= (uint32_t) '0' ) && ( base16_character1 <= (uint32_t) '9' ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base16 stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } base16_stream_size -= whitespace_size; /* Make sure the byte stream is able to hold * at least 1 byte for each 2 base16 characters */ base16_character_size *= 2; if( ( base16_stream_size % base16_character_size ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid base16 stream size.", function ); return( -1 ); } base16_stream_size /= base16_character_size; *byte_stream_size = base16_stream_size; return( 1 ); } /* Copies a byte stream from a base16 stream * * LIBUNA_BASE16_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base16_stream_copy_to_byte_stream( const uint8_t *base16_stream, size_t base16_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_copy_to_byte_stream"; size_t base16_character_size = 0; size_t base16_stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base16_character1 = 0; uint32_t base16_character2 = 0; uint8_t byte_value = 0; uint8_t character_case = 0; uint8_t character_limit = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } if( base16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base16 stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: character_case = LIBUNA_CASE_LOWER; break; case LIBUNA_BASE16_VARIANT_CASE_MIXED: character_case = LIBUNA_CASE_MIXED; break; case LIBUNA_BASE16_VARIANT_CASE_UPPER: character_case = LIBUNA_CASE_UPPER; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } base16_stream_index = base16_stream_size - base16_character_size; whitespace_size = 0; while( base16_stream_index > base16_character_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } base16_stream_index -= base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { whitespace_size += base16_character_size; } else if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { whitespace_size += base16_character_size; } else { break; } } base16_stream_size -= whitespace_size; if( base16_stream_size < base16_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base16 stream value too small.", function ); return( -1 ); } base16_stream_index = 0; whitespace_size = 0; while( base16_stream_index < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", base16_stream_index, function ); return( -1 ); } base16_stream_index += base16_character_size; if( ( base16_character1 == (uint32_t) '\n' ) || ( base16_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base16_stream_index + base16_character_size ) < base16_stream_size ) { switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character2 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character2 ); break; } if( ( base16_character2 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", function, base16_stream_index ); return( -1 ); } if( ( base16_character2 == (uint32_t) '\n' ) || ( base16_character2 == (uint32_t) '\r' ) ) { base16_stream_index += base16_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base16_character1 == (uint32_t) ' ' ) || ( base16_character1 == (uint32_t) '\t' ) || ( base16_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE16_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base16 stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { byte_value = 0; if( ( base16_character1 >= (uint32_t) 'A' ) && ( base16_character1 <= (uint32_t) 'F' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_UPPER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value = (uint8_t) ( base16_character1 - (uint32_t) 'A' + 10 ); } else if( ( base16_character1 >= (uint32_t) 'a' ) && ( base16_character1 <= (uint32_t) 'f' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_LOWER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value = (uint8_t) ( base16_character1 - (uint32_t) 'a' + 10 ); } else if( ( base16_character1 >= (uint32_t) '0' ) && ( base16_character1 <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( base16_character1 - (uint32_t) '0' ); } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } byte_value <<= 4; switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character1 = base16_stream[ base16_stream_index ]; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base16_stream[ base16_stream_index ] ), base16_character1 ); break; } if( ( base16_character1 & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character at index: %" PRIzd ".", base16_stream_index, function ); return( -1 ); } base16_stream_index += base16_character_size; if( ( base16_character1 >= (uint32_t) 'A' ) && ( base16_character1 <= (uint32_t) 'F' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_UPPER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value |= (uint8_t) ( base16_character1 - (uint32_t) 'A' + 10 ); } else if( ( base16_character1 >= (uint32_t) 'a' ) && ( base16_character1 <= (uint32_t) 'f' ) ) { if( ( character_case != LIBUNA_CASE_MIXED ) && ( character_case != LIBUNA_CASE_LOWER ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } byte_value |= (uint8_t) ( base16_character1 - (uint32_t) 'a' + 10 ); } else if( ( base16_character1 >= (uint32_t) '0' ) && ( base16_character1 <= (uint32_t) '9' ) ) { byte_value |= (uint8_t) ( base16_character1 - (uint32_t) '0' ); } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base16 character stream at index: %" PRIzd ".", function, base16_stream_index - base16_character_size ); return( -1 ); } if( byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } byte_stream[ byte_stream_index++ ] = byte_value; number_of_characters += 2; } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a base16 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base16_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base16_stream_size, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_size_from_byte_stream"; size_t base16_character_size = 0; size_t whitespace_size = 0; uint8_t character_limit = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( base16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream size.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } /* The base16 stream contains 2 characters for every byte */ *base16_stream_size = byte_stream_size * 2; if( character_limit != 0 ) { whitespace_size = *base16_stream_size / character_limit; if( ( *base16_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } *base16_stream_size += whitespace_size; } *base16_stream_size *= base16_character_size; return( 1 ); } /* Copies a base16 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base16_stream_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_copy_from_byte_stream"; size_t base16_stream_index = 0; if( libuna_base16_stream_with_index_copy_from_byte_stream( base16_stream, base16_stream_size, &base16_stream_index, byte_stream, byte_stream_size, base16_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base16 stream from byte stream.", function ); return( -1 ); } return( 1 ); } /* Copies a base16 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base16_stream_with_index_copy_from_byte_stream( uint8_t *base16_stream, size_t base16_stream_size, size_t *base16_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base16_variant, libcerror_error_t **error ) { static char *function = "libuna_base16_stream_with_index_copy_from_byte_stream"; size_t calculated_base16_stream_size = 0; size_t base16_character_size = 0; size_t stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t a_character_value = 0; uint32_t base16_character = 0; uint8_t character_limit = 0; if( base16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream.", function ); return( -1 ); } if( base16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base16 stream size value exceeds maximum.", function ); return( -1 ); } if( base16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base16 stream index.", function ); return( -1 ); } if( *base16_stream_index >= base16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base16 stream string too small.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base16_variant & 0x000000ffUL ) { case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0x000f0000UL ) { case LIBUNA_BASE16_VARIANT_CASE_LOWER: a_character_value = (uint32_t) 'a' - 10; break; case LIBUNA_BASE16_VARIANT_CASE_MIXED: case LIBUNA_BASE16_VARIANT_CASE_UPPER: a_character_value = (uint32_t) 'A' - 10; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_character_size = 1; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base16_character_size = 2; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base16_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base16 variant.", function ); return( -1 ); } stream_index = *base16_stream_index; /* Make sure the base16 stream is able to hold * at least 2 bytes for each byte */ calculated_base16_stream_size = byte_stream_size * 2; if( character_limit != 0 ) { whitespace_size = calculated_base16_stream_size / character_limit; if( ( calculated_base16_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } calculated_base16_stream_size += whitespace_size; } calculated_base16_stream_size *= base16_character_size; if( base16_stream_size < calculated_base16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base16 stream is too small.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { base16_character = byte_stream[ byte_stream_index ] >> 4; if( base16_character <= 9 ) { base16_character += (uint32_t) '0'; } else { base16_character += a_character_value; } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; base16_character = byte_stream[ byte_stream_index ] & 0x0f; if( base16_character <= 9 ) { base16_character += (uint32_t) '0'; } else { base16_character += a_character_value; } switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; if( character_limit != 0 ) { number_of_characters += 2; if( number_of_characters >= (size_t) character_limit ) { base16_character = (uint32_t) '\n'; switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; number_of_characters = 0; } } byte_stream_index++; } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base16_character = (uint32_t) '\n'; switch( base16_variant & 0xf0000000UL ) { case LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM: base16_stream[ stream_index ] = (uint8_t) base16_character; break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base16_stream[ stream_index ] ), base16_character ); break; case LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base16_stream[ stream_index ] ), base16_character ); break; } stream_index += base16_character_size; } } *base16_stream_index = stream_index; return( 1 ); } libpff-20120802/libuna/libuna_codepage_windows_1250.h0000644000175000017500000000312212005152764017102 00000000000000/* * Windows 1250 codepage (Central European) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1250_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1250_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ 128 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ 72 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ 8 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ 24 ]; extern const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ 16 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_16.h0000644000175000017500000000307412005152764016544 00000000000000/* * ISO 8859-16 codepage (Latin 10) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_16_H ) #define _LIBUNA_CODEPAGE_ISO_8859_16_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ 8 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf16_stream.h0000644000175000017500000000604612005152764015442 00000000000000/* * UTF-16 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF16_STREAM_H ) #define _LIBUNA_UTF16_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_utf16_stream_copy_byte_order_mark( uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf16_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_stream_copy_from_utf8( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_stream_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf16_stream */ LIBUNA_EXTERN \ int libuna_utf16_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_stream_copy_from_utf16( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_stream_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf16_stream */ LIBUNA_EXTERN \ int libuna_utf16_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_stream_copy_from_utf32( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_stream_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf16_stream */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_10.h0000644000175000017500000000245612005152764016541 00000000000000/* * ISO 8859-10 codepage (Nordic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_10_H ) #define _LIBUNA_CODEPAGE_ISO_8859_10_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ 144 ]; extern const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ 16 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_932.c0000644000175000017500000105727612005152764017047 00000000000000/* * Windows 932 codepage (Japanese Shift-JIS) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_932.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" /* Extended ASCII to Unicode character lookup table for Windows 932 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ 109 ] = { 0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b, 0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e, 0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd, 0x3005, 0x3006, 0x3007, 0x30fc, 0x2015, 0x2010, 0xff0f, 0xff3c, 0xff5e, 0x2225, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c, 0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b, 0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e, 0x300f, 0x3010, 0x3011, 0xff0b, 0xff0d, 0x00b1, 0x00d7, 0xfffd, 0x00f7, 0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e, 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5, 0xff04, 0xffe0, 0xffe1, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20, 0x00a7, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6, 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b, 0x3012, 0x2192, 0x2190, 0x2191, 0x2193, 0x3013 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81b8[ 8 ] = { 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ 7 ] = { 0x2227, 0x2228, 0xffe2, 0x21d2, 0x21d4, 0x2200, 0x2203 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81da[ 15 ] = { 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261, 0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x2235, 0x222b, 0x222c }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ 8 ] = { 0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021, 0x00b6 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8440[ 33 ] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ 15 ] = { 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0451, 0x0436, 0x0437, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ 32 ] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2518, 0x2514, 0x251c, 0x252c, 0x2524, 0x2534, 0x253c, 0x2501, 0x2503, 0x250f, 0x2513, 0x251b, 0x2517, 0x2523, 0x2533, 0x252b, 0x253b, 0x254b, 0x2520, 0x252f, 0x2528, 0x2537, 0x253f, 0x251d, 0x2530, 0x2525, 0x2538, 0x2542 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ 23 ] = { 0x3349, 0x3314, 0x3322, 0x334d, 0x3318, 0x3327, 0x3303, 0x3336, 0x3351, 0x3357, 0x330d, 0x3326, 0x3323, 0x332b, 0x334a, 0x333b, 0x339c, 0x339d, 0x339e, 0x338e, 0x338f, 0x33c4, 0x33a1 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ 29 ] = { 0x301d, 0x301f, 0x2116, 0x33cd, 0x2121, 0x32a4, 0x32a5, 0x32a6, 0x32a7, 0x32a8, 0x3231, 0x3232, 0x3239, 0x337e, 0x337d, 0x337c, 0x2252, 0x2261, 0x222b, 0x222e, 0x2211, 0x221a, 0x22a5, 0x2220, 0x221f, 0x22bf, 0x2235, 0x2229, 0x222a }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ 94 ] = { 0x4e9c, 0x5516, 0x5a03, 0x963f, 0x54c0, 0x611b, 0x6328, 0x59f6, 0x9022, 0x8475, 0x831c, 0x7a50, 0x60aa, 0x63e1, 0x6e25, 0x65ed, 0x8466, 0x82a6, 0x9bf5, 0x6893, 0x5727, 0x65a1, 0x6271, 0x5b9b, 0x59d0, 0x867b, 0x98f4, 0x7d62, 0x7dbe, 0x9b8e, 0x6216, 0x7c9f, 0x88b7, 0x5b89, 0x5eb5, 0x6309, 0x6697, 0x6848, 0x95c7, 0x978d, 0x674f, 0x4ee5, 0x4f0a, 0x4f4d, 0x4f9d, 0x5049, 0x56f2, 0x5937, 0x59d4, 0x5a01, 0x5c09, 0x60df, 0x610f, 0x6170, 0x6613, 0x6905, 0x70ba, 0x754f, 0x7570, 0x79fb, 0x7dad, 0x7def, 0x80c3, 0x840e, 0x8863, 0x8b02, 0x9055, 0x907a, 0x533b, 0x4e95, 0x4ea5, 0x57df, 0x80b2, 0x90c1, 0x78ef, 0x4e00, 0x58f1, 0x6ea2, 0x9038, 0x7a32, 0x8328, 0x828b, 0x9c2f, 0x5141, 0x5370, 0x54bd, 0x54e1, 0x56e0, 0x59fb, 0x5f15, 0x98f2, 0x6deb, 0x80e4, 0x852d }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ 189 ] = { 0x9662, 0x9670, 0x96a0, 0x97fb, 0x540b, 0x53f3, 0x5b87, 0x70cf, 0x7fbd, 0x8fc2, 0x96e8, 0x536f, 0x9d5c, 0x7aba, 0x4e11, 0x7893, 0x81fc, 0x6e26, 0x5618, 0x5504, 0x6b1d, 0x851a, 0x9c3b, 0x59e5, 0x53a9, 0x6d66, 0x74dc, 0x958f, 0x5642, 0x4e91, 0x904b, 0x96f2, 0x834f, 0x990c, 0x53e1, 0x55b6, 0x5b30, 0x5f71, 0x6620, 0x66f3, 0x6804, 0x6c38, 0x6cf3, 0x6d29, 0x745b, 0x76c8, 0x7a4e, 0x9834, 0x82f1, 0x885b, 0x8a60, 0x92ed, 0x6db2, 0x75ab, 0x76ca, 0x99c5, 0x60a6, 0x8b01, 0x8d8a, 0x95b2, 0x698e, 0x53ad, 0x5186, 0xfffd, 0x5712, 0x5830, 0x5944, 0x5bb4, 0x5ef6, 0x6028, 0x63a9, 0x63f4, 0x6cbf, 0x6f14, 0x708e, 0x7114, 0x7159, 0x71d5, 0x733f, 0x7e01, 0x8276, 0x82d1, 0x8597, 0x9060, 0x925b, 0x9d1b, 0x5869, 0x65bc, 0x6c5a, 0x7525, 0x51f9, 0x592e, 0x5965, 0x5f80, 0x5fdc, 0x62bc, 0x65fa, 0x6a2a, 0x6b27, 0x6bb4, 0x738b, 0x7fc1, 0x8956, 0x9d2c, 0x9d0e, 0x9ec4, 0x5ca1, 0x6c96, 0x837b, 0x5104, 0x5c4b, 0x61b6, 0x81c6, 0x6876, 0x7261, 0x4e59, 0x4ffa, 0x5378, 0x6069, 0x6e29, 0x7a4f, 0x97f3, 0x4e0b, 0x5316, 0x4eee, 0x4f55, 0x4f3d, 0x4fa1, 0x4f73, 0x52a0, 0x53ef, 0x5609, 0x590f, 0x5ac1, 0x5bb6, 0x5be1, 0x79d1, 0x6687, 0x679c, 0x67b6, 0x6b4c, 0x6cb3, 0x706b, 0x73c2, 0x798d, 0x79be, 0x7a3c, 0x7b87, 0x82b1, 0x82db, 0x8304, 0x8377, 0x83ef, 0x83d3, 0x8766, 0x8ab2, 0x5629, 0x8ca8, 0x8fe6, 0x904e, 0x971e, 0x868a, 0x4fc4, 0x5ce8, 0x6211, 0x7259, 0x753b, 0x81e5, 0x82bd, 0x86fe, 0x8cc0, 0x96c5, 0x9913, 0x99d5, 0x4ecb, 0x4f1a, 0x89e3, 0x56de, 0x584a, 0x58ca, 0x5efb, 0x5feb, 0x602a, 0x6094, 0x6062, 0x61d0, 0x6212, 0x62d0, 0x6539 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ 189 ] = { 0x9b41, 0x6666, 0x68b0, 0x6d77, 0x7070, 0x754c, 0x7686, 0x7d75, 0x82a5, 0x87f9, 0x958b, 0x968e, 0x8c9d, 0x51f1, 0x52be, 0x5916, 0x54b3, 0x5bb3, 0x5d16, 0x6168, 0x6982, 0x6daf, 0x788d, 0x84cb, 0x8857, 0x8a72, 0x93a7, 0x9ab8, 0x6d6c, 0x99a8, 0x86d9, 0x57a3, 0x67ff, 0x86ce, 0x920e, 0x5283, 0x5687, 0x5404, 0x5ed3, 0x62e1, 0x64b9, 0x683c, 0x6838, 0x6bbb, 0x7372, 0x78ba, 0x7a6b, 0x899a, 0x89d2, 0x8d6b, 0x8f03, 0x90ed, 0x95a3, 0x9694, 0x9769, 0x5b66, 0x5cb3, 0x697d, 0x984d, 0x984e, 0x639b, 0x7b20, 0x6a2b, 0xfffd, 0x6a7f, 0x68b6, 0x9c0d, 0x6f5f, 0x5272, 0x559d, 0x6070, 0x62ec, 0x6d3b, 0x6e07, 0x6ed1, 0x845b, 0x8910, 0x8f44, 0x4e14, 0x9c39, 0x53f6, 0x691b, 0x6a3a, 0x9784, 0x682a, 0x515c, 0x7ac3, 0x84b2, 0x91dc, 0x938c, 0x565b, 0x9d28, 0x6822, 0x8305, 0x8431, 0x7ca5, 0x5208, 0x82c5, 0x74e6, 0x4e7e, 0x4f83, 0x51a0, 0x5bd2, 0x520a, 0x52d8, 0x52e7, 0x5dfb, 0x559a, 0x582a, 0x59e6, 0x5b8c, 0x5b98, 0x5bdb, 0x5e72, 0x5e79, 0x60a3, 0x611f, 0x6163, 0x61be, 0x63db, 0x6562, 0x67d1, 0x6853, 0x68fa, 0x6b3e, 0x6b53, 0x6c57, 0x6f22, 0x6f97, 0x6f45, 0x74b0, 0x7518, 0x76e3, 0x770b, 0x7aff, 0x7ba1, 0x7c21, 0x7de9, 0x7f36, 0x7ff0, 0x809d, 0x8266, 0x839e, 0x89b3, 0x8acc, 0x8cab, 0x9084, 0x9451, 0x9593, 0x9591, 0x95a2, 0x9665, 0x97d3, 0x9928, 0x8218, 0x4e38, 0x542b, 0x5cb8, 0x5dcc, 0x73a9, 0x764c, 0x773c, 0x5ca9, 0x7feb, 0x8d0b, 0x96c1, 0x9811, 0x9854, 0x9858, 0x4f01, 0x4f0e, 0x5371, 0x559c, 0x5668, 0x57fa, 0x5947, 0x5b09, 0x5bc4, 0x5c90, 0x5e0c, 0x5e7e, 0x5fcc, 0x63ee, 0x673a, 0x65d7, 0x65e2, 0x671f, 0x68cb, 0x68c4 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ 189 ] = { 0x6a5f, 0x5e30, 0x6bc5, 0x6c17, 0x6c7d, 0x757f, 0x7948, 0x5b63, 0x7a00, 0x7d00, 0x5fbd, 0x898f, 0x8a18, 0x8cb4, 0x8d77, 0x8ecc, 0x8f1d, 0x98e2, 0x9a0e, 0x9b3c, 0x4e80, 0x507d, 0x5100, 0x5993, 0x5b9c, 0x622f, 0x6280, 0x64ec, 0x6b3a, 0x72a0, 0x7591, 0x7947, 0x7fa9, 0x87fb, 0x8abc, 0x8b70, 0x63ac, 0x83ca, 0x97a0, 0x5409, 0x5403, 0x55ab, 0x6854, 0x6a58, 0x8a70, 0x7827, 0x6775, 0x9ecd, 0x5374, 0x5ba2, 0x811a, 0x8650, 0x9006, 0x4e18, 0x4e45, 0x4ec7, 0x4f11, 0x53ca, 0x5438, 0x5bae, 0x5f13, 0x6025, 0x6551, 0xfffd, 0x673d, 0x6c42, 0x6c72, 0x6ce3, 0x7078, 0x7403, 0x7a76, 0x7aae, 0x7b08, 0x7d1a, 0x7cfe, 0x7d66, 0x65e7, 0x725b, 0x53bb, 0x5c45, 0x5de8, 0x62d2, 0x62e0, 0x6319, 0x6e20, 0x865a, 0x8a31, 0x8ddd, 0x92f8, 0x6f01, 0x79a6, 0x9b5a, 0x4ea8, 0x4eab, 0x4eac, 0x4f9b, 0x4fa0, 0x50d1, 0x5147, 0x7af6, 0x5171, 0x51f6, 0x5354, 0x5321, 0x537f, 0x53eb, 0x55ac, 0x5883, 0x5ce1, 0x5f37, 0x5f4a, 0x602f, 0x6050, 0x606d, 0x631f, 0x6559, 0x6a4b, 0x6cc1, 0x72c2, 0x72ed, 0x77ef, 0x80f8, 0x8105, 0x8208, 0x854e, 0x90f7, 0x93e1, 0x97ff, 0x9957, 0x9a5a, 0x4ef0, 0x51dd, 0x5c2d, 0x6681, 0x696d, 0x5c40, 0x66f2, 0x6975, 0x7389, 0x6850, 0x7c81, 0x50c5, 0x52e4, 0x5747, 0x5dfe, 0x9326, 0x65a4, 0x6b23, 0x6b3d, 0x7434, 0x7981, 0x79bd, 0x7b4b, 0x7dca, 0x82b9, 0x83cc, 0x887f, 0x895f, 0x8b39, 0x8fd1, 0x91d1, 0x541f, 0x9280, 0x4e5d, 0x5036, 0x53e5, 0x533a, 0x72d7, 0x7396, 0x77e9, 0x82e6, 0x8eaf, 0x99c6, 0x99c8, 0x99d2, 0x5177, 0x611a, 0x865e, 0x55b0, 0x7a7a, 0x5076, 0x5bd3, 0x9047, 0x9685, 0x4e32, 0x6adb, 0x91e7, 0x5c51, 0x5c48 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ 189 ] = { 0x6398, 0x7a9f, 0x6c93, 0x9774, 0x8f61, 0x7aaa, 0x718a, 0x9688, 0x7c82, 0x6817, 0x7e70, 0x6851, 0x936c, 0x52f2, 0x541b, 0x85ab, 0x8a13, 0x7fa4, 0x8ecd, 0x90e1, 0x5366, 0x8888, 0x7941, 0x4fc2, 0x50be, 0x5211, 0x5144, 0x5553, 0x572d, 0x73ea, 0x578b, 0x5951, 0x5f62, 0x5f84, 0x6075, 0x6176, 0x6167, 0x61a9, 0x63b2, 0x643a, 0x656c, 0x666f, 0x6842, 0x6e13, 0x7566, 0x7a3d, 0x7cfb, 0x7d4c, 0x7d99, 0x7e4b, 0x7f6b, 0x830e, 0x834a, 0x86cd, 0x8a08, 0x8a63, 0x8b66, 0x8efd, 0x981a, 0x9d8f, 0x82b8, 0x8fce, 0x9be8, 0xfffd, 0x5287, 0x621f, 0x6483, 0x6fc0, 0x9699, 0x6841, 0x5091, 0x6b20, 0x6c7a, 0x6f54, 0x7a74, 0x7d50, 0x8840, 0x8a23, 0x6708, 0x4ef6, 0x5039, 0x5026, 0x5065, 0x517c, 0x5238, 0x5263, 0x55a7, 0x570f, 0x5805, 0x5acc, 0x5efa, 0x61b2, 0x61f8, 0x62f3, 0x6372, 0x691c, 0x6a29, 0x727d, 0x72ac, 0x732e, 0x7814, 0x786f, 0x7d79, 0x770c, 0x80a9, 0x898b, 0x8b19, 0x8ce2, 0x8ed2, 0x9063, 0x9375, 0x967a, 0x9855, 0x9a13, 0x9e78, 0x5143, 0x539f, 0x53b3, 0x5e7b, 0x5f26, 0x6e1b, 0x6e90, 0x7384, 0x73fe, 0x7d43, 0x8237, 0x8a00, 0x8afa, 0x9650, 0x4e4e, 0x500b, 0x53e4, 0x547c, 0x56fa, 0x59d1, 0x5b64, 0x5df1, 0x5eab, 0x5f27, 0x6238, 0x6545, 0x67af, 0x6e56, 0x72d0, 0x7cca, 0x88b4, 0x80a1, 0x80e1, 0x83f0, 0x864e, 0x8a87, 0x8de8, 0x9237, 0x96c7, 0x9867, 0x9f13, 0x4e94, 0x4e92, 0x4f0d, 0x5348, 0x5449, 0x543e, 0x5a2f, 0x5f8c, 0x5fa1, 0x609f, 0x68a7, 0x6a8e, 0x745a, 0x7881, 0x8a9e, 0x8aa4, 0x8b77, 0x9190, 0x4e5e, 0x9bc9, 0x4ea4, 0x4f7c, 0x4faf, 0x5019, 0x5016, 0x5149, 0x516c, 0x529f, 0x52b9, 0x52fe, 0x539a, 0x53e3, 0x5411 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ 189 ] = { 0x540e, 0x5589, 0x5751, 0x57a2, 0x597d, 0x5b54, 0x5b5d, 0x5b8f, 0x5de5, 0x5de7, 0x5df7, 0x5e78, 0x5e83, 0x5e9a, 0x5eb7, 0x5f18, 0x6052, 0x614c, 0x6297, 0x62d8, 0x63a7, 0x653b, 0x6602, 0x6643, 0x66f4, 0x676d, 0x6821, 0x6897, 0x69cb, 0x6c5f, 0x6d2a, 0x6d69, 0x6e2f, 0x6e9d, 0x7532, 0x7687, 0x786c, 0x7a3f, 0x7ce0, 0x7d05, 0x7d18, 0x7d5e, 0x7db1, 0x8015, 0x8003, 0x80af, 0x80b1, 0x8154, 0x818f, 0x822a, 0x8352, 0x884c, 0x8861, 0x8b1b, 0x8ca2, 0x8cfc, 0x90ca, 0x9175, 0x9271, 0x783f, 0x92fc, 0x95a4, 0x964d, 0xfffd, 0x9805, 0x9999, 0x9ad8, 0x9d3b, 0x525b, 0x52ab, 0x53f7, 0x5408, 0x58d5, 0x62f7, 0x6fe0, 0x8c6a, 0x8f5f, 0x9eb9, 0x514b, 0x523b, 0x544a, 0x56fd, 0x7a40, 0x9177, 0x9d60, 0x9ed2, 0x7344, 0x6f09, 0x8170, 0x7511, 0x5ffd, 0x60da, 0x9aa8, 0x72db, 0x8fbc, 0x6b64, 0x9803, 0x4eca, 0x56f0, 0x5764, 0x58be, 0x5a5a, 0x6068, 0x61c7, 0x660f, 0x6606, 0x6839, 0x68b1, 0x6df7, 0x75d5, 0x7d3a, 0x826e, 0x9b42, 0x4e9b, 0x4f50, 0x53c9, 0x5506, 0x5d6f, 0x5de6, 0x5dee, 0x67fb, 0x6c99, 0x7473, 0x7802, 0x8a50, 0x9396, 0x88df, 0x5750, 0x5ea7, 0x632b, 0x50b5, 0x50ac, 0x518d, 0x6700, 0x54c9, 0x585e, 0x59bb, 0x5bb0, 0x5f69, 0x624d, 0x63a1, 0x683d, 0x6b73, 0x6e08, 0x707d, 0x91c7, 0x7280, 0x7815, 0x7826, 0x796d, 0x658e, 0x7d30, 0x83dc, 0x88c1, 0x8f09, 0x969b, 0x5264, 0x5728, 0x6750, 0x7f6a, 0x8ca1, 0x51b4, 0x5742, 0x962a, 0x583a, 0x698a, 0x80b4, 0x54b2, 0x5d0e, 0x57fc, 0x7895, 0x9dfa, 0x4f5c, 0x524a, 0x548b, 0x643e, 0x6628, 0x6714, 0x67f5, 0x7a84, 0x7b56, 0x7d22, 0x932f, 0x685c, 0x9bad, 0x7b39, 0x5319, 0x518a, 0x5237 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ 189 ] = { 0x5bdf, 0x62f6, 0x64ae, 0x64e6, 0x672d, 0x6bba, 0x85a9, 0x96d1, 0x7690, 0x9bd6, 0x634c, 0x9306, 0x9bab, 0x76bf, 0x6652, 0x4e09, 0x5098, 0x53c2, 0x5c71, 0x60e8, 0x6492, 0x6563, 0x685f, 0x71e6, 0x73ca, 0x7523, 0x7b97, 0x7e82, 0x8695, 0x8b83, 0x8cdb, 0x9178, 0x9910, 0x65ac, 0x66ab, 0x6b8b, 0x4ed5, 0x4ed4, 0x4f3a, 0x4f7f, 0x523a, 0x53f8, 0x53f2, 0x55e3, 0x56db, 0x58eb, 0x59cb, 0x59c9, 0x59ff, 0x5b50, 0x5c4d, 0x5e02, 0x5e2b, 0x5fd7, 0x601d, 0x6307, 0x652f, 0x5b5c, 0x65af, 0x65bd, 0x65e8, 0x679d, 0x6b62, 0xfffd, 0x6b7b, 0x6c0f, 0x7345, 0x7949, 0x79c1, 0x7cf8, 0x7d19, 0x7d2b, 0x80a2, 0x8102, 0x81f3, 0x8996, 0x8a5e, 0x8a69, 0x8a66, 0x8a8c, 0x8aee, 0x8cc7, 0x8cdc, 0x96cc, 0x98fc, 0x6b6f, 0x4e8b, 0x4f3c, 0x4f8d, 0x5150, 0x5b57, 0x5bfa, 0x6148, 0x6301, 0x6642, 0x6b21, 0x6ecb, 0x6cbb, 0x723e, 0x74bd, 0x75d4, 0x78c1, 0x793a, 0x800c, 0x8033, 0x81ea, 0x8494, 0x8f9e, 0x6c50, 0x9e7f, 0x5f0f, 0x8b58, 0x9d2b, 0x7afa, 0x8ef8, 0x5b8d, 0x96eb, 0x4e03, 0x53f1, 0x57f7, 0x5931, 0x5ac9, 0x5ba4, 0x6089, 0x6e7f, 0x6f06, 0x75be, 0x8cea, 0x5b9f, 0x8500, 0x7be0, 0x5072, 0x67f4, 0x829d, 0x5c61, 0x854a, 0x7e1e, 0x820e, 0x5199, 0x5c04, 0x6368, 0x8d66, 0x659c, 0x716e, 0x793e, 0x7d17, 0x8005, 0x8b1d, 0x8eca, 0x906e, 0x86c7, 0x90aa, 0x501f, 0x52fa, 0x5c3a, 0x6753, 0x707c, 0x7235, 0x914c, 0x91c8, 0x932b, 0x82e5, 0x5bc2, 0x5f31, 0x60f9, 0x4e3b, 0x53d6, 0x5b88, 0x624b, 0x6731, 0x6b8a, 0x72e9, 0x73e0, 0x7a2e, 0x816b, 0x8da3, 0x9152, 0x9996, 0x5112, 0x53d7, 0x546a, 0x5bff, 0x6388, 0x6a39, 0x7dac, 0x9700, 0x56da, 0x53ce, 0x5468 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ 189 ] = { 0x5b97, 0x5c31, 0x5dde, 0x4fee, 0x6101, 0x62fe, 0x6d32, 0x79c0, 0x79cb, 0x7d42, 0x7e4d, 0x7fd2, 0x81ed, 0x821f, 0x8490, 0x8846, 0x8972, 0x8b90, 0x8e74, 0x8f2f, 0x9031, 0x914b, 0x916c, 0x96c6, 0x919c, 0x4ec0, 0x4f4f, 0x5145, 0x5341, 0x5f93, 0x620e, 0x67d4, 0x6c41, 0x6e0b, 0x7363, 0x7e26, 0x91cd, 0x9283, 0x53d4, 0x5919, 0x5bbf, 0x6dd1, 0x795d, 0x7e2e, 0x7c9b, 0x587e, 0x719f, 0x51fa, 0x8853, 0x8ff0, 0x4fca, 0x5cfb, 0x6625, 0x77ac, 0x7ae3, 0x821c, 0x99ff, 0x51c6, 0x5faa, 0x65ec, 0x696f, 0x6b89, 0x6df3, 0xfffd, 0x6e96, 0x6f64, 0x76fe, 0x7d14, 0x5de1, 0x9075, 0x9187, 0x9806, 0x51e6, 0x521d, 0x6240, 0x6691, 0x66d9, 0x6e1a, 0x5eb6, 0x7dd2, 0x7f72, 0x66f8, 0x85af, 0x85f7, 0x8af8, 0x52a9, 0x53d9, 0x5973, 0x5e8f, 0x5f90, 0x6055, 0x92e4, 0x9664, 0x50b7, 0x511f, 0x52dd, 0x5320, 0x5347, 0x53ec, 0x54e8, 0x5546, 0x5531, 0x5617, 0x5968, 0x59be, 0x5a3c, 0x5bb5, 0x5c06, 0x5c0f, 0x5c11, 0x5c1a, 0x5e84, 0x5e8a, 0x5ee0, 0x5f70, 0x627f, 0x6284, 0x62db, 0x638c, 0x6377, 0x6607, 0x660c, 0x662d, 0x6676, 0x677e, 0x68a2, 0x6a1f, 0x6a35, 0x6cbc, 0x6d88, 0x6e09, 0x6e58, 0x713c, 0x7126, 0x7167, 0x75c7, 0x7701, 0x785d, 0x7901, 0x7965, 0x79f0, 0x7ae0, 0x7b11, 0x7ca7, 0x7d39, 0x8096, 0x83d6, 0x848b, 0x8549, 0x885d, 0x88f3, 0x8a1f, 0x8a3c, 0x8a54, 0x8a73, 0x8c61, 0x8cde, 0x91a4, 0x9266, 0x937e, 0x9418, 0x969c, 0x9798, 0x4e0a, 0x4e08, 0x4e1e, 0x4e57, 0x5197, 0x5270, 0x57ce, 0x5834, 0x58cc, 0x5b22, 0x5e38, 0x60c5, 0x64fe, 0x6761, 0x6756, 0x6d44, 0x72b6, 0x7573, 0x7a63, 0x84b8, 0x8b72, 0x91b8, 0x9320, 0x5631, 0x57f4, 0x98fe }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ 189 ] = { 0x62ed, 0x690d, 0x6b96, 0x71ed, 0x7e54, 0x8077, 0x8272, 0x89e6, 0x98df, 0x8755, 0x8fb1, 0x5c3b, 0x4f38, 0x4fe1, 0x4fb5, 0x5507, 0x5a20, 0x5bdd, 0x5be9, 0x5fc3, 0x614e, 0x632f, 0x65b0, 0x664b, 0x68ee, 0x699b, 0x6d78, 0x6df1, 0x7533, 0x75b9, 0x771f, 0x795e, 0x79e6, 0x7d33, 0x81e3, 0x82af, 0x85aa, 0x89aa, 0x8a3a, 0x8eab, 0x8f9b, 0x9032, 0x91dd, 0x9707, 0x4eba, 0x4ec1, 0x5203, 0x5875, 0x58ec, 0x5c0b, 0x751a, 0x5c3d, 0x814e, 0x8a0a, 0x8fc5, 0x9663, 0x976d, 0x7b25, 0x8acf, 0x9808, 0x9162, 0x56f3, 0x53a8, 0xfffd, 0x9017, 0x5439, 0x5782, 0x5e25, 0x63a8, 0x6c34, 0x708a, 0x7761, 0x7c8b, 0x7fe0, 0x8870, 0x9042, 0x9154, 0x9310, 0x9318, 0x968f, 0x745e, 0x9ac4, 0x5d07, 0x5d69, 0x6570, 0x67a2, 0x8da8, 0x96db, 0x636e, 0x6749, 0x6919, 0x83c5, 0x9817, 0x96c0, 0x88fe, 0x6f84, 0x647a, 0x5bf8, 0x4e16, 0x702c, 0x755d, 0x662f, 0x51c4, 0x5236, 0x52e2, 0x59d3, 0x5f81, 0x6027, 0x6210, 0x653f, 0x6574, 0x661f, 0x6674, 0x68f2, 0x6816, 0x6b63, 0x6e05, 0x7272, 0x751f, 0x76db, 0x7cbe, 0x8056, 0x58f0, 0x88fd, 0x897f, 0x8aa0, 0x8a93, 0x8acb, 0x901d, 0x9192, 0x9752, 0x9759, 0x6589, 0x7a0e, 0x8106, 0x96bb, 0x5e2d, 0x60dc, 0x621a, 0x65a5, 0x6614, 0x6790, 0x77f3, 0x7a4d, 0x7c4d, 0x7e3e, 0x810a, 0x8cac, 0x8d64, 0x8de1, 0x8e5f, 0x78a9, 0x5207, 0x62d9, 0x63a5, 0x6442, 0x6298, 0x8a2d, 0x7a83, 0x7bc0, 0x8aac, 0x96ea, 0x7d76, 0x820c, 0x8749, 0x4ed9, 0x5148, 0x5343, 0x5360, 0x5ba3, 0x5c02, 0x5c16, 0x5ddd, 0x6226, 0x6247, 0x64b0, 0x6813, 0x6834, 0x6cc9, 0x6d45, 0x6d17, 0x67d3, 0x6f5c, 0x714e, 0x717d, 0x65cb, 0x7a7f, 0x7bad, 0x7dda }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ 189 ] = { 0x7e4a, 0x7fa8, 0x817a, 0x821b, 0x8239, 0x85a6, 0x8a6e, 0x8cce, 0x8df5, 0x9078, 0x9077, 0x92ad, 0x9291, 0x9583, 0x9bae, 0x524d, 0x5584, 0x6f38, 0x7136, 0x5168, 0x7985, 0x7e55, 0x81b3, 0x7cce, 0x564c, 0x5851, 0x5ca8, 0x63aa, 0x66fe, 0x66fd, 0x695a, 0x72d9, 0x758f, 0x758e, 0x790e, 0x7956, 0x79df, 0x7c97, 0x7d20, 0x7d44, 0x8607, 0x8a34, 0x963b, 0x9061, 0x9f20, 0x50e7, 0x5275, 0x53cc, 0x53e2, 0x5009, 0x55aa, 0x58ee, 0x594f, 0x723d, 0x5b8b, 0x5c64, 0x531d, 0x60e3, 0x60f3, 0x635c, 0x6383, 0x633f, 0x63bb, 0xfffd, 0x64cd, 0x65e9, 0x66f9, 0x5de3, 0x69cd, 0x69fd, 0x6f15, 0x71e5, 0x4e89, 0x75e9, 0x76f8, 0x7a93, 0x7cdf, 0x7dcf, 0x7d9c, 0x8061, 0x8349, 0x8358, 0x846c, 0x84bc, 0x85fb, 0x88c5, 0x8d70, 0x9001, 0x906d, 0x9397, 0x971c, 0x9a12, 0x50cf, 0x5897, 0x618e, 0x81d3, 0x8535, 0x8d08, 0x9020, 0x4fc3, 0x5074, 0x5247, 0x5373, 0x606f, 0x6349, 0x675f, 0x6e2c, 0x8db3, 0x901f, 0x4fd7, 0x5c5e, 0x8cca, 0x65cf, 0x7d9a, 0x5352, 0x8896, 0x5176, 0x63c3, 0x5b58, 0x5b6b, 0x5c0a, 0x640d, 0x6751, 0x905c, 0x4ed6, 0x591a, 0x592a, 0x6c70, 0x8a51, 0x553e, 0x5815, 0x59a5, 0x60f0, 0x6253, 0x67c1, 0x8235, 0x6955, 0x9640, 0x99c4, 0x9a28, 0x4f53, 0x5806, 0x5bfe, 0x8010, 0x5cb1, 0x5e2f, 0x5f85, 0x6020, 0x614b, 0x6234, 0x66ff, 0x6cf0, 0x6ede, 0x80ce, 0x817f, 0x82d4, 0x888b, 0x8cb8, 0x9000, 0x902e, 0x968a, 0x9edb, 0x9bdb, 0x4ee3, 0x53f0, 0x5927, 0x7b2c, 0x918d, 0x984c, 0x9df9, 0x6edd, 0x7027, 0x5353, 0x5544, 0x5b85, 0x6258, 0x629e, 0x62d3, 0x6ca2, 0x6fef, 0x7422, 0x8a17, 0x9438, 0x6fc1, 0x8afe, 0x8338, 0x51e7, 0x86f8, 0x53ea }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ 189 ] = { 0x53e9, 0x4f46, 0x9054, 0x8fb0, 0x596a, 0x8131, 0x5dfd, 0x7aea, 0x8fbf, 0x68da, 0x8c37, 0x72f8, 0x9c48, 0x6a3d, 0x8ab0, 0x4e39, 0x5358, 0x5606, 0x5766, 0x62c5, 0x63a2, 0x65e6, 0x6b4e, 0x6de1, 0x6e5b, 0x70ad, 0x77ed, 0x7aef, 0x7baa, 0x7dbb, 0x803d, 0x80c6, 0x86cb, 0x8a95, 0x935b, 0x56e3, 0x58c7, 0x5f3e, 0x65ad, 0x6696, 0x6a80, 0x6bb5, 0x7537, 0x8ac7, 0x5024, 0x77e5, 0x5730, 0x5f1b, 0x6065, 0x667a, 0x6c60, 0x75f4, 0x7a1a, 0x7f6e, 0x81f4, 0x8718, 0x9045, 0x99b3, 0x7bc9, 0x755c, 0x7af9, 0x7b51, 0x84c4, 0xfffd, 0x9010, 0x79e9, 0x7a92, 0x8336, 0x5ae1, 0x7740, 0x4e2d, 0x4ef2, 0x5b99, 0x5fe0, 0x62bd, 0x663c, 0x67f1, 0x6ce8, 0x866b, 0x8877, 0x8a3b, 0x914e, 0x92f3, 0x99d0, 0x6a17, 0x7026, 0x732a, 0x82e7, 0x8457, 0x8caf, 0x4e01, 0x5146, 0x51cb, 0x558b, 0x5bf5, 0x5e16, 0x5e33, 0x5e81, 0x5f14, 0x5f35, 0x5f6b, 0x5fb4, 0x61f2, 0x6311, 0x66a2, 0x671d, 0x6f6e, 0x7252, 0x753a, 0x773a, 0x8074, 0x8139, 0x8178, 0x8776, 0x8abf, 0x8adc, 0x8d85, 0x8df3, 0x929a, 0x9577, 0x9802, 0x9ce5, 0x52c5, 0x6357, 0x76f4, 0x6715, 0x6c88, 0x73cd, 0x8cc3, 0x93ae, 0x9673, 0x6d25, 0x589c, 0x690e, 0x69cc, 0x8ffd, 0x939a, 0x75db, 0x901a, 0x585a, 0x6802, 0x63b4, 0x69fb, 0x4f43, 0x6f2c, 0x67d8, 0x8fbb, 0x8526, 0x7db4, 0x9354, 0x693f, 0x6f70, 0x576a, 0x58f7, 0x5b2c, 0x7d2c, 0x722a, 0x540a, 0x91e3, 0x9db4, 0x4ead, 0x4f4e, 0x505c, 0x5075, 0x5243, 0x8c9e, 0x5448, 0x5824, 0x5b9a, 0x5e1d, 0x5e95, 0x5ead, 0x5ef7, 0x5f1f, 0x608c, 0x62b5, 0x633a, 0x63d0, 0x68af, 0x6c40, 0x7887, 0x798e, 0x7a0b, 0x7de0, 0x8247, 0x8a02, 0x8ae6, 0x8e44, 0x9013 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ 189 ] = { 0x90b8, 0x912d, 0x91d8, 0x9f0e, 0x6ce5, 0x6458, 0x64e2, 0x6575, 0x6ef4, 0x7684, 0x7b1b, 0x9069, 0x93d1, 0x6eba, 0x54f2, 0x5fb9, 0x64a4, 0x8f4d, 0x8fed, 0x9244, 0x5178, 0x586b, 0x5929, 0x5c55, 0x5e97, 0x6dfb, 0x7e8f, 0x751c, 0x8cbc, 0x8ee2, 0x985b, 0x70b9, 0x4f1d, 0x6bbf, 0x6fb1, 0x7530, 0x96fb, 0x514e, 0x5410, 0x5835, 0x5857, 0x59ac, 0x5c60, 0x5f92, 0x6597, 0x675c, 0x6e21, 0x767b, 0x83df, 0x8ced, 0x9014, 0x90fd, 0x934d, 0x7825, 0x783a, 0x52aa, 0x5ea6, 0x571f, 0x5974, 0x6012, 0x5012, 0x515a, 0x51ac, 0xfffd, 0x51cd, 0x5200, 0x5510, 0x5854, 0x5858, 0x5957, 0x5b95, 0x5cf6, 0x5d8b, 0x60bc, 0x6295, 0x642d, 0x6771, 0x6843, 0x68bc, 0x68df, 0x76d7, 0x6dd8, 0x6e6f, 0x6d9b, 0x706f, 0x71c8, 0x5f53, 0x75d8, 0x7977, 0x7b49, 0x7b54, 0x7b52, 0x7cd6, 0x7d71, 0x5230, 0x8463, 0x8569, 0x85e4, 0x8a0e, 0x8b04, 0x8c46, 0x8e0f, 0x9003, 0x900f, 0x9419, 0x9676, 0x982d, 0x9a30, 0x95d8, 0x50cd, 0x52d5, 0x540c, 0x5802, 0x5c0e, 0x61a7, 0x649e, 0x6d1e, 0x77b3, 0x7ae5, 0x80f4, 0x8404, 0x9053, 0x9285, 0x5ce0, 0x9d07, 0x533f, 0x5f97, 0x5fb3, 0x6d9c, 0x7279, 0x7763, 0x79bf, 0x7be4, 0x6bd2, 0x72ec, 0x8aad, 0x6803, 0x6a61, 0x51f8, 0x7a81, 0x6934, 0x5c4a, 0x9cf6, 0x82eb, 0x5bc5, 0x9149, 0x701e, 0x5678, 0x5c6f, 0x60c7, 0x6566, 0x6c8c, 0x8c5a, 0x9041, 0x9813, 0x5451, 0x66c7, 0x920d, 0x5948, 0x90a3, 0x5185, 0x4e4d, 0x51ea, 0x8599, 0x8b0e, 0x7058, 0x637a, 0x934b, 0x6962, 0x99b4, 0x7e04, 0x7577, 0x5357, 0x6960, 0x8edf, 0x96e3, 0x6c5d, 0x4e8c, 0x5c3c, 0x5f10, 0x8fe9, 0x5302, 0x8cd1, 0x8089, 0x8679, 0x5eff, 0x65e5, 0x4e73, 0x5165 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ 189 ] = { 0x5982, 0x5c3f, 0x97ee, 0x4efb, 0x598a, 0x5fcd, 0x8a8d, 0x6fe1, 0x79b0, 0x7962, 0x5be7, 0x8471, 0x732b, 0x71b1, 0x5e74, 0x5ff5, 0x637b, 0x649a, 0x71c3, 0x7c98, 0x4e43, 0x5efc, 0x4e4b, 0x57dc, 0x56a2, 0x60a9, 0x6fc3, 0x7d0d, 0x80fd, 0x8133, 0x81bf, 0x8fb2, 0x8997, 0x86a4, 0x5df4, 0x628a, 0x64ad, 0x8987, 0x6777, 0x6ce2, 0x6d3e, 0x7436, 0x7834, 0x5a46, 0x7f75, 0x82ad, 0x99ac, 0x4ff3, 0x5ec3, 0x62dd, 0x6392, 0x6557, 0x676f, 0x76c3, 0x724c, 0x80cc, 0x80ba, 0x8f29, 0x914d, 0x500d, 0x57f9, 0x5a92, 0x6885, 0xfffd, 0x6973, 0x7164, 0x72fd, 0x8cb7, 0x58f2, 0x8ce0, 0x966a, 0x9019, 0x877f, 0x79e4, 0x77e7, 0x8429, 0x4f2f, 0x5265, 0x535a, 0x62cd, 0x67cf, 0x6cca, 0x767d, 0x7b94, 0x7c95, 0x8236, 0x8584, 0x8feb, 0x66dd, 0x6f20, 0x7206, 0x7e1b, 0x83ab, 0x99c1, 0x9ea6, 0x51fd, 0x7bb1, 0x7872, 0x7bb8, 0x8087, 0x7b48, 0x6ae8, 0x5e61, 0x808c, 0x7551, 0x7560, 0x516b, 0x9262, 0x6e8c, 0x767a, 0x9197, 0x9aea, 0x4f10, 0x7f70, 0x629c, 0x7b4f, 0x95a5, 0x9ce9, 0x567a, 0x5859, 0x86e4, 0x96bc, 0x4f34, 0x5224, 0x534a, 0x53cd, 0x53db, 0x5e06, 0x642c, 0x6591, 0x677f, 0x6c3e, 0x6c4e, 0x7248, 0x72af, 0x73ed, 0x7554, 0x7e41, 0x822c, 0x85e9, 0x8ca9, 0x7bc4, 0x91c6, 0x7169, 0x9812, 0x98ef, 0x633d, 0x6669, 0x756a, 0x76e4, 0x78d0, 0x8543, 0x86ee, 0x532a, 0x5351, 0x5426, 0x5983, 0x5e87, 0x5f7c, 0x60b2, 0x6249, 0x6279, 0x62ab, 0x6590, 0x6bd4, 0x6ccc, 0x75b2, 0x76ae, 0x7891, 0x79d8, 0x7dcb, 0x7f77, 0x80a5, 0x88ab, 0x8ab9, 0x8cbb, 0x907f, 0x975e, 0x98db, 0x6a0b, 0x7c38, 0x5099, 0x5c3e, 0x5fae, 0x6787, 0x6bd8, 0x7435, 0x7709, 0x7f8e }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ 189 ] = { 0x9f3b, 0x67ca, 0x7a17, 0x5339, 0x758b, 0x9aed, 0x5f66, 0x819d, 0x83f1, 0x8098, 0x5f3c, 0x5fc5, 0x7562, 0x7b46, 0x903c, 0x6867, 0x59eb, 0x5a9b, 0x7d10, 0x767e, 0x8b2c, 0x4ff5, 0x5f6a, 0x6a19, 0x6c37, 0x6f02, 0x74e2, 0x7968, 0x8868, 0x8a55, 0x8c79, 0x5edf, 0x63cf, 0x75c5, 0x79d2, 0x82d7, 0x9328, 0x92f2, 0x849c, 0x86ed, 0x9c2d, 0x54c1, 0x5f6c, 0x658c, 0x6d5c, 0x7015, 0x8ca7, 0x8cd3, 0x983b, 0x654f, 0x74f6, 0x4e0d, 0x4ed8, 0x57e0, 0x592b, 0x5a66, 0x5bcc, 0x51a8, 0x5e03, 0x5e9c, 0x6016, 0x6276, 0x6577, 0xfffd, 0x65a7, 0x666e, 0x6d6e, 0x7236, 0x7b26, 0x8150, 0x819a, 0x8299, 0x8b5c, 0x8ca0, 0x8ce6, 0x8d74, 0x961c, 0x9644, 0x4fae, 0x64ab, 0x6b66, 0x821e, 0x8461, 0x856a, 0x90e8, 0x5c01, 0x6953, 0x98a8, 0x847a, 0x8557, 0x4f0f, 0x526f, 0x5fa9, 0x5e45, 0x670d, 0x798f, 0x8179, 0x8907, 0x8986, 0x6df5, 0x5f17, 0x6255, 0x6cb8, 0x4ecf, 0x7269, 0x9b92, 0x5206, 0x543b, 0x5674, 0x58b3, 0x61a4, 0x626e, 0x711a, 0x596e, 0x7c89, 0x7cde, 0x7d1b, 0x96f0, 0x6587, 0x805e, 0x4e19, 0x4f75, 0x5175, 0x5840, 0x5e63, 0x5e73, 0x5f0a, 0x67c4, 0x4e26, 0x853d, 0x9589, 0x965b, 0x7c73, 0x9801, 0x50fb, 0x58c1, 0x7656, 0x78a7, 0x5225, 0x77a5, 0x8511, 0x7b86, 0x504f, 0x5909, 0x7247, 0x7bc7, 0x7de8, 0x8fba, 0x8fd4, 0x904d, 0x4fbf, 0x52c9, 0x5a29, 0x5f01, 0x97ad, 0x4fdd, 0x8217, 0x92ea, 0x5703, 0x6355, 0x6b69, 0x752b, 0x88dc, 0x8f14, 0x7a42, 0x52df, 0x5893, 0x6155, 0x620a, 0x66ae, 0x6bcd, 0x7c3f, 0x83e9, 0x5023, 0x4ff8, 0x5305, 0x5446, 0x5831, 0x5949, 0x5b9d, 0x5cf0, 0x5cef, 0x5d29, 0x5e96, 0x62b1, 0x6367, 0x653e, 0x65b9, 0x670b }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ 189 ] = { 0x6cd5, 0x6ce1, 0x70f9, 0x7832, 0x7e2b, 0x80de, 0x82b3, 0x840c, 0x84ec, 0x8702, 0x8912, 0x8a2a, 0x8c4a, 0x90a6, 0x92d2, 0x98fd, 0x9cf3, 0x9d6c, 0x4e4f, 0x4ea1, 0x508d, 0x5256, 0x574a, 0x59a8, 0x5e3d, 0x5fd8, 0x5fd9, 0x623f, 0x66b4, 0x671b, 0x67d0, 0x68d2, 0x5192, 0x7d21, 0x80aa, 0x81a8, 0x8b00, 0x8c8c, 0x8cbf, 0x927e, 0x9632, 0x5420, 0x982c, 0x5317, 0x50d5, 0x535c, 0x58a8, 0x64b2, 0x6734, 0x7267, 0x7766, 0x7a46, 0x91e6, 0x52c3, 0x6ca1, 0x6b86, 0x5800, 0x5e4c, 0x5954, 0x672c, 0x7ffb, 0x51e1, 0x76c6, 0xfffd, 0x6469, 0x78e8, 0x9b54, 0x9ebb, 0x57cb, 0x59b9, 0x6627, 0x679a, 0x6bce, 0x54e9, 0x69d9, 0x5e55, 0x819c, 0x6795, 0x9baa, 0x67fe, 0x9c52, 0x685d, 0x4ea6, 0x4fe3, 0x53c8, 0x62b9, 0x672b, 0x6cab, 0x8fc4, 0x4fad, 0x7e6d, 0x9ebf, 0x4e07, 0x6162, 0x6e80, 0x6f2b, 0x8513, 0x5473, 0x672a, 0x9b45, 0x5df3, 0x7b95, 0x5cac, 0x5bc6, 0x871c, 0x6e4a, 0x84d1, 0x7a14, 0x8108, 0x5999, 0x7c8d, 0x6c11, 0x7720, 0x52d9, 0x5922, 0x7121, 0x725f, 0x77db, 0x9727, 0x9d61, 0x690b, 0x5a7f, 0x5a18, 0x51a5, 0x540d, 0x547d, 0x660e, 0x76df, 0x8ff7, 0x9298, 0x9cf4, 0x59ea, 0x725d, 0x6ec5, 0x514d, 0x68c9, 0x7dbf, 0x7dec, 0x9762, 0x9eba, 0x6478, 0x6a21, 0x8302, 0x5984, 0x5b5f, 0x6bdb, 0x731b, 0x76f2, 0x7db2, 0x8017, 0x8499, 0x5132, 0x6728, 0x9ed9, 0x76ee, 0x6762, 0x52ff, 0x9905, 0x5c24, 0x623b, 0x7c7e, 0x8cb0, 0x554f, 0x60b6, 0x7d0b, 0x9580, 0x5301, 0x4e5f, 0x51b6, 0x591c, 0x723a, 0x8036, 0x91ce, 0x5f25, 0x77e2, 0x5384, 0x5f79, 0x7d04, 0x85ac, 0x8a33, 0x8e8d, 0x9756, 0x67f3, 0x85ae, 0x9453, 0x6109, 0x6108, 0x6cb9, 0x7652 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ 189 ] = { 0x8aed, 0x8f38, 0x552f, 0x4f51, 0x512a, 0x52c7, 0x53cb, 0x5ba5, 0x5e7d, 0x60a0, 0x6182, 0x63d6, 0x6709, 0x67da, 0x6e67, 0x6d8c, 0x7336, 0x7337, 0x7531, 0x7950, 0x88d5, 0x8a98, 0x904a, 0x9091, 0x90f5, 0x96c4, 0x878d, 0x5915, 0x4e88, 0x4f59, 0x4e0e, 0x8a89, 0x8f3f, 0x9810, 0x50ad, 0x5e7c, 0x5996, 0x5bb9, 0x5eb8, 0x63da, 0x63fa, 0x64c1, 0x66dc, 0x694a, 0x69d8, 0x6d0b, 0x6eb6, 0x7194, 0x7528, 0x7aaf, 0x7f8a, 0x8000, 0x8449, 0x84c9, 0x8981, 0x8b21, 0x8e0a, 0x9065, 0x967d, 0x990a, 0x617e, 0x6291, 0x6b32, 0xfffd, 0x6c83, 0x6d74, 0x7fcc, 0x7ffc, 0x6dc0, 0x7f85, 0x87ba, 0x88f8, 0x6765, 0x83b1, 0x983c, 0x96f7, 0x6d1b, 0x7d61, 0x843d, 0x916a, 0x4e71, 0x5375, 0x5d50, 0x6b04, 0x6feb, 0x85cd, 0x862d, 0x89a7, 0x5229, 0x540f, 0x5c65, 0x674e, 0x68a8, 0x7406, 0x7483, 0x75e2, 0x88cf, 0x88e1, 0x91cc, 0x96e2, 0x9678, 0x5f8b, 0x7387, 0x7acb, 0x844e, 0x63a0, 0x7565, 0x5289, 0x6d41, 0x6e9c, 0x7409, 0x7559, 0x786b, 0x7c92, 0x9686, 0x7adc, 0x9f8d, 0x4fb6, 0x616e, 0x65c5, 0x865c, 0x4e86, 0x4eae, 0x50da, 0x4e21, 0x51cc, 0x5bee, 0x6599, 0x6881, 0x6dbc, 0x731f, 0x7642, 0x77ad, 0x7a1c, 0x7ce7, 0x826f, 0x8ad2, 0x907c, 0x91cf, 0x9675, 0x9818, 0x529b, 0x7dd1, 0x502b, 0x5398, 0x6797, 0x6dcb, 0x71d0, 0x7433, 0x81e8, 0x8f2a, 0x96a3, 0x9c57, 0x9e9f, 0x7460, 0x5841, 0x6d99, 0x7d2f, 0x985e, 0x4ee4, 0x4f36, 0x4f8b, 0x51b7, 0x52b1, 0x5dba, 0x601c, 0x73b2, 0x793c, 0x82d3, 0x9234, 0x96b7, 0x96f6, 0x970a, 0x9e97, 0x9f62, 0x66a6, 0x6b74, 0x5217, 0x52a3, 0x70c8, 0x88c2, 0x5ec9, 0x604b, 0x6190, 0x6f23, 0x7149, 0x7c3e, 0x7df4, 0x806f }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9840[ 51 ] = { 0x84ee, 0x9023, 0x932c, 0x5442, 0x9b6f, 0x6ad3, 0x7089, 0x8cc2, 0x8def, 0x9732, 0x52b4, 0x5a41, 0x5eca, 0x5f04, 0x6717, 0x697c, 0x6994, 0x6d6a, 0x6f0f, 0x7262, 0x72fc, 0x7bed, 0x8001, 0x807e, 0x874b, 0x90ce, 0x516d, 0x9e93, 0x7984, 0x808b, 0x9332, 0x8ad6, 0x502d, 0x548c, 0x8a71, 0x6b6a, 0x8cc4, 0x8107, 0x60d1, 0x67a0, 0x9df2, 0x4e99, 0x4e98, 0x9c10, 0x8a6b, 0x85c1, 0x8568, 0x6900, 0x6e7e, 0x7897, 0x8155 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ 94 ] = { 0x5f0c, 0x4e10, 0x4e15, 0x4e2a, 0x4e31, 0x4e36, 0x4e3c, 0x4e3f, 0x4e42, 0x4e56, 0x4e58, 0x4e82, 0x4e85, 0x8c6b, 0x4e8a, 0x8212, 0x5f0d, 0x4e8e, 0x4e9e, 0x4e9f, 0x4ea0, 0x4ea2, 0x4eb0, 0x4eb3, 0x4eb6, 0x4ece, 0x4ecd, 0x4ec4, 0x4ec6, 0x4ec2, 0x4ed7, 0x4ede, 0x4eed, 0x4edf, 0x4ef7, 0x4f09, 0x4f5a, 0x4f30, 0x4f5b, 0x4f5d, 0x4f57, 0x4f47, 0x4f76, 0x4f88, 0x4f8f, 0x4f98, 0x4f7b, 0x4f69, 0x4f70, 0x4f91, 0x4f6f, 0x4f86, 0x4f96, 0x5118, 0x4fd4, 0x4fdf, 0x4fce, 0x4fd8, 0x4fdb, 0x4fd1, 0x4fda, 0x4fd0, 0x4fe4, 0x4fe5, 0x501a, 0x5028, 0x5014, 0x502a, 0x5025, 0x5005, 0x4f1c, 0x4ff6, 0x5021, 0x5029, 0x502c, 0x4ffe, 0x4fef, 0x5011, 0x5006, 0x5043, 0x5047, 0x6703, 0x5055, 0x5050, 0x5048, 0x505a, 0x5056, 0x506c, 0x5078, 0x5080, 0x509a, 0x5085, 0x50b4, 0x50b2 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ 189 ] = { 0x50c9, 0x50ca, 0x50b3, 0x50c2, 0x50d6, 0x50de, 0x50e5, 0x50ed, 0x50e3, 0x50ee, 0x50f9, 0x50f5, 0x5109, 0x5101, 0x5102, 0x5116, 0x5115, 0x5114, 0x511a, 0x5121, 0x513a, 0x5137, 0x513c, 0x513b, 0x513f, 0x5140, 0x5152, 0x514c, 0x5154, 0x5162, 0x7af8, 0x5169, 0x516a, 0x516e, 0x5180, 0x5182, 0x56d8, 0x518c, 0x5189, 0x518f, 0x5191, 0x5193, 0x5195, 0x5196, 0x51a4, 0x51a6, 0x51a2, 0x51a9, 0x51aa, 0x51ab, 0x51b3, 0x51b1, 0x51b2, 0x51b0, 0x51b5, 0x51bd, 0x51c5, 0x51c9, 0x51db, 0x51e0, 0x8655, 0x51e9, 0x51ed, 0xfffd, 0x51f0, 0x51f5, 0x51fe, 0x5204, 0x520b, 0x5214, 0x520e, 0x5227, 0x522a, 0x522e, 0x5233, 0x5239, 0x524f, 0x5244, 0x524b, 0x524c, 0x525e, 0x5254, 0x526a, 0x5274, 0x5269, 0x5273, 0x527f, 0x527d, 0x528d, 0x5294, 0x5292, 0x5271, 0x5288, 0x5291, 0x8fa8, 0x8fa7, 0x52ac, 0x52ad, 0x52bc, 0x52b5, 0x52c1, 0x52cd, 0x52d7, 0x52de, 0x52e3, 0x52e6, 0x98ed, 0x52e0, 0x52f3, 0x52f5, 0x52f8, 0x52f9, 0x5306, 0x5308, 0x7538, 0x530d, 0x5310, 0x530f, 0x5315, 0x531a, 0x5323, 0x532f, 0x5331, 0x5333, 0x5338, 0x5340, 0x5346, 0x5345, 0x4e17, 0x5349, 0x534d, 0x51d6, 0x535e, 0x5369, 0x536e, 0x5918, 0x537b, 0x5377, 0x5382, 0x5396, 0x53a0, 0x53a6, 0x53a5, 0x53ae, 0x53b0, 0x53b6, 0x53c3, 0x7c12, 0x96d9, 0x53df, 0x66fc, 0x71ee, 0x53ee, 0x53e8, 0x53ed, 0x53fa, 0x5401, 0x543d, 0x5440, 0x542c, 0x542d, 0x543c, 0x542e, 0x5436, 0x5429, 0x541d, 0x544e, 0x548f, 0x5475, 0x548e, 0x545f, 0x5471, 0x5477, 0x5470, 0x5492, 0x547b, 0x5480, 0x5476, 0x5484, 0x5490, 0x5486, 0x54c7, 0x54a2, 0x54b8, 0x54a5, 0x54ac, 0x54c4, 0x54c8, 0x54a8 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ 189 ] = { 0x54ab, 0x54c2, 0x54a4, 0x54be, 0x54bc, 0x54d8, 0x54e5, 0x54e6, 0x550f, 0x5514, 0x54fd, 0x54ee, 0x54ed, 0x54fa, 0x54e2, 0x5539, 0x5540, 0x5563, 0x554c, 0x552e, 0x555c, 0x5545, 0x5556, 0x5557, 0x5538, 0x5533, 0x555d, 0x5599, 0x5580, 0x54af, 0x558a, 0x559f, 0x557b, 0x557e, 0x5598, 0x559e, 0x55ae, 0x557c, 0x5583, 0x55a9, 0x5587, 0x55a8, 0x55da, 0x55c5, 0x55df, 0x55c4, 0x55dc, 0x55e4, 0x55d4, 0x5614, 0x55f7, 0x5616, 0x55fe, 0x55fd, 0x561b, 0x55f9, 0x564e, 0x5650, 0x71df, 0x5634, 0x5636, 0x5632, 0x5638, 0xfffd, 0x566b, 0x5664, 0x562f, 0x566c, 0x566a, 0x5686, 0x5680, 0x568a, 0x56a0, 0x5694, 0x568f, 0x56a5, 0x56ae, 0x56b6, 0x56b4, 0x56c2, 0x56bc, 0x56c1, 0x56c3, 0x56c0, 0x56c8, 0x56ce, 0x56d1, 0x56d3, 0x56d7, 0x56ee, 0x56f9, 0x5700, 0x56ff, 0x5704, 0x5709, 0x5708, 0x570b, 0x570d, 0x5713, 0x5718, 0x5716, 0x55c7, 0x571c, 0x5726, 0x5737, 0x5738, 0x574e, 0x573b, 0x5740, 0x574f, 0x5769, 0x57c0, 0x5788, 0x5761, 0x577f, 0x5789, 0x5793, 0x57a0, 0x57b3, 0x57a4, 0x57aa, 0x57b0, 0x57c3, 0x57c6, 0x57d4, 0x57d2, 0x57d3, 0x580a, 0x57d6, 0x57e3, 0x580b, 0x5819, 0x581d, 0x5872, 0x5821, 0x5862, 0x584b, 0x5870, 0x6bc0, 0x5852, 0x583d, 0x5879, 0x5885, 0x58b9, 0x589f, 0x58ab, 0x58ba, 0x58de, 0x58bb, 0x58b8, 0x58ae, 0x58c5, 0x58d3, 0x58d1, 0x58d7, 0x58d9, 0x58d8, 0x58e5, 0x58dc, 0x58e4, 0x58df, 0x58ef, 0x58fa, 0x58f9, 0x58fb, 0x58fc, 0x58fd, 0x5902, 0x590a, 0x5910, 0x591b, 0x68a6, 0x5925, 0x592c, 0x592d, 0x5932, 0x5938, 0x593e, 0x7ad2, 0x5955, 0x5950, 0x594e, 0x595a, 0x5958, 0x5962, 0x5960, 0x5967, 0x596c, 0x5969 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ 189 ] = { 0x5978, 0x5981, 0x599d, 0x4f5e, 0x4fab, 0x59a3, 0x59b2, 0x59c6, 0x59e8, 0x59dc, 0x598d, 0x59d9, 0x59da, 0x5a25, 0x5a1f, 0x5a11, 0x5a1c, 0x5a09, 0x5a1a, 0x5a40, 0x5a6c, 0x5a49, 0x5a35, 0x5a36, 0x5a62, 0x5a6a, 0x5a9a, 0x5abc, 0x5abe, 0x5acb, 0x5ac2, 0x5abd, 0x5ae3, 0x5ad7, 0x5ae6, 0x5ae9, 0x5ad6, 0x5afa, 0x5afb, 0x5b0c, 0x5b0b, 0x5b16, 0x5b32, 0x5ad0, 0x5b2a, 0x5b36, 0x5b3e, 0x5b43, 0x5b45, 0x5b40, 0x5b51, 0x5b55, 0x5b5a, 0x5b5b, 0x5b65, 0x5b69, 0x5b70, 0x5b73, 0x5b75, 0x5b78, 0x6588, 0x5b7a, 0x5b80, 0xfffd, 0x5b83, 0x5ba6, 0x5bb8, 0x5bc3, 0x5bc7, 0x5bc9, 0x5bd4, 0x5bd0, 0x5be4, 0x5be6, 0x5be2, 0x5bde, 0x5be5, 0x5beb, 0x5bf0, 0x5bf6, 0x5bf3, 0x5c05, 0x5c07, 0x5c08, 0x5c0d, 0x5c13, 0x5c20, 0x5c22, 0x5c28, 0x5c38, 0x5c39, 0x5c41, 0x5c46, 0x5c4e, 0x5c53, 0x5c50, 0x5c4f, 0x5b71, 0x5c6c, 0x5c6e, 0x4e62, 0x5c76, 0x5c79, 0x5c8c, 0x5c91, 0x5c94, 0x599b, 0x5cab, 0x5cbb, 0x5cb6, 0x5cbc, 0x5cb7, 0x5cc5, 0x5cbe, 0x5cc7, 0x5cd9, 0x5ce9, 0x5cfd, 0x5cfa, 0x5ced, 0x5d8c, 0x5cea, 0x5d0b, 0x5d15, 0x5d17, 0x5d5c, 0x5d1f, 0x5d1b, 0x5d11, 0x5d14, 0x5d22, 0x5d1a, 0x5d19, 0x5d18, 0x5d4c, 0x5d52, 0x5d4e, 0x5d4b, 0x5d6c, 0x5d73, 0x5d76, 0x5d87, 0x5d84, 0x5d82, 0x5da2, 0x5d9d, 0x5dac, 0x5dae, 0x5dbd, 0x5d90, 0x5db7, 0x5dbc, 0x5dc9, 0x5dcd, 0x5dd3, 0x5dd2, 0x5dd6, 0x5ddb, 0x5deb, 0x5df2, 0x5df5, 0x5e0b, 0x5e1a, 0x5e19, 0x5e11, 0x5e1b, 0x5e36, 0x5e37, 0x5e44, 0x5e43, 0x5e40, 0x5e4e, 0x5e57, 0x5e54, 0x5e5f, 0x5e62, 0x5e64, 0x5e47, 0x5e75, 0x5e76, 0x5e7a, 0x9ebc, 0x5e7f, 0x5ea0, 0x5ec1, 0x5ec2, 0x5ec8, 0x5ed0, 0x5ecf }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ 189 ] = { 0x5ed6, 0x5ee3, 0x5edd, 0x5eda, 0x5edb, 0x5ee2, 0x5ee1, 0x5ee8, 0x5ee9, 0x5eec, 0x5ef1, 0x5ef3, 0x5ef0, 0x5ef4, 0x5ef8, 0x5efe, 0x5f03, 0x5f09, 0x5f5d, 0x5f5c, 0x5f0b, 0x5f11, 0x5f16, 0x5f29, 0x5f2d, 0x5f38, 0x5f41, 0x5f48, 0x5f4c, 0x5f4e, 0x5f2f, 0x5f51, 0x5f56, 0x5f57, 0x5f59, 0x5f61, 0x5f6d, 0x5f73, 0x5f77, 0x5f83, 0x5f82, 0x5f7f, 0x5f8a, 0x5f88, 0x5f91, 0x5f87, 0x5f9e, 0x5f99, 0x5f98, 0x5fa0, 0x5fa8, 0x5fad, 0x5fbc, 0x5fd6, 0x5ffb, 0x5fe4, 0x5ff8, 0x5ff1, 0x5fdd, 0x60b3, 0x5fff, 0x6021, 0x6060, 0xfffd, 0x6019, 0x6010, 0x6029, 0x600e, 0x6031, 0x601b, 0x6015, 0x602b, 0x6026, 0x600f, 0x603a, 0x605a, 0x6041, 0x606a, 0x6077, 0x605f, 0x604a, 0x6046, 0x604d, 0x6063, 0x6043, 0x6064, 0x6042, 0x606c, 0x606b, 0x6059, 0x6081, 0x608d, 0x60e7, 0x6083, 0x609a, 0x6084, 0x609b, 0x6096, 0x6097, 0x6092, 0x60a7, 0x608b, 0x60e1, 0x60b8, 0x60e0, 0x60d3, 0x60b4, 0x5ff0, 0x60bd, 0x60c6, 0x60b5, 0x60d8, 0x614d, 0x6115, 0x6106, 0x60f6, 0x60f7, 0x6100, 0x60f4, 0x60fa, 0x6103, 0x6121, 0x60fb, 0x60f1, 0x610d, 0x610e, 0x6147, 0x613e, 0x6128, 0x6127, 0x614a, 0x613f, 0x613c, 0x612c, 0x6134, 0x613d, 0x6142, 0x6144, 0x6173, 0x6177, 0x6158, 0x6159, 0x615a, 0x616b, 0x6174, 0x616f, 0x6165, 0x6171, 0x615f, 0x615d, 0x6153, 0x6175, 0x6199, 0x6196, 0x6187, 0x61ac, 0x6194, 0x619a, 0x618a, 0x6191, 0x61ab, 0x61ae, 0x61cc, 0x61ca, 0x61c9, 0x61f7, 0x61c8, 0x61c3, 0x61c6, 0x61ba, 0x61cb, 0x7f79, 0x61cd, 0x61e6, 0x61e3, 0x61f6, 0x61fa, 0x61f4, 0x61ff, 0x61fd, 0x61fc, 0x61fe, 0x6200, 0x6208, 0x6209, 0x620d, 0x620c, 0x6214, 0x621b }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ 189 ] = { 0x621e, 0x6221, 0x622a, 0x622e, 0x6230, 0x6232, 0x6233, 0x6241, 0x624e, 0x625e, 0x6263, 0x625b, 0x6260, 0x6268, 0x627c, 0x6282, 0x6289, 0x627e, 0x6292, 0x6293, 0x6296, 0x62d4, 0x6283, 0x6294, 0x62d7, 0x62d1, 0x62bb, 0x62cf, 0x62ff, 0x62c6, 0x64d4, 0x62c8, 0x62dc, 0x62cc, 0x62ca, 0x62c2, 0x62c7, 0x629b, 0x62c9, 0x630c, 0x62ee, 0x62f1, 0x6327, 0x6302, 0x6308, 0x62ef, 0x62f5, 0x6350, 0x633e, 0x634d, 0x641c, 0x634f, 0x6396, 0x638e, 0x6380, 0x63ab, 0x6376, 0x63a3, 0x638f, 0x6389, 0x639f, 0x63b5, 0x636b, 0xfffd, 0x6369, 0x63be, 0x63e9, 0x63c0, 0x63c6, 0x63e3, 0x63c9, 0x63d2, 0x63f6, 0x63c4, 0x6416, 0x6434, 0x6406, 0x6413, 0x6426, 0x6436, 0x651d, 0x6417, 0x6428, 0x640f, 0x6467, 0x646f, 0x6476, 0x644e, 0x652a, 0x6495, 0x6493, 0x64a5, 0x64a9, 0x6488, 0x64bc, 0x64da, 0x64d2, 0x64c5, 0x64c7, 0x64bb, 0x64d8, 0x64c2, 0x64f1, 0x64e7, 0x8209, 0x64e0, 0x64e1, 0x62ac, 0x64e3, 0x64ef, 0x652c, 0x64f6, 0x64f4, 0x64f2, 0x64fa, 0x6500, 0x64fd, 0x6518, 0x651c, 0x6505, 0x6524, 0x6523, 0x652b, 0x6534, 0x6535, 0x6537, 0x6536, 0x6538, 0x754b, 0x6548, 0x6556, 0x6555, 0x654d, 0x6558, 0x655e, 0x655d, 0x6572, 0x6578, 0x6582, 0x6583, 0x8b8a, 0x659b, 0x659f, 0x65ab, 0x65b7, 0x65c3, 0x65c6, 0x65c1, 0x65c4, 0x65cc, 0x65d2, 0x65db, 0x65d9, 0x65e0, 0x65e1, 0x65f1, 0x6772, 0x660a, 0x6603, 0x65fb, 0x6773, 0x6635, 0x6636, 0x6634, 0x661c, 0x664f, 0x6644, 0x6649, 0x6641, 0x665e, 0x665d, 0x6664, 0x6667, 0x6668, 0x665f, 0x6662, 0x6670, 0x6683, 0x6688, 0x668e, 0x6689, 0x6684, 0x6698, 0x669d, 0x66c1, 0x66b9, 0x66c9, 0x66be, 0x66bc }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ 189 ] = { 0x66c4, 0x66b8, 0x66d6, 0x66da, 0x66e0, 0x663f, 0x66e6, 0x66e9, 0x66f0, 0x66f5, 0x66f7, 0x670f, 0x6716, 0x671e, 0x6726, 0x6727, 0x9738, 0x672e, 0x673f, 0x6736, 0x6741, 0x6738, 0x6737, 0x6746, 0x675e, 0x6760, 0x6759, 0x6763, 0x6764, 0x6789, 0x6770, 0x67a9, 0x677c, 0x676a, 0x678c, 0x678b, 0x67a6, 0x67a1, 0x6785, 0x67b7, 0x67ef, 0x67b4, 0x67ec, 0x67b3, 0x67e9, 0x67b8, 0x67e4, 0x67de, 0x67dd, 0x67e2, 0x67ee, 0x67b9, 0x67ce, 0x67c6, 0x67e7, 0x6a9c, 0x681e, 0x6846, 0x6829, 0x6840, 0x684d, 0x6832, 0x684e, 0xfffd, 0x68b3, 0x682b, 0x6859, 0x6863, 0x6877, 0x687f, 0x689f, 0x688f, 0x68ad, 0x6894, 0x689d, 0x689b, 0x6883, 0x6aae, 0x68b9, 0x6874, 0x68b5, 0x68a0, 0x68ba, 0x690f, 0x688d, 0x687e, 0x6901, 0x68ca, 0x6908, 0x68d8, 0x6922, 0x6926, 0x68e1, 0x690c, 0x68cd, 0x68d4, 0x68e7, 0x68d5, 0x6936, 0x6912, 0x6904, 0x68d7, 0x68e3, 0x6925, 0x68f9, 0x68e0, 0x68ef, 0x6928, 0x692a, 0x691a, 0x6923, 0x6921, 0x68c6, 0x6979, 0x6977, 0x695c, 0x6978, 0x696b, 0x6954, 0x697e, 0x696e, 0x6939, 0x6974, 0x693d, 0x6959, 0x6930, 0x6961, 0x695e, 0x695d, 0x6981, 0x696a, 0x69b2, 0x69ae, 0x69d0, 0x69bf, 0x69c1, 0x69d3, 0x69be, 0x69ce, 0x5be8, 0x69ca, 0x69dd, 0x69bb, 0x69c3, 0x69a7, 0x6a2e, 0x6991, 0x69a0, 0x699c, 0x6995, 0x69b4, 0x69de, 0x69e8, 0x6a02, 0x6a1b, 0x69ff, 0x6b0a, 0x69f9, 0x69f2, 0x69e7, 0x6a05, 0x69b1, 0x6a1e, 0x69ed, 0x6a14, 0x69eb, 0x6a0a, 0x6a12, 0x6ac1, 0x6a23, 0x6a13, 0x6a44, 0x6a0c, 0x6a72, 0x6a36, 0x6a78, 0x6a47, 0x6a62, 0x6a59, 0x6a66, 0x6a48, 0x6a38, 0x6a22, 0x6a90, 0x6a8d, 0x6aa0, 0x6a84, 0x6aa2, 0x6aa3 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ 189 ] = { 0x6a97, 0x8617, 0x6abb, 0x6ac3, 0x6ac2, 0x6ab8, 0x6ab3, 0x6aac, 0x6ade, 0x6ad1, 0x6adf, 0x6aaa, 0x6ada, 0x6aea, 0x6afb, 0x6b05, 0x8616, 0x6afa, 0x6b12, 0x6b16, 0x9b31, 0x6b1f, 0x6b38, 0x6b37, 0x76dc, 0x6b39, 0x98ee, 0x6b47, 0x6b43, 0x6b49, 0x6b50, 0x6b59, 0x6b54, 0x6b5b, 0x6b5f, 0x6b61, 0x6b78, 0x6b79, 0x6b7f, 0x6b80, 0x6b84, 0x6b83, 0x6b8d, 0x6b98, 0x6b95, 0x6b9e, 0x6ba4, 0x6baa, 0x6bab, 0x6baf, 0x6bb2, 0x6bb1, 0x6bb3, 0x6bb7, 0x6bbc, 0x6bc6, 0x6bcb, 0x6bd3, 0x6bdf, 0x6bec, 0x6beb, 0x6bf3, 0x6bef, 0xfffd, 0x9ebe, 0x6c08, 0x6c13, 0x6c14, 0x6c1b, 0x6c24, 0x6c23, 0x6c5e, 0x6c55, 0x6c62, 0x6c6a, 0x6c82, 0x6c8d, 0x6c9a, 0x6c81, 0x6c9b, 0x6c7e, 0x6c68, 0x6c73, 0x6c92, 0x6c90, 0x6cc4, 0x6cf1, 0x6cd3, 0x6cbd, 0x6cd7, 0x6cc5, 0x6cdd, 0x6cae, 0x6cb1, 0x6cbe, 0x6cba, 0x6cdb, 0x6cef, 0x6cd9, 0x6cea, 0x6d1f, 0x884d, 0x6d36, 0x6d2b, 0x6d3d, 0x6d38, 0x6d19, 0x6d35, 0x6d33, 0x6d12, 0x6d0c, 0x6d63, 0x6d93, 0x6d64, 0x6d5a, 0x6d79, 0x6d59, 0x6d8e, 0x6d95, 0x6fe4, 0x6d85, 0x6df9, 0x6e15, 0x6e0a, 0x6db5, 0x6dc7, 0x6de6, 0x6db8, 0x6dc6, 0x6dec, 0x6dde, 0x6dcc, 0x6de8, 0x6dd2, 0x6dc5, 0x6dfa, 0x6dd9, 0x6de4, 0x6dd5, 0x6dea, 0x6dee, 0x6e2d, 0x6e6e, 0x6e2e, 0x6e19, 0x6e72, 0x6e5f, 0x6e3e, 0x6e23, 0x6e6b, 0x6e2b, 0x6e76, 0x6e4d, 0x6e1f, 0x6e43, 0x6e3a, 0x6e4e, 0x6e24, 0x6eff, 0x6e1d, 0x6e38, 0x6e82, 0x6eaa, 0x6e98, 0x6ec9, 0x6eb7, 0x6ed3, 0x6ebd, 0x6eaf, 0x6ec4, 0x6eb2, 0x6ed4, 0x6ed5, 0x6e8f, 0x6ea5, 0x6ec2, 0x6e9f, 0x6f41, 0x6f11, 0x704c, 0x6eec, 0x6ef8, 0x6efe, 0x6f3f, 0x6ef2, 0x6f31, 0x6eef, 0x6f32, 0x6ecc }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ 189 ] = { 0x6f3e, 0x6f13, 0x6ef7, 0x6f86, 0x6f7a, 0x6f78, 0x6f81, 0x6f80, 0x6f6f, 0x6f5b, 0x6ff3, 0x6f6d, 0x6f82, 0x6f7c, 0x6f58, 0x6f8e, 0x6f91, 0x6fc2, 0x6f66, 0x6fb3, 0x6fa3, 0x6fa1, 0x6fa4, 0x6fb9, 0x6fc6, 0x6faa, 0x6fdf, 0x6fd5, 0x6fec, 0x6fd4, 0x6fd8, 0x6ff1, 0x6fee, 0x6fdb, 0x7009, 0x700b, 0x6ffa, 0x7011, 0x7001, 0x700f, 0x6ffe, 0x701b, 0x701a, 0x6f74, 0x701d, 0x7018, 0x701f, 0x7030, 0x703e, 0x7032, 0x7051, 0x7063, 0x7099, 0x7092, 0x70af, 0x70f1, 0x70ac, 0x70b8, 0x70b3, 0x70ae, 0x70df, 0x70cb, 0x70dd, 0xfffd, 0x70d9, 0x7109, 0x70fd, 0x711c, 0x7119, 0x7165, 0x7155, 0x7188, 0x7166, 0x7162, 0x714c, 0x7156, 0x716c, 0x718f, 0x71fb, 0x7184, 0x7195, 0x71a8, 0x71ac, 0x71d7, 0x71b9, 0x71be, 0x71d2, 0x71c9, 0x71d4, 0x71ce, 0x71e0, 0x71ec, 0x71e7, 0x71f5, 0x71fc, 0x71f9, 0x71ff, 0x720d, 0x7210, 0x721b, 0x7228, 0x722d, 0x722c, 0x7230, 0x7232, 0x723b, 0x723c, 0x723f, 0x7240, 0x7246, 0x724b, 0x7258, 0x7274, 0x727e, 0x7282, 0x7281, 0x7287, 0x7292, 0x7296, 0x72a2, 0x72a7, 0x72b9, 0x72b2, 0x72c3, 0x72c6, 0x72c4, 0x72ce, 0x72d2, 0x72e2, 0x72e0, 0x72e1, 0x72f9, 0x72f7, 0x500f, 0x7317, 0x730a, 0x731c, 0x7316, 0x731d, 0x7334, 0x732f, 0x7329, 0x7325, 0x733e, 0x734e, 0x734f, 0x9ed8, 0x7357, 0x736a, 0x7368, 0x7370, 0x7378, 0x7375, 0x737b, 0x737a, 0x73c8, 0x73b3, 0x73ce, 0x73bb, 0x73c0, 0x73e5, 0x73ee, 0x73de, 0x74a2, 0x7405, 0x746f, 0x7425, 0x73f8, 0x7432, 0x743a, 0x7455, 0x743f, 0x745f, 0x7459, 0x7441, 0x745c, 0x7469, 0x7470, 0x7463, 0x746a, 0x7476, 0x747e, 0x748b, 0x749e, 0x74a7, 0x74ca, 0x74cf, 0x74d4, 0x73f1 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ 189 ] = { 0x74e0, 0x74e3, 0x74e7, 0x74e9, 0x74ee, 0x74f2, 0x74f0, 0x74f1, 0x74f8, 0x74f7, 0x7504, 0x7503, 0x7505, 0x750c, 0x750e, 0x750d, 0x7515, 0x7513, 0x751e, 0x7526, 0x752c, 0x753c, 0x7544, 0x754d, 0x754a, 0x7549, 0x755b, 0x7546, 0x755a, 0x7569, 0x7564, 0x7567, 0x756b, 0x756d, 0x7578, 0x7576, 0x7586, 0x7587, 0x7574, 0x758a, 0x7589, 0x7582, 0x7594, 0x759a, 0x759d, 0x75a5, 0x75a3, 0x75c2, 0x75b3, 0x75c3, 0x75b5, 0x75bd, 0x75b8, 0x75bc, 0x75b1, 0x75cd, 0x75ca, 0x75d2, 0x75d9, 0x75e3, 0x75de, 0x75fe, 0x75ff, 0xfffd, 0x75fc, 0x7601, 0x75f0, 0x75fa, 0x75f2, 0x75f3, 0x760b, 0x760d, 0x7609, 0x761f, 0x7627, 0x7620, 0x7621, 0x7622, 0x7624, 0x7634, 0x7630, 0x763b, 0x7647, 0x7648, 0x7646, 0x765c, 0x7658, 0x7661, 0x7662, 0x7668, 0x7669, 0x766a, 0x7667, 0x766c, 0x7670, 0x7672, 0x7676, 0x7678, 0x767c, 0x7680, 0x7683, 0x7688, 0x768b, 0x768e, 0x7696, 0x7693, 0x7699, 0x769a, 0x76b0, 0x76b4, 0x76b8, 0x76b9, 0x76ba, 0x76c2, 0x76cd, 0x76d6, 0x76d2, 0x76de, 0x76e1, 0x76e5, 0x76e7, 0x76ea, 0x862f, 0x76fb, 0x7708, 0x7707, 0x7704, 0x7729, 0x7724, 0x771e, 0x7725, 0x7726, 0x771b, 0x7737, 0x7738, 0x7747, 0x775a, 0x7768, 0x776b, 0x775b, 0x7765, 0x777f, 0x777e, 0x7779, 0x778e, 0x778b, 0x7791, 0x77a0, 0x779e, 0x77b0, 0x77b6, 0x77b9, 0x77bf, 0x77bc, 0x77bd, 0x77bb, 0x77c7, 0x77cd, 0x77d7, 0x77da, 0x77dc, 0x77e3, 0x77ee, 0x77fc, 0x780c, 0x7812, 0x7926, 0x7820, 0x792a, 0x7845, 0x788e, 0x7874, 0x7886, 0x787c, 0x789a, 0x788c, 0x78a3, 0x78b5, 0x78aa, 0x78af, 0x78d1, 0x78c6, 0x78cb, 0x78d4, 0x78be, 0x78bc, 0x78c5, 0x78ca, 0x78ec }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ 189 ] = { 0x78e7, 0x78da, 0x78fd, 0x78f4, 0x7907, 0x7912, 0x7911, 0x7919, 0x792c, 0x792b, 0x7940, 0x7960, 0x7957, 0x795f, 0x795a, 0x7955, 0x7953, 0x797a, 0x797f, 0x798a, 0x799d, 0x79a7, 0x9f4b, 0x79aa, 0x79ae, 0x79b3, 0x79b9, 0x79ba, 0x79c9, 0x79d5, 0x79e7, 0x79ec, 0x79e1, 0x79e3, 0x7a08, 0x7a0d, 0x7a18, 0x7a19, 0x7a20, 0x7a1f, 0x7980, 0x7a31, 0x7a3b, 0x7a3e, 0x7a37, 0x7a43, 0x7a57, 0x7a49, 0x7a61, 0x7a62, 0x7a69, 0x9f9d, 0x7a70, 0x7a79, 0x7a7d, 0x7a88, 0x7a97, 0x7a95, 0x7a98, 0x7a96, 0x7aa9, 0x7ac8, 0x7ab0, 0xfffd, 0x7ab6, 0x7ac5, 0x7ac4, 0x7abf, 0x9083, 0x7ac7, 0x7aca, 0x7acd, 0x7acf, 0x7ad5, 0x7ad3, 0x7ad9, 0x7ada, 0x7add, 0x7ae1, 0x7ae2, 0x7ae6, 0x7aed, 0x7af0, 0x7b02, 0x7b0f, 0x7b0a, 0x7b06, 0x7b33, 0x7b18, 0x7b19, 0x7b1e, 0x7b35, 0x7b28, 0x7b36, 0x7b50, 0x7b7a, 0x7b04, 0x7b4d, 0x7b0b, 0x7b4c, 0x7b45, 0x7b75, 0x7b65, 0x7b74, 0x7b67, 0x7b70, 0x7b71, 0x7b6c, 0x7b6e, 0x7b9d, 0x7b98, 0x7b9f, 0x7b8d, 0x7b9c, 0x7b9a, 0x7b8b, 0x7b92, 0x7b8f, 0x7b5d, 0x7b99, 0x7bcb, 0x7bc1, 0x7bcc, 0x7bcf, 0x7bb4, 0x7bc6, 0x7bdd, 0x7be9, 0x7c11, 0x7c14, 0x7be6, 0x7be5, 0x7c60, 0x7c00, 0x7c07, 0x7c13, 0x7bf3, 0x7bf7, 0x7c17, 0x7c0d, 0x7bf6, 0x7c23, 0x7c27, 0x7c2a, 0x7c1f, 0x7c37, 0x7c2b, 0x7c3d, 0x7c4c, 0x7c43, 0x7c54, 0x7c4f, 0x7c40, 0x7c50, 0x7c58, 0x7c5f, 0x7c64, 0x7c56, 0x7c65, 0x7c6c, 0x7c75, 0x7c83, 0x7c90, 0x7ca4, 0x7cad, 0x7ca2, 0x7cab, 0x7ca1, 0x7ca8, 0x7cb3, 0x7cb2, 0x7cb1, 0x7cae, 0x7cb9, 0x7cbd, 0x7cc0, 0x7cc5, 0x7cc2, 0x7cd8, 0x7cd2, 0x7cdc, 0x7ce2, 0x9b3b, 0x7cef, 0x7cf2, 0x7cf4, 0x7cf6, 0x7cfa, 0x7d06 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ 189 ] = { 0x7d02, 0x7d1c, 0x7d15, 0x7d0a, 0x7d45, 0x7d4b, 0x7d2e, 0x7d32, 0x7d3f, 0x7d35, 0x7d46, 0x7d73, 0x7d56, 0x7d4e, 0x7d72, 0x7d68, 0x7d6e, 0x7d4f, 0x7d63, 0x7d93, 0x7d89, 0x7d5b, 0x7d8f, 0x7d7d, 0x7d9b, 0x7dba, 0x7dae, 0x7da3, 0x7db5, 0x7dc7, 0x7dbd, 0x7dab, 0x7e3d, 0x7da2, 0x7daf, 0x7ddc, 0x7db8, 0x7d9f, 0x7db0, 0x7dd8, 0x7ddd, 0x7de4, 0x7dde, 0x7dfb, 0x7df2, 0x7de1, 0x7e05, 0x7e0a, 0x7e23, 0x7e21, 0x7e12, 0x7e31, 0x7e1f, 0x7e09, 0x7e0b, 0x7e22, 0x7e46, 0x7e66, 0x7e3b, 0x7e35, 0x7e39, 0x7e43, 0x7e37, 0xfffd, 0x7e32, 0x7e3a, 0x7e67, 0x7e5d, 0x7e56, 0x7e5e, 0x7e59, 0x7e5a, 0x7e79, 0x7e6a, 0x7e69, 0x7e7c, 0x7e7b, 0x7e83, 0x7dd5, 0x7e7d, 0x8fae, 0x7e7f, 0x7e88, 0x7e89, 0x7e8c, 0x7e92, 0x7e90, 0x7e93, 0x7e94, 0x7e96, 0x7e8e, 0x7e9b, 0x7e9c, 0x7f38, 0x7f3a, 0x7f45, 0x7f4c, 0x7f4d, 0x7f4e, 0x7f50, 0x7f51, 0x7f55, 0x7f54, 0x7f58, 0x7f5f, 0x7f60, 0x7f68, 0x7f69, 0x7f67, 0x7f78, 0x7f82, 0x7f86, 0x7f83, 0x7f88, 0x7f87, 0x7f8c, 0x7f94, 0x7f9e, 0x7f9d, 0x7f9a, 0x7fa3, 0x7faf, 0x7fb2, 0x7fb9, 0x7fae, 0x7fb6, 0x7fb8, 0x8b71, 0x7fc5, 0x7fc6, 0x7fca, 0x7fd5, 0x7fd4, 0x7fe1, 0x7fe6, 0x7fe9, 0x7ff3, 0x7ff9, 0x98dc, 0x8006, 0x8004, 0x800b, 0x8012, 0x8018, 0x8019, 0x801c, 0x8021, 0x8028, 0x803f, 0x803b, 0x804a, 0x8046, 0x8052, 0x8058, 0x805a, 0x805f, 0x8062, 0x8068, 0x8073, 0x8072, 0x8070, 0x8076, 0x8079, 0x807d, 0x807f, 0x8084, 0x8086, 0x8085, 0x809b, 0x8093, 0x809a, 0x80ad, 0x5190, 0x80ac, 0x80db, 0x80e5, 0x80d9, 0x80dd, 0x80c4, 0x80da, 0x80d6, 0x8109, 0x80ef, 0x80f1, 0x811b, 0x8129, 0x8123, 0x812f, 0x814b }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ 189 ] = { 0x968b, 0x8146, 0x813e, 0x8153, 0x8151, 0x80fc, 0x8171, 0x816e, 0x8165, 0x8166, 0x8174, 0x8183, 0x8188, 0x818a, 0x8180, 0x8182, 0x81a0, 0x8195, 0x81a4, 0x81a3, 0x815f, 0x8193, 0x81a9, 0x81b0, 0x81b5, 0x81be, 0x81b8, 0x81bd, 0x81c0, 0x81c2, 0x81ba, 0x81c9, 0x81cd, 0x81d1, 0x81d9, 0x81d8, 0x81c8, 0x81da, 0x81df, 0x81e0, 0x81e7, 0x81fa, 0x81fb, 0x81fe, 0x8201, 0x8202, 0x8205, 0x8207, 0x820a, 0x820d, 0x8210, 0x8216, 0x8229, 0x822b, 0x8238, 0x8233, 0x8240, 0x8259, 0x8258, 0x825d, 0x825a, 0x825f, 0x8264, 0xfffd, 0x8262, 0x8268, 0x826a, 0x826b, 0x822e, 0x8271, 0x8277, 0x8278, 0x827e, 0x828d, 0x8292, 0x82ab, 0x829f, 0x82bb, 0x82ac, 0x82e1, 0x82e3, 0x82df, 0x82d2, 0x82f4, 0x82f3, 0x82fa, 0x8393, 0x8303, 0x82fb, 0x82f9, 0x82de, 0x8306, 0x82dc, 0x8309, 0x82d9, 0x8335, 0x8334, 0x8316, 0x8332, 0x8331, 0x8340, 0x8339, 0x8350, 0x8345, 0x832f, 0x832b, 0x8317, 0x8318, 0x8385, 0x839a, 0x83aa, 0x839f, 0x83a2, 0x8396, 0x8323, 0x838e, 0x8387, 0x838a, 0x837c, 0x83b5, 0x8373, 0x8375, 0x83a0, 0x8389, 0x83a8, 0x83f4, 0x8413, 0x83eb, 0x83ce, 0x83fd, 0x8403, 0x83d8, 0x840b, 0x83c1, 0x83f7, 0x8407, 0x83e0, 0x83f2, 0x840d, 0x8422, 0x8420, 0x83bd, 0x8438, 0x8506, 0x83fb, 0x846d, 0x842a, 0x843c, 0x855a, 0x8484, 0x8477, 0x846b, 0x84ad, 0x846e, 0x8482, 0x8469, 0x8446, 0x842c, 0x846f, 0x8479, 0x8435, 0x84ca, 0x8462, 0x84b9, 0x84bf, 0x849f, 0x84d9, 0x84cd, 0x84bb, 0x84da, 0x84d0, 0x84c1, 0x84c6, 0x84d6, 0x84a1, 0x8521, 0x84ff, 0x84f4, 0x8517, 0x8518, 0x852c, 0x851f, 0x8515, 0x8514, 0x84fc, 0x8540, 0x8563, 0x8558, 0x8548 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ 189 ] = { 0x8541, 0x8602, 0x854b, 0x8555, 0x8580, 0x85a4, 0x8588, 0x8591, 0x858a, 0x85a8, 0x856d, 0x8594, 0x859b, 0x85ea, 0x8587, 0x859c, 0x8577, 0x857e, 0x8590, 0x85c9, 0x85ba, 0x85cf, 0x85b9, 0x85d0, 0x85d5, 0x85dd, 0x85e5, 0x85dc, 0x85f9, 0x860a, 0x8613, 0x860b, 0x85fe, 0x85fa, 0x8606, 0x8622, 0x861a, 0x8630, 0x863f, 0x864d, 0x4e55, 0x8654, 0x865f, 0x8667, 0x8671, 0x8693, 0x86a3, 0x86a9, 0x86aa, 0x868b, 0x868c, 0x86b6, 0x86af, 0x86c4, 0x86c6, 0x86b0, 0x86c9, 0x8823, 0x86ab, 0x86d4, 0x86de, 0x86e9, 0x86ec, 0xfffd, 0x86df, 0x86db, 0x86ef, 0x8712, 0x8706, 0x8708, 0x8700, 0x8703, 0x86fb, 0x8711, 0x8709, 0x870d, 0x86f9, 0x870a, 0x8734, 0x873f, 0x8737, 0x873b, 0x8725, 0x8729, 0x871a, 0x8760, 0x875f, 0x8778, 0x874c, 0x874e, 0x8774, 0x8757, 0x8768, 0x876e, 0x8759, 0x8753, 0x8763, 0x876a, 0x8805, 0x87a2, 0x879f, 0x8782, 0x87af, 0x87cb, 0x87bd, 0x87c0, 0x87d0, 0x96d6, 0x87ab, 0x87c4, 0x87b3, 0x87c7, 0x87c6, 0x87bb, 0x87ef, 0x87f2, 0x87e0, 0x880f, 0x880d, 0x87fe, 0x87f6, 0x87f7, 0x880e, 0x87d2, 0x8811, 0x8816, 0x8815, 0x8822, 0x8821, 0x8831, 0x8836, 0x8839, 0x8827, 0x883b, 0x8844, 0x8842, 0x8852, 0x8859, 0x885e, 0x8862, 0x886b, 0x8881, 0x887e, 0x889e, 0x8875, 0x887d, 0x88b5, 0x8872, 0x8882, 0x8897, 0x8892, 0x88ae, 0x8899, 0x88a2, 0x888d, 0x88a4, 0x88b0, 0x88bf, 0x88b1, 0x88c3, 0x88c4, 0x88d4, 0x88d8, 0x88d9, 0x88dd, 0x88f9, 0x8902, 0x88fc, 0x88f4, 0x88e8, 0x88f2, 0x8904, 0x890c, 0x890a, 0x8913, 0x8943, 0x891e, 0x8925, 0x892a, 0x892b, 0x8941, 0x8944, 0x893b, 0x8936, 0x8938, 0x894c, 0x891d, 0x8960, 0x895e }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ 189 ] = { 0x8966, 0x8964, 0x896d, 0x896a, 0x896f, 0x8974, 0x8977, 0x897e, 0x8983, 0x8988, 0x898a, 0x8993, 0x8998, 0x89a1, 0x89a9, 0x89a6, 0x89ac, 0x89af, 0x89b2, 0x89ba, 0x89bd, 0x89bf, 0x89c0, 0x89da, 0x89dc, 0x89dd, 0x89e7, 0x89f4, 0x89f8, 0x8a03, 0x8a16, 0x8a10, 0x8a0c, 0x8a1b, 0x8a1d, 0x8a25, 0x8a36, 0x8a41, 0x8a5b, 0x8a52, 0x8a46, 0x8a48, 0x8a7c, 0x8a6d, 0x8a6c, 0x8a62, 0x8a85, 0x8a82, 0x8a84, 0x8aa8, 0x8aa1, 0x8a91, 0x8aa5, 0x8aa6, 0x8a9a, 0x8aa3, 0x8ac4, 0x8acd, 0x8ac2, 0x8ada, 0x8aeb, 0x8af3, 0x8ae7, 0xfffd, 0x8ae4, 0x8af1, 0x8b14, 0x8ae0, 0x8ae2, 0x8af7, 0x8ade, 0x8adb, 0x8b0c, 0x8b07, 0x8b1a, 0x8ae1, 0x8b16, 0x8b10, 0x8b17, 0x8b20, 0x8b33, 0x97ab, 0x8b26, 0x8b2b, 0x8b3e, 0x8b28, 0x8b41, 0x8b4c, 0x8b4f, 0x8b4e, 0x8b49, 0x8b56, 0x8b5b, 0x8b5a, 0x8b6b, 0x8b5f, 0x8b6c, 0x8b6f, 0x8b74, 0x8b7d, 0x8b80, 0x8b8c, 0x8b8e, 0x8b92, 0x8b93, 0x8b96, 0x8b99, 0x8b9a, 0x8c3a, 0x8c41, 0x8c3f, 0x8c48, 0x8c4c, 0x8c4e, 0x8c50, 0x8c55, 0x8c62, 0x8c6c, 0x8c78, 0x8c7a, 0x8c82, 0x8c89, 0x8c85, 0x8c8a, 0x8c8d, 0x8c8e, 0x8c94, 0x8c7c, 0x8c98, 0x621d, 0x8cad, 0x8caa, 0x8cbd, 0x8cb2, 0x8cb3, 0x8cae, 0x8cb6, 0x8cc8, 0x8cc1, 0x8ce4, 0x8ce3, 0x8cda, 0x8cfd, 0x8cfa, 0x8cfb, 0x8d04, 0x8d05, 0x8d0a, 0x8d07, 0x8d0f, 0x8d0d, 0x8d10, 0x9f4e, 0x8d13, 0x8ccd, 0x8d14, 0x8d16, 0x8d67, 0x8d6d, 0x8d71, 0x8d73, 0x8d81, 0x8d99, 0x8dc2, 0x8dbe, 0x8dba, 0x8dcf, 0x8dda, 0x8dd6, 0x8dcc, 0x8ddb, 0x8dcb, 0x8dea, 0x8deb, 0x8ddf, 0x8de3, 0x8dfc, 0x8e08, 0x8e09, 0x8dff, 0x8e1d, 0x8e1e, 0x8e10, 0x8e1f, 0x8e42, 0x8e35, 0x8e30, 0x8e34, 0x8e4a }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ 189 ] = { 0x8e47, 0x8e49, 0x8e4c, 0x8e50, 0x8e48, 0x8e59, 0x8e64, 0x8e60, 0x8e2a, 0x8e63, 0x8e55, 0x8e76, 0x8e72, 0x8e7c, 0x8e81, 0x8e87, 0x8e85, 0x8e84, 0x8e8b, 0x8e8a, 0x8e93, 0x8e91, 0x8e94, 0x8e99, 0x8eaa, 0x8ea1, 0x8eac, 0x8eb0, 0x8ec6, 0x8eb1, 0x8ebe, 0x8ec5, 0x8ec8, 0x8ecb, 0x8edb, 0x8ee3, 0x8efc, 0x8efb, 0x8eeb, 0x8efe, 0x8f0a, 0x8f05, 0x8f15, 0x8f12, 0x8f19, 0x8f13, 0x8f1c, 0x8f1f, 0x8f1b, 0x8f0c, 0x8f26, 0x8f33, 0x8f3b, 0x8f39, 0x8f45, 0x8f42, 0x8f3e, 0x8f4c, 0x8f49, 0x8f46, 0x8f4e, 0x8f57, 0x8f5c, 0xfffd, 0x8f62, 0x8f63, 0x8f64, 0x8f9c, 0x8f9f, 0x8fa3, 0x8fad, 0x8faf, 0x8fb7, 0x8fda, 0x8fe5, 0x8fe2, 0x8fea, 0x8fef, 0x9087, 0x8ff4, 0x9005, 0x8ff9, 0x8ffa, 0x9011, 0x9015, 0x9021, 0x900d, 0x901e, 0x9016, 0x900b, 0x9027, 0x9036, 0x9035, 0x9039, 0x8ff8, 0x904f, 0x9050, 0x9051, 0x9052, 0x900e, 0x9049, 0x903e, 0x9056, 0x9058, 0x905e, 0x9068, 0x906f, 0x9076, 0x96a8, 0x9072, 0x9082, 0x907d, 0x9081, 0x9080, 0x908a, 0x9089, 0x908f, 0x90a8, 0x90af, 0x90b1, 0x90b5, 0x90e2, 0x90e4, 0x6248, 0x90db, 0x9102, 0x9112, 0x9119, 0x9132, 0x9130, 0x914a, 0x9156, 0x9158, 0x9163, 0x9165, 0x9169, 0x9173, 0x9172, 0x918b, 0x9189, 0x9182, 0x91a2, 0x91ab, 0x91af, 0x91aa, 0x91b5, 0x91b4, 0x91ba, 0x91c0, 0x91c1, 0x91c9, 0x91cb, 0x91d0, 0x91d6, 0x91df, 0x91e1, 0x91db, 0x91fc, 0x91f5, 0x91f6, 0x921e, 0x91ff, 0x9214, 0x922c, 0x9215, 0x9211, 0x925e, 0x9257, 0x9245, 0x9249, 0x9264, 0x9248, 0x9295, 0x923f, 0x924b, 0x9250, 0x929c, 0x9296, 0x9293, 0x929b, 0x925a, 0x92cf, 0x92b9, 0x92b7, 0x92e9, 0x930f, 0x92fa, 0x9344, 0x932e }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ 189 ] = { 0x9319, 0x9322, 0x931a, 0x9323, 0x933a, 0x9335, 0x933b, 0x935c, 0x9360, 0x937c, 0x936e, 0x9356, 0x93b0, 0x93ac, 0x93ad, 0x9394, 0x93b9, 0x93d6, 0x93d7, 0x93e8, 0x93e5, 0x93d8, 0x93c3, 0x93dd, 0x93d0, 0x93c8, 0x93e4, 0x941a, 0x9414, 0x9413, 0x9403, 0x9407, 0x9410, 0x9436, 0x942b, 0x9435, 0x9421, 0x943a, 0x9441, 0x9452, 0x9444, 0x945b, 0x9460, 0x9462, 0x945e, 0x946a, 0x9229, 0x9470, 0x9475, 0x9477, 0x947d, 0x945a, 0x947c, 0x947e, 0x9481, 0x947f, 0x9582, 0x9587, 0x958a, 0x9594, 0x9596, 0x9598, 0x9599, 0xfffd, 0x95a0, 0x95a8, 0x95a7, 0x95ad, 0x95bc, 0x95bb, 0x95b9, 0x95be, 0x95ca, 0x6ff6, 0x95c3, 0x95cd, 0x95cc, 0x95d5, 0x95d4, 0x95d6, 0x95dc, 0x95e1, 0x95e5, 0x95e2, 0x9621, 0x9628, 0x962e, 0x962f, 0x9642, 0x964c, 0x964f, 0x964b, 0x9677, 0x965c, 0x965e, 0x965d, 0x965f, 0x9666, 0x9672, 0x966c, 0x968d, 0x9698, 0x9695, 0x9697, 0x96aa, 0x96a7, 0x96b1, 0x96b2, 0x96b0, 0x96b4, 0x96b6, 0x96b8, 0x96b9, 0x96ce, 0x96cb, 0x96c9, 0x96cd, 0x894d, 0x96dc, 0x970d, 0x96d5, 0x96f9, 0x9704, 0x9706, 0x9708, 0x9713, 0x970e, 0x9711, 0x970f, 0x9716, 0x9719, 0x9724, 0x972a, 0x9730, 0x9739, 0x973d, 0x973e, 0x9744, 0x9746, 0x9748, 0x9742, 0x9749, 0x975c, 0x9760, 0x9764, 0x9766, 0x9768, 0x52d2, 0x976b, 0x9771, 0x9779, 0x9785, 0x977c, 0x9781, 0x977a, 0x9786, 0x978b, 0x978f, 0x9790, 0x979c, 0x97a8, 0x97a6, 0x97a3, 0x97b3, 0x97b4, 0x97c3, 0x97c6, 0x97c8, 0x97cb, 0x97dc, 0x97ed, 0x9f4f, 0x97f2, 0x7adf, 0x97f6, 0x97f5, 0x980f, 0x980c, 0x9838, 0x9824, 0x9821, 0x9837, 0x983d, 0x9846, 0x984f, 0x984b, 0x986b, 0x986f, 0x9870 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ 189 ] = { 0x9871, 0x9874, 0x9873, 0x98aa, 0x98af, 0x98b1, 0x98b6, 0x98c4, 0x98c3, 0x98c6, 0x98e9, 0x98eb, 0x9903, 0x9909, 0x9912, 0x9914, 0x9918, 0x9921, 0x991d, 0x991e, 0x9924, 0x9920, 0x992c, 0x992e, 0x993d, 0x993e, 0x9942, 0x9949, 0x9945, 0x9950, 0x994b, 0x9951, 0x9952, 0x994c, 0x9955, 0x9997, 0x9998, 0x99a5, 0x99ad, 0x99ae, 0x99bc, 0x99df, 0x99db, 0x99dd, 0x99d8, 0x99d1, 0x99ed, 0x99ee, 0x99f1, 0x99f2, 0x99fb, 0x99f8, 0x9a01, 0x9a0f, 0x9a05, 0x99e2, 0x9a19, 0x9a2b, 0x9a37, 0x9a45, 0x9a42, 0x9a40, 0x9a43, 0xfffd, 0x9a3e, 0x9a55, 0x9a4d, 0x9a5b, 0x9a57, 0x9a5f, 0x9a62, 0x9a65, 0x9a64, 0x9a69, 0x9a6b, 0x9a6a, 0x9aad, 0x9ab0, 0x9abc, 0x9ac0, 0x9acf, 0x9ad1, 0x9ad3, 0x9ad4, 0x9ade, 0x9adf, 0x9ae2, 0x9ae3, 0x9ae6, 0x9aef, 0x9aeb, 0x9aee, 0x9af4, 0x9af1, 0x9af7, 0x9afb, 0x9b06, 0x9b18, 0x9b1a, 0x9b1f, 0x9b22, 0x9b23, 0x9b25, 0x9b27, 0x9b28, 0x9b29, 0x9b2a, 0x9b2e, 0x9b2f, 0x9b32, 0x9b44, 0x9b43, 0x9b4f, 0x9b4d, 0x9b4e, 0x9b51, 0x9b58, 0x9b74, 0x9b93, 0x9b83, 0x9b91, 0x9b96, 0x9b97, 0x9b9f, 0x9ba0, 0x9ba8, 0x9bb4, 0x9bc0, 0x9bca, 0x9bb9, 0x9bc6, 0x9bcf, 0x9bd1, 0x9bd2, 0x9be3, 0x9be2, 0x9be4, 0x9bd4, 0x9be1, 0x9c3a, 0x9bf2, 0x9bf1, 0x9bf0, 0x9c15, 0x9c14, 0x9c09, 0x9c13, 0x9c0c, 0x9c06, 0x9c08, 0x9c12, 0x9c0a, 0x9c04, 0x9c2e, 0x9c1b, 0x9c25, 0x9c24, 0x9c21, 0x9c30, 0x9c47, 0x9c32, 0x9c46, 0x9c3e, 0x9c5a, 0x9c60, 0x9c67, 0x9c76, 0x9c78, 0x9ce7, 0x9cec, 0x9cf0, 0x9d09, 0x9d08, 0x9ceb, 0x9d03, 0x9d06, 0x9d2a, 0x9d26, 0x9daf, 0x9d23, 0x9d1f, 0x9d44, 0x9d15, 0x9d12, 0x9d41, 0x9d3f, 0x9d3e, 0x9d46, 0x9d48 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ 101 ] = { 0x9d5d, 0x9d5e, 0x9d64, 0x9d51, 0x9d50, 0x9d59, 0x9d72, 0x9d89, 0x9d87, 0x9dab, 0x9d6f, 0x9d7a, 0x9d9a, 0x9da4, 0x9da9, 0x9db2, 0x9dc4, 0x9dc1, 0x9dbb, 0x9db8, 0x9dba, 0x9dc6, 0x9dcf, 0x9dc2, 0x9dd9, 0x9dd3, 0x9df8, 0x9de6, 0x9ded, 0x9def, 0x9dfd, 0x9e1a, 0x9e1b, 0x9e1e, 0x9e75, 0x9e79, 0x9e7d, 0x9e81, 0x9e88, 0x9e8b, 0x9e8c, 0x9e92, 0x9e95, 0x9e91, 0x9e9d, 0x9ea5, 0x9ea9, 0x9eb8, 0x9eaa, 0x9ead, 0x9761, 0x9ecc, 0x9ece, 0x9ecf, 0x9ed0, 0x9ed4, 0x9edc, 0x9ede, 0x9edd, 0x9ee0, 0x9ee5, 0x9ee8, 0x9eef, 0xfffd, 0x9ef4, 0x9ef6, 0x9ef7, 0x9ef9, 0x9efb, 0x9efc, 0x9efd, 0x9f07, 0x9f08, 0x76b7, 0x9f15, 0x9f21, 0x9f2c, 0x9f3e, 0x9f4a, 0x9f52, 0x9f54, 0x9f63, 0x9f5f, 0x9f60, 0x9f61, 0x9f66, 0x9f67, 0x9f6c, 0x9f6a, 0x9f77, 0x9f72, 0x9f76, 0x9f95, 0x9f9c, 0x9fa0, 0x582f, 0x69c7, 0x9059, 0x7464, 0x51dc, 0x7199 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ 189 ] = { 0x7e8a, 0x891c, 0x9348, 0x9288, 0x84dc, 0x4fc9, 0x70bb, 0x6631, 0x68c8, 0x92f9, 0x66fb, 0x5f45, 0x4e28, 0x4ee1, 0x4efc, 0x4f00, 0x4f03, 0x4f39, 0x4f56, 0x4f92, 0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, 0x5040, 0x5022, 0x4fff, 0x501e, 0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, 0x529c, 0x52a6, 0x52c0, 0x52db, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53b2, 0x53dd, 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff, 0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0xfffd, 0xfa10, 0x589e, 0x58b2, 0x590b, 0x5953, 0x595b, 0x595d, 0x5963, 0x59a4, 0x59ba, 0x5b56, 0x5bc0, 0x752f, 0x5bd8, 0x5bec, 0x5c1e, 0x5ca6, 0x5cba, 0x5cf5, 0x5d27, 0x5d53, 0xfa11, 0x5d42, 0x5d6d, 0x5db8, 0x5db9, 0x5dd0, 0x5f21, 0x5f34, 0x5f67, 0x5fb7, 0x5fde, 0x605d, 0x6085, 0x608a, 0x60de, 0x60d5, 0x6120, 0x60f2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, 0x62a6, 0x63f5, 0x6460, 0x649d, 0x64ce, 0x654e, 0x6600, 0x6615, 0x663b, 0x6609, 0x662e, 0x661e, 0x6624, 0x6665, 0x6657, 0x6659, 0xfa12, 0x6673, 0x6699, 0x66a0, 0x66b2, 0x66bf, 0x66fa, 0x670e, 0xf929, 0x6766, 0x67bb, 0x6852, 0x67c0, 0x6801, 0x6844, 0x68cf, 0xfa13, 0x6968, 0xfa14, 0x6998, 0x69e2, 0x6a30, 0x6a6b, 0x6a46, 0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86, 0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f, 0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, 0x6e5c, 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, 0x7007, 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146, 0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ 189 ] = { 0x72be, 0x7324, 0xfa16, 0x7377, 0x73bd, 0x73c9, 0x73d6, 0x73e3, 0x73d2, 0x7407, 0x73f5, 0x7426, 0x742a, 0x7429, 0x742e, 0x7462, 0x7489, 0x749f, 0x7501, 0x756f, 0x7682, 0x769c, 0x769e, 0x769b, 0x76a6, 0xfa17, 0x7746, 0x52af, 0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, 0x7ae7, 0xfa1c, 0x7aeb, 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, 0x7da0, 0x7dd6, 0x7e52, 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362, 0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0xfffd, 0x856b, 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0x88f5, 0x8a12, 0x8a37, 0x8a79, 0x8aa7, 0x8abe, 0x8adf, 0xfa22, 0x8af6, 0x8b53, 0x8b7f, 0x8cf0, 0x8cf4, 0x8d12, 0x8d76, 0xfa23, 0x8ecf, 0xfa24, 0xfa25, 0x9067, 0x90de, 0xfa26, 0x9115, 0x9127, 0x91da, 0x91d7, 0x91de, 0x91ed, 0x91ee, 0x91e4, 0x91e5, 0x9206, 0x9210, 0x920a, 0x923a, 0x9240, 0x923c, 0x924e, 0x9259, 0x9251, 0x9239, 0x9267, 0x92a7, 0x9277, 0x9278, 0x92e7, 0x92d7, 0x92d9, 0x92d0, 0xfa27, 0x92d5, 0x92e0, 0x92d3, 0x9325, 0x9321, 0x92fb, 0xfa28, 0x931e, 0x92ff, 0x931d, 0x9302, 0x9370, 0x9357, 0x93a4, 0x93c6, 0x93de, 0x93f8, 0x9431, 0x9445, 0x9448, 0x9592, 0xf9dc, 0xfa29, 0x969d, 0x96af, 0x9733, 0x973b, 0x9743, 0x974d, 0x974f, 0x9751, 0x9755, 0x9857, 0x9865, 0xfa2a, 0xfa2b, 0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9, 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, 0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1, 0xfffd, 0xfffd, 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0xffe2, 0xffe4, 0xff07, 0xff02 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ 189 ] = { 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177, 0x2178, 0x2179, 0x2160, 0x2161, 0x2162, 0x2163, 0x2164, 0x2165, 0x2166, 0x2167, 0x2168, 0x2169, 0xffe2, 0xffe4, 0xff07, 0xff02, 0x3231, 0x2116, 0x2121, 0x2235, 0x7e8a, 0x891c, 0x9348, 0x9288, 0x84dc, 0x4fc9, 0x70bb, 0x6631, 0x68c8, 0x92f9, 0x66fb, 0x5f45, 0x4e28, 0x4ee1, 0x4efc, 0x4f00, 0x4f03, 0x4f39, 0x4f56, 0x4f92, 0x4f8a, 0x4f9a, 0x4f94, 0x4fcd, 0x5040, 0x5022, 0x4fff, 0x501e, 0x5046, 0x5070, 0x5042, 0x5094, 0x50f4, 0x50d8, 0x514a, 0xfffd, 0x5164, 0x519d, 0x51be, 0x51ec, 0x5215, 0x529c, 0x52a6, 0x52c0, 0x52db, 0x5300, 0x5307, 0x5324, 0x5372, 0x5393, 0x53b2, 0x53dd, 0xfa0e, 0x549c, 0x548a, 0x54a9, 0x54ff, 0x5586, 0x5759, 0x5765, 0x57ac, 0x57c8, 0x57c7, 0xfa0f, 0xfa10, 0x589e, 0x58b2, 0x590b, 0x5953, 0x595b, 0x595d, 0x5963, 0x59a4, 0x59ba, 0x5b56, 0x5bc0, 0x752f, 0x5bd8, 0x5bec, 0x5c1e, 0x5ca6, 0x5cba, 0x5cf5, 0x5d27, 0x5d53, 0xfa11, 0x5d42, 0x5d6d, 0x5db8, 0x5db9, 0x5dd0, 0x5f21, 0x5f34, 0x5f67, 0x5fb7, 0x5fde, 0x605d, 0x6085, 0x608a, 0x60de, 0x60d5, 0x6120, 0x60f2, 0x6111, 0x6137, 0x6130, 0x6198, 0x6213, 0x62a6, 0x63f5, 0x6460, 0x649d, 0x64ce, 0x654e, 0x6600, 0x6615, 0x663b, 0x6609, 0x662e, 0x661e, 0x6624, 0x6665, 0x6657, 0x6659, 0xfa12, 0x6673, 0x6699, 0x66a0, 0x66b2, 0x66bf, 0x66fa, 0x670e, 0xf929, 0x6766, 0x67bb, 0x6852, 0x67c0, 0x6801, 0x6844, 0x68cf, 0xfa13, 0x6968, 0xfa14, 0x6998, 0x69e2, 0x6a30, 0x6a6b, 0x6a46, 0x6a73, 0x6a7e, 0x6ae2, 0x6ae4, 0x6bd6, 0x6c3f, 0x6c5c, 0x6c86, 0x6c6f, 0x6cda, 0x6d04, 0x6d87, 0x6d6f }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ 189 ] = { 0x6d96, 0x6dac, 0x6dcf, 0x6df8, 0x6df2, 0x6dfc, 0x6e39, 0x6e5c, 0x6e27, 0x6e3c, 0x6ebf, 0x6f88, 0x6fb5, 0x6ff5, 0x7005, 0x7007, 0x7028, 0x7085, 0x70ab, 0x710f, 0x7104, 0x715c, 0x7146, 0x7147, 0xfa15, 0x71c1, 0x71fe, 0x72b1, 0x72be, 0x7324, 0xfa16, 0x7377, 0x73bd, 0x73c9, 0x73d6, 0x73e3, 0x73d2, 0x7407, 0x73f5, 0x7426, 0x742a, 0x7429, 0x742e, 0x7462, 0x7489, 0x749f, 0x7501, 0x756f, 0x7682, 0x769c, 0x769e, 0x769b, 0x76a6, 0xfa17, 0x7746, 0x52af, 0x7821, 0x784e, 0x7864, 0x787a, 0x7930, 0xfa18, 0xfa19, 0xfffd, 0xfa1a, 0x7994, 0xfa1b, 0x799b, 0x7ad1, 0x7ae7, 0xfa1c, 0x7aeb, 0x7b9e, 0xfa1d, 0x7d48, 0x7d5c, 0x7db7, 0x7da0, 0x7dd6, 0x7e52, 0x7f47, 0x7fa1, 0xfa1e, 0x8301, 0x8362, 0x837f, 0x83c7, 0x83f6, 0x8448, 0x84b4, 0x8553, 0x8559, 0x856b, 0xfa1f, 0x85b0, 0xfa20, 0xfa21, 0x8807, 0x88f5, 0x8a12, 0x8a37, 0x8a79, 0x8aa7, 0x8abe, 0x8adf, 0xfa22, 0x8af6, 0x8b53, 0x8b7f, 0x8cf0, 0x8cf4, 0x8d12, 0x8d76, 0xfa23, 0x8ecf, 0xfa24, 0xfa25, 0x9067, 0x90de, 0xfa26, 0x9115, 0x9127, 0x91da, 0x91d7, 0x91de, 0x91ed, 0x91ee, 0x91e4, 0x91e5, 0x9206, 0x9210, 0x920a, 0x923a, 0x9240, 0x923c, 0x924e, 0x9259, 0x9251, 0x9239, 0x9267, 0x92a7, 0x9277, 0x9278, 0x92e7, 0x92d7, 0x92d9, 0x92d0, 0xfa27, 0x92d5, 0x92e0, 0x92d3, 0x9325, 0x9321, 0x92fb, 0xfa28, 0x931e, 0x92ff, 0x931d, 0x9302, 0x9370, 0x9357, 0x93a4, 0x93c6, 0x93de, 0x93f8, 0x9431, 0x9445, 0x9448, 0x9592, 0xf9dc, 0xfa29, 0x969d, 0x96af, 0x9733, 0x973b, 0x9743, 0x974d, 0x974f, 0x9751, 0x9755, 0x9857, 0x9865, 0xfa2a, 0xfa2b, 0x9927, 0xfa2c, 0x999e, 0x9a4e, 0x9ad9 }; const uint16_t libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ 12 ] = { 0x9adc, 0x9b75, 0x9b72, 0x9b8f, 0x9bb1, 0x9bbb, 0x9c00, 0x9d70, 0x9d6b, 0xfa2d, 0x9e19, 0x9ed1 }; /* Unicode to ASCII character lookup table for Windows 932 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ 128 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9881, 0x4e81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b81, 0x7d81, 0x001a, 0x001a, 0x4c81, 0x001a, 0xf781, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0380[ 256 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f83, 0xa083, 0xa183, 0xa283, 0xa383, 0xa483, 0xa583, 0xa683, 0xa783, 0xa883, 0xa983, 0xaa83, 0xab83, 0xac83, 0xad83, 0xae83, 0xaf83, 0x001a, 0xb083, 0xb183, 0xb283, 0xb383, 0xb483, 0xb583, 0xb683, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf83, 0xc083, 0xc183, 0xc283, 0xc383, 0xc483, 0xc583, 0xc683, 0xc783, 0xc883, 0xc983, 0xca83, 0xcb83, 0xcc83, 0xcd83, 0xce83, 0xcf83, 0x001a, 0xd083, 0xd183, 0xd283, 0xd383, 0xd483, 0xd583, 0xd683, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4684, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4084, 0x4184, 0x4284, 0x4384, 0x4484, 0x4584, 0x4784, 0x4884, 0x4984, 0x4a84, 0x4b84, 0x4c84, 0x4d84, 0x4e84, 0x4f84, 0x5084, 0x5184, 0x5284, 0x5384, 0x5484, 0x5584, 0x5684, 0x5784, 0x5884, 0x5984, 0x5a84, 0x5b84, 0x5c84, 0x5d84, 0x5e84, 0x5f84, 0x6084, 0x7084, 0x7184, 0x7284, 0x7384, 0x7484, 0x7584, 0x7784, 0x7884, 0x7984, 0x7a84, 0x7b84, 0x7c84, 0x7d84, 0x7e84, 0x8084, 0x8184, 0x8284, 0x8384, 0x8484, 0x8584, 0x8684, 0x8784, 0x8884, 0x8984, 0x8a84, 0x8b84, 0x8c84, 0x8d84, 0x8e84, 0x8f84, 0x9084, 0x9184, 0x001a, 0x7684, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2000[ 832 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d81, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c81, 0x001a, 0x001a, 0x6581, 0x6681, 0x001a, 0x001a, 0x6781, 0x6881, 0x001a, 0x001a, 0xf581, 0xf681, 0x001a, 0x001a, 0x001a, 0x6481, 0x6381, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf181, 0x001a, 0x8c81, 0x8d81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa681, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8287, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8487, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5487, 0x5587, 0x5687, 0x5787, 0x5887, 0x5987, 0x5a87, 0x5b87, 0x5c87, 0x5d87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xefee, 0xf0ee, 0xf1ee, 0xf2ee, 0xf3ee, 0xf4ee, 0xf5ee, 0xf6ee, 0xf7ee, 0xf8ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa981, 0xaa81, 0xa881, 0xab81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb81, 0x001a, 0xcc81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd81, 0x001a, 0xdd81, 0xce81, 0x001a, 0x001a, 0x001a, 0xde81, 0xb881, 0x001a, 0x001a, 0xb981, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9487, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe381, 0x001a, 0x001a, 0xe581, 0x8781, 0x9887, 0xda81, 0x001a, 0x001a, 0x001a, 0x001a, 0x6181, 0x001a, 0xc881, 0xc981, 0xbf81, 0xbe81, 0xe781, 0xe881, 0x001a, 0x9387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8881, 0xe681, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe481, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8281, 0xdf81, 0x001a, 0x001a, 0x001a, 0x001a, 0x8581, 0x8681, 0x001a, 0x001a, 0xe181, 0xe281, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc81, 0xbd81, 0x001a, 0x001a, 0xba81, 0xbb81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9987, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2440[ 576 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4087, 0x4187, 0x4287, 0x4387, 0x4487, 0x4587, 0x4687, 0x4787, 0x4887, 0x4987, 0x4a87, 0x4b87, 0x4c87, 0x4d87, 0x4e87, 0x4f87, 0x5087, 0x5187, 0x5287, 0x5387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f84, 0xaa84, 0xa084, 0xab84, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa184, 0x001a, 0x001a, 0xac84, 0xa284, 0x001a, 0x001a, 0xad84, 0xa484, 0x001a, 0x001a, 0xaf84, 0xa384, 0x001a, 0x001a, 0xae84, 0xa584, 0xba84, 0x001a, 0x001a, 0xb584, 0x001a, 0x001a, 0xb084, 0xa784, 0xbc84, 0x001a, 0x001a, 0xb784, 0x001a, 0x001a, 0xb284, 0xa684, 0x001a, 0x001a, 0xb684, 0xbb84, 0x001a, 0x001a, 0xb184, 0xa884, 0x001a, 0x001a, 0xb884, 0xbd84, 0x001a, 0x001a, 0xb384, 0xa984, 0x001a, 0x001a, 0xb984, 0x001a, 0x001a, 0xbe84, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb484, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa181, 0xa081, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa381, 0xa281, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa581, 0xa481, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f81, 0x9e81, 0x001a, 0x001a, 0x001a, 0x9b81, 0x001a, 0x001a, 0x9d81, 0x9c81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a81, 0x9981, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a81, 0x001a, 0x8981, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf481, 0x001a, 0x001a, 0xf381, 0x001a, 0xf281, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3000[ 256 ] = { 0x4081, 0x4181, 0x4281, 0x5681, 0x001a, 0x5881, 0x5981, 0x5a81, 0x7181, 0x7281, 0x7381, 0x7481, 0x7581, 0x7681, 0x7781, 0x7881, 0x7981, 0x7a81, 0xa781, 0xac81, 0x6b81, 0x6c81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8087, 0x001a, 0x8187, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f82, 0xa082, 0xa182, 0xa282, 0xa382, 0xa482, 0xa582, 0xa682, 0xa782, 0xa882, 0xa982, 0xaa82, 0xab82, 0xac82, 0xad82, 0xae82, 0xaf82, 0xb082, 0xb182, 0xb282, 0xb382, 0xb482, 0xb582, 0xb682, 0xb782, 0xb882, 0xb982, 0xba82, 0xbb82, 0xbc82, 0xbd82, 0xbe82, 0xbf82, 0xc082, 0xc182, 0xc282, 0xc382, 0xc482, 0xc582, 0xc682, 0xc782, 0xc882, 0xc982, 0xca82, 0xcb82, 0xcc82, 0xcd82, 0xce82, 0xcf82, 0xd082, 0xd182, 0xd282, 0xd382, 0xd482, 0xd582, 0xd682, 0xd782, 0xd882, 0xd982, 0xda82, 0xdb82, 0xdc82, 0xdd82, 0xde82, 0xdf82, 0xe082, 0xe182, 0xe282, 0xe382, 0xe482, 0xe582, 0xe682, 0xe782, 0xe882, 0xe982, 0xea82, 0xeb82, 0xec82, 0xed82, 0xee82, 0xef82, 0xf082, 0xf182, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4a81, 0x4b81, 0x5481, 0x5581, 0x001a, 0x001a, 0x4083, 0x4183, 0x4283, 0x4383, 0x4483, 0x4583, 0x4683, 0x4783, 0x4883, 0x4983, 0x4a83, 0x4b83, 0x4c83, 0x4d83, 0x4e83, 0x4f83, 0x5083, 0x5183, 0x5283, 0x5383, 0x5483, 0x5583, 0x5683, 0x5783, 0x5883, 0x5983, 0x5a83, 0x5b83, 0x5c83, 0x5d83, 0x5e83, 0x5f83, 0x6083, 0x6183, 0x6283, 0x6383, 0x6483, 0x6583, 0x6683, 0x6783, 0x6883, 0x6983, 0x6a83, 0x6b83, 0x6c83, 0x6d83, 0x6e83, 0x6f83, 0x7083, 0x7183, 0x7283, 0x7383, 0x7483, 0x7583, 0x7683, 0x7783, 0x7883, 0x7983, 0x7a83, 0x7b83, 0x7c83, 0x7d83, 0x7e83, 0x8083, 0x8183, 0x8283, 0x8383, 0x8483, 0x8583, 0x8683, 0x8783, 0x8883, 0x8983, 0x8a83, 0x8b83, 0x8c83, 0x8d83, 0x8e83, 0x8f83, 0x9083, 0x9183, 0x9283, 0x9383, 0x9483, 0x9583, 0x9683, 0x001a, 0x001a, 0x001a, 0x001a, 0x4581, 0x5b81, 0x5281, 0x5381, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3200[ 512 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a87, 0x8b87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8587, 0x8687, 0x8787, 0x8887, 0x8987, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6587, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6987, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6087, 0x001a, 0x001a, 0x001a, 0x6387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6187, 0x6b87, 0x001a, 0x001a, 0x6a87, 0x6487, 0x001a, 0x001a, 0x001a, 0x6c87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6687, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5f87, 0x6d87, 0x001a, 0x001a, 0x6287, 0x001a, 0x001a, 0x001a, 0x6787, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6887, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e87, 0x8f87, 0x8e87, 0x8d87, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7287, 0x7387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f87, 0x7087, 0x7187, 0x001a, 0x001a, 0x7587, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7487, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8387, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0x4e00[ 22288 ] = { 0xea88, 0x9a92, 0x001a, 0xb58e, 0x001a, 0x001a, 0x001a, 0x9c96, 0xe48f, 0x4f8e, 0xe38f, 0xba89, 0x001a, 0x7395, 0x5e97, 0x001a, 0xa098, 0x4e89, 0x001a, 0x001a, 0x8e8a, 0xa198, 0xa290, 0xc099, 0x758b, 0xb895, 0x001a, 0x001a, 0x001a, 0x001a, 0xe58f, 0x001a, 0x001a, 0xbc97, 0x001a, 0x001a, 0x001a, 0x001a, 0xc095, 0x001a, 0x4ced, 0x001a, 0xa298, 0x001a, 0x001a, 0x8692, 0x001a, 0x001a, 0x001a, 0xa398, 0xf88b, 0x001a, 0x001a, 0x001a, 0xa498, 0x001a, 0xdb8a, 0x4f92, 0x001a, 0xe58e, 0xa598, 0x001a, 0x001a, 0xa698, 0x001a, 0x001a, 0xa798, 0x5494, 0x001a, 0x768b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5694, 0x001a, 0xe193, 0xc18c, 0x5296, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68e5, 0xa898, 0xe68f, 0xa998, 0xb389, 0x001a, 0x001a, 0x001a, 0xe38b, 0xee8c, 0xe796, 0x001a, 0x001a, 0xa49b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9097, 0x001a, 0xfb93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa38a, 0x001a, 0x548b, 0x001a, 0xaa98, 0x001a, 0x001a, 0xab98, 0xb997, 0x001a, 0x5c97, 0x8891, 0xad98, 0x968e, 0xf193, 0x001a, 0xb098, 0x001a, 0x001a, 0x5d89, 0xdd8c, 0x001a, 0xdc8c, 0xe488, 0x001a, 0x001a, 0x6a98, 0x6998, 0x001a, 0xb18d, 0x9f88, 0x001a, 0xb198, 0xb298, 0xb398, 0x5396, 0xb498, 0x001a, 0xf08c, 0xe588, 0x9296, 0x001a, 0x9c8b, 0x001a, 0x001a, 0x9d8b, 0x9e8b, 0xe092, 0xba97, 0x001a, 0xb598, 0x001a, 0x001a, 0xb698, 0x001a, 0x001a, 0xb798, 0x001a, 0x001a, 0x001a, 0x6c90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x598f, 0x6d90, 0xbc98, 0x001a, 0xba98, 0x001a, 0xbb98, 0x778b, 0x001a, 0x001a, 0xa18d, 0xee89, 0x001a, 0xb998, 0xb898, 0xa795, 0x001a, 0x001a, 0x001a, 0x001a, 0x658e, 0x648e, 0xbc91, 0xbd98, 0x7495, 0xe590, 0x001a, 0x001a, 0x001a, 0x5781, 0xbe98, 0xc098, 0x001a, 0x4ded, 0x001a, 0xe391, 0xdf97, 0xc888, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf98, 0xbc89, 0x001a, 0xc28b, 0x001a, 0x8792, 0x001a, 0x001a, 0x001a, 0x8f8c, 0xc198, 0x001a, 0x001a, 0x001a, 0x4394, 0x4eed, 0x001a, 0x001a, 0x001a, 0x4fed, 0xe98a, 0x001a, 0x50ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc298, 0xc988, 0x001a, 0x001a, 0xde8c, 0xea8a, 0x9a95, 0xb094, 0x788b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xef89, 0x001a, 0xe598, 0x6093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c94, 0xc498, 0x001a, 0x001a, 0x001a, 0xba94, 0x001a, 0xe097, 0x001a, 0x4c90, 0x51ed, 0x668e, 0x001a, 0x978e, 0xbe89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf92, 0x001a, 0x001a, 0x4192, 0xc898, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xca88, 0xe192, 0x5a8f, 0xb28d, 0x4397, 0x001a, 0xcc91, 0x001a, 0xbd89, 0x52ed, 0xc798, 0x001a, 0x5d97, 0xc398, 0xc598, 0xec8d, 0xc698, 0x439b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd198, 0xcf98, 0x001a, 0x001a, 0xc089, 0x001a, 0xb995, 0xc998, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd98, 0xf18c, 0x001a, 0x001a, 0x678e, 0x001a, 0x001a, 0x001a, 0xa48a, 0x001a, 0x001a, 0xd298, 0x001a, 0xca98, 0x001a, 0x54ed, 0xe197, 0x001a, 0x988e, 0x001a, 0xcb98, 0x001a, 0xd098, 0x53ed, 0x001a, 0x56ed, 0x001a, 0xd398, 0x001a, 0xcc98, 0x001a, 0x55ed, 0x9f8b, 0x001a, 0xcb88, 0x001a, 0x001a, 0xa08b, 0xbf89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x449b, 0x001a, 0x9996, 0x8e95, 0xf28c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e90, 0xb597, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd695, 0x001a, 0x001a, 0x578c, 0xa391, 0xe289, 0x001a, 0x001a, 0x001a, 0x001a, 0x45ed, 0x728f, 0x001a, 0x001a, 0x57ed, 0xd798, 0x001a, 0xdc98, 0xda98, 0x001a, 0x001a, 0xd598, 0x001a, 0x001a, 0xad91, 0xd898, 0x001a, 0xdb98, 0xd998, 0x001a, 0xdb95, 0x001a, 0xd698, 0x001a, 0x4d90, 0x001a, 0x9396, 0xdd98, 0xde98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x438f, 0xeb98, 0x001a, 0x001a, 0x001a, 0x6f94, 0x001a, 0x5595, 0xe698, 0x001a, 0xee95, 0x001a, 0xb489, 0x001a, 0x001a, 0x001a, 0xea98, 0x5aed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe498, 0xed98, 0x001a, 0x001a, 0x7191, 0x001a, 0xc28c, 0x001a, 0x7b94, 0x001a, 0xc5e0, 0x001a, 0xec98, 0x7c93, 0x001a, 0xe198, 0x001a, 0xf48c, 0x001a, 0x001a, 0xf38c, 0xdf98, 0x001a, 0x001a, 0x001a, 0x5bed, 0xd88e, 0x001a, 0xe798, 0x59ed, 0xed95, 0x6c92, 0xe398, 0x918c, 0x001a, 0xe098, 0xe898, 0xe298, 0xcf97, 0xe998, 0x6098, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe48b, 0x001a, 0x001a, 0x908c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58ed, 0x001a, 0x5eed, 0xee98, 0x001a, 0x001a, 0x5ced, 0xef98, 0xf398, 0xcc88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce95, 0xf298, 0x001a, 0x001a, 0x001a, 0x001a, 0xf198, 0xf598, 0x001a, 0x001a, 0x001a, 0xf498, 0x001a, 0xe292, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x928c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf698, 0x001a, 0x001a, 0x001a, 0x5ded, 0x001a, 0xc38e, 0x001a, 0xa491, 0xe392, 0xf48b, 0x001a, 0xf798, 0x001a, 0x001a, 0x001a, 0x001a, 0x558b, 0x001a, 0x001a, 0xf898, 0x001a, 0x001a, 0x001a, 0x001a, 0xfa98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5496, 0x001a, 0x001a, 0x001a, 0x868c, 0x001a, 0x001a, 0x5fed, 0x001a, 0x001a, 0x001a, 0x508e, 0xf594, 0xf998, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc38d, 0x6297, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc98, 0x4299, 0xfb98, 0xc28d, 0x001a, 0x9d8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x588c, 0x001a, 0x001a, 0x001a, 0x4399, 0x001a, 0x001a, 0xcd8b, 0x001a, 0x001a, 0x001a, 0x4099, 0x4199, 0x001a, 0x001a, 0xad93, 0x001a, 0x9c91, 0x001a, 0xa18b, 0x001a, 0x001a, 0x001a, 0x6c96, 0x4499, 0x001a, 0x61ed, 0x001a, 0xbb97, 0x001a, 0x001a, 0x001a, 0x4599, 0x001a, 0x001a, 0x001a, 0x001a, 0x4899, 0x001a, 0x4699, 0x001a, 0x6d91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4799, 0x4999, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60ed, 0x4b99, 0x001a, 0x001a, 0x001a, 0x4a99, 0x001a, 0xc695, 0x001a, 0x001a, 0x001a, 0x001a, 0x568b, 0x4d99, 0x4e99, 0x001a, 0xad89, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf28e, 0x001a, 0x5199, 0x5099, 0x4f99, 0x001a, 0xd498, 0x001a, 0x5299, 0x001a, 0x001a, 0x001a, 0x001a, 0x9e8f, 0x001a, 0x5399, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4497, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd796, 0x001a, 0x001a, 0x001a, 0x001a, 0x5599, 0x001a, 0x001a, 0x5499, 0x5799, 0x5699, 0x001a, 0x001a, 0x5899, 0x5999, 0xf288, 0x001a, 0xb38c, 0x5a8c, 0x5b8f, 0x9b92, 0xa28b, 0xe690, 0xf58c, 0x62ed, 0x8e8d, 0x5b99, 0xc696, 0x6593, 0x001a, 0x998e, 0x001a, 0x5a99, 0x001a, 0x5c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d93, 0x001a, 0x958a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d99, 0x001a, 0x63ed, 0xfc93, 0x001a, 0x001a, 0x5391, 0x5f99, 0x6099, 0xaa94, 0xf68c, 0x5a98, 0x6199, 0x001a, 0x001a, 0xa48b, 0x001a, 0x001a, 0x001a, 0xba95, 0xb491, 0xef8b, 0x5493, 0x001a, 0x001a, 0x001a, 0x938c, 0x001a, 0x001a, 0x001a, 0x6299, 0x001a, 0x6399, 0x001a, 0x001a, 0xe093, 0x7e89, 0x001a, 0x001a, 0x6699, 0xfb8d, 0x001a, 0x6599, 0xc48d, 0x001a, 0x6799, 0xece3, 0x6899, 0x6096, 0x6999, 0x001a, 0x6a99, 0x6b99, 0xe78f, 0x001a, 0xca8e, 0x001a, 0x001a, 0x001a, 0x64ed, 0x001a, 0x001a, 0xa58a, 0x001a, 0x6e99, 0x001a, 0x6c99, 0xbb96, 0x6d99, 0x001a, 0x7995, 0x6f99, 0x7099, 0x7199, 0x7e93, 0x001a, 0x001a, 0x001a, 0x7599, 0x7399, 0x7499, 0x7299, 0xe18d, 0x7699, 0xe896, 0xe297, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7799, 0x65ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa690, 0x7899, 0x798f, 0x001a, 0x001a, 0x7999, 0x001a, 0x9c92, 0xbd97, 0x8093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc399, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a99, 0xa3ea, 0xc38b, 0x001a, 0x001a, 0x7b99, 0x7d96, 0x001a, 0x001a, 0x001a, 0x001a, 0x888f, 0xfa91, 0x001a, 0x7d99, 0xe293, 0x001a, 0x66ed, 0x7e99, 0x001a, 0x001a, 0x8099, 0x4d8a, 0x001a, 0x001a, 0x001a, 0x8199, 0xa58b, 0x001a, 0xca93, 0x9a89, 0x6f8f, 0x001a, 0x001a, 0x9f94, 0x8299, 0x001a, 0x8193, 0x001a, 0x001a, 0x6e90, 0x8399, 0x001a, 0xaa95, 0xd890, 0xa08a, 0x001a, 0xa78a, 0x8499, 0x001a, 0x001a, 0x8699, 0x001a, 0x001a, 0x598c, 0x001a, 0x001a, 0x8599, 0x67ed, 0x001a, 0xf197, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x898f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb94, 0xca95, 0x001a, 0x8799, 0x001a, 0x9897, 0x8899, 0x001a, 0x001a, 0x001a, 0x8999, 0x001a, 0x9e93, 0x001a, 0x001a, 0x8a99, 0x001a, 0x001a, 0xa790, 0xfc8d, 0x948c, 0x8b99, 0x688e, 0x8f8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe492, 0x8d99, 0x001a, 0x001a, 0xa591, 0x001a, 0x001a, 0xed8d, 0x8e99, 0x8f99, 0x4f91, 0x001a, 0x8c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x9199, 0x001a, 0x5596, 0x001a, 0x001a, 0x001a, 0x001a, 0x848d, 0x001a, 0x001a, 0x9099, 0x001a, 0x001a, 0x001a, 0x001a, 0x958c, 0xdc8d, 0x8d94, 0x001a, 0x001a, 0x001a, 0x9499, 0x9299, 0x001a, 0x001a, 0x001a, 0x001a, 0x9b95, 0xe88f, 0x9b99, 0x848a, 0x9599, 0x9399, 0x6e91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9799, 0x001a, 0x9699, 0x001a, 0x001a, 0x001a, 0x638a, 0x001a, 0x001a, 0x001a, 0x808c, 0x9c99, 0xab97, 0x001a, 0x001a, 0x001a, 0x9899, 0x001a, 0x001a, 0x001a, 0x9d99, 0x9a99, 0x001a, 0x9999, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd97, 0x68ed, 0x001a, 0x001a, 0xf78c, 0xc189, 0x001a, 0x001a, 0xf297, 0x001a, 0x001a, 0x69ed, 0x001a, 0x001a, 0x958f, 0x7793, 0x858d, 0xa099, 0xa199, 0x001a, 0x5bee, 0x001a, 0xe397, 0x001a, 0x001a, 0x4a98, 0xa399, 0x001a, 0x001a, 0x001a, 0xf88c, 0x001a, 0x001a, 0xa299, 0x001a, 0x4e8a, 0x001a, 0x6aed, 0xa499, 0x001a, 0x7596, 0x001a, 0xba92, 0x001a, 0x4597, 0x001a, 0xd795, 0x001a, 0x001a, 0x001a, 0xa599, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e8, 0x001a, 0x001a, 0xae93, 0x001a, 0xa699, 0xa88a, 0xb196, 0x001a, 0x6bed, 0x001a, 0x9f8f, 0xa799, 0xe595, 0xab99, 0x001a, 0xa890, 0xa899, 0xce8b, 0x001a, 0xa999, 0xa98a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d8c, 0xac99, 0x001a, 0xad99, 0x001a, 0x001a, 0xae99, 0xaf99, 0xd98e, 0x001a, 0x001a, 0x001a, 0xf98c, 0xdc96, 0x6ced, 0xe696, 0xf593, 0x001a, 0x001a, 0xef95, 0xb099, 0x6ded, 0xb199, 0x001a, 0x001a, 0x001a, 0x001a, 0xb399, 0x001a, 0xb599, 0xb499, 0x001a, 0x001a, 0x001a, 0x001a, 0xb699, 0xbb89, 0x6b96, 0x001a, 0xfa8d, 0xb799, 0x001a, 0x001a, 0x7891, 0x001a, 0x001a, 0xa08f, 0xa78b, 0x001a, 0xb899, 0x6eed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd994, 0x001a, 0x001a, 0x001a, 0x001a, 0xb999, 0x001a, 0xba99, 0x001a, 0xbb99, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc99, 0x4395, 0xe68b, 0xe388, 0x001a, 0x001a, 0x001a, 0xbd93, 0xbd99, 0x5c8f, 0x001a, 0xe790, 0x001a, 0xbf99, 0xbe99, 0xa18f, 0xdf8c, 0xc199, 0xbc94, 0x001a, 0x001a, 0xc299, 0x001a, 0x001a, 0x001a, 0xda94, 0xb291, 0xec91, 0xa68b, 0x001a, 0x001a, 0xec93, 0x5092, 0x001a, 0x8e94, 0x001a, 0x6d96, 0x001a, 0xc499, 0x001a, 0xe890, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x548c, 0x001a, 0x001a, 0xc599, 0x001a, 0x001a, 0x001a, 0x001a, 0xc699, 0x4b89, 0xf388, 0xeb8a, 0x6fed, 0xa691, 0x708b, 0x9197, 0x001a, 0xc999, 0xb589, 0x001a, 0x001a, 0xc899, 0x001a, 0x001a, 0x001a, 0xa88b, 0x001a, 0x001a, 0xca99, 0x001a, 0xef96, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70ed, 0x001a, 0x001a, 0xcb99, 0x001a, 0xd097, 0x001a, 0xfa8c, 0x001a, 0x001a, 0x001a, 0x001a, 0xb48c, 0xcc99, 0x001a, 0x001a, 0x001a, 0x001a, 0xce99, 0xcd99, 0x001a, 0x7e90, 0x5889, 0x001a, 0x001a, 0x001a, 0x7d89, 0xcf99, 0x001a, 0xd099, 0x001a, 0x71ed, 0xb58c, 0x001a, 0x001a, 0xd199, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x518e, 0xd299, 0x001a, 0x001a, 0x001a, 0x001a, 0x9496, 0xb38d, 0x798b, 0x4697, 0x6f91, 0xbd94, 0xfb8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x668f, 0x001a, 0xe68e, 0xf38e, 0x001a, 0x968f, 0x001a, 0xbe94, 0x001a, 0x72ed, 0x001a, 0xd599, 0x001a, 0x6289, 0x7091, 0xfb8c, 0xc38c, 0xe58b, 0x001a, 0x001a, 0xd999, 0x4092, 0xfc91, 0xa98b, 0xa28f, 0xda99, 0xd899, 0xc289, 0xe491, 0xb68e, 0x6a8e, 0x4589, 0x001a, 0x001a, 0x908a, 0x868d, 0x698e, 0x001a, 0xdb99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc99, 0x001a, 0x688b, 0x658a, 0x001a, 0x001a, 0x001a, 0x878d, 0x678b, 0xdd92, 0x4489, 0xaf93, 0xbc96, 0x408d, 0x9997, 0x6693, 0xfc8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e8c, 0x001a, 0xe599, 0x001a, 0xe18b, 0x6996, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb94, 0x001a, 0x001a, 0xe499, 0x001a, 0xdc8a, 0xdf99, 0xe099, 0xe299, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe399, 0x001a, 0x7a8b, 0x8190, 0x001a, 0xab95, 0xe199, 0xdd99, 0xe18c, 0x001a, 0xde99, 0x001a, 0x4398, 0x001a, 0x001a, 0x001a, 0xf095, 0x001a, 0xe692, 0xe08c, 0x908d, 0x001a, 0x001a, 0x001a, 0xe699, 0x001a, 0x001a, 0xdb93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xea99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc8e, 0x001a, 0xf48e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed99, 0xeb99, 0x001a, 0xa196, 0x001a, 0xe899, 0xf199, 0xec99, 0x001a, 0x001a, 0x001a, 0xef99, 0xc48c, 0xbd96, 0x001a, 0x001a, 0xf099, 0x001a, 0x001a, 0x001a, 0xf299, 0x001a, 0xf499, 0x001a, 0x001a, 0x001a, 0x75ed, 0xee8d, 0x6198, 0x001a, 0xe999, 0xe799, 0xf399, 0x001a, 0xee99, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf699, 0x001a, 0x429a, 0xf899, 0x001a, 0x001a, 0xfc99, 0x76ed, 0x001a, 0x409a, 0xf999, 0x001a, 0x001a, 0x5d9a, 0x001a, 0x001a, 0xe78d, 0x508a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf799, 0x001a, 0x001a, 0x001a, 0x449a, 0xf488, 0x439a, 0x001a, 0xa388, 0x6995, 0x419a, 0x001a, 0xfa99, 0x001a, 0x001a, 0xf599, 0xfb99, 0xc68d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x459a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf588, 0x4e9a, 0x001a, 0x001a, 0x469a, 0x479a, 0x001a, 0xa38f, 0x8996, 0x001a, 0x001a, 0x001a, 0x4c9a, 0x4b9a, 0x001a, 0x001a, 0x001a, 0x4e93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d9a, 0x001a, 0x001a, 0x4a9a, 0x001a, 0x77ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x5389, 0x001a, 0xb48d, 0x4f90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x489a, 0x8293, 0x001a, 0x001a, 0x001a, 0x499a, 0x001a, 0xa088, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x539a, 0x4297, 0x001a, 0xa58f, 0x001a, 0x599a, 0x001a, 0x001a, 0x001a, 0x001a, 0x589a, 0x4f9a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc191, 0x001a, 0x509a, 0x001a, 0x001a, 0x001a, 0xed91, 0x559a, 0xa48f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x529a, 0x001a, 0x001a, 0xe296, 0x001a, 0x001a, 0x001a, 0x5b8c, 0x001a, 0x001a, 0x569a, 0x579a, 0x001a, 0x001a, 0x001a, 0x001a, 0x549a, 0x5a9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x519a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x609a, 0x659a, 0x001a, 0x619a, 0x001a, 0x5c9a, 0x001a, 0x001a, 0x669a, 0x5091, 0x001a, 0x78ed, 0x689a, 0x001a, 0x418d, 0x5e9a, 0x9d92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x629a, 0x5b9a, 0xab8a, 0x001a, 0xec8a, 0x858a, 0x639a, 0x5f9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x968c, 0x699a, 0x679a, 0x7291, 0x698b, 0xaa8b, 0x001a, 0x649a, 0x001a, 0xf28b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6389, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d9a, 0x6b9a, 0x001a, 0xa59a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x709a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a9a, 0x001a, 0x6e9a, 0x001a, 0x001a, 0x6c9a, 0x001a, 0x001a, 0x001a, 0x6b8e, 0x6f9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x729a, 0x001a, 0x779a, 0x001a, 0x001a, 0x001a, 0x759a, 0x749a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5192, 0x001a, 0x001a, 0xc389, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x719a, 0x001a, 0x739a, 0xa68f, 0x5289, 0x001a, 0x001a, 0x769a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x829a, 0x001a, 0xfa8f, 0x7d9a, 0x001a, 0x7b9a, 0x001a, 0x7c9a, 0x001a, 0x7e9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5891, 0x001a, 0x789a, 0x001a, 0x799a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x819a, 0x001a, 0x001a, 0x001a, 0xed8a, 0x001a, 0x849a, 0x809a, 0x839a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac95, 0x001a, 0x001a, 0x001a, 0xd393, 0x001a, 0xb694, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x869a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x859a, 0x648a, 0x001a, 0x001a, 0x879a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x899a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x889a, 0x001a, 0x5894, 0x001a, 0x001a, 0x8b9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e9a, 0x001a, 0x8d9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x909a, 0x001a, 0x001a, 0x001a, 0x939a, 0x919a, 0x8f9a, 0x929a, 0x001a, 0x001a, 0x001a, 0x001a, 0x949a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x959a, 0x001a, 0x001a, 0x969a, 0x001a, 0x979a, 0x001a, 0x001a, 0x001a, 0x989a, 0x6499, 0x001a, 0xfa8e, 0x6c8e, 0x001a, 0x001a, 0xf189, 0x001a, 0xf688, 0x001a, 0x001a, 0x6392, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x999a, 0x001a, 0xa28d, 0x001a, 0xcd88, 0x7d90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a9a, 0xc58c, 0x001a, 0x001a, 0x918d, 0x001a, 0x9c9a, 0x9b9a, 0x001a, 0x001a, 0xde95, 0x9d9a, 0x001a, 0x001a, 0x001a, 0x9f9a, 0x9e9a, 0x001a, 0xa09a, 0x001a, 0xa19a, 0x001a, 0x978c, 0x001a, 0x001a, 0x8089, 0xa29a, 0x001a, 0x001a, 0xa49a, 0x001a, 0xa39a, 0x001a, 0x001a, 0x001a, 0xa69a, 0x001a, 0x001a, 0x7993, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa79a, 0xb388, 0xdd8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c8c, 0x001a, 0x001a, 0x6e92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa89a, 0xa99a, 0x001a, 0x001a, 0xab9a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac9a, 0x001a, 0xe28d, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf8b, 0x001a, 0x001a, 0x5696, 0x001a, 0x001a, 0x001a, 0xaa9a, 0xad9a, 0xbf8d, 0x428d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x79ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb19a, 0x001a, 0x001a, 0xa38d, 0x7aed, 0x5292, 0x001a, 0x001a, 0xae9a, 0xd892, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb29a, 0x001a, 0x001a, 0x8290, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb09a, 0xb39a, 0x001a, 0x5e8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb49a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb59a, 0x001a, 0x438d, 0x5f8a, 0xb79a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb89a, 0x001a, 0x7bed, 0x001a, 0x001a, 0x001a, 0xb99a, 0x001a, 0x001a, 0xb69a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf9a, 0x001a, 0x001a, 0xba9a, 0x001a, 0x001a, 0xbb9a, 0x7ded, 0x7ced, 0x001a, 0x001a, 0x8496, 0x001a, 0x001a, 0xe98f, 0x001a, 0x001a, 0x001a, 0xbd9a, 0xbe9a, 0xbc9a, 0x001a, 0xc09a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5794, 0x001a, 0x001a, 0xe688, 0x7595, 0x001a, 0x001a, 0xc19a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfb8f, 0x001a, 0x001a, 0xb78e, 0x001a, 0x7c94, 0xee8a, 0x001a, 0xe98d, 0x001a, 0x001a, 0x001a, 0x7896, 0x001a, 0xb093, 0x001a, 0x001a, 0x988c, 0xcd91, 0x001a, 0x001a, 0x001a, 0xbf9a, 0xc29a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc291, 0x001a, 0x001a, 0x001a, 0xc39a, 0x001a, 0x001a, 0x001a, 0xc49a, 0x001a, 0x001a, 0x001a, 0xc69a, 0x001a, 0x001a, 0xe792, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fea, 0x8189, 0xf195, 0x001a, 0x001a, 0xea8f, 0x6793, 0x001a, 0x001a, 0x001a, 0x001a, 0xe48d, 0x001a, 0x001a, 0xcc9a, 0x001a, 0x001a, 0xbb95, 0xdb97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf289, 0xc89a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5991, 0xcb9a, 0x001a, 0x8393, 0x001a, 0x001a, 0x6893, 0x8493, 0xb794, 0xcb92, 0x001a, 0x001a, 0x001a, 0xc78d, 0x001a, 0x001a, 0x001a, 0xc79a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9689, 0x001a, 0x5593, 0x001a, 0x001a, 0x001a, 0x001a, 0xc99a, 0x001a, 0xc59a, 0x001a, 0x001a, 0x6f90, 0x001a, 0x001a, 0x001a, 0xcd9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d8f, 0x001a, 0x001a, 0x001a, 0x001a, 0xab8b, 0x001a, 0xce9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe695, 0x001a, 0x001a, 0x001a, 0x9d91, 0x001a, 0x001a, 0x001a, 0x001a, 0xc492, 0x001a, 0x81ed, 0xd09a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e96, 0x001a, 0x001a, 0xd19a, 0x001a, 0x001a, 0xd69a, 0x001a, 0x001a, 0x001a, 0x82ed, 0xad95, 0x001a, 0x001a, 0x001a, 0x001a, 0xd59a, 0xcf9a, 0xd29a, 0xd49a, 0x001a, 0x001a, 0xa48d, 0x001a, 0x001a, 0xc795, 0x001a, 0x001a, 0x001a, 0xd79a, 0x001a, 0x6492, 0x001a, 0x001a, 0xf389, 0x001a, 0xeb8f, 0x001a, 0x001a, 0x001a, 0x001a, 0xd99a, 0x001a, 0xd89a, 0x001a, 0x888d, 0x001a, 0xda9a, 0xdc9a, 0xdb9a, 0x001a, 0x001a, 0xde9a, 0x001a, 0xd39a, 0xe09a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf9a, 0xdd9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d8e, 0x7090, 0x001a, 0x7391, 0xe19a, 0xba90, 0xeb88, 0x8494, 0x001a, 0x001a, 0x001a, 0x001a, 0xd992, 0x001a, 0xe39a, 0xe29a, 0xe49a, 0xe59a, 0xe69a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf95, 0xe89a, 0x83ed, 0x001a, 0x001a, 0x001a, 0xc489, 0xe99a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b97, 0x4f8a, 0x001a, 0xc799, 0x678f, 0xbd91, 0xea9a, 0xe996, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb296, 0x001a, 0x001a, 0xec9a, 0x001a, 0xe591, 0x001a, 0x5693, 0xbe91, 0x7695, 0xed9a, 0xee9a, 0x9b89, 0x001a, 0x001a, 0xb88e, 0xef9a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce88, 0xf09a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf19a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8289, 0x001a, 0x001a, 0xef8a, 0xde93, 0xf295, 0x001a, 0x001a, 0x001a, 0x001a, 0xf59a, 0x7491, 0xf49a, 0x5f8c, 0x001a, 0x84ed, 0x7a96, 0xf39a, 0x001a, 0x8593, 0xf79a, 0x001a, 0xf69a, 0x85ed, 0x001a, 0x86ed, 0x001a, 0x001a, 0xf99a, 0x001a, 0xf89a, 0x87ed, 0x001a, 0x9c89, 0x001a, 0xfa9a, 0xa78f, 0xfc9a, 0x4492, 0x001a, 0xfb9a, 0x001a, 0xb195, 0x001a, 0x001a, 0x001a, 0x001a, 0x978f, 0x7a93, 0x001a, 0x001a, 0x001a, 0x409b, 0x001a, 0x001a, 0x001a, 0x001a, 0x448d, 0x001a, 0x001a, 0x001a, 0x419b, 0x4094, 0xdc94, 0xcf96, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4494, 0x001a, 0x001a, 0x4a9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x578b, 0x001a, 0x001a, 0x6497, 0x001a, 0x001a, 0xad96, 0x001a, 0xaa9b, 0x001a, 0x429b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x459b, 0x88ed, 0xc391, 0x001a, 0x001a, 0x5796, 0x001a, 0x001a, 0x001a, 0x6993, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x469b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8596, 0x89ed, 0xc88d, 0x001a, 0x001a, 0xa88f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x479b, 0x001a, 0x001a, 0x6f8e, 0x001a, 0x6e8e, 0x001a, 0x001a, 0x001a, 0x001a, 0xb788, 0xc68c, 0x001a, 0xa990, 0xcf88, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b9b, 0x4c9b, 0x001a, 0x499b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5789, 0xad8a, 0x001a, 0x489b, 0x001a, 0xc396, 0x5095, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa688, 0x001a, 0x001a, 0x001a, 0x001a, 0xf788, 0x001a, 0x001a, 0x001a, 0x708e, 0x001a, 0xd088, 0x001a, 0xa188, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x519b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4f9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xba96, 0x001a, 0x529b, 0x001a, 0x509b, 0x001a, 0x001a, 0x4e9b, 0x5090, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d9b, 0x001a, 0x001a, 0x001a, 0xd895, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe28c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x569b, 0x579b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa98f, 0x001a, 0x001a, 0x001a, 0x539b, 0x4b98, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b94, 0x001a, 0x001a, 0x559b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa58d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x589b, 0x001a, 0x001a, 0x001a, 0x7795, 0x001a, 0x001a, 0x001a, 0x599b, 0x001a, 0x549b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb996, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5a9b, 0x5195, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b9b, 0x5f9b, 0x5c9b, 0x001a, 0x001a, 0xc589, 0x5e9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb98e, 0x001a, 0x5d9b, 0x998c, 0x001a, 0x001a, 0x001a, 0x6b9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x649b, 0x619b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8492, 0x001a, 0x609b, 0x001a, 0x001a, 0x629b, 0x001a, 0x001a, 0x639b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x659b, 0x669b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf08a, 0x001a, 0x689b, 0x679b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x699b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xec8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c9b, 0x001a, 0xda92, 0x001a, 0x001a, 0x001a, 0x6489, 0x001a, 0x6a9b, 0x001a, 0x001a, 0x001a, 0x6d9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e9b, 0x001a, 0x719b, 0x001a, 0x001a, 0x6f9b, 0x001a, 0x709b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x718e, 0x729b, 0x001a, 0x001a, 0x458d, 0x739b, 0x8aed, 0x9a8e, 0xb691, 0x001a, 0x749b, 0x759b, 0x798e, 0x468d, 0x001a, 0xd096, 0x001a, 0x001a, 0x001a, 0x478b, 0xc78c, 0x769b, 0x778a, 0x001a, 0x001a, 0x779b, 0x001a, 0xb791, 0x001a, 0x001a, 0x001a, 0x001a, 0x789b, 0xa19b, 0x001a, 0x799b, 0x001a, 0x7a9b, 0x001a, 0x001a, 0x7b9b, 0x001a, 0x7d9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e9b, 0x001a, 0x001a, 0x809b, 0x001a, 0xee91, 0x001a, 0x4689, 0xe78e, 0xc088, 0x001a, 0x7691, 0xae8a, 0xb38e, 0x001a, 0x478d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8693, 0x001a, 0x408f, 0xaf8a, 0x8892, 0xe892, 0xb688, 0x588b, 0xf395, 0x001a, 0xc08e, 0x001a, 0x001a, 0x718b, 0xe990, 0xba8e, 0x4797, 0x819b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b8b, 0x001a, 0xc98d, 0x001a, 0x001a, 0x518a, 0x8389, 0xaa8f, 0xc689, 0x001a, 0x829b, 0x6597, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x688f, 0x8bed, 0x001a, 0xe28e, 0x839b, 0xf18a, 0xd093, 0xa796, 0x849b, 0x001a, 0x859b, 0x001a, 0x001a, 0x7895, 0x001a, 0x001a, 0x001a, 0x879b, 0x001a, 0xa68a, 0xf58b, 0x869b, 0x001a, 0x001a, 0x001a, 0x8ded, 0x001a, 0x001a, 0xb08a, 0x001a, 0x5190, 0x8b9b, 0x408e, 0x001a, 0xc789, 0x8a9b, 0x001a, 0x889b, 0x8c9b, 0x899b, 0x4a94, 0xcb9e, 0x5290, 0x001a, 0x8d9b, 0x8eed, 0x001a, 0xbe97, 0x001a, 0x8e9b, 0x001a, 0x001a, 0x909b, 0x001a, 0x9e92, 0x8f9b, 0x001a, 0xa190, 0x001a, 0x9b8e, 0x001a, 0x001a, 0x001a, 0xce91, 0xf58e, 0x001a, 0x9595, 0xea90, 0x001a, 0xcb8e, 0x919b, 0xab8f, 0x929b, 0x939b, 0xd188, 0xb891, 0x7190, 0x001a, 0x949b, 0xb193, 0xac8f, 0x001a, 0xad8f, 0x001a, 0x959b, 0x001a, 0x001a, 0xeb90, 0x001a, 0x001a, 0x001a, 0xae8f, 0x001a, 0x001a, 0x001a, 0x8fed, 0x001a, 0x969b, 0x001a, 0x979b, 0x001a, 0xde96, 0x001a, 0x001a, 0x001a, 0x989b, 0x001a, 0x001a, 0x001a, 0x001a, 0xc48b, 0x001a, 0x001a, 0x001a, 0x418f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x999b, 0x9a9b, 0xda8e, 0x4b90, 0xf293, 0x7390, 0xf694, 0x4194, 0xc78b, 0x9b9b, 0x001a, 0x001a, 0x001a, 0x8f8b, 0x9c9b, 0x001a, 0xfc8b, 0x001a, 0xcd93, 0xae89, 0x001a, 0x728e, 0x9d9b, 0xa09b, 0x9f9b, 0xfb8b, 0x001a, 0x9e9b, 0x001a, 0x5793, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xae91, 0x001a, 0x6a93, 0xc68e, 0x001a, 0x001a, 0x7791, 0x9a97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa29b, 0x001a, 0xa39b, 0xd493, 0x001a, 0x528e, 0x001a, 0x001a, 0x001a, 0x001a, 0xa59b, 0x001a, 0x001a, 0xa69b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa79b, 0x001a, 0x001a, 0x001a, 0xf28a, 0xa89b, 0x001a, 0x001a, 0xa99b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaa89, 0x001a, 0x001a, 0x001a, 0x001a, 0x90ed, 0x001a, 0x5a91, 0xe28a, 0x001a, 0xab9b, 0xa696, 0x001a, 0x001a, 0x001a, 0x001a, 0xd091, 0x001a, 0x788a, 0x001a, 0x001a, 0xad9b, 0xaf9b, 0xdd8a, 0x001a, 0x91ed, 0xac9b, 0xae9b, 0x001a, 0xb19b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb09b, 0x001a, 0xb29b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb39b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb93, 0xac8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe389, 0xb49b, 0xb99b, 0x001a, 0x001a, 0xb79b, 0x001a, 0xf595, 0xf495, 0x001a, 0x001a, 0x001a, 0x001a, 0x92ed, 0x8793, 0x001a, 0x001a, 0x001a, 0xb69b, 0x738f, 0x001a, 0xb59b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9290, 0x001a, 0x001a, 0x001a, 0xba9b, 0x001a, 0x001a, 0xe88d, 0x001a, 0x001a, 0xc09b, 0x001a, 0x001a, 0xc19b, 0xbb9b, 0x528a, 0xbc9b, 0xc59b, 0xc49b, 0xc39b, 0xbf9b, 0x001a, 0x001a, 0x001a, 0xbe9b, 0x001a, 0x001a, 0xc29b, 0x001a, 0x001a, 0x001a, 0x001a, 0x93ed, 0x001a, 0xf695, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x96ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc99b, 0xc69b, 0x001a, 0xc89b, 0x001a, 0x9297, 0x001a, 0xc79b, 0x94ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbd9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9390, 0x001a, 0x001a, 0xca9b, 0x97ed, 0x001a, 0xb58d, 0x001a, 0x001a, 0x001a, 0xcb9b, 0x001a, 0x001a, 0xcc9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcf9b, 0x001a, 0xce9b, 0x001a, 0x001a, 0xcd9b, 0x001a, 0x001a, 0x001a, 0x8893, 0xb89b, 0x001a, 0x001a, 0x001a, 0xd59b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd19b, 0x001a, 0x001a, 0x001a, 0x001a, 0xd09b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd29b, 0x001a, 0xd39b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd69b, 0x98ed, 0x99ed, 0xe497, 0x001a, 0xd79b, 0xd49b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd89b, 0x001a, 0x001a, 0xde8a, 0xd99b, 0x001a, 0x001a, 0x9aed, 0x001a, 0xdb9b, 0xda9b, 0x001a, 0x001a, 0xdc9b, 0x001a, 0x001a, 0x001a, 0x001a, 0xdd9b, 0x001a, 0xec90, 0x428f, 0x001a, 0x001a, 0x848f, 0x001a, 0x8391, 0x001a, 0x488d, 0xb68d, 0x498d, 0x908b, 0x001a, 0x001a, 0xde9b, 0x001a, 0x001a, 0xb78d, 0x001a, 0x001a, 0xc88c, 0xdf9b, 0xa496, 0x6294, 0xe09b, 0x001a, 0x4a8d, 0x001a, 0x001a, 0x001a, 0xaa8a, 0x001a, 0x4692, 0xd08b, 0x001a, 0x001a, 0x001a, 0x738e, 0x7a95, 0x001a, 0x001a, 0xbf94, 0x001a, 0x001a, 0x001a, 0x001a, 0xe19b, 0xf38a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe49b, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f92, 0x001a, 0x001a, 0xe39b, 0xe29b, 0xe59b, 0x001a, 0xe992, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8390, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x748e, 0x001a, 0xc890, 0x001a, 0xd191, 0x418b, 0x001a, 0x001a, 0xa092, 0x001a, 0x001a, 0xe69b, 0xe79b, 0xed8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x5896, 0x001a, 0x001a, 0xea9b, 0x001a, 0x001a, 0xe99b, 0xe89b, 0x9d95, 0x001a, 0xf19b, 0x001a, 0x001a, 0x001a, 0x001a, 0x7996, 0x001a, 0xeb9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed9b, 0x8b96, 0x001a, 0xec9b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee9b, 0x001a, 0xa694, 0xef9b, 0xbc95, 0xf09b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb18a, 0xbd95, 0x4e94, 0xf29b, 0xf39b, 0x001a, 0x4b8d, 0xb28a, 0xf49b, 0xb68c, 0x6397, 0x4897, 0xf48a, 0xf69b, 0x001a, 0xa192, 0x001a, 0x4c8d, 0xaf8f, 0x001a, 0x001a, 0xdd94, 0x001a, 0x001a, 0xb08f, 0x001a, 0x001a, 0x001a, 0x001a, 0x988f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xea92, 0xf795, 0x5893, 0x001a, 0x001a, 0x4d8d, 0x001a, 0x7b95, 0x001a, 0x001a, 0x001a, 0xf79b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7893, 0xc08d, 0x001a, 0x001a, 0x001a, 0xc98c, 0x001a, 0xeb92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc188, 0x8e8f, 0x4e8d, 0x6697, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf89b, 0xf99b, 0x7094, 0x001a, 0x001a, 0x001a, 0x001a, 0xfa9b, 0xf597, 0x4c98, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc9b, 0xfb9b, 0x001a, 0x001a, 0x668a, 0x001a, 0x001a, 0x409c, 0x001a, 0x001a, 0x001a, 0x439c, 0x449c, 0x001a, 0x429c, 0x001a, 0x5f95, 0xb18f, 0x469c, 0x459c, 0x419c, 0x001a, 0x001a, 0x001a, 0x001a, 0x479c, 0x489c, 0x001a, 0x001a, 0x499c, 0x001a, 0x001a, 0x001a, 0x4c9c, 0x4a9c, 0x001a, 0x4b9c, 0x4d9c, 0x001a, 0x8489, 0xec92, 0x4e9c, 0x001a, 0x9a8c, 0xf489, 0x5594, 0x001a, 0x4f9c, 0xf993, 0x001a, 0xd995, 0x001a, 0x509c, 0x4d98, 0x001a, 0x001a, 0x001a, 0x001a, 0x519c, 0xbe95, 0x549c, 0x9f98, 0xaf98, 0x001a, 0xae8e, 0xf393, 0x559c, 0x001a, 0x7c8b, 0xa292, 0xf888, 0x569c, 0xa495, 0x4f8d, 0x001a, 0x001a, 0x6f92, 0x001a, 0x001a, 0x001a, 0xed92, 0x001a, 0x9bed, 0x001a, 0x001a, 0x001a, 0xed96, 0xb78c, 0xca8c, 0x001a, 0x579c, 0x001a, 0x001a, 0x001a, 0x589c, 0x001a, 0x5e9c, 0x001a, 0xe38e, 0x001a, 0x001a, 0x9ced, 0xa392, 0x001a, 0xad8b, 0x599c, 0x001a, 0x001a, 0x001a, 0x4a95, 0x001a, 0x6592, 0x001a, 0x001a, 0x5a9c, 0x001a, 0x001a, 0x001a, 0x4bed, 0x001a, 0x001a, 0x5b9c, 0x001a, 0xae8b, 0x001a, 0x5c9c, 0x001a, 0x5d9c, 0x001a, 0x001a, 0x5f9c, 0x001a, 0x9693, 0x001a, 0x001a, 0x609c, 0x619c, 0x001a, 0x629c, 0x001a, 0x001a, 0x539c, 0x529c, 0x001a, 0x001a, 0x001a, 0x639c, 0x608c, 0x001a, 0x001a, 0x001a, 0x4695, 0x9ded, 0x001a, 0xca8d, 0x5695, 0xa492, 0x6a95, 0x649c, 0x001a, 0x001a, 0xb28f, 0x6589, 0x001a, 0x659c, 0x001a, 0x001a, 0x001a, 0x669c, 0x001a, 0xf096, 0x001a, 0x001a, 0xde94, 0x001a, 0x001a, 0x699c, 0x9d89, 0xaa90, 0x689c, 0x679c, 0x618c, 0xd291, 0x001a, 0x6d9c, 0x6b9c, 0x001a, 0x6a9c, 0xa597, 0xe38c, 0x001a, 0x001a, 0x001a, 0x998f, 0x6c9c, 0x6b93, 0x5d8f, 0x001a, 0x001a, 0x001a, 0xbe93, 0x709c, 0x6f9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e9c, 0x001a, 0x719c, 0xe48c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x729c, 0x9c95, 0x7a8f, 0x001a, 0x001a, 0x739c, 0xf794, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf93, 0xa592, 0x001a, 0x001a, 0x9eed, 0x001a, 0x4f93, 0x001a, 0x001a, 0x749c, 0x4a8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5390, 0x001a, 0x4b95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf58a, 0x4594, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x759c, 0x758e, 0x5996, 0x5a96, 0x001a, 0x001a, 0x9e89, 0x7a9c, 0x9fed, 0x001a, 0x8992, 0x001a, 0x001a, 0x001a, 0x779c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf589, 0x001a, 0x001a, 0x001a, 0x001a, 0xab9c, 0x799c, 0x001a, 0x001a, 0x001a, 0x4f94, 0x001a, 0x001a, 0x789c, 0x001a, 0x001a, 0x769c, 0x001a, 0x9a8d, 0x001a, 0x7c9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x839c, 0x899c, 0x819c, 0x001a, 0x7b93, 0x001a, 0x001a, 0x869c, 0x7c95, 0x001a, 0x001a, 0x809c, 0x001a, 0x859c, 0xe597, 0x768e, 0x001a, 0x001a, 0xd391, 0x7d9c, 0x001a, 0x001a, 0x001a, 0x7d8b, 0x889c, 0xab90, 0x8589, 0x829c, 0xf689, 0x879c, 0x001a, 0x001a, 0x001a, 0xaf8b, 0x001a, 0x849c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c9c, 0x969c, 0x949c, 0x001a, 0x001a, 0x919c, 0x001a, 0x001a, 0x001a, 0x909c, 0xf697, 0x001a, 0x929c, 0x001a, 0x001a, 0xb08b, 0x001a, 0x508d, 0x001a, 0x001a, 0x9a8f, 0x001a, 0x001a, 0x001a, 0x999c, 0x8b9c, 0x001a, 0x001a, 0xa0ed, 0x001a, 0x8f9c, 0x7e9c, 0x001a, 0xf889, 0x939c, 0x959c, 0x7092, 0x001a, 0x001a, 0xa68d, 0xb689, 0x8d9c, 0x989c, 0x979c, 0xb18b, 0x001a, 0xa791, 0x868a, 0x001a, 0x001a, 0x001a, 0x001a, 0x628c, 0x001a, 0x8e9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a9c, 0x001a, 0x9d9c, 0x9f9c, 0xa1ed, 0x001a, 0x001a, 0x001a, 0xbb8e, 0xa2ed, 0xa59c, 0xee92, 0x9b9c, 0x001a, 0x001a, 0x001a, 0x001a, 0xa39c, 0x001a, 0xf789, 0x001a, 0xa19c, 0xa29c, 0x001a, 0x001a, 0x9e9c, 0xa09c, 0x001a, 0x001a, 0x001a, 0xe58c, 0x4997, 0x001a, 0x001a, 0xb38a, 0x001a, 0x001a, 0x7889, 0xa49c, 0x001a, 0x5994, 0xab88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf94, 0x7b9c, 0xaa9c, 0xae9c, 0xe396, 0x001a, 0xa79c, 0x001a, 0x001a, 0x001a, 0x8993, 0xac9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee8f, 0xad9c, 0xd593, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6698, 0x001a, 0xa99c, 0x001a, 0xa4ed, 0x001a, 0x001a, 0xaf9c, 0x001a, 0x9b8d, 0x001a, 0xc990, 0x001a, 0xa3ed, 0xd288, 0xa89c, 0xa69c, 0x001a, 0x7991, 0x001a, 0x001a, 0x001a, 0x9c9c, 0x538e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc491, 0xbb9c, 0xa6ed, 0x7a91, 0xb69c, 0x001a, 0xb39c, 0xb49c, 0x001a, 0xe48e, 0xb79c, 0xba9c, 0x001a, 0x001a, 0x001a, 0x001a, 0xb59c, 0x448f, 0x001a, 0xb89c, 0x001a, 0x001a, 0xb29c, 0x001a, 0xfa96, 0xf996, 0x001a, 0x001a, 0x001a, 0xbc9c, 0xbd9c, 0xd388, 0x001a, 0xa7ed, 0x001a, 0x001a, 0x001a, 0xb19c, 0x001a, 0x001a, 0x001a, 0x001a, 0xf08b, 0xa488, 0x001a, 0x001a, 0x001a, 0xb48a, 0xa5ed, 0xb99c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc19c, 0xc09c, 0x001a, 0x001a, 0x001a, 0xc59c, 0x001a, 0x001a, 0x001a, 0xa9ed, 0x001a, 0x001a, 0x001a, 0xc69c, 0x001a, 0x001a, 0xa8ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xc49c, 0xc79c, 0xbf9c, 0xc39c, 0x001a, 0x001a, 0xc89c, 0x001a, 0xc99c, 0x001a, 0x001a, 0xbe9c, 0x9c8e, 0x001a, 0xc29c, 0xd491, 0x518d, 0xb09c, 0x5490, 0x001a, 0x001a, 0x001a, 0x001a, 0xd69c, 0x001a, 0xe795, 0x001a, 0x001a, 0xcc9c, 0xcd9c, 0xce9c, 0x001a, 0x001a, 0xd59c, 0x001a, 0xd49c, 0x001a, 0x001a, 0x9d96, 0xb58a, 0x001a, 0xd29c, 0x001a, 0x648c, 0x538a, 0x001a, 0x001a, 0xcf9c, 0x001a, 0x001a, 0xb697, 0xd19c, 0xd488, 0xd39c, 0x001a, 0xca9c, 0xd09c, 0xd79c, 0x638c, 0xcb9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c97, 0x001a, 0x001a, 0x001a, 0x4a97, 0x001a, 0x001a, 0x001a, 0x001a, 0xda9c, 0x001a, 0x001a, 0xde9c, 0x001a, 0x001a, 0x001a, 0x9e91, 0x001a, 0xf797, 0xdf9c, 0x001a, 0x001a, 0xdc9c, 0x001a, 0xd99c, 0x001a, 0xaaed, 0xd89c, 0xdd9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xae95, 0x001a, 0x001a, 0xb293, 0x001a, 0x658c, 0x001a, 0xe09c, 0xdb9c, 0x001a, 0xe19c, 0x001a, 0x001a, 0x001a, 0x9b8c, 0x001a, 0x001a, 0x001a, 0xaf89, 0x001a, 0x001a, 0x001a, 0xe99c, 0x001a, 0x001a, 0x001a, 0xb68a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79c, 0x001a, 0x001a, 0xe89c, 0xa78d, 0xe69c, 0xe49c, 0xe39c, 0xea9c, 0xe29c, 0xec9c, 0x001a, 0x001a, 0xf989, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee9c, 0x001a, 0x001a, 0xed9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa692, 0x001a, 0xf19c, 0x001a, 0xef9c, 0xe59c, 0x9c8c, 0x001a, 0xf09c, 0x001a, 0xf49c, 0xf39c, 0xf59c, 0xf29c, 0xf69c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf79c, 0xf89c, 0xe895, 0x001a, 0xfa9c, 0xf99c, 0x5e8f, 0x001a, 0xac90, 0xe489, 0xfa89, 0xabed, 0xfb9c, 0x001a, 0xbd88, 0x001a, 0x001a, 0x001a, 0xca90, 0xfc9c, 0x001a, 0xc1e6, 0x409d, 0x818c, 0x001a, 0x419d, 0x001a, 0x001a, 0x001a, 0x001a, 0xed90, 0x001a, 0x001a, 0x001a, 0x429d, 0x001a, 0x001a, 0x001a, 0x439d, 0x598b, 0x449d, 0x001a, 0x459d, 0x469d, 0xd591, 0x001a, 0x001a, 0x001a, 0xcb8c, 0x001a, 0x001a, 0xdf96, 0x001a, 0x001a, 0x001a, 0x5b96, 0x8a8f, 0x479d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee90, 0xbbe7, 0xe094, 0x001a, 0xe88e, 0x001a, 0xcb8d, 0x489d, 0x001a, 0x001a, 0x001a, 0x001a, 0xc591, 0x001a, 0xa595, 0x001a, 0x001a, 0xef91, 0x001a, 0x001a, 0x4b9d, 0x001a, 0x001a, 0x499d, 0x001a, 0x4c9d, 0x001a, 0x001a, 0x4a9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf95, 0x001a, 0x001a, 0xb588, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d95, 0x001a, 0x001a, 0xe194, 0x001a, 0x001a, 0x4e9d, 0x001a, 0x519d, 0xb38f, 0x5a8b, 0x001a, 0x4f9d, 0x569d, 0xb48f, 0x001a, 0x001a, 0x001a, 0x001a, 0x509d, 0x6394, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d97, 0x529d, 0x539d, 0x579d, 0x8a93, 0x549d, 0x528d, 0xdc90, 0x001a, 0x001a, 0x659d, 0xb294, 0x001a, 0xf091, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaced, 0x001a, 0x001a, 0x001a, 0x001a, 0xe294, 0xab9d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf895, 0x001a, 0x001a, 0x001a, 0xef92, 0x001a, 0x001a, 0x001a, 0x9596, 0x001a, 0x5a9d, 0x9f89, 0x8a92, 0x001a, 0x001a, 0x001a, 0x001a, 0x639d, 0x001a, 0x001a, 0x5392, 0x5d9d, 0x649d, 0x5f9d, 0x669d, 0x629d, 0x001a, 0x619d, 0x8f94, 0x001a, 0x5b9d, 0xfb89, 0x599d, 0x918b, 0xf191, 0x559d, 0x001a, 0x001a, 0x589d, 0x538d, 0xd990, 0x001a, 0xb58f, 0x609d, 0x7194, 0x001a, 0x001a, 0x928b, 0x678a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x878a, 0x4090, 0x689d, 0x6d9d, 0x001a, 0x699d, 0x001a, 0x9d8c, 0x001a, 0x6e9d, 0x418e, 0x898d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x458f, 0x5c9d, 0x001a, 0x9d8e, 0x6b9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x778e, 0x6c9d, 0xc288, 0x001a, 0x001a, 0x679d, 0x001a, 0x001a, 0x001a, 0x001a, 0xa792, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x938b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb28b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a9d, 0xa588, 0x001a, 0x001a, 0xc18d, 0x001a, 0x001a, 0x001a, 0x5590, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf092, 0x001a, 0x001a, 0xd294, 0x709d, 0x7d91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa891, 0x001a, 0x001a, 0x4a8e, 0x719d, 0x001a, 0x739d, 0x6f9d, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf95, 0x001a, 0xbb92, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf995, 0xcc8e, 0x809d, 0x001a, 0x7e9d, 0x001a, 0x001a, 0x9890, 0x001a, 0x001a, 0x001a, 0x9e8c, 0x001a, 0x001a, 0x001a, 0x789d, 0xb78f, 0x001a, 0x001a, 0xe693, 0x5094, 0x001a, 0x001a, 0x001a, 0x001a, 0x769d, 0x001a, 0x001a, 0x7c91, 0x001a, 0x001a, 0x001a, 0x001a, 0xf68e, 0x7b9d, 0x001a, 0x001a, 0xb68f, 0x001a, 0x759d, 0x7a9d, 0x001a, 0x001a, 0x7294, 0x001a, 0x001a, 0x001a, 0x749d, 0x001a, 0x408c, 0x001a, 0x001a, 0x7c8a, 0x001a, 0x001a, 0x001a, 0x7c9d, 0xa997, 0xcc8d, 0x5492, 0x799d, 0x001a, 0xda90, 0x001a, 0x548d, 0x8490, 0x8689, 0x5b91, 0x779d, 0x648b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x668c, 0x001a, 0xcd92, 0x7d9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e91, 0x001a, 0x001a, 0x819d, 0x001a, 0x839d, 0x001a, 0x001a, 0xb591, 0x899d, 0x001a, 0x849d, 0x001a, 0x001a, 0x869d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6095, 0xf192, 0x001a, 0x879d, 0x001a, 0x001a, 0x001a, 0x4b97, 0x001a, 0x001a, 0x001a, 0x6797, 0xb78a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac88, 0x001a, 0x859d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x829d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf68a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8789, 0xaded, 0x889d, 0x001a, 0x001a, 0x001a, 0x6897, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb991, 0x001a, 0x939d, 0x001a, 0x001a, 0x001a, 0x8d9d, 0x001a, 0x001a, 0x8a9d, 0x919d, 0x001a, 0x001a, 0x001a, 0x001a, 0x729d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e9d, 0x001a, 0x929d, 0x001a, 0x001a, 0x001a, 0xc094, 0x8b93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b9d, 0x001a, 0x8f9d, 0x001a, 0x001a, 0x001a, 0x678c, 0x001a, 0x001a, 0x001a, 0xef8d, 0x001a, 0x001a, 0x001a, 0xdb90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x979d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4593, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaeed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x949d, 0x001a, 0x8096, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x959d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x969d, 0x001a, 0xcc96, 0x001a, 0xa090, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x828c, 0x001a, 0x001a, 0x001a, 0x001a, 0x9d9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x548e, 0x9a9d, 0x001a, 0x999d, 0x001a, 0x001a, 0x001a, 0x001a, 0x5194, 0x001a, 0x001a, 0xafed, 0xb393, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5093, 0x9b9d, 0x001a, 0x001a, 0x001a, 0x9c9d, 0x001a, 0x8f95, 0x001a, 0x6494, 0x428e, 0x001a, 0xef90, 0x001a, 0x6f96, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x688a, 0x001a, 0xa39d, 0x9e9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x6997, 0xa59d, 0x001a, 0x001a, 0xa19d, 0x001a, 0xa29d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8091, 0xb0ed, 0x001a, 0x001a, 0x001a, 0xa09d, 0x001a, 0x5e9d, 0x001a, 0x001a, 0x001a, 0xa49d, 0x001a, 0x9f9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa99d, 0xaa9d, 0x4693, 0xac9d, 0x001a, 0x001a, 0x438e, 0xa79d, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b8b, 0x001a, 0x001a, 0xad9d, 0x001a, 0xa69d, 0xb19d, 0x001a, 0xb09d, 0x001a, 0xaf9d, 0x001a, 0x001a, 0x001a, 0xb29d, 0x001a, 0x001a, 0xb49d, 0xef8f, 0x001a, 0xb39d, 0x001a, 0x001a, 0x001a, 0x001a, 0xb79d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb59d, 0x001a, 0x001a, 0x001a, 0xb69d, 0x909d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb99d, 0xb89d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x989d, 0xba9d, 0xae9d, 0x001a, 0x001a, 0x788e, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb9d, 0xbc9d, 0xbe9d, 0xbd9d, 0xbf9d, 0xfc89, 0x001a, 0x558d, 0x001a, 0x001a, 0xfa95, 0xad90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcc8c, 0x001a, 0x001a, 0xc19d, 0x001a, 0x001a, 0x001a, 0x001a, 0xc49d, 0xb1ed, 0x7195, 0x001a, 0x7e8b, 0x001a, 0x001a, 0x001a, 0xc39d, 0xc29d, 0x7394, 0xc59d, 0xb38b, 0x001a, 0x001a, 0x001a, 0xc79d, 0xc69d, 0x001a, 0x001a, 0x001a, 0xb88a, 0x558e, 0x001a, 0x001a, 0xd693, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x688c, 0x001a, 0x001a, 0x001a, 0x9490, 0x001a, 0xc89d, 0x001a, 0xae90, 0x4793, 0x001a, 0x7e95, 0xc99d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xca9d, 0xcb9d, 0x001a, 0x001a, 0x001a, 0xb695, 0x7c9b, 0xc490, 0x001a, 0x001a, 0x6b95, 0x001a, 0xd68d, 0x001a, 0xe394, 0xc194, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c93, 0x001a, 0xbf97, 0x001a, 0xcd9d, 0xce8e, 0x001a, 0x001a, 0xce9d, 0x001a, 0xb488, 0x001a, 0x001a, 0xd28b, 0xcb90, 0x001a, 0x8095, 0x001a, 0x001a, 0x001a, 0xcf9d, 0x618e, 0x6692, 0x001a, 0x7a8e, 0x5690, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd09d, 0x001a, 0xfb95, 0x001a, 0x001a, 0x9789, 0x7b8e, 0x001a, 0x001a, 0x001a, 0xd39d, 0x001a, 0xd19d, 0xd49d, 0xb797, 0xd29d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf990, 0xd59d, 0x001a, 0x001a, 0xb091, 0x001a, 0x001a, 0xd69d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf88a, 0x001a, 0xd89d, 0x001a, 0xd79d, 0x001a, 0x001a, 0x001a, 0x001a, 0xd99d, 0xda9d, 0xf98a, 0x001a, 0x001a, 0xfa93, 0x5592, 0x8c8b, 0x7c8e, 0x8191, 0x001a, 0x001a, 0x7b8f, 0xae88, 0x001a, 0x001a, 0x001a, 0xdb9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa089, 0xdf9d, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2ed, 0x001a, 0x568d, 0xde9d, 0x001a, 0x001a, 0xa98d, 0xb88f, 0x001a, 0xb5ed, 0xdd9d, 0x001a, 0xb98f, 0x001a, 0xbe96, 0xa88d, 0x001a, 0x001a, 0x001a, 0xd588, 0xcc90, 0xb3ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe49d, 0x001a, 0xb7ed, 0xaf90, 0x6689, 0x001a, 0x001a, 0x001a, 0xb8ed, 0x748f, 0x001a, 0x8696, 0xf08d, 0x001a, 0x001a, 0x001a, 0x001a, 0xba8f, 0xb6ed, 0xa590, 0x001a, 0x47ed, 0x001a, 0x001a, 0xe39d, 0xe19d, 0xe29d, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4ed, 0x8b92, 0x001a, 0x001a, 0x459e, 0x001a, 0xe89d, 0x9e8e, 0x578d, 0xe69d, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79d, 0x001a, 0x5790, 0x001a, 0x001a, 0x001a, 0xe59d, 0x001a, 0x001a, 0x4e8e, 0x001a, 0x001a, 0x001a, 0x001a, 0xbaed, 0x001a, 0xbbed, 0x001a, 0x001a, 0x001a, 0xea9d, 0xe99d, 0xee9d, 0x001a, 0x001a, 0xef9d, 0x001a, 0xeb9d, 0xb9ed, 0x418a, 0xec9d, 0xed9d, 0xd394, 0x001a, 0x001a, 0x001a, 0x001a, 0x8195, 0x698c, 0xf09d, 0x001a, 0x001a, 0xbded, 0xb090, 0x001a, 0xbb8f, 0x001a, 0x001a, 0x001a, 0x7192, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc58b, 0x001a, 0xf19d, 0xf59d, 0x001a, 0x001a, 0xc989, 0xf29d, 0xf49d, 0x001a, 0x001a, 0x001a, 0x001a, 0xf39d, 0x001a, 0x001a, 0x8b8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x6792, 0xc388, 0xf69d, 0xbeed, 0x001a, 0x001a, 0x001a, 0xf79d, 0x001a, 0x001a, 0xbfed, 0x001a, 0xa892, 0x001a, 0x001a, 0x001a, 0xef97, 0x001a, 0x001a, 0x001a, 0x001a, 0x628e, 0x001a, 0x001a, 0xe995, 0x001a, 0x001a, 0x001a, 0xc0ed, 0x001a, 0x5c96, 0x001a, 0x001a, 0x001a, 0x419e, 0xf99d, 0x001a, 0x001a, 0xfc9d, 0x001a, 0xfb9d, 0xc1ed, 0x001a, 0xf89d, 0x001a, 0x001a, 0x409e, 0x001a, 0x001a, 0xdc93, 0x001a, 0xfa9d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x429e, 0x001a, 0x001a, 0x8c8f, 0x439e, 0x001a, 0x6a97, 0x9894, 0x001a, 0x001a, 0x449e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x469e, 0x001a, 0x001a, 0x479e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x489e, 0x001a, 0xc88b, 0x6789, 0x588d, 0x499e, 0x001a, 0x4a9e, 0x918f, 0x8291, 0xc2ed, 0x4aed, 0xd699, 0x5d91, 0x5c91, 0xd691, 0xc58d, 0x001a, 0x001a, 0xf098, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e8c, 0x4c97, 0x001a, 0xfc95, 0x001a, 0x9e95, 0xc3ed, 0x4b9e, 0x001a, 0x001a, 0x001a, 0x001a, 0xf18d, 0xbd92, 0x4c9e, 0x4e98, 0x001a, 0x001a, 0x001a, 0x5d96, 0x001a, 0xa992, 0x4d9e, 0xfa8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e9e, 0x4f9e, 0xd896, 0x001a, 0xa296, 0x9696, 0x7b96, 0x448e, 0x519e, 0x001a, 0x001a, 0xe98e, 0x001a, 0x001a, 0x7096, 0x001a, 0x539e, 0x569e, 0x559e, 0x001a, 0xf78a, 0x001a, 0x001a, 0x808b, 0x001a, 0x529e, 0x001a, 0x549e, 0x001a, 0x001a, 0x001a, 0x001a, 0x579e, 0x001a, 0x001a, 0x9990, 0x001a, 0x001a, 0x001a, 0x001a, 0x9b97, 0xc788, 0xde8d, 0xba91, 0x001a, 0xdb8e, 0x001a, 0x001a, 0xf18f, 0x001a, 0x001a, 0x5a9e, 0x001a, 0x001a, 0x6d93, 0x001a, 0x589e, 0xa991, 0x599e, 0xf08f, 0xdb96, 0x5b9e, 0x5c9e, 0x8897, 0xc5ed, 0x001a, 0x001a, 0x001a, 0x619e, 0x001a, 0x001a, 0x598d, 0x001a, 0x7494, 0x5e9e, 0x8c93, 0xdc9d, 0xe09d, 0x001a, 0x6e8b, 0x001a, 0x6694, 0x001a, 0x001a, 0x001a, 0x001a, 0x609e, 0x001a, 0xbc8f, 0xc294, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x669e, 0x001a, 0xf894, 0x001a, 0x5d9e, 0x001a, 0x639e, 0x629e, 0x001a, 0x001a, 0x001a, 0xcd90, 0x001a, 0x001a, 0x001a, 0x001a, 0x8d96, 0x001a, 0xd197, 0x001a, 0x001a, 0x8796, 0x001a, 0xca89, 0x7d8e, 0x001a, 0x001a, 0x6798, 0x659e, 0x9590, 0x001a, 0x001a, 0x001a, 0x649e, 0x001a, 0x001a, 0x5f9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd8c, 0x001a, 0x001a, 0x001a, 0x6b9e, 0x699e, 0x001a, 0xcb89, 0x679e, 0x6d9e, 0x739e, 0x001a, 0xc6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ed, 0xc691, 0x001a, 0x001a, 0xbf95, 0x001a, 0x759e, 0x001a, 0x001a, 0x001a, 0x4195, 0x001a, 0x001a, 0x001a, 0x749e, 0x9094, 0x5e96, 0xb98a, 0x001a, 0xf590, 0x5f8f, 0x001a, 0x001a, 0x001a, 0xd192, 0x001a, 0x4d97, 0x001a, 0x001a, 0x709e, 0x6f9e, 0x001a, 0x001a, 0x001a, 0x719e, 0x001a, 0x6e9e, 0x001a, 0x001a, 0x769e, 0x001a, 0x6c9e, 0x001a, 0x001a, 0x6a9e, 0x001a, 0x729e, 0x689e, 0x001a, 0x8c92, 0x001a, 0xf696, 0xc48e, 0xf28d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb88d, 0x001a, 0x001a, 0x8f96, 0x608a, 0x001a, 0xc9ed, 0xcc92, 0xc893, 0x6889, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf090, 0x001a, 0x001a, 0xb290, 0x498c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x789e, 0x001a, 0x001a, 0x5a8d, 0x9c8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a9e, 0x948a, 0x819e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d9e, 0x001a, 0xf190, 0x001a, 0x001a, 0x001a, 0x6a8a, 0xaa8d, 0x001a, 0x001a, 0x698a, 0xcd8d, 0x001a, 0x001a, 0x7b9e, 0x858c, 0x6a8c, 0x8d93, 0xcaed, 0x001a, 0x799e, 0x001a, 0xc488, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c9e, 0x7e9e, 0x001a, 0xcb8b, 0x4b8c, 0xc7ed, 0xba8a, 0x6a8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x829e, 0x001a, 0x001a, 0xf78d, 0x9196, 0x001a, 0x568e, 0x001a, 0x001a, 0x001a, 0x839e, 0x001a, 0x001a, 0x001a, 0x4f95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f9e, 0x001a, 0xb189, 0x849e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x959e, 0x859e, 0x001a, 0xc097, 0x001a, 0x8c9e, 0x001a, 0x7e94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x949e, 0x001a, 0x879e, 0x001a, 0x001a, 0x001a, 0xb288, 0x899e, 0x001a, 0x001a, 0x5b8d, 0x001a, 0x001a, 0x001a, 0x8b9e, 0x001a, 0x8a9e, 0x001a, 0x869e, 0x919e, 0x001a, 0xbd8f, 0x001a, 0x001a, 0x001a, 0xeb9a, 0xe68c, 0x9c97, 0x001a, 0x001a, 0x001a, 0x001a, 0x889e, 0x001a, 0xf292, 0x428a, 0xab8d, 0x001a, 0x809e, 0x001a, 0x909e, 0x818a, 0x001a, 0x001a, 0x8e9e, 0x929e, 0x001a, 0x8e93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc8a, 0x001a, 0xb09e, 0x001a, 0x48ed, 0xc796, 0x979e, 0xfb8a, 0x001a, 0x9e9e, 0x001a, 0xcbed, 0x001a, 0x001a, 0x5f96, 0x001a, 0x9f9e, 0xa19e, 0x001a, 0xa59e, 0x999e, 0x001a, 0x4992, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f93, 0xa99e, 0x9c9e, 0x001a, 0xa69e, 0x001a, 0x001a, 0x001a, 0xa09e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5890, 0xaa9e, 0x001a, 0x001a, 0xb190, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa89e, 0xbb8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f98, 0x969e, 0x001a, 0x001a, 0xa49e, 0xd688, 0x001a, 0x001a, 0x989e, 0x001a, 0x001a, 0xb896, 0x9d9e, 0x4190, 0xc592, 0x939e, 0x001a, 0x001a, 0xa39e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a90, 0xad9e, 0x918a, 0x9f8c, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf9e, 0x9a9e, 0xae9e, 0x001a, 0xa79e, 0x9b9e, 0x001a, 0xab9e, 0x001a, 0xac9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbd9e, 0x001a, 0x001a, 0x001a, 0xcc93, 0x001a, 0xa29e, 0x001a, 0x001a, 0xb99e, 0x001a, 0x001a, 0x001a, 0xbb9e, 0x001a, 0xd692, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9695, 0xb69e, 0xc891, 0x001a, 0x001a, 0x001a, 0xbc9e, 0x5e91, 0x001a, 0xb39e, 0xc09e, 0xbf9e, 0x001a, 0xed93, 0xbe9e, 0xe893, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcded, 0x001a, 0xc29e, 0xb59e, 0x001a, 0xc68b, 0xb89e, 0x7c8f, 0x001a, 0x001a, 0x001a, 0x8094, 0xba9e, 0xc98b, 0x001a, 0xb29e, 0xb49e, 0xb19e, 0x001a, 0x001a, 0x4f98, 0x798a, 0xb79e, 0x001a, 0x001a, 0xc19e, 0x548a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe58d, 0x001a, 0x001a, 0x001a, 0x7c89, 0x001a, 0x001a, 0xd29e, 0x001a, 0x001a, 0x5098, 0xd59e, 0x001a, 0x001a, 0xcfed, 0x001a, 0x001a, 0x5990, 0xd49e, 0x001a, 0x001a, 0x001a, 0xd39e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd09e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc49e, 0x001a, 0x001a, 0xe19e, 0xc39e, 0x001a, 0xd69e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce9e, 0x001a, 0x001a, 0xc99e, 0xc69e, 0x001a, 0xc79e, 0x001a, 0xcf9e, 0x001a, 0x001a, 0x001a, 0xa0ea, 0x001a, 0x001a, 0xcc9e, 0x5c8d, 0xc692, 0x8491, 0xca9e, 0x001a, 0xc59e, 0x001a, 0x001a, 0xc89e, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c97, 0x8a96, 0x001a, 0x001a, 0x001a, 0xcd9e, 0xd79e, 0x001a, 0x001a, 0x001a, 0xd0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf9e, 0xd89e, 0x001a, 0x001a, 0xe59e, 0x001a, 0xe39e, 0x001a, 0x001a, 0x001a, 0x001a, 0xde9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdd9e, 0x001a, 0xce92, 0x001a, 0x8591, 0x001a, 0xdb9e, 0x001a, 0x001a, 0xd99e, 0x001a, 0x001a, 0xe09e, 0x001a, 0x001a, 0x001a, 0x001a, 0xe69e, 0xf394, 0xec9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe79e, 0xea9e, 0xe49e, 0x001a, 0x001a, 0x9492, 0x001a, 0x5795, 0x001a, 0xda9e, 0x001a, 0x001a, 0xe29e, 0xbe8f, 0x001a, 0xcd96, 0xf69e, 0xe99e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa08c, 0xa189, 0x7e8a, 0x001a, 0x001a, 0xd19e, 0x001a, 0xd1ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xbf8f, 0xee9e, 0x001a, 0xf59e, 0xf78e, 0x928a, 0x001a, 0x001a, 0x4d92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeb9e, 0x001a, 0xd3ed, 0xf09e, 0xf49e, 0x001a, 0x001a, 0xb48b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b8b, 0xf29e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x408b, 0x001a, 0xc993, 0xf19e, 0x001a, 0x001a, 0x001a, 0xf39e, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed9e, 0xd4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0xef9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5ed, 0x808a, 0x6892, 0x001a, 0x001a, 0x001a, 0xfa9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf89e, 0xe78c, 0x001a, 0xf79e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x409f, 0x001a, 0x001a, 0x001a, 0x001a, 0x779e, 0x001a, 0x001a, 0x001a, 0xf99e, 0x001a, 0xfb9e, 0xfc9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b9f, 0x001a, 0x479f, 0x001a, 0x8d9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x469f, 0x001a, 0x001a, 0x001a, 0x001a, 0x459f, 0x001a, 0x001a, 0x429f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe89e, 0x449f, 0x439f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x499f, 0x001a, 0x4598, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c9f, 0xf98b, 0x001a, 0x001a, 0x489f, 0x4a9f, 0x001a, 0x001a, 0xd6ed, 0x001a, 0xd7ed, 0x001a, 0x001a, 0x001a, 0xa594, 0x001a, 0x4d9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x519f, 0x4e9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9397, 0x4f9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xdc9e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x529f, 0x001a, 0x001a, 0x001a, 0x539f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5489, 0x001a, 0x559f, 0x878c, 0x9f8e, 0x001a, 0xd38b, 0x001a, 0x001a, 0x001a, 0xa289, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7e97, 0x001a, 0x001a, 0x001a, 0x001a, 0x579f, 0x569f, 0x599f, 0x5c8b, 0x001a, 0x001a, 0xd48b, 0xbc8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c9f, 0x001a, 0x001a, 0x001a, 0x5b9f, 0x001a, 0x5d9f, 0x001a, 0x001a, 0xcc89, 0x001a, 0x5692, 0x001a, 0x5e9f, 0x001a, 0x001a, 0xbd8a, 0x609f, 0x001a, 0x001a, 0x001a, 0x001a, 0x5f9f, 0x001a, 0x619f, 0x001a, 0x001a, 0x001a, 0x629f, 0x001a, 0x639f, 0x7e8e, 0xb390, 0x9f8d, 0x001a, 0x9095, 0x001a, 0x001a, 0xe095, 0x6398, 0x001a, 0x001a, 0x001a, 0x001a, 0x958e, 0x001a, 0x001a, 0x001a, 0xce8d, 0xf097, 0x001a, 0x001a, 0x001a, 0x649f, 0x659f, 0x001a, 0x808e, 0x001a, 0x001a, 0x001a, 0x669f, 0x679f, 0x001a, 0x001a, 0x699f, 0x689f, 0x001a, 0x7796, 0x001a, 0x001a, 0x7d8f, 0xea8e, 0x638e, 0x001a, 0x6a9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c9f, 0x4290, 0x001a, 0x6b9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f9f, 0x709f, 0x001a, 0x001a, 0x001a, 0x719f, 0x001a, 0x739f, 0x729f, 0x749f, 0xa389, 0x6992, 0x001a, 0x759f, 0x001a, 0x001a, 0x458e, 0x6b8a, 0x769f, 0x001a, 0x001a, 0x6193, 0xca9a, 0x001a, 0x001a, 0x001a, 0x001a, 0x428b, 0x779f, 0x001a, 0x001a, 0x001a, 0x001a, 0x789f, 0x001a, 0xea95, 0x8896, 0x001a, 0x001a, 0x001a, 0xc593, 0x799f, 0xe494, 0x001a, 0xd8ed, 0x001a, 0xf994, 0x001a, 0x001a, 0xd196, 0x001a, 0x001a, 0x001a, 0x7a9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c9f, 0x7b9f, 0x001a, 0x001a, 0x7e9f, 0x001a, 0x001a, 0x001a, 0x7d9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x819f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x818e, 0x001a, 0xaf96, 0x001a, 0x829f, 0x839f, 0x001a, 0x001a, 0x438b, 0x001a, 0x001a, 0x001a, 0x849f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x869f, 0x859f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8590, 0x001a, 0x001a, 0x5895, 0x6989, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc394, 0xd9ed, 0xf392, 0x608f, 0x818b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc494, 0x001a, 0xac8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x889f, 0x001a, 0xbe8a, 0x001a, 0x001a, 0x9889, 0x001a, 0xdaed, 0xf093, 0x879f, 0x5d8d, 0x7292, 0x001a, 0x899f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x919f, 0x001a, 0x8a9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xdced, 0xbf91, 0x001a, 0x828b, 0x929f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x888c, 0x001a, 0x001a, 0x448b, 0x909f, 0x001a, 0x001a, 0x8e9f, 0x8b9f, 0x8097, 0x001a, 0x001a, 0xdbed, 0x001a, 0xbe92, 0x001a, 0x001a, 0x001a, 0xd793, 0x8c9f, 0x001a, 0x001a, 0x949f, 0x001a, 0x939f, 0x428c, 0x001a, 0x001a, 0xab89, 0x001a, 0x001a, 0xb98d, 0x8d9f, 0x8f9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7696, 0xf291, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9796, 0x001a, 0x001a, 0x9c9f, 0x001a, 0x001a, 0x9d9f, 0x001a, 0xcd89, 0x001a, 0x001a, 0x001a, 0x001a, 0xa695, 0xfb96, 0x9f9f, 0xa18e, 0xc08f, 0x989f, 0x9e9f, 0x8889, 0x001a, 0xb58b, 0x001a, 0x001a, 0x959f, 0x9a9f, 0x001a, 0x001a, 0x001a, 0xf290, 0x9194, 0x001a, 0xe594, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x979f, 0x001a, 0x4096, 0x001a, 0x999f, 0x001a, 0xa29f, 0xdded, 0xa09f, 0x001a, 0x9b9f, 0x001a, 0x001a, 0x001a, 0x4196, 0x6794, 0x838b, 0x001a, 0x4493, 0x001a, 0x001a, 0x8d92, 0x001a, 0xa39f, 0x001a, 0x001a, 0x001a, 0x001a, 0xa19f, 0xd791, 0x969f, 0x001a, 0x6a89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdeed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d97, 0xae9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xad9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xf490, 0x001a, 0xaa9f, 0x001a, 0x8c97, 0x001a, 0x001a, 0xb493, 0xa49f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc392, 0x001a, 0x001a, 0x001a, 0x6b89, 0x5e8d, 0xa79f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x468f, 0xac9f, 0x001a, 0xab9f, 0xa69f, 0x001a, 0xa99f, 0x001a, 0x001a, 0x888a, 0x001a, 0xa89f, 0x6894, 0x001a, 0x001a, 0xac97, 0x001a, 0x001a, 0xf28f, 0xf390, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb49f, 0xb29f, 0x001a, 0x6c95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf9f, 0xb19f, 0x001a, 0x5989, 0x001a, 0x001a, 0x5f8d, 0x5198, 0x001a, 0x5c8a, 0x001a, 0x8295, 0xe0ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x8197, 0x001a, 0x001a, 0x438a, 0x5a90, 0xb39f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb89f, 0x001a, 0xdfed, 0xc18f, 0x001a, 0x001a, 0x001a, 0x4f97, 0x001a, 0xb59f, 0x001a, 0x001a, 0x001a, 0x001a, 0xb09f, 0x001a, 0xb69f, 0xe1ed, 0x001a, 0x001a, 0xdc97, 0x001a, 0x9393, 0xc093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2ed, 0x001a, 0x001a, 0x558a, 0x001a, 0x001a, 0x7489, 0x001a, 0x001a, 0xbc9f, 0x001a, 0x001a, 0xbf9f, 0x001a, 0x001a, 0x001a, 0xc197, 0x001a, 0x001a, 0x001a, 0x8497, 0x001a, 0x001a, 0x001a, 0x001a, 0xc69f, 0xc09f, 0xbd9f, 0x001a, 0x001a, 0x001a, 0xd297, 0xc39f, 0x001a, 0x001a, 0xe3ed, 0x001a, 0x698f, 0xc59f, 0x001a, 0x001a, 0xca9f, 0x001a, 0x001a, 0x9193, 0xc89f, 0x001a, 0x001a, 0x001a, 0x001a, 0xc29f, 0x001a, 0x001a, 0x5792, 0x001a, 0x001a, 0xc99f, 0x001a, 0xbe9f, 0x001a, 0xc49f, 0x001a, 0xcb9f, 0xfa88, 0xc19f, 0x001a, 0xcc9f, 0x001a, 0x001a, 0x5b90, 0xe5ed, 0x7e8f, 0x001a, 0xa395, 0x001a, 0xac8d, 0xe4ed, 0xb99f, 0xc79f, 0x5993, 0xe6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb490, 0x001a, 0x898a, 0xcf8d, 0xc28f, 0xbb9f, 0x618f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6b8c, 0x001a, 0xba9f, 0x001a, 0x001a, 0x001a, 0xd09f, 0x8d8f, 0xb88c, 0x001a, 0xdf9f, 0x001a, 0xd99f, 0x948b, 0x6e93, 0x001a, 0xd49f, 0xdd9f, 0xad88, 0x5189, 0xe9ed, 0x001a, 0xb789, 0x001a, 0xd69f, 0xaa91, 0xcd9f, 0xcf9f, 0x608d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe09f, 0xe7ed, 0xdb9f, 0x001a, 0xeaed, 0x001a, 0xd39f, 0x001a, 0x001a, 0x001a, 0x001a, 0xda9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa996, 0x001a, 0x001a, 0xd89f, 0xdc9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce8c, 0x001a, 0xc38f, 0x001a, 0x001a, 0x5892, 0xe8ed, 0x001a, 0x001a, 0xd29f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e97, 0x001a, 0x001a, 0x001a, 0xd59f, 0x001a, 0x001a, 0xce9f, 0x9293, 0x001a, 0x001a, 0xd19f, 0x001a, 0x001a, 0x001a, 0xd79f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7098, 0xbc8e, 0x9e96, 0x001a, 0xe19f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xac94, 0x001a, 0x001a, 0xed9f, 0xb98c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x808f, 0x001a, 0xe39f, 0x001a, 0x001a, 0x001a, 0xad97, 0x618d, 0x001a, 0xf09f, 0x001a, 0x001a, 0xec88, 0x001a, 0x001a, 0xee9f, 0x001a, 0x001a, 0x001a, 0x001a, 0xe29f, 0x001a, 0x001a, 0x001a, 0x001a, 0xe89f, 0x001a, 0x001a, 0xea9f, 0x001a, 0x001a, 0x001a, 0x6e97, 0xe59f, 0x001a, 0x001a, 0x4d93, 0x001a, 0x001a, 0xe79f, 0x001a, 0xebed, 0x001a, 0x001a, 0xef9f, 0x001a, 0xe99f, 0xc596, 0x001a, 0x001a, 0x001a, 0xe49f, 0x001a, 0xa08e, 0xfc9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a8a, 0x001a, 0xe69f, 0xeb9f, 0xec9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xea91, 0xd891, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf49f, 0x001a, 0x001a, 0xfa9f, 0x001a, 0x001a, 0xf89f, 0x001a, 0x4893, 0x001a, 0x001a, 0x42e0, 0xf59f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf69f, 0xde9f, 0x001a, 0x998b, 0x5995, 0x001a, 0x001a, 0x001a, 0xbd8e, 0x001a, 0x001a, 0x978d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5298, 0x001a, 0xf29f, 0x001a, 0x41e0, 0x8989, 0x8691, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9994, 0x001a, 0xbf8a, 0xf897, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9f96, 0xd092, 0x001a, 0x001a, 0x001a, 0x001a, 0xf99f, 0xfb9f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5191, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40e0, 0xf79f, 0x001a, 0xf19f, 0x001a, 0x001a, 0x001a, 0xc18a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x898c, 0x001a, 0x001a, 0x001a, 0x4ee0, 0x001a, 0x001a, 0x49e0, 0xf690, 0x001a, 0x001a, 0x838a, 0x001a, 0x001a, 0x001a, 0x001a, 0x818f, 0x001a, 0x52e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4be0, 0xaa92, 0x48e0, 0xd792, 0x001a, 0x001a, 0x001a, 0x6be0, 0x001a, 0x001a, 0x001a, 0x45e0, 0x001a, 0x44e0, 0x001a, 0x4de0, 0x001a, 0x001a, 0x001a, 0x47e0, 0x46e0, 0x4ce0, 0x001a, 0x9f90, 0x001a, 0x43e0, 0x001a, 0xeced, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4fe0, 0x001a, 0x001a, 0x50e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc08a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x55e0, 0x001a, 0x54e0, 0x56e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6293, 0x001a, 0x53e0, 0x001a, 0xeded, 0x001a, 0x001a, 0x001a, 0x57e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x838c, 0xf791, 0x51e0, 0x5a94, 0x001a, 0x001a, 0x58e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5de0, 0x5be0, 0x001a, 0x001a, 0x5ee0, 0x001a, 0x001a, 0x61e0, 0x001a, 0x001a, 0x001a, 0x5ae0, 0x8a8d, 0x4794, 0x001a, 0x001a, 0xb79f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9497, 0x5ce0, 0x001a, 0x60e0, 0xf391, 0x001a, 0x5fe0, 0x001a, 0x4ae0, 0x001a, 0xeeed, 0x89e8, 0x001a, 0x001a, 0x001a, 0x64e0, 0x001a, 0x001a, 0x001a, 0x68e0, 0x001a, 0x001a, 0x66e0, 0x001a, 0x001a, 0x001a, 0xefed, 0x001a, 0xf0ed, 0x001a, 0x62e0, 0x001a, 0x63e0, 0x001a, 0x001a, 0x001a, 0x67e0, 0x001a, 0x65e0, 0x001a, 0x001a, 0x001a, 0x6d95, 0x001a, 0x001a, 0x6de0, 0x001a, 0x6ae0, 0x69e0, 0x001a, 0x6ce0, 0xd293, 0x6ee0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9592, 0xeb91, 0xf1ed, 0x001a, 0x001a, 0x001a, 0xa390, 0x001a, 0x001a, 0x001a, 0x6fe0, 0x001a, 0x71e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf39f, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe593, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xce89, 0x001a, 0x001a, 0x001a, 0x9493, 0x448a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x848b, 0x001a, 0x001a, 0x001a, 0xdc8e, 0xd08d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2ed, 0x001a, 0x001a, 0x001a, 0x4698, 0x8690, 0x001a, 0x001a, 0x001a, 0x8a89, 0x001a, 0x001a, 0x001a, 0x75e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3ed, 0x78e0, 0x5992, 0x7be0, 0x76e0, 0x001a, 0x001a, 0x001a, 0x7ae0, 0x001a, 0x001a, 0x001a, 0x001a, 0x79e0, 0x5f93, 0xd788, 0x46ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf397, 0x001a, 0x001a, 0x7de0, 0x001a, 0x001a, 0x001a, 0x4789, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e0, 0x001a, 0x001a, 0x001a, 0x7ee0, 0x001a, 0x7ce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4296, 0x001a, 0x001a, 0x001a, 0x82e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x81e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b89, 0x001a, 0x001a, 0x001a, 0x001a, 0x84e0, 0xb095, 0x001a, 0x83e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb396, 0x001a, 0x001a, 0x001a, 0x001a, 0xc58f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5291, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc48f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7ed, 0xf8ed, 0x001a, 0xf997, 0x001a, 0x001a, 0x8ae0, 0x001a, 0xf790, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x86e0, 0x8be0, 0x001a, 0x001a, 0x8c89, 0x001a, 0x001a, 0xf6ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89e0, 0x001a, 0x8194, 0x85e0, 0x88e0, 0xc68f, 0x001a, 0xcf94, 0x001a, 0x001a, 0x8ce0, 0x001a, 0xcf8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf890, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8fe0, 0x001a, 0x001a, 0x001a, 0x87e0, 0x001a, 0x468c, 0x001a, 0x001a, 0x001a, 0x001a, 0x8de0, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f97, 0x90e0, 0x001a, 0x001a, 0x001a, 0xa4ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x91e0, 0x001a, 0x001a, 0x001a, 0x92e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x94e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x95e0, 0x001a, 0x001a, 0xfaed, 0x001a, 0x5294, 0x001a, 0x001a, 0x001a, 0x001a, 0x9593, 0x97e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x99e0, 0x001a, 0xd397, 0x001a, 0x96e0, 0x001a, 0x98e0, 0x8d89, 0x001a, 0x93e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a9a, 0x9ae0, 0x001a, 0x001a, 0x001a, 0x001a, 0x8791, 0x578e, 0x9ce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x9be0, 0x4390, 0xd799, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9de0, 0x001a, 0x001a, 0x001a, 0x9fe0, 0x001a, 0x8ee0, 0x9ee0, 0x001a, 0xfbed, 0xa0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e0, 0x001a, 0x001a, 0xa2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e0, 0x001a, 0xdc92, 0x001a, 0xa6e0, 0xa5e0, 0x001a, 0x001a, 0xa7e0, 0x001a, 0xa8e0, 0x001a, 0x001a, 0xdd8e, 0x8395, 0x001a, 0x001a, 0x001a, 0xea96, 0xa9e0, 0xaae0, 0x7591, 0xa28e, 0xabe0, 0xace0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xade0, 0xd095, 0xc594, 0x001a, 0x001a, 0xaee0, 0x7694, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xab92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xafe0, 0xe589, 0x001a, 0x8d8b, 0x001a, 0xc496, 0x001a, 0xb496, 0x001a, 0xb289, 0x5398, 0x001a, 0x001a, 0x001a, 0x001a, 0x7196, 0x001a, 0xa895, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb590, 0x001a, 0xb0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xc193, 0x001a, 0x001a, 0x001a, 0xa18c, 0xb1e0, 0x001a, 0xd28d, 0xb3e0, 0xb2e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb5e0, 0x001a, 0x001a, 0x001a, 0xb6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d8b, 0x001a, 0xb7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xa28c, 0x001a, 0x001a, 0xc694, 0x001a, 0xfced, 0xbae0, 0x001a, 0x001a, 0x001a, 0xf38f, 0x001a, 0x001a, 0xb9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x40ee, 0x001a, 0x001a, 0x001a, 0xb68b, 0xbbe0, 0xbde0, 0x001a, 0xbce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee0, 0x001a, 0xcf8c, 0x001a, 0xbfe0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe78b, 0x001a, 0x5f91, 0x001a, 0x9d8d, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e0, 0xc2e0, 0xc0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeb8e, 0x001a, 0x001a, 0xc693, 0xb78b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e0, 0x4b92, 0xc3e0, 0x001a, 0x001a, 0x5498, 0x8294, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e0, 0xc6e0, 0x001a, 0x001a, 0x001a, 0xd296, 0xc8e0, 0xcae0, 0x001a, 0xc297, 0x001a, 0x001a, 0x001a, 0x001a, 0x41ee, 0xcee0, 0x001a, 0x001a, 0x001a, 0xcde0, 0x9692, 0x4c94, 0x001a, 0x001a, 0xa38c, 0xcce0, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe0, 0x001a, 0x5097, 0x5197, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe0, 0x8e89, 0x001a, 0x001a, 0x001a, 0x001a, 0x968d, 0x828e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e0, 0xd1e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x628f, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e0, 0x001a, 0xd4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e0, 0x001a, 0x6c8a, 0x001a, 0x001a, 0xd8e0, 0x001a, 0x43ee, 0xd7e0, 0x001a, 0xdae0, 0xd9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xba8c, 0x001a, 0x001a, 0xa697, 0x001a, 0xca8b, 0x001a, 0xa489, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe88b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe697, 0xdce0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee0, 0x001a, 0x44ee, 0x001a, 0x001a, 0xdfe0, 0x001a, 0xcf89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe0, 0x45ee, 0x588e, 0x001a, 0x001a, 0xbf92, 0xdde0, 0x001a, 0x001a, 0x001a, 0x48ee, 0x001a, 0x001a, 0x001a, 0x46ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e0, 0x001a, 0xec8e, 0x001a, 0x001a, 0x47ee, 0x001a, 0xe0e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x5d8c, 0x001a, 0x001a, 0xc794, 0xe1e0, 0x001a, 0x001a, 0xfce0, 0x001a, 0x001a, 0x001a, 0x4aee, 0x001a, 0x001a, 0xe7e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x858b, 0x001a, 0xe4e0, 0x9d97, 0x49ee, 0x001a, 0xae97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf491, 0x001a, 0x001a, 0xe6e0, 0x4bee, 0x001a, 0x001a, 0x4dee, 0x4cee, 0x001a, 0x001a, 0x001a, 0x4eee, 0x001a, 0x001a, 0x001a, 0xe8e0, 0xd497, 0xd58b, 0xfa94, 0x6994, 0x001a, 0x001a, 0x001a, 0xe9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe0, 0x001a, 0xeee0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae0, 0x001a, 0x001a, 0x001a, 0xede0, 0xe88c, 0x6c89, 0xefe0, 0x001a, 0x9090, 0xece0, 0xda97, 0x001a, 0x4fee, 0xf2e0, 0xa2ea, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e0, 0xf3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e0, 0xf1e0, 0x001a, 0x001a, 0xba8d, 0x001a, 0x001a, 0xf4e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x9e97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50ee, 0x001a, 0xf6e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e0, 0x51ee, 0x001a, 0x001a, 0xe3e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc28a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa38e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae0, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe0, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5a89, 0x001a, 0x001a, 0x001a, 0x40e1, 0x001a, 0x5a95, 0x41e1, 0x001a, 0x001a, 0xa28a, 0x42e1, 0x001a, 0x43e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e1, 0x001a, 0x46e1, 0x47e1, 0x45e1, 0x001a, 0x001a, 0x001a, 0x7295, 0x49e1, 0x48e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x52ee, 0x001a, 0x4be1, 0x4ae1, 0x4ce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de1, 0x4fe1, 0x4ee1, 0x001a, 0x001a, 0x998d, 0x001a, 0x51e1, 0x001a, 0x50e1, 0x001a, 0x001a, 0xc38a, 0x001a, 0x7290, 0x001a, 0x5b93, 0x001a, 0x52e1, 0xb690, 0x001a, 0x001a, 0x001a, 0x598e, 0x001a, 0x9989, 0x53e1, 0x001a, 0x7097, 0x001a, 0x001a, 0xe195, 0x54e1, 0x001a, 0x001a, 0x8ced, 0x6393, 0x5297, 0x628d, 0x5c90, 0x001a, 0x001a, 0x001a, 0x6a92, 0xb299, 0x001a, 0xac92, 0xe689, 0x55e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e1, 0x001a, 0x5be1, 0x001a, 0x001a, 0x59e1, 0x58e1, 0xc09d, 0x458a, 0x57e1, 0x001a, 0xd888, 0x001a, 0xa894, 0x001a, 0x001a, 0xc894, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf97, 0x5ce1, 0x5ae1, 0x7b92, 0xa490, 0x001a, 0x001a, 0xa994, 0x001a, 0x4c95, 0x001a, 0x5ee1, 0xaa97, 0x6c8c, 0x5fe1, 0x001a, 0x5de1, 0xd494, 0x60e1, 0x001a, 0x61e1, 0x001a, 0x53ee, 0xd988, 0x001a, 0x001a, 0xf48f, 0x66e1, 0x001a, 0x63e1, 0xeb93, 0x62e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x458b, 0x001a, 0x001a, 0x69e1, 0x001a, 0x001a, 0x001a, 0x64e1, 0x65e1, 0x001a, 0x68e1, 0x67e1, 0x4495, 0x001a, 0x001a, 0x6191, 0x6091, 0x001a, 0x5e8b, 0x001a, 0x001a, 0x6ae1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be1, 0x001a, 0x001a, 0x6ce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee1, 0x001a, 0x6de1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7589, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76e1, 0xe694, 0x70e1, 0x001a, 0x72e1, 0x001a, 0x001a, 0x74e1, 0x5d90, 0x001a, 0x001a, 0x75e1, 0x73e1, 0xbe8e, 0x001a, 0x001a, 0x001a, 0x6fe1, 0x71e1, 0x001a, 0x6195, 0x001a, 0xc78f, 0x001a, 0x001a, 0x78e1, 0x001a, 0x001a, 0x77e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x79e1, 0x001a, 0xa48e, 0xad8d, 0x001a, 0x001a, 0x9793, 0x7ae1, 0x001a, 0xc992, 0x001a, 0x001a, 0x7ce1, 0x001a, 0x001a, 0x001a, 0x9f97, 0x7be1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8991, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x82e1, 0x001a, 0x84e1, 0x85e1, 0x7392, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x83e1, 0x001a, 0x80e1, 0x001a, 0x7de1, 0x7ee1, 0x001a, 0x81e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e1, 0x001a, 0x86e1, 0x001a, 0x87e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89e1, 0x8be1, 0x8ce1, 0x8de1, 0x001a, 0x8ee1, 0x001a, 0x001a, 0x8ae1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x90e1, 0x001a, 0x001a, 0x001a, 0x8fe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x91e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc397, 0x001a, 0x001a, 0x001a, 0x94e1, 0x92e1, 0x93e1, 0x001a, 0x001a, 0x001a, 0xe08a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc96, 0x001a, 0x001a, 0x001a, 0xc895, 0x001a, 0x96e1, 0x001a, 0x001a, 0x001a, 0x95e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x97e1, 0x98e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ce1, 0x99e1, 0x9ae1, 0x9be1, 0x001a, 0x9de1, 0x001a, 0x001a, 0x001a, 0x9ee1, 0x001a, 0x9fe1, 0x001a, 0x001a, 0x001a, 0xa0e1, 0x001a, 0xa1e1, 0x001a, 0xad94, 0x6f93, 0xa2e1, 0x9294, 0x5395, 0x001a, 0xa3e1, 0x001a, 0x54ee, 0xa4e1, 0x4993, 0x001a, 0x468a, 0x638d, 0xa5e1, 0x001a, 0x001a, 0xa6e1, 0x001a, 0x001a, 0xa7e1, 0x001a, 0x488e, 0x001a, 0x001a, 0xa9e1, 0x001a, 0x001a, 0xa8e1, 0x001a, 0x001a, 0xaae1, 0xabe1, 0x57ee, 0x55ee, 0x001a, 0x56ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe794, 0x001a, 0xace1, 0x001a, 0x001a, 0x001a, 0xade1, 0x001a, 0x001a, 0x89ea, 0xaee1, 0xafe1, 0xb0e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x4d8e, 0x001a, 0x001a, 0xb1e1, 0x7594, 0x001a, 0x001a, 0x7e96, 0x001a, 0x6d89, 0x001a, 0x7689, 0x001a, 0x001a, 0xb2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e1, 0x001a, 0x001a, 0x001a, 0xb3e1, 0x9093, 0x001a, 0x001a, 0x001a, 0xb790, 0x589f, 0x001a, 0xb5e1, 0xbf96, 0x001a, 0xb6e1, 0x001a, 0xc48a, 0xd594, 0xb7e1, 0x001a, 0xb8e1, 0x001a, 0x001a, 0xb9e1, 0x001a, 0x001a, 0x001a, 0xda96, 0x001a, 0x001a, 0x001a, 0xd396, 0x001a, 0xbc92, 0x001a, 0x001a, 0x001a, 0x8a91, 0x001a, 0x001a, 0xbbe1, 0x001a, 0x001a, 0x828f, 0x001a, 0x001a, 0xc88f, 0x001a, 0x001a, 0xbee1, 0x001a, 0x001a, 0xbde1, 0xbce1, 0xfb94, 0x001a, 0xc58a, 0xa78c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4e1, 0x001a, 0x001a, 0xc1e1, 0x5e90, 0xb096, 0x001a, 0x001a, 0x001a, 0xc0e1, 0xc2e1, 0xc3e1, 0x001a, 0x001a, 0xbfe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e1, 0xc6e1, 0x001a, 0xad92, 0x001a, 0xe18a, 0x001a, 0x001a, 0x001a, 0x8592, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5aee, 0xc7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e1, 0xcbe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8790, 0x001a, 0xc293, 0x001a, 0xcce1, 0x7296, 0x001a, 0xc9e1, 0x001a, 0x001a, 0xcae1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe1, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee1, 0xcde1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e1, 0x001a, 0x001a, 0xd0e1, 0x001a, 0x001a, 0xd2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e1, 0x001a, 0xd3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x758f, 0xc497, 0x001a, 0x001a, 0xd5e1, 0x001a, 0x001a, 0xb593, 0x001a, 0x001a, 0xd6e1, 0x001a, 0x001a, 0xd7e1, 0x001a, 0xdbe1, 0xd9e1, 0xdae1, 0x001a, 0xd8e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdce1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee1, 0x001a, 0x001a, 0xdfe1, 0xb596, 0xe0e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee96, 0xe1e1, 0x001a, 0x6d92, 0x001a, 0x8a94, 0x001a, 0xe98b, 0x001a, 0x001a, 0x001a, 0x5a92, 0xe2e1, 0xb88b, 0x001a, 0x001a, 0x001a, 0xce90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbb8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e1, 0x001a, 0xa48c, 0xd38d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e1, 0x5cee, 0x001a, 0x001a, 0x001a, 0x7593, 0xd48d, 0x6d8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4396, 0x001a, 0x6a94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7693, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5dee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc98f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5eee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb097, 0x648d, 0x001a, 0x001a, 0xa58c, 0x001a, 0x001a, 0xa194, 0x001a, 0xebe1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fee, 0x001a, 0xede1, 0x001a, 0x001a, 0x001a, 0x001a, 0xe98c, 0x001a, 0x001a, 0x001a, 0x001a, 0xece1, 0xf492, 0x001a, 0x001a, 0x001a, 0x001a, 0xefe1, 0x568a, 0xeae1, 0x001a, 0x001a, 0xe894, 0x001a, 0x4f89, 0x001a, 0xea8d, 0x001a, 0x7198, 0x001a, 0x001a, 0xeee1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e1, 0x001a, 0x001a, 0x001a, 0xc995, 0x001a, 0xd790, 0xf2e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xf3e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d8a, 0x001a, 0xf9e1, 0x001a, 0xf8e1, 0x001a, 0x001a, 0xa58e, 0x001a, 0x001a, 0x001a, 0xfae1, 0xf5e1, 0x001a, 0x001a, 0x001a, 0xfbe1, 0xf6e1, 0x001a, 0x001a, 0x001a, 0x001a, 0xd694, 0xf4e1, 0x001a, 0x001a, 0xf7e1, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x40e2, 0x8196, 0x001a, 0x001a, 0x001a, 0xfce1, 0x001a, 0x001a, 0xe988, 0x001a, 0x001a, 0x001a, 0x001a, 0x43e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x42e2, 0x001a, 0x001a, 0x001a, 0xca8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6291, 0x001a, 0x001a, 0x46e2, 0x45e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x47e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e1, 0x001a, 0x001a, 0x001a, 0xe8e1, 0x49e2, 0x48e2, 0x001a, 0x001a, 0x001a, 0x60ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa68e, 0x001a, 0xe797, 0x001a, 0xd08e, 0x001a, 0x4ae2, 0x568c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5f8b, 0x468b, 0x838e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5397, 0x001a, 0x001a, 0x50e2, 0x001a, 0x4fe2, 0x6391, 0x4ce2, 0x001a, 0x001a, 0x4ee2, 0x001a, 0x001a, 0x6a8f, 0x5f90, 0x4de2, 0x4be2, 0x001a, 0x4994, 0x001a, 0x001a, 0xcb8f, 0x001a, 0x001a, 0x5b95, 0x001a, 0x001a, 0x001a, 0x001a, 0xd58d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9893, 0x001a, 0x001a, 0x51e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x52e2, 0x68e2, 0xd68b, 0x001a, 0x001a, 0x5c98, 0x5491, 0x001a, 0x001a, 0x001a, 0x001a, 0x53e2, 0x001a, 0x001a, 0xd089, 0xf592, 0x9f95, 0x001a, 0x001a, 0x001a, 0x001a, 0x64ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66ee, 0x001a, 0x54e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9a8b, 0x55e2, 0x001a, 0x001a, 0x57e2, 0x001a, 0x001a, 0x001a, 0x58e2, 0x001a, 0x4894, 0x001a, 0x001a, 0x59e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ae2, 0x5be2, 0x001a, 0x001a, 0xd78b, 0xd189, 0xc393, 0x478f, 0x848e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ce2, 0x001a, 0x488f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc889, 0x6295, 0x001a, 0x001a, 0x5de2, 0x001a, 0x001a, 0xe994, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6491, 0x001a, 0x60e2, 0x001a, 0x61e2, 0x8994, 0x001a, 0x6090, 0x5ee2, 0x001a, 0x8192, 0x001a, 0x001a, 0x5fe2, 0x001a, 0x001a, 0x001a, 0xcc8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xda88, 0x001a, 0x001a, 0x001a, 0x001a, 0x488b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62e2, 0x001a, 0x001a, 0xf692, 0x001a, 0x63e2, 0xc590, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xab96, 0x001a, 0x001a, 0x4295, 0x64e2, 0x65e2, 0x7492, 0x001a, 0xc597, 0x001a, 0x001a, 0x67e2, 0x66e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed8e, 0x001a, 0x001a, 0x69e2, 0xee88, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ce2, 0x001a, 0x001a, 0x001a, 0x6ae2, 0xd289, 0x6d8c, 0x6be2, 0x658d, 0x928d, 0x001a, 0xe495, 0x6de2, 0x001a, 0x001a, 0x7396, 0x001a, 0x001a, 0x6fe2, 0x001a, 0x001a, 0x001a, 0xcf90, 0x6e89, 0xb889, 0xaa88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x70e2, 0x71e2, 0xf58f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e2, 0x001a, 0x6e8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e2, 0x001a, 0x001a, 0x001a, 0x8a8c, 0x001a, 0x868b, 0x001a, 0x001a, 0x75e2, 0xf38b, 0x001a, 0x001a, 0x76e2, 0x001a, 0xfa90, 0x001a, 0xcb93, 0x001a, 0xde90, 0xf38d, 0x001a, 0x001a, 0x001a, 0x77e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8292, 0x8b91, 0x001a, 0x79e2, 0x7be2, 0x78e2, 0x7ae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x418c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ce2, 0x458c, 0x001a, 0x001a, 0x001a, 0x878b, 0x7197, 0x7ee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e2, 0x001a, 0x001a, 0x001a, 0x4d89, 0x001a, 0x001a, 0x001a, 0x001a, 0x83e2, 0x001a, 0x001a, 0x001a, 0x968a, 0x82e2, 0x81e2, 0x001a, 0x85e2, 0x7de2, 0x001a, 0x86e2, 0xa797, 0x001a, 0x87e2, 0x001a, 0x88e2, 0x001a, 0x67ee, 0xf29a, 0x8ae2, 0x001a, 0x89e2, 0x001a, 0x001a, 0x001a, 0x8be2, 0x8ce2, 0x001a, 0xb397, 0x8de2, 0x001a, 0xede8, 0xcd8f, 0x8ee2, 0x8fe2, 0x768f, 0x001a, 0xb693, 0x90e2, 0x68ee, 0x001a, 0x001a, 0x4792, 0x6aee, 0x001a, 0x91e2, 0x001a, 0x5b92, 0x92e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa38b, 0x001a, 0x5e99, 0x7c92, 0xb18e, 0x001a, 0x001a, 0x001a, 0x001a, 0xc68a, 0x001a, 0x001a, 0x93e2, 0x001a, 0xa0e2, 0x001a, 0x96e2, 0x001a, 0x888b, 0x001a, 0x95e2, 0xa2e2, 0x001a, 0x001a, 0x001a, 0x94e2, 0x001a, 0xce8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x98e2, 0x99e2, 0x001a, 0x4a93, 0x001a, 0x001a, 0x9ae2, 0x001a, 0x7d8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7990, 0x8495, 0x001a, 0x9ce2, 0x001a, 0x001a, 0x001a, 0xe691, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x97e2, 0x001a, 0x9be2, 0x9de2, 0x001a, 0x001a, 0xf98d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e2, 0x4d95, 0x001a, 0xa494, 0x9993, 0x001a, 0xd88b, 0xa3e2, 0xa1e2, 0x001a, 0xb394, 0x9ee2, 0x7d92, 0x9b93, 0x001a, 0x9a93, 0x001a, 0xf48d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa6e2, 0x001a, 0xa8e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xabe2, 0x001a, 0xace2, 0x001a, 0xa9e2, 0xaae2, 0x001a, 0x001a, 0xa7e2, 0xa5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcd95, 0xd389, 0x001a, 0x001a, 0x001a, 0xb3e2, 0x001a, 0xb0e2, 0x001a, 0xb5e2, 0x001a, 0x001a, 0xb4e2, 0x001a, 0x9394, 0xa596, 0x001a, 0x5a8e, 0xaee2, 0xb7e2, 0xb2e2, 0x001a, 0xb1e2, 0xade2, 0x6bee, 0xafe2, 0x001a, 0xc78a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c92, 0x001a, 0x001a, 0xfb90, 0x001a, 0x001a, 0x001a, 0xa094, 0x001a, 0x001a, 0xbce2, 0x001a, 0x001a, 0x001a, 0xa294, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf90, 0xb9e2, 0x001a, 0x001a, 0xcd94, 0x001a, 0xbde2, 0xd195, 0x001a, 0x7a92, 0x001a, 0xb8e2, 0xbae2, 0x001a, 0x001a, 0xbbe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee2, 0x001a, 0x001a, 0xc28e, 0x001a, 0x001a, 0x001a, 0xc493, 0xc3e2, 0xc2e2, 0x001a, 0x001a, 0xbfe2, 0x001a, 0x001a, 0x001a, 0x5598, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e2, 0x001a, 0x001a, 0xcce2, 0xc9e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcbe2, 0x001a, 0x001a, 0x001a, 0xc0e2, 0xd399, 0xc7e2, 0xc1e2, 0x001a, 0x001a, 0xcae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e2, 0x001a, 0xc88a, 0x001a, 0xcde2, 0x001a, 0x001a, 0x001a, 0xcee2, 0x001a, 0x001a, 0xcfe2, 0xd2e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e2, 0xf494, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e2, 0xfa97, 0xeb95, 0xd8e2, 0x001a, 0x001a, 0xd5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e2, 0xd090, 0x001a, 0xd7e2, 0xd9e2, 0x001a, 0x001a, 0x001a, 0xd6e2, 0x001a, 0xdde2, 0x001a, 0xdae2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdbe2, 0xc4e2, 0x001a, 0x001a, 0x001a, 0xdce2, 0xdee2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdfe2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc495, 0x001a, 0xe0e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe096, 0x001a, 0x001a, 0xcc8b, 0x488c, 0xe1e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb295, 0x001a, 0x8890, 0x001a, 0xae96, 0x001a, 0x001a, 0xe2e2, 0x001a, 0xb197, 0x001a, 0x001a, 0x9494, 0x001a, 0x6591, 0x5394, 0x001a, 0x001a, 0x6c8f, 0x001a, 0x001a, 0x001a, 0xbe88, 0x001a, 0xe7e2, 0xe5e2, 0x001a, 0xe3e2, 0x9f8a, 0x001a, 0xcf8f, 0xe8e2, 0x001a, 0x001a, 0xe6e2, 0x001a, 0xe4e2, 0xece2, 0x001a, 0x001a, 0xebe2, 0xeae2, 0xe9e2, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xede2, 0x001a, 0x001a, 0x001a, 0xeee2, 0xb890, 0x001a, 0xefe2, 0x001a, 0xf1e2, 0x001a, 0x001a, 0xf0e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xd08c, 0x001a, 0x001a, 0x001a, 0x5791, 0x001a, 0x001a, 0x001a, 0xf3e2, 0x001a, 0x001a, 0x001a, 0x9c93, 0x001a, 0xf2e2, 0x001a, 0x001a, 0x001a, 0xf4e2, 0x001a, 0xb395, 0x8c91, 0x668d, 0x001a, 0xf5e2, 0x001a, 0x001a, 0x001a, 0x001a, 0xc697, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e2, 0x001a, 0x001a, 0xf8e2, 0x001a, 0xf9e2, 0x001a, 0xfae2, 0x001a, 0x858e, 0x001a, 0xfbe2, 0x6e8c, 0x001a, 0x001a, 0x8a8b, 0x001a, 0x498b, 0x001a, 0x40e3, 0x001a, 0xf196, 0x678d, 0xfce2, 0x001a, 0x001a, 0x001a, 0x43e3, 0xe496, 0x001a, 0x5b94, 0x001a, 0x001a, 0x5295, 0x001a, 0x001a, 0x001a, 0x838f, 0x42e3, 0x001a, 0xd18e, 0x688d, 0x868e, 0x898b, 0xb495, 0x41e3, 0x001a, 0x001a, 0x001a, 0x6691, 0x6196, 0xf58d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x878e, 0xdb92, 0x001a, 0x46e3, 0xdd97, 0xd78d, 0x001a, 0x47e3, 0x6190, 0x001a, 0x49e3, 0x001a, 0x001a, 0x001a, 0xd08f, 0xae8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e3, 0x001a, 0x001a, 0x498f, 0xbc8c, 0x6791, 0x44e3, 0x4ae3, 0x001a, 0x6dee, 0x001a, 0x001a, 0x45e3, 0x6f8c, 0x001a, 0x4de3, 0x51e3, 0x8b8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x55e3, 0x6eee, 0x001a, 0x698d, 0x001a, 0x001a, 0x8d97, 0xba88, 0x52e3, 0x001a, 0x001a, 0x8b8b, 0x001a, 0x4fe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50e3, 0x001a, 0x001a, 0x9d93, 0x4ee3, 0x4be3, 0x001a, 0x478a, 0xe290, 0x001a, 0x001a, 0xa68c, 0x001a, 0x001a, 0x001a, 0x57e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x54e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e3, 0x001a, 0x001a, 0x001a, 0x53e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x708c, 0xb191, 0x58e3, 0x8e91, 0x001a, 0x001a, 0x65e3, 0x70ee, 0x001a, 0x61e3, 0x5be3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fe3, 0xf88e, 0xdb88, 0x5ae3, 0x62e3, 0x66e3, 0x6a8d, 0xd496, 0x001a, 0xd492, 0x5ce3, 0x001a, 0x6fee, 0x64e3, 0x001a, 0x59e3, 0x5d92, 0x001a, 0x5ee3, 0xbb88, 0xc896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5de3, 0x001a, 0x001a, 0xd98b, 0xea94, 0x001a, 0x001a, 0x001a, 0x8d91, 0x001a, 0xce97, 0x8f8f, 0x001a, 0x001a, 0x8ee3, 0x71ee, 0x001a, 0x67e3, 0x001a, 0xfc90, 0x001a, 0x63e3, 0x68e3, 0x6ae3, 0x001a, 0xf792, 0x6de3, 0x001a, 0x001a, 0x69e3, 0x001a, 0x001a, 0x001a, 0xd295, 0xc98a, 0x001a, 0x001a, 0xc996, 0x001a, 0x001a, 0xdc88, 0x001a, 0x001a, 0x6ce3, 0x001a, 0xfb97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f89, 0x001a, 0x001a, 0xea93, 0x6ee3, 0x001a, 0x001a, 0x001a, 0x75e3, 0x6fe3, 0x76e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9b94, 0x001a, 0x001a, 0xc88e, 0x74e3, 0x001a, 0x71e3, 0x77e3, 0x70e3, 0x001a, 0x001a, 0x638f, 0x001a, 0x001a, 0x001a, 0x001a, 0x4496, 0x001a, 0x001a, 0x6b8f, 0x001a, 0x001a, 0x73e3, 0x80e3, 0x001a, 0x001a, 0x7be3, 0x001a, 0x7ee3, 0x001a, 0x7ce3, 0x81e3, 0x7ae3, 0x001a, 0x60e3, 0xd190, 0x001a, 0x001a, 0xc994, 0x001a, 0x7de3, 0x001a, 0x001a, 0x78e3, 0x001a, 0x001a, 0x001a, 0x4091, 0x718c, 0x001a, 0x4a8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x72ee, 0x001a, 0x4490, 0x5591, 0x84e3, 0x001a, 0x001a, 0x86e3, 0x87e3, 0x001a, 0x001a, 0x83e3, 0x85e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x79e3, 0x82e3, 0x001a, 0x8ae3, 0x89e3, 0x001a, 0x001a, 0x9a96, 0x001a, 0x001a, 0x4a8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e3, 0x001a, 0x8ce3, 0x8be3, 0x8fe3, 0x001a, 0x91e3, 0x001a, 0x001a, 0x5b8e, 0x8de3, 0x001a, 0x001a, 0x001a, 0x001a, 0x92e3, 0x93e3, 0x40ed, 0x001a, 0x94e3, 0x001a, 0x9ae3, 0x5a93, 0x96e3, 0x001a, 0x95e3, 0x97e3, 0x98e3, 0x001a, 0x99e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x9be3, 0x9ce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xca8a, 0x001a, 0x9de3, 0x001a, 0x9ee3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fe3, 0x001a, 0x73ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xa0e3, 0xa1e3, 0xa2e3, 0x001a, 0xa3e3, 0xa4e3, 0x001a, 0x001a, 0xa6e3, 0xa5e3, 0x001a, 0x001a, 0xa7e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa8e3, 0xa9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace3, 0xaae3, 0xabe3, 0xdf8d, 0x728c, 0x001a, 0x001a, 0x7592, 0x001a, 0xb194, 0x001a, 0x908f, 0x001a, 0x001a, 0x6c94, 0x001a, 0xeb94, 0xade3, 0xeb9c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee3, 0xb0e3, 0x001a, 0x8597, 0xafe3, 0xb2e3, 0xb1e3, 0x001a, 0x7297, 0x001a, 0xb3e3, 0x001a, 0xfc94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7e3, 0x001a, 0x001a, 0xb6e3, 0xb5e3, 0x001a, 0x001a, 0x74ee, 0x001a, 0xb8e3, 0x518c, 0x001a, 0x001a, 0x001a, 0x4191, 0x608b, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce3, 0xb9e3, 0x001a, 0x001a, 0xbae3, 0x001a, 0x001a, 0x001a, 0xbde3, 0x001a, 0xbee3, 0xbbe3, 0x001a, 0x001a, 0x001a, 0x4889, 0x001a, 0x001a, 0x001a, 0xa589, 0x001a, 0x001a, 0x001a, 0xc0e3, 0xc1e3, 0x001a, 0x001a, 0x001a, 0xc2e3, 0x001a, 0x8297, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b8f, 0x001a, 0xc4e3, 0xc3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8990, 0xc5e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xc6e3, 0x001a, 0x001a, 0xc7e3, 0x001a, 0xe38a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb8a, 0x001a, 0x001a, 0xc8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e3, 0x001a, 0x7c96, 0x8397, 0x001a, 0x001a, 0x001a, 0x7397, 0x5698, 0x001a, 0x6c8d, 0xcce3, 0xd28e, 0xcbe3, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde3, 0xa78e, 0x001a, 0x001a, 0x001a, 0xcf91, 0x001a, 0xcee3, 0x001a, 0x001a, 0x6b8d, 0x001a, 0xd596, 0xcfe3, 0xd0e3, 0x001a, 0x001a, 0xd1e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd3e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa88e, 0x001a, 0x001a, 0xeb96, 0x001a, 0x001a, 0x001a, 0x001a, 0xd5e3, 0x001a, 0x5e92, 0x001a, 0xd4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd7e3, 0x001a, 0x001a, 0x001a, 0xd6e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e3, 0x001a, 0x001a, 0x001a, 0xb990, 0x001a, 0xd9e3, 0x001a, 0xdae3, 0x001a, 0x001a, 0x001a, 0xb795, 0xdbe3, 0x001a, 0x8f91, 0xdce3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfc97, 0xe0e3, 0x001a, 0xdfe3, 0xdee3, 0xae92, 0x001a, 0xe1e3, 0x4590, 0x001a, 0xe2e3, 0x001a, 0x001a, 0x001a, 0xe3e3, 0x5798, 0xe4e3, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e3, 0xe7e3, 0xe6e3, 0xa394, 0x001a, 0xf793, 0x001a, 0x5d98, 0xa794, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e3, 0x001a, 0x001a, 0xd18f, 0x001a, 0x4995, 0x001a, 0xeae3, 0xe8e3, 0x001a, 0xcc8a, 0x001a, 0x001a, 0x001a, 0xd28c, 0x888e, 0x001a, 0x001a, 0xec94, 0x001a, 0x001a, 0x001a, 0xa88c, 0x6296, 0x001a, 0xede3, 0xebe3, 0x001a, 0x6d8d, 0x001a, 0x6e8d, 0xe788, 0x001a, 0xe68d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7894, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdd88, 0xf2e3, 0x001a, 0x5f92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7794, 0x001a, 0xd991, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e3, 0x001a, 0x001a, 0xf0e3, 0xf3e3, 0xeee3, 0x001a, 0xf1e3, 0x4596, 0x001a, 0x001a, 0xd38c, 0x001a, 0x001a, 0xfb88, 0xefe3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e3, 0x001a, 0xf7e3, 0x001a, 0x001a, 0xb793, 0x001a, 0x001a, 0x001a, 0xb98b, 0x001a, 0x001a, 0x001a, 0x45e4, 0x5c94, 0x001a, 0x001a, 0x001a, 0x001a, 0x898e, 0x001a, 0x001a, 0xba8b, 0xc690, 0x6598, 0xac96, 0xf5e3, 0xd290, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x728b, 0xf8e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e3, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe3, 0x001a, 0x4592, 0x001a, 0x5d94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xaf92, 0x001a, 0x001a, 0x001a, 0x001a, 0x42e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce3, 0x001a, 0x001a, 0x7490, 0x001a, 0x8595, 0x44e4, 0x001a, 0x43e4, 0x6f8d, 0x7298, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x54e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e4, 0x49e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xee8e, 0x001a, 0x001a, 0x47e4, 0x001a, 0x988d, 0x46e4, 0x001a, 0x001a, 0x4ae4, 0x001a, 0x001a, 0x001a, 0xb092, 0xa095, 0x4291, 0x001a, 0x001a, 0x001a, 0x001a, 0xda91, 0x4ee4, 0x001a, 0x4fe4, 0x4be4, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce4, 0x001a, 0x4de4, 0x001a, 0x001a, 0x001a, 0x001a, 0x708d, 0x001a, 0x001a, 0x001a, 0x55e4, 0x001a, 0x51e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x8695, 0x001a, 0x8c96, 0x4795, 0x001a, 0x001a, 0x50e4, 0x001a, 0x001a, 0x53e4, 0x52e4, 0x001a, 0x001a, 0x001a, 0x6396, 0x56e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e4, 0x001a, 0x001a, 0x5691, 0x001a, 0x58e4, 0x001a, 0x001a, 0x5ae4, 0x001a, 0x5ee4, 0x001a, 0x001a, 0x5be4, 0x59e4, 0x5e94, 0x5ce4, 0x001a, 0x5de4, 0x001a, 0x001a, 0x001a, 0xb089, 0x001a, 0x64e4, 0x5fe4, 0x001a, 0x001a, 0x001a, 0x60e4, 0x001a, 0x001a, 0x001a, 0x61e4, 0x001a, 0x9f91, 0x001a, 0x001a, 0x001a, 0x001a, 0x63e4, 0x62e4, 0x65e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e4, 0x67e4, 0x001a, 0x001a, 0x6290, 0x001a, 0xe789, 0x001a, 0x68e4, 0xd597, 0x001a, 0xa98e, 0x001a, 0x001a, 0x4c8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a8e, 0x7692, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x69e4, 0x6ae4, 0x5089, 0x001a, 0x6be4, 0x001a, 0x001a, 0x6ce4, 0x6de4, 0x001a, 0x001a, 0x6ee4, 0x001a, 0x6fe4, 0xbb8b, 0xa89d, 0x70e4, 0x001a, 0xe390, 0x71e4, 0xc98e, 0x001a, 0x72e4, 0x001a, 0xae98, 0x001a, 0x001a, 0x001a, 0x73e4, 0xdc95, 0xda8a, 0x001a, 0x001a, 0x4391, 0x778f, 0x001a, 0x9195, 0x4d8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e4, 0x718d, 0x75e4, 0xca94, 0x001a, 0x84e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x77e4, 0x001a, 0xc791, 0x9594, 0xbd8c, 0x76e4, 0x4491, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf892, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ae4, 0x79e4, 0x7ce4, 0x001a, 0x001a, 0x7be4, 0x001a, 0x7de4, 0x001a, 0x001a, 0x80e4, 0x001a, 0x7ee4, 0x001a, 0xcd8a, 0x001a, 0x81e4, 0x001a, 0x82e4, 0x83e4, 0x001a, 0x001a, 0xaf8d, 0xc797, 0x001a, 0x85e4, 0x4690, 0x001a, 0x001a, 0x001a, 0x9089, 0x86e4, 0x87e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf088, 0x001a, 0x89e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ae4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8795, 0x001a, 0x001a, 0x001a, 0xc58e, 0x001a, 0x8ce4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x488a, 0xb088, 0x001a, 0x001a, 0x001a, 0x001a, 0x8be4, 0x8ee4, 0x6d94, 0x001a, 0x6390, 0x001a, 0xd489, 0x001a, 0x4696, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c8c, 0xda8b, 0x001a, 0x8de4, 0x001a, 0xe889, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa18a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9189, 0x92e4, 0xe897, 0xdb91, 0x001a, 0x001a, 0x6395, 0x001a, 0x9ee4, 0x001a, 0xd589, 0x9ce4, 0x001a, 0x9ae4, 0x91e4, 0x001a, 0x8fe4, 0x001a, 0x90e4, 0x001a, 0xe18e, 0xea8b, 0x9792, 0x001a, 0x001a, 0x001a, 0xcf93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7089, 0x001a, 0x94e4, 0x93e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x99e4, 0x95e4, 0x98e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x76ee, 0xce96, 0x97e4, 0xd689, 0x9d8a, 0x9be4, 0x001a, 0x001a, 0x9de4, 0x001a, 0x001a, 0x001a, 0x001a, 0x738c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e4, 0xaae4, 0xabe4, 0x001a, 0x001a, 0x001a, 0xa988, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xef88, 0x001a, 0x001a, 0xa9e4, 0x001a, 0x001a, 0x001a, 0xa8e4, 0x001a, 0xa3e4, 0xa2e4, 0x001a, 0xa0e4, 0x9fe4, 0x8392, 0x001a, 0xf991, 0xa5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xa7e4, 0x001a, 0x001a, 0x001a, 0x9091, 0x748c, 0x001a, 0x001a, 0x001a, 0x001a, 0x6089, 0xa6e4, 0x001a, 0x728d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9191, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x77ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e4, 0x001a, 0xb9e4, 0x001a, 0xd789, 0x001a, 0x001a, 0x001a, 0xac89, 0xb6e4, 0x001a, 0x001a, 0x78ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace4, 0x001a, 0xb4e4, 0x001a, 0xbbe4, 0xb5e4, 0x001a, 0x001a, 0x001a, 0xb3e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x96e4, 0x001a, 0x001a, 0xb1e4, 0x001a, 0x001a, 0x001a, 0xade4, 0x001a, 0x001a, 0x001a, 0xce8a, 0xafe4, 0xbae4, 0x001a, 0xb0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce4, 0x001a, 0xaee4, 0x9c94, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8997, 0x001a, 0x001a, 0x001a, 0xb7e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde4, 0x001a, 0x001a, 0x001a, 0xc5e4, 0x001a, 0x001a, 0x001a, 0x9b90, 0x001a, 0x79ee, 0x001a, 0x001a, 0x658b, 0x001a, 0xdb8b, 0x001a, 0xc0e4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd989, 0x001a, 0x001a, 0xd28f, 0x001a, 0xc3e4, 0x001a, 0x001a, 0x001a, 0xd88d, 0x001a, 0x001a, 0x7093, 0xc8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xec95, 0x001a, 0xbfe4, 0x001a, 0x001a, 0x001a, 0xd889, 0xd48c, 0x4895, 0xc9e4, 0x001a, 0xbde4, 0x001a, 0x7aee, 0xc6e4, 0x001a, 0x001a, 0x001a, 0xd0e4, 0x001a, 0xc1e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e4, 0xb893, 0x001a, 0x001a, 0xc7e4, 0x001a, 0x001a, 0x001a, 0xc4e4, 0x4796, 0xcae4, 0xde88, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcce4, 0x001a, 0xcbe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b94, 0xd2e4, 0x001a, 0xdde4, 0x001a, 0x001a, 0x001a, 0x001a, 0x9e8a, 0x001a, 0x001a, 0x001a, 0xe0e4, 0x001a, 0x001a, 0xcee4, 0x001a, 0x001a, 0x001a, 0xd3e4, 0x8e97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdce4, 0x001a, 0x7bee, 0x7497, 0x001a, 0x001a, 0x001a, 0x001a, 0xa897, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9892, 0x001a, 0x001a, 0x001a, 0x8b8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9295, 0xe2e4, 0x9f93, 0x001a, 0x001a, 0xaf88, 0x001a, 0x001a, 0xdbe4, 0x001a, 0xd7e4, 0x9291, 0xd1e4, 0xd9e4, 0xdee4, 0x001a, 0x4b94, 0x001a, 0x001a, 0x001a, 0xa888, 0x001a, 0xd6e4, 0x001a, 0xdfe4, 0x9895, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae4, 0x001a, 0xd5e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd38f, 0x001a, 0x001a, 0x001a, 0x001a, 0x4e8f, 0x001a, 0x001a, 0x001a, 0xaa8e, 0x001a, 0x001a, 0x001a, 0x001a, 0xd696, 0x001a, 0x001a, 0x6695, 0x001a, 0x001a, 0xe5e4, 0x001a, 0xeee4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd8e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x978a, 0x001a, 0x7cee, 0x001a, 0x001a, 0x001a, 0xf68f, 0xe3e4, 0x001a, 0xe8e4, 0x9391, 0x001a, 0x001a, 0xe4e4, 0x001a, 0xebe4, 0x001a, 0x001a, 0x7e92, 0x001a, 0xece4, 0x001a, 0x001a, 0x7597, 0xe1e4, 0x578a, 0x001a, 0xe7e4, 0x001a, 0x001a, 0xeae4, 0xaa96, 0x001a, 0x001a, 0x001a, 0x001a, 0xede4, 0x001a, 0x001a, 0xe6e4, 0xe9e4, 0x001a, 0x44ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4896, 0x001a, 0x4098, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e4, 0x001a, 0x001a, 0xf0e4, 0xc18e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcc95, 0x001a, 0xa096, 0xf7e4, 0xf6e4, 0x001a, 0xf2e4, 0xf3e4, 0x001a, 0x5589, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e4, 0x001a, 0xefe4, 0x001a, 0x001a, 0x001a, 0x001a, 0xd392, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e4, 0xfc88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa091, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc195, 0x001a, 0x001a, 0xf9e4, 0x40e5, 0x001a, 0xd794, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce4, 0xd48f, 0xc78e, 0x42e5, 0x001a, 0x001a, 0xbc8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x7dee, 0x001a, 0x43e5, 0x001a, 0x9995, 0xfbe4, 0x7eee, 0xd4e4, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae4, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e98, 0xa093, 0x9395, 0x80ee, 0x001a, 0x4ae5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x51e5, 0x001a, 0x44e5, 0x001a, 0x001a, 0x001a, 0x9694, 0x001a, 0x001a, 0x4ee5, 0x46e5, 0x001a, 0x48e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x52e5, 0x47e5, 0x001a, 0x001a, 0x4be5, 0x001a, 0x001a, 0x9289, 0x001a, 0xe393, 0x001a, 0x4ce5, 0x4fe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45e5, 0x001a, 0x4591, 0x001a, 0x49e5, 0x468e, 0x6490, 0x4f8c, 0xf296, 0x001a, 0xf796, 0x928f, 0x82ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e5, 0x54e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6d98, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53e5, 0x001a, 0x001a, 0x001a, 0x9597, 0x001a, 0x55e5, 0x57e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5be5, 0x59e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa193, 0x5ae5, 0x001a, 0x001a, 0x001a, 0xcb94, 0x4de5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x938f, 0x001a, 0x5ce5, 0x61e5, 0x9491, 0x001a, 0x001a, 0x60e5, 0x001a, 0x001a, 0x001a, 0x41e5, 0x001a, 0x001a, 0x001a, 0x62e5, 0x6891, 0x001a, 0x001a, 0x5de5, 0x5fe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ee5, 0x001a, 0x001a, 0x509f, 0x419f, 0x001a, 0x001a, 0x64e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x63e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9697, 0x001a, 0xbae1, 0x65e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x67e5, 0xd58c, 0x001a, 0x738b, 0x001a, 0x001a, 0x001a, 0x69e5, 0x7c99, 0x001a, 0x001a, 0x001a, 0x001a, 0x958b, 0x001a, 0xb897, 0x001a, 0xf18b, 0x6ae5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be5, 0x001a, 0x001a, 0x001a, 0x8e92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf893, 0x001a, 0xb888, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe189, 0x71e5, 0x72e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6de5, 0x001a, 0x5c8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee5, 0x6194, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fe5, 0x70e5, 0x7ae5, 0x001a, 0x001a, 0x001a, 0x74e5, 0x77e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x75e5, 0x001a, 0x76e5, 0xd68e, 0x001a, 0x78e5, 0x001a, 0x6092, 0x001a, 0x758c, 0x618a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7be5, 0x001a, 0x001a, 0x001a, 0x001a, 0x5e8a, 0x001a, 0x81e5, 0x001a, 0x001a, 0x7ce5, 0x80e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xb894, 0x001a, 0x001a, 0x001a, 0x001a, 0x7de5, 0x001a, 0x001a, 0x7ee5, 0x6795, 0xd894, 0x82e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfb91, 0x8ce5, 0x001a, 0x88e5, 0x001a, 0x001a, 0xe989, 0x001a, 0x86e5, 0x001a, 0x4996, 0x87e5, 0x001a, 0x001a, 0x84e5, 0x001a, 0x85e5, 0x8ae5, 0x8de5, 0x001a, 0x001a, 0x8be5, 0x001a, 0x001a, 0x001a, 0x89e5, 0x83e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7792, 0x001a, 0x94e5, 0x001a, 0xa896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x92e5, 0x001a, 0x001a, 0x001a, 0x93e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ee5, 0x001a, 0x001a, 0x90e5, 0x001a, 0x001a, 0x001a, 0x91e5, 0x001a, 0x001a, 0x001a, 0x8fe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe490, 0x001a, 0x5898, 0x98e5, 0x001a, 0x99e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x9fe5, 0x001a, 0x4990, 0x001a, 0x9be5, 0x001a, 0x9ee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x96e5, 0x95e5, 0x001a, 0x001a, 0xa0e5, 0x001a, 0x001a, 0xda89, 0x001a, 0x9ce5, 0x001a, 0xa1e5, 0x001a, 0x001a, 0x001a, 0x9de5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ae5, 0x001a, 0xb192, 0x001a, 0x97e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8894, 0x001a, 0x001a, 0xa5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5a97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa4e5, 0x001a, 0x001a, 0xa3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xace5, 0x001a, 0x001a, 0x001a, 0xa6e5, 0x001a, 0x001a, 0x001a, 0xaee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8697, 0xb1e5, 0x001a, 0xa8e5, 0x001a, 0x001a, 0xa9e5, 0x001a, 0x001a, 0x001a, 0xade5, 0x001a, 0xb0e5, 0xafe5, 0x001a, 0x001a, 0x001a, 0xa7e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xaae5, 0x001a, 0xbbe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb2e5, 0x001a, 0x001a, 0xb3e5, 0x001a, 0x001a, 0x001a, 0xb8e5, 0xb9e5, 0x001a, 0x498a, 0x001a, 0x618b, 0x001a, 0x001a, 0xb7e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa2e5, 0x001a, 0x85ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e5, 0xbae5, 0xb5e5, 0x001a, 0xbce5, 0x001a, 0x001a, 0x001a, 0xbee5, 0xbde5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc0e5, 0xbfe5, 0x79e5, 0x001a, 0x001a, 0x001a, 0xc4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e5, 0x001a, 0x001a, 0xc3e5, 0x001a, 0xc5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c8c, 0x001a, 0xc7e5, 0x001a, 0xc6e5, 0x001a, 0x4f8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x738d, 0xa59f, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8e5, 0x708f, 0x001a, 0x001a, 0x001a, 0x588a, 0x001a, 0xc9e5, 0x001a, 0x7189, 0x001a, 0xd58f, 0xcae5, 0x001a, 0x001a, 0x748d, 0xcbe5, 0xdf88, 0x001a, 0x001a, 0x001a, 0x001a, 0x5c95, 0x001a, 0x001a, 0xcce5, 0x001a, 0x001a, 0x001a, 0x001a, 0x8a90, 0x001a, 0xd3e5, 0x001a, 0x001a, 0xd0e5, 0x001a, 0x8f92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e5, 0xcee5, 0xdc8b, 0x001a, 0xcde5, 0xd4e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x558c, 0x001a, 0x001a, 0xdc91, 0x001a, 0xdae5, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e5, 0x001a, 0x001a, 0x001a, 0xb391, 0xd5e5, 0x001a, 0xd8e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe5, 0x001a, 0x001a, 0x001a, 0xd9e5, 0x001a, 0xdbe5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xed94, 0x001a, 0x001a, 0xd7e5, 0x001a, 0xdce5, 0xdee5, 0x001a, 0x001a, 0xd18c, 0xd2e5, 0x001a, 0xbf88, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde5, 0x001a, 0xd98d, 0xf497, 0xdfe5, 0xe0e5, 0x9591, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa097, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e5, 0x5497, 0x001a, 0x001a, 0xe2e5, 0xe3e5, 0x001a, 0x001a, 0xe295, 0xe4e5, 0x001a, 0xbe8d, 0x001a, 0xa197, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae5, 0xd68f, 0xe8e5, 0x86ee, 0x001a, 0x001a, 0x8797, 0xe5e5, 0x001a, 0x001a, 0xe7e5, 0xbb90, 0x9e90, 0x001a, 0x001a, 0x001a, 0xe6e5, 0x001a, 0xebe5, 0x001a, 0x001a, 0xa195, 0x001a, 0x001a, 0xede5, 0x001a, 0xece5, 0x001a, 0x001a, 0x001a, 0x8c8a, 0x001a, 0x4a96, 0xeee5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x41ed, 0xfae5, 0xf0e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e5, 0x001a, 0x001a, 0x001a, 0x001a, 0xf2e5, 0xf3e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e5, 0x001a, 0xf8e5, 0x001a, 0x001a, 0xf6e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e5, 0x001a, 0xefe5, 0xf5e5, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e5, 0xb5e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa689, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfce5, 0xdd8b, 0xfbe5, 0x001a, 0x001a, 0x001a, 0x41e6, 0x001a, 0x40e6, 0x001a, 0x001a, 0x001a, 0x43e6, 0x001a, 0x001a, 0x42e6, 0x001a, 0x44e6, 0x001a, 0x001a, 0x508f, 0x001a, 0x45e6, 0x001a, 0x001a, 0x46e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x47e6, 0xbc90, 0x001a, 0x7697, 0x001a, 0x48e6, 0x001a, 0x001a, 0xa295, 0x6594, 0x49e6, 0x001a, 0x4ae6, 0xa98c, 0x001a, 0x001a, 0x001a, 0x4b8b, 0x001a, 0x001a, 0x001a, 0x4be6, 0x001a, 0x001a, 0x8b8e, 0x6094, 0x4ce6, 0x001a, 0x6f8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de6, 0x001a, 0x001a, 0x001a, 0x001a, 0x4fe6, 0x9797, 0x001a, 0x4ee6, 0x6590, 0x001a, 0x50e6, 0x001a, 0x001a, 0x51e6, 0x001a, 0x001a, 0x52e6, 0xcf8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x53e6, 0x001a, 0x001a, 0x54e6, 0x001a, 0x55e6, 0x56e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x708a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e6, 0x001a, 0x58e6, 0x59e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf089, 0x001a, 0x001a, 0x4790, 0x5ae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5be6, 0x001a, 0x001a, 0x001a, 0x5ce6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbe8c, 0x001a, 0xf992, 0x5de6, 0x001a, 0x001a, 0x001a, 0x001a, 0x768c, 0x001a, 0x7590, 0x001a, 0x60e6, 0x001a, 0xa293, 0x001a, 0x5fe6, 0x001a, 0x87ee, 0x508c, 0x001a, 0x001a, 0x5ee6, 0xf591, 0x4c8b, 0x001a, 0x001a, 0x61e6, 0x001a, 0x62e6, 0x001a, 0xd78f, 0x001a, 0x001a, 0x001a, 0x8d8c, 0x001a, 0x63e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b96, 0x001a, 0x001a, 0xdd90, 0x001a, 0x001a, 0x001a, 0x968b, 0x001a, 0xf396, 0x6991, 0x001a, 0x64e6, 0x88ee, 0x001a, 0x001a, 0x6690, 0x9092, 0xd88f, 0x001a, 0x001a, 0x001a, 0x001a, 0x65e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x68e6, 0x001a, 0x69e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc8d, 0xc091, 0x67e6, 0x001a, 0xd98f, 0x5d95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e6, 0x001a, 0x001a, 0x8c8e, 0x001a, 0x7289, 0x001a, 0x6de6, 0x778c, 0x001a, 0x001a, 0x8e8e, 0x001a, 0x001a, 0x8d8e, 0x001a, 0x6c98, 0x6ce6, 0x6be6, 0x4691, 0x001a, 0x6c8b, 0x6298, 0x598a, 0xda8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89ee, 0x001a, 0x001a, 0x6ae6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fe6, 0x001a, 0x70e6, 0x6ee6, 0x001a, 0xd68c, 0x001a, 0x5f97, 0x001a, 0x001a, 0x8f8e, 0x4694, 0x001a, 0x001a, 0x001a, 0x73e6, 0x001a, 0xbe90, 0x001a, 0x6192, 0x001a, 0x001a, 0x5597, 0x001a, 0x76e6, 0x001a, 0x001a, 0x001a, 0xea8c, 0x001a, 0xbd90, 0x72e6, 0x001a, 0x77e6, 0xeb8c, 0x74e6, 0x75e6, 0x8aee, 0x71e6, 0x001a, 0x001a, 0x001a, 0xe090, 0xc793, 0x001a, 0x001a, 0x4e92, 0x001a, 0xdb89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xee94, 0x001a, 0x001a, 0x628b, 0x001a, 0x8bee, 0xb292, 0x001a, 0x001a, 0x7ae6, 0x001a, 0x78e6, 0x001a, 0x001a, 0x6b92, 0x001a, 0x001a, 0x001a, 0xbf90, 0xd08a, 0x79e6, 0x001a, 0x7a90, 0x001a, 0x001a, 0xc897, 0x001a, 0x001a, 0x001a, 0x5f98, 0x001a, 0x001a, 0x001a, 0x7be6, 0x87e6, 0xb392, 0x001a, 0x86e6, 0x8cee, 0x83e6, 0x8be6, 0x84e6, 0x001a, 0x80e6, 0x001a, 0xfa92, 0x7ee6, 0x001a, 0x001a, 0x001a, 0x7ce6, 0x001a, 0x4097, 0x908e, 0x001a, 0x001a, 0x81e6, 0x001a, 0x7de6, 0x001a, 0x001a, 0x8eee, 0x85e6, 0x948f, 0x001a, 0xbf8c, 0x001a, 0x001a, 0x001a, 0xf891, 0x001a, 0x6496, 0x7989, 0xe088, 0x001a, 0xa393, 0x001a, 0x001a, 0x89e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e6, 0x001a, 0xe493, 0x001a, 0x8de6, 0x001a, 0x001a, 0x001a, 0x82e6, 0x001a, 0x8ce6, 0x8ee6, 0x001a, 0xaa8c, 0x8ae6, 0x758d, 0x001a, 0xd38e, 0x001a, 0x001a, 0x8fe6, 0x7797, 0x001a, 0x001a, 0x001a, 0x001a, 0x92e6, 0x001a, 0x95e6, 0x001a, 0x001a, 0x93e6, 0x5495, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x90e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xde8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x94e6, 0x001a, 0x001a, 0x96e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ae6, 0x001a, 0x001a, 0x97e6, 0x001a, 0x99e6, 0x98e6, 0x001a, 0x001a, 0x001a, 0x8fee, 0x001a, 0x001a, 0x9be6, 0x001a, 0xaf8e, 0x001a, 0x9de6, 0x9ce6, 0x8895, 0x001a, 0x001a, 0x9fe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x788c, 0x001a, 0x001a, 0x001a, 0x001a, 0x9ee6, 0xa0e6, 0x001a, 0x001a, 0xa1e6, 0x638b, 0xbfe3, 0xf78f, 0x001a, 0xa2e6, 0x001a, 0x001a, 0xec8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e6, 0x001a, 0x90ee, 0xa4e6, 0x001a, 0x001a, 0x5d8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcc9d, 0x001a, 0xa5e6, 0x001a, 0xa6e6, 0x001a, 0x518f, 0x001a, 0xa7e6, 0xa8e6, 0x001a, 0x001a, 0xa9e6, 0x001a, 0x001a, 0xaae6, 0xabe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4a92, 0x001a, 0x001a, 0xace6, 0x001a, 0x001a, 0x001a, 0x001a, 0xaee6, 0x001a, 0xade6, 0x001a, 0x001a, 0x001a, 0x001a, 0xa493, 0x001a, 0xafe6, 0x001a, 0x4c96, 0x001a, 0xb0e6, 0x001a, 0xb1e6, 0x001a, 0xb2e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xb3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd893, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb8f, 0xb4e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8b8d, 0xac98, 0xb5e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e6, 0x5e95, 0xb7e6, 0x001a, 0xbfe6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb8e6, 0x001a, 0x001a, 0xbae6, 0x001a, 0x001a, 0x001a, 0xb9e6, 0xbbe6, 0x001a, 0x6596, 0xbce6, 0xbde6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee6, 0x001a, 0x001a, 0x001a, 0xc0e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c8a, 0xe592, 0x001a, 0x8995, 0xe08d, 0x768d, 0x001a, 0x001a, 0x001a, 0x001a, 0x6e95, 0xdd89, 0xcc94, 0xc3e6, 0xd18a, 0xd390, 0xc2e6, 0xc7e6, 0x9992, 0xe196, 0x001a, 0xc5e6, 0xc6e6, 0x4d8b, 0x001a, 0xc8e6, 0x8394, 0xdd91, 0x001a, 0x001a, 0xef94, 0x5c93, 0xc4e6, 0x001a, 0x6696, 0xea89, 0xcae6, 0x4798, 0xc092, 0x6498, 0x001a, 0x001a, 0x918e, 0xc9e6, 0x001a, 0xaf91, 0x001a, 0x001a, 0xdae6, 0x4791, 0x001a, 0x001a, 0xf693, 0x001a, 0x6f95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde6, 0x5e8e, 0x928e, 0x001a, 0xdc8f, 0x001a, 0x8594, 0x001a, 0xab8c, 0xcce6, 0xcbe6, 0x001a, 0x8a95, 0x001a, 0x001a, 0x001a, 0xbf8e, 0x001a, 0x001a, 0x7193, 0x001a, 0x001a, 0x91ee, 0x001a, 0x001a, 0x001a, 0x92ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcfe6, 0xd0e6, 0x778d, 0xcee6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd1e6, 0xd2e6, 0x001a, 0xd4e6, 0xa191, 0x001a, 0xd3e6, 0xe48a, 0x001a, 0xd6e6, 0x001a, 0xd5e6, 0xd7e6, 0x001a, 0x93ee, 0xd9e6, 0xdbe6, 0x001a, 0xdce6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd490, 0x001a, 0xcd8e, 0xdde6, 0x001a, 0x001a, 0x001a, 0x718a, 0x001a, 0xdee6, 0x001a, 0x001a, 0x9691, 0xdfe6, 0x001a, 0xe0e6, 0x8b95, 0x001a, 0x94ee, 0x4e8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e6, 0x001a, 0x001a, 0x001a, 0xb492, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe2e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xef8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x9690, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xab91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e6, 0x001a, 0x001a, 0x001a, 0xe4e6, 0x001a, 0x001a, 0x001a, 0xe3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebe6, 0xe9e6, 0x001a, 0x001a, 0xe6e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe8e6, 0x001a, 0x001a, 0x001a, 0xe7e6, 0xeae6, 0x001a, 0x978b, 0x001a, 0xeee6, 0x001a, 0xd590, 0x001a, 0xefe6, 0x001a, 0x001a, 0x001a, 0x001a, 0xd78c, 0x001a, 0xece6, 0xede6, 0x001a, 0x001a, 0x001a, 0x4898, 0x001a, 0x001a, 0x001a, 0xb592, 0x001a, 0x4891, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf0e6, 0x001a, 0x001a, 0xf3e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf1e6, 0xf2e6, 0x7897, 0x001a, 0x001a, 0x001a, 0x001a, 0xa593, 0xf6e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e6, 0xf5e6, 0xf7e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfae6, 0x001a, 0x001a, 0x001a, 0xfbe6, 0xf9e6, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf8e6, 0x001a, 0xfb92, 0x001a, 0x001a, 0x40e7, 0x44e7, 0x41e7, 0xfce6, 0x001a, 0x42e7, 0x001a, 0x001a, 0x001a, 0x43e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae7, 0x001a, 0x001a, 0x001a, 0x45e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd690, 0x47e7, 0x001a, 0x001a, 0x49e7, 0x46e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce7, 0x001a, 0x528f, 0x001a, 0x4be7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de7, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ee7, 0x001a, 0x001a, 0x51e7, 0x50e7, 0x001a, 0x4fe7, 0x001a, 0x001a, 0x53e7, 0x52e7, 0x001a, 0xf496, 0x001a, 0x001a, 0x001a, 0x55e7, 0x001a, 0x54e7, 0x56e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x59e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e7, 0x6790, 0x5ae7, 0x001a, 0x001a, 0xeb8b, 0x5be7, 0x5de7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ee7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5fe7, 0x5ce7, 0x001a, 0x60e7, 0x001a, 0xd48e, 0x61e7, 0x4f8b, 0x528c, 0x001a, 0x96ee, 0x001a, 0x001a, 0xac8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62e7, 0x001a, 0x001a, 0x001a, 0xee93, 0x001a, 0x001a, 0x5d93, 0x63e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb28e, 0x001a, 0x001a, 0x65e7, 0x64e7, 0x798c, 0x67e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x728a, 0x001a, 0x69e7, 0x001a, 0x001a, 0x001a, 0xda8d, 0x68e7, 0x001a, 0x71e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6be7, 0x6de7, 0xe395, 0x6ae7, 0x001a, 0x001a, 0x001a, 0x6ce7, 0x001a, 0x70e7, 0x6ee7, 0x508b, 0x001a, 0x6fe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x72e7, 0x001a, 0x001a, 0x7994, 0xd697, 0x001a, 0x001a, 0x001a, 0x001a, 0x538f, 0x001a, 0x001a, 0x001a, 0x73e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x4197, 0x75e7, 0x001a, 0x74e7, 0x001a, 0x001a, 0x78e7, 0x6097, 0x001a, 0x001a, 0x77e7, 0x001a, 0x8d8a, 0x76e7, 0x7be7, 0x001a, 0x001a, 0x7ae7, 0x001a, 0x001a, 0x79e7, 0x5193, 0x7ce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7de7, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ee7, 0x001a, 0x001a, 0x8c8d, 0x001a, 0x448c, 0x80e7, 0x81e7, 0x82e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6890, 0x83e7, 0x001a, 0xab8e, 0x84e7, 0x001a, 0x001a, 0x001a, 0x85e7, 0x001a, 0x001a, 0x001a, 0x9f99, 0x9e99, 0x001a, 0x001a, 0x001a, 0x001a, 0x86e7, 0x90e3, 0x87e7, 0x4392, 0x4a90, 0x5f94, 0x001a, 0x001a, 0x001a, 0x001a, 0x88e7, 0x001a, 0x001a, 0xd395, 0xd292, 0x9e8d, 0x001a, 0x001a, 0x4892, 0x001a, 0x001a, 0x4989, 0x001a, 0x9896, 0x7690, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7d8c, 0x001a, 0x001a, 0xdf8b, 0x001a, 0x001a, 0xd495, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x89e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8be7, 0x001a, 0x001a, 0x8ae7, 0xde89, 0x001a, 0x001a, 0xf493, 0x8ce7, 0x9794, 0x001a, 0x5293, 0x001a, 0x8de7, 0x718f, 0x001a, 0x001a, 0x001a, 0x8fe7, 0x001a, 0x001a, 0xc096, 0x9ee7, 0x91e7, 0x92e7, 0x001a, 0x001a, 0xc792, 0x001a, 0x001a, 0xde91, 0x9791, 0x001a, 0xa693, 0x001a, 0x90e7, 0x748b, 0x001a, 0x001a, 0x001a, 0x001a, 0x99e7, 0x001a, 0x96e7, 0xa3e7, 0xa793, 0x8092, 0x93e7, 0x001a, 0xfc92, 0x7293, 0x94e7, 0x98e7, 0x8090, 0x001a, 0x8794, 0xca92, 0x001a, 0x001a, 0xc090, 0x97e7, 0xac91, 0xa291, 0x95e7, 0xa788, 0x4198, 0x001a, 0x001a, 0x001a, 0x9ae7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf91, 0x001a, 0x001a, 0x548f, 0x6990, 0x001a, 0x001a, 0x9ce7, 0x9be7, 0x001a, 0xed88, 0x9de7, 0x001a, 0x001a, 0x4e95, 0x001a, 0xa5e7, 0x001a, 0x001a, 0xd993, 0x8b90, 0x001a, 0x001a, 0x7892, 0x001a, 0xf68b, 0x001a, 0xa4e7, 0x5697, 0x5e89, 0x001a, 0xd595, 0xdf89, 0x9fe7, 0xa0e7, 0xa1e7, 0xa2e7, 0xb993, 0x4292, 0xe188, 0xa6e7, 0x001a, 0xa7e7, 0xa1ea, 0x001a, 0x001a, 0xbb91, 0x001a, 0xa8e7, 0x001a, 0x9389, 0x6b91, 0x001a, 0xad8c, 0x001a, 0x7997, 0x001a, 0x99ee, 0xa9e7, 0x4b93, 0x001a, 0x001a, 0x001a, 0x9891, 0xd58e, 0xaae7, 0x001a, 0x001a, 0xade7, 0x001a, 0x001a, 0x858f, 0xabe7, 0x4a91, 0x4991, 0x001a, 0xe288, 0x001a, 0xc997, 0xafe7, 0x001a, 0xf094, 0xb1e7, 0xb0e7, 0xaee7, 0x84e2, 0xd28a, 0x001a, 0x001a, 0x8ee7, 0x001a, 0xb3e7, 0xb2e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xb4e7, 0x001a, 0x5797, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdf93, 0x001a, 0x001a, 0x4d96, 0x001a, 0xb5e7, 0x001a, 0xd78e, 0x001a, 0x001a, 0x001a, 0x001a, 0xb6e7, 0x001a, 0xb7e7, 0x001a, 0x001a, 0x001a, 0xb8e7, 0x001a, 0x001a, 0x4093, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe888, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x788d, 0x001a, 0x001a, 0x001a, 0x5998, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbce7, 0x001a, 0x001a, 0x9aee, 0x001a, 0x001a, 0x538c, 0xb9e7, 0x001a, 0xbae7, 0x001a, 0x001a, 0x001a, 0x9495, 0x001a, 0x001a, 0x001a, 0x001a, 0x738a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5897, 0x001a, 0xbd8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7393, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbee7, 0x001a, 0x001a, 0x9cee, 0x001a, 0x001a, 0x001a, 0xbfe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9dee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4193, 0x001a, 0x001a, 0xc1e7, 0x001a, 0xc0e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd193, 0xc2e7, 0x558f, 0xde8e, 0x7a94, 0x9192, 0x001a, 0x001a, 0x001a, 0xf08e, 0x001a, 0x8c90, 0x001a, 0xc3e7, 0x001a, 0xc4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7c90, 0xc5e7, 0x001a, 0xc6e7, 0x001a, 0x001a, 0x001a, 0xc7e7, 0x8f97, 0x001a, 0x568f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9e7, 0xc8e7, 0x001a, 0x798d, 0x001a, 0x938d, 0x5f8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcce7, 0x001a, 0x001a, 0x001a, 0x001a, 0x868f, 0x001a, 0xcbe7, 0x001a, 0xcae7, 0x001a, 0xe791, 0x001a, 0x001a, 0xed8c, 0x001a, 0xc190, 0x001a, 0x001a, 0x001a, 0x001a, 0xae94, 0x001a, 0x001a, 0x001a, 0x001a, 0x588f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcde7, 0x001a, 0xdd8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0e7, 0xcee7, 0x001a, 0x001a, 0x001a, 0xcfe7, 0x001a, 0x001a, 0x001a, 0x001a, 0xd2e7, 0xd1e7, 0x001a, 0x001a, 0xf88f, 0x001a, 0xd3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd4e7, 0xd5e7, 0x001a, 0x001a, 0x001a, 0x001a, 0xce94, 0xd18d, 0xdf8e, 0xd6e7, 0x001a, 0xd7e7, 0xa297, 0x648f, 0xec96, 0xca97, 0xd8e7, 0xe08b, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e7, 0x9fee, 0x4293, 0x001a, 0x9eee, 0xdce7, 0x988a, 0x6a90, 0xa0ee, 0xdae7, 0x001a, 0xdbe7, 0x001a, 0xde92, 0xa3ee, 0xa4ee, 0x7496, 0xfa8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1ee, 0xa2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdee7, 0xdfe7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde7, 0x001a, 0x001a, 0xe1e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa5ee, 0x001a, 0x001a, 0x001a, 0xa7ee, 0x001a, 0x001a, 0xdd93, 0x628a, 0x001a, 0xa6ee, 0xe5e7, 0x001a, 0x001a, 0xe2e7, 0xe4e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe0e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee8, 0x001a, 0x001a, 0xe3e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe997, 0x001a, 0x001a, 0xd88c, 0x001a, 0xaeee, 0xa8ee, 0x001a, 0xaaee, 0x001a, 0x001a, 0xede7, 0xa9ee, 0x001a, 0x001a, 0x001a, 0x5393, 0xe8e7, 0x001a, 0x001a, 0xebe7, 0xe9e7, 0x001a, 0xeee7, 0x001a, 0x001a, 0xabee, 0x001a, 0xefe7, 0xadee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7e7, 0x001a, 0xacee, 0xf4e7, 0x9489, 0x001a, 0x001a, 0xe6e7, 0x001a, 0x001a, 0x001a, 0xab94, 0x001a, 0xeae7, 0x001a, 0xde8f, 0xafee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7a8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1ee, 0xb2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6796, 0x001a, 0xe28b, 0x001a, 0x001a, 0x658f, 0x001a, 0xba93, 0x001a, 0x001a, 0x43ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c91, 0x001a, 0xf2e7, 0x001a, 0xece7, 0xf1e7, 0x001a, 0xc196, 0x001a, 0xb692, 0xf3e7, 0xf0e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb0ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4b91, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e7, 0x001a, 0xf6e7, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf5e7, 0xb6ee, 0x001a, 0x4e96, 0xbaee, 0x001a, 0xb8ee, 0x001a, 0xb4ee, 0x001a, 0xb5ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb9ee, 0x001a, 0x001a, 0x001a, 0x9b8f, 0x001a, 0x001a, 0xb3ee, 0x001a, 0xf8e7, 0xdd95, 0x001a, 0x001a, 0x7389, 0x001a, 0x001a, 0x001a, 0x001a, 0x6595, 0x9292, 0x001a, 0x001a, 0x001a, 0x001a, 0x988b, 0x49ed, 0xfae7, 0xbdee, 0x7c8d, 0x001a, 0x001a, 0xc0ee, 0x001a, 0x001a, 0xc2ee, 0x001a, 0x001a, 0x001a, 0x4b8e, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e7, 0x8d90, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8e90, 0x40e8, 0x42e8, 0x001a, 0x001a, 0xc1ee, 0xbfee, 0x001a, 0xf98f, 0xbcee, 0x41e8, 0x43e8, 0x001a, 0xbbee, 0xd18b, 0x001a, 0x6495, 0x001a, 0x001a, 0xe08e, 0x4298, 0x001a, 0xfce7, 0xf68d, 0x001a, 0x001a, 0x5e98, 0x001a, 0x001a, 0x45e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e8, 0x46e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xfbe7, 0x001a, 0x001a, 0x001a, 0x42ed, 0x001a, 0x001a, 0xe793, 0x001a, 0x7493, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd592, 0x001a, 0x4be8, 0xc4ee, 0x001a, 0x001a, 0x001a, 0x6292, 0x47e8, 0x001a, 0x001a, 0x001a, 0x48e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4c8c, 0x001a, 0x4ae8, 0x001a, 0xc3ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xae8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x49e8, 0x001a, 0xdf8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x998a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4fe8, 0x001a, 0xbd8d, 0x9991, 0x001a, 0x001a, 0xc892, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5ee, 0x001a, 0x001a, 0x5a8a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4de8, 0x4ee8, 0xc192, 0x001a, 0x4ce8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x50e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56e8, 0x001a, 0x001a, 0xc6ee, 0x001a, 0x59e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e8, 0x4c93, 0x001a, 0x001a, 0x001a, 0x001a, 0x51e8, 0x52e8, 0x55e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x57e8, 0xc7ee, 0x001a, 0x001a, 0xbe8b, 0x001a, 0x001a, 0x5ae8, 0x54e8, 0x001a, 0x001a, 0x53e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc8ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5ee8, 0x001a, 0x001a, 0x001a, 0x5fe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x60e8, 0x001a, 0x001a, 0x5de8, 0x5ce8, 0x001a, 0x001a, 0x001a, 0xe08f, 0xa893, 0x5be8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x64e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc9ee, 0x001a, 0x001a, 0x001a, 0x63e8, 0x61e8, 0x001a, 0xf691, 0x001a, 0x65e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66e8, 0x001a, 0x001a, 0x68e8, 0xcaee, 0x001a, 0x001a, 0xcbee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd38a, 0x67e8, 0xf896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e8, 0x69e8, 0x001a, 0x001a, 0x6ce8, 0x001a, 0x6ae8, 0x001a, 0x6be8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6de8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fe8, 0x001a, 0x001a, 0x001a, 0x001a, 0x70e8, 0x001a, 0x71e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x74e8, 0x72e8, 0x75e8, 0x77e8, 0x001a, 0x76e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb792, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe596, 0x001a, 0x78e8, 0x4d91, 0x001a, 0x001a, 0x001a, 0x79e8, 0x001a, 0xc295, 0x7ae8, 0x4a8a, 0x001a, 0x001a, 0x001a, 0x5b89, 0x001a, 0xd58a, 0xccee, 0xd48a, 0x7be8, 0x001a, 0x7ce8, 0x001a, 0x7de8, 0x7ee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e8, 0x001a, 0xd68a, 0x748a, 0x7d8d, 0xb494, 0x001a, 0x82e8, 0x81e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x83e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b89, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x86e8, 0x001a, 0x85e8, 0x84e8, 0x001a, 0x87e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ae8, 0x001a, 0x001a, 0x001a, 0xc588, 0x001a, 0x001a, 0x88e8, 0x001a, 0x8ce8, 0x8be8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ee8, 0x8de8, 0x8fe8, 0x001a, 0xac93, 0x001a, 0x001a, 0x001a, 0x90e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x91e8, 0x93e8, 0x001a, 0x001a, 0x92e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8c95, 0x001a, 0x001a, 0x001a, 0x001a, 0x94e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x95e8, 0x001a, 0xe38d, 0x001a, 0x001a, 0x001a, 0x96e8, 0x97e8, 0x001a, 0x001a, 0x6896, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a91, 0x001a, 0x001a, 0x001a, 0xa288, 0xc991, 0x001a, 0x98e8, 0x001a, 0x8d95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9be8, 0x99e8, 0x7e8d, 0x001a, 0x9ae8, 0xc08c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc395, 0x9de8, 0x9fe8, 0x9ee8, 0xa0e8, 0x001a, 0x001a, 0x4089, 0x7790, 0x9c8f, 0xd78a, 0xa1e8, 0x001a, 0x001a, 0x001a, 0x8694, 0x001a, 0xa3e8, 0x001a, 0x001a, 0x001a, 0x4189, 0x001a, 0xa2e8, 0xc292, 0x001a, 0xcb97, 0xa993, 0x9ce8, 0xa497, 0x001a, 0xaf8c, 0x001a, 0x001a, 0x7a97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf78b, 0xb297, 0x001a, 0x478c, 0x001a, 0xe091, 0x40e4, 0x001a, 0xa4e8, 0x4b8a, 0x8f90, 0x001a, 0x001a, 0x001a, 0x001a, 0x758a, 0xa6e8, 0x001a, 0xa7e8, 0xa5e8, 0x848c, 0x001a, 0xdb8d, 0xe18f, 0xcfee, 0x001a, 0x001a, 0x4289, 0x001a, 0x001a, 0xd797, 0x001a, 0x001a, 0x001a, 0xa9e8, 0xace7, 0x001a, 0xa8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd0ee, 0xace8, 0xaae8, 0xabe8, 0x001a, 0xade8, 0x001a, 0xaee8, 0xea97, 0xafe8, 0xb0e8, 0x001a, 0xc790, 0xb994, 0x001a, 0x001a, 0x001a, 0x9d90, 0xe58a, 0x001a, 0x001a, 0x5997, 0xeb89, 0x578f, 0xd98c, 0x001a, 0xb3e8, 0x001a, 0xb2e8, 0x938e, 0xb4e8, 0xb1e8, 0x001a, 0x001a, 0x478e, 0x001a, 0x001a, 0x001a, 0xb8e8, 0xabe5, 0x001a, 0x001a, 0xd499, 0x001a, 0x9790, 0xb6e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa397, 0xef93, 0x001a, 0x001a, 0x001a, 0x001a, 0x4a89, 0x001a, 0xe190, 0xb48e, 0x001a, 0x001a, 0x001a, 0x001a, 0xb595, 0x001a, 0x5f89, 0x001a, 0x001a, 0x001a, 0xeb97, 0x8b97, 0x001a, 0xb9e8, 0x001a, 0x6493, 0x001a, 0x001a, 0x001a, 0x001a, 0xf98e, 0x001a, 0x001a, 0x001a, 0xbae8, 0x001a, 0xbbe8, 0x6b90, 0xbce8, 0x001a, 0xec97, 0x001a, 0x001a, 0xb7e8, 0xbee8, 0xc0e8, 0x001a, 0xbfe8, 0x001a, 0xbde8, 0x001a, 0x001a, 0xc1e8, 0x001a, 0x001a, 0xc2e8, 0x001a, 0x001a, 0x9a91, 0x001a, 0xe089, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e8, 0x001a, 0x001a, 0xb696, 0x001a, 0x001a, 0xc4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc5e8, 0x001a, 0x4998, 0xd1ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x509e, 0xc6e8, 0x001a, 0xd2ee, 0x001a, 0xc7e8, 0xc8e8, 0x001a, 0x001a, 0x001a, 0xcce8, 0xd3ee, 0xc9e8, 0x001a, 0xcae8, 0x001a, 0xcbe8, 0xcde8, 0x001a, 0x001a, 0x001a, 0xd4ee, 0x001a, 0xd5ee, 0x001a, 0xd6ee, 0xc290, 0x001a, 0x001a, 0xd7ee, 0xf596, 0x001a, 0x001a, 0xc390, 0x001a, 0x001a, 0xcee8, 0x001a, 0xf194, 0x001a, 0xcfe8, 0x72ea, 0xca96, 0x001a, 0xd0e8, 0x001a, 0xd1e8, 0x001a, 0xd2e8, 0x768a, 0x001a, 0xd4e8, 0x001a, 0x7890, 0x001a, 0x001a, 0x001a, 0xd5e8, 0x001a, 0x001a, 0x438c, 0x001a, 0x001a, 0x001a, 0x001a, 0xd6e8, 0xdae8, 0x001a, 0xd8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9e8, 0x001a, 0x001a, 0x938a, 0xd7e8, 0xdbe8, 0x001a, 0x001a, 0x001a, 0x001a, 0xdce8, 0x001a, 0xc688, 0x001a, 0xdde8, 0xdee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe28f, 0x001a, 0x001a, 0x001a, 0xdfe8, 0x001a, 0x001a, 0x001a, 0x668b, 0x001a, 0x001a, 0xe2e8, 0x001a, 0x001a, 0xe1e8, 0x001a, 0xe0e8, 0x001a, 0x001a, 0x91e6, 0x001a, 0xda95, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe3e8, 0xe4e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e8, 0x001a, 0x001a, 0xe6e8, 0x001a, 0xe7e8, 0x001a, 0x001a, 0xe8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd88a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeae8, 0x4294, 0x001a, 0x001a, 0x001a, 0xece8, 0xb989, 0x001a, 0xefe8, 0xeee8, 0x001a, 0x001a, 0x001a, 0x001a, 0x4389, 0x001a, 0x001a, 0x001a, 0xbf8b, 0x001a, 0xc595, 0xb892, 0xa08d, 0x001a, 0x808d, 0x878f, 0x001a, 0x7b90, 0x001a, 0x001a, 0x001a, 0xf1e8, 0x001a, 0x001a, 0xf0e8, 0x6197, 0xe68a, 0xd094, 0xda93, 0x001a, 0x001a, 0x001a, 0x9c90, 0xcc97, 0x001a, 0x7a8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf4e8, 0x001a, 0x001a, 0xf3e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6a96, 0xaa93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6f89, 0x001a, 0x001a, 0xf5e8, 0xf2e8, 0x001a, 0x001a, 0x7095, 0x8a97, 0xf6e8, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf7e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xf9e8, 0xe891, 0x7a8a, 0x7b8a, 0xf8e8, 0x001a, 0x001a, 0x001a, 0x001a, 0xe78a, 0xb08c, 0x001a, 0xd8ee, 0xe88a, 0x001a, 0x001a, 0x5e93, 0x001a, 0x001a, 0xde97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xd9ee, 0x001a, 0xda8c, 0x001a, 0x001a, 0x001a, 0xfae8, 0x001a, 0x001a, 0x001a, 0xfbe8, 0xfce8, 0x40e9, 0x001a, 0x42e9, 0x41e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9795, 0x001a, 0x43e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x44e9, 0x001a, 0x45e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x46e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48e9, 0x47e9, 0x001a, 0x49e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf294, 0xcae3, 0x001a, 0x001a, 0x4890, 0x001a, 0x001a, 0x518b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ae9, 0x001a, 0x4be9, 0x001a, 0xaa99, 0x5a9f, 0xd194, 0x001a, 0x001a, 0xf988, 0x001a, 0xb988, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x948e, 0x4f96, 0xfc8f, 0x001a, 0x001a, 0x001a, 0x001a, 0x4ce9, 0x001a, 0xdd96, 0x001a, 0x001a, 0x001a, 0x4de9, 0x7b97, 0x001a, 0x6189, 0x001a, 0x001a, 0x001a, 0x608e, 0x001a, 0x4ee9, 0xec89, 0x4fe9, 0x001a, 0x001a, 0x001a, 0x50e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x52e9, 0x53e9, 0x001a, 0x55e9, 0x51e9, 0x001a, 0x001a, 0x54e9, 0x001a, 0x001a, 0xdcee, 0xd98a, 0x001a, 0x001a, 0x001a, 0x56e9, 0x001a, 0x57e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58e9, 0x59e9, 0x001a, 0x001a, 0x001a, 0x5ae9, 0x001a, 0x001a, 0x5ce9, 0x001a, 0x001a, 0x001a, 0x5be9, 0x001a, 0x5ee9, 0x61e9, 0x001a, 0x001a, 0x001a, 0x5de9, 0x5fe9, 0x60e9, 0x001a, 0x001a, 0x62e9, 0x001a, 0xc08b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf18e, 0x63e9, 0x64e9, 0x818d, 0x001a, 0x001a, 0x001a, 0x001a, 0xdeee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x65e9, 0x001a, 0x001a, 0x5d8a, 0x001a, 0x001a, 0x001a, 0x6e94, 0x66e9, 0x67e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x7992, 0xe993, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x68e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x9d94, 0x001a, 0x001a, 0xca91, 0x7789, 0xec8b, 0x001a, 0xed8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9392, 0x6de9, 0xee8b, 0x001a, 0x001a, 0xed89, 0x001a, 0x001a, 0x6ce9, 0x001a, 0x001a, 0x6ae9, 0x001a, 0x6be9, 0x001a, 0x69e9, 0x001a, 0x001a, 0x77e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6ee9, 0x6fe9, 0x001a, 0x001a, 0x70e9, 0x71e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73e9, 0x001a, 0x001a, 0x72e9, 0x001a, 0x001a, 0x001a, 0x788f, 0x001a, 0x74e9, 0x001a, 0x001a, 0x001a, 0x76e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x528b, 0x75e9, 0x001a, 0x001a, 0x9b91, 0xb18c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x78e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcb91, 0x001a, 0x001a, 0x79e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xab93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7ae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x80e9, 0x001a, 0x7de9, 0x001a, 0x7ce9, 0x7ee9, 0x001a, 0x7be9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x82e9, 0xdfee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x81e9, 0x001a, 0x84e9, 0x001a, 0x001a, 0xc18b, 0x83e9, 0x001a, 0x001a, 0x001a, 0x85e9, 0x001a, 0x001a, 0x86e9, 0x001a, 0x88e9, 0x87e9, 0x001a, 0x001a, 0x001a, 0x89e9, 0x8be9, 0x8ae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9c8d, 0x001a, 0x001a, 0x001a, 0x001a, 0x8ce9, 0x001a, 0x001a, 0x8de9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5b8a, 0x001a, 0x001a, 0x001a, 0x8ee9, 0x001a, 0x001a, 0x001a, 0x8fe9, 0x001a, 0x001a, 0x001a, 0x9190, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x90e9, 0x001a, 0x91e9, 0x001a, 0x92e9, 0x93e9, 0x001a, 0x001a, 0x001a, 0x828d, 0xe0ee, 0x001a, 0x001a, 0xe1ee, 0x001a, 0x94e9, 0x95e9, 0x001a, 0x001a, 0x96e9, 0x97e9, 0x001a, 0x001a, 0x98e9, 0x001a, 0x001a, 0x001a, 0xaf94, 0x9ae9, 0x001a, 0x4595, 0x9be9, 0x99e9, 0x001a, 0x9de9, 0x001a, 0x001a, 0x9ce9, 0x001a, 0x001a, 0x9ee9, 0x001a, 0x001a, 0x001a, 0x9fe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xa1e9, 0x001a, 0xa2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa3e9, 0x001a, 0x001a, 0xa4e9, 0xa5e9, 0x001a, 0xa6e9, 0x001a, 0xa7e9, 0xa8e9, 0xa9e9, 0xaae9, 0x001a, 0x001a, 0x001a, 0xabe9, 0xace9, 0x001a, 0x549f, 0xade9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xf6e2, 0x538b, 0x001a, 0x001a, 0x001a, 0x001a, 0x408a, 0xb08d, 0xafe9, 0xaee9, 0xa396, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb1e9, 0xb2e9, 0xb0e9, 0x001a, 0xb3e9, 0x001a, 0x001a, 0x8296, 0x001a, 0x001a, 0x001a, 0xb4e9, 0x001a, 0x9b8b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4498, 0x001a, 0x001a, 0xe3ee, 0x001a, 0xb5e9, 0xe2ee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbc88, 0xe4ee, 0x001a, 0xb8e9, 0xa995, 0xb6e9, 0x001a, 0x001a, 0xb9e9, 0xbae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbbe9, 0xbce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xbde9, 0x001a, 0x8e96, 0x4c8e, 0x001a, 0xf88d, 0x4e91, 0x001a, 0x001a, 0xe5ee, 0x001a, 0x001a, 0xbee9, 0x001a, 0x001a, 0x001a, 0x001a, 0xc1e9, 0x001a, 0xe6ee, 0x001a, 0x001a, 0x001a, 0x001a, 0xbfe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc2e9, 0x001a, 0x001a, 0xef8c, 0xc0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0xc3e9, 0x001a, 0xc4e9, 0xc5e9, 0x001a, 0xc9e9, 0x001a, 0x498e, 0x001a, 0x001a, 0x001a, 0x001a, 0xe291, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcae9, 0xc7e9, 0xc6e9, 0xc8e9, 0x001a, 0x001a, 0x001a, 0x7e8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcee9, 0xcde9, 0xcce9, 0x001a, 0x001a, 0xb188, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe7ee, 0x001a, 0x001a, 0x001a, 0xd8e9, 0x001a, 0xd4e9, 0x001a, 0xd5e9, 0xd1e9, 0xd7e9, 0x001a, 0xd3e9, 0x828a, 0x001a, 0x001a, 0x6b98, 0x001a, 0xd6e9, 0xd2e9, 0xd0e9, 0xcfe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdae9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xdde9, 0x001a, 0x001a, 0xdce9, 0xdbe9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6895, 0xd9e9, 0xf188, 0xdee9, 0x001a, 0xe0e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8f8a, 0xcbe9, 0x5689, 0x001a, 0x001a, 0xe2e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe1e9, 0xdfe9, 0x4c92, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9096, 0x001a, 0x001a, 0x001a, 0x001a, 0xd897, 0x001a, 0x001a, 0xe3e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe4e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe5e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe6e9, 0x001a, 0xe7e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb992, 0x001a, 0xe8e9, 0x001a, 0xb594, 0x001a, 0xede9, 0xe9e9, 0x001a, 0x001a, 0x001a, 0xeae9, 0x001a, 0x001a, 0x5096, 0xc296, 0x001a, 0xce93, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xeee9, 0x001a, 0x001a, 0xefe9, 0xbc93, 0xece9, 0xebe9, 0x001a, 0x001a, 0x001a, 0x001a, 0xa889, 0x001a, 0x001a, 0x001a, 0xf7e9, 0x001a, 0x001a, 0xf6e9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9589, 0x001a, 0x001a, 0x001a, 0xf4e9, 0x001a, 0x001a, 0x001a, 0xf3e9, 0x001a, 0x001a, 0xf1e9, 0x001a, 0x9b8a, 0x001a, 0xf0e9, 0xb08e, 0xa789, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x838d, 0x001a, 0x001a, 0xfae9, 0xf9e9, 0x001a, 0xf8e9, 0x001a, 0x001a, 0xf5e9, 0x001a, 0xfbe9, 0x001a, 0xfce9, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x44ea, 0x43ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x45ea, 0x001a, 0x001a, 0x4c89, 0x40ea, 0x41ea, 0x001a, 0x948d, 0xb796, 0x001a, 0x001a, 0x42ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xe9ee, 0x5196, 0x001a, 0x001a, 0x4aea, 0xe8ee, 0x001a, 0x46ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x48ea, 0x001a, 0x47ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7b8c, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4cea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4dea, 0x001a, 0x001a, 0x001a, 0x001a, 0x4eea, 0x001a, 0x49ea, 0x001a, 0x001a, 0x001a, 0xf2e9, 0x001a, 0x001a, 0x4fea, 0x001a, 0xdf92, 0x001a, 0x001a, 0x001a, 0x53ea, 0x001a, 0x54ea, 0x52ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x51ea, 0x57ea, 0x001a, 0x50ea, 0x001a, 0x55ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x56ea, 0x001a, 0x001a, 0x001a, 0x59ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x58ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5cea, 0x001a, 0x5dea, 0x001a, 0x001a, 0x6898, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x5aea, 0xe991, 0xeb8d, 0x001a, 0x001a, 0x5eea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xebee, 0x5fea, 0x60ea, 0x001a, 0x001a, 0x61ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x62ea, 0x001a, 0x001a, 0xb28c, 0x63ea, 0x001a, 0x001a, 0x001a, 0x64ea, 0x001a, 0xad8e, 0x001a, 0x65ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x66ea, 0x001a, 0x001a, 0x67ea, 0x68ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x6bea, 0x69ea, 0x5b98, 0x001a, 0x6aea, 0x001a, 0xed97, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6cea, 0x001a, 0xd997, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6dea, 0x9e94, 0x001a, 0x001a, 0x6eea, 0x70ea, 0x001a, 0x001a, 0x71ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6fea, 0x8d8d, 0xcb96, 0x8396, 0xf59b, 0x001a, 0x809f, 0x9b96, 0x001a, 0x001a, 0x001a, 0x001a, 0xa989, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73ea, 0x6f8b, 0x74ea, 0x75ea, 0x76ea, 0xecee, 0x958d, 0x001a, 0x77ea, 0x001a, 0x001a, 0x001a, 0xd2e0, 0xd996, 0x001a, 0xe191, 0x78ea, 0x7aea, 0x79ea, 0x001a, 0x7bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x7cea, 0x001a, 0x001a, 0x7dea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x7eea, 0x001a, 0x001a, 0x001a, 0x001a, 0x80ea, 0x001a, 0x81ea, 0x82ea, 0x001a, 0x83ea, 0x001a, 0x84ea, 0x85ea, 0x86ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x87ea, 0x88ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4393, 0x001a, 0x001a, 0x001a, 0x001a, 0xdb8c, 0x001a, 0x8aea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x6c91, 0x8bea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8cea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x4095, 0x001a, 0x001a, 0x8dea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x8eea, 0x56e2, 0x001a, 0x001a, 0xd8e6, 0xebe8, 0x001a, 0x001a, 0x8fea, 0x001a, 0x90ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x92ea, 0x93ea, 0x94ea, 0xee97, 0x91ea, 0x001a, 0x001a, 0x95ea, 0x96ea, 0x001a, 0x001a, 0x98ea, 0x001a, 0x97ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9aea, 0x001a, 0x001a, 0x001a, 0x9bea, 0x99ea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xb497, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9cea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9dea, 0x73e2, 0x001a, 0x001a, 0x9eea, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0xf900[ 320 ] = { 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xc4ed, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0xcdee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x73ed, 0x7eed, 0x80ed, 0x95ed, 0xbced, 0xcced, 0xceed, 0xf9ed, 0x42ee, 0x59ee, 0x61ee, 0x62ee, 0x63ee, 0x65ee, 0x69ee, 0x6cee, 0x75ee, 0x81ee, 0x83ee, 0x84ee, 0x8dee, 0x95ee, 0x97ee, 0x98ee, 0x9bee, 0xb7ee, 0xbeee, 0xceee, 0xdaee, 0xdbee, 0xddee, 0xeaee, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; const uint16_t libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ 256 ] = { 0x001a, 0x4981, 0xfcee, 0x9481, 0x9081, 0x9381, 0x9581, 0xfbee, 0x6981, 0x6a81, 0x9681, 0x7b81, 0x4381, 0x7c81, 0x4481, 0x5e81, 0x4f82, 0x5082, 0x5182, 0x5282, 0x5382, 0x5482, 0x5582, 0x5682, 0x5782, 0x5882, 0x4681, 0x4781, 0x8381, 0x8181, 0x8481, 0x4881, 0x9781, 0x6082, 0x6182, 0x6282, 0x6382, 0x6482, 0x6582, 0x6682, 0x6782, 0x6882, 0x6982, 0x6a82, 0x6b82, 0x6c82, 0x6d82, 0x6e82, 0x6f82, 0x7082, 0x7182, 0x7282, 0x7382, 0x7482, 0x7582, 0x7682, 0x7782, 0x7882, 0x7982, 0x6d81, 0x5f81, 0x6e81, 0x4f81, 0x5181, 0x4d81, 0x8182, 0x8282, 0x8382, 0x8482, 0x8582, 0x8682, 0x8782, 0x8882, 0x8982, 0x8a82, 0x8b82, 0x8c82, 0x8d82, 0x8e82, 0x8f82, 0x9082, 0x9182, 0x9282, 0x9382, 0x9482, 0x9582, 0x9682, 0x9782, 0x9882, 0x9982, 0x9a82, 0x6f81, 0x6281, 0x7081, 0x6081, 0x001a, 0x001a, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x9181, 0x9281, 0xca81, 0x5081, 0xfaee, 0x8f81, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a, 0x001a }; /* Determines the size of a byte stream character from an Unicode character * Adds the size to the byte stream character size value * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_932_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_932_unicode_character_size_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream_character_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream character size.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0380; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3100 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x3200 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3200; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3200[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_character_size += 2; } else { *byte_stream_character_size += 1; } return( 1 ); } /* Copies a Unicode character from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_932_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_932_copy_from_byte_stream"; uint8_t additional_character = 0; uint8_t byte_stream_character = 0; if( unicode_character == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid Unicode character.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } byte_stream_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character < 0x80 ) { *unicode_character = byte_stream_character; } else if( ( byte_stream_character >= 0xa1 ) && ( byte_stream_character < 0xe0 ) ) { *unicode_character = 0xff61 + byte_stream_character - 0xa1; } else if( ( *byte_stream_index + 1 ) <= byte_stream_size ) { *byte_stream_index += 1; additional_character = byte_stream[ *byte_stream_index ]; if( byte_stream_character == 0x81 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xad ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8140[ additional_character ]; } else if( ( additional_character >= 0xb8 ) && ( additional_character < 0xc0 ) ) { additional_character -= 0xb8; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81b8[ additional_character ]; } else if( ( additional_character >= 0xc8 ) && ( additional_character < 0xcf ) ) { additional_character -= 0xc8; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81c8[ additional_character ]; } else if( ( additional_character >= 0xda ) && ( additional_character < 0xea ) ) { additional_character -= 0xda; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81da[ additional_character ]; } else if( ( additional_character >= 0xf0 ) && ( additional_character < 0xf8 ) ) { additional_character -= 0xf0; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x81f0[ additional_character ]; } else if( additional_character == 0xfc ) { *unicode_character = 0x25ef; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x82 ) { if( ( additional_character >= 0x4f ) && ( additional_character < 0x59 ) ) { *unicode_character = 0xff10 - 0x4f + additional_character; } else if( ( additional_character >= 0x60 ) && ( additional_character < 0x7a ) ) { *unicode_character = 0xff21 - 0x60 + additional_character; } else if( ( additional_character >= 0x81 ) && ( additional_character < 0x9b ) ) { *unicode_character = 0xff41 - 0x81 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xf2 ) ) { *unicode_character = 0x3041 - 0x9f + additional_character; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x83 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x7f ) ) { *unicode_character = 0x30a1 - 0x40 + additional_character; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x97 ) ) { *unicode_character = 0x30e0 - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xb0 ) ) { *unicode_character = 0x0391 - 0x9f + additional_character; } else if( ( additional_character >= 0xb0 ) && ( additional_character < 0xb7 ) ) { *unicode_character = 0x03a3 - 0xb0 + additional_character; } else if( ( additional_character >= 0xbf ) && ( additional_character < 0xd0 ) ) { *unicode_character = 0x03b1 - 0xbf + additional_character; } else if( ( additional_character >= 0xd0 ) && ( additional_character < 0xd7 ) ) { *unicode_character = 0x03c3 - 0xd0 + additional_character; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x84 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x61 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8440[ additional_character ]; } else if( ( additional_character >= 0x70 ) && ( additional_character < 0x7f ) ) { additional_character -= 0x70; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8470[ additional_character ]; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x92 ) ) { *unicode_character = 0x043e - 0x80 + additional_character; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xbf ) ) { additional_character -= 0x9f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x849f[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x87 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x54 ) ) { *unicode_character = 0x2460 - 0x40 + additional_character; } else if( ( additional_character >= 0x54 ) && ( additional_character < 0x5e ) ) { *unicode_character = 0x2160 - 0x54 + additional_character; } else if( ( additional_character >= 0x5f ) && ( additional_character < 0x76 ) ) { additional_character -= 0x5f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x875f[ additional_character ]; } else if( additional_character == 0x7e ) { *unicode_character = 0x337b; } else if( ( additional_character >= 0x80 ) && ( additional_character < 0x9d ) ) { additional_character -= 0x80; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8780[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x88 ) { if( ( additional_character >= 0x9f ) && ( additional_character < 0xfd ) ) { additional_character -= 0x9f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x889f[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0x89 ) && ( byte_stream_character <= 0x97 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x89: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8940[ additional_character ]; break; case 0x8a: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8a40[ additional_character ]; break; case 0x8b: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8b40[ additional_character ]; break; case 0x8c: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8c40[ additional_character ]; break; case 0x8d: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8d40[ additional_character ]; break; case 0x8e: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8e40[ additional_character ]; break; case 0x8f: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x8f40[ additional_character ]; break; case 0x90: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9040[ additional_character ]; break; case 0x91: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9140[ additional_character ]; break; case 0x92: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9240[ additional_character ]; break; case 0x93: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9340[ additional_character ]; break; case 0x94: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9440[ additional_character ]; break; case 0x95: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9540[ additional_character ]; break; case 0x96: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9640[ additional_character ]; break; case 0x97: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9740[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0x98 ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x73 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9840[ additional_character ]; } else if( ( additional_character >= 0x9f ) && ( additional_character < 0xfd ) ) { additional_character -= 0x9f; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x989f[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0x99 ) && ( byte_stream_character <= 0x9f ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0x99: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9940[ additional_character ]; break; case 0x9a: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9a40[ additional_character ]; break; case 0x9b: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9b40[ additional_character ]; break; case 0x9c: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9c40[ additional_character ]; break; case 0x9d: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9d40[ additional_character ]; break; case 0x9e: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9e40[ additional_character ]; break; case 0x9f: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0x9f40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xe0 ) && ( byte_stream_character <= 0xe9 ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xe0: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe040[ additional_character ]; break; case 0xe1: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe140[ additional_character ]; break; case 0xe2: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe240[ additional_character ]; break; case 0xe3: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe340[ additional_character ]; break; case 0xe4: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe440[ additional_character ]; break; case 0xe5: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe540[ additional_character ]; break; case 0xe6: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe640[ additional_character ]; break; case 0xe7: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe740[ additional_character ]; break; case 0xe8: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe840[ additional_character ]; break; case 0xe9: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xe940[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xea ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xa5 ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xea40[ additional_character ]; } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xed ) && ( byte_stream_character <= 0xee ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xed: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xed40[ additional_character ]; break; case 0xee: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xee40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( ( byte_stream_character >= 0xfa ) && ( byte_stream_character <= 0xfb ) ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0xfd ) ) { additional_character -= 0x40; switch( byte_stream_character ) { case 0xfa: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfa40[ additional_character ]; break; case 0xfb: *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfb40[ additional_character ]; break; } } else { *unicode_character = 0xfffd; } } else if( byte_stream_character == 0xfc ) { if( ( additional_character >= 0x40 ) && ( additional_character < 0x4c ) ) { additional_character -= 0x40; *unicode_character = libuna_codepage_windows_932_byte_stream_to_unicode_base_0xfc40[ additional_character ]; } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } } else { *unicode_character = 0xfffd; } *byte_stream_index += 1; return( 1 ); } /* Copies a Unicode character to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_codepage_windows_932_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ) { static char *function = "libuna_codepage_windows_932_copy_to_byte_stream"; uint16_t byte_stream_value = 0x001a; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream too small.", function ); return( -1 ); } if( unicode_character < 0x0080 ) { byte_stream_value = (uint16_t) unicode_character; } else if( ( unicode_character >= 0x0080 ) && ( unicode_character < 0x0100 ) ) { unicode_character -= 0x0080; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0080[ unicode_character ]; } else if( ( unicode_character >= 0x0380 ) && ( unicode_character < 0x0480 ) ) { unicode_character -= 0x0380; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x0380[ unicode_character ]; } else if( ( unicode_character >= 0x2000 ) && ( unicode_character < 0x2340 ) ) { unicode_character -= 0x2000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2000[ unicode_character ]; } else if( ( unicode_character >= 0x2440 ) && ( unicode_character < 0x2680 ) ) { unicode_character -= 0x2440; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x2440[ unicode_character ]; } else if( ( unicode_character >= 0x3000 ) && ( unicode_character < 0x3100 ) ) { unicode_character -= 0x3000; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3000[ unicode_character ]; } else if( ( unicode_character >= 0x3200 ) && ( unicode_character < 0x3400 ) ) { unicode_character -= 0x3200; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x3200[ unicode_character ]; } else if( ( unicode_character >= 0x4e00 ) && ( unicode_character < 0x9fc0 ) ) { unicode_character -= 0x4e00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0x4e00[ unicode_character ]; } else if( ( unicode_character >= 0xf900 ) && ( unicode_character < 0xfa40 ) ) { unicode_character -= 0xf900; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xf900[ unicode_character ]; } else if( ( unicode_character >= 0xff00 ) && ( unicode_character < 0x10000 ) ) { unicode_character -= 0xff00; byte_stream_value = libuna_codepage_windows_932_unicode_to_byte_stream_base_0xff00[ unicode_character ]; } byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); byte_stream_value >>= 8; if( byte_stream_value != 0 ) { *byte_stream_index += 1; byte_stream[ *byte_stream_index ] = (uint8_t) ( byte_stream_value & 0x00ff ); } *byte_stream_index += 1; return( 1 ); } libpff-20120802/libuna/libuna_utf8_stream.h0000644000175000017500000000566612005152764015372 00000000000000/* * UTF-8 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF8_STREAM_H ) #define _LIBUNA_UTF8_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_utf8_stream_copy_byte_order_mark( uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf8_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_stream_copy_from_utf8( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_stream_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf8_stream */ LIBUNA_EXTERN \ int libuna_utf8_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_stream_copy_from_utf16( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_stream_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf8_stream */ LIBUNA_EXTERN \ int libuna_utf8_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf8_stream_copy_from_utf32( uint8_t *utf8_stream, size_t utf8_stream_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf8_stream_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf8_stream */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_url_stream.h0000644000175000017500000000354412005152764015277 00000000000000/* * Percent or URL encoded stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_URL_STREAM_H ) #define _LIBUNA_URL_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_url_stream_size_from_byte_stream( uint8_t *byte_stream, size_t byte_stream_size, size_t *url_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_url_stream_copy_from_byte_stream( uint8_t *url_stream, size_t url_stream_size, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_url_stream_size_to_byte_stream( uint8_t *url_stream, size_t url_stream_size, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_url_stream_copy_to_byte_stream( uint8_t *url_stream, size_t url_stream_size, uint8_t *byte_stream, size_t byte_stream_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_949.h0000644000175000017500000000360112005152764017042 00000000000000/* * Windows 949 codepage (Korean) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_949_H ) #define _LIBUNA_CODEPAGE_WINDOWS_949_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_949_unicode_character_size_to_byte_stream( libuna_unicode_character_t unicode_character, size_t *byte_stream_character_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_949_copy_from_byte_stream( libuna_unicode_character_t *unicode_character, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_codepage_windows_949_copy_to_byte_stream( libuna_unicode_character_t unicode_character, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_8.c0000644000175000017500000000510712005152764016457 00000000000000/* * ISO 8859-8 codepage (Hebrew) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_8.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-8 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0xfffd, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00d7, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00f7, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2017, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5, 0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05da, 0x05db, 0x05dc, 0x05dd, 0x05de, 0x05df, 0x05e0, 0x05e1, 0x05e2, 0x05e3, 0x05e4, 0x05e5, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea, 0xfffd, 0xfffd, 0x200e, 0x200f, 0xfffd }; /* Unicode to ASCII character lookup table for ISO 8859-8 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a }; const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ 32 ] = { 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_types.h0000644000175000017500000000264412005152764014266 00000000000000/* * The internal type definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_TYPES_H ) #define _LIBUNA_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna * The definitions in are copied here * for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) /* Unicode character definitions */ typedef uint32_t libuna_unicode_character_t; /* UTF-8 character definitions */ typedef uint8_t libuna_utf8_character_t; /* UTF-16 character definitions */ typedef uint16_t libuna_utf16_character_t; /* UTF-32 character definitions */ typedef uint32_t libuna_utf32_character_t; #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1252.h0000644000175000017500000000235112005152764017107 00000000000000/* * Windows 1252 codepage (Western European/Latin 1) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1252_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1252_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1252_byte_stream_to_unicode_base_0x80[ 32 ]; extern const uint8_t libuna_codepage_windows_1252_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1250.c0000644000175000017500000001033512005152764017101 00000000000000/* * Windows 1250 codepage (Central European) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1250.h" /* Extended ASCII to Unicode character lookup table for Windows 1250 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1250_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0xfffd, 0x201e, 0x2026, 0x2020, 0x2021, 0xfffd, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0xfffd, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a, 0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b, 0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c, 0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e, 0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7, 0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df, 0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f, 0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7, 0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9 }; /* Unicode to ASCII character lookup table for Windows 1250 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x00a0[ 128 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0x1a, 0x1a, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0x1a, 0xc7, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0x1a, 0x1a, 0xda, 0x1a, 0xdc, 0xdd, 0x1a, 0xdf, 0x1a, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0x1a, 0xe7, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0x1a, 0x1a, 0xfa, 0x1a, 0xfc, 0xfd, 0x1a, 0x1a, 0x1a, 0x1a, 0xc3, 0xe3, 0xa5, 0xb9, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0xcf, 0xef, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x0138[ 72 ] = { 0x1a, 0xc5, 0xe5, 0x1a, 0x1a, 0xbc, 0xbe, 0x1a, 0x1a, 0xa3, 0xb3, 0xd1, 0xf1, 0x1a, 0x1a, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd5, 0xf5, 0x1a, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xd8, 0xf8, 0x8c, 0x9c, 0x1a, 0x1a, 0xaa, 0xba, 0x8a, 0x9a, 0xde, 0xfe, 0x8d, 0x9d, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8f, 0x9f, 0xaf, 0xbf, 0x8e, 0x9e, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x02d8[ 8 ] = { 0xa2, 0xff, 0x1a, 0xb2, 0x1a, 0xbd, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; const uint8_t libuna_codepage_windows_1250_unicode_to_byte_stream_base_0x2030[ 16 ] = { 0x89, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x8b, 0x9b, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_utf16_string.c0000644000175000017500000022226612005152764015454 00000000000000/* * UTF-16 string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf16_string.h" /* Determines the size of an UTF-16 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if the byte stream is terminated with a zero byte */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { *utf16_string_size += 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Determine how many UTF-16 character byte words are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_byte_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_byte_stream( utf16_string, utf16_string_size, &utf16_string_index, byte_stream, byte_stream_size, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from a byte stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_byte_stream"; size_t byte_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character byte words */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with a byte stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_byte_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_byte_stream"; size_t byte_stream_index = 0; size_t utf16_string_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t byte_stream_unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the byte stream is terminated with zero bytes */ if( byte_stream[ byte_stream_size - 1 ] == 0 ) { byte_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( byte_stream_index < byte_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the byte stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_byte_stream( &byte_stream_unicode_character, byte_stream, byte_stream_size, &byte_stream_index, codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from byte stream.", function ); return( -1 ); } if( utf16_unicode_character != byte_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( byte_stream_index != byte_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if the UTF-7 stream is terminated with a zero byte */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { *utf16_string_size += 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf7_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf7_stream( utf16_string, utf16_string_size, &utf16_string_index, utf7_stream, utf7_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-7 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-7 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf7_stream"; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; uint8_t zero_byte = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf7_stream_index < utf7_stream_size ) { /* Convert the UTF-7 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-7 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf7_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf7_stream"; size_t utf16_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf7_stream_unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-7 stream bytes.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-7 stream is terminated with zero bytes */ if( utf7_stream[ utf7_stream_size - 1 ] == 0 ) { utf7_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf7_stream_index < utf7_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-7 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf7_stream( &utf7_stream_unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-7 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf7_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf7_stream_index != utf7_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf8"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf8( utf16_string, utf16_string_size, &utf16_string_index, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf8_stream( const uint8_t *utf8_stream, size_t utf8_stream_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with a zero byte */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { *utf16_string_size += 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf8_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf8_stream( utf16_string, utf16_string_size, &utf16_string_index, utf8_stream, utf8_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to UTF-8 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-8 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf8_stream"; size_t utf8_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] != 0 ) { zero_byte = 1; } while( utf8_stream_index < utf8_stream_size ) { /* Convert the UTF-8 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-8 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf8_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf8_stream"; size_t utf16_string_index = 0; size_t utf8_stream_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf8_stream_unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 stream.", function ); return( -1 ); } if( utf8_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_stream_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-8 stream bytes.", function ); return( -1 ); } /* Check if UTF-8 stream starts with a byte order mark (BOM) */ if( utf8_stream_size >= 3 ) { if( ( utf8_stream[ 0 ] == 0x0ef ) && ( utf8_stream[ 1 ] == 0x0bb ) && ( utf8_stream[ 2 ] == 0x0bf ) ) { utf8_stream_index += 3; } } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-8 stream is terminated with zero bytes */ if( utf8_stream[ utf8_stream_size - 1 ] == 0 ) { utf8_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf8_stream_index < utf8_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &utf8_stream_unicode_character, utf8_stream, utf8_stream_size, &utf8_stream_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf8_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf8_stream_index != utf8_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { *utf16_string_size += 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf16_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf16_stream( utf16_string, utf16_string_size, &utf16_string_index, utf16_stream, utf16_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-16 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf16_stream"; size_t utf16_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0x0ff ) && ( utf16_stream[ 1 ] == 0x0fe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0x0fe ) && ( utf16_stream[ 1 ] == 0x0ff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] != 0 ) || ( utf16_stream[ utf16_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf16_stream_index + 1 ) < utf16_stream_size ) { /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( utf16_stream_index != utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-16 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf16_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf16_stream"; size_t utf16_stream_index = 0; size_t utf16_string_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf16_stream_unicode_character = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf16_stream_size < 2 ) || ( ( utf16_stream_size % 2 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-16 stream bytes.", function ); return( -1 ); } /* Check if UTF-16 stream is in big or little endian */ if( ( utf16_stream[ 0 ] == 0xfe ) && ( utf16_stream[ 1 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf16_stream_index = 2; } else if( ( utf16_stream[ 0 ] == 0xff ) && ( utf16_stream[ 1 ] == 0xfe ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf16_stream_index = 2; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-16 stream is terminated with zero bytes */ if( ( utf16_stream[ utf16_stream_size - 2 ] == 0 ) && ( utf16_stream[ utf16_stream_size - 1 ] == 0 ) ) { utf16_stream_size -= 2; } while( ( utf16_string_index < utf16_string_size ) && ( utf16_stream_index < utf16_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-16 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16_stream( &utf16_stream_unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf16_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf16_stream_index != utf16_stream_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf32"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf32( utf16_string, utf16_string_size, &utf16_string_index, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 string to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } return( 1 ); } /* Compares an UTF-16 string with an UTF-32 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf32( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf32"; size_t utf16_string_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf32_unicode_character = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } if( utf32_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf32_string_index < utf32_string_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &utf32_unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } if( utf16_unicode_character != utf32_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf32_string_index != utf32_string_size ) ) { return( 0 ); } return( 1 ); } /* Determines the size of an UTF-16 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_size_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; int read_byte_order = 0; if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 0; /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { *utf16_string_size += 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_copy_from_utf32_stream"; size_t utf16_string_index = 0; if( libuna_utf16_string_with_index_copy_from_utf32_stream( utf16_string, utf16_string_size, &utf16_string_index, utf32_stream, utf32_stream_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 string from an UTF-32 stream * Returns 1 if successful or -1 on error */ int libuna_utf16_string_with_index_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_with_index_copy_from_utf32_stream"; size_t utf32_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint8_t zero_byte = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 3 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 2 ] != 0 ) || ( utf32_stream[ utf32_stream_size - 1 ] != 0 ) ) { zero_byte = 1; } while( ( utf32_stream_index + 1 ) < utf32_stream_size ) { /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 character bytes */ if( libuna_unicode_character_copy_to_utf16( unicode_character, utf16_string, utf16_string_size, utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16.", function ); return( -1 ); } } if( utf32_stream_index != utf32_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } if( zero_byte != 0 ) { if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } return( 1 ); } /* Compares an UTF-16 string with an UTF-32 stream * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libuna_utf16_string_compare_with_utf32_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_string_compare_with_utf32_stream"; size_t utf16_string_index = 0; size_t utf32_stream_index = 0; libuna_unicode_character_t utf16_unicode_character = 0; libuna_unicode_character_t utf32_stream_unicode_character = 0; int read_byte_order = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 stream.", function ); return( -1 ); } if( utf32_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 stream size value exceeds maximum.", function ); return( -1 ); } if( ( utf32_stream_size < 4 ) || ( ( utf32_stream_size % 4 ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing UTF-32 stream bytes.", function ); return( -1 ); } /* Check if UTF-32 stream is in big or little endian */ if( ( utf32_stream[ 0 ] == 0x00 ) && ( utf32_stream[ 1 ] == 0x00 ) && ( utf32_stream[ 2 ] == 0xfe ) && ( utf32_stream[ 3 ] == 0xff ) ) { read_byte_order = LIBUNA_ENDIAN_BIG; utf32_stream_index = 4; } else if( ( utf32_stream[ 0 ] == 0xff ) && ( utf32_stream[ 1 ] == 0xfe ) && ( utf32_stream[ 2 ] == 0x00 ) && ( utf32_stream[ 3 ] == 0x00 ) ) { read_byte_order = LIBUNA_ENDIAN_LITTLE; utf32_stream_index = 4; } if( byte_order == 0 ) { byte_order = read_byte_order; } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string[ utf16_string_size - 1 ] == 0 ) { utf16_string_size -= 1; } /* Check if the UTF-32 stream is terminated with zero bytes */ if( ( utf32_stream[ utf32_stream_size - 4 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 3 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 2 ] == 0 ) && ( utf32_stream[ utf32_stream_size - 1 ] == 0 ) ) { utf32_stream_size -= 1; } while( ( utf16_string_index < utf16_string_size ) && ( utf32_stream_index < utf32_stream_size ) ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &utf16_unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Convert the UTF-32 stream bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32_stream( &utf32_stream_unicode_character, utf32_stream, utf32_stream_size, &utf32_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 stream.", function ); return( -1 ); } if( utf16_unicode_character != utf32_stream_unicode_character ) { return( 0 ); } } /* Check if both strings were entirely processed */ if( ( utf16_string_index != utf16_string_size ) || ( utf32_stream_index != utf32_stream_size ) ) { return( 0 ); } return( 1 ); } libpff-20120802/libuna/libuna_codepage_iso_8859_5.h0000644000175000017500000000231712005152764016461 00000000000000/* * ISO 8859-5 codepage (Cyrillic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_5_H ) #define _LIBUNA_CODEPAGE_ISO_8859_5_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_5_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_5_unicode_to_byte_stream_base_0x0400[ 96 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_extern.h0000644000175000017500000000246512005152764014430 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_EXTERN_H ) #define _LIBUNA_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if !defined( HAVE_LOCAL_LIBUNA ) /* If libtool DLL support is enabled set LIBUNA_DLL_EXPORT * before including libuna/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBUNA_DLL_EXPORT #endif #include #elif defined( _MSC_VER ) #define LIBUNA_EXTERN extern #else #define LIBUNA_EXTERN /* extern */ #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_4.h0000644000175000017500000000245012005152764016456 00000000000000/* * ISO 8859-4 codepage (Baltic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_4_H ) #define _LIBUNA_CODEPAGE_ISO_8859_4_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ 184 ]; extern const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ 32 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_byte_stream.h0000644000175000017500000000550312005152764015435 00000000000000/* * Byte stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BYTE_STREAM_H ) #define _LIBUNA_BYTE_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_byte_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_byte_stream_copy_from_utf8( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_byte_stream_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_byte_stream */ LIBUNA_EXTERN \ int libuna_byte_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_byte_stream_copy_from_utf16( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_byte_stream_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_byte_stream */ LIBUNA_EXTERN \ int libuna_byte_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, int codepage, size_t *byte_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_byte_stream_copy_from_utf32( uint8_t *byte_stream, size_t byte_stream_size, int codepage, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_byte_stream_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_byte_stream */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf16_string.h0000644000175000017500000002131212005152764015446 00000000000000/* * UTF-16 string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF16_STRING_H ) #define _LIBUNA_UTF16_STRING_H #include #include #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf16_string_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, int codepage, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_byte_stream is implemented by * libuna_byte_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_byte_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_byte_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *byte_stream, size_t byte_stream_size, int codepage, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf7_stream( const uint8_t *utf7_stream, size_t utf7_stream_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf7_stream is implemented by * libuna_utf7_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf7_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf7_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf7_stream, size_t utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf8( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_compare_with_utf8 is implemented by * libuna_utf8_string_compare_with_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf8_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf8_stream is implemented by * libuna_utf8_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf8_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf8_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf8_stream, size_t utf8_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf16_stream( const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf16_stream is implemented by * libuna_utf16_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf16_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf16_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf32( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf32( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_size_from_utf32_stream( const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, size_t *utf16_string_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); /* The functionality for libuna_utf16_string_copy_to_utf32_stream is implemented by * libuna_utf32_stream_copy_from_utf16 */ LIBUNA_EXTERN \ int libuna_utf16_string_with_index_copy_from_utf32_stream( libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf16_string_compare_with_utf32_stream( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, const uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_4.c0000644000175000017500000000675312005152764016463 00000000000000/* * ISO 8859-4 codepage (Baltic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_4.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-4 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_4_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x0138, 0x0156, 0x00a4, 0x0128, 0x013b, 0x00a7, 0x00a8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00ad, 0x017d, 0x00af, 0x00b0, 0x0105, 0x02db, 0x0157, 0x00b4, 0x0129, 0x013c, 0x02c7, 0x00b8, 0x0161, 0x0113, 0x0123, 0x0167, 0x014a, 0x017e, 0x014b, 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x012a, 0x0110, 0x0145, 0x014c, 0x0136, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x0168, 0x016a, 0x00df, 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x012b, 0x0111, 0x0146, 0x014d, 0x0137, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x0169, 0x016b, 0x02d9 }; /* Unicode to ASCII character lookup table for ISO 8859-4 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x00a0[ 184 ] = { 0xa0, 0x1a, 0x1a, 0x1a, 0xa4, 0x1a, 0x1a, 0xa7, 0xa8, 0x1a, 0x1a, 0x1a, 0x1a, 0xad, 0x1a, 0xaf, 0xb0, 0x1a, 0x1a, 0x1a, 0xb4, 0x1a, 0x1a, 0x1a, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x1a, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0x1a, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0x1a, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x1a, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0x1a, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0xd0, 0xf0, 0xaa, 0xba, 0x1a, 0x1a, 0xcc, 0xec, 0xca, 0xea, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xab, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0xa5, 0xb5, 0xcf, 0xef, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0xf3, 0xa2, 0x1a, 0x1a, 0xa6, 0xb6, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd1, 0xf1, 0x1a, 0x1a, 0x1a, 0xbd, 0xbf, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa3, 0xb3 }; const uint8_t libuna_codepage_iso_8859_4_unicode_to_byte_stream_base_0x0160[ 32 ] = { 0xa9, 0xb9, 0x1a, 0x1a, 0x1a, 0x1a, 0xac, 0xbc, 0xdd, 0xfd, 0xde, 0xfe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xae, 0xbe, 0x1a }; libpff-20120802/libuna/libuna_codepage_iso_8859_10.c0000644000175000017500000000623312005152764016531 00000000000000/* * ISO 8859-10 codepage (Nordic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_10.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-10 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_10_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x0112, 0x0122, 0x012a, 0x0128, 0x0136, 0x00a7, 0x013b, 0x0110, 0x0160, 0x0166, 0x017d, 0x00ad, 0x016a, 0x014a, 0x00b0, 0x0105, 0x0113, 0x0123, 0x012b, 0x0129, 0x0137, 0x00b7, 0x013c, 0x0111, 0x0161, 0x0167, 0x017e, 0x2015, 0x016b, 0x014b, 0x0100, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x012e, 0x010c, 0x00c9, 0x0118, 0x00cb, 0x0116, 0x00cd, 0x00ce, 0x00cf, 0x00d0, 0x0145, 0x014c, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x0168, 0x00d8, 0x0172, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df, 0x0101, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x012f, 0x010d, 0x00e9, 0x0119, 0x00eb, 0x0117, 0x00ed, 0x00ee, 0x00ef, 0x00f0, 0x0146, 0x014d, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x0169, 0x00f8, 0x0173, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x0138 }; /* Unicode to ASCII character lookup table for ISO 8859-10 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x00c0[ 144 ] = { 0x1a, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0x1a, 0x1a, 0xc9, 0x1a, 0xcb, 0x1a, 0xcd, 0xce, 0xcf, 0xd0, 0x1a, 0x1a, 0xd3, 0xd4, 0xd5, 0xd6, 0x1a, 0xd8, 0x1a, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0x1a, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0x1a, 0x1a, 0xe9, 0x1a, 0xeb, 0x1a, 0xed, 0xee, 0xef, 0xf0, 0x1a, 0x1a, 0xf3, 0xf4, 0xf5, 0xf6, 0x1a, 0xf8, 0x1a, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a, 0xc0, 0xe0, 0x1a, 0x1a, 0xa1, 0xb1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0xa9, 0xb9, 0xa2, 0xb2, 0x1a, 0x1a, 0xcc, 0xec, 0xca, 0xea, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa3, 0xb3, 0x1a, 0x1a, 0x1a, 0x1a, 0xa5, 0xb5, 0xa4, 0xb4, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xa6, 0xb6, 0xff, 0x1a, 0x1a, 0xa8, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd1, 0xf1, 0x1a, 0x1a, 0x1a, 0xaf, 0xbf, 0xd2, 0xf2, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_10_unicode_to_byte_stream_base_0x0160[ 16 ] = { 0xaa, 0xba, 0x1a, 0x1a, 0x1a, 0x1a, 0xab, 0xbb, 0xd7, 0xf7, 0xae, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a }; libpff-20120802/libuna/Makefile.in0000664000175000017500000011057212006536016013463 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libuna DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libuna_la_LIBADD = am__libuna_la_SOURCES_DIST = libuna_base16_stream.c \ libuna_base16_stream.h libuna_base32_stream.c \ libuna_base32_stream.h libuna_base64_stream.c \ libuna_base64_stream.h libuna_byte_stream.c \ libuna_byte_stream.h libuna_codepage_iso_8859_2.c \ libuna_codepage_iso_8859_2.h libuna_codepage_iso_8859_3.c \ libuna_codepage_iso_8859_3.h libuna_codepage_iso_8859_4.c \ libuna_codepage_iso_8859_4.h libuna_codepage_iso_8859_5.c \ libuna_codepage_iso_8859_5.h libuna_codepage_iso_8859_6.c \ libuna_codepage_iso_8859_6.h libuna_codepage_iso_8859_7.c \ libuna_codepage_iso_8859_7.h libuna_codepage_iso_8859_8.c \ libuna_codepage_iso_8859_8.h libuna_codepage_iso_8859_9.c \ libuna_codepage_iso_8859_9.h libuna_codepage_iso_8859_10.c \ libuna_codepage_iso_8859_10.h libuna_codepage_iso_8859_13.c \ libuna_codepage_iso_8859_13.h libuna_codepage_iso_8859_14.c \ libuna_codepage_iso_8859_14.h libuna_codepage_iso_8859_15.c \ libuna_codepage_iso_8859_15.h libuna_codepage_iso_8859_16.c \ libuna_codepage_iso_8859_16.h libuna_codepage_koi8_r.c \ libuna_codepage_koi8_r.h libuna_codepage_koi8_u.c \ libuna_codepage_koi8_u.h libuna_codepage_windows_874.c \ libuna_codepage_windows_874.h libuna_codepage_windows_932.c \ libuna_codepage_windows_932.h libuna_codepage_windows_936.c \ libuna_codepage_windows_936.h libuna_codepage_windows_949.c \ libuna_codepage_windows_949.h libuna_codepage_windows_950.c \ libuna_codepage_windows_950.h libuna_codepage_windows_1250.c \ libuna_codepage_windows_1250.h libuna_codepage_windows_1251.c \ libuna_codepage_windows_1251.h libuna_codepage_windows_1252.c \ libuna_codepage_windows_1252.h libuna_codepage_windows_1253.c \ libuna_codepage_windows_1253.h libuna_codepage_windows_1254.c \ libuna_codepage_windows_1254.h libuna_codepage_windows_1255.c \ libuna_codepage_windows_1255.h libuna_codepage_windows_1256.c \ libuna_codepage_windows_1256.h libuna_codepage_windows_1257.c \ libuna_codepage_windows_1257.h libuna_codepage_windows_1258.c \ libuna_codepage_windows_1258.h libuna_definitions.h \ libuna_error.c libuna_error.h libuna_extern.h libuna_inline.h \ libuna_libcerror.h libuna_support.c libuna_support.h \ libuna_types.h libuna_unicode_character.c \ libuna_unicode_character.h libuna_unused.h libuna_url_stream.c \ libuna_url_stream.h libuna_utf16_stream.c \ libuna_utf16_stream.h libuna_utf16_string.c \ libuna_utf16_string.h libuna_utf32_stream.c \ libuna_utf32_stream.h libuna_utf32_string.c \ libuna_utf32_string.h libuna_utf7_stream.c \ libuna_utf7_stream.h libuna_utf8_stream.c libuna_utf8_stream.h \ libuna_utf8_string.c libuna_utf8_string.h @HAVE_LOCAL_LIBUNA_TRUE@am_libuna_la_OBJECTS = \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base16_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base32_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base64_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_byte_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_2.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_3.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_4.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_5.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_6.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_7.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_8.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_9.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_10.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_13.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_14.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_15.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_16.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_r.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_u.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_874.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_932.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_936.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_949.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_950.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1250.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1251.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1252.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1253.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1254.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1255.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1256.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1257.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1258.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_error.lo libuna_support.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_unicode_character.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_url_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_string.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_string.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf7_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_stream.lo \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_string.lo libuna_la_OBJECTS = $(am_libuna_la_OBJECTS) @HAVE_LOCAL_LIBUNA_TRUE@am_libuna_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libuna_la_SOURCES) DIST_SOURCES = $(am__libuna_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBUNA_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBUNA_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBUNA_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBUNA_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBUNA_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBUNA_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBUNA_TRUE@noinst_LTLIBRARIES = libuna.la @HAVE_LOCAL_LIBUNA_TRUE@libuna_la_SOURCES = \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base16_stream.c libuna_base16_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base32_stream.c libuna_base32_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_base64_stream.c libuna_base64_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_byte_stream.c libuna_byte_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_2.c libuna_codepage_iso_8859_2.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_3.c libuna_codepage_iso_8859_3.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_4.c libuna_codepage_iso_8859_4.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_5.c libuna_codepage_iso_8859_5.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_6.c libuna_codepage_iso_8859_6.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_7.c libuna_codepage_iso_8859_7.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_8.c libuna_codepage_iso_8859_8.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_9.c libuna_codepage_iso_8859_9.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_10.c libuna_codepage_iso_8859_10.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_13.c libuna_codepage_iso_8859_13.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_14.c libuna_codepage_iso_8859_14.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_15.c libuna_codepage_iso_8859_15.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_iso_8859_16.c libuna_codepage_iso_8859_16.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_r.c libuna_codepage_koi8_r.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_koi8_u.c libuna_codepage_koi8_u.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_874.c libuna_codepage_windows_874.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_932.c libuna_codepage_windows_932.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_936.c libuna_codepage_windows_936.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_949.c libuna_codepage_windows_949.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_950.c libuna_codepage_windows_950.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1250.c libuna_codepage_windows_1250.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1251.c libuna_codepage_windows_1251.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1252.c libuna_codepage_windows_1252.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1253.c libuna_codepage_windows_1253.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1254.c libuna_codepage_windows_1254.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1255.c libuna_codepage_windows_1255.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1256.c libuna_codepage_windows_1256.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1257.c libuna_codepage_windows_1257.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_codepage_windows_1258.c libuna_codepage_windows_1258.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_definitions.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_error.c libuna_error.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_extern.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_inline.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_libcerror.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_support.c libuna_support.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_types.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_unicode_character.c libuna_unicode_character.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_unused.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_url_stream.c libuna_url_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_stream.c libuna_utf16_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf16_string.c libuna_utf16_string.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_stream.c libuna_utf32_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf32_string.c libuna_utf32_string.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf7_stream.c libuna_utf7_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_stream.c libuna_utf8_stream.h \ @HAVE_LOCAL_LIBUNA_TRUE@ libuna_utf8_string.c libuna_utf8_string.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libuna/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libuna/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libuna.la: $(libuna_la_OBJECTS) $(libuna_la_DEPENDENCIES) $(LINK) $(am_libuna_la_rpath) $(libuna_la_OBJECTS) $(libuna_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base16_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base32_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_base64_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_byte_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_13.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_14.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_15.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_7.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_8.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_iso_8859_9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_koi8_u.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1250.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1251.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1252.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1253.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1254.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1255.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1256.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1257.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_1258.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_874.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_932.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_936.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_949.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_codepage_windows_950.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_unicode_character.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_url_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf16_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf16_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf32_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf32_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf7_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf8_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libuna_utf8_string.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libuna ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libuna_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libuna/libuna_utf7_stream.h0000644000175000017500000000535512005152764015364 00000000000000/* * UTF-7 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF7_STREAM_H ) #define _LIBUNA_UTF7_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ int libuna_utf7_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf7_stream_copy_from_utf8( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf7_stream_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf7_stream */ LIBUNA_EXTERN \ int libuna_utf7_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf7_stream_copy_from_utf16( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf7_stream_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf7_stream */ LIBUNA_EXTERN \ int libuna_utf7_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf7_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf7_stream_copy_from_utf32( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf7_stream_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf7_stream */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_base32_stream.h0000644000175000017500000000727312005152764015557 00000000000000/* * Base32 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_BASE32_STREAM_H ) #define _LIBUNA_BASE32_STREAM_H #include #include #include "libuna_inline.h" #include "libuna_extern.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_INLINE \ int libuna_base32_character_copy_to_quintet( uint8_t base32_character, uint8_t *base32_quintet, uint32_t base32_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_from_base32_stream( uint64_t *base32_quintuplet, const uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, uint8_t *padding_size, uint32_t base32_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_to_base32_stream( uint64_t base32_quintuplet, uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, uint8_t padding_size, uint32_t base32_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_from_byte_stream( uint64_t *base32_quintuplet, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t *padding_size, libcerror_error_t **error ); LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_base32_quintuplet_copy_to_byte_stream( uint64_t base32_quintuplet, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t padding_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base32_stream_size_to_byte_stream( const uint8_t *base32_stream, size_t base32_stream_size, size_t *byte_stream_size, uint32_t base32_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base32_stream_copy_to_byte_stream( const uint8_t *base32_stream, size_t base32_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, uint8_t flags, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base32_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base32_stream_size, uint32_t base32_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base32_stream_copy_from_byte_stream( uint8_t *base32_stream, size_t base32_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_base32_stream_with_index_copy_from_byte_stream( uint8_t *base32_stream, size_t base32_stream_size, size_t *base32_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base32_variant, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf16_stream.c0000644000175000017500000004356412005152764015443 00000000000000/* * UTF-16 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_definitions.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf16_stream.h" /* Copies an UTF-16 stream byte order mark (BOM) * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_utf16_stream_copy_byte_order_mark( uint8_t *utf16_stream, size_t utf16_stream_size, size_t *utf16_stream_index, int byte_order, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_byte_order_mark"; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream index.", function ); return( -1 ); } if( ( *utf16_stream_index + 1 ) >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ *utf16_stream_index ] = 0xfe; utf16_stream[ *utf16_stream_index + 1 ] = 0xff; } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ *utf16_stream_index ] = 0xff; utf16_stream[ *utf16_stream_index + 1 ] = 0xfe; } *utf16_stream_index += 2; return( 1 ); } /* Determines the size of an UTF-16 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf16_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf16_stream_size = 1; while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf16_stream_size *= 2; return( 1 ); } /* Copies an UTF-16 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_copy_from_utf8( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_from_utf8"; size_t utf16_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf16_stream_copy_byte_order_mark( utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-16 byte order mark.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 stream bytes */ if( libuna_unicode_character_copy_to_utf16_stream( unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-16 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf16_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_size_from_utf16"; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream size.", function ); return( -1 ); } /* Add the byte order mark * Assumes the UTF-16 string is santized */ *utf16_stream_size = 1 + utf16_string_size; /* Convert the number of characters into bytes */ *utf16_stream_size *= 2; return( 1 ); } /* Copies an UTF-16 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_copy_from_utf16( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_from_utf16"; size_t utf16_stream_index = 0; size_t utf16_string_index = 0; libuna_utf16_character_t utf16_character = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf16_stream_copy_byte_order_mark( utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-16 byte order mark.", function ); return( -1 ); } /* Assumes the UTF-16 string is santized */ while( utf16_string_index < utf16_string_size ) { if( ( utf16_stream_index + 2 ) >= utf16_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 stream too small.", function ); return( -1 ); } utf16_character = utf16_string[ utf16_string_index++ ]; if( byte_order == LIBUNA_ENDIAN_BIG ) { utf16_stream[ utf16_stream_index + 1 ] = (uint8_t) ( utf16_character & 0xff ); utf16_character >>= 8; utf16_stream[ utf16_stream_index ] = (uint8_t) ( utf16_character & 0xff ); } else if( byte_order == LIBUNA_ENDIAN_LITTLE ) { utf16_stream[ utf16_stream_index ] = (uint8_t) ( utf16_character & 0xff ); utf16_character >>= 8; utf16_stream[ utf16_stream_index + 1 ] = (uint8_t) ( utf16_character & 0xff ); } utf16_stream_index += 2; } return( 1 ); } /* Determines the size of an UTF-16 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf16_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream size.", function ); return( -1 ); } /* Add the byte order mark */ *utf16_stream_size += 1; while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-16 character bytes are required */ if( libuna_unicode_character_size_to_utf16( unicode_character, utf16_stream_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-16.", function ); return( -1 ); } } /* Convert the number of characters into bytes */ *utf16_stream_size *= 2; return( 1 ); } /* Copies an UTF-16 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf16_stream_copy_from_utf32( uint8_t *utf16_stream, size_t utf16_stream_size, int byte_order, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf16_stream_copy_from_utf32"; size_t utf16_stream_index = 0; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; if( utf16_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 stream.", function ); return( -1 ); } if( utf16_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 stream size value exceeds maximum.", function ); return( -1 ); } if( ( byte_order != LIBUNA_ENDIAN_BIG ) && ( byte_order != LIBUNA_ENDIAN_LITTLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte order.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( libuna_utf16_stream_copy_byte_order_mark( utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy UTF-16 byte order mark.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-16 stream bytes */ if( libuna_unicode_character_copy_to_utf16_stream( unicode_character, utf16_stream, utf16_stream_size, &utf16_stream_index, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-16 stream.", function ); return( -1 ); } } return( 1 ); } libpff-20120802/libuna/libuna_utf7_stream.c0000644000175000017500000003607412005152764015361 00000000000000/* * UTF-7 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_definitions.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #include "libuna_unicode_character.h" #include "libuna_utf7_stream.h" /* Determines the size of an UTF-7 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_size_from_utf8"; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream size.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8.", function ); return( -1 ); } /* Determine how many UTF-7 character bytes are required */ if( libuna_unicode_character_size_to_utf7_stream( unicode_character, utf7_stream_size, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-7.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-7 stream from an UTF-8 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_copy_from_utf8( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_copy_from_utf8"; size_t utf7_stream_index = 0; size_t utf8_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } while( utf8_string_index < utf8_string_size ) { /* Convert the UTF-8 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf8( &unicode_character, utf8_string, utf8_string_size, &utf8_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-8 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-7 stream bytes */ if( libuna_unicode_character_copy_to_utf7_stream( unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-7 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-7 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_size_from_utf16"; size_t utf16_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream size.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16.", function ); return( -1 ); } /* Determine how many UTF-7 character bytes are required */ if( libuna_unicode_character_size_to_utf7_stream( unicode_character, utf7_stream_size, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-7.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-7 stream from an UTF-16 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_copy_from_utf16( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_copy_from_utf16"; size_t utf16_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } while( utf16_string_index < utf16_string_size ) { /* Convert the UTF-16 string bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf16( &unicode_character, utf16_string, utf16_string_size, &utf16_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-16 string.", function ); return( -1 ); } /* Convert the Unicode character into UTF-7 stream bytes */ if( libuna_unicode_character_copy_to_utf7_stream( unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-7 stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of an UTF-7 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf7_stream_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_size_from_utf32"; size_t utf32_string_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf7_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream size.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Determine how many UTF-7 character bytes are required */ if( libuna_unicode_character_size_to_utf7_stream( unicode_character, utf7_stream_size, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to determine size of Unicode character in UTF-7.", function ); return( -1 ); } } return( 1 ); } /* Copies an UTF-7 stream from an UTF-32 string * Returns 1 if successful or -1 on error */ int libuna_utf7_stream_copy_from_utf32( uint8_t *utf7_stream, size_t utf7_stream_size, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libuna_utf7_stream_copy_from_utf32"; size_t utf32_string_index = 0; size_t utf7_stream_index = 0; libuna_unicode_character_t unicode_character = 0; uint32_t utf7_stream_base64_data = 0; if( utf7_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-7 stream.", function ); return( -1 ); } if( utf7_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-7 stream size value exceeds maximum.", function ); return( -1 ); } if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } while( utf32_string_index < utf32_string_size ) { /* Convert the UTF-32 character bytes into a Unicode character */ if( libuna_unicode_character_copy_from_utf32( &unicode_character, utf32_string, utf32_string_size, &utf32_string_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy Unicode character from UTF-32.", function ); return( -1 ); } /* Convert the Unicode character into UTF-7 character bytes */ if( libuna_unicode_character_copy_to_utf7_stream( unicode_character, utf7_stream, utf7_stream_size, &utf7_stream_index, &utf7_stream_base64_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED, "%s: unable to copy Unicode character to UTF-7 stream.", function ); return( -1 ); } } return( 1 ); } libpff-20120802/libuna/libuna_support.h0000644000175000017500000000226012005152764014630 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_SUPPORT_H ) #define _LIBUNA_SUPPORT_H #include #include #include #include "libuna_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBUNA ) LIBUNA_EXTERN \ const char *libuna_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_utf32_stream.h0000644000175000017500000000604612005152764015440 00000000000000/* * UTF-32 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_UTF32_STREAM_H ) #define _LIBUNA_UTF32_STREAM_H #include #include #include "libuna_extern.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBUNA_EXTERN \ LIBUNA_INLINE \ int libuna_utf32_stream_copy_byte_order_mark( uint8_t *utf32_stream, size_t utf32_stream_size, size_t *utf32_stream_index, int byte_order, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_stream_size_from_utf8( const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, size_t *utf32_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_stream_copy_from_utf8( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf8_character_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_stream_copy_to_utf8 is implemented by * libuna_utf8_string_copy_from_utf32_stream */ LIBUNA_EXTERN \ int libuna_utf32_stream_size_from_utf16( const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, size_t *utf32_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_stream_copy_from_utf16( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf16_character_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_stream_copy_to_utf16 is implemented by * libuna_utf16_string_copy_from_utf32_stream */ LIBUNA_EXTERN \ int libuna_utf32_stream_size_from_utf32( const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, size_t *utf32_stream_size, libcerror_error_t **error ); LIBUNA_EXTERN \ int libuna_utf32_stream_copy_from_utf32( uint8_t *utf32_stream, size_t utf32_stream_size, int byte_order, const libuna_utf32_character_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); /* The functionality for libuna_utf32_stream_copy_to_utf32 is implemented by * libuna_utf32_string_copy_from_utf32_stream */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_inline.h0000644000175000017500000000213512005152764014373 00000000000000/* * The internal inline definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_INLINE_H ) #define _LIBUNA_INTERNAL_INLINE_H #include #if defined( _MSC_VER ) #define LIBUNA_INLINE _inline #elif defined( __BORLANDC__ ) || defined( __clang__ ) #define LIBUNA_INLINE /* inline */ #else #define LIBUNA_INLINE inline #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_3.c0000644000175000017500000000641112005152764016451 00000000000000/* * ISO 8859-3 codepage (Latin 3) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_3.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-3 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_3_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0126, 0x02d8, 0x00a3, 0x00a4, 0xfffd, 0x0124, 0x00a7, 0x00a8, 0x0130, 0x015e, 0x011e, 0x0134, 0x00ad, 0xfffd, 0x017b, 0x00b0, 0x0127, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x0125, 0x00b7, 0x00b8, 0x0131, 0x015f, 0x011f, 0x0135, 0x00bd, 0xfffd, 0x017c, 0x00c0, 0x00c1, 0x00c2, 0xfffd, 0x00c4, 0x010a, 0x0108, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0xfffd, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x0120, 0x00d6, 0x00d7, 0x011c, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x016c, 0x015c, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0xfffd, 0x00e4, 0x010b, 0x0109, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0xfffd, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x0121, 0x00f6, 0x00f7, 0x011d, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x016d, 0x015d, 0x02d9 }; /* Unicode to ASCII character lookup table for ISO 8859-3 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x00a0[ 96 ] = { 0xa0, 0x1a, 0x1a, 0xa3, 0xa4, 0x1a, 0x1a, 0xa7, 0xa8, 0x1a, 0x1a, 0x1a, 0x1a, 0xad, 0x1a, 0x1a, 0xb0, 0x1a, 0xb2, 0xb3, 0xb4, 0xb5, 0x1a, 0xb7, 0xb8, 0x1a, 0x1a, 0x1a, 0x1a, 0xbd, 0x1a, 0x1a, 0xc0, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0x1a, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0x1a, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0x1a, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0x1a, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0108[ 8 ] = { 0xc6, 0xe6, 0xc5, 0xe5, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0118[ 16 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xd8, 0xf8, 0xab, 0xbb, 0xd5, 0xf5, 0x1a, 0x1a, 0xa6, 0xb6, 0xa1, 0xb1 }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0130[ 8 ] = { 0xa9, 0xb9, 0x1a, 0x1a, 0xac, 0xbc, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_3_unicode_to_byte_stream_base_0x0158[ 8 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xde, 0xfe, 0xaa, 0xba }; libpff-20120802/libuna/libuna_definitions.h0000644000175000017500000003165612005152764015442 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_INTERNAL_DEFINITIONS_H ) #define _LIBUNA_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if !defined( HAVE_LOCAL_LIBUNA ) #include /* The definitions in are copied here * for local use of libuna */ #else #include #define LIBUNA_VERSION 20120723 /* The libuna version string */ #define LIBUNA_VERSION_STRING "20120723" /* The endian definitions */ #define LIBUNA_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBUNA_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* The codepage definitions */ enum LIBUNA_CODEPAGE { LIBUNA_CODEPAGE_ASCII = 20127, LIBUNA_CODEPAGE_ISO_8859_1 = 28591, LIBUNA_CODEPAGE_ISO_8859_2 = 28592, LIBUNA_CODEPAGE_ISO_8859_3 = 28593, LIBUNA_CODEPAGE_ISO_8859_4 = 28594, LIBUNA_CODEPAGE_ISO_8859_5 = 28595, LIBUNA_CODEPAGE_ISO_8859_6 = 28596, LIBUNA_CODEPAGE_ISO_8859_7 = 28597, LIBUNA_CODEPAGE_ISO_8859_8 = 28598, LIBUNA_CODEPAGE_ISO_8859_9 = 28599, LIBUNA_CODEPAGE_ISO_8859_10 = 28600, LIBUNA_CODEPAGE_ISO_8859_11 = 28601, LIBUNA_CODEPAGE_ISO_8859_13 = 28603, LIBUNA_CODEPAGE_ISO_8859_14 = 28604, LIBUNA_CODEPAGE_ISO_8859_15 = 28605, LIBUNA_CODEPAGE_ISO_8859_16 = 28606, LIBUNA_CODEPAGE_KOI8_R = 20866, LIBUNA_CODEPAGE_KOI8_U = 21866, LIBUNA_CODEPAGE_OEM_437 = 437, LIBUNA_CODEPAGE_OEM_720 = 720, LIBUNA_CODEPAGE_OEM_737 = 737, LIBUNA_CODEPAGE_OEM_775 = 775, LIBUNA_CODEPAGE_OEM_850 = 850, LIBUNA_CODEPAGE_OEM_852 = 852, LIBUNA_CODEPAGE_OEM_855 = 855, LIBUNA_CODEPAGE_OEM_857 = 857, LIBUNA_CODEPAGE_OEM_858 = 858, LIBUNA_CODEPAGE_OEM_862 = 862, LIBUNA_CODEPAGE_OEM_866 = 866, LIBUNA_CODEPAGE_WINDOWS_874 = 874, LIBUNA_CODEPAGE_WINDOWS_932 = 932, LIBUNA_CODEPAGE_WINDOWS_936 = 936, LIBUNA_CODEPAGE_WINDOWS_949 = 949, LIBUNA_CODEPAGE_WINDOWS_950 = 950, LIBUNA_CODEPAGE_WINDOWS_1250 = 1250, LIBUNA_CODEPAGE_WINDOWS_1251 = 1251, LIBUNA_CODEPAGE_WINDOWS_1252 = 1252, LIBUNA_CODEPAGE_WINDOWS_1253 = 1253, LIBUNA_CODEPAGE_WINDOWS_1254 = 1254, LIBUNA_CODEPAGE_WINDOWS_1255 = 1255, LIBUNA_CODEPAGE_WINDOWS_1256 = 1256, LIBUNA_CODEPAGE_WINDOWS_1257 = 1257, LIBUNA_CODEPAGE_WINDOWS_1258 = 1258 }; #define LIBUNA_CODEPAGE_US_ASCII LIBUNA_CODEPAGE_ASCII #define LIBUNA_CODEPAGE_ISO_WESTERN_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_1 #define LIBUNA_CODEPAGE_ISO_CENTRAL_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_2 #define LIBUNA_CODEPAGE_ISO_SOUTH_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_3 #define LIBUNA_CODEPAGE_ISO_NORTH_EUROPEAN LIBUNA_CODEPAGE_ISO_8859_4 #define LIBUNA_CODEPAGE_ISO_CYRILLIC LIBUNA_CODEPAGE_ISO_8859_5 #define LIBUNA_CODEPAGE_ISO_ARABIC LIBUNA_CODEPAGE_ISO_8859_6 #define LIBUNA_CODEPAGE_ISO_GREEK LIBUNA_CODEPAGE_ISO_8859_7 #define LIBUNA_CODEPAGE_ISO_HEBREW LIBUNA_CODEPAGE_ISO_8859_8 #define LIBUNA_CODEPAGE_ISO_TURKISH LIBUNA_CODEPAGE_ISO_8859_9 #define LIBUNA_CODEPAGE_ISO_NORDIC LIBUNA_CODEPAGE_ISO_8859_10 #define LIBUNA_CODEPAGE_ISO_THAI LIBUNA_CODEPAGE_ISO_8859_11 #define LIBUNA_CODEPAGE_ISO_BALTIC LIBUNA_CODEPAGE_ISO_8859_13 #define LIBUNA_CODEPAGE_ISO_CELTIC LIBUNA_CODEPAGE_ISO_8859_14 #define LIBUNA_CODEPAGE_ISO_LATIN_1 LIBUNA_CODEPAGE_ISO_8859_1 #define LIBUNA_CODEPAGE_ISO_LATIN_2 LIBUNA_CODEPAGE_ISO_8859_2 #define LIBUNA_CODEPAGE_ISO_LATIN_3 LIBUNA_CODEPAGE_ISO_8859_3 #define LIBUNA_CODEPAGE_ISO_LATIN_4 LIBUNA_CODEPAGE_ISO_8859_4 #define LIBUNA_CODEPAGE_ISO_LATIN_5 LIBUNA_CODEPAGE_ISO_8859_9 #define LIBUNA_CODEPAGE_ISO_LATIN_6 LIBUNA_CODEPAGE_ISO_8859_10 #define LIBUNA_CODEPAGE_ISO_LATIN_7 LIBUNA_CODEPAGE_ISO_8859_13 #define LIBUNA_CODEPAGE_ISO_LATIN_8 LIBUNA_CODEPAGE_ISO_8859_14 #define LIBUNA_CODEPAGE_ISO_LATIN_9 LIBUNA_CODEPAGE_ISO_8859_15 #define LIBUNA_CODEPAGE_ISO_LATIN_10 LIBUNA_CODEPAGE_ISO_8859_16 #define LIBUNA_CODEPAGE_KOI8_RUSSIAN LIBUNA_CODEPAGE_KOI8_R #define LIBUNA_CODEPAGE_KOI8_UKRAINIAN LIBUNA_CODEPAGE_KOI8_U #define LIBUNA_CODEPAGE_OEM_874 LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_OEM_932 LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_OEM_936 LIBUNA_CODEPAGE_WINDOWS_936 #define LIBUNA_CODEPAGE_OEM_949 LIBUNA_CODEPAGE_WINDOWS_949 #define LIBUNA_CODEPAGE_OEM_950 LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_OEM_1258 LIBUNA_CODEPAGE_WINDOWS_1258 #define LIBUNA_CODEPAGE_OEM_US_ENGLISH LIBUNA_CODEPAGE_OEM_437 #define LIBUNA_CODEPAGE_OEM_ARABIC LIBUNA_CODEPAGE_OEM_720 #define LIBUNA_CODEPAGE_OEM_GREEK LIBUNA_CODEPAGE_OEM_737 #define LIBUNA_CODEPAGE_OEM_BALTIC LIBUNA_CODEPAGE_OEM_775 #define LIBUNA_CODEPAGE_OEM_LATIN_1 LIBUNA_CODEPAGE_OEM_850 #define LIBUNA_CODEPAGE_OEM_LATIN_2 LIBUNA_CODEPAGE_OEM_852 #define LIBUNA_CODEPAGE_OEM_CYRILLIC LIBUNA_CODEPAGE_OEM_855 #define LIBUNA_CODEPAGE_OEM_TURKISH LIBUNA_CODEPAGE_OEM_857 #define LIBUNA_CODEPAGE_OEM_LATIN_1_WITH_EURO LIBUNA_CODEPAGE_OEM_858 #define LIBUNA_CODEPAGE_OEM_HEBREW LIBUNA_CODEPAGE_OEM_862 #define LIBUNA_CODEPAGE_OEM_RUSSIAN LIBUNA_CODEPAGE_OEM_866 #define LIBUNA_CODEPAGE_OEM_THAI LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_OEM_JAPANESE LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_OEM_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_WINDOWS_936 #define LIBUNA_CODEPAGE_OEM_KOREAN LIBUNA_CODEPAGE_WINDOWS_949 #define LIBUNA_CODEPAGE_OEM_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_OEM_VIETNAMESE LIBUNA_CODEPAGE_WINDOWS_1258 #define LIBUNA_CODEPAGE_WINDOWS_THAI LIBUNA_CODEPAGE_WINDOWS_874 #define LIBUNA_CODEPAGE_WINDOWS_JAPANESE LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBUNA_CODEPAGE_WINDOWS_936 #define LIBUNA_CODEPAGE_WINDOWS_KOREAN LIBUNA_CODEPAGE_WINDOWS_949 #define LIBUNA_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBUNA_CODEPAGE_WINDOWS_950 #define LIBUNA_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBUNA_CODEPAGE_WINDOWS_1250 #define LIBUNA_CODEPAGE_WINDOWS_CYRILLIC LIBUNA_CODEPAGE_WINDOWS_1251 #define LIBUNA_CODEPAGE_WINDOWS_WESTERN_EUROPEAN LIBUNA_CODEPAGE_WINDOWS_1252 #define LIBUNA_CODEPAGE_WINDOWS_GREEK LIBUNA_CODEPAGE_WINDOWS_1253 #define LIBUNA_CODEPAGE_WINDOWS_TURKISH LIBUNA_CODEPAGE_WINDOWS_1254 #define LIBUNA_CODEPAGE_WINDOWS_HEBREW LIBUNA_CODEPAGE_WINDOWS_1255 #define LIBUNA_CODEPAGE_WINDOWS_ARABIC LIBUNA_CODEPAGE_WINDOWS_1256 #define LIBUNA_CODEPAGE_WINDOWS_BALTIC LIBUNA_CODEPAGE_WINDOWS_1257 #define LIBUNA_CODEPAGE_WINDOWS_VIETNAMESE LIBUNA_CODEPAGE_WINDOWS_1258 #define LIBUNA_CODEPAGE_SHIFT_JIS LIBUNA_CODEPAGE_WINDOWS_932 #define LIBUNA_CODEPAGE_GB2312 LIBUNA_CODEPAGE_WINDOWS_936 /* Base16 variants * Byte: * 0 - 1 Character limit * 2 - 3 Reserved * 4 Case (0 not supported) * 5 - 6 Reserved * 7 String encoding (0 is byte stream) */ enum LIBUNA_BASE16_VARIANTS { LIBUNA_BASE16_VARIANT_CASE_LOWER = 0x00010000UL, LIBUNA_BASE16_VARIANT_CASE_MIXED = 0x00020000UL, LIBUNA_BASE16_VARIANT_CASE_UPPER = 0x00030000UL, LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE = 0x00000000UL, LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_64 = 0x00000040UL, LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_76 = 0x0000004cUL, LIBUNA_BASE16_VARIANT_ENCODING_UTF16_BIG_ENDIAN = 0x10000000UL, LIBUNA_BASE16_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN = 0x20000000UL, LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN = 0x30000000UL, LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN = 0x40000000UL }; #define LIBUNA_BASE16_VARIANT_RFC4648 \ LIBUNA_BASE16_VARIANT_CASE_MIXED | LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE /* Base16 processing flags */ enum LIBUNA_BASE16_FLAGS { LIBUNA_BASE16_FLAG_STRIP_WHITESPACE = 0x01 }; /* Base32 variants * Byte: * 0 - 1 Character limit * 2 - 3 Reserved * 4 Alphabet type (0 not supported) * 5 Reserved * 6 Padding (0 not supported) * 7 String encoding (0 is byte stream) */ enum LIBUNA_BASE32_VARIANTS { LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL = 0x00010000UL, LIBUNA_BASE32_VARIANT_ALPHABET_HEX = 0x00020000UL, LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE = 0x00000000UL, LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_64 = 0x00000040UL, LIBUNA_BASE32_VARIANT_PADDING_NONE = 0x01000000UL, LIBUNA_BASE32_VARIANT_PADDING_OPTIONAL = 0x02000000UL, LIBUNA_BASE32_VARIANT_PADDING_REQUIRED = 0x03000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF16_BIG_ENDIAN = 0x10000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN = 0x20000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN = 0x30000000UL, LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN = 0x40000000UL }; #define LIBUNA_BASE32_VARIANT_RFC4648 \ LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED #define LIBUNA_BASE32_VARIANT_HEX \ LIBUNA_BASE32_VARIANT_ALPHABET_HEX | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED /* Base32 processing flags */ enum LIBUNA_BASE32_FLAGS { LIBUNA_BASE32_FLAG_STRIP_WHITESPACE = 0x01 }; /* Base64 variants * Byte: * 0 - 1 Character limit * 2 - 3 Reserved * 4 Alphabet type (0 not supported) * 5 Reserved * 6 Padding (0 not supported) * 7 String encoding (0 is byte stream) */ enum LIBUNA_BASE64_VARIANTS { LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL = 0x00010000UL, LIBUNA_BASE64_VARIANT_ALPHABET_URL = 0x00020000UL, LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE = 0x00000000UL, LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64 = 0x00000040UL, LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76 = 0x0000004cUL, LIBUNA_BASE64_VARIANT_PADDING_NONE = 0x01000000UL, LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL = 0x02000000UL, LIBUNA_BASE64_VARIANT_PADDING_REQUIRED = 0x03000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN = 0x10000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN = 0x20000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN = 0x30000000UL, LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN = 0x40000000UL }; #define LIBUNA_BASE64_VARIANT_RFC1421 \ LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64 | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED #define LIBUNA_BASE64_VARIANT_PEM \ LIBUNA_BASE64_VARIANT_RFC1421 #define LIBUNA_BASE64_VARIANT_RFC1642 \ LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_NONE #define LIBUNA_BASE64_VARIANT_UTF7 \ LIBUNA_BASE64_VARIANT_RFC1642 #define LIBUNA_BASE64_VARIANT_RFC2045 \ LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76 | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED #define LIBUNA_BASE64_VARIANT_MIME \ LIBUNA_BASE64_VARIANT_RFC2045 #define LIBUNA_BASE64_VARIANT_URL \ LIBUNA_BASE64_VARIANT_ALPHABET_URL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL /* TODO #define LIBUNA_BASE64_VARIANT_RFC3548 #define LIBUNA_BASE64_VARIANT_RFC4648 */ /* Base64 processing flags */ enum LIBUNA_BASE64_FLAGS { LIBUNA_BASE64_FLAG_STRIP_WHITESPACE = 0x01 }; #endif #define LIBUNA_BASE16_VARIANT_ENCODING_BYTE_STREAM 0 #define LIBUNA_BASE32_VARIANT_ENCODING_BYTE_STREAM 0 #define LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM 0 /* Character case definitions */ enum LIBUNA_CASE { LIBUNA_CASE_LOWER = (uint8_t) 'l', LIBUNA_CASE_MIXED = (uint8_t) 'm', LIBUNA_CASE_UPPER = (uint8_t) 'u' }; /* Strip mode definitions */ enum LIBUNA_STRIP_MODES { LIBUNA_STRIP_MODE_LEADING_WHITESPACE, LIBUNA_STRIP_MODE_NON_WHITESPACE, LIBUNA_STRIP_MODE_TRAILING_WHITESPACE, LIBUNA_STRIP_MODE_INVALID_CHARACTER }; /* Character definitions */ #define LIBUNA_UNICODE_REPLACEMENT_CHARACTER 0x0000fffdUL #define LIBUNA_UNICODE_BASIC_MULTILINGUAL_PLANE_MAX 0x0000ffffUL #define LIBUNA_UNICODE_SURROGATE_LOW_RANGE_START 0x0000dc00UL #define LIBUNA_UNICODE_SURROGATE_LOW_RANGE_END 0x0000dfffUL #define LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_START 0x0000d800UL #define LIBUNA_UNICODE_SURROGATE_HIGH_RANGE_END 0x0000dbffUL #define LIBUNA_UNICODE_CHARACTER_MAX 0x0010ffffUL #define LIBUNA_UTF16_CHARACTER_MAX 0x0010ffffUL #define LIBUNA_UTF32_CHARACTER_MAX 0x7fffffffUL #define LIBUNA_ASCII_REPLACEMENT_CHARACTER 0x1a /* UTF-7 definitions */ #define LIBUNA_UTF7_IS_BASE64_ENCODED 0x80000000UL #endif libpff-20120802/libuna/libuna_codepage_windows_1255.h0000644000175000017500000000275412005152764017121 00000000000000/* * Windows 1255 codepage (Hebrew) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1255_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1255_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1255_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05b0[ 24 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x05d0[ 40 ]; extern const uint8_t libuna_codepage_windows_1255_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_14.c0000644000175000017500000000541112005152764016532 00000000000000/* * ISO 8859-14 codepage (Celtic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_14.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-14 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x1e02, 0x1e03, 0x00a3, 0x010a, 0x010b, 0x1e0a, 0x00a7, 0x1e80, 0x00a9, 0x1e82, 0x1e0b, 0x1ef2, 0x00ad, 0x00ae, 0x0178, 0x1e1e, 0x1e1f, 0x0120, 0x0121, 0x1e40, 0x1e41, 0x00b6, 0x1e56, 0x1e81, 0x1e57, 0x1e83, 0x1e60, 0x1ef3, 0x1e84, 0x1e85, 0x1e61, 0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x0174, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x1e6a, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x0176, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x0175, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x1e6b, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x0177, 0x00ff }; /* Unicode to ASCII character lookup table for ISO 8859-14 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ 64 ] = { 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0x1a, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0x1a, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0x1a, 0xff, }; const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ 8 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xd0, 0xf0, 0xde, 0xfe }; const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ 8 ] = { 0xa8, 0xb8, 0xaa, 0xba, 0xbd, 0xbe, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_codepage_iso_8859_13.c0000644000175000017500000000712212005152764016532 00000000000000/* * ISO 8859-13 codepage (Baltic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_13.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-13 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x201d, 0x00a2, 0x00a3, 0x00a4, 0x201e, 0x00a6, 0x00a7, 0x00d8, 0x00a9, 0x0156, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00c6, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x201c, 0x00b5, 0x00b6, 0x00b7, 0x00f8, 0x00b9, 0x0157, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00e6, 0x0104, 0x012e, 0x0100, 0x0106, 0x00c4, 0x00c5, 0x0118, 0x0112, 0x010c, 0x00c9, 0x0179, 0x0116, 0x0122, 0x0136, 0x012a, 0x013b, 0x0160, 0x0143, 0x0145, 0x00d3, 0x014c, 0x00d5, 0x00d6, 0x00d7, 0x0172, 0x0141, 0x015a, 0x016a, 0x00dc, 0x017b, 0x017d, 0x00df, 0x0105, 0x012f, 0x0101, 0x0107, 0x00e4, 0x00e5, 0x0119, 0x0113, 0x010d, 0x00e9, 0x017a, 0x0117, 0x0123, 0x0137, 0x012b, 0x013c, 0x0161, 0x0144, 0x0146, 0x00f3, 0x014d, 0x00f5, 0x00f6, 0x00f7, 0x0173, 0x0142, 0x015b, 0x016b, 0x00fc, 0x017c, 0x017e, 0x2019 }; /* Unicode to ASCII character lookup table for ISO 8859-13 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ 224 ] = { 0xa0, 0x1a, 0xa2, 0xa3, 0xa4, 0x1a, 0xa6, 0xa7, 0x1a, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0xae, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0xb9, 0x1a, 0xbb, 0xbc, 0xbd, 0xbe, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xc4, 0xc5, 0xaf, 0x1a, 0x1a, 0xc9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd3, 0x1a, 0xd5, 0xd6, 0xd7, 0xa8, 0x1a, 0x1a, 0x1a, 0xdc, 0x1a, 0x1a, 0xdf, 0x1a, 0x1a, 0x1a, 0x1a, 0xe4, 0xe5, 0xbf, 0x1a, 0x1a, 0xe9, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xf3, 0x1a, 0xf5, 0xf6, 0xf7, 0xb8, 0x1a, 0x1a, 0x1a, 0xfc, 0x1a, 0x1a, 0x1a, 0xc2, 0xe2, 0x1a, 0x1a, 0xc0, 0xe0, 0xc3, 0xe3, 0x1a, 0x1a, 0x1a, 0x1a, 0xc8, 0xe8, 0x1a, 0x1a, 0x1a, 0x1a, 0xc7, 0xe7, 0x1a, 0x1a, 0xcb, 0xeb, 0xc6, 0xe6, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcc, 0xec, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xce, 0xee, 0x1a, 0x1a, 0xc1, 0xe1, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xcd, 0xed, 0x1a, 0x1a, 0x1a, 0xcf, 0xef, 0x1a, 0x1a, 0x1a, 0x1a, 0xd9, 0xf9, 0xd1, 0xf1, 0xd2, 0xf2, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd4, 0xf4, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xaa, 0xba, 0x1a, 0x1a, 0xda, 0xfa, 0x1a, 0x1a, 0x1a, 0x1a, 0xd0, 0xf0, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xdb, 0xfb, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xd8, 0xf8, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0xca, 0xea, 0xdd, 0xfd, 0xde, 0xfe, 0x1a }; const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ 8 ] = { 0x1a, 0xff, 0x1a, 0x1a, 0xb4, 0xa1, 0xa5, 0x1a }; libpff-20120802/libuna/libuna_codepage_iso_8859_8.h0000644000175000017500000000244712005152764016470 00000000000000/* * ISO 8859-8 codepage (Hebrew) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_8_H ) #define _LIBUNA_CODEPAGE_ISO_8859_8_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_8_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x00a0[ 32 ]; extern const uint8_t libuna_codepage_iso_8859_8_unicode_to_byte_stream_base_0x05d0[ 32 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_9.c0000644000175000017500000000400712005152764016456 00000000000000/* * ISO 8859-9 codepage (Turkish) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_9.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-9 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ 48 ] = { 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff }; /* Unicode to ASCII character lookup table for ISO 8859-9 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ 48 ] = { 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff }; libpff-20120802/libuna/libuna_codepage_windows_1254.c0000644000175000017500000000507512005152764017112 00000000000000/* * Windows 1254 codepage (Turkish) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1254.h" /* Extended ASCII to Unicode character lookup table for Windows 1254 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0x80[ 32 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0xfffd, 0xfffd, 0x0178, }; const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xd0[ 16 ] = { 0x011e, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0130, 0x015e, 0x00df, }; const uint16_t libuna_codepage_windows_1254_byte_stream_to_unicode_base_0xf0[ 16 ] = { 0x011f, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0131, 0x015f, 0x00ff, }; /* Unicode to ASCII character lookup table for Windows 1254 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x00d0[ 48 ] = { 0x1a, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff, }; const uint8_t libuna_codepage_windows_1254_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a, }; libpff-20120802/libuna/libuna_codepage_windows_1258.c0000644000175000017500000000604312005152764017112 00000000000000/* * Windows 1258 codepage (Vietnamese) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_windows_1258.h" /* Extended ASCII to Unicode character lookup table for Windows 1258 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x20ac, 0xfffd, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021, 0x02c6, 0x2030, 0xfffd, 0x2039, 0x0152, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014, 0x02dc, 0x2122, 0xfffd, 0x203a, 0x0153, 0xfffd, 0xfffd, 0x0178, 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7, 0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf, 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x00c5, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x0300, 0x00cd, 0x00ce, 0x00cf, 0x0110, 0x00d1, 0x0309, 0x00d3, 0x00d4, 0x01a0, 0x00d6, 0x00d7, 0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x01af, 0x0303, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x00e5, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0301, 0x00ed, 0x00ee, 0x00ef, 0x0111, 0x00f1, 0x0323, 0x00f3, 0x00f4, 0x01a1, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x01b0, 0x20ab, 0x00ff }; /* Unicode to ASCII character lookup table for Windows 1258 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ 72 ] = { 0xc0, 0xc1, 0xc2, 0x1a, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0x1a, 0xcd, 0xce, 0xcf, 0x1a, 0xd1, 0x1a, 0xd3, 0xd4, 0x1a, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0x1a, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0x1a, 0xed, 0xee, 0xef, 0x1a, 0xf1, 0x1a, 0xf3, 0xf4, 0x1a, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff, 0x1a, 0x1a, 0xc3, 0xe3, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ 24 ] = { 0x1a, 0x1a, 0x1a, 0x96, 0x97, 0x1a, 0x1a, 0x1a, 0x91, 0x92, 0x82, 0x1a, 0x93, 0x94, 0x84, 0x1a, 0x86, 0x87, 0x95, 0x1a, 0x1a, 0x1a, 0x85, 0x1a }; libpff-20120802/libuna/libuna_codepage_iso_8859_15.c0000644000175000017500000000345112005152764016535 00000000000000/* * ISO 8859-15 codepage (Latin 9) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_15.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-15 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_15_byte_stream_to_unicode_base_0xa0[ 32 ] = { 0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x20ac, 0x00a5, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x017d, 0x00b5, 0x00b6, 0x00b7, 0x017e, 0x00b9, 0x00ba, 0x00bb, 0x0152, 0x0153, 0x0178, 0x00bf }; /* Unicode to ASCII character lookup table for ISO 8859-15 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_15_unicode_to_byte_stream_base_0x00a0[ 32 ] = { 0xa0, 0xa1, 0xa2, 0xa3, 0x1a, 0xa5, 0x1a, 0xa7, 0x1a, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0xb5, 0xb6, 0xb7, 0x1a, 0xb9, 0xba, 0xbb, 0x1a, 0x1a, 0x1a, 0xbf }; libpff-20120802/libuna/libuna_codepage_iso_8859_7.c0000644000175000017500000000547312005152764016464 00000000000000/* * ISO 8859-7 codepage (Greek) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_7.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-7 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x2018, 0x2019, 0x00a3, 0x20ac, 0x20af, 0x00a6, 0x00a7, 0x00a8, 0x00a9, 0x037a, 0x00ab, 0x00ac, 0x00ad, 0xfffd, 0x2015, 0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0384, 0x0385, 0x0386, 0x00b7, 0x0388, 0x0389, 0x038a, 0x00bb, 0x038c, 0x00bd, 0x038e, 0x038f, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399, 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1, 0xfffd, 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03ae, 0x03af, 0x03b0, 0x03b1, 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1, 0x03c2, 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x03ca, 0x03cb, 0x03cc, 0x03cd, 0x03ce, 0xfffd }; /* Unicode to ASCII character lookup table for ISO 8859-7 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ 24 ] = { 0xa0, 0x1a, 0x1a, 0xa3, 0x1a, 0x1a, 0xa6, 0xa7, 0xa8, 0xa9, 0x1a, 0xab, 0xac, 0xad, 0x1a, 0x1a, 0xb0, 0xb1, 0xb2, 0xb3, 0x1a, 0x1a, 0x1a, 0xb7 }; const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ 80 ] = { 0x1a, 0x1a, 0x1a, 0x1a, 0xb4, 0xb5, 0xb6, 0x1a, 0xb8, 0xb9, 0xba, 0x1a, 0xbc, 0x1a, 0xbe, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0x1a, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0x1a }; libpff-20120802/libuna/libuna_codepage_iso_8859_9.h0000644000175000017500000000231612005152764016464 00000000000000/* * ISO 8859-9 codepage (Turkish) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_9_H ) #define _LIBUNA_CODEPAGE_ISO_8859_9_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_9_byte_stream_to_unicode_base_0xd0[ 48 ]; extern const uint8_t libuna_codepage_iso_8859_9_unicode_to_byte_stream_base_0x00d0[ 48 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_windows_1258.h0000644000175000017500000000247012005152764017117 00000000000000/* * Windows 1258 codepage (Vietnamese) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_WINDOWS_1258_H ) #define _LIBUNA_CODEPAGE_WINDOWS_1258_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_windows_1258_byte_stream_to_unicode_base_0x80[ 128 ]; extern const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x00c0[ 72 ]; extern const uint8_t libuna_codepage_windows_1258_unicode_to_byte_stream_base_0x2010[ 24 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_base64_stream.c0000644000175000017500000021231212005152764015547 00000000000000/* * Base64 stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_base64_stream.h" #include "libuna_definitions.h" #include "libuna_inline.h" #include "libuna_libcerror.h" #include "libuna_types.h" static uint8_t *libuna_base64_sixtet_to_character_table = \ (uint8_t *) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static uint8_t *libuna_base64url_sixtet_to_character_table = \ (uint8_t *) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; /* Copies a base64 character to a base64 sixtet * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base64_character_copy_to_sixtet( uint8_t base64_character, uint8_t *base64_sixtet, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_character_copy_to_sixtet"; uint8_t base64_character_62 = 0; uint8_t base64_character_63 = 0; if( base64_sixtet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 sixtet.", function ); return( -1 ); } switch( base64_variant & 0x000f0000UL ) { case LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL: base64_character_62 = (uint8_t) '+'; base64_character_63 = (uint8_t) '/'; break; case LIBUNA_BASE64_VARIANT_ALPHABET_URL: base64_character_62 = (uint8_t) '-'; base64_character_63 = (uint8_t) '_'; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base64_character >= (uint8_t) 'A' ) && ( base64_character <= (uint8_t) 'I' ) ) { *base64_sixtet = base64_character - (uint8_t) 'A'; } else if( ( base64_character >= (uint8_t) 'J' ) && ( base64_character <= (uint8_t) 'R' ) ) { *base64_sixtet = base64_character - (uint8_t) 'J' + 9; } else if( ( base64_character >= (uint8_t) 'S' ) && ( base64_character <= (uint8_t) 'Z' ) ) { *base64_sixtet = base64_character - (uint8_t) 'S' + 18; } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( base64_character >= (uint8_t) 'a' ) && ( base64_character <= (uint8_t) 'i' ) ) { *base64_sixtet = base64_character - (uint8_t) 'a' + 26; } else if( ( base64_character >= (uint8_t) 'j' ) && ( base64_character <= (uint8_t) 'r' ) ) { *base64_sixtet = base64_character - (uint8_t) 'j' + 35; } else if( ( base64_character >= (uint8_t) 's' ) && ( base64_character <= (uint8_t) 'z' ) ) { *base64_sixtet = base64_character - (uint8_t) 's' + 44; } else if( ( base64_character >= (uint8_t) '0' ) && ( base64_character <= (uint8_t) '9' ) ) { *base64_sixtet = base64_character - (uint8_t) '0' + 52; } else if( base64_character == base64_character_62 ) { *base64_sixtet = 62; } else if( base64_character == base64_character_63 ) { *base64_sixtet = 63; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid base64 character: 0x%02" PRIx8 ".", function, base64_character ); return( -1 ); } return( 1 ); } /* Copies a base64 triplet from a base64 stream * * The padding size will still be set to indicate the number of * sixtets in the triplet * * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base64_triplet_copy_from_base64_stream( uint32_t *base64_triplet, const uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, uint8_t *padding_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_triplet_copy_from_base64_stream"; size_t base64_character_size = 0; size_t stream_index = 0; uint32_t base64_character = 0; uint8_t padding_character = 0; uint8_t sixtet1 = 0; uint8_t sixtet2 = 0; uint8_t sixtet3 = 0; uint8_t sixtet4 = 0; if( base64_triplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 triplet.", function ); return( -1 ); } if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream index.", function ); return( -1 ); } if( *base64_stream_index >= base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small.", function ); return( -1 ); } if( padding_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid padding size.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } stream_index = *base64_stream_index; if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 1st base64 character.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base64 character.", function ); return( -1 ); } if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet1, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 character to 1st sixtet.", function ); return( -1 ); } if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 2nd base64 character.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 2nd base64 character.", function ); return( -1 ); } if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet2, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 character to 2nd sixtet.", function ); return( -1 ); } *padding_size = 2; if( ( stream_index + base64_character_size ) <= base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base64 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base64_character == (uint32_t) padding_character ) ) { sixtet3 = 0; } else if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet3, base64_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 3rd base64 sixtet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 3rd base64 character.", function ); return( -1 ); } if( ( stream_index + base64_character_size ) <= base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character = base64_stream[ stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; if( ( base64_character & 0xffffff00UL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base64 character.", function ); return( -1 ); } if( ( padding_character != 0 ) && ( base64_character == (uint32_t) padding_character ) ) { sixtet4 = 0; } else if( *padding_size > 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4th base64 sixtet.", function ); return( -1 ); } } else if( libuna_base64_character_copy_to_sixtet( (uint8_t) base64_character, &sixtet4, base64_variant, error ) != 1 ) { if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 4rd base64 sixtet.", function ); return( -1 ); } libcerror_error_free( error ); } else { *padding_size -= 1; } } else if( padding_character != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: missing 4th base64 character.", function ); return( -1 ); } *base64_triplet = sixtet1; *base64_triplet <<= 6; *base64_triplet |= sixtet2; *base64_triplet <<= 6; *base64_triplet |= sixtet3; *base64_triplet <<= 6; *base64_triplet |= sixtet4; *base64_stream_index = stream_index; return( 1 ); } /* Copies a base64 triplet to a base64 stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base64_triplet_copy_to_base64_stream( uint32_t base64_triplet, uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, uint8_t padding_size, uint32_t base64_variant, libcerror_error_t **error ) { uint8_t *sixtet_to_character_table = NULL; static char *function = "libuna_base64_triplet_copy_to_base64_stream"; size_t base64_character_size = 0; size_t stream_index = 0; uint32_t base64_character = 0; uint8_t padding_character = 0; uint8_t sixtet1 = 0; uint8_t sixtet2 = 0; uint8_t sixtet3 = 0; uint8_t sixtet4 = 0; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream index.", function ); return( -1 ); } if( *base64_stream_index >= base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } switch( base64_variant & 0x000f0000UL ) { case LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL: sixtet_to_character_table = libuna_base64_sixtet_to_character_table; break; case LIBUNA_BASE64_VARIANT_ALPHABET_URL: sixtet_to_character_table = libuna_base64url_sixtet_to_character_table; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } stream_index = *base64_stream_index; /* Separate the 3 bytes value into 4 x 6 bit values */ sixtet4 = (uint8_t) ( base64_triplet & 0x3f ); base64_triplet >>= 6; sixtet3 = (uint8_t) ( base64_triplet & 0x3f ); base64_triplet >>= 6; sixtet2 = (uint8_t) ( base64_triplet & 0x3f ); base64_triplet >>= 6; sixtet1 = (uint8_t) ( base64_triplet & 0x3f ); /* Spread the encoding over 2 characters if 1 byte is available */ if( ( stream_index + ( base64_character_size * 2 ) ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } base64_character = sixtet_to_character_table[ sixtet1 ]; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; base64_character = sixtet_to_character_table[ sixtet2 ]; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; /* Spread the encoding over 3 characters if 2 bytes are available * Otherwise pad the remaining bytes if required */ if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } if( ( padding_size < 2 ) || ( padding_character != 0 ) ) { if( padding_size < 2 ) { base64_character = sixtet_to_character_table[ sixtet3 ]; } else if( padding_character != 0 ) { base64_character = padding_character; } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; } /* Spread the encoding over 4 characters if 3 bytes are available * Otherwise pad the remaining bytes if required */ if( ( stream_index + base64_character_size ) > base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } if( ( padding_size < 1 ) || ( padding_character != 0 ) ) { if( padding_size < 1 ) { base64_character = sixtet_to_character_table[ sixtet4 ]; } else if( padding_character != 0 ) { base64_character = padding_character; } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; } *base64_stream_index = stream_index; return( 1 ); } /* Copies a base64 triplet from a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base64_triplet_copy_from_byte_stream( uint32_t *base64_triplet, const uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t *padding_size, libcerror_error_t **error ) { static char *function = "libuna_base64_triplet_copy_from_byte_stream"; if( base64_triplet == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 triplet.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } /* Determine the value of 3 bytes (24 bits) */ *base64_triplet = (uint32_t) byte_stream[ *byte_stream_index ] << 16; *byte_stream_index += 1; *padding_size = 2; if( *byte_stream_index < byte_stream_size ) { *base64_triplet |= (uint32_t) byte_stream[ *byte_stream_index ] << 8; *byte_stream_index += 1; *padding_size -= 1; } if( *byte_stream_index < byte_stream_size ) { *base64_triplet |= (uint32_t) byte_stream[ *byte_stream_index ]; *byte_stream_index += 1; *padding_size -= 1; } return( 1 ); } /* Copies a base64 triplet to a byte stream * Returns 1 if successful or -1 on error */ LIBUNA_INLINE \ int libuna_base64_triplet_copy_to_byte_stream( uint32_t base64_triplet, uint8_t *byte_stream, size_t byte_stream_size, size_t *byte_stream_index, uint8_t padding_size, libcerror_error_t **error ) { static char *function = "libuna_base64_triplet_copy_to_byte_stream"; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream index.", function ); return( -1 ); } if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } if( padding_size > 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid padding size value out of bounds.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base64_triplet >> 16 ) & 0xff ); *byte_stream_index += 1; if( padding_size <= 1 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream string too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( ( base64_triplet >> 8 ) & 0xff ); *byte_stream_index += 1; } if( padding_size == 0 ) { if( *byte_stream_index >= byte_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: byte stream is too small.", function ); return( -1 ); } byte_stream[ *byte_stream_index ] = (uint8_t) ( base64_triplet & 0xff ); *byte_stream_index += 1; } return( 1 ); } /* Determines the size of a byte stream from a base64 stream * * LIBUNA_BASE64_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base64_stream_size_to_byte_stream( const uint8_t *base64_stream, size_t base64_stream_size, size_t *byte_stream_size, uint32_t base64_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_size_to_byte_stream"; size_t base64_character_size = 0; size_t base64_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base64_character1 = 0; uint32_t base64_character2 = 0; uint8_t base64_character_62 = 0; uint8_t base64_character_63 = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( ( base64_stream_size == 0 ) || ( base64_stream_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid base64 stream size value out of bounds.", function ); return( -1 ); } if( byte_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream size.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x000f0000UL ) { case LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL: base64_character_62 = (uint8_t) '+'; base64_character_63 = (uint8_t) '/'; break; case LIBUNA_BASE64_VARIANT_ALPHABET_URL: base64_character_62 = (uint8_t) '-'; base64_character_63 = (uint8_t) '_'; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } if( base64_stream_size < base64_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base64 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base64_stream_index = base64_stream_size - base64_character_size; whitespace_size = 0; while( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { whitespace_size += base64_character_size; } else if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { whitespace_size += base64_character_size; } else { break; } } base64_stream_size -= whitespace_size; base64_stream_index = base64_stream_size - base64_character_size; if( base64_stream_size < base64_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base64 stream value too small.", function ); return( -1 ); } if( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( base64_character1 == (uint32_t) '=' ) { padding_size += 1; } } if( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( base64_character1 == (uint32_t) '=' ) { padding_size += 1; } } if( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( base64_character1 == (uint32_t) '=' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid number of padding bytes.", function ); return( -1 ); } } base64_stream_index = 0; whitespace_size = 0; while( base64_stream_index < ( base64_stream_size - ( padding_size * base64_character_size ) ) ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index += base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base64_stream_index + base64_character_size ) < base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character2 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; } if( ( base64_character2 == (uint32_t) '\n' ) || ( base64_character2 == (uint32_t) '\r' ) ) { base64_stream_index += base64_character_size; whitespace_size += base64_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } whitespace_size += base64_character_size; } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { whitespace_size += base64_character_size; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { /* A-Z is not a continous range on a EBCDIC based system * it consists of the ranges: A-I, J-R, S-Z */ if( ( base64_character1 >= (uint32_t) 'A' ) && ( base64_character1 <= (uint32_t) 'I' ) ) { number_of_characters++; } else if( ( base64_character1 >= (uint32_t) 'J' ) && ( base64_character1 <= (uint32_t) 'R' ) ) { number_of_characters++; } else if( ( base64_character1 >= (uint32_t) 'S' ) && ( base64_character1 <= (uint32_t) 'Z' ) ) { number_of_characters++; } /* a-z is not a continous range on a EBCDIC based system * it consists of the ranges: a-i, j-r, s-z */ else if( ( base64_character1 >= (uint32_t) 'a' ) && ( base64_character1 <= (uint32_t) 'i' ) ) { number_of_characters++; } else if( ( base64_character1 >= (uint32_t) 'j' ) && ( base64_character1 <= (uint32_t) 'r' ) ) { number_of_characters++; } else if( ( base64_character1 >= (uint32_t) 's' ) && ( base64_character1 <= (uint32_t) 'z' ) ) { number_of_characters++; } else if( ( base64_character1 >= (uint32_t) '0' ) && ( base64_character1 <= (uint32_t) '9' ) ) { number_of_characters++; } else if( ( base64_character1 == (uint32_t) base64_character_62 ) || ( base64_character1 == (uint32_t) base64_character_63 ) ) { number_of_characters++; } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base64 stream at index: %" PRIzd ".", function, base64_stream_index - base64_character_size ); return( -1 ); } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } base64_stream_size -= whitespace_size; /* Make sure the byte stream is able to hold * at least 3 bytes for each 4 base64 characters */ base64_character_size *= 4; *byte_stream_size = base64_stream_size / base64_character_size; if( ( base64_stream_size % base64_character_size ) != 0 ) { *byte_stream_size += 1; } *byte_stream_size *= 3; /* In this case the padding size contains the number of bytes to correct */ *byte_stream_size -= padding_size; return( 1 ); } /* Copies a byte stream from a base64 stream * * LIBUNA_BASE64_FLAG_STRIP_WHITESPACE removes leading space and tab characters, * and trailing space, tab and end of line characters * * Returns 1 if successful or -1 on error */ int libuna_base64_stream_copy_to_byte_stream( const uint8_t *base64_stream, size_t base64_stream_size, uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, uint8_t flags, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_copy_to_byte_stream"; size_t base64_character_size = 0; size_t base64_stream_index = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t whitespace_size = 0; uint32_t base64_character1 = 0; uint32_t base64_character2 = 0; uint32_t base64_triplet = 0; uint8_t character_limit = 0; uint8_t padding_size = 0; uint8_t strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } if( base64_stream_size < base64_character_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid base64 stream value too small.", function ); return( -1 ); } if( ( flags & ~( LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } base64_stream_index = base64_stream_size - base64_character_size; whitespace_size = 0; while( base64_stream_index > base64_character_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index -= base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { whitespace_size += base64_character_size; } else if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) == 0 ) { break; } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { whitespace_size += base64_character_size; } else { break; } } base64_stream_size -= whitespace_size; base64_stream_index = 0; whitespace_size = 0; if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) == 0 ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } while( base64_stream_index < base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character1 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character1 ); break; } base64_stream_index += base64_character_size; if( ( base64_character1 == (uint32_t) '\n' ) || ( base64_character1 == (uint32_t) '\r' ) ) { if( ( strip_mode != LIBUNA_STRIP_MODE_NON_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } else { if( ( base64_stream_index + base64_character_size ) < base64_stream_size ) { switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character2 = base64_stream[ base64_stream_index ]; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_to_uint16_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_to_uint16_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_to_uint32_big_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_to_uint32_little_endian( &( base64_stream[ base64_stream_index ] ), base64_character2 ); break; } if( ( base64_character2 == (uint32_t) '\n' ) || ( base64_character2 == (uint32_t) '\r' ) ) { base64_stream_index += base64_character_size; } } strip_mode = LIBUNA_STRIP_MODE_LEADING_WHITESPACE; } if( character_limit != 0 ) { if( number_of_characters != (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in line does not match character limit.", function ); return( -1 ); } number_of_characters = 0; } } else if( ( base64_character1 == (uint32_t) ' ' ) || ( base64_character1 == (uint32_t) '\t' ) || ( base64_character1 == (uint32_t) '\v' ) ) { if( ( flags & LIBUNA_BASE64_FLAG_STRIP_WHITESPACE ) != 0 ) { if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_TRAILING_WHITESPACE; } if( ( strip_mode != LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) && ( strip_mode != LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } } else if( strip_mode == LIBUNA_STRIP_MODE_LEADING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_NON_WHITESPACE; } else if( strip_mode == LIBUNA_STRIP_MODE_TRAILING_WHITESPACE ) { strip_mode = LIBUNA_STRIP_MODE_INVALID_CHARACTER; } if( strip_mode == LIBUNA_STRIP_MODE_INVALID_CHARACTER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: invalid character in base64 stream at index: %" PRIzd ".", function, base64_stream_index - base64_character_size ); return( -1 ); } if( strip_mode == LIBUNA_STRIP_MODE_NON_WHITESPACE ) { if( padding_size > 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: invalid 1st base64 sixtet.", function ); return( -1 ); } base64_stream_index -= base64_character_size; /* Convert the base64 stream into a base64 triplet */ if( libuna_base64_triplet_copy_from_base64_stream( &base64_triplet, base64_stream, base64_stream_size, &base64_stream_index, &padding_size, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet from base64 stream.", function ); return( -1 ); } /* Convert the base64 triplet into a byte stream */ if( libuna_base64_triplet_copy_to_byte_stream( base64_triplet, byte_stream, byte_stream_size, &byte_stream_index, padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet to byte stream.", function ); return( -1 ); } number_of_characters += 4 - padding_size; } } if( character_limit != 0 ) { if( number_of_characters > (size_t) character_limit ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: number of characters in last line exceed maximum.", function ); return( -1 ); } } return( 1 ); } /* Determines the size of a base64 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_stream_size_from_byte_stream( const uint8_t *byte_stream, size_t byte_stream_size, size_t *base64_stream_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_size_from_byte_stream"; size_t base64_character_size = 0; size_t remaining_size = 0; size_t whitespace_size = 0; uint8_t character_limit = 0; uint8_t padding_character = 0; if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream size.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } /* Make sure the base64 stream is able to hold * at least 4 base64 characters for each 3 bytes */ *base64_stream_size = ( byte_stream_size / 3 ) * 4; remaining_size = byte_stream_size % 3; if( remaining_size != 0 ) { if( padding_character != 0 ) { *base64_stream_size += 4; } else if( remaining_size == 1 ) { *base64_stream_size += 2; } else if( remaining_size == 2 ) { *base64_stream_size += 3; } } if( character_limit != 0 ) { whitespace_size = *base64_stream_size / character_limit; if( ( *base64_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } *base64_stream_size += whitespace_size; } *base64_stream_size *= base64_character_size; return( 1 ); } /* Copies a base64 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_stream_copy_from_byte_stream( uint8_t *base64_stream, size_t base64_stream_size, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_copy_from_byte_stream"; size_t base64_stream_index = 0; if( libuna_base64_stream_with_index_copy_from_byte_stream( base64_stream, base64_stream_size, &base64_stream_index, byte_stream, byte_stream_size, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base64 stream from byte stream.", function ); return( -1 ); } return( 1 ); } /* Copies a base64 stream from a byte stream * Returns 1 if successful or -1 on error */ int libuna_base64_stream_with_index_copy_from_byte_stream( uint8_t *base64_stream, size_t base64_stream_size, size_t *base64_stream_index, const uint8_t *byte_stream, size_t byte_stream_size, uint32_t base64_variant, libcerror_error_t **error ) { static char *function = "libuna_base64_stream_with_index_copy_from_byte_stream"; size_t base64_character_size = 0; size_t calculated_base64_stream_size = 0; size_t byte_stream_index = 0; size_t number_of_characters = 0; size_t remaining_size = 0; size_t stream_index = 0; size_t whitespace_size = 0; uint32_t base64_character = 0; uint32_t base64_triplet = 0; uint8_t character_limit = 0; uint8_t padding_character = 0; uint8_t padding_size = 0; if( base64_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream.", function ); return( -1 ); } if( base64_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base64 stream size value exceeds maximum.", function ); return( -1 ); } if( base64_stream_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base64 stream index.", function ); return( -1 ); } if( *base64_stream_index >= base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream string too small.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } switch( base64_variant & 0x000000ffUL ) { case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE: character_limit = 0; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_64: character_limit = 64; break; case LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_76: character_limit = 76; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0x0f000000UL ) { case LIBUNA_BASE64_VARIANT_PADDING_NONE: padding_character = 0; break; case LIBUNA_BASE64_VARIANT_PADDING_OPTIONAL: padding_character = (uint8_t) '='; break; case LIBUNA_BASE64_VARIANT_PADDING_REQUIRED: padding_character = (uint8_t) '='; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_character_size = 1; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: base64_character_size = 2; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: base64_character_size = 4; break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported base64 variant.", function ); return( -1 ); } stream_index = *base64_stream_index; /* Make sure the base64 stream is able to hold * at least 4 base64 characters for each 3 bytes */ calculated_base64_stream_size = ( byte_stream_size / 3 ) * 4; remaining_size = byte_stream_size % 3; if( remaining_size != 0 ) { if( padding_character != 0 ) { calculated_base64_stream_size += 4; } else if( remaining_size == 1 ) { calculated_base64_stream_size += 2; } else if( remaining_size == 2 ) { calculated_base64_stream_size += 3; } } calculated_base64_stream_size += 1; if( character_limit != 0 ) { whitespace_size = calculated_base64_stream_size / character_limit; if( ( calculated_base64_stream_size % character_limit ) != 0 ) { whitespace_size += 1; } calculated_base64_stream_size += whitespace_size; } calculated_base64_stream_size *= base64_character_size; if( base64_stream_size < calculated_base64_stream_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: base64 stream is too small.", function ); return( -1 ); } while( byte_stream_index < byte_stream_size ) { /* Convert the byte stream into a base64 triplet */ if( libuna_base64_triplet_copy_from_byte_stream( &base64_triplet, byte_stream, byte_stream_size, &byte_stream_index, &padding_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet from byte stream.", function ); return( -1 ); } /* Convert the base64 triplet into a base64 stream */ if( libuna_base64_triplet_copy_to_base64_stream( base64_triplet, base64_stream, base64_stream_size, &stream_index, padding_size, base64_variant, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_INPUT_FAILED, "%s: unable to copy base64 triplet to base64 stream.", function ); return( -1 ); } if( character_limit != 0 ) { number_of_characters += 4; if( number_of_characters >= (size_t) character_limit ) { base64_character = (uint32_t) '\n'; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; number_of_characters = 0; } } } if( character_limit != 0 ) { if( number_of_characters != 0 ) { base64_character = (uint32_t) '\n'; switch( base64_variant & 0xf0000000UL ) { case LIBUNA_BASE64_VARIANT_ENCODING_BYTE_STREAM: base64_stream[ stream_index ] = (uint8_t) base64_character; break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_BIG_ENDIAN: byte_stream_copy_from_uint16_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF16_LITTLE_ENDIAN: byte_stream_copy_from_uint16_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN: byte_stream_copy_from_uint32_big_endian( &( base64_stream[ stream_index ] ), base64_character ); break; case LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN: byte_stream_copy_from_uint32_little_endian( &( base64_stream[ stream_index ] ), base64_character ); break; } stream_index += base64_character_size; } } *base64_stream_index = stream_index; return( 1 ); } libpff-20120802/libuna/libuna_error.c0000644000175000017500000000465512005152764014252 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libuna_error.h" #include "libuna_libcerror.h" #if !defined( HAVE_LOCAL_LIBUNA ) /* Free an error and its elements */ void libuna_error_free( libuna_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libuna_error_fprint( libuna_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libuna_error_sprint( libuna_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libuna_error_backtrace_fprint( libuna_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libuna_error_backtrace_sprint( libuna_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBUNA ) */ libpff-20120802/libuna/libuna_codepage_koi8_u.c0000644000175000017500000000600012005152764016130 00000000000000/* * KOI8-U codepage (Ukrainian Cyrillic) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_koi8_u.h" /* Extended ASCII to Unicode character lookup table for KOI8-U codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_koi8_u_byte_stream_to_unicode_base_0x80[ 128 ] = { 0x2500, 0x2502, 0x250c, 0x2510, 0x2514, 0x2518, 0x251c, 0x2524, 0x252c, 0x2534, 0x253c, 0x2580, 0x2584, 0x2588, 0x258c, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25a0, 0x2219, 0x221a, 0x2248, 0x2264, 0x2265, 0x00a0, 0x2321, 0x00b0, 0x00b2, 0x00b7, 0x00f7, 0x2550, 0x2551, 0x2552, 0x0451, 0x0454, 0x2554, 0x0456, 0x0457, 0x2557, 0x2558, 0x2559, 0x255a, 0x255b, 0x0491, 0x255d, 0x255e, 0x255f, 0x2560, 0x2561, 0x0401, 0x0404, 0x2563, 0x0406, 0x0407, 0x2566, 0x2567, 0x2568, 0x2569, 0x256a, 0x0490, 0x256c, 0x00a9, 0x044e, 0x0430, 0x0431, 0x0446, 0x0434, 0x0435, 0x0444, 0x0433, 0x0445, 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, 0x044f, 0x0440, 0x0441, 0x0442, 0x0443, 0x0436, 0x0432, 0x044c, 0x044b, 0x0437, 0x0448, 0x044d, 0x0449, 0x0447, 0x044a, 0x042e, 0x0410, 0x0411, 0x0426, 0x0414, 0x0415, 0x0424, 0x0413, 0x0425, 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, 0x042f, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042c, 0x042b, 0x0417, 0x0428, 0x042d, 0x0429, 0x0427, 0x042a }; /* Unicode to ASCII character lookup table for KOI8-U codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x0410[ 64 ] = { 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, 0xfb, 0xfd, 0xff, 0xf9, 0xf8, 0xfc, 0xe0, 0xf1, 0xc1, 0xc2, 0xd7, 0xc7, 0xc4, 0xc5, 0xd6, 0xda, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1 }; const uint8_t libuna_codepage_koi8_u_unicode_to_byte_stream_base_0x2550[ 32 ] = { 0xa0, 0xa1, 0xa2, 0x1a, 0xa5, 0x1a, 0x1a, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x1a, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0x1a, 0xb5, 0x1a, 0x1a, 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0x1a, 0xbe, 0x1a, 0x1a, 0x1a }; libpff-20120802/libuna/libuna_codepage_iso_8859_13.h0000644000175000017500000000245512005152764016543 00000000000000/* * ISO 8859-13 codepage (Baltic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_13_H ) #define _LIBUNA_CODEPAGE_ISO_8859_13_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_13_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x00a0[ 224 ]; extern const uint8_t libuna_codepage_iso_8859_13_unicode_to_byte_stream_base_0x2018[ 8 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_7.h0000644000175000017500000000244612005152764016466 00000000000000/* * ISO 8859-7 codepage (Greek) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_7_H ) #define _LIBUNA_CODEPAGE_ISO_8859_7_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_7_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x00a0[ 24 ]; extern const uint8_t libuna_codepage_iso_8859_7_unicode_to_byte_stream_base_0x0380[ 80 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_14.h0000644000175000017500000000260612005152764016542 00000000000000/* * ISO 8859-14 codepage (Celtic) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBUNA_CODEPAGE_ISO_8859_14_H ) #define _LIBUNA_CODEPAGE_ISO_8859_14_H #include #include #if defined( __cplusplus ) extern "C" { #endif extern const uint16_t libuna_codepage_iso_8859_14_byte_stream_to_unicode_base_0xa0[ 96 ]; extern const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x00c0[ 64 ]; extern const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x0170[ 8 ]; extern const uint8_t libuna_codepage_iso_8859_14_unicode_to_byte_stream_base_0x1e80[ 8 ]; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libuna/libuna_codepage_iso_8859_16.c0000644000175000017500000000634212005152764016540 00000000000000/* * ISO 8859-16 codepage (Latin 10) function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libuna_codepage_iso_8859_16.h" /* Extended ASCII to Unicode character lookup table for ISO 8859-16 codepage * Unknown are filled with the Unicode replacement character 0xfffd */ const uint16_t libuna_codepage_iso_8859_16_byte_stream_to_unicode_base_0xa0[ 96 ] = { 0x00a0, 0x0104, 0x0105, 0x0141, 0x20ac, 0x201e, 0x0160, 0x00a7, 0x0161, 0x00a9, 0x0218, 0x00ab, 0x0179, 0x00ad, 0x017a, 0x017b, 0x00b0, 0x00b1, 0x010c, 0x0142, 0x017d, 0x201d, 0x00b6, 0x00b7, 0x017e, 0x010d, 0x0219, 0x00bb, 0x0152, 0x0153, 0x0178, 0x017c, 0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0106, 0x00c6, 0x00c7, 0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf, 0x0110, 0x0143, 0x00d2, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x015a, 0x0170, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x0118, 0x021a, 0x00df, 0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x0107, 0x00e6, 0x00e7, 0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x0111, 0x0144, 0x00f2, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x015b, 0x0171, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x0119, 0x021b, 0x00ff }; /* Unicode to ASCII character lookup table for ISO 8859-16 codepage * Unknown are filled with the ASCII replacement character 0x1a */ const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x00a8[ 96 ] = { 0x1a, 0xa9, 0x1a, 0xab, 0x1a, 0xad, 0x1a, 0x1a, 0xb0, 0xb1, 0x1a, 0x1a, 0x1a, 0x1a, 0xb6, 0xb7, 0x1a, 0x1a, 0x1a, 0xbb, 0x1a, 0x1a, 0x1a, 0x1a, 0xc0, 0xc1, 0xc2, 0x1a, 0xc4, 0x1a, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0x1a, 0x1a, 0xd2, 0xd3, 0xd4, 0x1a, 0xd6, 0x1a, 0x1a, 0xd9, 0xda, 0xdb, 0xdc, 0x1a, 0x1a, 0xdf, 0xe0, 0xe1, 0xe2, 0x1a, 0xe4, 0x1a, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0x1a, 0x1a, 0xf2, 0xf3, 0xf4, 0x1a, 0xf6, 0x1a, 0x1a, 0xf9, 0xfa, 0xfb, 0xfc, 0x1a, 0x1a, 0xff, 0x1a, 0x1a, 0xc3, 0xe3, 0xa1, 0xa2, 0xc5, 0xe5 }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0140[ 8 ] = { 0x1a, 0xa3, 0xb3, 0xd1, 0xf1, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0150[ 8 ] = { 0xd5, 0xf5, 0xbc, 0xbd, 0x1a, 0x1a, 0x1a, 0x1a }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0178[ 8 ] = { 0xbe, 0xac, 0xae, 0xaf, 0xbf, 0xb4, 0xb8, 0x1a }; const uint8_t libuna_codepage_iso_8859_16_unicode_to_byte_stream_base_0x0218[ 8 ] = { 0xaa, 0xba, 0xde, 0xfe, 0x1a, 0x1a, 0x1a, 0x1a }; libpff-20120802/libpff.pc.in0000644000175000017500000000152512005155631012331 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libpff Description: Library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. Version: @VERSION@ Libs: -L${libdir} -lpff Libs.private: @ax_libbfio_pc_libs_private@ @ax_libcerror_pc_libs_private@ @ax_libcfile_pc_libs_private@ @ax_libclocale_pc_libs_private@ @ax_libcnotify_pc_libs_private@ @ax_libcpath_pc_libs_private@ @ax_libcsplit_pc_libs_private@ @ax_libcstring_pc_libs_private@ @ax_libfdata_pc_libs_private@ @ax_libfdatetime_pc_libs_private@ @ax_libfguid_pc_libs_private@ @ax_libfmapi_pc_libs_private@ @ax_libfvalue_pc_libs_private@ @ax_libfwnt_pc_libs_private@ @ax_libuna_pc_libs_private@ Cflags: -I${includedir} libpff-20120802/libpff/0000775000175000017500000000000012006536213011457 500000000000000libpff-20120802/libpff/libpff_data_array_entry.c0000644000175000017500000001140012005155304016404 00000000000000/* * Data array entry functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_data_array_entry.h" #include "libpff_libcerror.h" /* Creates a data array entry * Returns 1 if successful or -1 on error */ int libpff_data_array_entry_initialize( libpff_data_array_entry_t **data_array_entry, libcerror_error_t **error ) { static char *function = "libpff_data_array_entry_initialize"; if( data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array entry.", function ); return( -1 ); } if( *data_array_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data array entry value already set.", function ); return( -1 ); } *data_array_entry = memory_allocate_structure( libpff_data_array_entry_t ); if( *data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data array entry.", function ); goto on_error; } if( memory_set( *data_array_entry, 0, sizeof( libpff_data_array_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data array entry.", function ); goto on_error; } return( 1 ); on_error: if( *data_array_entry != NULL ) { memory_free( *data_array_entry ); *data_array_entry = NULL; } return( -1 ); } /* Frees the data array entry and its values * Returns 1 if successful or -1 on error */ int libpff_data_array_entry_free( libpff_data_array_entry_t **data_array_entry, libcerror_error_t **error ) { static char *function = "libpff_data_array_entry_free"; if( data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array entry.", function ); return( -1 ); } if( *data_array_entry != NULL ) { memory_free( *data_array_entry ); *data_array_entry = NULL; } return( 1 ); } /* Clones the data array entry * Returns 1 if successful or -1 on error */ int libpff_data_array_entry_clone( libpff_data_array_entry_t **destination_data_array_entry, libpff_data_array_entry_t *source_data_array_entry, libcerror_error_t **error ) { static char *function = "libpff_data_array_entry_clone"; if( destination_data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination data array entry.", function ); return( -1 ); } if( *destination_data_array_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination data array entry already set.", function ); return( -1 ); } if( source_data_array_entry == NULL ) { *destination_data_array_entry = NULL; return( 1 ); } *destination_data_array_entry = memory_allocate_structure( libpff_data_array_entry_t ); if( *destination_data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination data array entry.", function ); goto on_error; } if( memory_copy( *destination_data_array_entry, source_data_array_entry, sizeof( libpff_data_array_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data array entry.", function ); goto on_error; } return( 1 ); on_error: if( *destination_data_array_entry != NULL ) { memory_free( *destination_data_array_entry ); *destination_data_array_entry = NULL; } return( -1 ); } libpff-20120802/libpff/pff_allocation_table.h0000644000175000017500000000500512005155304015672 00000000000000/* * The allocation table definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_ALLOCATION_TABLE_H ) #define _PFF_ALLOCATION_TABLE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_allocation_table_32bit pff_allocation_table_32bit_t; struct pff_allocation_table_32bit { /* Padding * Consists of 4 bytes * Contains 0x0 values */ uint8_t padding1[ 4 ]; /* The allocation table data * Consists of 496 bytes * A bit represents certain amount of allocated data * 64 byte when type is 0x84 * 512 byte when type is 0x83 */ uint8_t data[ 496 ]; /* The type * Consists of 1 byte */ uint8_t type; /* The type copy * Consists of 1 byte */ uint8_t type_copy; /* The signature * Consists of 2 bytes * Contains 0x0 values */ uint8_t signature[ 2 ]; /* The back pointer * Consists of 4 bytes */ uint8_t back_pointer[ 4 ]; /* A weak CRC32 of the 496 bytes of table data * Consists of 4 bytes */ uint8_t crc[ 4 ]; }; typedef struct pff_allocation_table_64bit pff_allocation_table_64bit_t; struct pff_allocation_table_64bit { /* The allocation table data * Consists of 496 bytes * A bit represents certain amount of allocated data * 64 byte when type is 0x84 * 512 byte when type is 0x83 */ uint8_t data[ 496 ]; /* The type * Consists of 1 byte */ uint8_t type; /* The type copy * Consists of 1 byte */ uint8_t type_copy; /* The signature * Consists of 2 bytes * Contains 0x0 values */ uint8_t signature[ 2 ]; /* A weak CRC32 of the 496 bytes of table data * Consists of 4 bytes */ uint8_t crc[ 4 ]; /* The back pointer * Consists of 8 bytes */ uint8_t back_pointer[ 8 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_index.c0000644000175000017500000006345512005155304014204 00000000000000/* * Index functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_definitions.h" #include "libpff_index.h" #include "libpff_index_node.h" #include "libpff_index_value.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_unused.h" #include "pff_index_node.h" /* Initializes the index and its values * Returns 1 if successful or -1 on error */ int libpff_index_initialize( libpff_index_t **index, libpff_io_handle_t *io_handle, uint8_t type, off64_t root_node_offset, uint64_t root_node_back_pointer, uint8_t recovered, libcerror_error_t **error ) { static char *function = "libpff_index_initialize"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } if( *index != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid index value already set.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } *index = memory_allocate_structure( libpff_index_t ); if( *index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create index.", function ); goto on_error; } if( memory_set( *index, 0, sizeof( libpff_index_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear index.", function ); goto on_error; } ( *index )->io_handle = io_handle; ( *index )->type = type; ( *index )->root_node_offset = root_node_offset; ( *index )->root_node_back_pointer = root_node_back_pointer; ( *index )->recovered = recovered; return( 1 ); on_error: if( *index != NULL ) { memory_free( *index ); *index = NULL; } return( -1 ); } /* Frees the index and its values * Returns 1 if successful or -1 on error */ int libpff_index_free( libpff_index_t **index, libcerror_error_t **error ) { static char *function = "libpff_index_free"; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } if( *index != NULL ) { memory_free( *index ); *index = NULL; } return( 1 ); } /* Clones the index * Returns 1 if successful or -1 on error */ int libpff_index_clone( libpff_index_t **destination_index, libpff_index_t *source_index, libcerror_error_t **error ) { static char *function = "libpff_index_clone"; if( destination_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination index.", function ); return( -1 ); } if( *destination_index != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination index already set.", function ); return( -1 ); } if( source_index == NULL ) { *destination_index = NULL; return( 1 ); } if( libpff_index_initialize( destination_index, source_index->io_handle, source_index->type, source_index->root_node_offset, source_index->root_node_back_pointer, source_index->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination index.", function ); return( -1 ); } return( 1 ); } /* Reads the index node * Returns 1 if successful or -1 on error */ int libpff_index_read_node( libpff_index_t *index, libbfio_handle_t *file_io_handle, off64_t node_offset, libfdata_tree_node_t *index_tree_node, libpff_index_value_t *index_value, libcerror_error_t **error ) { libpff_index_node_t *index_node = NULL; static char *function = "libpff_index_read_node"; uint8_t *node_entry_data = NULL; off64_t index_value_file_offset = 0; off64_t node_data_offset = 0; uint64_t index_value_identifier = 0; uint64_t index_value_data_identifier = 0; uint16_t index_value_data_size = 0; uint8_t entry_index = 0; int sub_node_index = 0; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } if( index->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid index - missing IO handle.", function ); return( -1 ); } if( index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index value.", function ); return( -1 ); } if( libfdata_vector_get_element_value_at_offset( index->io_handle->index_nodes_vector, file_io_handle, index->io_handle->index_nodes_cache, node_offset, (intptr_t **) &index_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index node at offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } if( index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index node.", function ); return( -1 ); } if( index->type != index_node->type ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: index type mismatch (index: 0x%02" PRIx8 ", node: 0x%02" PRIx8 ").", function, index->type, index_node->type ); /* TODO error tollerance */ return( -1 ); } if( index_node->number_of_entries > 0 ) { if( index_node->level != PFF_INDEX_NODE_LEVEL_LEAF ) { if( index_value->back_pointer != index_node->back_pointer ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: back pointer mismatch (entry: %" PRIu64 ", node: %" PRIu64 ").", function, index_value->back_pointer, index_node->back_pointer ); /* TODO error tollerance */ return( -1 ); } } if( libfdata_tree_node_resize_sub_nodes( index_tree_node, (int) index_node->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize number of sub nodes.", function ); return( -1 ); } node_data_offset = node_offset; for( entry_index = 0; entry_index < index_node->number_of_entries; entry_index++ ) { if( libfdata_tree_node_set_sub_node_by_index( index_tree_node, (int) entry_index, node_data_offset, (size64_t) entry_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set index node entry: %" PRIu8 " as sub node.", function, entry_index ); return( -1 ); } node_data_offset += (off64_t) index_node->entry_size; } if( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) { for( entry_index = index_node->number_of_entries; entry_index < index_node->maximum_number_of_entries; entry_index++ ) { if( libpff_index_node_get_entry_data( index_node, entry_index, &node_entry_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node entry: %" PRIu8 " data.", function, entry_index ); return( -1 ); } if( node_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node entry: %" PRIu8 " data.", function, entry_index ); return( -1 ); } if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, index_value_identifier ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, index_value_identifier ); } /* Ignore the upper 32-bit of descriptor identifiers */ if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { index_value_identifier &= 0xffffffffUL; } /* Ignore index values without an identifier */ if( index_value_identifier == 0 ) { continue; } if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) node_entry_data )->data_identifier, index_value_data_identifier ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) node_entry_data )->data_identifier, index_value_data_identifier ); } /* Ignore descriptor index values without a data identifier */ if( index_value_data_identifier == 0 ) { continue; } } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->file_offset, index_value_file_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->data_size, index_value_data_size ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->file_offset, index_value_file_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->data_size, index_value_data_size ); } /* Ignore offset index values without a file offset and data size */ if( ( index_value_file_offset <= 0 ) || ( index_value_data_size == 0 ) ) { continue; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: adding deleted index value: %" PRIu64 ".\n", function, index_value_identifier ); } #endif if( libfdata_tree_node_append_sub_node( index_tree_node, &sub_node_index, node_data_offset, (size64_t) entry_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append index node entry: %" PRIu8 " as sub node.", function, entry_index ); return( -1 ); } if( libfdata_tree_node_set_deleted_sub_node( index_tree_node, sub_node_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set deleted in sub node: %d.", sub_node_index ); return( -1 ); } node_data_offset += (off64_t) index_node->entry_size; } } } return( 1 ); } /* Reads the index node entry * Returns 1 if successful or -1 on error */ int libpff_index_read_node_entry( libpff_index_t *index, libbfio_handle_t *file_io_handle, off64_t node_offset, uint8_t entry_index, libfdata_tree_node_t *index_tree_node, libpff_index_value_t *index_value, libcerror_error_t **error ) { libpff_index_node_t *index_node = NULL; uint8_t *node_entry_data = NULL; static char *function = "libpff_index_read_node_entry"; off64_t sub_nodes_offset = 0; if( index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index.", function ); return( -1 ); } if( index->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid index - missing IO handle.", function ); return( -1 ); } if( ( index->io_handle->file_type != LIBPFF_FILE_TYPE_32BIT ) && ( index->io_handle->file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index value.", function ); return( -1 ); } if( libfdata_vector_get_element_value_at_offset( index->io_handle->index_nodes_vector, file_io_handle, index->io_handle->index_nodes_cache, node_offset, (intptr_t **) &index_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index node at offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } if( index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index node.", function ); return( -1 ); } if( index->type != index_node->type ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: index type mismatch (index: 0x%02" PRIx8 ", node: 0x%02" PRIx8 ").", function, index->type, index_node->type ); /* TODO error tollerance */ return( -1 ); } if( libpff_index_node_get_entry_data( index_node, entry_index, &node_entry_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node entry: %" PRIu8 " data.", function, entry_index ); return( -1 ); } if( node_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node entry: %" PRIu8 " data.", function, entry_index ); return( -1 ); } if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, index_value->identifier ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, index_value->identifier ); } /* Ignore the upper 32-bit of descriptor identifiers */ if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { index_value->identifier &= 0xffffffffUL; } if( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) { if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) node_entry_data )->data_identifier, index_value->data_identifier ); byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) node_entry_data )->local_descriptors_identifier, index_value->local_descriptors_identifier ); byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) node_entry_data )->parent_identifier, index_value->parent_identifier ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) node_entry_data )->data_identifier, index_value->data_identifier ); byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) node_entry_data )->local_descriptors_identifier, index_value->local_descriptors_identifier ); byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) node_entry_data )->parent_identifier, index_value->parent_identifier ); } } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->file_offset, index_value->file_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->data_size, index_value->data_size ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->reference_count, index_value->reference_count ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->file_offset, index_value->file_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->data_size, index_value->data_size ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->reference_count, index_value->reference_count ); } } if( libfdata_tree_node_set_leaf( index_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf in index tree node.", function ); return( -1 ); } } else { if( index->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_branch_entry_32bit_t *) node_entry_data )->file_offset, sub_nodes_offset ); byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_branch_entry_32bit_t *) node_entry_data )->back_pointer, index_value->back_pointer ); } else if( index->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_branch_entry_64bit_t *) node_entry_data )->file_offset, sub_nodes_offset ); byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_branch_entry_64bit_t *) node_entry_data )->back_pointer, index_value->back_pointer ); } if( libfdata_tree_node_set_sub_nodes_range( index_tree_node, sub_nodes_offset, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub nodes range.", function ); return( -1 ); } } return( 1 ); } /* Reads the index value * Returns 1 if successful or -1 on error */ int libpff_index_read_node_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags LIBPFF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libpff_index_t *index = NULL; libpff_index_value_t *index_value = NULL; static char *function = "libpff_index_read_node_data"; int result = 0; LIBPFF_UNREFERENCED_PARAMETER( read_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index IO handle.", function ); return( -1 ); } index = (libpff_index_t *) io_handle; if( node_data_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid node data offset value less than zero.", function ); return( -1 ); } if( node_data_size > (off64_t) UINT8_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid node data size value exceeds maximum.", function ); return( -1 ); } if( libpff_index_value_initialize( &index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index value.", function ); return( -1 ); } result = libfdata_tree_node_is_root( node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if node is the root.", function ); libpff_index_value_free( &index_value, NULL ); return( -1 ); } else if( result != 0 ) { /* The index tree root node is virtual */ if( index->recovered == 0 ) { if( libfdata_tree_node_set_sub_nodes_range( node, index->root_node_offset, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set root node as sub nodes range.", function ); libpff_index_value_free( &index_value, NULL ); return( -1 ); } index_value->back_pointer = index->root_node_back_pointer; } } else { /* node_data_size contains the index node entry */ if( libpff_index_read_node_entry( index, file_io_handle, node_data_offset, (uint8_t) node_data_size, node, index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read index node entry at offset: %" PRIi64 ".", function, node_data_offset ); libpff_index_value_free( &index_value, NULL ); return( -1 ); } } if( libfdata_tree_node_set_node_value( node, cache, (intptr_t *) index_value, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_index_value_free, LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set index value as node value.", function ); libpff_index_value_free( &index_value, NULL ); return( -1 ); } return( 1 ); } /* Reads the index sub nodes * Returns 1 if successful or -1 on error */ int libpff_index_read_sub_nodes( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size LIBPFF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBPFF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libpff_index_t *index = NULL; libpff_index_value_t *index_value = NULL; static char *function = "libpff_index_read_sub_nodes"; LIBPFF_UNREFERENCED_PARAMETER( node_data_size ) LIBPFF_UNREFERENCED_PARAMETER( read_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index IO handle.", function ); return( -1 ); } index = (libpff_index_t *) io_handle; if( node_data_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid node data offset value less than zero.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( node, file_io_handle, cache, (intptr_t **) &index_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } if( index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index value.", function ); return( -1 ); } if( libpff_index_read_node( index, file_io_handle, node_data_offset, node, index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read index node at offset: %" PRIi64 ".", function, node_data_offset ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_libbfio.h0000644000175000017500000000265412005155304014502 00000000000000/* * The libbfio header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBBFIO_H ) #define _LIBPFF_LIBBFIO_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if defined( HAVE_LOCAL_LIBBFIO ) #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT * before including libbfio.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBBFIO_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_io_handle.c0000644000175000017500000045273012005155304015015 00000000000000/* * Input/Output (IO) handle functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_allocation_table.h" #include "libpff_codepage.h" #include "libpff_data_array.h" #include "libpff_data_block.h" #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_index.h" #include "libpff_index_node.h" #include "libpff_index_tree.h" #include "libpff_index_value.h" #include "libpff_item_descriptor.h" #include "libpff_item_tree.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_local_descriptor_node.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors.h" #include "libpff_local_descriptors_tree.h" #include "libpff_offset_list.h" #include "libpff_tree_type.h" #include "libpff_unused.h" #include "pff_block.h" #include "pff_file_header.h" #include "pff_index_node.h" #include "pff_local_descriptor_node.h" #define LIBPFF_IO_HANDLE_DESCRIPTOR_INDEX_TREE_ROOT_OFFSET 1 #define LIBPFF_IO_HANDLE_OFFSET_INDEX_TREE_ROOT_OFFSET 2 #define LIBPFF_IO_HANDLE_RECOVERED_DESCRIPTOR_INDEX_TREE_ROOT_OFFSET 3 #define LIBPFF_IO_HANDLE_RECOVERED_OFFSET_INDEX_TREE_ROOT_OFFSET 4 const uint8_t pff_file_signature[ 4 ] = { 0x21, 0x42, 0x44, 0x4e }; /* Initialize an IO handle * Make sure the value io_handle is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libpff_io_handle_initialize( libpff_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libpff_io_handle_initialize"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid IO handle value already set.", function ); return( -1 ); } *io_handle = memory_allocate_structure( libpff_io_handle_t ); if( *io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create IO handle.", function ); goto on_error; } if( memory_set( *io_handle, 0, sizeof( libpff_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); goto on_error; } ( *io_handle )->ascii_codepage = LIBPFF_CODEPAGE_WINDOWS_1252; return( 1 ); on_error: if( *io_handle != NULL ) { memory_free( *io_handle ); *io_handle = NULL; } return( -1 ); } /* Frees an IO handle * Returns 1 if successful or -1 on error */ int libpff_io_handle_free( libpff_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libpff_io_handle_free"; int result = 1; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { if( ( *io_handle )->index_nodes_vector != NULL ) { if( libfdata_vector_free( &( ( *io_handle )->index_nodes_vector ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index nodes vector.", function ); result = -1; } } if( ( *io_handle )->index_nodes_cache != NULL ) { if( libfcache_cache_free( &( ( *io_handle )->index_nodes_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index nodes cache.", function ); result = -1; } } if( ( *io_handle )->descriptor_index_tree != NULL ) { if( libfdata_tree_free( &( ( *io_handle )->descriptor_index_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free descriptor index tree.", function ); result = -1; } } if( ( *io_handle )->offset_index_tree != NULL ) { if( libfdata_tree_free( &( ( *io_handle )->offset_index_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free offset index tree.", function ); result = -1; } } if( ( *io_handle )->recovered_descriptor_index_tree != NULL ) { if( libfdata_tree_free( &( ( *io_handle )->recovered_descriptor_index_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free recovered descriptor index tree.", function ); result = -1; } } if( ( *io_handle )->recovered_offset_index_tree != NULL ) { if( libfdata_tree_free( &( ( *io_handle )->recovered_offset_index_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free recovered offset index tree.", function ); result = -1; } } if( ( *io_handle )->descriptor_index_tree_cache != NULL ) { if( libfcache_cache_free( &( ( *io_handle )->descriptor_index_tree_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free descriptor index tree cache.", function ); result = -1; } } if( ( *io_handle )->offset_index_tree_cache != NULL ) { if( libfcache_cache_free( &( ( *io_handle )->offset_index_tree_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free offset index tree cache.", function ); result = -1; } } memory_free( *io_handle ); *io_handle = NULL; } return( result ); } /* Reads the file header * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_file_header( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, int *file_content_type, libcerror_error_t **error ) { libpff_index_t *descriptor_index = NULL; libpff_index_t *offset_index = NULL; uint8_t *file_header = NULL; uint8_t *file_header_data = NULL; static char *function = "libpff_io_handle_read_file_header"; size_t data_size = 564; size_t read_size = 564; ssize_t read_count = 0; uint64_t descriptor_index_back_pointer = 0; uint64_t offset_index_back_pointer = 0; uint32_t calculated_crc = 0; uint32_t stored_crc = 0; uint16_t content_type = 0; uint16_t data_version = 0; uint8_t sentinal = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t *value_data = 0; uint64_t value_64bit = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; int value_iterator = 0; #endif if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->descriptor_index_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid IO handle - descriptor index tree value already set.", function ); return( -1 ); } if( io_handle->offset_index_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid IO handle - offset index tree value already set.", function ); return( -1 ); } if( file_content_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file content type.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading file header at offset: 0 (0x00000000)\n", function ); } #endif if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); goto on_error; } file_header = (uint8_t *) memory_allocate( sizeof( uint8_t ) * read_size ); if( file_header == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file header.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, file_header, read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header data.", function ); goto on_error; } file_header_data = &( file_header[ sizeof( pff_file_header_t ) ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file header:\n", function ); libcnotify_print_data( file_header, sizeof( pff_file_header_t ), 0 ); } #endif if( memory_compare( ( (pff_file_header_t *) file_header )->signature, pff_file_signature, 4 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid file signature.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_t *) file_header )->crc, stored_crc ); byte_stream_copy_to_uint16_little_endian( ( (pff_file_header_t *) file_header )->content_type, content_type ); if( content_type == PFF_FILE_HEADER_CONTENT_TYPE_PAB ) { *file_content_type = LIBPFF_FILE_CONTENT_TYPE_PAB; } else if( content_type == PFF_FILE_HEADER_CONTENT_TYPE_PST ) { *file_content_type = LIBPFF_FILE_CONTENT_TYPE_PST; } else if( content_type == PFF_FILE_HEADER_CONTENT_TYPE_OST ) { *file_content_type = LIBPFF_FILE_CONTENT_TYPE_OST; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported content type: 0x%04" PRIx16 ".", function, content_type ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (pff_file_header_t *) file_header )->data_version, data_version ); if( data_version <= 0x000f ) { data_size = sizeof( pff_file_header_data_32bit_t ); io_handle->file_type = LIBPFF_FILE_TYPE_32BIT; } else if( data_version >= 0x0015 ) { data_size = sizeof( pff_file_header_data_64bit_t ); io_handle->file_type = LIBPFF_FILE_TYPE_64BIT; } else { if( ( ( (pff_file_header_data_32bit_t *) file_header_data )->sentinal == 0x80 ) && ( ( (pff_file_header_data_64bit_t *) file_header_data )->sentinal != 0x80 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: detected 32-bit file type for unsupported data version: 0x%04" PRIx16 ".\n", function, data_version ); } #endif data_size = sizeof( pff_file_header_data_32bit_t ); io_handle->file_type = LIBPFF_FILE_TYPE_32BIT; } else if( ( ( (pff_file_header_data_32bit_t *) file_header_data )->sentinal != 0x80 ) && ( ( (pff_file_header_data_64bit_t *) file_header_data )->sentinal == 0x80 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: detected 64-bit file type for unsupported data version: 0x%04" PRIx16 ".\n", function, data_version ); } #endif data_size = sizeof( pff_file_header_data_64bit_t ); io_handle->file_type = LIBPFF_FILE_TYPE_64BIT; } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unsupported data version: 0x%04" PRIx16 ".\n", function, data_version ); } #endif } if( ( io_handle->file_type != LIBPFF_FILE_TYPE_32BIT ) && ( io_handle->file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unable to determine file type.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: signature\t\t\t\t: %c%c%c%c\n", function, ( (pff_file_header_t *) file_header )->signature[ 0 ], ( (pff_file_header_t *) file_header )->signature[ 1 ], ( (pff_file_header_t *) file_header )->signature[ 2 ], ( (pff_file_header_t *) file_header )->signature[ 3 ] ); libcnotify_printf( "%s: crc\t\t\t\t\t: 0x%08" PRIx32 "\n", function, stored_crc ); libcnotify_printf( "%s: content type\t\t\t\t: %c%c\n", function, ( (pff_file_header_t *) file_header )->content_type[ 0 ], ( (pff_file_header_t *) file_header )->content_type[ 1 ] ); libcnotify_printf( "%s: data version\t\t\t\t: %" PRIu16 "\n", function, data_version ); byte_stream_copy_to_uint16_little_endian( ( (pff_file_header_t *) file_header )->content_version, value_16bit ); libcnotify_printf( "%s: content version\t\t\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: creation platform\t\t\t: 0x%02" PRIx8 "\n", function, ( (pff_file_header_t *) file_header )->creation_platform ); libcnotify_printf( "%s: access platform\t\t\t: 0x%02" PRIx8 "\n", function, ( (pff_file_header_t *) file_header )->access_platform ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_t *) file_header )->unknown1, value_32bit ); libcnotify_printf( "%s: unknown1\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_t *) file_header )->unknown2, value_32bit ); libcnotify_printf( "%s: unknown2\t\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, value_32bit, value_32bit ); libcnotify_printf( "\n" ); } #endif if( libfmapi_crc32_weak_calculate( &calculated_crc, &( file_header[ 8 ] ), 471, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to calculate crc.", function ); goto on_error; } if( stored_crc != calculated_crc ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in file header crc ( %" PRIu32 " != %" PRIu32 " ).", function, stored_crc, calculated_crc ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: file header data:\n", function ); libcnotify_print_data( file_header_data, data_size, 0 ); } #endif if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->file_size, io_handle->file_size ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->descriptor_index_back_pointer, descriptor_index_back_pointer ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->descriptor_index_root_node_offset, io_handle->descriptor_index_root_node_offset ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->offset_index_back_pointer, offset_index_back_pointer ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->offset_index_root_node_offset, io_handle->offset_index_root_node_offset ); sentinal = ( (pff_file_header_data_32bit_t *) file_header_data )->sentinal; io_handle->encryption_type = ( (pff_file_header_data_32bit_t *) file_header_data )->encryption_type; } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->file_size, io_handle->file_size ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->descriptor_index_back_pointer, descriptor_index_back_pointer ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->descriptor_index_root_node_offset, io_handle->descriptor_index_root_node_offset ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->offset_index_back_pointer, offset_index_back_pointer ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->offset_index_root_node_offset, io_handle->offset_index_root_node_offset ); sentinal = ( (pff_file_header_data_64bit_t *) file_header_data )->sentinal; io_handle->encryption_type = ( (pff_file_header_data_64bit_t *) file_header_data )->encryption_type; byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->crc, stored_crc ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->next_index_pointer, value_32bit ); libcnotify_printf( "%s: next index pointer\t\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->next_index_back_pointer, value_32bit ); libcnotify_printf( "%s: next index back pointer\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->seed_value, value_32bit ); libcnotify_printf( "%s: seed value\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); value_data = ( (pff_file_header_data_32bit_t *) file_header_data )->descriptor_index_high_water_marks; for( value_iterator = 0; value_iterator < 32; value_iterator++ ) { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); libcnotify_printf( "%s: high water mark: %02d value\t\t: %" PRIu32 "\n", function, value_iterator, value_32bit ); value_data += 4; } libcnotify_printf( "\n" ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { libcnotify_printf( "%s: unknown3:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown3, 8, 0 ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->next_index_back_pointer, value_64bit ); libcnotify_printf( "%s: next index back pointer\t\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->seed_value, value_32bit ); libcnotify_printf( "%s: seed value\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); value_data = ( (pff_file_header_data_64bit_t *) file_header_data )->descriptor_index_high_water_marks; for( value_iterator = 0; value_iterator < 32; value_iterator++ ) { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); libcnotify_printf( "%s: high water mark: %02d value\t\t: %" PRIu32 "\n", function, value_iterator, value_32bit ); value_data += 4; } libcnotify_printf( "\n" ); libcnotify_printf( "%s: unknown4:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown4, 8, 0 ); } libcnotify_printf( "%s: file header data root:\n", function ); if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { libcnotify_printf( "%s: unknown5:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown5, 4, 0 ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { libcnotify_printf( "%s: unknown5:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown5, 4, 0 ); } libcnotify_printf( "%s: file size\t\t\t\t: %" PRIu64 "\n", function, io_handle->file_size ); if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->last_data_allocation_table_offset, value_32bit ); libcnotify_printf( "%s: last data allocation table offset\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->total_available_data_size, value_32bit ); libcnotify_printf( "%s: total available data size\t\t: %" PRIu32 "\n", function, value_32bit ); byte_stream_copy_to_uint32_little_endian( ( (pff_file_header_data_32bit_t *) file_header_data )->total_available_page_size, value_32bit ); libcnotify_printf( "%s: total available page size\t\t: %" PRIu32 "\n", function, value_32bit ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->last_data_allocation_table_offset, value_64bit ); libcnotify_printf( "%s: last data allocation table offset\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->total_available_data_size, value_64bit ); libcnotify_printf( "%s: total available data size\t\t: %" PRIu64 "\n", function, value_64bit ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->total_available_page_size, value_64bit ); libcnotify_printf( "%s: total available page size\t\t: %" PRIu64 "\n", function, value_64bit ); } libcnotify_printf( "%s: descriptor index root node offset\t: %" PRIi64 "\n", function, io_handle->descriptor_index_root_node_offset ); libcnotify_printf( "%s: descriptor index back pointer\t: %" PRIu64 "\n", function, descriptor_index_back_pointer ); libcnotify_printf( "%s: offset index root node offset\t: %" PRIi64 "\n", function, io_handle->offset_index_root_node_offset ); libcnotify_printf( "%s: offset index back pointer\t\t: %" PRIu64 "\n", function, offset_index_back_pointer ); if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { libcnotify_printf( "%s: allocation table validation type\t: 0x%02" PRIx8 "\n", function, ( (pff_file_header_data_32bit_t *) file_header_data )->allocation_table_validation_type ); libcnotify_printf( "%s: unknown6:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown6, 3, 0 ); libcnotify_printf( "%s: initial data free map:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->initial_data_free_map, 128, 0 ); libcnotify_printf( "%s: initial page free map:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->initial_page_free_map, 128, 0 ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { libcnotify_printf( "%s: allocation table validation type\t: 0x%02" PRIx8 "\n", function, ( (pff_file_header_data_64bit_t *) file_header_data )->allocation_table_validation_type ); libcnotify_printf( "%s: unknown6:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown6, 3, 0 ); libcnotify_printf( "%s: unknown7:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown7, 3, 0 ); libcnotify_printf( "%s: initial data free map:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->initial_data_free_map, 128, 0 ); libcnotify_printf( "%s: initial page free map:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->initial_page_free_map, 128, 0 ); } libcnotify_printf( "%s: sentinal\t\t\t\t: 0x%02" PRIx8 "\n", function, sentinal ); libcnotify_printf( "%s: encryption type\t\t\t: 0x%02" PRIx8 "\n", function, io_handle->encryption_type ); if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { libcnotify_printf( "%s: unknown8:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown8, 2, 0 ); libcnotify_printf( "%s: unknown9:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown9, 8, 0 ); libcnotify_printf( "%s: unknown10:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown10, 4, 0 ); libcnotify_printf( "%s: unknown11:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown11, 3, 0 ); libcnotify_printf( "%s: unknown12:\n", function ); libcnotify_print_data( &( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown12 ), 1, 0 ); libcnotify_printf( "%s: unknown13:\n", function ); libcnotify_print_data( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown13, 32, 0 ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { libcnotify_printf( "%s: unknown8:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown8, 2, 0 ); byte_stream_copy_to_uint64_little_endian( ( (pff_file_header_data_64bit_t *) file_header_data )->next_index_pointer, value_32bit ); libcnotify_printf( "%s: next index pointer\t\t\t: %" PRIu64 "\n", function, value_64bit ); libcnotify_printf( "%s: crc\t\t\t\t\t: 0x%08" PRIx64 "\n", function, stored_crc ); libcnotify_printf( "%s: unknown11:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown11, 3, 0 ); libcnotify_printf( "%s: unknown12:\n", function ); libcnotify_print_data( &( ( (pff_file_header_data_32bit_t *) file_header_data )->unknown12 ), 1, 0 ); libcnotify_printf( "%s: unknown13:\n", function ); libcnotify_print_data( ( (pff_file_header_data_64bit_t *) file_header_data )->unknown13, 32, 0 ); } } #endif if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { if( libfmapi_crc32_weak_calculate( &calculated_crc, &( file_header[ 8 ] ), 516, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to calculate crc.", function ); goto on_error; } if( stored_crc != calculated_crc ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in file header crc ( %" PRIu32 " != %" PRIu32 " ).", function, stored_crc, calculated_crc ); goto on_error; } } memory_free( file_header ); file_header = NULL; if( ( io_handle->encryption_type != LIBPFF_ENCRYPTION_TYPE_NONE ) && ( io_handle->encryption_type != LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE ) && ( io_handle->encryption_type != LIBPFF_ENCRYPTION_TYPE_HIGH ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encryption type: 0x%02x", function, io_handle->encryption_type ); goto on_error; } if( io_handle->index_nodes_vector == NULL ) { /* TODO free and clone function ? */ if( libfdata_vector_initialize( &( io_handle->index_nodes_vector ), 512, (intptr_t *) io_handle, NULL, NULL, &libpff_io_handle_read_index_node, LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index nodes vector.", function ); goto on_error; } if( libfdata_vector_append_segment( io_handle->index_nodes_vector, 0, io_handle->file_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to create append segment to nodes vector.", function ); goto on_error; } } if( io_handle->index_nodes_cache == NULL ) { if( libfcache_cache_initialize( &( io_handle->index_nodes_cache ), LIBPFF_MAXIMUM_CACHE_ENTRIES_INDEX_NODES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index nodes cache.", function ); goto on_error; } } /* Create the descriptor index tree */ if( libpff_index_initialize( &descriptor_index, io_handle, LIBPFF_INDEX_TYPE_DESCRIPTOR, io_handle->descriptor_index_root_node_offset, descriptor_index_back_pointer, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor index.", function ); goto on_error; } if( libfdata_tree_initialize( &( io_handle->descriptor_index_tree ), (intptr_t *) descriptor_index, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_index_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_index_clone, &libpff_index_read_node_data, &libpff_index_read_sub_nodes, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor index tree", function ); goto on_error; } descriptor_index = NULL; /* Point the root node data offset to LIBPFF_IO_HANDLE_DESCRIPTOR_INDEX_TREE_ROOT_OFFSET * otherwise it will mess up the caching of the first index value */ if( libfdata_tree_set_root_node( io_handle->descriptor_index_tree, LIBPFF_IO_HANDLE_DESCRIPTOR_INDEX_TREE_ROOT_OFFSET, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set descriptor index tree root node.", function ); goto on_error; } if( io_handle->descriptor_index_tree_cache == NULL ) { if( libfcache_cache_initialize( &( io_handle->descriptor_index_tree_cache ), LIBPFF_MAXIMUM_CACHE_ENTRIES_DESCRIPTOR_INDEX_VALUES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor index tree cache.", function ); goto on_error; } } /* Create the offset index tree */ if( libpff_index_initialize( &offset_index, io_handle, LIBPFF_INDEX_TYPE_OFFSET, io_handle->offset_index_root_node_offset, offset_index_back_pointer, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create offset index.", function ); goto on_error; } if( libfdata_tree_initialize( &( io_handle->offset_index_tree ), (intptr_t *) offset_index, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_index_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_index_clone, &libpff_index_read_node_data, &libpff_index_read_sub_nodes, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create offset index tree", function ); goto on_error; } offset_index = NULL; /* Point the root node data offset to LIBPFF_IO_HANDLE_OFFSET_INDEX_TREE_ROOT_OFFSET * otherwise it will mess up the caching of the first index value */ if( libfdata_tree_set_root_node( io_handle->offset_index_tree, LIBPFF_IO_HANDLE_OFFSET_INDEX_TREE_ROOT_OFFSET, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set offset index tree root node.", function ); goto on_error; } if( io_handle->offset_index_tree_cache == NULL ) { if( libfcache_cache_initialize( &( io_handle->offset_index_tree_cache ), LIBPFF_MAXIMUM_CACHE_ENTRIES_OFFSET_INDEX_VALUES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create offset index tree cache.", function ); goto on_error; } } return( 1 ); on_error: if( offset_index != NULL ) { libpff_index_free( &offset_index, NULL ); } if( descriptor_index != NULL ) { libpff_index_free( &descriptor_index, NULL ); } if( file_header != NULL ) { memory_free( file_header ); } return( -1 ); } /* Reads the unallocated data blocks * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_unallocated_data_blocks( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, libcerror_error_t **error ) { static char *function = "libpff_io_handle_read_unallocated_data_blocks"; off64_t allocation_table_offset = 0; size64_t allocation_block_size = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } allocation_table_offset = 0x4400; allocation_block_size = 496 * 512; while( allocation_table_offset < (off64_t) io_handle->file_size ) { if( libpff_allocation_table_read( unallocated_data_block_list, file_io_handle, allocation_table_offset, (int) io_handle->file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read allocation table at offset: %" PRIi64 ".", function, allocation_table_offset ); return( -1 ); } allocation_table_offset += allocation_block_size; } return( 1 ); } /* Reads the unallocated page blocks * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_unallocated_page_blocks( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_page_block_list, libcerror_error_t **error ) { static char *function = "libpff_io_handle_read_unallocated_page_blocks"; off64_t allocation_table_offset = 0; size64_t allocation_block_size = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } allocation_table_offset = 0x4600; allocation_block_size = 496 * 4096; while( allocation_table_offset < (off64_t) io_handle->file_size ) { if( libpff_allocation_table_read( unallocated_page_block_list, file_io_handle, allocation_table_offset, (int) io_handle->file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read allocation table at offset: %" PRIi64 ".", function, allocation_table_offset ); return( -1 ); } allocation_table_offset += allocation_block_size; } return( 1 ); } /* Creates an item tree from the descriptor index * Returns 1 if successful, 0 if the item tree could not be created or -1 on error */ int libpff_io_handle_create_item_tree( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_tree_node_t **item_tree_root_node, libpff_list_t *orphan_node_list, libpff_tree_node_t **root_folder_item_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *descriptor_index_tree_root_node = NULL; libpff_item_descriptor_t *item_descriptor = NULL; static char *function = "libpff_io_handle_create_item_tree"; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( item_tree_root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree root node.", function ); return( -1 ); } if( *item_tree_root_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: item tree root node already set.", function ); return( -1 ); } if( libfdata_tree_get_root_node( io_handle->descriptor_index_tree, &descriptor_index_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to retrieve descriptor index tree root node.", function ); return( -1 ); } if( libpff_item_descriptor_initialize( &item_descriptor, 0, 0, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item descriptor.", function ); return( -1 ); } if( libpff_tree_node_initialize( item_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item tree root node.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } if( libpff_tree_node_set_value( *item_tree_root_node, (intptr_t *) item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set item descriptor in item tree root node.", function ); libpff_tree_node_free( item_tree_root_node, NULL, NULL ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } result = libpff_item_tree_create_node( *item_tree_root_node, file_io_handle, io_handle->descriptor_index_tree, descriptor_index_tree_root_node, io_handle->descriptor_index_tree_cache, orphan_node_list, root_folder_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item tree.", function ); libpff_tree_node_free( item_tree_root_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, NULL ); return( -1 ); } return( result ); } /* Reads an index node * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_index_node( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, off64_t element_data_offset, size64_t element_data_size LIBPFF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBPFF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libpff_index_node_t *index_node = NULL; static char *function = "libpff_io_handle_read_index_node"; LIBPFF_UNREFERENCED_PARAMETER( element_data_size ) LIBPFF_UNREFERENCED_PARAMETER( read_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } /* TODO check if element data size matches index node size * remove LIBPFF_ATTRIBUTE_UNUSED, LIBPFF_UNREFERENCED_PARAMETER */ if( libpff_index_node_initialize( &index_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index node.", function ); return( -1 ); } if( libpff_index_node_read( index_node, file_io_handle, element_data_offset, ( (libpff_io_handle_t *) io_handle )->file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read index node at offset: %" PRIi64 ".", function, element_data_offset ); libpff_index_node_free( &index_node, NULL ); return( -1 ); } if( libfdata_vector_set_element_value_by_index( vector, cache, element_index, (intptr_t *) index_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_index_node_free, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set index node as element value.", function ); libpff_index_node_free( &index_node, NULL ); return( -1 ); } return( 1 ); } /* Reads a local descriptor node * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_local_descriptor_node( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags LIBPFF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBPFF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libpff_local_descriptor_node_t *local_descriptor_node = NULL; static char *function = "libpff_io_handle_read_local_descriptor_node"; LIBPFF_UNREFERENCED_PARAMETER( element_data_flags ) LIBPFF_UNREFERENCED_PARAMETER( read_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( element_data_size > (size64_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: element data size value exceeds maximum.", function ); return( -1 ); } if( libpff_local_descriptor_node_initialize( &local_descriptor_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptor node.", function ); return( -1 ); } if( libpff_local_descriptor_node_read( local_descriptor_node, file_io_handle, element_data_offset, (size32_t) element_data_size, ( (libpff_io_handle_t *) io_handle )->file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptor node at offset: %" PRIi64 ".", function, element_data_offset ); libpff_local_descriptor_node_free( &local_descriptor_node, NULL ); return( -1 ); } if( libfdata_list_element_set_element_value( list_element, cache, (intptr_t *) local_descriptor_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_local_descriptor_node_free, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set local descriptor node as element value.", function ); libpff_local_descriptor_node_free( &local_descriptor_node, NULL ); return( -1 ); } return( 1 ); } /* Retrieves a descriptor index value for a specific identifier * Returns 1 if successful, 0 if no index value was found or -1 on error */ int libpff_io_handle_get_descriptor_index_value_by_identifier( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, uint8_t recovered, libpff_index_value_t **descriptor_index_value, libcerror_error_t **error ) { static char *function = "libpff_io_handle_get_descriptor_index_value_by_identifier"; int number_of_index_values = 0; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( recovered == 0 ) { result = libpff_index_tree_get_value_by_identifier( io_handle->descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, descriptor_identifier, 0, descriptor_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value: %" PRIu32 ".", function, descriptor_identifier ); return( -1 ); } } else { if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, descriptor_identifier, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered descriptor index values for identifier: %" PRIu32 ".", function, descriptor_identifier ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) fprintf( stderr, "NRDIV: %d\n", number_of_index_values ); #endif /* TODO is it necessary to lookup removed descriptors with a value index > 0 ? */ result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, descriptor_identifier, 0, descriptor_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered descriptor index value: %" PRIu32 ".", function, descriptor_identifier ); return( -1 ); } } return( result ); } /* Retrieves an offset index value for a specific identifier * Returns 1 if successful, 0 if no index value was found or -1 on error */ int libpff_io_handle_get_offset_index_value_by_identifier( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint64_t data_identifier, uint8_t recovered, int recovered_value_index, libpff_index_value_t **offset_index_value, libcerror_error_t **error ) { static char *function = "libpff_io_handle_get_offset_index_value_by_identifier"; int number_of_index_values = 0; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( recovered == 0 ) { result = libpff_index_tree_get_value_by_identifier( io_handle->offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, 0, offset_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find offset index value identifier: %" PRIu64 ".", function, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); return( -1 ); } } else { if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered offset index values for identifier: %" PRIu64 ".", function, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); return( -1 ); } if( number_of_index_values <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: no recovered offset index values for identifier: %" PRIu64 ".", function, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); return( -1 ); } if( ( recovered_value_index < 0 ) || ( recovered_value_index >= number_of_index_values ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid recovered value index value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) fprintf( stderr, "NROIV: %d\n", number_of_index_values ); #endif result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, recovered_value_index, offset_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find recovered offset index value identifier: %" PRIu64 ".", function, data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); return( -1 ); } } return( result ); } /* Reads the local descriptors of a descriptor * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_descriptor_local_descriptors_tree( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint64_t local_descriptors_identifier, uint8_t recovered, int recovered_value_index, libfdata_tree_t **local_descriptors_tree, libcerror_error_t **error ) { libpff_index_value_t *offset_index_value = NULL; libpff_local_descriptors_t *local_descriptors = NULL; static char *function = "libpff_io_handle_read_descriptor_local_descriptors_tree"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( local_descriptors_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptors tree.", function ); return( -1 ); } if( *local_descriptors_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: local descriptors tree already set.", function ); return( -1 ); } if( libpff_io_handle_get_offset_index_value_by_identifier( io_handle, file_io_handle, local_descriptors_identifier, recovered, recovered_value_index, &offset_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find offset index value identifier: %" PRIu64 ".", function, local_descriptors_identifier ); return( -1 ); } if( offset_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid offset index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, offset_index_value->identifier, ( ( offset_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), offset_index_value->file_offset, offset_index_value->data_size ); } #endif /* Create the local descriptors tree */ if( libpff_local_descriptors_initialize( &local_descriptors, io_handle, offset_index_value->file_offset, offset_index_value->data_size, recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptors.", function ); return( -1 ); } if( libfdata_tree_initialize( local_descriptors_tree, (intptr_t *) local_descriptors, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_local_descriptors_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_local_descriptors_clone, &libpff_local_descriptors_read_node_data, &libpff_local_descriptors_read_sub_nodes, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptors tree", function ); libpff_local_descriptors_free( &local_descriptors, NULL ); return( -1 ); } /* Point the root node data offset to 0 * otherwise it will mess up the caching of the first local descriptors value */ if( libfdata_tree_set_root_node( *local_descriptors_tree, 0, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set local descriptors tree root node.", function ); libfdata_tree_free( local_descriptors_tree, NULL ); return( -1 ); } return( 1 ); } /* Reads the data block of a descriptor * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_descriptor_data_block( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, uint64_t data_identifier, uint8_t recovered, int recovered_value_index, libfdata_block_t **descriptor_data_block, libfcache_cache_t **descriptor_data_cache, libcerror_error_t **error ) { libpff_data_array_t *data_array = NULL; libpff_data_block_t *data_block = NULL; libpff_index_value_t *offset_index_value = NULL; uint8_t *data_buffer = NULL; static char *function = "libpff_io_handle_read_descriptor_data_block"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( descriptor_data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor data block.", function ); return( -1 ); } if( *descriptor_data_block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: descriptor data block already set.", function ); return( -1 ); } if( descriptor_data_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor data cache.", function ); return( -1 ); } if( *descriptor_data_cache != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: descriptor data cache already set.", function ); return( -1 ); } if( libpff_io_handle_get_offset_index_value_by_identifier( io_handle, file_io_handle, data_identifier, recovered, recovered_value_index, &offset_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find offset index value identifier: %" PRIu64 ".", function, data_identifier ); return( -1 ); } if( offset_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid offset index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, offset_index_value->identifier, ( ( offset_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), offset_index_value->file_offset, offset_index_value->data_size ); } #endif if( offset_index_value->file_offset <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid offset index value - file offset value out of bounds.", function ); return( -1 ); } if( offset_index_value->data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid offset index value - data size value value out of bounds.", function ); return( -1 ); } #if UINT32_MAX > SSIZE_MAX if( offset_index_value->data_size > (size32_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid offset index value - data size value exceeds maximum.", function ); return( -1 ); } #endif #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading descriptor data at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, offset_index_value->file_offset, offset_index_value->file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, offset_index_value->file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek value offset: %" PRIi64 ".", function, offset_index_value->file_offset ); return( -1 ); } data_buffer = (uint8_t *) memory_allocate( sizeof( uint8_t ) * (size_t) offset_index_value->data_size ); if( data_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data buffer.", function ); return( -1 ); } if( libpff_data_block_initialize( &data_block, descriptor_identifier, data_identifier, io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data block.", function ); goto on_error; } read_count = libpff_data_block_read( file_io_handle, io_handle->file_type, data_identifier, data_buffer, (size_t) offset_index_value->data_size, &( data_block->flags ), error ); if( read_count != (ssize_t) offset_index_value->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data block.", function ); goto on_error; } /* Check if the data block contains a data array * The data array should have the internal flag set in the (data) offset index identifier * The data array starts with 0x01 followed by either 0x01 or 0x02 */ if( ( ( data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) != 0 ) && ( ( data_buffer[ 0 ] == 0x01 ) && ( ( data_buffer[ 1 ] == 0x01 ) || ( data_buffer[ 1 ] == 0x02 ) ) ) ) { if( libpff_data_array_initialize( &data_array, descriptor_identifier, data_identifier, io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data array.", function ); goto on_error; } if( libfdata_block_initialize( descriptor_data_block, (intptr_t *) data_array, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_data_array_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_data_array_clone, &libpff_data_array_read_entry_data, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor data block.", function ); libpff_data_array_free( &data_array, NULL ); goto on_error; } if( libpff_data_array_read( data_array, io_handle, file_io_handle, *descriptor_data_block, recovered, data_buffer, (size_t) offset_index_value->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data array.", function ); goto on_error; } if( libpff_data_block_free( &data_block, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data block.", function ); goto on_error; } data_block = NULL; memory_free( data_buffer ); data_buffer = NULL; if( libfcache_cache_initialize( descriptor_data_cache, LIBPFF_MAXIMUM_CACHE_ENTRIES_DATA_ARRAY, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor data cache.", function ); goto on_error; } } else { if( libpff_data_block_decrypt_data( data_block, io_handle->encryption_type, data_buffer, (size_t) offset_index_value->data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ENCRYPTION, LIBCERROR_ENCRYPTION_ERROR_DECRYPT_FAILED, "%s: unable to decrypt data block data.", function ); goto on_error; } if( libfdata_block_initialize( descriptor_data_block, (intptr_t *) data_block, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_data_block_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_data_block_clone, &libpff_data_block_read_data, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor data block.", function ); goto on_error; } if( libfdata_block_append_segment( *descriptor_data_block, offset_index_value->file_offset, (size64_t) offset_index_value->data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to append data block segment.", function ); goto on_error; } if( libfcache_cache_initialize( descriptor_data_cache, LIBPFF_MAXIMUM_CACHE_ENTRIES_DATA_BLOCK, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create descriptor data cache.", function ); goto on_error; } if( libfdata_block_set_segment_data( *descriptor_data_block, *descriptor_data_cache, 0, data_buffer, (size_t) offset_index_value->data_size, LIBFDATA_SEGMENT_DATA_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data block segment: 0.", function ); goto on_error; } } return( 1 ); on_error: if( descriptor_data_cache != NULL ) { libfcache_cache_free( descriptor_data_cache, NULL ); } if( descriptor_data_block != NULL ) { libfdata_block_free( descriptor_data_block, NULL ); } if( data_block != NULL ) { libpff_data_block_free( &data_block, NULL ); } if( data_buffer != NULL ) { memory_free( data_buffer ); } return( -1 ); } /* Reads the data reference of a descriptor * Returns 1 if successful or -1 on error */ int libpff_io_handle_read_descriptor_data_reference( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, uint64_t data_identifier, uint8_t recovered, int recovered_value_index, libfdata_reference_t **descriptor_data_reference, libfcache_cache_t **descriptor_data_cache, libcerror_error_t **error ) { libfdata_block_t *descriptor_data_block = NULL; static char *function = "libpff_io_handle_read_descriptor_data_reference"; if( libpff_io_handle_read_descriptor_data_block( io_handle, file_io_handle, descriptor_identifier, data_identifier, recovered, recovered_value_index, &descriptor_data_block, descriptor_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor data block.", function ); goto on_error; } if( libfdata_block_reference_initialize( descriptor_data_reference, descriptor_data_block, LIBFDATA_REFERENCE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create block data reference.", function ); goto on_error; } return( 1 ); on_error: if( descriptor_data_cache != NULL ) { libfcache_cache_free( descriptor_data_cache, NULL ); } if( descriptor_data_block != NULL ) { libfdata_block_free( &descriptor_data_block, NULL ); } return( -1 ); } /* Scans for recoverable items * By default only the unallocated space is checked for recoverable items * Returns 1 if successful or -1 on error */ int libpff_io_handle_recover_items( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, libpff_offset_list_t *unallocated_page_block_list, libpff_list_t *recovered_item_list, uint8_t recovery_flags, libcerror_error_t **error ) { libfdata_tree_node_t *recovered_descriptor_index_leaf_node = NULL; libpff_index_t *recovered_descriptor_index = NULL; libpff_index_t *recovered_offset_index = NULL; libpff_index_value_t *descriptor_index_value = NULL; libpff_index_value_t *offset_index_value = NULL; libpff_item_descriptor_t *item_descriptor = NULL; libpff_tree_node_t *item_tree_node = NULL; uint8_t *block_buffer = NULL; static char *function = "libpff_io_handle_recover_items"; ssize_t read_count = 0; uint8_t data_block_read_flags = 0; int data_identifier_value_index = 0; int index_value_iterator = 0; int local_descriptors_identifier_value_index = 0; int number_of_index_values = 0; int number_of_recovered_descriptor_index_values = 0; int recovered_descriptor_index_value_iterator = 0; int recoverable = 0; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( ( io_handle->file_type != LIBPFF_FILE_TYPE_32BIT ) && ( io_handle->file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( recovered_item_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid recovered item list.", function ); return( -1 ); } if( io_handle->recovered_descriptor_index_tree == NULL ) { /* Create the recovered descriptor index tree */ if( libpff_index_initialize( &recovered_descriptor_index, io_handle, LIBPFF_INDEX_TYPE_DESCRIPTOR, 0, 0, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recovered descriptor index.", function ); return( -1 ); } if( libfdata_tree_initialize( &( io_handle->recovered_descriptor_index_tree ), (intptr_t *) recovered_descriptor_index, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_index_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_index_clone, &libpff_index_read_node_data, &libpff_index_read_sub_nodes, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recovered descriptor index tree", function ); libpff_index_free( &recovered_descriptor_index, NULL ); return( -1 ); } /* Point the root node data offset to LIBPFF_IO_HANDLE_RECOVERED_DESCRIPTOR_INDEX_TREE_ROOT_OFFSET * otherwise it will mess up the caching of the first index value */ if( libfdata_tree_set_root_node( io_handle->recovered_descriptor_index_tree, LIBPFF_IO_HANDLE_RECOVERED_DESCRIPTOR_INDEX_TREE_ROOT_OFFSET, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set recovered index index tree root node.", function ); libfdata_tree_free( &( io_handle->recovered_descriptor_index_tree ), NULL ); return( -1 ); } } if( io_handle->recovered_offset_index_tree == NULL ) { /* Create the recovered offset index tree */ if( libpff_index_initialize( &recovered_offset_index, io_handle, LIBPFF_INDEX_TYPE_OFFSET, 0, 0, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recovered offset index.", function ); return( -1 ); } if( libfdata_tree_initialize( &( io_handle->recovered_offset_index_tree ), (intptr_t *) recovered_offset_index, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_index_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_index_clone, &libpff_index_read_node_data, &libpff_index_read_sub_nodes, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recovered offset index tree", function ); libpff_index_free( &recovered_offset_index, NULL ); return( -1 ); } /* Point the root node data offset to LIBPFF_IO_HANDLE_RECOVERED_OFFSET_INDEX_TREE_ROOT_OFFSET * otherwise it will mess up the caching of the first index value */ if( libfdata_tree_set_root_node( io_handle->recovered_offset_index_tree, LIBPFF_IO_HANDLE_RECOVERED_OFFSET_INDEX_TREE_ROOT_OFFSET, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set recovered offset index tree root node.", function ); libfdata_tree_free( &( io_handle->recovered_offset_index_tree ), NULL ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libbfio_handle_set_track_offsets_read( file_io_handle, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set track offsets read in file IO handle.", function ); return( -1 ); } #endif if( libpff_io_handle_recover_index_nodes( io_handle, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to recover index nodes.", function ); return( -1 ); } if( libpff_io_handle_recover_data_blocks( io_handle, file_io_handle, unallocated_data_block_list, unallocated_page_block_list, recovery_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to recover data blocks.", function ); return( -1 ); } block_buffer = (uint8_t *) memory_allocate( sizeof( uint8_t ) * 8192 ); if( block_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block buffer.", function ); return( -1 ); } /* For the recovered descriptor index nodes check * if the local descriptor and data offset index value still exists */ if( libfdata_tree_get_number_of_leaf_nodes( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, &number_of_recovered_descriptor_index_values, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered descriptor index values.", function ); memory_free( block_buffer ); return( -1 ); } for( recovered_descriptor_index_value_iterator = 0; recovered_descriptor_index_value_iterator < number_of_recovered_descriptor_index_values; recovered_descriptor_index_value_iterator++ ) { if( io_handle->abort != 0 ) { memory_free( block_buffer ); return( -1 ); } if( libfdata_tree_get_leaf_node_by_index( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, recovered_descriptor_index_value_iterator, &recovered_descriptor_index_leaf_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to retrieve recovered descriptor leaf node: %d.", function, recovered_descriptor_index_value_iterator ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } if( libfdata_tree_node_get_node_value( recovered_descriptor_index_leaf_node, file_io_handle, io_handle->descriptor_index_tree_cache, (intptr_t **) &descriptor_index_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to retrieve recovered descriptor index value: %d.", function, recovered_descriptor_index_value_iterator ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } if( descriptor_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing descriptor index value: %d.", function, recovered_descriptor_index_value_iterator ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: analyzing identifier: %" PRIu64 ", data: %" PRIu64 ", local descriptors: %" PRIu64 ", parent: %" PRIu32 "\n", function, descriptor_index_value->identifier, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, descriptor_index_value->parent_identifier ); } #endif recoverable = 1; /* Check if the data identifier is recoverable */ if( recoverable != 0 ) { if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, descriptor_index_value->data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered offset index values for data identifier: %" PRIu64 ".", function, descriptor_index_value->data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } /* TODO what if more than 1 identifier is recoverable ? now uses first come first serve */ result = 0; for( index_value_iterator = 0; index_value_iterator < number_of_index_values; index_value_iterator++ ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, descriptor_index_value->data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, index_value_iterator, &offset_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered offset index value for data identifier: %" PRIu64 ".", function, descriptor_index_value->data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } else if( result != 0 ) { /* Check if the data block is readable */ if( libbfio_handle_seek_offset( file_io_handle, offset_index_value->file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek data block offset: %" PRIi64 ".", function, offset_index_value->file_offset ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } data_block_read_flags = 0; read_count = libpff_data_block_read( file_io_handle, io_handle->file_type, offset_index_value->identifier, block_buffer, offset_index_value->data_size, &data_block_read_flags, error ); if( read_count != (ssize_t) offset_index_value->data_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); /* TODO delete unreadable offset identifier in io_handle->recovered_offset_index_tree */ } else { break; } result = 0; } } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: recovered offset index value for data identifier: %" PRIu64 " not available.\n", function, descriptor_index_value->data_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); } #endif recoverable = 0; } else { data_identifier_value_index = index_value_iterator; } } /* Check if the local descriptors are also recoverable */ if( recoverable != 0 ) { /* Allow desciptors to have a zero local descriptors value */ if( descriptor_index_value->local_descriptors_identifier > 0 ) { if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, descriptor_index_value->local_descriptors_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered offset index values for local descriptors identifier: %" PRIu64 ".", function, descriptor_index_value->local_descriptors_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } /* TODO what if more than 1 identifier is recoverable ? now uses first come first serve */ result = 0; for( index_value_iterator = 0; index_value_iterator < number_of_index_values; index_value_iterator++ ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, descriptor_index_value->local_descriptors_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK, index_value_iterator, &offset_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered offset index value for local descriptors identifier: %" PRIu64 ".", function, descriptor_index_value->local_descriptors_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } else if( result != 0 ) { /* Check if local descriptors are readable */ result = libpff_io_handle_recover_local_descriptors( io_handle, file_io_handle, descriptor_index_value->local_descriptors_identifier, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptors with identifier: %" PRIu64 ".", function, descriptor_index_value->local_descriptors_identifier ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } else if( result != 0 ) { break; } } } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: recovered offset index value for local descriptors identifier: %" PRIu64 " not available.\n", function, descriptor_index_value->local_descriptors_identifier & (uint64_t) LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK ); } #endif recoverable = 0; } if( recoverable != 0 ) { local_descriptors_identifier_value_index = index_value_iterator; } } } if( recoverable == 0 ) { if( libfdata_tree_node_set_deleted( recovered_descriptor_index_leaf_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set deleted in recovered index tree leaf node: %d.", function, recovered_descriptor_index_value_iterator ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } number_of_recovered_descriptor_index_values--; recovered_descriptor_index_value_iterator--; } else { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: item descriptor: %" PRIu64 " is recoverable.\n", function, descriptor_index_value->identifier ); } #endif /* Create a new item descriptor */ if( libpff_item_descriptor_initialize( &item_descriptor, (uint32_t) descriptor_index_value->identifier, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item descriptor.", function ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } if( item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing item descriptor.", function ); return( -1 ); } /* TODO add to initialize function or create a separate function for setting these value in the item descriptor */ item_descriptor->recovered_data_identifier_value_index = data_identifier_value_index; item_descriptor->recovered_local_descriptors_identifier_value_index = local_descriptors_identifier_value_index; /* Create a new tree node with item tree values */ if( libpff_tree_node_initialize( &item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item tree node.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } if( libpff_tree_node_set_value( item_tree_node, (intptr_t *) item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set item descriptor in item tree node.", function ); libpff_tree_node_free( &item_tree_node, NULL, NULL ); libpff_item_descriptor_free( &item_descriptor, NULL ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } item_descriptor = NULL; if( libpff_list_append_value( recovered_item_list, (intptr_t *) item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append tree node to recovered item list.", function ); libpff_tree_node_free( &item_tree_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, NULL ); libpff_list_empty( recovered_item_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, NULL ); memory_free( block_buffer ); return( -1 ); } item_tree_node = NULL; } } memory_free( block_buffer ); #if defined( HAVE_DEBUG_OUTPUT ) if( libbfio_handle_set_track_offsets_read( file_io_handle, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set track offsets read in file IO handle.", function ); return( -1 ); } #endif /* TODO * link recovered descriptors to parent? and add to item hierarchy? * handle scanning without index data * what about 'encryption' ? */ return( 1 ); } /* Scans for recoverable index nodes * Returns 1 if successful or -1 on error */ int libpff_io_handle_recover_index_nodes( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfdata_tree_node_t *deleted_index_leaf_node = NULL; libpff_index_value_t *deleted_index_value = NULL; libpff_index_value_t *index_value = NULL; static char *function = "libpff_io_handle_recover_index_nodes"; off64_t node_data_offset = 0; size64_t node_data_size = 0; uint32_t node_data_flags = 0; int deleted_index_value_iterator = 0; int index_value_iterator = 0; int number_of_index_values = 0; int number_of_deleted_index_values = 0; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } /* Scan the existing descriptor index nodes for remnant values */ if( libfdata_tree_get_number_of_deleted_leaf_nodes( io_handle->descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, &number_of_deleted_index_values, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted descriptor index values.", function ); return( -1 ); } for( deleted_index_value_iterator = 0; deleted_index_value_iterator < number_of_deleted_index_values; deleted_index_value_iterator++ ) { if( io_handle->abort != 0 ) { return( -1 ); } if( libfdata_tree_get_deleted_leaf_node_by_index( io_handle->descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, deleted_index_value_iterator, &deleted_index_leaf_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to retrieve deleted descriptor leaf node: %d.", function, deleted_index_value_iterator ); return( -1 ); } if( libfdata_tree_node_get_node_value( deleted_index_leaf_node, file_io_handle, io_handle->descriptor_index_tree_cache, (intptr_t **) &deleted_index_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to retrieve deleted descriptor index value: %d.", function, deleted_index_value_iterator ); return( -1 ); } if( deleted_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing deleted descriptor index value: %d.", function, deleted_index_value_iterator ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: analyzing identifier: %" PRIu64 ", data: %" PRIu64 ", local descriptors: %" PRIu64 ", parent: %" PRIu32 "\n", function, deleted_index_value->identifier, deleted_index_value->data_identifier, deleted_index_value->local_descriptors_identifier, deleted_index_value->parent_identifier ); } #endif /* Check if the item value matches the existing item value */ result = libpff_index_tree_get_value_by_identifier( io_handle->descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, deleted_index_value->identifier, 0, &index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value for identifier: %" PRIu64 ".", function, deleted_index_value->identifier ); return( -1 ); } else if( result != 0 ) { /* TODO what about parent changes ? */ if( ( deleted_index_value->data_identifier == index_value->data_identifier ) && ( deleted_index_value->local_descriptors_identifier == index_value->local_descriptors_identifier ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: deleted descriptor index value: %" PRIu64 " matches existing item value.\n", function, deleted_index_value->identifier ); } #endif continue; } } /* Check for duplicates */ if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, deleted_index_value->identifier, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered descriptor index values for identifier: %" PRIu64 ".", function, deleted_index_value->identifier ); return( -1 ); } result = 0; for( index_value_iterator = 0; index_value_iterator < number_of_index_values; index_value_iterator++ ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, deleted_index_value->identifier, index_value_iterator, &index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered descriptor index value for identifier: %" PRIu64 ".", function, deleted_index_value->identifier ); return( -1 ); } else if( result != 0 ) { /* TODO what about parent changes ? */ if( ( deleted_index_value->data_identifier == index_value->data_identifier ) && ( deleted_index_value->local_descriptors_identifier == index_value->local_descriptors_identifier ) ) { break; } result = 0; } } if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: deleted descriptor index value: %" PRIu64 " matches existing recovered item value.\n", function, deleted_index_value->identifier ); } #endif continue; } /* Add the recovered descriptor index values to the index tree */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: decriptor index value: %d identifier: %" PRIu64 " is recoverable.\n", function, deleted_index_value_iterator, deleted_index_value->identifier ); } #endif if( libfdata_tree_node_get_data_range( deleted_index_leaf_node, &node_data_offset, &node_data_size, &node_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve deleted descriptor leaf node: %d range.", function, deleted_index_value_iterator ); return( -1 ); } if( libpff_index_tree_insert_value( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, deleted_index_value->identifier, node_data_offset, node_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert descriptor index value: %" PRIu64 " to recovered index tree.", function, deleted_index_value->identifier ); return( -1 ); } } #ifdef TODO fprintf( stderr, "O:\n" ); /* Scan the existing offset index nodes for remnant values */ if( libfdata_tree_get_number_of_deleted_leaf_nodes( io_handle->offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, &number_of_deleted_index_values, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted offset index values.", function ); return( -1 ); } for( deleted_index_value_iterator = 0; deleted_index_value_iterator < number_of_deleted_index_values; deleted_index_value_iterator++ ) { if( io_handle->abort != 0 ) { return( -1 ); } fprintf( stderr, "O: %d out of %d\n", deleted_index_value_iterator, number_of_deleted_index_values ); if( libfdata_tree_get_deleted_leaf_node_by_index( io_handle->offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, deleted_index_value_iterator, &deleted_index_leaf_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to retrieve deleted offset leaf node: %d.", function, deleted_index_value_iterator ); return( -1 ); } if( libfdata_tree_node_get_node_value( deleted_index_leaf_node, file_io_handle, io_handle->offset_index_tree_cache, (intptr_t **) &deleted_index_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to retrieve deleted offset index value: %d.", function, deleted_index_value_iterator ); return( -1 ); } if( deleted_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing deleted offset index value: %d.", function, deleted_index_value_iterator ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: analyzing identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, deleted_index_value->identifier, ( ( deleted_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), deleted_index_value->file_offset, deleted_index_value->data_size ); } #endif /* Ignore index values without a valid file offset */ if( deleted_index_value->file_offset <= 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: deleted offset index value: %" PRIu64 " has an invalid file offset: %" PRIi64 ".\n", function, deleted_index_value->identifier, deleted_index_value->file_offset ); } #endif continue; } /* Ignore index values without a valid data size */ if( ( deleted_index_value->data_size == 0 ) || ( deleted_index_value->data_size > 8192 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: deleted offset index value: %" PRIu64 " has an invalid data size: %" PRIu32 ".\n", function, deleted_index_value->identifier, deleted_index_value->data_size ); } #endif continue; } /* Check if the item value matches the existing item value */ result = libpff_index_tree_get_value_by_identifier( io_handle->offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, deleted_index_value->identifier, 0, &index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset index value for identifier: %" PRIu64 ".", function, deleted_index_value->identifier ); return( -1 ); } else if( result != 0 ) { if( ( deleted_index_value->file_offset == index_value->file_offset ) && ( deleted_index_value->data_size == index_value->data_size ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: deleted offset index value: %" PRIu64 " matches existing item value.\n", function, deleted_index_value->identifier ); } #endif continue; } } /* Check for duplicates */ if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, deleted_index_value->identifier, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered offset index values for identifier: %" PRIu64 ".", function, deleted_index_value->identifier ); return( -1 ); } result = 0; for( index_value_iterator = 0; index_value_iterator < number_of_index_values; index_value_iterator++ ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, deleted_index_value->identifier, index_value_iterator, &index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered offset index value for identifier: %" PRIu64 ".", function, deleted_index_value->identifier ); return( -1 ); } else if( result != 0 ) { if( ( deleted_index_value->file_offset == index_value->file_offset ) && ( deleted_index_value->data_size == index_value->data_size ) ) { break; } result = 0; } } if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: deleted offset index value: %" PRIu64 " matches existing recovered item value.\n", function, deleted_index_value->identifier ); } #endif continue; } /* Add the recovered offset index values to the index tree */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: offset index value: %d identifier: %" PRIu64 " is recoverable.\n", function, deleted_index_value_iterator, deleted_index_value->identifier ); } #endif if( libfdata_tree_node_get_data_range( deleted_index_leaf_node, &node_data_offset, &node_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve deleted offset leaf node: %d range.", function, deleted_index_value_iterator ); return( -1 ); } if( libpff_index_tree_insert_value( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, deleted_index_value->identifier, node_data_offset, node_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert offset index value: %" PRIu64 " to recovered index tree.", function, deleted_index_value->identifier ); return( -1 ); } } #endif return( 1 ); } /* Scans for recoverable data blocks * Returns 1 if successful or -1 on error */ int libpff_io_handle_recover_data_blocks( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, libpff_offset_list_t *unallocated_page_block_list, uint8_t recovery_flags, libcerror_error_t **error ) { libpff_index_value_t *index_value = NULL; libpff_list_element_t *unallocated_data_block_list_element = NULL; libpff_list_element_t *unallocated_page_block_list_element = NULL; uint8_t *block_buffer = NULL; uint8_t *data_block_footer = NULL; static char *function = "libpff_io_handle_recover_data_blocks"; off64_t block_buffer_data_offset = 0; off64_t block_offset = 0; off64_t data_block_offset = 0; off64_t page_block_offset = 0; size64_t block_size = 0; size64_t data_block_size = 0; size64_t page_block_size = 0; size_t block_buffer_offset = 0; size_t block_buffer_size_available = 0; size_t data_block_data_offset = 0; size_t read_size = 0; size_t scan_block_size = 0; ssize_t read_count = 0; uint64_t data_block_back_pointer = 0; uint32_t data_block_calculated_crc = 0; uint32_t data_block_stored_crc = 0; uint16_t data_block_data_size = 0; uint8_t supported_recovery_flags = 0; int index_value_iterator = 0; int number_of_index_values = 0; int number_of_unallocated_data_blocks = 0; int number_of_unallocated_page_blocks = 0; int result = 0; int unallocated_data_block_iterator = 0; int unallocated_page_block_iterator = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } supported_recovery_flags = LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA | LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS; if( ( recovery_flags & ~( supported_recovery_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported recovery flags.", function ); return( -1 ); } if( ( recovery_flags & LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ) == 0 ) { if( unallocated_data_block_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid unallocated data block list.", function ); return( -1 ); } if( unallocated_page_block_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid unallocated page block list.", function ); return( -1 ); } } /* Scan the unallocated page block list or all blocks for index nodes */ if( ( recovery_flags & LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ) == 0 ) { if( libpff_offset_list_get_number_of_elements( unallocated_data_block_list, &number_of_unallocated_data_blocks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of unallocated data block list elements.", function ); return( -1 ); } unallocated_data_block_list_element = unallocated_data_block_list->first_element; if( libpff_offset_list_get_number_of_elements( unallocated_page_block_list, &number_of_unallocated_page_blocks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of unallocated page block list elements.", function ); return( -1 ); } unallocated_page_block_list_element = unallocated_page_block_list->first_element; } if( ( recovery_flags & LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS ) == 0 ) { scan_block_size = 512; } else { scan_block_size = 64; } block_buffer = (uint8_t *) memory_allocate( sizeof( uint8_t ) * ( 8192 * 2 ) ); if( block_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block buffer.", function ); return( -1 ); } if( ( number_of_unallocated_data_blocks > 0 ) || ( number_of_unallocated_page_blocks > 0 ) || ( ( recovery_flags & LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ) != 0 ) ) { block_offset = 0; data_block_offset = -1; page_block_offset = -1; while( block_offset < (off64_t) io_handle->file_size ) { if( io_handle->abort != 0 ) { memory_free( block_buffer ); return( -1 ); } if( ( recovery_flags & LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ) == 0 ) { if( data_block_offset < block_offset ) { if( unallocated_data_block_iterator < number_of_unallocated_data_blocks ) { /* Retrieve the next unallocated data range */ if( unallocated_data_block_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for unallocated data block list element: %d.", function, unallocated_data_block_iterator ); memory_free( block_buffer ); return( -1 ); } if( unallocated_data_block_list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset values for unallocate data block list element: %d.", function, unallocated_data_block_iterator ); memory_free( block_buffer ); return( -1 ); } data_block_offset = ( (libpff_offset_list_value_t *) unallocated_data_block_list_element->value )->offset; data_block_size = ( (libpff_offset_list_value_t *) unallocated_data_block_list_element->value )->size; unallocated_data_block_list_element = unallocated_data_block_list_element->next_element; unallocated_data_block_iterator++; } else { data_block_offset = (off64_t) io_handle->file_size; data_block_size = 0; } } if( page_block_offset < block_offset ) { if( unallocated_page_block_iterator < number_of_unallocated_page_blocks ) { /* Retrieve the next unallocated data range */ if( unallocated_page_block_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for unallocated page block list element: %d.", function, unallocated_page_block_iterator ); memory_free( block_buffer ); return( -1 ); } if( unallocated_page_block_list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset values for unallocate page block list element: %d.", function, unallocated_page_block_iterator ); memory_free( block_buffer ); return( -1 ); } page_block_offset = ( (libpff_offset_list_value_t *) unallocated_page_block_list_element->value )->offset; page_block_size = ( (libpff_offset_list_value_t *) unallocated_page_block_list_element->value )->size; unallocated_page_block_list_element = unallocated_page_block_list_element->next_element; unallocated_page_block_iterator++; } else { page_block_offset = (off64_t) io_handle->file_size; page_block_size = 0; } } } if( ( recovery_flags & LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ) == 0 ) { if( ( data_block_offset >= (off64_t) io_handle->file_size ) && ( page_block_offset >= (off64_t) io_handle->file_size ) ) { break; } /* Process the smallest offset */ else if( ( data_block_offset < page_block_offset ) && ( data_block_size > scan_block_size ) ) { block_offset = data_block_offset; block_size = data_block_size; } else if( ( page_block_offset < data_block_offset ) && ( page_block_size > scan_block_size ) ) { block_offset = page_block_offset; block_size = page_block_size; } /* Process the largest range */ else if( data_block_size > page_block_size ) { block_offset = data_block_offset; block_size = data_block_size; } else { block_offset = page_block_offset; block_size = page_block_size; } } else { block_size = scan_block_size; } if( ( block_offset % scan_block_size ) != 0 ) { block_offset = ( ( block_offset / scan_block_size ) + 1 ) * scan_block_size; block_size -= block_size % scan_block_size; } if( block_size < scan_block_size ) { block_offset += block_size; continue; } while( block_size >= scan_block_size ) { /* The index nodes are 512 bytes of size and 512 bytes aligned */ if( ( block_size >= 512 ) && ( ( block_offset % 512 ) == 0 ) ) { /* Scan for index values in the index node */ result = libpff_io_handle_recover_index_values( io_handle, file_io_handle, unallocated_data_block_list, block_offset, recovery_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to recover index node at offset: %" PRIi64 ".\n", function, block_offset ); memory_free( block_buffer ); return( -1 ); } else if( result == 1 ) { block_offset += 512; block_size -= 512; continue; } } if( ( recovery_flags & LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS ) == 0 ) { block_offset += scan_block_size; block_size -= scan_block_size; continue; } /* TODO optimize by minimizing amount of reads */ if( block_buffer_size_available == 0 ) { block_buffer_data_offset = block_offset; if( block_buffer_offset > 0 ) { /* TODO optimize by copying the needed data to the front of the buffer */ block_buffer_data_offset -= 64; block_buffer_offset = 8192 - 64; } read_size = (size_t) block_size; if( read_size > 8192 ) { read_size = 8192; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading data block at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIzd "\n", function, block_buffer_data_offset, block_buffer_data_offset, read_size ); } #endif if( libbfio_handle_seek_offset( file_io_handle, block_buffer_data_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek data block offset: %" PRIi64 ".", function, block_buffer_data_offset ); memory_free( block_buffer ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, &( block_buffer[ block_buffer_offset ] ), read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data block.", function ); memory_free( block_buffer ); return( -1 ); } block_buffer_size_available = read_size; } if( block_buffer_size_available >= 64 ) { /* Scan the block for a data block footer */ data_block_footer = &( block_buffer[ block_buffer_offset ] ); if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { data_block_footer += 64 - sizeof( pff_block_footer_32bit_t ); byte_stream_copy_to_uint16_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->size, data_block_data_size ); byte_stream_copy_to_uint32_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->back_pointer, data_block_back_pointer ); byte_stream_copy_to_uint32_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->crc, data_block_stored_crc ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { data_block_footer += 64 - sizeof( pff_block_footer_64bit_t ); byte_stream_copy_to_uint16_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->size, data_block_data_size ); byte_stream_copy_to_uint32_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->crc, data_block_stored_crc ); byte_stream_copy_to_uint64_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->back_pointer, data_block_back_pointer ); } /* Check if back pointer itself is not empty but the upper 32-bit are */ if( ( data_block_back_pointer != 0 ) && ( ( data_block_back_pointer >> 32 ) == 0 ) ) { data_block_data_offset = block_buffer_offset - ( ( data_block_data_size / 64 ) * 64 ); if( (size_t) data_block_data_size < read_size ) { /* Check for duplicates */ if( libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, data_block_back_pointer, &number_of_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered offset index values for identifier: %" PRIu64 ".", function, data_block_back_pointer ); memory_free( block_buffer ); return( -1 ); } result = 0; for( index_value_iterator = 0; index_value_iterator < number_of_index_values; index_value_iterator++ ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, data_block_back_pointer, index_value_iterator, &index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered offset index value for identifier: %" PRIu64 ".", function, data_block_back_pointer ); memory_free( block_buffer ); return( -1 ); } else if( result != 0 ) { if( ( (off64_t) ( block_buffer_data_offset + data_block_data_offset ) == index_value->file_offset ) && ( (size32_t) data_block_data_size == index_value->data_size ) ) { break; } result = 0; } } if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: recovered data block with identifier: %" PRIu64 " matches existing recovered item value.\n", function, data_block_back_pointer ); } #endif block_offset += 64; block_size -= 64; /* TODO reset block_buffer_offset and block_buffer_size_available ? */ continue; } if( data_block_stored_crc != 0 ) { if( libfmapi_crc32_weak_calculate( &data_block_calculated_crc, &( block_buffer[ data_block_data_offset ] ), data_block_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unable to calculate CRC-32.", function ); memory_free( block_buffer ); return( -1 ); } if( data_block_stored_crc != data_block_calculated_crc ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in data block: %" PRIu64 " CRC-32 ( %" PRIu32 " != %" PRIu32 " ).\n", function, data_block_back_pointer, data_block_stored_crc, data_block_calculated_crc ); } #endif block_offset += 64; block_size -= 64; continue; } } /* TODO consider data block as fragment */ data_block_data_size = ( ( data_block_data_size / 64 ) + 1 ) * 64; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data block back pointer: 0x%08" PRIx64 "\n", function, data_block_back_pointer ); libcnotify_printf( "%s: data block data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIzd "\n", function, block_buffer_data_offset + data_block_data_offset, block_buffer_data_offset + data_block_data_offset, data_block_data_size ); libcnotify_print_data( &( block_buffer[ data_block_data_offset ] ), data_block_data_size, 0 ); } #endif } } block_buffer_offset += 64; block_buffer_size_available -= 64; } else { block_buffer_offset = 0; block_buffer_size_available = 0; } block_offset += scan_block_size; block_size -= scan_block_size; } } } memory_free( block_buffer ); return( 1 ); } /* Scans for recoverable index values in an index node * Returns 1 if successful, returns 0 if no valid index node could be found or -1 on error */ int libpff_io_handle_recover_index_values( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, size64_t node_offset, uint8_t recovery_flags, libcerror_error_t **error ) { libpff_index_value_t *index_value = NULL; libpff_index_node_t *index_node = NULL; uint8_t *node_entry_data = NULL; const char *index_string = NULL; static char *function = "libpff_io_handle_recover_index_values"; off64_t index_value_file_offset = 0; uint64_t index_value_data_identifier = 0; uint64_t index_value_identifier = 0; uint64_t index_value_local_descriptors_identifier = 0; uint16_t index_value_data_size = 0; uint8_t entry_index = 0; int index_value_iterator = 0; int number_of_index_values = 0; int result = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( libpff_index_node_initialize( &index_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index node.", function ); return( -1 ); } if( libpff_index_node_read( index_node, file_io_handle, node_offset, ( (libpff_io_handle_t *) io_handle )->file_type, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); libpff_index_node_free( &index_node, NULL ); return( 0 ); } if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { index_string = "descriptor"; } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { index_string = "offset"; } if( ( index_node->type != LIBPFF_INDEX_TYPE_DESCRIPTOR ) && ( index_node->type != LIBPFF_INDEX_TYPE_OFFSET ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unsupported index type: 0x%02" PRIx8 ".\n", function, index_node->type ); } #endif } else if( index_node->level != PFF_INDEX_NODE_LEVEL_LEAF ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: skipping %s index branch node at level: %" PRIu8 ".\n", function, index_string, index_node->level ); } #endif } else { /* Check if the index leaf entries are recoverable */ for( entry_index = 0; entry_index < index_node->maximum_number_of_entries; entry_index++ ) { if( libpff_index_node_get_entry_data( index_node, entry_index, &node_entry_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node entry: %" PRIu8 " data.", function, entry_index ); libpff_index_node_free( &index_node, NULL ); return( -1 ); } if( node_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node entry: %" PRIu8 " data.", function, entry_index ); libpff_index_node_free( &index_node, NULL ); return( -1 ); } if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, index_value_identifier ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, index_value_identifier ); } /* Ignore the upper 32-bit of descriptor identifiers */ if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { index_value_identifier &= 0xffffffffUL; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: analyzing %s index entry: %" PRIu8 " identifier: %" PRIu64 ".\n", function, index_string, entry_index, index_value_identifier ); } #endif /* Ignore index values without an identifier */ if( index_value_identifier == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " indentifier: %" PRIu64 " has an empty identifier.\n", function, index_string, entry_index, index_value_identifier ); } #endif continue; } if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) node_entry_data )->data_identifier, index_value_data_identifier ); byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) node_entry_data )->local_descriptors_identifier, index_value_local_descriptors_identifier ); } else { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) node_entry_data )->data_identifier, index_value_data_identifier ); byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) node_entry_data )->local_descriptors_identifier, index_value_local_descriptors_identifier ); } } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->file_offset, index_value_file_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_32bit_t *) node_entry_data )->data_size, index_value_data_size ); } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->file_offset, index_value_file_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_64bit_t *) node_entry_data )->data_size, index_value_data_size ); } } if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { /* Ignore descriptor index values without a data identifier */ if( index_value_data_identifier == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " has an empty data identifier.\n", function, index_string, entry_index, index_value_identifier ); } #endif continue; } } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { /* Ignore index values without a valid file offset */ if( index_value_file_offset <= 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " has an invalid file offset: %" PRIi64 ".\n", function, index_string, entry_index, index_value_identifier, index_value_file_offset ); } #endif continue; } /* Ignore index values without a valid data size */ if( ( index_value_data_size == 0 ) || ( index_value_data_size > 8192 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " has an invalid data size: %" PRIu16 ".\n", function, index_string, entry_index, index_value_identifier, index_value_data_size ); } #endif continue; } } /* Check if the recovered item value matches the existing item value */ if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { result = libpff_index_tree_get_value_by_identifier( io_handle->descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, index_value_identifier, 0, &index_value, error ); } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { result = libpff_index_tree_get_value_by_identifier( io_handle->offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, index_value_identifier, 0, &index_value, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve %s index value for identifier: %" PRIu64 ".", function, index_string, index_value_identifier ); return( -1 ); } else if( result != 0 ) { if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { /* TODO what about parent changes ? */ if( ( index_value_data_identifier == index_value->data_identifier ) && ( index_value_local_descriptors_identifier == index_value->local_descriptors_identifier ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: recovered descriptor index value: %" PRIu64 " matches existing item value.\n", function, index_value_identifier ); } #endif continue; } } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { if( ( index_value_file_offset == index_value->file_offset ) && ( (size32_t) index_value_data_size == index_value->data_size ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: recovered offset index value: %" PRIu64 " matches existing item value.\n", function, index_value_identifier ); } #endif continue; } } } /* Check for duplicates */ if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { result = libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, index_value_identifier, &number_of_index_values, error ); } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { result = libpff_index_tree_get_number_of_leaf_nodes_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, index_value_identifier, &number_of_index_values, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered %s index values for identifier: %" PRIu64 ".", function, index_string, index_value_identifier ); return( -1 ); } result = 0; for( index_value_iterator = 0; index_value_iterator < number_of_index_values; index_value_iterator++ ) { if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, index_value_identifier, index_value_iterator, &index_value, error ); } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { result = libpff_index_tree_get_value_by_identifier( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, index_value_identifier, index_value_iterator, &index_value, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered %s index value for identifier: %" PRIu64 ".", function, index_string, index_value_identifier ); return( -1 ); } else if( result != 0 ) { if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { /* TODO what about parent changes ? */ if( ( index_value_data_identifier == index_value->data_identifier ) && ( index_value_local_descriptors_identifier == index_value->local_descriptors_identifier ) ) { break; } } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { if( ( index_value_file_offset == index_value->file_offset ) && ( (size32_t) index_value_data_size == index_value->data_size ) ) { break; } } result = 0; } } if( result != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: recovered %s index value: %" PRIu64 " matches existing item value.\n", function, index_string, index_value_identifier ); } #endif continue; } /* Check if the offset index value is unallocated according to the * unallocated data block list */ if( ( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) && ( ( recovery_flags & LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ) == 0 ) ) { result = libpff_offset_list_range_is_present( unallocated_data_block_list, index_value_file_offset, (off64_t) index_value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: error determining if offset range is unallocated.", function ); libpff_index_node_free( &index_node, NULL ); return( -1 ); } else if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " refers to allocated range: %" PRIi64 " - %" PRIi64 ".\n", function, index_string, entry_index, index_value_identifier, index_value_file_offset, index_value_file_offset + (off64_t) index_value_data_size ); } #endif continue; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " refers to unallocated range: %" PRIi64 " - %" PRIi64 ".\n", function, index_string, entry_index, index_value_identifier, index_value_file_offset, index_value_file_offset + (off64_t) index_value_data_size ); } #endif } /* Move the recovered node to the index */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " is recoverable.\n", function, index_string, entry_index, index_value_identifier ); } #endif if( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) { result = libpff_index_tree_insert_value( io_handle->recovered_descriptor_index_tree, file_io_handle, io_handle->descriptor_index_tree_cache, index_value_identifier, node_offset, (size64_t) entry_index, error ); } else if( index_node->type == LIBPFF_INDEX_TYPE_OFFSET ) { result = libpff_index_tree_insert_value( io_handle->recovered_offset_index_tree, file_io_handle, io_handle->offset_index_tree_cache, index_value_identifier, node_offset, (size64_t) entry_index, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert %s index value: %" PRIu64 " to recovered index tree.", function, index_string, index_value_identifier ); libpff_index_node_free( &index_node, NULL ); return( -1 ); } node_offset += index_node->entry_size; } } if( libpff_index_node_free( &index_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index node.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Scans for recoverable local descriptors * Returns 1 if successful, returns 0 if no valid local descriptors node could be found or -1 on error */ int libpff_io_handle_recover_local_descriptors( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint64_t local_descriptors_identifier, libcerror_error_t **error ) { libpff_index_value_t *offset_index_value = NULL; libpff_local_descriptor_node_t *local_descriptor_node = NULL; uint8_t *node_entry_data = NULL; static char *function = "libpff_io_handle_recover_local_descriptors"; uint64_t local_descriptor_value_identifier = 0; uint64_t local_descriptor_value_data_identifier = 0; uint64_t local_descriptor_value_local_descriptors_identifier = 0; uint64_t local_descriptor_value_sub_node_identifier = 0; uint16_t entry_index = 0; int result = 1; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( libpff_io_handle_get_offset_index_value_by_identifier( io_handle, file_io_handle, local_descriptors_identifier, 1, 0, &offset_index_value, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); return( 0 ); } if( offset_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor node identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, offset_index_value->identifier, ( ( offset_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), offset_index_value->file_offset, offset_index_value->data_size ); } #endif if( libpff_local_descriptor_node_initialize( &local_descriptor_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptor node.", function ); return( -1 ); } if( libpff_local_descriptor_node_read( local_descriptor_node, file_io_handle, offset_index_value->file_offset, offset_index_value->data_size, ( (libpff_io_handle_t *) io_handle )->file_type, error ) != 1 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); libpff_local_descriptor_node_free( &local_descriptor_node, NULL ); return( 0 ); } for( entry_index = 0; entry_index < local_descriptor_node->number_of_entries; entry_index++ ) { if( libpff_local_descriptor_node_get_entry_data( local_descriptor_node, entry_index, &node_entry_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node entry: %" PRIu16 " data.", function, entry_index ); return( -1 ); } if( node_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node entry: %" PRIu16 " data.", function, entry_index ); return( -1 ); } if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value_identifier ); node_entry_data += 4; } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value_identifier ); node_entry_data += 8; } /* Ignore the upper 32-bit of local descriptor identifiers */ local_descriptor_value_identifier &= 0xffffffffUL; /* Ignore local descriptor values without a data identifier */ if( local_descriptor_value_identifier == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor entry: %" PRIu8 " identifier: %" PRIu64 " has an empty identifier.\n", function, entry_index, local_descriptor_value_identifier ); } #endif result = 0; break; } if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value_data_identifier ); node_entry_data += 4; byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value_local_descriptors_identifier ); node_entry_data += 4; } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value_data_identifier ); node_entry_data += 8; byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value_local_descriptors_identifier ); node_entry_data += 8; } /* Ignore local descriptor values without a data identifier */ if( local_descriptor_value_data_identifier == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor entry: %" PRIu8 " identifier: %" PRIu64 " has an empty data identifier.\n", function, entry_index, local_descriptor_value_identifier ); } #endif result = 0; break; } } else { if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value_sub_node_identifier ); node_entry_data += 4; } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value_sub_node_identifier ); node_entry_data += 8; } /* Ignore local descriptor values without a sub node identifier */ if( local_descriptor_value_sub_node_identifier == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor entry: %" PRIu8 " identifier: %" PRIu64 " has an empty sub node identifier.\n", function, entry_index, local_descriptor_value_identifier ); } #endif result = 0; break; } result = libpff_io_handle_recover_local_descriptors( io_handle, file_io_handle, local_descriptor_value_sub_node_identifier, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptors with identifier: %" PRIu64 ".", function, local_descriptor_value_sub_node_identifier ); libpff_local_descriptor_node_free( &local_descriptor_node, NULL ); return( -1 ); } else if( result == 0 ) { break; } } } if( libpff_local_descriptor_node_free( &local_descriptor_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free local descriptor node.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( result ); } libpff-20120802/libpff/libpff_index_tree.h0000644000175000017500000000610112005155304015211 00000000000000/* * Index tree functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INDEX_TREE_H ) #define _LIBPFF_PAGE_INDEX_H #include #include #include "libpff_index_value.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif int libpff_index_tree_get_number_of_leaf_nodes_by_identifier( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *number_of_leaf_nodes, libcerror_error_t **error ); int libpff_index_tree_node_get_number_of_leaf_nodes_by_identifier( libfdata_tree_node_t *index_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *number_of_leaf_nodes, libcerror_error_t **error ); int libpff_index_tree_get_leaf_node_by_identifier( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *leaf_node_index, libfdata_tree_node_t **leaf_index_tree_node, libcerror_error_t **error ); int libpff_index_tree_node_get_leaf_node_by_identifier( libfdata_tree_node_t *index_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *leaf_node_index, libfdata_tree_node_t **leaf_index_tree_node, libcerror_error_t **error ); int libpff_index_tree_get_value_by_identifier( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int value_index, libpff_index_value_t **index_tree_value, libcerror_error_t **error ); int libpff_index_tree_node_get_upper_branch_node_by_identifier( libfdata_tree_node_t *index_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libfdata_tree_node_t **upper_branch_index_tree_node, libcerror_error_t **error ); int libpff_index_tree_insert_value( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, off64_t node_data_offset, size64_t node_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_libclocale.h0000644000175000017500000000254212005155304015161 00000000000000/* * The internal libclocale header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBCLOCALE_H ) #define _LIBPFF_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_item_values.c0000644000175000017500000004005012005155304015374 00000000000000/* * Item values functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_item_values.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libuna.h" #include "libpff_list_type.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors.h" #include "libpff_multi_value.h" #include "libpff_table.h" #include "libpff_tree_type.h" #include "libpff_types.h" #include "libpff_value_type.h" /* Creates the item values * Returns 1 if successful or -1 on error */ int libpff_item_values_initialize( libpff_item_values_t **item_values, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ) { static char *function = "libpff_item_values_initialize"; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } if( *item_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid iitem values value already set.", function ); return( -1 ); } *item_values = memory_allocate_structure( libpff_item_values_t ); if( *item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create item values.", function ); goto on_error; } if( memory_set( *item_values, 0, sizeof( libpff_item_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear item values.", function ); goto on_error; } ( *item_values )->descriptor_identifier = descriptor_identifier; ( *item_values )->data_identifier = data_identifier; ( *item_values )->local_descriptors_identifier = local_descriptors_identifier; ( *item_values )->recovered = recovered; return( 1 ); on_error: if( *item_values != NULL ) { memory_free( *item_values ); *item_values = NULL; } return( -1 ); } /* Frees item values * Returns 1 if successful or -1 on error */ int libpff_item_values_free( libpff_item_values_t **item_values, libcerror_error_t **error ) { static char *function = "libpff_item_values_free"; int result = 1; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } if( *item_values != NULL ) { if( ( *item_values )->table != NULL ) { if( libpff_table_free( &( ( *item_values )->table ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table.", function ); result = -1; } } memory_free( *item_values ); *item_values = NULL; } return( result ); } /* Clone copies the item values * Copies the values and creates sub elements if necessary * Returns 1 if successful or -1 on error */ int libpff_item_values_clone_copy( libpff_item_values_t *destination_item_values, libpff_item_values_t *source_item_values, libcerror_error_t **error ) { static char *function = "libpff_item_values_clone_copy"; if( destination_item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination item values.", function ); return( -1 ); } if( destination_item_values->table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination item values - table already set.", function ); return( -1 ); } if( source_item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source item values.", function ); return( -1 ); } if( libpff_table_clone( &( destination_item_values->table ), source_item_values->table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone table.", function ); return( -1 ); } return( 1 ); } /* Reads the item values for a specific descriptor * Returns 1 if successful or -1 on error */ int libpff_item_values_read( libpff_item_values_t *item_values, libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, int debug_item_type, libcerror_error_t **error ) { static char *function = "libpff_item_values_read"; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } if( item_values->table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid item values - table already set.", function ); return( -1 ); } if( libpff_table_initialize( &( item_values->table ), item_values->descriptor_identifier, item_values->data_identifier, item_values->local_descriptors_identifier, item_values->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table.", function ); return( -1 ); } if( libpff_table_read( item_values->table, io_handle, file_io_handle, name_to_id_map_list, debug_item_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table.", function ); libpff_table_free( &( item_values->table ), NULL ); return( -1 ); } return( 1 ); } /* Retrieves the local descriptor value for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_item_values_get_local_descriptors_value_by_identifier( libpff_item_values_t *item_values, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ) { static char *function = "libpff_item_values_get_local_descriptors_value_by_identifier"; int result = 0; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } result = libpff_table_get_local_descriptors_value_by_identifier( item_values->table, file_io_handle, (uint64_t) descriptor_identifier, local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, descriptor_identifier ); return( -1 ); } return( result ); } /* Reads the data of a local descriptor * Returns 1 if successful or -1 on error */ int libpff_item_values_read_local_descriptor_data( libpff_item_values_t *item_values, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, libfdata_reference_t **descriptor_data_reference, libfcache_cache_t **descriptor_data_cache, libcerror_error_t **error ) { libpff_local_descriptor_value_t *local_descriptor_value = NULL; static char *function = "libpff_item_values_read_local_descriptor_data"; int result = 0; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } if( descriptor_data_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor data reference.", function ); return( -1 ); } if( *descriptor_data_reference != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: descriptor data already set.", function ); return( -1 ); } result = libpff_table_get_local_descriptors_value_by_identifier( item_values->table, file_io_handle, (uint64_t) descriptor_identifier, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, descriptor_identifier ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor values.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif if( local_descriptor_value->data_identifier == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor values - missing data identifier.", function ); return( -1 ); } /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_read_descriptor_data_reference( io_handle, file_io_handle, descriptor_identifier, local_descriptor_value->data_identifier, item_values->recovered, 0, descriptor_data_reference, descriptor_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor: %" PRIu32 " data: %" PRIu64 " reference.", function, descriptor_identifier, local_descriptor_value->data_identifier ); return( -1 ); } return( 1 ); } /* Retrieves the number of item value sets * Returns 1 if successful or -1 on error */ int libpff_item_values_get_number_of_sets( libpff_item_values_t *item_values, libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *number_of_sets, libcerror_error_t **error ) { static char *function = "libpff_item_values_get_number_of_sets"; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } if( number_of_sets == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sets.", function ); return( -1 ); } if( item_values->table == NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading item values of descriptor: %" PRIu32 "\n", function, item_values->descriptor_identifier ); } #endif if( libpff_item_values_read( item_values, name_to_id_map_list, io_handle, file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item values - missing table.", function ); return( -1 ); } } *number_of_sets = item_values->table->number_of_sets; return( 1 ); } /* Retrieves the value of a specific entry from the referenced item values * * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set * the value type is ignored and set. The default behavior is a strict * matching of the value type. In this case the value type must be filled * with the corresponding value type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_values_get_entry_value( libpff_item_values_t *item_values, libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, int table_set_index, uint32_t entry_type, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, uint8_t flags, libcerror_error_t **error ) { static char *function = "libpff_item_values_get_entry_value"; int result = 0; if( item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item values.", function ); return( -1 ); } if( item_values->table == NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading item values of descriptor: %" PRIu32 "\n", function, item_values->descriptor_identifier ); } #endif if( libpff_item_values_read( item_values, name_to_id_map_list, io_handle, file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item values - missing table.", function ); return( -1 ); } } result = libpff_table_get_entry_value_by_entry_type( item_values->table, table_set_index, entry_type, value_type, value_data_reference, value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table entry value.", function ); return( -1 ); } return( result ); } libpff-20120802/libpff/libpff_support.h0000644000175000017500000000356612005155304014613 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_SUPPORT_H ) #define _LIBPFF_SUPPORT_H #include #include #include "libpff_extern.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBPFF ) LIBPFF_EXTERN \ const char *libpff_get_version( void ); LIBPFF_EXTERN \ int libpff_get_access_flags_read( void ); LIBPFF_EXTERN \ int libpff_get_codepage( int *codepage, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_set_codepage( int codepage, libcerror_error_t **error ); #endif /* !defined( HAVE_LOCAL_LIBPFF ) */ LIBPFF_EXTERN \ int libpff_check_file_signature( const char *filename, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBPFF_EXTERN \ int libpff_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ); #endif LIBPFF_EXTERN \ int libpff_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_multi_value.c0000644000175000017500000005263212005155304015416 00000000000000/* * Multi value functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_definitions.h" #include "libpff_libcerror.h" #include "libpff_libfmapi.h" #include "libpff_mapi.h" #include "libpff_multi_value.h" #include "libpff_value_type.h" #include "libpff_types.h" /* Initializes the multi value and its values * Returns 1 if successful or -1 on error */ int libpff_multi_value_initialize( libpff_multi_value_t **multi_value, libcerror_error_t **error ) { libpff_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libpff_multi_value_initialize"; if( multi_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid multi value.", function ); return( -1 ); } if( *multi_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid multi value value already set.", function ); return( -1 ); } internal_multi_value = memory_allocate_structure( libpff_internal_multi_value_t ); if( internal_multi_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create multi value.", function ); goto on_error; } if( memory_set( internal_multi_value, 0, sizeof( libpff_internal_multi_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear multi value.", function ); goto on_error; } *multi_value = (libpff_multi_value_t *) internal_multi_value; return( 1 ); on_error: if( internal_multi_value != NULL ) { memory_free( internal_multi_value ); } return( -1 ); } /* Frees a multi value * Detaches the reference from the file if necessary * Returns 1 if successful or -1 on error */ int libpff_multi_value_free( libpff_multi_value_t **multi_value, libcerror_error_t **error ) { static char *function = "libpff_multi_value_free"; if( multi_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid multi value.", function ); return( -1 ); } if( *multi_value != NULL ) { if( ( (libpff_internal_multi_value_t *) *multi_value )->value_data != NULL ) { memory_free( ( (libpff_internal_multi_value_t *) *multi_value )->value_data ); } if( ( (libpff_internal_multi_value_t *) *multi_value )->value_offset != NULL ) { memory_free( ( (libpff_internal_multi_value_t *) *multi_value )->value_offset ); } if( ( (libpff_internal_multi_value_t *) *multi_value )->value_size != NULL ) { memory_free( ( (libpff_internal_multi_value_t *) *multi_value )->value_size ); } memory_free( *multi_value ); *multi_value = NULL; } return( 1 ); } /* Retrieves the number of values of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_number_of_values( libpff_multi_value_t *multi_value, int *number_of_values, libcerror_error_t **error ) { libpff_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libpff_multi_value_get_number_of_entries"; if( multi_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid multi value.", function ); return( -1 ); } internal_multi_value = (libpff_internal_multi_value_t *) multi_value; if( number_of_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of values.", function ); return( -1 ); } if( internal_multi_value->number_of_values > (uint32_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of values value exceeds maximum.", function ); return( -1 ); } *number_of_values = (int) internal_multi_value->number_of_values; return( 1 ); } /* Retrieves a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value( libpff_multi_value_t *multi_value, int value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ) { libpff_internal_multi_value_t *internal_multi_value = NULL; static char *function = "libpff_multi_value_get_value"; uint32_t value_offset = 0; if( multi_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid multi value.", function ); return( -1 ); } internal_multi_value = (libpff_internal_multi_value_t *) multi_value; if( value_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value type.", function ); return( -1 ); } if( ( value_index < 0 ) || ( value_index >= (int) internal_multi_value->number_of_values ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value index.", function ); return( -1 ); } value_offset = internal_multi_value->value_offset[ value_index ]; /* Returns the value type without the multi value flag */ *value_type = internal_multi_value->value_type & 0xefff; *value_data_size = internal_multi_value->value_size[ value_index ]; if( internal_multi_value->value_size[ value_index ] == 0 ) { *value_data = NULL; } else { *value_data = &( internal_multi_value->value_data[ value_offset ] ); } return( 1 ); } /* Retrieves the 32-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_32bit( libpff_multi_value_t *multi_value, int value_index, uint32_t *value, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_32bit"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( libpff_value_type_copy_to_32bit( value_data, value_data_size, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 32-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 64-bit value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_64bit( libpff_multi_value_t *multi_value, int value_index, uint64_t *value, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_64bit"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( libpff_value_type_copy_to_64bit( value_data, value_data_size, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 64-bit value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 64-bit filetime value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_filetime( libpff_multi_value_t *multi_value, int value_index, uint64_t *filetime, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_filetime"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_FILETIME; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( libpff_value_type_copy_to_64bit( value_data, value_data_size, filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set filetime value.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-8 string size of a specific value of the multi value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_utf8_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf8_string_size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_utf8_string_size"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libpff_value_type_get_utf8_string_size( value_data, value_data_size, is_ascii_string, ( (libpff_internal_multi_value_t *) multi_value )->ascii_codepage, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string size.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-8 string value of a specific value of the multi value * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_utf8_string( libpff_multi_value_t *multi_value, int value_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_utf8_string"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libpff_value_type_copy_to_utf8_string( value_data, value_data_size, is_ascii_string, ( (libpff_internal_multi_value_t *) multi_value )->ascii_codepage, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-16 string size of a specific value of the multi value * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_utf16_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf16_string_size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_utf16_string_size"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libpff_value_type_get_utf16_string_size( value_data, value_data_size, is_ascii_string, ( (libpff_internal_multi_value_t *) multi_value )->ascii_codepage, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string size.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-16 string value of a specific value of the multi value * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_utf16_string( libpff_multi_value_t *multi_value, int value_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_utf16_string"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libpff_value_type_copy_to_utf16_string( value_data, value_data_size, is_ascii_string, ( (libpff_internal_multi_value_t *) multi_value )->ascii_codepage, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the size of a binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_binary_data_size( libpff_multi_value_t *multi_value, int value_index, size_t *size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_binary_data_size"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( libpff_value_type_get_binary_data_size( value_data, value_data_size, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set binary data size.", function ); return( -1 ); } } return( result ); } /* Retrieves the binary data value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_binary_data( libpff_multi_value_t *multi_value, int value_index, uint8_t *binary_data, size_t size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_binary_data"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( libpff_value_type_copy_to_binary_data( value_data, value_data_size, binary_data, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set binary data.", function ); return( -1 ); } } return( result ); } /* Retrieves the GUID value of a specific value of the multi value * Returns 1 if successful or -1 on error */ int libpff_multi_value_get_value_guid( libpff_multi_value_t *multi_value, int value_index, uint8_t *guid, size_t size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_multi_value_get_value_guid"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_GUID; int result = 0; result = libpff_multi_value_get_value( multi_value, value_index, &value_type, &value_data, &value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value.", function ); } else if( result == 1 ) { if( libpff_value_type_copy_to_binary_data( value_data, value_data_size, guid, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set GUID.", function ); return( -1 ); } } return( result ); } libpff-20120802/libpff/libpff_index_value.c0000644000175000017500000000771412005155304015374 00000000000000/* * Index value functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_index_value.h" #include "libpff_libcerror.h" #include "libpff_libfdata.h" /* Initializes the index value * Returns 1 if successful or -1 on error */ int libpff_index_value_initialize( libpff_index_value_t **index_value, libcerror_error_t **error ) { static char *function = "libpff_index_value_initialize"; if( index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index value.", function ); return( -1 ); } if( *index_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid index value value already set.", function ); return( -1 ); } *index_value = memory_allocate_structure( libpff_index_value_t ); if( *index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create index value.", function ); goto on_error; } if( memory_set( *index_value, 0, sizeof( libpff_index_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear index value.", function ); goto on_error; } return( 1 ); on_error: if( *index_value != NULL ) { memory_free( *index_value ); *index_value = NULL; } return( -1 ); } /* Frees the index value * Returns 1 if successful or -1 on error */ int libpff_index_value_free( libpff_index_value_t **index_value, libcerror_error_t **error ) { static char *function = "libpff_index_value_free"; if( index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index value.", function ); return( -1 ); } if( *index_value != NULL ) { memory_free( *index_value ); *index_value = NULL; } return( 1 ); } /* Compares two index values * Returns LIBFDATA_TREE_NODE_COMPARE_LESS, LIBFDATA_TREE_NODE_COMPARE_EQUAL, LIBFDATA_TREE_NODE_COMPARE_GREATER if successful or -1 on error */ int libpff_index_value_compare( libpff_index_value_t *first_index_value, libpff_index_value_t *second_index_value, libcerror_error_t **error ) { static char *function = "libpff_index_value_compare"; if( first_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first index value.", function ); return( -1 ); } if( second_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid second index value.", function ); return( -1 ); } if( first_index_value->identifier < second_index_value->identifier ) { return( LIBFDATA_TREE_NODE_COMPARE_LESS ); } else if( first_index_value->identifier > second_index_value->identifier ) { return( LIBFDATA_TREE_NODE_COMPARE_GREATER ); } return( LIBFDATA_TREE_NODE_COMPARE_EQUAL ); } libpff-20120802/libpff/libpff_encryption.c0000644000175000017500000002036112005155304015254 00000000000000/* * De/Encryption functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libpff_encryption.h" #include "libpff_definitions.h" #include "libpff_libcerror.h" /* The transposition array contains the un-encrypted (plain) values. * The un-encrypted value is in the position of the encrypted value. * i.e. the encrypted value 0x13 represents 0x02 * encrypted: 0 1 2 3 4 5 6 7 * un-encrypted: 8 9 a b c d e f */ /* For compressible encryption */ static uint8_t libpff_encryption_compressible[] = { 0x47, 0xf1, 0xb4, 0xe6, 0x0b, 0x6a, 0x72, 0x48, 0x85, 0x4e, 0x9e, 0xeb, 0xe2, 0xf8, 0x94, 0x53, 0xe0, 0xbb, 0xa0, 0x02, 0xe8, 0x5a, 0x09, 0xab, 0xdb, 0xe3, 0xba, 0xc6, 0x7c, 0xc3, 0x10, 0xdd, 0x39, 0x05, 0x96, 0x30, 0xf5, 0x37, 0x60, 0x82, 0x8c, 0xc9, 0x13, 0x4a, 0x6b, 0x1d, 0xf3, 0xfb, 0x8f, 0x26, 0x97, 0xca, 0x91, 0x17, 0x01, 0xc4, 0x32, 0x2d, 0x6e, 0x31, 0x95, 0xff, 0xd9, 0x23, 0xd1, 0x00, 0x5e, 0x79, 0xdc, 0x44, 0x3b, 0x1a, 0x28, 0xc5, 0x61, 0x57, 0x20, 0x90, 0x3d, 0x83, 0xb9, 0x43, 0xbe, 0x67, 0xd2, 0x46, 0x42, 0x76, 0xc0, 0x6d, 0x5b, 0x7e, 0xb2, 0x0f, 0x16, 0x29, 0x3c, 0xa9, 0x03, 0x54, 0x0d, 0xda, 0x5d, 0xdf, 0xf6, 0xb7, 0xc7, 0x62, 0xcd, 0x8d, 0x06, 0xd3, 0x69, 0x5c, 0x86, 0xd6, 0x14, 0xf7, 0xa5, 0x66, 0x75, 0xac, 0xb1, 0xe9, 0x45, 0x21, 0x70, 0x0c, 0x87, 0x9f, 0x74, 0xa4, 0x22, 0x4c, 0x6f, 0xbf, 0x1f, 0x56, 0xaa, 0x2e, 0xb3, 0x78, 0x33, 0x50, 0xb0, 0xa3, 0x92, 0xbc, 0xcf, 0x19, 0x1c, 0xa7, 0x63, 0xcb, 0x1e, 0x4d, 0x3e, 0x4b, 0x1b, 0x9b, 0x4f, 0xe7, 0xf0, 0xee, 0xad, 0x3a, 0xb5, 0x59, 0x04, 0xea, 0x40, 0x55, 0x25, 0x51, 0xe5, 0x7a, 0x89, 0x38, 0x68, 0x52, 0x7b, 0xfc, 0x27, 0xae, 0xd7, 0xbd, 0xfa, 0x07, 0xf4, 0xcc, 0x8e, 0x5f, 0xef, 0x35, 0x9c, 0x84, 0x2b, 0x15, 0xd5, 0x77, 0x34, 0x49, 0xb6, 0x12, 0x0a, 0x7f, 0x71, 0x88, 0xfd, 0x9d, 0x18, 0x41, 0x7d, 0x93, 0xd8, 0x58, 0x2c, 0xce, 0xfe, 0x24, 0xaf, 0xde, 0xb8, 0x36, 0xc8, 0xa1, 0x80, 0xa6, 0x99, 0x98, 0xa8, 0x2f, 0x0e, 0x81, 0x65, 0x73, 0xe4, 0xc2, 0xa2, 0x8a, 0xd4, 0xe1, 0x11, 0xd0, 0x08, 0x8b, 0x2a, 0xf2, 0xed, 0x9a, 0x64, 0x3f, 0xc1, 0x6c, 0xf9, 0xec }; /* For high encryption */ static uint8_t libpff_encryption_high1[] = { 0x41, 0x36, 0x13, 0x62, 0xa8, 0x21, 0x6e, 0xbb, 0xf4, 0x16, 0xcc, 0x04, 0x7f, 0x64, 0xe8, 0x5d, 0x1e, 0xf2, 0xcb, 0x2a, 0x74, 0xc5, 0x5e, 0x35, 0xd2, 0x95, 0x47, 0x9e, 0x96, 0x2d, 0x9a, 0x88, 0x4c, 0x7d, 0x84, 0x3f, 0xdb, 0xac, 0x31, 0xb6, 0x48, 0x5f, 0xf6, 0xc4, 0xd8, 0x39, 0x8b, 0xe7, 0x23, 0x3b, 0x38, 0x8e, 0xc8, 0xc1, 0xdf, 0x25, 0xb1, 0x20, 0xa5, 0x46, 0x60, 0x4e, 0x9c, 0xfb, 0xaa, 0xd3, 0x56, 0x51, 0x45, 0x7c, 0x55, 0x00, 0x07, 0xc9, 0x2b, 0x9d, 0x85, 0x9b, 0x09, 0xa0, 0x8f, 0xad, 0xb3, 0x0f, 0x63, 0xab, 0x89, 0x4b, 0xd7, 0xa7, 0x15, 0x5a, 0x71, 0x66, 0x42, 0xbf, 0x26, 0x4a, 0x6b, 0x98, 0xfa, 0xea, 0x77, 0x53, 0xb2, 0x70, 0x05, 0x2c, 0xfd, 0x59, 0x3a, 0x86, 0x7e, 0xce, 0x06, 0xeb, 0x82, 0x78, 0x57, 0xc7, 0x8d, 0x43, 0xaf, 0xb4, 0x1c, 0xd4, 0x5b, 0xcd, 0xe2, 0xe9, 0x27, 0x4f, 0xc3, 0x08, 0x72, 0x80, 0xcf, 0xb0, 0xef, 0xf5, 0x28, 0x6d, 0xbe, 0x30, 0x4d, 0x34, 0x92, 0xd5, 0x0e, 0x3c, 0x22, 0x32, 0xe5, 0xe4, 0xf9, 0x9f, 0xc2, 0xd1, 0x0a, 0x81, 0x12, 0xe1, 0xee, 0x91, 0x83, 0x76, 0xe3, 0x97, 0xe6, 0x61, 0x8a, 0x17, 0x79, 0xa4, 0xb7, 0xdc, 0x90, 0x7a, 0x5c, 0x8c, 0x02, 0xa6, 0xca, 0x69, 0xde, 0x50, 0x1a, 0x11, 0x93, 0xb9, 0x52, 0x87, 0x58, 0xfc, 0xed, 0x1d, 0x37, 0x49, 0x1b, 0x6a, 0xe0, 0x29, 0x33, 0x99, 0xbd, 0x6c, 0xd9, 0x94, 0xf3, 0x40, 0x54, 0x6f, 0xf0, 0xc6, 0x73, 0xb8, 0xd6, 0x3e, 0x65, 0x18, 0x44, 0x1f, 0xdd, 0x67, 0x10, 0xf1, 0x0c, 0x19, 0xec, 0xae, 0x03, 0xa1, 0x14, 0x7b, 0xa9, 0x0b, 0xff, 0xf8, 0xa3, 0xc0, 0xa2, 0x01, 0xf7, 0x2e, 0xbc, 0x24, 0x68, 0x75, 0x0d, 0xfe, 0xba, 0x2f, 0xb5, 0xd0, 0xda, 0x3d }; static uint8_t libpff_encryption_high2[] = { 0x14, 0x53, 0x0f, 0x56, 0xb3, 0xc8, 0x7a, 0x9c, 0xeb, 0x65, 0x48, 0x17, 0x16, 0x15, 0x9f, 0x02, 0xcc, 0x54, 0x7c, 0x83, 0x00, 0x0d, 0x0c, 0x0b, 0xa2, 0x62, 0xa8, 0x76, 0xdb, 0xd9, 0xed, 0xc7, 0xc5, 0xa4, 0xdc, 0xac, 0x85, 0x74, 0xd6, 0xd0, 0xa7, 0x9b, 0xae, 0x9a, 0x96, 0x71, 0x66, 0xc3, 0x63, 0x99, 0xb8, 0xdd, 0x73, 0x92, 0x8e, 0x84, 0x7d, 0xa5, 0x5e, 0xd1, 0x5d, 0x93, 0xb1, 0x57, 0x51, 0x50, 0x80, 0x89, 0x52, 0x94, 0x4f, 0x4e, 0x0a, 0x6b, 0xbc, 0x8d, 0x7f, 0x6e, 0x47, 0x46, 0x41, 0x40, 0x44, 0x01, 0x11, 0xcb, 0x03, 0x3f, 0xf7, 0xf4, 0xe1, 0xa9, 0x8f, 0x3c, 0x3a, 0xf9, 0xfb, 0xf0, 0x19, 0x30, 0x82, 0x09, 0x2e, 0xc9, 0x9d, 0xa0, 0x86, 0x49, 0xee, 0x6f, 0x4d, 0x6d, 0xc4, 0x2d, 0x81, 0x34, 0x25, 0x87, 0x1b, 0x88, 0xaa, 0xfc, 0x06, 0xa1, 0x12, 0x38, 0xfd, 0x4c, 0x42, 0x72, 0x64, 0x13, 0x37, 0x24, 0x6a, 0x75, 0x77, 0x43, 0xff, 0xe6, 0xb4, 0x4b, 0x36, 0x5c, 0xe4, 0xd8, 0x35, 0x3d, 0x45, 0xb9, 0x2c, 0xec, 0xb7, 0x31, 0x2b, 0x29, 0x07, 0x68, 0xa3, 0x0e, 0x69, 0x7b, 0x18, 0x9e, 0x21, 0x39, 0xbe, 0x28, 0x1a, 0x5b, 0x78, 0xf5, 0x23, 0xca, 0x2a, 0xb0, 0xaf, 0x3e, 0xfe, 0x04, 0x8c, 0xe7, 0xe5, 0x98, 0x32, 0x95, 0xd3, 0xf6, 0x4a, 0xe8, 0xa6, 0xea, 0xe9, 0xf3, 0xd5, 0x2f, 0x70, 0x20, 0xf2, 0x1f, 0x05, 0x67, 0xad, 0x55, 0x10, 0xce, 0xcd, 0xe3, 0x27, 0x3b, 0xda, 0xba, 0xd7, 0xc2, 0x26, 0xd4, 0x91, 0x1d, 0xd2, 0x1c, 0x22, 0x33, 0xf8, 0xfa, 0xf1, 0x5a, 0xef, 0xcf, 0x90, 0xb6, 0x8b, 0xb5, 0xbd, 0xc0, 0xbf, 0x08, 0x97, 0x1e, 0x6c, 0xe2, 0x61, 0xe0, 0xc6, 0xc1, 0x59, 0xab, 0xbb, 0x58, 0xde, 0x5f, 0xdf, 0x60, 0x79, 0x7e, 0xb2, 0x8a }; /* Decrypts the data * Returns the number of bytes decrypted if successful or -1 on error */ ssize_t libpff_encryption_decrypt( uint8_t encryption_type, uint32_t key, uint8_t *data, size_t size, libcerror_error_t **error ) { static char *function = "libpff_encryption_decrypt"; size_t iterator = 0; uint16_t salt = 0; uint8_t index = 0; uint8_t upper_salt = 0; uint8_t lower_salt = 0; if( ( encryption_type != LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE ) && ( encryption_type != LIBPFF_ENCRYPTION_TYPE_NONE ) && ( encryption_type != LIBPFF_ENCRYPTION_TYPE_HIGH ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported compression type.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( encryption_type == LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE ) { for( iterator = 0; iterator < size; iterator++ ) { index = data[ iterator ]; data[ iterator ] = libpff_encryption_compressible[ index ]; } } else if( encryption_type == LIBPFF_ENCRYPTION_TYPE_NONE ) { iterator = size; } else if( encryption_type == LIBPFF_ENCRYPTION_TYPE_HIGH ) { salt = (uint16_t) ( ( ( key & 0xffff0000 ) >> 16 ) ^ ( key & 0x0000ffff ) ); for( iterator = 0; iterator < size; iterator++ ) { lower_salt = salt & 0x00ff; upper_salt = ( salt & 0xff00 ) >> 8; index = data[ iterator ]; index += lower_salt; index = libpff_encryption_high1[ index ]; index += upper_salt; index = libpff_encryption_high2[ index ]; index -= upper_salt; index = libpff_encryption_compressible[ index ]; index -= lower_salt; data[ iterator ] = index; salt++; } } return( (ssize_t) iterator ); } libpff-20120802/libpff/libpff_column_definition.c0000644000175000017500000000710112005155304016564 00000000000000/* * Column definition functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_column_definition.h" #include "libpff_libcerror.h" #include "libpff_table.h" #include "libpff_types.h" /* Initializes the column definition and its values * Returns 1 if successful or -1 on error */ int libpff_column_definition_initialize( libpff_column_definition_t **column_definition, libcerror_error_t **error ) { static char *function = "libpff_column_definition_initialize"; if( column_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column_definition.", function ); return( -1 ); } if( *column_definition != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid column definition value already set.", function ); return( -1 ); } *column_definition = memory_allocate_structure( libpff_column_definition_t ); if( column_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column definition.", function ); goto on_error; } if( memory_set( *column_definition, 0, sizeof( libpff_column_definition_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear column definition.", function ); goto on_error; } return( 1 ); on_error: if( *column_definition != NULL ) { memory_free( *column_definition ); *column_definition = NULL; } return( -1 ); } /* Frees a column definition * Returns 1 if successful or -1 on error */ int libpff_column_definition_free( libpff_column_definition_t **column_definition, libcerror_error_t **error ) { static char *function = "libpff_column_definition_free"; int result = 1; if( column_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column definition.", function ); return( -1 ); } if( *column_definition != NULL ) { /* The name_to_id_map_entry reference is freed elsewhere */ if( ( *column_definition )->record_entry_values_table != NULL ) { if( libpff_table_free( &( ( *column_definition )->record_entry_values_table ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record entry values table.", function ); result = -1; } } memory_free( *column_definition ); *column_definition = NULL; } return( result ); } libpff-20120802/libpff/libpff.rc.in0000644000175000017500000000210412005155520013564 00000000000000#include #ifdef GCC_WINDRES VS_VERSION_INFO VERSIONINFO #else VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE #endif FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "FileDescription", "Library to support the Personal Folder File (OST, PAB and PST) format\0" VALUE "FileVersion", "@VERSION@" "\0" VALUE "InternalName", "libpff.dll\0" VALUE "LegalCopyright", "(c) 2008-2012 Joachim Metz \0" VALUE "OriginalFilename", "libpff.dll\0" VALUE "ProductName", "libpff\0" VALUE "ProductVersion", "@VERSION@" "\0" VALUE "Comments", "For more information visit http://code.google.com/p/libpff/\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 END END libpff-20120802/libpff/libpff_index_tree.c0000644000175000017500000010054412005155304015212 00000000000000/* * Index tree functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libpff_definitions.h" #include "libpff_index_tree.h" #include "libpff_index_value.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" /* Retrieves the number of leaf nodes for the specific identifier * Returns 1 if successful or -1 on error */ int libpff_index_tree_get_number_of_leaf_nodes_by_identifier( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *number_of_leaf_nodes, libcerror_error_t **error ) { libfdata_tree_node_t *index_tree_root_node = NULL; static char *function = "libpff_index_tree_get_number_of_leaf_nodes_by_identifier"; if( index_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index tree.", function ); return( -1 ); } if( number_of_leaf_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of leaf nodes.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, identifier, identifier ); } #endif if( libfdata_tree_get_root_node( index_tree, &index_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root node from index tree.", function ); return( -1 ); } *number_of_leaf_nodes = 0; if( libpff_index_tree_node_get_number_of_leaf_nodes_by_identifier( index_tree_root_node, file_io_handle, cache, identifier, number_of_leaf_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes by identifier in root node.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of leaf nodes for the specific identifier * Returns 1 if successful or -1 on error */ int libpff_index_tree_node_get_number_of_leaf_nodes_by_identifier( libfdata_tree_node_t *index_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *number_of_leaf_nodes, libcerror_error_t **error ) { libfdata_tree_node_t *index_tree_sub_node = NULL; libpff_index_value_t *index_tree_sub_node_value = NULL; static char *function = "libpff_index_tree_node_get_number_of_leaf_nodes_by_identifier"; int16_t compare = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( index_tree_node, file_io_handle, cache, &number_of_sub_nodes, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub nodes from index tree node.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( index_tree_node, file_io_handle, cache, sub_node_index, &index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from index tree node.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_node_value( index_tree_sub_node, file_io_handle, cache, (intptr_t **) &index_tree_sub_node_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index tree sub node value: %d.", function, sub_node_index ); return( -1 ); } if( index_tree_sub_node_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index tree sub node value: %d.", function, sub_node_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: index tree sub node value: %d identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, sub_node_index, index_tree_sub_node_value->identifier, index_tree_sub_node_value->identifier ); } #endif if( identifier > index_tree_sub_node_value->identifier ) { compare = 1; } else if( identifier < index_tree_sub_node_value->identifier ) { compare = -1; } else { compare = 0; } result = libfdata_tree_node_is_leaf( index_tree_sub_node, file_io_handle, cache, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree sub node: %d is a leaf node.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( index_tree_sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree sub node: %d is a deleted node.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( compare == 0 ) { if( number_of_leaf_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of leaf nodes.", function ); return( -1 ); } *number_of_leaf_nodes += 1; } } } else { /* A branch node contains the identifier of its first sub node */ if( ( compare == 0 ) || ( ( compare > 0 ) && ( sub_node_index == ( number_of_sub_nodes - 1 ) ) ) ) { result = libpff_index_tree_node_get_number_of_leaf_nodes_by_identifier( index_tree_sub_node, file_io_handle, cache, identifier, number_of_leaf_nodes, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf index tree node by identifier in sub node: %d.", function, sub_node_index ); return( -1 ); } break; } else if( ( compare < 0 ) && ( sub_node_index >= 1 ) ) { if( libfdata_tree_node_get_sub_node_by_index( index_tree_node, file_io_handle, cache, sub_node_index - 1, &index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from index tree node.", function, sub_node_index - 1 ); return( -1 ); } result = libpff_index_tree_node_get_number_of_leaf_nodes_by_identifier( index_tree_sub_node, file_io_handle, cache, identifier, number_of_leaf_nodes, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf index tree node by identifier in sub node: %d.", function, sub_node_index - 1 ); return( -1 ); } break; } } } return( 1 ); } /* Retrieves the leaf node for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_index_tree_get_leaf_node_by_identifier( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *leaf_node_index, libfdata_tree_node_t **leaf_index_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *index_tree_root_node = NULL; static char *function = "libpff_index_tree_get_leaf_node_by_identifier"; int result = 0; if( index_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index tree.", function ); return( -1 ); } if( leaf_index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf index tree node.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, identifier, identifier ); } #endif if( libfdata_tree_get_root_node( index_tree, &index_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root node from index tree.", function ); return( -1 ); } result = libpff_index_tree_node_get_leaf_node_by_identifier( index_tree_root_node, file_io_handle, cache, identifier, leaf_node_index, leaf_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node by identifier in root node.", function ); return( -1 ); } return( result ); } /* Retrieves the leaf node for the specific identifier * Returns 1 if successful, 0 if no leaf node was found or -1 on error */ int libpff_index_tree_node_get_leaf_node_by_identifier( libfdata_tree_node_t *index_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int *leaf_node_index, libfdata_tree_node_t **leaf_index_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *index_tree_sub_node = NULL; libpff_index_value_t *index_tree_sub_node_value = NULL; static char *function = "libpff_index_tree_node_get_leaf_node_by_identifier"; int16_t compare = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( index_tree_node, file_io_handle, cache, &number_of_sub_nodes, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub nodes from index tree node.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( index_tree_node, file_io_handle, cache, sub_node_index, &index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from index tree node.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_node_value( index_tree_sub_node, file_io_handle, cache, (intptr_t **) &index_tree_sub_node_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index tree sub node value: %d.", function, sub_node_index ); return( -1 ); } if( index_tree_sub_node_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index tree sub node value: %d.", function, sub_node_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: index tree sub node value: %d identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, sub_node_index, index_tree_sub_node_value->identifier, index_tree_sub_node_value->identifier ); } #endif if( identifier > index_tree_sub_node_value->identifier ) { compare = 1; } else if( identifier < index_tree_sub_node_value->identifier ) { compare = -1; } else { compare = 0; } result = libfdata_tree_node_is_leaf( index_tree_sub_node, file_io_handle, cache, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree sub node: %d is a leaf node.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( index_tree_sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree sub node: %d is a deleted node.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( compare == 0 ) { if( leaf_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf node index.", function ); return( -1 ); } if( *leaf_node_index == 0 ) { if( leaf_index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf index tree node.", function ); return( -1 ); } if( *leaf_index_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: leaf index tree node value already set.", function ); return( -1 ); } *leaf_index_tree_node = index_tree_sub_node; result = 1; break; } else { *leaf_node_index -= 1; } } } result = 0; } else { /* A branch node contains the identifier of its first sub node */ if( ( compare == 0 ) || ( ( compare > 0 ) && ( sub_node_index == ( number_of_sub_nodes - 1 ) ) ) ) { result = libpff_index_tree_node_get_leaf_node_by_identifier( index_tree_sub_node, file_io_handle, cache, identifier, leaf_node_index, leaf_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf index tree node by identifier in sub node: %d.", function, sub_node_index ); return( -1 ); } break; } else if( ( compare < 0 ) && ( sub_node_index >= 1 ) ) { if( libfdata_tree_node_get_sub_node_by_index( index_tree_node, file_io_handle, cache, sub_node_index - 1, &index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from index tree node.", function, sub_node_index - 1 ); return( -1 ); } result = libpff_index_tree_node_get_leaf_node_by_identifier( index_tree_sub_node, file_io_handle, cache, identifier, leaf_node_index, leaf_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf index tree node by identifier in sub node: %d.", function, sub_node_index - 1 ); return( -1 ); } break; } } } return( result ); } /* Retrieves the index value for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_index_tree_get_value_by_identifier( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, int value_index, libpff_index_value_t **index_value, libcerror_error_t **error ) { libfdata_tree_node_t *leaf_index_tree_node = NULL; static char *function = "libpff_index_tree_get_value_by_identifier"; int result = 0; result = libpff_index_tree_get_leaf_node_by_identifier( index_tree, file_io_handle, cache, identifier, &value_index, &leaf_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node by identifier in root node.", function ); return( -1 ); } else if( result != 0 ) { if( leaf_index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing leaf index tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( leaf_index_tree_node, file_io_handle, cache, (intptr_t **) index_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf index tree node value.", function ); return( -1 ); } } return( result ); } /* Retrieves the upper branch node for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_index_tree_node_get_upper_branch_node_by_identifier( libfdata_tree_node_t *index_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libfdata_tree_node_t **upper_branch_index_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *index_tree_sub_node = NULL; libpff_index_value_t *index_tree_sub_node_value = NULL; static char *function = "libpff_index_tree_node_get_upper_branch_node_by_identifier"; int16_t compare = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index tree node.", function ); return( -1 ); } if( upper_branch_index_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid upper branch index tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( index_tree_node, file_io_handle, cache, &number_of_sub_nodes, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub nodes from index tree node.", function ); return( -1 ); } if( number_of_sub_nodes == 0 ) { result = libfdata_tree_node_is_leaf( index_tree_node, file_io_handle, cache, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree node is a leaf node.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { return( 0 ); } result = libfdata_tree_node_is_deleted( index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree node is deleted.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { return( 0 ); } if( *upper_branch_index_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: upper branch index tree node value already set.", function ); return( -1 ); } *upper_branch_index_tree_node = index_tree_node; return( 1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( index_tree_node, file_io_handle, cache, sub_node_index, &index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from index tree node.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_node_value( index_tree_sub_node, file_io_handle, cache, (intptr_t **) &index_tree_sub_node_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index tree sub node value: %d.", function, sub_node_index ); return( -1 ); } if( index_tree_sub_node_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index tree sub node value: %d.", function, sub_node_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: index tree sub node value: %d identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, sub_node_index, index_tree_sub_node_value->identifier, index_tree_sub_node_value->identifier ); } #endif if( identifier > index_tree_sub_node_value->identifier ) { compare = 1; } else if( identifier < index_tree_sub_node_value->identifier ) { compare = -1; } else { compare = 0; } result = libfdata_tree_node_is_leaf( index_tree_sub_node, file_io_handle, cache, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree sub node: %d is a leaf node.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( index_tree_sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if index tree sub node: %d is a deleted node.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( compare == 0 ) { if( *upper_branch_index_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: upper branch index tree node value already set.", function ); return( -1 ); } *upper_branch_index_tree_node = index_tree_node; result = 1; break; } } result = 0; } else { /* A branch node contains the identifier of its first sub node */ if( ( compare == 0 ) || ( ( compare > 0 ) && ( sub_node_index == ( number_of_sub_nodes - 1 ) ) ) ) { result = libpff_index_tree_node_get_upper_branch_node_by_identifier( index_tree_sub_node, file_io_handle, cache, identifier, upper_branch_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper branch index tree node by identifier in sub node: %d.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( *upper_branch_index_tree_node == NULL ) { *upper_branch_index_tree_node = index_tree_sub_node; result = 1; } } break; } else if( ( compare < 0 ) && ( sub_node_index >= 1 ) ) { if( libfdata_tree_node_get_sub_node_by_index( index_tree_node, file_io_handle, cache, sub_node_index - 1, &index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from index tree node.", function, sub_node_index - 1 ); return( -1 ); } result = libpff_index_tree_node_get_upper_branch_node_by_identifier( index_tree_sub_node, file_io_handle, cache, identifier, upper_branch_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper branch index tree node by identifier in sub node: %d.", function, sub_node_index - 1 ); return( -1 ); } else if( result == 0 ) { if( *upper_branch_index_tree_node == NULL ) { *upper_branch_index_tree_node = index_tree_sub_node; result = 1; } } break; } } } if( result == 0 ) { if( *upper_branch_index_tree_node == NULL ) { *upper_branch_index_tree_node = index_tree_node; result = 1; } } return( result ); } /* Inserts an index value to the index tree * Returns 1 if successful or -1 on error */ int libpff_index_tree_insert_value( libfdata_tree_t *index_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, off64_t node_data_offset, size64_t node_data_size, libcerror_error_t **error ) { libfdata_tree_node_t *index_tree_branch_node = NULL; libfdata_tree_node_t *index_tree_root_node = NULL; libpff_index_value_t *index_tree_branch_node_value = NULL; static char *function = "libpff_index_tree_insert_value"; int number_of_sub_nodes = 0; int sub_node_index = 0; if( index_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index tree.", function ); return( -1 ); } if( libfdata_tree_get_root_node( index_tree, &index_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root node from index tree.", function ); return( -1 ); } if( libpff_index_tree_node_get_upper_branch_node_by_identifier( index_tree_root_node, file_io_handle, cache, identifier, &index_tree_branch_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper branch index tree node by identifier: %" PRIu64 ".", function, identifier ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( index_tree_branch_node, file_io_handle, cache, &number_of_sub_nodes, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub nodes of branch node.", function ); return( -1 ); } if( number_of_sub_nodes >= 512 ) { if( libfdata_tree_node_get_node_value( index_tree_branch_node, file_io_handle, cache, (intptr_t **) &index_tree_branch_node_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve index tree branch node value.", function ); return( -1 ); } if( index_tree_branch_node_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing index tree branch node value.", function, sub_node_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: index tree branch node value identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, index_tree_branch_node_value->identifier, index_tree_branch_node_value->identifier ); } #endif if( libfdata_tree_node_split_sub_nodes( index_tree_branch_node, 32, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to split index tree branch node value.", function ); return( -1 ); } index_tree_root_node = index_tree_branch_node; index_tree_branch_node = NULL; if( libpff_index_tree_node_get_upper_branch_node_by_identifier( index_tree_root_node, file_io_handle, cache, identifier, &index_tree_branch_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve upper branch index tree node by identifier: %" PRIu64 ".", function, identifier ); return( -1 ); } } if( libfdata_tree_node_insert_sub_node( index_tree_branch_node, file_io_handle, cache, &sub_node_index, node_data_offset, node_data_size, 0, (int (*)(intptr_t *, intptr_t *, libcerror_error_t **)) &libpff_index_value_compare, LIBFDATA_TREE_NODE_INSERT_FLAG_NON_UNIQUE_SUB_NODE_VALUES, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert index value: %" PRIu64 " in branch index tree node.", function, identifier ); return( -1 ); } if( libfdata_tree_node_set_leaf_sub_node( index_tree_branch_node, sub_node_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf in index tree sub node: %d.", function, sub_node_index ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_debug.c0000644000175000017500000004374712005155304014165 00000000000000/* * Debug functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfguid.h" #include "libpff_libfmapi.h" #include "libpff_name_to_id_map.h" #include "pff_value_data.h" #if defined( HAVE_DEBUG_OUTPUT ) /* Retrieves a string containing the name to id map table property type identifier */ const char *libpff_debug_get_name_to_id_map_property_type_identifier( uint32_t entry_type, uint32_t value_type ) { if( entry_type == 0x0001 ) { switch( value_type ) { case 0x0003: return( "PidTagNameidBucketCount" ); } } else if( entry_type == 0x0002 ) { switch( value_type ) { case 0x0102: return( "PidTagNameidStreamGuid" ); } } else if( entry_type == 0x0003 ) { switch( value_type ) { case 0x0102: return( "PidTagNameidStreamEntry" ); } } else if( entry_type == 0x0004 ) { switch( value_type ) { case 0x0102: return( "PidTagNameidStreamString" ); } } if( entry_type >= 0x1000 ) { switch( value_type ) { case 0x0102: return( "PidTagNameidBucketBase" ); } } return( "_UNKNOWN_" ); } /* Retrieves a string containing the name to id map table property type description */ const char *libpff_debug_get_name_to_id_map_property_type_description( uint32_t entry_type, uint32_t value_type ) { if( entry_type == 0x0001 ) { switch( value_type ) { case 0x0003: return( "Name to ID Map Number of Validation Entries" ); } } else if( entry_type == 0x0002 ) { switch( value_type ) { case 0x0102: return( "Name to ID Map Class Identifiers" ); } } else if( entry_type == 0x0003 ) { switch( value_type ) { case 0x0102: return( "Name to ID Map Entries" ); } } else if( entry_type == 0x0004 ) { switch( value_type ) { case 0x0102: return( "Name to ID Map Strings" ); } } if( entry_type >= 0x1000 ) { switch( value_type ) { case 0x0102: return( "Name to ID Map Validation Entry" ); } } return( "Unknown" ); } /* Prints the node identifier type */ void libpff_debug_print_node_identifier_type( uint8_t node_identifier_type ) { switch( node_identifier_type ) { case LIBPFF_NODE_IDENTIFIER_TYPE_TABLE_VALUE: libcnotify_printf( "(Table value)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_INTERNAL: libcnotify_printf( "(Internal)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_FOLDER: libcnotify_printf( "(Folder)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_FOLDER: libcnotify_printf( "(Search folder)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_MESSAGE: libcnotify_printf( "(Message)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENT: libcnotify_printf( "(Attachment)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_UPDATE_QUEUE: libcnotify_printf( "(Search update queue)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CRITERIA_OBJECT: libcnotify_printf( "(Search criteria object)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_ASSOCIATED_CONTENT: libcnotify_printf( "(Associated content)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_CONTENTS_TABLE_INDEX: libcnotify_printf( "(Contents table index)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_INBOX: libcnotify_printf( "(Inbox)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_OUTBOX: libcnotify_printf( "(Outbox)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SUB_FOLDERS: libcnotify_printf( "(Sub folders)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SUB_MESSAGES: libcnotify_printf( "(Sub messages)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SUB_ASSOCIATED_CONTENTS: libcnotify_printf( "(Sub associated contents)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CONTENTS_TABLE: libcnotify_printf( "(Search contents table)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENTS: libcnotify_printf( "(Attachments)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_RECIPIENTS: libcnotify_printf( "(Reciepients)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_TABLE: libcnotify_printf( "(Search table)" ); break; case LIBPFF_NODE_IDENTIFIER_TYPE_LOCAL_DESCRIPTOR_VALUE: libcnotify_printf( "(Local descriptor value)" ); break; default: libcnotify_printf( "(Unknown)" ); break; } } /* Prints the property type value * Returns 1 if successful or -1 on error */ int libpff_debug_property_type_value_reference_print( libpff_list_t *name_to_id_map_list, uint32_t entry_type, uint32_t value_type, libfdata_reference_t *value_data_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *descriptor_cache, int debug_item_type, int ascii_codepage, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_debug_property_type_value_reference_print"; size_t value_data_size = 0; if( libfdata_reference_get_data( value_data_reference, file_io_handle, descriptor_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data reference data.", function ); return( -1 ); } if( libpff_debug_property_type_value_print( name_to_id_map_list, entry_type, value_type, value_data, value_data_size, debug_item_type, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print property type value.", function ); return( -1 ); } return( 1 ); } /* Prints the property type value * Returns 1 if successful or -1 on error */ int libpff_debug_property_type_value_print( libpff_list_t *name_to_id_map_list, uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int debug_item_type, int ascii_codepage, libcerror_error_t **error ) { static char *function = "libpff_debug_property_type_value_print"; if( debug_item_type == LIBPFF_DEBUG_ITEM_TYPE_DEFAULT ) { if( libpff_debug_mapi_value_print( name_to_id_map_list, entry_type, value_type, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print mapi value.", function ); return( -1 ); } return( 1 ); } else if( debug_item_type == LIBPFF_DEBUG_ITEM_TYPE_NAME_TO_ID_MAP ) { if( libpff_debug_name_to_id_map_value_print( entry_type, value_type, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print name to id map value.", function ); return( -1 ); } return( 1 ); } else if( value_data != NULL ) { libcnotify_print_data( value_data, value_data_size, 0 ); return( 1 ); } return( 1 ); } /* Prints the MAPI value * Returns 1 if successful or -1 on error */ int libpff_debug_mapi_value_print( libpff_list_t *name_to_id_map_list, uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_debug_mapi_value_print"; int list_iterator = 0; if( name_to_id_map_list != NULL ) { list_element = name_to_id_map_list->first_element; for( list_iterator = 0; list_iterator < name_to_id_map_list->number_of_elements; list_iterator++ ) { if( list_element == NULL ) { break; } if( list_element->value == NULL ) { continue; } if( ( (libpff_internal_name_to_id_map_entry_t *) list_element->value )->identifier == entry_type ) { if( ( (libpff_internal_name_to_id_map_entry_t *) list_element->value )->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC ) { entry_type = ( (libpff_internal_name_to_id_map_entry_t *) list_element->value )->numeric_value; break; } } list_element = list_element->next_element; } } if( libfmapi_debug_print_value( entry_type, value_type, value_data, value_data_size, ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print MAPI value.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); if( value_data != NULL ) { libcnotify_print_data( value_data, value_data_size, 0 ); } else { libcnotify_printf( "\n\n" ); } } return( 1 ); } /* Prints the name to id map value * Returns 1 if successful or -1 on error */ int libpff_debug_name_to_id_map_value_print( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ) { libcstring_system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; static char *function = "libpff_debug_name_to_id_map_value_print"; uint32_t number_of_values = 0; uint32_t value_32bit = 0; uint32_t value_iterator = 0; uint16_t value_16bit = 0; int result = 0; if( value_type != 0x0102 ) { if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); goto on_error; } libcnotify_print_data( value_data, value_data_size, 0 ); } else if( entry_type == 0x0002 ) { if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); goto on_error; } if( ( value_data_size % 16 ) == 0 ) { number_of_values = (uint32_t) ( value_data_size / 16 ); if( number_of_values > 0 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); goto on_error; } for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { if( libfguid_identifier_copy_from_byte_stream( guid, value_data, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); goto on_error; } libcnotify_printf( "Class identifier: %02" PRIu32 "\t: %" PRIs_LIBCSTRING_SYSTEM " (%s)\n", value_iterator, guid_string, libfmapi_class_identifier_get_name( value_data ) ); value_data += 16; } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } } libcnotify_printf( "\n" ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } } else if( entry_type == 0x003 ) { if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); goto on_error; } if( ( value_data_size % 8 ) == 0 ) { number_of_values = (uint32_t) ( value_data_size / 8 ); for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); value_data += 4; byte_stream_copy_to_uint16_little_endian( value_data, value_16bit ); value_data += 2; if( ( value_16bit & 0x00000001 ) == 0x00000001 ) { libcnotify_printf( "Entry: %04" PRIu32 " reference\t: 0x%08" PRIx32 "\n", value_iterator, value_32bit ); } else { libcnotify_printf( "Entry: %04" PRIu32 " value\t: 0x%08" PRIx32 "\n", value_iterator, value_32bit ); } libcnotify_printf( "Entry: %04" PRIu32 " type\t: %" PRIu16 "\n", value_iterator, value_16bit ); byte_stream_copy_to_uint16_little_endian( value_data, value_16bit ); libcnotify_printf( "Entry: %04" PRIu32 " number\t: 0x%04" PRIx16 "\n", value_iterator, value_16bit ); value_data += 2; } libcnotify_printf( "\n" ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } } else if( entry_type >= 0x1000 ) { if( value_data == NULL ) { libcnotify_printf( "\n" ); } else if( ( value_data_size % 8 ) == 0 ) { number_of_values = (uint32_t) ( value_data_size / 8 ); for( value_iterator = 0; value_iterator < number_of_values; value_iterator++ ) { byte_stream_copy_to_uint32_little_endian( value_data, value_32bit ); value_data += 4; byte_stream_copy_to_uint16_little_endian( value_data, value_16bit ); value_data += 2; if( ( value_16bit & 0x00000001 ) == 0x00000001 ) { libcnotify_printf( "Validation entry: %02" PRIu32 " crc\t: 0x%08" PRIx32 "\n", value_iterator, value_32bit ); } else { libcnotify_printf( "Validation entry: %02" PRIu32 " value\t: 0x%08" PRIx32 "\n", value_iterator, value_32bit ); } libcnotify_printf( "Validation entry: %02" PRIu32 " type\t: %" PRIu16 "\n", value_iterator, value_16bit ); byte_stream_copy_to_uint16_little_endian( value_data, value_16bit ); libcnotify_printf( "Validation entry: %02" PRIu32 " number\t: 0x%04" PRIx16 "\n", value_iterator, value_16bit ); value_data += 2; } libcnotify_printf( "\n" ); } else { libcnotify_print_data( value_data, value_data_size, 0 ); } } else { libcnotify_print_data( value_data, value_data_size, 0 ); } return( 1 ); on_error: if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } return( -1 ); } /* Prints the read offsets * Returns 1 if successful or -1 on error */ int libpff_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libpff_debug_print_read_offsets"; off64_t offset = 0; size64_t size = 0; int number_of_offsets = 0; int offset_iterator = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( libbfio_handle_get_number_of_offsets_read( file_io_handle, &number_of_offsets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of offsets read.", function ); return( -1 ); } libcnotify_printf( "Offsets read:\n" ); for( offset_iterator = 0; offset_iterator < number_of_offsets; offset_iterator++ ) { if( libbfio_handle_get_offset_read( file_io_handle, offset_iterator, &offset, &size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset: %d.", function, offset_iterator ); return( -1 ); } libcnotify_printf( "%08" PRIu64 " ( 0x%08" PRIx64 " ) - %08" PRIu64 " ( 0x%08" PRIx64 " ) size: %" PRIu64 "\n", offset, offset, offset + size, offset + size, size ); } libcnotify_printf( "\n" ); return( 1 ); } #endif libpff-20120802/libpff/libpff_multi_value.h0000644000175000017500000001016312005155304015414 00000000000000/* * Multi value functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_MULTI_VALUE_H ) #define _LIBPFF_INTERNAL_MULTI_VALUE_H #include #include #include "libpff_extern.h" #include "libpff_libcerror.h" #include "libpff_list_type.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_internal_multi_value libpff_internal_multi_value_t; struct libpff_internal_multi_value { /* The multi value type */ uint32_t value_type; /* The value data */ uint8_t *value_data; /* The value data size */ size_t value_data_size; /* The number of values */ uint32_t number_of_values; /* The value byte offsets */ uint32_t *value_offset; /* The value byte sizes */ size_t *value_size; /* A copy of the ASCII codepage */ int ascii_codepage; }; int libpff_multi_value_initialize( libpff_multi_value_t **multi_value, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_free( libpff_multi_value_t **multi_value, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_number_of_values( libpff_multi_value_t *multi_value, int *number_of_values, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value( libpff_multi_value_t *multi_value, int value_index, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_32bit( libpff_multi_value_t *multi_value, int value_index, uint32_t *value, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_64bit( libpff_multi_value_t *multi_value, int value_index, uint64_t *value, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_filetime( libpff_multi_value_t *multi_value, int value_index, uint64_t *filetime, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf8_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf8_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf8_string( libpff_multi_value_t *multi_value, int value_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf16_string_size( libpff_multi_value_t *multi_value, int value_index, size_t *utf16_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_utf16_string( libpff_multi_value_t *multi_value, int value_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_binary_data_size( libpff_multi_value_t *multi_value, int value_index, size_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_binary_data( libpff_multi_value_t *multi_value, int value_index, uint8_t *binary_data, size_t size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_multi_value_get_value_guid( libpff_multi_value_t *multi_value, int value_index, uint8_t *guid, size_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_allocation_table.c0000644000175000017500000002425712005155304016366 00000000000000/* * Allocation table functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_allocation_table.h" #include "libpff_definitions.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfmapi.h" #include "libpff_offset_list.h" #include "pff_allocation_table.h" /* Reads an allocation table * Returns 1 if successful or -1 on error */ int libpff_allocation_table_read( libpff_offset_list_t *unallocated_block_list, libbfio_handle_t *file_io_handle, off64_t allocation_table_offset, uint8_t file_type, libcerror_error_t **error ) { uint8_t *allocation_table_data = NULL; uint8_t *table_data = NULL; static char *function = "libpff_allocation_table_read"; off64_t back_pointer_offset = 0; off64_t unallocated_offset = 0; size_t read_size = 0; size_t unallocated_size = 0; size_t allocation_block_size = 0; ssize_t read_count = 0; uint32_t stored_crc = 0; uint32_t calculated_crc = 0; uint16_t table_iterator = 0; uint8_t bit_iterator = 0; uint8_t allocation_table_entry = 0; uint8_t allocation_table_type = 0; uint8_t allocation_table_type_copy = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( unallocated_block_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid unallocated block list.", function ); return( -1 ); } if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( ( file_type != LIBPFF_FILE_TYPE_32BIT ) && ( file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( libbfio_handle_seek_offset( file_io_handle, allocation_table_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek allocation table offset: %" PRIi64 ".", function, allocation_table_offset ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { read_size = sizeof( pff_allocation_table_32bit_t ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { read_size = sizeof( pff_allocation_table_64bit_t ); } allocation_table_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * read_size ); if( allocation_table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create alloction table data.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, allocation_table_data, read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read allocation table.", function ); memory_free( allocation_table_data ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: allocation table:\n", function ); libcnotify_print_data( allocation_table_data, read_size, 0 ); } #endif if( file_type == LIBPFF_FILE_TYPE_32BIT ) { table_data = ( (pff_allocation_table_32bit_t *) allocation_table_data )->data; allocation_table_type = ( (pff_allocation_table_32bit_t *) allocation_table_data )->type; allocation_table_type_copy = ( (pff_allocation_table_32bit_t *) allocation_table_data )->type_copy; byte_stream_copy_to_uint32_little_endian( ( (pff_allocation_table_32bit_t *) allocation_table_data )->back_pointer, back_pointer_offset ); byte_stream_copy_to_uint32_little_endian( ( (pff_allocation_table_32bit_t *) allocation_table_data )->crc, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { table_data = ( (pff_allocation_table_64bit_t *) allocation_table_data )->data; allocation_table_type = ( (pff_allocation_table_64bit_t *) allocation_table_data )->type; allocation_table_type_copy = ( (pff_allocation_table_64bit_t *) allocation_table_data )->type_copy; byte_stream_copy_to_uint32_little_endian( ( (pff_allocation_table_64bit_t *) allocation_table_data )->crc, stored_crc ); byte_stream_copy_to_uint64_little_endian( ( (pff_allocation_table_64bit_t *) allocation_table_data )->back_pointer, back_pointer_offset ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t: 0x%02" PRIx8 "\n", function, allocation_table_type ); libcnotify_printf( "%s: type copy\t\t: 0x%02" PRIx8 "\n", function, allocation_table_type_copy ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_allocation_table_32bit_t *) allocation_table_data )->signature, value_16bit ); libcnotify_printf( "%s: signature\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: back pointer\t: %" PRIu64 "\n", function, back_pointer_offset ); libcnotify_printf( "%s: crc\t\t: 0x%" PRIx32 "\n", function, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_allocation_table_64bit_t *) allocation_table_data )->signature, value_16bit ); libcnotify_printf( "%s: signature\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: crc\t\t: 0x%" PRIx32 "\n", function, stored_crc ); libcnotify_printf( "%s: back pointer\t: %" PRIu64 "\n", function, back_pointer_offset ); } libcnotify_printf( "\n" ); } #endif if( libfmapi_crc32_weak_calculate( &calculated_crc, table_data, 496, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to calculate weak CRC.", function ); memory_free( allocation_table_data ); return( -1 ); } if( stored_crc != calculated_crc ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in crc ( %" PRIu32 " != %" PRIu32 " ).", function, stored_crc, calculated_crc ); /* TODO implement error tollerance */ memory_free( allocation_table_data ); return( -1 ); } if( allocation_table_type != allocation_table_type_copy ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in allocation table type ( 0x%02" PRIx8 " != 0x%02" PRIx8 " ).", function, allocation_table_type, allocation_table_type_copy ); /* TODO implement error tollerance */ memory_free( allocation_table_data ); return( -1 ); } if( ( allocation_table_type != LIBPFF_ALLOCATION_TABLE_TYPE_DATA ) && ( allocation_table_type != LIBPFF_ALLOCATION_TABLE_TYPE_PAGE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported allocation table type: 0x%08" PRIx32 "", function, allocation_table_type ); /* TODO implement error tollerance */ memory_free( allocation_table_data ); return( -1 ); } if( allocation_table_type == LIBPFF_ALLOCATION_TABLE_TYPE_PAGE ) { allocation_block_size = 512; back_pointer_offset -= 0x200; } else if( allocation_table_type == LIBPFF_ALLOCATION_TABLE_TYPE_DATA ) { allocation_block_size = 64; } for( table_iterator = 0; table_iterator < 496; table_iterator++ ) { allocation_table_entry = table_data[ table_iterator ]; for( bit_iterator = 0; bit_iterator < 8; bit_iterator++ ) { if( ( allocation_table_entry & 0x80 ) == 0 ) { if( unallocated_size == 0 ) { unallocated_offset = back_pointer_offset; } unallocated_size += allocation_block_size; } else if( unallocated_size > 0 ) { if( libpff_offset_list_append_offset( unallocated_block_list, unallocated_offset, unallocated_size, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append unallocated block to list.", function ); memory_free( allocation_table_data ); return( -1 ); } unallocated_size = 0; } allocation_table_entry <<= 1; back_pointer_offset += allocation_block_size; } } if( unallocated_size > 0 ) { if( libpff_offset_list_append_offset( unallocated_block_list, unallocated_offset, unallocated_size, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append unallocated block to list.", function ); return( -1 ); } unallocated_size = 0; } memory_free( allocation_table_data ); return( 1 ); } libpff-20120802/libpff/libpff_definitions.h.in0000644000175000017500000002434012005155304016010 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_DEFINITIONS_H ) #define _LIBPFF_INTERNAL_DEFINITIONS_H #include #include /* The endian definitions */ #define LIBPFF_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBPFF_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBPFF for local use of libpff */ #if !defined( HAVE_LOCAL_LIBPFF ) #include /* The definitions in are copied here * for local use of libpff */ #else #define LIBPFF_VERSION @VERSION@ /* The version string */ #define LIBPFF_VERSION_STRING "@VERSION@" /* The file access flags * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3-8 not used */ enum LIBPFF_ACCESS_FLAGS { LIBPFF_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBPFF_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBPFF_OPEN_READ ( LIBPFF_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_WRITE ( LIBPFF_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_READ_WRITE ( LIBPFF_ACCESS_FLAG_READ | LIBPFF_ACCESS_FLAG_WRITE ) /* TODO deprecated remove after a while */ #define LIBPFF_FLAG_READ LIBPFF_ACCESS_FLAG_READ #define LIBPFF_FLAG_WRITE LIBPFF_ACCESS_FLAG_WRITE /* The recovery flags */ enum LIBPFF_RECOVERY_FLAGS { LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA = 0x01, LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS = 0x02 }; /* The file types */ enum LIBPFF_FILE_TYPES { LIBPFF_FILE_TYPE_32BIT = 32, LIBPFF_FILE_TYPE_64BIT = 64 }; /* The file content types */ enum LIBPFF_FILE_CONTENT_TYPES { LIBPFF_FILE_CONTENT_TYPE_PAB = (int) 'a', LIBPFF_FILE_CONTENT_TYPE_PST = (int) 'p', LIBPFF_FILE_CONTENT_TYPE_OST = (int) 'o' }; /* The encryption types */ enum LIBPFF_ENCRYPTION_TYPES { LIBPFF_ENCRYPTION_TYPE_NONE = 0, LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE = 1, LIBPFF_ENCRYPTION_TYPE_HIGH = 2 }; /* The item types * These item types partially map to the message classes * LIBPFF_ITEM_TYPE_UNDEFINED (initialization value) * LIBPFF_ITEM_TYPE_ACTIVITY IPM.Activity * LIBPFF_ITEM_TYPE_APPOINTMENT IPM.Appointment * LIBPFF_ITEM_TYPE_ATTACHMENT (attachment) * LIBPFF_ITEM_TYPE_ATTACHMENTS (attachments) * LIBPFF_ITEM_TYPE_COMMON IPM * LIBPFF_ITEM_TYPE_CONFIGURATION IPM.Configuration.* * LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE IPM.Conflict.Message * LIBPFF_ITEM_TYPE_CONTACT IPM.Contact * LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST IPM.DistList * LIBPFF_ITEM_TYPE_DOCUMENT IPM.Document.* * LIBPFF_ITEM_TYPE_EMAIL IPM.Note, REPORT.IPM.Note.* * LIBPFF_ITEM_TYPE_EMAIL_SMIME IPM.Note.SMIME.* * LIBPFF_ITEM_TYPE_FAX IPM.FAX, IPM.Note.Fax * LIBPFF_ITEM_TYPE_FOLDER (folder/container) * LIBPFF_ITEM_TYPE_MEETING IPM.Schedule.Meeting * LIBPFF_ITEM_TYPE_MMS IPM.Note.Mobile.MMS * LIBPFF_ITEM_TYPE_NOTE IPM.StickyNote * LIBPFF_ITEM_TYPE_POSTING_NOTE IPM.Post * LIBPFF_ITEM_TYPE_RECIPIENTS (recipients) * LIBPFF_ITEM_TYPE_RSS_FEED IPM.Post.RSS * LIBPFF_ITEM_TYPE_SHARING IPM.Sharing.* * LIBPFF_ITEM_TYPE_SMS IPM.Note.Mobile.SMS * LIBPFF_ITEM_TYPE_TASK IPM.Task * LIBPFF_ITEM_TYPE_TASK_REQUEST IPM.TaskRequest.* * LIBPFF_ITEM_TYPE_VOICEMAIL IPM.Note.Voicemail * LIBPFF_ITEM_TYPE_UNKNOWN (unknown item type, used in folder content type) * * Unsupported: * IPM.Post */ enum LIBPFF_ITEM_TYPES { LIBPFF_ITEM_TYPE_UNDEFINED, LIBPFF_ITEM_TYPE_ACTIVITY, LIBPFF_ITEM_TYPE_APPOINTMENT, LIBPFF_ITEM_TYPE_ATTACHMENT, LIBPFF_ITEM_TYPE_ATTACHMENTS, LIBPFF_ITEM_TYPE_COMMON, LIBPFF_ITEM_TYPE_CONFIGURATION, LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE, LIBPFF_ITEM_TYPE_CONTACT, LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST, LIBPFF_ITEM_TYPE_DOCUMENT, LIBPFF_ITEM_TYPE_EMAIL, LIBPFF_ITEM_TYPE_EMAIL_SMIME, LIBPFF_ITEM_TYPE_FAX, LIBPFF_ITEM_TYPE_FOLDER, LIBPFF_ITEM_TYPE_MEETING, LIBPFF_ITEM_TYPE_MMS, LIBPFF_ITEM_TYPE_NOTE, LIBPFF_ITEM_TYPE_POSTING_NOTE, LIBPFF_ITEM_TYPE_RECIPIENTS, LIBPFF_ITEM_TYPE_RSS_FEED, LIBPFF_ITEM_TYPE_SHARING, LIBPFF_ITEM_TYPE_SMS, LIBPFF_ITEM_TYPE_SUB_ASSOCIATED_CONTENTS, LIBPFF_ITEM_TYPE_SUB_FOLDERS, LIBPFF_ITEM_TYPE_SUB_MESSAGES, LIBPFF_ITEM_TYPE_TASK, LIBPFF_ITEM_TYPE_TASK_REQUEST, LIBPFF_ITEM_TYPE_VOICEMAIL, LIBPFF_ITEM_TYPE_UNKNOWN }; /* The attachment types */ enum LIBPFF_ATTACHMENT_TYPES { LIBPFF_ATTACHMENT_TYPE_UNDEFINED = 0, LIBPFF_ATTACHMENT_TYPE_DATA = (int) 'd', LIBPFF_ATTACHMENT_TYPE_ITEM = (int) 'i', LIBPFF_ATTACHMENT_TYPE_REFERENCE = (int) 'r' }; /* The unallocated block type */ enum LIBPFF_UNALLOCATED_BLOCK_TYPES { LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA = (int) 'd', LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE = (int) 'p' }; /* The name to id map entry types */ enum LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPES { LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC = (int) 'n', LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING = (int) 's' }; /* The entry value flags */ enum LIBPFF_ENTRY_VALUE_FLAGS { LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE = 0x01, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP = 0x02 }; #endif /* !defined( HAVE_LOCAL_LIBPFF ) */ /* The index types */ enum LIBPFF_INDEX_TYPES { LIBPFF_INDEX_TYPE_OFFSET = 0x80, LIBPFF_INDEX_TYPE_DESCRIPTOR = 0x81 }; /* The node identifier type * Stored in the 5 LSB of the descriptor identifier */ enum LIBPFF_NODE_IDENTIFIER_TYPES { LIBPFF_NODE_IDENTIFIER_TYPE_TABLE_VALUE = 0x00, LIBPFF_NODE_IDENTIFIER_TYPE_INTERNAL = 0x01, LIBPFF_NODE_IDENTIFIER_TYPE_FOLDER = 0x02, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_FOLDER = 0x03, LIBPFF_NODE_IDENTIFIER_TYPE_MESSAGE = 0x04, LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENT = 0x05, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_UPDATE_QUEUE = 0x06, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CRITERIA_OBJECT = 0x07, LIBPFF_NODE_IDENTIFIER_TYPE_ASSOCIATED_CONTENT = 0x08, LIBPFF_NODE_IDENTIFIER_TYPE_CONTENTS_TABLE_INDEX = 0x0a, LIBPFF_NODE_IDENTIFIER_TYPE_INBOX = 0x0b, LIBPFF_NODE_IDENTIFIER_TYPE_OUTBOX = 0x0c, LIBPFF_NODE_IDENTIFIER_TYPE_SUB_FOLDERS = 0x0d, LIBPFF_NODE_IDENTIFIER_TYPE_SUB_MESSAGES = 0x0e, LIBPFF_NODE_IDENTIFIER_TYPE_SUB_ASSOCIATED_CONTENTS = 0x0f, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CONTENTS_TABLE = 0x10, LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENTS = 0x11, LIBPFF_NODE_IDENTIFIER_TYPE_RECIPIENTS = 0x12, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_TABLE = 0x13, LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1718 = 0x16, LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1751 = 0x17, LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1784 = 0x18, LIBPFF_NODE_IDENTIFIER_TYPE_LOCAL_DESCRIPTOR_VALUE = 0x1f }; /* Predefined descriptor identifiers */ enum LIBPFF_DESCRIPTOR_IDENTIFIERS { LIBPFF_DESCRIPTOR_IDENTIFIER_MESSAGE_STORE = 0x0021, LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP = 0x0061, LIBPFF_DESCRIPTOR_IDENTIFIER_FOLDER_TEMPLATE = 0x00a1, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_FOLDER_TEMPLATE = 0x00c1, LIBPFF_DESCRIPTOR_IDENTIFIER_ROOT_FOLDER = 0x0122, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_MANAGEMENT_QUEUE = 0x01e1, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_ACTIVITY_LIST = 0x0201, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_RESERVED1 = 0x0241, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_GATHERER_QUEUE = 0x0281, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_GATHERER_DESCRIPTOR = 0x02a1, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_RESERVED2 = 0x02e1, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_RESERVED3 = 0x0301, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_GATHERER_FOLDER_QUEUE = 0x0321, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2049 = 0x0801, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2081 = 0x0821, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2113 = 0x0841, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_3073 = 0x0c01, }; /* Predefined local descriptor identifiers */ enum LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIERS { LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS = 0x0671, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS = 0x0692, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718 = 0x06b6, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1753 = 0x06d9, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1781 = 0x06f5, }; /* Flags for the data_array_read_segment function */ enum LIBPFF_READ_FLAGS { LIBPFF_READ_FLAG_IGNORE_FORCE_DECRYPTION = 0x02 }; /* The mask for the (file) offset index identifier * The lower order bit of the (file) offset index identifier is used for other purposes * and needs to be excluded when the identifier is searched in the index */ #define LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK 0xfffffffffffffffeULL /* The 2nd LSB of the (file) offset index identifier is used to flag * if the block is intended for internal use (contains a data array or local descriptors) * or external use (contains raw data or a table) */ #define LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL 0x0000000000000002ULL /* The item flags */ enum LIBPFF_ITEM_FLAGS { LIBPFF_ITEM_FLAG_NON_MANAGED_FILE_IO_HANDLE = 0x00, LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE = 0x01, LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE = 0x02, }; /* The maximum number of cache entries defintions */ #define LIBPFF_MAXIMUM_CACHE_ENTRIES_INDEX_NODES 16384 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_DESCRIPTOR_INDEX_VALUES 8192 - 3 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_OFFSET_INDEX_VALUES 32768 - 3 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_LOCAL_DESCRIPTORS_NODES 256 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_LOCAL_DESCRIPTORS_VALUES 128 - 3 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_DATA_ARRAY 8 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_DATA_BLOCK 1 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_ITEM 8 #endif libpff-20120802/libpff/libpff_list_type.h0000644000175000017500000001216312005155304015104 00000000000000/* * List type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIST_TYPE_H ) #define _LIBPFF_LIST_TYPE_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The list comparison definitions */ enum LIBPFF_LIST_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBPFF_LIST_COMPARE_LESS, /* The first and second values are equal */ LIBPFF_LIST_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBPFF_LIST_COMPARE_GREATER }; /* The list insert flag definitions */ enum LIBPFF_LIST_INSERT_FLAGS { /* Allow duplicate entries */ LIBPFF_LIST_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBPFF_LIST_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libpff_list_element libpff_list_element_t; struct libpff_list_element { /* The previous list element */ libpff_list_element_t *previous_element; /* The next list element */ libpff_list_element_t *next_element; /* The value */ intptr_t *value; }; typedef struct libpff_list libpff_list_t; struct libpff_list { /* The number of elements */ int number_of_elements; /* The first element */ libpff_list_element_t *first_element; /* The last element */ libpff_list_element_t *last_element; }; int libpff_list_element_initialize( libpff_list_element_t **element, libcerror_error_t **error ); int libpff_list_element_free( libpff_list_element_t **element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_list_element_get_value( libpff_list_element_t *element, intptr_t **value, libcerror_error_t **error ); int libpff_list_element_set_value( libpff_list_element_t *element, intptr_t *value, libcerror_error_t **error ); int libpff_list_initialize( libpff_list_t **list, libcerror_error_t **error ); int libpff_list_free( libpff_list_t **list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_list_empty( libpff_list_t *list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_list_clone( libpff_list_t **destination_list, libpff_list_t *source_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_list_get_number_of_elements( libpff_list_t *list, int *number_of_elements, libcerror_error_t **error ); int libpff_list_get_element_by_index( libpff_list_t *list, int list_element_index, libpff_list_element_t **element, libcerror_error_t **error ); int libpff_list_get_value_by_index( libpff_list_t *list, int list_element_index, intptr_t **value, libcerror_error_t **error ); int libpff_list_prepend_element( libpff_list_t *list, libpff_list_element_t *element, libcerror_error_t **error ); int libpff_list_prepend_value( libpff_list_t *list, intptr_t *value, libcerror_error_t **error ); int libpff_list_append_element( libpff_list_t *list, libpff_list_element_t *element, libcerror_error_t **error ); int libpff_list_append_value( libpff_list_t *list, intptr_t *value, libcerror_error_t **error ); int libpff_list_insert_element( libpff_list_t *list, libpff_list_element_t *element, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); int libpff_list_insert_value( libpff_list_t *list, intptr_t *value, int (*value_compare_function)( intptr_t *first, intptr_t *second, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); int libpff_list_remove_element( libpff_list_t *list, libpff_list_element_t *element, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_support.c0000644000175000017500000002252612005155304014603 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_definitions.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libclocale.h" #include "libpff_libcstring.h" #include "libpff_support.h" #if !defined( HAVE_LOCAL_LIBPFF ) /* Returns the library version */ const char *libpff_get_version( void ) { return( (const char *) LIBPFF_VERSION_STRING ); } /* Returns the access flags for reading */ int libpff_get_access_flags_read( void ) { return( (uint8_t) LIBPFF_ACCESS_FLAG_READ ); } /* Retrieves the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ int libpff_get_codepage( int *codepage, libcerror_error_t **error ) { static char *function = "libpff_get_codepage"; if( libclocale_codepage_get( codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve codepage.", function ); return( -1 ); } return( 1 ); } /* Sets the narrow system string codepage * A value of 0 represents no codepage, UTF-8 encoding is used instead * Returns 1 if successful or -1 on error */ int libpff_set_codepage( int codepage, libcerror_error_t **error ) { static char *function = "libpff_set_codepage"; if( libclocale_codepage_set( codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set codepage.", function ); return( -1 ); } return( 1 ); } #endif /* !defined( HAVE_LOCAL_LIBPFF ) */ /* Determines if a file is a Personal Folder File file (check for the file signature) * Returns 1 if true, 0 if not or -1 on error */ int libpff_check_file_signature( const char *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libpff_check_file_signature"; size_t filename_length = 0; int result = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } filename_length = libcstring_narrow_string_length( filename ); if( filename_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( libbfio_file_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } if( libbfio_file_set_name( file_io_handle, filename, filename_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set filename in file IO handle.", function ); goto on_error; } result = libpff_check_file_signature_file_io_handle( file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to check file signature using a file handle.", function ); goto on_error; } if( libbfio_handle_free( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free file IO handle.", function ); goto on_error; } return( result ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( -1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Determines if a file is a Personal Folder File file (check for the file signature) * Returns 1 if true, 0 if not or -1 on error */ int libpff_check_file_signature_wide( const wchar_t *filename, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; static char *function = "libpff_check_file_signature_wide"; size_t filename_length = 0; int result = 0; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } filename_length = libcstring_wide_string_length( filename ); if( filename_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( libbfio_file_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } if( libbfio_file_set_name_wide( file_io_handle, filename, filename_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set filename in file IO handle.", function ); goto on_error; } result = libpff_check_file_signature_file_io_handle( file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to check file signature using a file handle.", function ); goto on_error; } if( libbfio_handle_free( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to free file IO handle.", function ); goto on_error; } return( result ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( -1 ); } #endif /* Determines if a file is a Personal Folder File file (check for the file signature) using a Basic File IO (bfio) handle * Returns 1 if true, 0 if not or -1 on error */ int libpff_check_file_signature_file_io_handle( libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { uint8_t signature[ 4 ]; static char *function = "libpff_check_file_signature_file_io_handle"; ssize_t read_count = 0; int file_io_handle_is_open = 0; if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } file_io_handle_is_open = libbfio_handle_is_open( file_io_handle, error ); if( file_io_handle_is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } else if( file_io_handle_is_open == 0 ) { if( libbfio_handle_open( file_io_handle, LIBBFIO_OPEN_READ, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); goto on_error; } } if( libbfio_handle_seek_offset( file_io_handle, 0, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek file header offset: 0.", function ); goto on_error; } read_count = libbfio_handle_read_buffer( file_io_handle, signature, 4, error ); if( read_count != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read signature.", function ); goto on_error; } if( file_io_handle_is_open == 0 ) { if( libbfio_handle_close( file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file.", function ); return( -1 ); } } if( memory_compare( pff_file_signature, signature, 4 ) == 0 ) { return( 1 ); } return( 0 ); on_error: if( file_io_handle_is_open == 0 ) { libbfio_handle_close( file_io_handle, error ); } return( -1 ); } libpff-20120802/libpff/libpff_value_type.c0000644000175000017500000007647112005155304015254 00000000000000/* * Values type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_definitions.h" #include "libpff_libcerror.h" #include "libpff_libuna.h" #include "libpff_value_type.h" /* Function to determine if there are zero bytes in a string * Trailing zero bytes not included * Returns 1 if the buffer contains zero bytes, 0 if not or -1 on error */ int libpff_value_type_string_contains_zero_bytes( uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_string_contains_zero_bytes"; size_t buffer_iterator = 0; uint8_t zero_byte_found = 0; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( buffer_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid buffer size value exceeds maximum.", function ); return( -1 ); } for( buffer_iterator = 0; buffer_iterator < buffer_size; buffer_iterator++ ) { if( zero_byte_found == 0 ) { if( buffer[ buffer_iterator ] == 0 ) { zero_byte_found = 1; } } else { if( buffer[ buffer_iterator ] != 0 ) { return( 1 ); } } } return( 0 ); } /* Converts the value data into a boolean value * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_boolean( uint8_t *value_data, size_t value_data_size, uint8_t *value_boolean, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_boolean"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_boolean == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value boolean.", function ); return( -1 ); } /* The value data size of a boolean value is 1 */ if( value_data_size != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data size.", function ); return( -1 ); } *value_boolean = value_data[ 0 ]; return( 1 ); } /* Converts the value data into a 16-bit value * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_16bit( uint8_t *value_data, size_t value_data_size, uint16_t *value_16bit, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_16bit"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_16bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value 16-bit.", function ); return( -1 ); } /* The value data size of a 16-bit value is 2 */ if( value_data_size != 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data size.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( value_data, *value_16bit ); return( 1 ); } /* Converts the value data into a 32-bit value * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_32bit( uint8_t *value_data, size_t value_data_size, uint32_t *value_32bit, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_32bit"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value 32-bit.", function ); return( -1 ); } /* The value data size of a 32-bit value is 4 */ if( value_data_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data size.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( value_data, *value_32bit ); return( 1 ); } /* Converts the value data into a 64-bit value * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_64bit( uint8_t *value_data, size_t value_data_size, uint64_t *value_64bit, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_64bit"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value 64-bit.", function ); return( -1 ); } /* The value data size of a 64-bit value is 8 */ if( value_data_size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data size.", function ); return( -1 ); } byte_stream_copy_to_uint64_little_endian( value_data, *value_64bit ); return( 1 ); } /* Converts the value data into a size value * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_size( uint8_t *value_data, size_t value_data_size, size_t *value_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_size"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value size.", function ); return( -1 ); } /* The value data size of a size value is 4 or 8 */ if( ( value_data_size != 4 ) && ( value_data_size != 8 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data size.", function ); return( -1 ); } if( value_data_size == 4 ) { byte_stream_copy_to_uint32_little_endian( value_data, *value_size ); } else if( value_data_size == 8 ) { byte_stream_copy_to_uint64_little_endian( value_data, *value_size ); } return( 1 ); } /* Converts the value data into a floating point value * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_floating_point( uint8_t *value_data, size_t value_data_size, double *value_floating_point, libcerror_error_t **error ) { byte_stream_float64_t value_double; byte_stream_float32_t value_float; static char *function = "libpff_value_type_copy_to_floating_point"; if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data.", function ); return( -1 ); } if( value_floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value floating point.", function ); return( -1 ); } /* The value data size of a size value is 4 or 8 */ if( ( value_data_size != 4 ) && ( value_data_size != 8 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid value data size.", function ); return( -1 ); } if( value_data_size == 4 ) { byte_stream_copy_to_uint32_little_endian( value_data, value_float.integer ); *value_floating_point = (double) value_float.floating_point; } else if( value_data_size == 8 ) { byte_stream_copy_to_uint64_little_endian( value_data, value_double.integer ); *value_floating_point = value_double.floating_point; } return( 1 ); } /* Determines the UTF-8 string size from the value data * Returns 1 if successful or -1 on error */ int libpff_value_type_get_utf8_string_size( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_get_utf8_string_size"; int result = 0; if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { *utf8_string_size = 0; return( 1 ); } /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ( is_ascii_string != 0 ) && ( ascii_codepage == 1200 ) ) { result = libpff_value_type_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { result = libuna_utf8_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, utf8_string_size, error ); } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { result = libuna_utf8_string_size_from_utf7_stream( value_data, value_data_size, utf8_string_size, error ); } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { result = libuna_utf8_string_size_from_utf8_stream( value_data, value_data_size, utf8_string_size, error ); } else { /* TODO currently libuna uses the same numeric values for the codepages as PFF * add a mapping function if this implementation changes */ result = libuna_utf8_string_size_from_byte_stream( value_data, value_data_size, (int) ascii_codepage, utf8_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size.", function ); return( -1 ); } return( 1 ); } /* Converts the value data into an UTF-8 string * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_utf8_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_utf8_string"; int result = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-8 string size value zero or less.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { utf8_string[ 0 ] = 0; return( 1 ); } /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ( is_ascii_string != 0 ) && ( ascii_codepage == 1200 ) ) { result = libpff_value_type_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { result = libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { result = libuna_utf8_string_copy_from_utf7_stream( utf8_string, utf8_string_size, value_data, value_data_size, error ); } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { result = libuna_utf8_string_copy_from_utf8_stream( utf8_string, utf8_string_size, value_data, value_data_size, error ); } else { /* TODO currently libuna uses the same numeric values for the codepages as PFF * add a mapping function if this implementation changes */ result = libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, value_data, value_data_size, (int) ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Compares the value data with an UTF-8 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libpff_value_type_compare_with_utf8_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_compare_with_utf8_string"; int result = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-8 string size value zero or less.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { return( 0 ); } /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ( is_ascii_string != 0 ) && ( ascii_codepage == 1200 ) ) { result = libpff_value_type_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { result = libuna_utf8_string_compare_with_utf16_stream( utf8_string, utf8_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-8 string with UTF-16 stream.", function ); return( -1 ); } } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { result = libuna_utf8_string_compare_with_utf7_stream( utf8_string, utf8_string_size, value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-8 string with UTF-7 stream.", function ); return( -1 ); } } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { result = libuna_utf8_string_compare_with_utf8_stream( utf8_string, utf8_string_size, value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-8 string with UTF-8 stream.", function ); return( -1 ); } } else { /* TODO currently libuna uses the same numeric values for the codepages as PFF * add a mapping function if this implementation changes */ result = libuna_utf8_string_compare_with_byte_stream( utf8_string, utf8_string_size, value_data, value_data_size, (int) ascii_codepage, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-8 string with byte stream.", function ); return( -1 ); } } return( result ); } /* Determines the UTF-16 string size from the value data * Returns 1 if successful or -1 on error */ int libpff_value_type_get_utf16_string_size( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, size_t *utf16_string_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_get_utf16_string_size"; int result = 0; if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { *utf16_string_size = 0; return( 1 ); } /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ( is_ascii_string != 0 ) && ( ascii_codepage == 1200 ) ) { result = libpff_value_type_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { result = libuna_utf16_string_size_from_utf16_stream( value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, utf16_string_size, error ); } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { result = libuna_utf16_string_size_from_utf7_stream( value_data, value_data_size, utf16_string_size, error ); } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { result = libuna_utf16_string_size_from_utf8( value_data, value_data_size, utf16_string_size, error ); } else { /* TODO currently libuna uses the same numeric values for the codepages as PFF * add a mapping function if this implementation changes */ result = libuna_utf16_string_size_from_byte_stream( value_data, value_data_size, (int) ascii_codepage, utf16_string_size, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size.", function ); return( -1 ); } return( 1 ); } /* Converts the value data into an UTF-16 string * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_utf16_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_utf16_string"; int result = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-16 string size value zero or less.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { utf16_string[ 0 ] = 0; return( 1 ); } /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ( is_ascii_string != 0 ) && ( ascii_codepage == 1200 ) ) { result = libpff_value_type_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { result = libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { result = libuna_utf16_string_copy_from_utf7_stream( utf16_string, utf16_string_size, value_data, value_data_size, error ); } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { result = libuna_utf16_string_copy_from_utf8( utf16_string, utf16_string_size, value_data, value_data_size, error ); } else { /* TODO currently libuna uses the same numeric values for the codepages as PFF * add a mapping function if this implementation changes */ result = libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, value_data, value_data_size, (int) ascii_codepage, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Compares the value data with an UTF-16 string * Returns 1 if the strings are equal, 0 if not or -1 on error */ int libpff_value_type_compare_with_utf16_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_compare_with_utf16_string"; int result = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-16 string size value zero or less.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } /* Internally an empty string is represented by a NULL reference */ if( value_data == NULL ) { return( 0 ); } /* Codepage 1200 represents Unicode * If the codepage is 1200 find out if the string is encoded in UTF-8 or UTF-16 little-endian */ if( ( is_ascii_string != 0 ) && ( ascii_codepage == 1200 ) ) { result = libpff_value_type_string_contains_zero_bytes( value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value type contains zero bytes.", function ); return( -1 ); } else if( result != 0 ) { is_ascii_string = 0; } } /* String is in UTF-16 little-endian */ if( is_ascii_string == 0 ) { result = libuna_utf16_string_compare_with_utf16_stream( utf16_string, utf16_string_size, value_data, value_data_size, LIBUNA_ENDIAN_LITTLE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-16 string with UTF-16 stream.", function ); return( -1 ); } } /* Codepage 65000 represents UTF-7 */ else if( ascii_codepage == 65000 ) { result = libuna_utf16_string_compare_with_utf7_stream( utf16_string, utf16_string_size, value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-16 string with UTF-7 stream.", function ); return( -1 ); } } /* Codepage 1200 or 65001 represents UTF-8 */ else if( ( ascii_codepage == 1200 ) || ( ascii_codepage == 65001 ) ) { result = libuna_utf16_string_compare_with_utf8_stream( utf16_string, utf16_string_size, value_data, value_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-16 string with UTF-8 stream.", function ); return( -1 ); } } else { /* TODO currently libuna uses the same numeric values for the codepages as PFF * add a mapping function if this implementation changes */ result = libuna_utf16_string_compare_with_byte_stream( utf16_string, utf16_string_size, value_data, value_data_size, (int) ascii_codepage, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare UTF-16 string with byte stream.", function ); return( -1 ); } } return( 1 ); } /* Determines the binary data size from the value data * Returns 1 if successful or -1 on error */ int libpff_value_type_get_binary_data_size( uint8_t *value_data, size_t value_data_size, size_t *binary_data_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_get_binary_data_size"; if( binary_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data size.", function ); return( -1 ); } /* Internally an empty binary data is represented by a NULL reference */ if( value_data == NULL ) { *binary_data_size = 0; } else { *binary_data_size = value_data_size; } return( 1 ); } /* Converts the value data into binary data * Returns 1 if successful or -1 on error */ int libpff_value_type_copy_to_binary_data( uint8_t *value_data, size_t value_data_size, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ) { static char *function = "libpff_value_type_copy_to_binary_data"; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( binary_data_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid binary data size value zero or less.", function ); return( -1 ); } if( binary_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid binary data size value exceeds maximum.", function ); return( -1 ); } /* Internally empty binary data is represented by a NULL reference */ if( value_data != NULL ) { if( binary_data_size < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: binary data is too small.", function ); return( -1 ); } if( memory_copy( binary_data, value_data, value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set binary data.", function ); return( -1 ); } } return( 1 ); } libpff-20120802/libpff/libpff_free_map.c0000644000175000017500000002300312005155304014634 00000000000000/* * Free map functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_free_map.h" #include "libpff_definitions.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfmapi.h" #include "libpff_offset_list.h" #include "pff_free_map.h" /* Reads an free map * Returns 1 if successful or -1 on error */ int libpff_free_map_read( libpff_offset_list_t *unallocated_block_list, libbfio_handle_t *file_io_handle, off64_t free_map_offset, uint8_t file_type, libcerror_error_t **error ) { uint8_t *free_map_data = NULL; uint8_t *table_data = NULL; static char *function = "libpff_free_map_read"; off64_t back_pointer_offset = 0; off64_t unallocated_offset = 0; size_t read_size = 0; size_t unallocated_size = 0; size_t allocation_block_size = 0; ssize_t read_count = 0; uint32_t stored_crc = 0; uint32_t calculated_crc = 0; uint16_t table_iterator = 0; uint8_t bit_iterator = 0; uint8_t free_map_entry = 0; uint8_t free_map_type = 0; uint8_t free_map_type_copy = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( unallocated_block_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid unallocated block list.", function ); return( -1 ); } if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( ( file_type != LIBPFF_FILE_TYPE_32BIT ) && ( file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( libbfio_handle_seek_offset( file_io_handle, free_map_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek free map offset: %" PRIi64 ".", function, free_map_offset ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { read_size = sizeof( pff_free_map_32bit_t ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { read_size = sizeof( pff_free_map_64bit_t ); } free_map_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * read_size ); if( free_map_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create alloction table data.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, free_map_data, read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read free map.", function ); memory_free( free_map_data ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: free map:\n", function ); libcnotify_print_data( free_map_data, read_size, 0 ); } #endif if( file_type == LIBPFF_FILE_TYPE_32BIT ) { table_data = ( (pff_free_map_32bit_t *) free_map_data )->data; free_map_type = ( (pff_free_map_32bit_t *) free_map_data )->type; free_map_type_copy = ( (pff_free_map_32bit_t *) free_map_data )->type_copy; byte_stream_copy_to_uint32_little_endian( ( (pff_free_map_32bit_t *) free_map_data )->back_pointer, back_pointer_offset ); byte_stream_copy_to_uint32_little_endian( ( (pff_free_map_32bit_t *) free_map_data )->crc, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { table_data = ( (pff_free_map_64bit_t *) free_map_data )->data; free_map_type = ( (pff_free_map_64bit_t *) free_map_data )->type; free_map_type_copy = ( (pff_free_map_64bit_t *) free_map_data )->type_copy; byte_stream_copy_to_uint32_little_endian( ( (pff_free_map_64bit_t *) free_map_data )->crc, stored_crc ); byte_stream_copy_to_uint64_little_endian( ( (pff_free_map_64bit_t *) free_map_data )->back_pointer, back_pointer_offset ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: type\t\t: 0x%02" PRIx8 "\n", function, free_map_type ); libcnotify_printf( "%s: type copy\t: 0x%02" PRIx8 "\n", function, free_map_type_copy ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_free_map_32bit_t *) free_map_data )->signature, value_16bit ); libcnotify_printf( "%s: signature\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: back pointer\t: %" PRIu64 "\n", function, back_pointer_offset ); libcnotify_printf( "%s: crc\t\t: 0x%" PRIx32 "\n", function, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_free_map_64bit_t *) free_map_data )->signature, value_16bit ); libcnotify_printf( "%s: signature\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: crc\t\t: 0x%" PRIx32 "\n", function, stored_crc ); libcnotify_printf( "%s: back pointer\t: %" PRIu64 "\n", function, back_pointer_offset ); } libcnotify_printf( "\n" ); } #endif if( libfmapi_crc32_weak_calculate( &calculated_crc, table_data, 496, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to calculate weak CRC.", function ); memory_free( free_map_data ); return( -1 ); } if( stored_crc != calculated_crc ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in crc ( %" PRIu32 " != %" PRIu32 " ).", function, stored_crc, calculated_crc ); /* TODO implement error tollerance */ memory_free( free_map_data ); return( -1 ); } if( free_map_type != free_map_type_copy ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH, "%s: mismatch in allocation table type ( 0x%02" PRIx8 " != 0x%02" PRIx8 " ).", function, free_map_type, free_map_type_copy ); /* TODO implement error tollerance */ memory_free( free_map_data ); return( -1 ); } if( ( free_map_type != LIBPFF_FREE_MAP_TYPE_DATA ) && ( free_map_type != LIBPFF_FREE_MAP_TYPE_PAGE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported allocation table type: 0x%08" PRIx32 "", function, free_map_type ); /* TODO implement error tollerance */ memory_free( free_map_data ); return( -1 ); } /* TODO */ if( free_map_type == LIBPFF_FREE_MAP_TYPE_PAGE ) { allocation_block_size = 512; back_pointer_offset -= 0x200; } else if( free_map_type == LIBPFF_FREE_MAP_TYPE_DATA ) { allocation_block_size = 64; } for( table_iterator = 0; table_iterator < 496; table_iterator++ ) { free_map_entry = table_data[ table_iterator ]; for( bit_iterator = 0; bit_iterator < 8; bit_iterator++ ) { if( ( free_map_entry & 0x80 ) == 0 ) { if( unallocated_size == 0 ) { unallocated_offset = back_pointer_offset; } unallocated_size += allocation_block_size; } else if( unallocated_size > 0 ) { if( libpff_offset_list_append_offset( unallocated_block_list, unallocated_offset, unallocated_size, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append unallocated block to list.", function ); memory_free( free_map_data ); return( -1 ); } unallocated_size = 0; } free_map_entry <<= 1; back_pointer_offset += allocation_block_size; } } if( unallocated_size > 0 ) { if( libpff_offset_list_append_offset( unallocated_block_list, unallocated_offset, unallocated_size, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append unallocated block to list.", function ); return( -1 ); } unallocated_size = 0; } memory_free( free_map_data ); return( 1 ); } libpff-20120802/libpff/pff_file_header.h0000644000175000017500000001567112005155304014637 00000000000000/* * The file header definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_FILE_HEADER_H ) #define _PFF_FILE_HEADER_H #include #include #if defined( __cplusplus ) extern "C" { #endif #define PFF_FILE_HEADER_CONTENT_TYPE_PAB 0x4142 #define PFF_FILE_HEADER_CONTENT_TYPE_PST 0x4d53 #define PFF_FILE_HEADER_CONTENT_TYPE_OST 0x4f53 typedef struct pff_file_header pff_file_header_t; struct pff_file_header { /* Signature * Consists of 4 bytes * 0x21 0x42 0x24 0x2e */ uint8_t signature[ 4 ]; /* Weak CRC of the following 471 bytes * Consists of 4 bytes */ uint8_t crc[ 4 ]; /* Content type * Consists of 2 bytes * 0x53 0x4d (SM) for PST files * 0x53 0x4f (SO) for OST files */ uint8_t content_type[ 2 ]; /* Data version * Consists of 2 byte * 0x000e for 32 bit data type * 0x0015 for 64 bit data type * 0x0017 for 64 bit data type */ uint8_t data_version[ 2 ]; /* Content verion * Consists of 2 bytes */ uint8_t content_version[ 2 ]; /* Creation platform * Consists of 1 byte */ uint8_t creation_platform; /* Access platform * Consists of 1 byte */ uint8_t access_platform; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown2[ 4 ]; }; typedef struct pff_file_header_data_32bit pff_file_header_data_32bit_t; struct pff_file_header_data_32bit { /* Next index pointer * Consists of 4 bytes */ uint8_t next_index_pointer[ 4 ]; /* Next index back pointer * Consists of 4 bytes */ uint8_t next_index_back_pointer[ 4 ]; /* Seed value * Consists of 4 bytes */ uint8_t seed_value[ 4 ]; /* Descriptor index high water marks * Consists of 128 bytes */ uint8_t descriptor_index_high_water_marks[ 128 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown5[ 4 ]; /* File size * Consists of 4 bytes */ uint8_t file_size[ 4 ]; /* Last data allocation table offset * Consists of 4 bytes */ uint8_t last_data_allocation_table_offset[ 4 ]; /* The total available data size * Consists of 4 bytes */ uint8_t total_available_data_size[ 4 ]; /* The total available page size * Consists of 4 bytes */ uint8_t total_available_page_size[ 4 ]; /* The back pointer of the root node of the descriptor index * Consists of 4 bytes */ uint8_t descriptor_index_back_pointer[ 4 ]; /* The offset of the root node of the descriptor index * Consists of 4 bytes */ uint8_t descriptor_index_root_node_offset[ 4 ]; /* The back pointer of the root node of the (file) offset index * Consists of 4 bytes */ uint8_t offset_index_back_pointer[ 4 ]; /* The offset of the root node of the (file) offset index * Consists of 4 bytes */ uint8_t offset_index_root_node_offset[ 4 ]; /* Allocation table validation type * Consists of 1 byte */ uint8_t allocation_table_validation_type; /* Unknown * Consists of 3 bytes */ uint8_t unknown6[ 3 ]; /* The initial data free map * Consists of 128 bytes */ uint8_t initial_data_free_map[ 128 ]; /* The initial page free map * Consists of 128 bytes */ uint8_t initial_page_free_map[ 128 ]; /* Sentinal * Consists of 1 byte * 0x80 */ uint8_t sentinal; /* The encryption type * Consists of 1 byte */ uint8_t encryption_type; /* Unknown * Consists of 2 bytes */ uint8_t unknown8[ 2 ]; /* Unknown * Consists of 8 bytes */ uint8_t unknown9[ 8 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown10[ 4 ]; /* Unknown * Consists of 3 bytes */ uint8_t unknown11[ 3 ]; /* Unknown * Consists of 1 byte */ uint8_t unknown12; /* Unknown * Consists of 32 bytes */ uint8_t unknown13[ 32 ]; }; typedef struct pff_file_header_data_64bit pff_file_header_data_64bit_t; struct pff_file_header_data_64bit { /* Unknown * Consists of 8 bytes */ uint8_t unknown3[ 8 ]; /* Next index back pointer * Consists of 8 bytes */ uint8_t next_index_back_pointer[ 8 ]; /* Seed value * Consists of 4 bytes */ uint8_t seed_value[ 4 ]; /* Descriptor index high water marks * Consists of 128 bytes */ uint8_t descriptor_index_high_water_marks[ 128 ]; /* Unknown * Consists of 8 bytes */ uint8_t unknown4[ 8 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown5[ 4 ]; /* File size * Consists of 8 bytes */ uint8_t file_size[ 8 ]; /* Last data allocation table offset * Consists of 8 bytes */ uint8_t last_data_allocation_table_offset[ 8 ]; /* The total available data size * Consists of 8 bytes */ uint8_t total_available_data_size[ 8 ]; /* The total available page size * Consists of 8 bytes */ uint8_t total_available_page_size[ 8 ]; /* The back pointer of the root node of the descriptor index * Consists of 8 bytes */ uint8_t descriptor_index_back_pointer[ 8 ]; /* The offset of the root node of the descriptor index * Consists of 8 bytes */ uint8_t descriptor_index_root_node_offset[ 8 ]; /* The back pointer of the root node of the (file) offset index * Consists of 8 bytes */ uint8_t offset_index_back_pointer[ 8 ]; /* The offset of the root node of the (file) offset index * Consists of 8 bytes */ uint8_t offset_index_root_node_offset[ 8 ]; /* Allocation table validation type * Consists of 1 byte */ uint8_t allocation_table_validation_type; /* Unknown * Consists of 3 bytes */ uint8_t unknown6[ 3 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown7[ 4 ]; /* The initial data free map * Consists of 128 bytes */ uint8_t initial_data_free_map[ 128 ]; /* The initial page free map * Consists of 128 bytes */ uint8_t initial_page_free_map[ 128 ]; /* Sentinal * Consists of 1 byte */ uint8_t sentinal; /* The encryption type * Consists of 1 byte */ uint8_t encryption_type; /* Unknown * Consists of 2 bytes */ uint8_t unknown8[ 2 ]; /* Next index pointer * Consists of 8 bytes */ uint8_t next_index_pointer[ 8 ]; /* Weak CRC of the previous 516 bytes * Consists of 4 bytes */ uint8_t crc[ 4 ]; /* Unknown * Consists of 3 bytes */ uint8_t unknown11[ 3 ]; /* Unknown * Consists of 1 byte */ uint8_t unknown12; /* Unknown * Consists of 32 bytes */ uint8_t unknown13[ 32 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_item_values.h0000644000175000017500000000774212005155304015414 00000000000000/* * Item values functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ITEM_VALUES_H ) #define _LIBPFF_ITEM_VALUES_H #include #include #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_list_type.h" #include "libpff_local_descriptor_value.h" #include "libpff_table.h" #include "libpff_tree_type.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_item_values libpff_item_values_t; struct libpff_item_values { /* The descriptor identifier value */ uint32_t descriptor_identifier; /* The data identifier value */ uint64_t data_identifier; /* The local descriptors identifier value */ uint64_t local_descriptors_identifier; /* Value to indicate if the item was recovered */ uint8_t recovered; /* The value index of the recovered data identifier */ int recovered_data_identifier_value_index; /* The value index of the recovered local descriptors identifier */ int recovered_local_descriptors_identifier_value_index; /* The item table */ libpff_table_t *table; }; int libpff_item_values_initialize( libpff_item_values_t **item_values, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ); int libpff_item_values_free( libpff_item_values_t **item_values, libcerror_error_t **error ); int libpff_item_values_clone_copy( libpff_item_values_t *destination_item_values, libpff_item_values_t *source_item_values, libcerror_error_t **error ); int libpff_item_values_read( libpff_item_values_t *item_values, libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, int debug_item_type, libcerror_error_t **error ); int libpff_item_values_get_local_descriptors_value_by_identifier( libpff_item_values_t *item_values, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ); int libpff_item_values_read_local_descriptor_data( libpff_item_values_t *item_values, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, libfdata_reference_t **descriptor_data_reference, libfcache_cache_t **descriptor_data_cache, libcerror_error_t **error ); int libpff_item_values_get_number_of_sets( libpff_item_values_t *item_values, libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t *number_of_sets, libcerror_error_t **error ); int libpff_item_values_get_entry_value( libpff_item_values_t *item_values, libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, int table_set_index, uint32_t entry_type, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/Makefile.am0000644000175000017500000000673312005155304013437 00000000000000AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBFMAPI_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ lib_LTLIBRARIES = libpff.la libpff_la_SOURCES = \ libpff.c \ libpff_allocation_table.c libpff_allocation_table.h \ libpff_array_type.c libpff_array_type.h \ libpff_attached_file_io_handle.c libpff_attached_file_io_handle.h \ libpff_attachment.c libpff_attachment.h \ libpff_codepage.h \ libpff_column_definition.c libpff_column_definition.h \ libpff_data_array.c libpff_data_array.h \ libpff_data_array_entry.c libpff_data_array_entry.h \ libpff_data_block.c libpff_data_block.h \ libpff_debug.c libpff_debug.h \ libpff_definitions.h \ libpff_encryption.c libpff_encryption.h \ libpff_error.c libpff_error.h \ libpff_extern.h \ libpff_file.c libpff_file.h \ libpff_folder.c libpff_folder.h \ libpff_free_map.c libpff_free_map.h \ libpff_index.c libpff_index.h \ libpff_index_node.c libpff_index_node.h \ libpff_index_tree.c libpff_index_tree.h \ libpff_index_value.c libpff_index_value.h \ libpff_io_handle.c libpff_io_handle.h \ libpff_item.c libpff_item.h \ libpff_item_descriptor.c libpff_item_descriptor.h \ libpff_item_tree.c libpff_item_tree.h \ libpff_item_values.c libpff_item_values.h \ libpff_libbfio.h \ libpff_libcerror.h \ libpff_libclocale.h \ libpff_libcnotify.h \ libpff_libcstring.h \ libpff_libfcache.h \ libpff_libfdata.h \ libpff_libfguid.h \ libpff_libfmapi.h \ libpff_libfvalue.h \ libpff_libuna.h \ libpff_list_type.c libpff_list_type.h \ libpff_local_descriptor_node.c libpff_local_descriptor_node.h \ libpff_local_descriptor_value.c libpff_local_descriptor_value.h \ libpff_local_descriptors.c libpff_local_descriptors.h \ libpff_local_descriptors_tree.c libpff_local_descriptors_tree.h \ libpff_mapi.h \ libpff_message.c libpff_message.h \ libpff_multi_value.c libpff_multi_value.h \ libpff_name_to_id_map.c libpff_name_to_id_map.h \ libpff_notify.c libpff_notify.h \ libpff_offset_list.c libpff_offset_list.h \ libpff_record_entry.h \ libpff_support.c libpff_support.h \ libpff_table.c libpff_table.h \ libpff_table_block.c libpff_table_block.h \ libpff_tree_type.c libpff_tree_type.h \ libpff_types.h \ libpff_unused.h \ libpff_value_type.c libpff_value_type.h \ pff_allocation_table.h \ pff_array.h \ pff_block.h \ pff_file_header.h \ pff_free_map.h \ pff_index_node.h \ pff_local_descriptor_node.h \ pff_table.h \ pff_table_block.h \ pff_value_data.h libpff_la_LIBADD = \ @LIBCSTRING_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBFDATA_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFMAPI_LIBADD@ libpff_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ libpff_definitions.h.in \ libpff.rc \ libpff.rc.in MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f libpff_definitions.h /bin/rm -f libpff.rc /bin/rm -f Makefile splint: @echo "Running splint on libpff ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libpff_la_SOURCES) libpff-20120802/libpff/libpff_types.h0000644000175000017500000000250012005155304014226 00000000000000/* * The internal type definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_TYPES_H ) #define _LIBPFF_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBPFF for local use of libpff * The definitions in are copied here * for local use of libpff */ #if defined( HAVE_LOCAL_LIBPFF ) /* The following type definitions hide internal data structures */ typedef intptr_t libpff_file_t; typedef intptr_t libpff_name_to_id_map_entry_t; typedef intptr_t libpff_item_t; typedef intptr_t libpff_multi_value_t; #endif #endif libpff-20120802/libpff/libpff_extern.h0000644000175000017500000000237112005155304014375 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_EXTERN_H ) #define _LIBPFF_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBPFF for local use of libpff */ #if !defined( HAVE_LOCAL_LIBPFF ) /* If libtool DLL support is enabled set LIBPFF_DLL_EXPORT * before including libpff/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBPFF_DLL_EXPORT #endif #include #else #define LIBPFF_EXTERN extern #endif #endif libpff-20120802/libpff/pff_local_descriptor_node.h0000644000175000017500000001011612005155305016733 00000000000000/* * The local descriptor node definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_LOCAL_DESCRIPTOR_NODE_H ) #define _PFF_LOCAL_DESCRIPTOR_NODE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #define PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF 0x00 typedef struct pff_local_descriptor_node_32bit pff_local_descriptor_node_32bit_t; struct pff_local_descriptor_node_32bit { /* The local descriptors signature * Consists of 1 byte * Contains 0x02 */ uint8_t signature; /* The local descriptors node (indirection) level * Consists of 1 byte */ uint8_t level; /* The number of local descriptors entries * Consists of 2 bytes */ uint8_t number_of_entries[ 2 ]; /* The local descriptors node entries */ }; typedef struct pff_local_descriptor_branch_node_entry_type_32bit pff_local_descriptor_branch_node_entry_type_32bit_t; struct pff_local_descriptor_branch_node_entry_type_32bit { /* The identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The local descriptors sub node identifier * Consists of 4 bytes * Refers to an identifier in the (file) offset index */ uint8_t sub_node_identifier[ 4 ]; }; typedef struct pff_local_descriptor_leaf_node_entry_type_32bit pff_local_descriptor_leaf_node_entry_type_32bit_t; struct pff_local_descriptor_leaf_node_entry_type_32bit { /* The identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The data identifier * Consists of 4 bytes * Refers to an identifier in the (file) offset index */ uint8_t data_identifier[ 4 ]; /* The local descriptors identifier * Consists of 4 bytes * Refers to an identifier in the (file) offset index */ uint8_t local_descriptors_identifier[ 4 ]; }; typedef struct pff_local_descriptor_node_64bit pff_local_descriptor_node_64bit_t; struct pff_local_descriptor_node_64bit { /* The local descriptors signature * Consists of 1 byte * Contains 0x02 */ uint8_t signature; /* The local descriptors node (indirection) level * Consists of 1 byte */ uint8_t level; /* The number of local descriptors entries * Consists of 2 bytes */ uint8_t number_of_entries[ 2 ]; /* Padding * Consists of 4 bytes */ uint8_t padding1[ 4 ]; /* The local descriptors node entries */ }; typedef struct pff_local_descriptor_branch_node_entry_type_64bit pff_local_descriptor_branch_node_entry_type_64bit_t; struct pff_local_descriptor_branch_node_entry_type_64bit { /* The identifier * Consists of 8 bytes * Only the lower 32-bits are used */ uint8_t identifier[ 8 ]; /* The local descriptors sub node identifier * Consists of 8 bytes * Refers to an identifier in the (file) offset index */ uint8_t sub_node_identifier[ 8 ]; }; typedef struct pff_local_descriptor_leaf_node_entry_type_64bit pff_local_descriptor_leaf_node_entry_type_64bit_t; struct pff_local_descriptor_leaf_node_entry_type_64bit { /* The identifier * Consists of 8 bytes * Only the lower 32-bits are used */ uint8_t identifier[ 8 ]; /* The data identifier * Refers to an identifier in the (file) offset index * Consists of 8 bytes */ uint8_t data_identifier[ 8 ]; /* The local descriptors identifier * Consists of 8 bytes * Refers to an identifier in the (file) offset index */ uint8_t local_descriptors_identifier[ 8 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_folder.c0000644000175000017500000032240712005155304014343 00000000000000/* * Folder functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_folder.h" #include "libpff_index_value.h" #include "libpff_item.h" #include "libpff_item_descriptor.h" #include "libpff_item_tree.h" #include "libpff_item_values.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libcstring.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_list_type.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors_tree.h" #include "libpff_mapi.h" #include "libpff_tree_type.h" #include "libpff_value_type.h" #define LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS 0 #define LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES 1 #define LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS 2 #define LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS 3 /* Retrieves the folder (container) type * Returns 1 if successful or -1 on error */ int libpff_folder_get_type( libpff_item_t *folder, uint8_t *type, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; char *container_class_string = NULL; static char *function = "libpff_folder_get_type"; size_t container_class_string_size = 0; uint8_t folder_type = LIBPFF_ITEM_TYPE_UNDEFINED; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type.", function ); return( -1 ); } result = libpff_item_get_entry_value_utf8_string_size( folder, 0, LIBPFF_ENTRY_TYPE_CONTAINER_CLASS, &container_class_string_size, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve container class string size.", function ); return( -1 ); } else if( result == 1 ) { if( container_class_string_size > 0 ) { container_class_string = libcstring_narrow_string_allocate( container_class_string_size ); if( container_class_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create container class string.", function ); return( -1 ); } result = libpff_item_get_entry_value_utf8_string( folder, 0, LIBPFF_ENTRY_TYPE_CONTAINER_CLASS, (uint8_t *) container_class_string, container_class_string_size, 0, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve container class string.", function ); return( -1 ); } if( container_class_string_size == 9 ) { if( libcstring_narrow_string_compare( container_class_string, "IPF.Note", 8 ) == 0 ) { folder_type = LIBPFF_ITEM_TYPE_EMAIL; } else if( libcstring_narrow_string_compare( container_class_string, "IPF.Task", 8 ) == 0 ) { folder_type = LIBPFF_ITEM_TYPE_TASK; } } else if( container_class_string_size == 12 ) { if( libcstring_narrow_string_compare( container_class_string, "IPF.Contact", 11 ) == 0 ) { folder_type = LIBPFF_ITEM_TYPE_CONTACT; } else if( libcstring_narrow_string_compare( container_class_string, "IPF.Journal", 11 ) == 0 ) { folder_type = LIBPFF_ITEM_TYPE_ACTIVITY; } } else if( container_class_string_size == 16 ) { if( libcstring_narrow_string_compare( container_class_string, "IPF.Appointment", 15 ) == 0 ) { folder_type = LIBPFF_ITEM_TYPE_APPOINTMENT; } else if( libcstring_narrow_string_compare( container_class_string, "IPF.StickyNote", 15 ) == 0 ) { folder_type = LIBPFF_ITEM_TYPE_NOTE; } } #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( folder_type == LIBPFF_ITEM_TYPE_UNDEFINED ) ) { libcnotify_printf( "%s: unsupported folder (container) type: %s\n", function, container_class_string ); } #endif memory_free( container_class_string ); } } *type = (int) folder_type; return( 1 ); } /* Determine if the item has sub folders * Returns 1 if successful or -1 on error */ int libpff_folder_determine_sub_folders( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libpff_index_value_t *descriptor_index_value = NULL; static char *function = "libpff_folder_determine_sub_folders"; uint32_t sub_folders_descriptor_identifier = 0; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing internal file.", function ); return( -1 ); } if( internal_item->item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item descriptor.", function ); return( -1 ); } /* Determine if the item has sub folders */ if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { sub_folders_descriptor_identifier = internal_item->item_descriptor->descriptor_identifier + 11; result = libpff_io_handle_get_descriptor_index_value_by_identifier( internal_item->internal_file->io_handle, internal_item->file_io_handle, sub_folders_descriptor_identifier, internal_item->item_descriptor->recovered, &descriptor_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value: %" PRIu32 ".", function, sub_folders_descriptor_identifier ); return( -1 ); } else if( result != 0 ) { if( descriptor_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: descriptor identifier: %" PRIu64 " ", function, descriptor_index_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( descriptor_index_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 ", parent: %" PRIu32 "\n", descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, descriptor_index_value->parent_identifier ); } #endif /* Cache the sub folders items values for successive usage */ if( libpff_item_values_initialize( &( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] ), sub_folders_descriptor_identifier, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, internal_item->item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub folders item values.", function ); return( -1 ); } if( libpff_item_values_read( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor identifier: %" PRIu32 ".", function, sub_folders_descriptor_identifier ); return( -1 ); } } } return( 1 ); } /* Determine if the item has sub messages * Returns 1 if successful or -1 on error */ int libpff_folder_determine_sub_messages( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libpff_index_value_t *descriptor_index_value = NULL; static char *function = "libpff_folder_determine_sub_messages"; uint32_t sub_messages_descriptor_identifier = 0; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing internal file.", function ); return( -1 ); } if( internal_item->item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item descriptor.", function ); return( -1 ); } /* Determine if the item has sub messages */ if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { sub_messages_descriptor_identifier = internal_item->item_descriptor->descriptor_identifier + 12; result = libpff_io_handle_get_descriptor_index_value_by_identifier( internal_item->internal_file->io_handle, internal_item->file_io_handle, sub_messages_descriptor_identifier, internal_item->item_descriptor->recovered, &descriptor_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value: %" PRIu32 ".", function, sub_messages_descriptor_identifier ); return( -1 ); } else if( result != 0 ) { if( descriptor_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: descriptor identifier: %" PRIu64 " ", function, descriptor_index_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( descriptor_index_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 ", parent: %" PRIu32 "\n", descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, descriptor_index_value->parent_identifier ); } #endif /* Cache the sub messages items values for successive usage */ if( libpff_item_values_initialize( &( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] ), sub_messages_descriptor_identifier, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, internal_item->item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub messages item values.", function ); return( -1 ); } if( libpff_item_values_read( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor identifier: %" PRIu32 ".", function, sub_messages_descriptor_identifier ); return( -1 ); } } } return( 1 ); } /* Determine if the item has sub associated contents * Returns 1 if successful or -1 on error */ int libpff_folder_determine_sub_associated_contents( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libpff_index_value_t *descriptor_index_value = NULL; static char *function = "libpff_folder_determine_sub_associated_contents"; uint32_t sub_associated_contents_descriptor_identifier = 0; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing internal file.", function ); return( -1 ); } if( internal_item->item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item descriptor.", function ); return( -1 ); } /* Determine if the item has sub associated contents */ if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] == NULL ) { sub_associated_contents_descriptor_identifier = internal_item->item_descriptor->descriptor_identifier + 13; result = libpff_io_handle_get_descriptor_index_value_by_identifier( internal_item->internal_file->io_handle, internal_item->file_io_handle, sub_associated_contents_descriptor_identifier, internal_item->item_descriptor->recovered, &descriptor_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value: %" PRIu32 ".", function, sub_associated_contents_descriptor_identifier ); return( -1 ); } else if( result != 0 ) { if( descriptor_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: descriptor identifier: %" PRIu64 " ", function, descriptor_index_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( descriptor_index_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 ", parent: %" PRIu32 "\n", descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, descriptor_index_value->parent_identifier ); } #endif /* Cache the sub associated contents items values for successive usage */ if( libpff_item_values_initialize( &( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] ), sub_associated_contents_descriptor_identifier, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, internal_item->item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub associated contents item values.", function ); return( -1 ); } if( libpff_item_values_read( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor identifier: %" PRIu32 ".", function, sub_associated_contents_descriptor_identifier ); return( -1 ); } } } return( 1 ); } /* Determine if the item has unknowns * Returns 1 if successful or -1 on error */ int libpff_folder_determine_unknowns( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libpff_item_descriptor_t *unknowns_item_descriptor = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; static char *function = "libpff_folder_determine_unknowns"; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing internal file.", function ); return( -1 ); } if( internal_item->item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item descriptor.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item values.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ] != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: unknowns sub item tree node already set.", function ); return( -1 ); } /* Make sure the item values have been read */ /* TODO is this still necessary ? */ if( internal_item->item_values->table == NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading item values of descriptor: %" PRIu32 "\n", function, internal_item->item_descriptor->descriptor_identifier ); } #endif if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item values - missing table.", function ); return( -1 ); } } /* Determine if the item has unknowns */ result = libpff_item_values_get_local_descriptors_value_by_identifier( internal_item->item_values, internal_item->file_io_handle, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718 ); return( -1 ); } else if( result != 0 ) { if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif if( libpff_item_values_initialize( &( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ] ), LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier, internal_item->item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create unknowns item values.", function ); return( -1 ); } /* Cache the unknowns items values for successive usage */ if( libpff_item_values_read( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptor identifier: %" PRIu32 ".", function, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718 ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ]->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid unknowns item values - missing table.", function ); return( -1 ); } /* Create an unknowns item descriptor */ if( libpff_item_descriptor_initialize( &unknowns_item_descriptor, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier, internal_item->item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create unknowns item descriptor.", function ); return( -1 ); } if( unknowns_item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing unknowns item descriptor.", function ); return( -1 ); } if( libpff_tree_node_initialize( &( internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create unknowns sub item tree node.", function ); memory_free( unknowns_item_descriptor ); return( -1 ); } if( libpff_tree_node_set_value( internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ], (intptr_t *) unknowns_item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set unknowns item descriptor in unknowns sub item tree node.", function ); libpff_tree_node_free( &( internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ] ), NULL, NULL ); memory_free( unknowns_item_descriptor ); return( -1 ); } /* All the unknown data is in the unknowns item * there are no sub items like for the attachments item */ } return( 1 ); } /* Retrieves the number of sub folders from a folder * Returns 1 if successful or -1 on error */ int libpff_folder_get_number_of_sub_folders( libpff_item_t *folder, int *number_of_sub_folders, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_folder_get_number_of_sub_folders"; uint32_t number_of_sets = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( number_of_sub_folders == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sub folders.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { if( libpff_folder_determine_sub_folders( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub folders.", function ); return( -1 ); } } *number_of_sub_folders = 0; if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine the number of sub folders.", function ); return( -1 ); } *number_of_sub_folders = (int) number_of_sets; } return( 1 ); } /* Retrieves the sub folder for the specific index from a folder * Returns 1 if successful or -1 on error */ int libpff_folder_get_sub_folder( libpff_item_t *folder, int sub_folder_index, libpff_item_t **sub_folder, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_folder_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_folder"; size_t value_data_size = 0; uint32_t sub_folder_descriptor_identifier = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( sub_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub folder.", function ); return( -1 ); } if( *sub_folder != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub folder already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { if( libpff_folder_determine_sub_folders( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub folders.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] != NULL ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_folder_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_folder_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_folder_descriptor_identifier, &sub_folder_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub folder tree node.", function ); return( -1 ); } if( sub_folder_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folder tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_folder, internal_item->file_io_handle, internal_item->internal_file, sub_folder_tree_node, (libpff_item_descriptor_t *) sub_folder_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub folder.", function ); return( -1 ); } if( *sub_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folder.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_folder )->type = LIBPFF_ITEM_TYPE_FOLDER; } return( 1 ); } /* Retrieves the sub folder from a folder for the specific UTF-8 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub folder or -1 on error */ int libpff_folder_get_sub_folder_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_folder_name, size_t utf8_sub_folder_name_size, libpff_item_t **sub_folder, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_folder_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_folder_by_utf8_name"; size_t value_data_size = 0; uint32_t number_of_sub_folders = 0; uint32_t sub_folder_descriptor_identifier = 0; uint32_t sub_folder_index = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( utf8_sub_folder_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 sub folder name.", function ); return( -1 ); } if( utf8_sub_folder_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 sub folder name size value exceeds maximum.", function ); return( -1 ); } if( sub_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub folder.", function ); return( -1 ); } if( *sub_folder != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub folder already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { if( libpff_folder_determine_sub_folders( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub folders.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sub_folders, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub folders.", function ); return( -1 ); } for( sub_folder_index = 0; sub_folder_index < number_of_sub_folders; sub_folder_index++ ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_folder_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } result = libpff_value_type_compare_with_utf8_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, utf8_sub_folder_name, utf8_sub_folder_name_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare value data with UTF-8 string.", function ); return( -1 ); } else if( result != 0 ) { break; } } if( sub_folder_index >= number_of_sub_folders ) { return( 0 ); } value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_folder_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_folder_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_folder_descriptor_identifier, &sub_folder_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub folder tree node.", function ); return( -1 ); } if( sub_folder_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folder tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_folder, internal_item->file_io_handle, internal_item->internal_file, sub_folder_tree_node, (libpff_item_descriptor_t *) sub_folder_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub folder.", function ); return( -1 ); } if( *sub_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folder.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_folder )->type = LIBPFF_ITEM_TYPE_FOLDER; } return( 1 ); } /* Retrieves the sub folder from a folder for the specific UTF-16 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub folder or -1 on error */ int libpff_folder_get_sub_folder_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_folder_name, size_t utf16_sub_folder_name_size, libpff_item_t **sub_folder, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_folder_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_folder_by_utf16_name"; size_t value_data_size = 0; uint32_t number_of_sub_folders = 0; uint32_t sub_folder_descriptor_identifier = 0; uint32_t sub_folder_index = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( utf16_sub_folder_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 sub folder name.", function ); return( -1 ); } if( utf16_sub_folder_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 sub folder name size value exceeds maximum.", function ); return( -1 ); } if( sub_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub folder.", function ); return( -1 ); } if( *sub_folder != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub folder already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { if( libpff_folder_determine_sub_folders( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub folders.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sub_folders, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub folders.", function ); return( -1 ); } for( sub_folder_index = 0; sub_folder_index < number_of_sub_folders; sub_folder_index++ ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_folder_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } result = libpff_value_type_compare_with_utf16_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, utf16_sub_folder_name, utf16_sub_folder_name_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to compare value data with UTF-16 string.", function ); return( -1 ); } else if( result != 0 ) { break; } } if( sub_folder_index >= number_of_sub_folders ) { return( 0 ); } value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_folder_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_folder_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_folder_descriptor_identifier, &sub_folder_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub folder tree node.", function ); return( -1 ); } if( sub_folder_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folder tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_folder, internal_item->file_io_handle, internal_item->internal_file, sub_folder_tree_node, (libpff_item_descriptor_t *) sub_folder_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub folder.", function ); return( -1 ); } if( *sub_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folder.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_folder )->type = LIBPFF_ITEM_TYPE_FOLDER; } return( 1 ); } /* Retrieves the sub folders from a folder * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_folder_get_sub_folders( libpff_item_t *folder, libpff_item_t **sub_folders, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_folders_item_tree_node = NULL; static char *function = "libpff_folder_get_sub_folders"; uint32_t sub_folders_descriptor_identifier = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( sub_folders == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub folders.", function ); return( -1 ); } if( *sub_folders != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub folders already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { if( libpff_folder_determine_sub_folders( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub folders.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ] == NULL ) { return( 0 ); } /* Determine the sub folders item descriptor identifier */ if( libpff_item_tree_get_identifier( internal_item->item_tree_node, &sub_folders_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve folder identifier.", function ); return( -1 ); } sub_folders_descriptor_identifier += 11; /* Find sub folders tree node */ result = libpff_item_tree_get_tree_node_by_identifier( internal_item->internal_file->item_tree_root_node, sub_folders_descriptor_identifier, &sub_folders_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub folders tree node.", function ); return( -1 ); } if( ( result == 0 ) || ( sub_folders_item_tree_node == NULL ) ) { return( 0 ); } if( libpff_item_initialize( sub_folders, internal_item->file_io_handle, internal_item->internal_file, sub_folders_item_tree_node, (libpff_item_descriptor_t *) sub_folders_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub folders.", function ); return( -1 ); } if( *sub_folders == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub folders.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_folders )->type = LIBPFF_ITEM_TYPE_SUB_FOLDERS; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *sub_folders )->item_values, internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_FOLDERS ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy sub folders item values.", function ); libpff_item_free( sub_folders, NULL ); return( -1 ); } return( 1 ); } /* Retrieves the number of sub messages from a folder * Returns 1 if successful or -1 on error */ int libpff_folder_get_number_of_sub_messages( libpff_item_t *folder, int *number_of_sub_messages, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_folder_get_number_of_sub_messages"; uint32_t number_of_sets = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( number_of_sub_messages == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sub messages.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { if( libpff_folder_determine_sub_messages( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub messages.", function ); return( -1 ); } } *number_of_sub_messages = 0; if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine the number of sub messages.", function ); return( -1 ); } *number_of_sub_messages = (int) number_of_sets; } return( 1 ); } /* Retrieves the sub messages for the specific index from a folder * Returns 1 if successful or -1 on error */ int libpff_folder_get_sub_message( libpff_item_t *folder, int sub_message_index, libpff_item_t **sub_message, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_message_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_message"; size_t value_data_size = 0; uint32_t sub_message_descriptor_identifier = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( sub_message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub message.", function ); return( -1 ); } if( *sub_message != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub message already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { if( libpff_folder_determine_sub_messages( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub messages.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] != NULL ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_message_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_message_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_message_descriptor_identifier, &sub_message_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub message tree node.", function ); return( -1 ); } if( sub_message_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub message tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_message, internal_item->file_io_handle, internal_item->internal_file, sub_message_tree_node, (libpff_item_descriptor_t *) sub_message_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub message.", function ); return( -1 ); } if( *sub_message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub message.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_message )->type = LIBPFF_ITEM_TYPE_UNDEFINED; } return( 1 ); } /* Retrieves the sub message from a folder for the specific UTF-8 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub message or -1 on error */ int libpff_folder_get_sub_message_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_message_name, size_t utf8_sub_message_name_size, libpff_item_t **sub_message, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_message_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_message_by_utf8_name"; size_t value_data_size = 0; uint32_t number_of_sub_messages = 0; uint32_t sub_message_descriptor_identifier = 0; uint32_t sub_message_index = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( utf8_sub_message_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 sub message name.", function ); return( -1 ); } if( utf8_sub_message_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 sub message name size value exceeds maximum.", function ); return( -1 ); } if( sub_message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub message.", function ); return( -1 ); } if( *sub_message != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub message already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { if( libpff_folder_determine_sub_messages( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub messages.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sub_messages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub messages.", function ); return( -1 ); } for( sub_message_index = 0; sub_message_index < number_of_sub_messages; sub_message_index++ ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_message_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } result = libpff_value_type_compare_with_utf8_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, utf8_sub_message_name, utf8_sub_message_name_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare value data with UTF-8 string.", function ); return( -1 ); } else if( result != 0 ) { break; } } if( sub_message_index >= number_of_sub_messages ) { return( 0 ); } value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_message_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_message_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_message_descriptor_identifier, &sub_message_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub message tree node.", function ); return( -1 ); } if( sub_message_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub message tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_message, internal_item->file_io_handle, internal_item->internal_file, sub_message_tree_node, (libpff_item_descriptor_t *) sub_message_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub message.", function ); return( -1 ); } if( *sub_message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub message.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_message )->type = LIBPFF_ITEM_TYPE_UNDEFINED; } return( 1 ); } /* Retrieves the sub message from a folder for the specific UTF-16 encoded name * This function uses the PidTagDisplayName MAPI property as the name * Returns 1 if successful, 0 if no such sub message or -1 on error */ int libpff_folder_get_sub_message_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_message_name, size_t utf16_sub_message_name_size, libpff_item_t **sub_message, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_message_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_message_by_utf16_name"; size_t value_data_size = 0; uint32_t number_of_sub_messages = 0; uint32_t sub_message_descriptor_identifier = 0; uint32_t sub_message_index = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( utf16_sub_message_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 sub message name.", function ); return( -1 ); } if( utf16_sub_message_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 sub message name size value exceeds maximum.", function ); return( -1 ); } if( sub_message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub message.", function ); return( -1 ); } if( *sub_message != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub message already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { if( libpff_folder_determine_sub_messages( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub messages.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sub_messages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub messages.", function ); return( -1 ); } for( sub_message_index = 0; sub_message_index < number_of_sub_messages; sub_message_index++ ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_message_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } result = libpff_value_type_compare_with_utf16_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, utf16_sub_message_name, utf16_sub_message_name_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to compare value data with UTF-16 string.", function ); return( -1 ); } else if( result != 0 ) { break; } } if( sub_message_index >= number_of_sub_messages ) { return( 0 ); } value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_message_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_message_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_message_descriptor_identifier, &sub_message_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub message tree node.", function ); return( -1 ); } if( sub_message_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub message tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_message, internal_item->file_io_handle, internal_item->internal_file, sub_message_tree_node, (libpff_item_descriptor_t *) sub_message_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub message.", function ); return( -1 ); } if( *sub_message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub message.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_message )->type = LIBPFF_ITEM_TYPE_UNDEFINED; } return( 1 ); } /* Retrieves the sub messages from a folder * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_folder_get_sub_messages( libpff_item_t *folder, libpff_item_t **sub_messages, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_messages_item_tree_node = NULL; static char *function = "libpff_folder_get_sub_messages"; uint32_t sub_messages_descriptor_identifier = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( sub_messages == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub messages.", function ); return( -1 ); } if( *sub_messages != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub messages already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { if( libpff_folder_determine_sub_messages( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub messages.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ] == NULL ) { return( 0 ); } /* Determine the sub messages item descriptor identifier */ if( libpff_item_tree_get_identifier( internal_item->item_tree_node, &sub_messages_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve folder identifier.", function ); return( -1 ); } sub_messages_descriptor_identifier += 12; /* Find sub messages tree node */ result = libpff_item_tree_get_tree_node_by_identifier( internal_item->internal_file->item_tree_root_node, sub_messages_descriptor_identifier, &sub_messages_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub messages tree node.", function ); return( -1 ); } if( ( result == 0 ) || ( sub_messages_item_tree_node == NULL ) ) { return( 0 ); } if( libpff_item_initialize( sub_messages, internal_item->file_io_handle, internal_item->internal_file, sub_messages_item_tree_node, (libpff_item_descriptor_t *) sub_messages_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub messages.", function ); return( -1 ); } if( *sub_messages == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub messages.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_messages )->type = LIBPFF_ITEM_TYPE_SUB_MESSAGES; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *sub_messages )->item_values, internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_MESSAGES ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy sub messages item values.", function ); libpff_item_free( sub_messages, NULL ); return( -1 ); } return( 1 ); } /* Retrieves the number of sub associated contents from a folder * Returns 1 if successful or -1 on error */ int libpff_folder_get_number_of_sub_associated_contents( libpff_item_t *folder, int *number_of_sub_associated_contents, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_folder_get_number_of_sub_associated_contents"; uint32_t number_of_sets = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( number_of_sub_associated_contents == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sub associated contents.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] == NULL ) { if( libpff_folder_determine_sub_associated_contents( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub associated contents.", function ); return( -1 ); } } *number_of_sub_associated_contents = 0; if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] != NULL ) { if( libpff_item_values_get_number_of_sets( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, &number_of_sets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine the number of sub associated contents.", function ); return( -1 ); } *number_of_sub_associated_contents = (int) number_of_sets; } return( 1 ); } /* Retrieves the sub associated contents for the specific index from a folder * Returns 1 if successful or -1 on error */ int libpff_folder_get_sub_associated_content( libpff_item_t *folder, int sub_associated_content_index, libpff_item_t **sub_associated_content, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_associated_content_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_folder_get_sub_associated_content"; size_t value_data_size = 0; uint32_t sub_associated_content_descriptor_identifier = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( sub_associated_content == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub associated content.", function ); return( -1 ); } if( *sub_associated_content != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub associated content already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] == NULL ) { if( libpff_folder_determine_sub_associated_contents( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub associated contents.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] != NULL ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, (int) sub_associated_content_index, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &sub_associated_content_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } if( libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_associated_content_descriptor_identifier, &sub_associated_content_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub associated content tree node.", function ); return( -1 ); } if( sub_associated_content_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub associated content tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_associated_content, internal_item->file_io_handle, internal_item->internal_file, sub_associated_content_tree_node, (libpff_item_descriptor_t *) sub_associated_content_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub associated content.", function ); return( -1 ); } if( *sub_associated_content == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub associated content.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_associated_content )->type = LIBPFF_ITEM_TYPE_UNDEFINED; } return( 1 ); } /* Retrieves the sub associated contents from a folder * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_folder_get_sub_associated_contents( libpff_item_t *folder, libpff_item_t **sub_associated_contents, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_associated_contents_item_tree_node = NULL; static char *function = "libpff_folder_get_sub_associated_contents"; uint32_t sub_associated_contents_descriptor_identifier = 0; int result = 0; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( sub_associated_contents == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub associated contents.", function ); return( -1 ); } if( *sub_associated_contents != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub associated contents already set.", function ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] == NULL ) { if( libpff_folder_determine_sub_associated_contents( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine sub associated contents.", function ); return( -1 ); } } if( internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ] == NULL ) { return( 0 ); } /* Determine the sub associated contents item descriptor identifier */ if( libpff_item_tree_get_identifier( internal_item->item_tree_node, &sub_associated_contents_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve folder identifier.", function ); return( -1 ); } sub_associated_contents_descriptor_identifier += 13; /* Find sub associated contents tree node */ result = libpff_item_tree_get_tree_node_by_identifier( internal_item->internal_file->item_tree_root_node, sub_associated_contents_descriptor_identifier, &sub_associated_contents_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub associated contents tree node.", function ); return( -1 ); } if( ( result == 0 ) || ( sub_associated_contents_item_tree_node == NULL ) ) { return( 0 ); } if( libpff_item_initialize( sub_associated_contents, internal_item->file_io_handle, internal_item->internal_file, sub_associated_contents_item_tree_node, (libpff_item_descriptor_t *) sub_associated_contents_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub associated contents.", function ); return( -1 ); } if( *sub_associated_contents == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub associated contents.", function ); return( -1 ); } ( (libpff_internal_item_t *) *sub_associated_contents )->type = LIBPFF_ITEM_TYPE_SUB_ASSOCIATED_CONTENTS; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *sub_associated_contents )->item_values, internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_SUB_ASSOCIATED_CONTENTS ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy sub associated contents item values.", function ); libpff_item_free( sub_associated_contents, NULL ); return( -1 ); } return( 1 ); } /* Retrieves the unknowns from a folder * Returns 1 if successful, 0 if the folder does not contain such value or -1 on error */ int libpff_folder_get_unknowns( libpff_item_t *folder, libpff_item_t **unknowns, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_folder_get_unknowns"; if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) folder; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid folder - missing internal file.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( unknowns == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid unknowns.", function ); return( -1 ); } if( *unknowns != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: unknowns already set.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ] == NULL ) { if( libpff_folder_determine_unknowns( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine unknowns.", function ); return( -1 ); } } if( internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ] == NULL ) { return( 0 ); } if( libpff_item_initialize( unknowns, internal_item->file_io_handle, internal_item->internal_file, internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ], (libpff_item_descriptor_t *) internal_item->sub_item_tree_node[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ]->value, LIBPFF_ITEM_FLAGS_DEFAULT | LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create unknowns.", function ); return( -1 ); } if( *unknowns == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid unknowns.", function ); return( -1 ); } ( (libpff_internal_item_t *) *unknowns )->type = LIBPFF_ITEM_TYPE_UNKNOWN; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *unknowns )->item_values, internal_item->sub_item_values[ LIBPFF_FOLDER_SUB_ITEM_UNKNOWNS ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy unknowns item values.", function ); libpff_item_free( unknowns, NULL ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_libfguid.h0000644000175000017500000000245012005155304014653 00000000000000/* * The libfguid header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBFGUID_H ) #define _LIBPFF_LIBFGUID_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) #include #include #include #else /* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT * before including libfguid.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFGUID_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_list_type.c0000644000175000017500000007407712005155304015113 00000000000000/* * List type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_libcerror.h" #include "libpff_list_type.h" /* Creates a list element * Make sure the value element is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libpff_list_element_initialize( libpff_list_element_t **element, libcerror_error_t **error ) { static char *function = "libpff_list_element_initialize"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( *element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid element value already set.", function ); return( -1 ); } *element = memory_allocate_structure( libpff_list_element_t ); if( *element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create list element.", function ); goto on_error; } if( memory_set( *element, 0, sizeof( libpff_list_element_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list element.", function ); goto on_error; } return( 1 ); on_error: if( *element != NULL ) { memory_free( *element ); *element = NULL; } return( -1 ); } /* Frees a list element * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libpff_list_element_free( libpff_list_element_t **element, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libpff_list_element_free"; int result = 1; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( *element != NULL ) { if( ( ( *element )->previous_element != NULL ) || ( ( *element )->next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: list element part of a list.", function ); return( -1 ); } if( value_free_function != NULL ) { if( value_free_function( &( ( *element )->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); result = -1; } } memory_free( *element ); *element = NULL; } return( result ); } /* Retrieves the value from the list element * Returns 1 if successful or -1 on error */ int libpff_list_element_get_value( libpff_list_element_t *element, intptr_t **value, libcerror_error_t **error ) { static char *function = "libpff_list_element_get_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } *value = element->value; return( 1 ); } /* Sets the value in the list element * Returns 1 if successful or -1 on error */ int libpff_list_element_set_value( libpff_list_element_t *element, intptr_t *value, libcerror_error_t **error ) { static char *function = "libpff_list_element_set_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } element->value = value; return( 1 ); } /* Creates a list * Make sure the value list is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libpff_list_initialize( libpff_list_t **list, libcerror_error_t **error ) { static char *function = "libpff_list_initialize"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid list value already set.", function ); return( -1 ); } *list = memory_allocate_structure( libpff_list_t ); if( *list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create list.", function ); goto on_error; } if( memory_set( *list, 0, sizeof( libpff_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list.", function ); goto on_error; } return( 1 ); on_error: if( *list != NULL ) { memory_free( *list ); *list = NULL; } return( -1 ); } /* Frees a list including the elements * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libpff_list_free( libpff_list_t **list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libpff_list_free"; int result = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *list != NULL ) { result = libpff_list_empty( *list, value_free_function, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty list.", function ); } memory_free( *list ); *list = NULL; } return( result ); } /* Empties a list and frees the elements * Uses the value_free_function to free the element value * Returns 1 if successful or -1 on error */ int libpff_list_empty( libpff_list_t *list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_empty"; int element_index = 0; int number_of_elements = 0; int result = 1; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( list->number_of_elements > 0 ) { number_of_elements = list->number_of_elements; for( element_index = 0; element_index < number_of_elements; element_index++ ) { list_element = list->first_element; if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_index ); return( -1 ); } list->first_element = list_element->next_element; if( list->last_element == list_element ) { list->last_element = list_element->next_element; } list->number_of_elements -= 1; if( list_element->next_element != NULL ) { list_element->next_element->previous_element = NULL; } list_element->next_element = NULL; if( libpff_list_element_free( &list_element, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); result = -1; } } } return( result ); } /* Clones the list and its elements * * The values are cloned using the value_clone_function * On error the values are freed using the value_free_function * * Returns 1 if successful or -1 on error */ int libpff_list_clone( libpff_list_t **destination_list, libpff_list_t *source_list, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { libpff_list_element_t *source_list_element = NULL; intptr_t *destination_value = NULL; static char *function = "libpff_list_clone"; int element_index = 0; if( destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination list.", function ); return( -1 ); } if( *destination_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination list already set.", function ); return( -1 ); } if( value_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value free function.", function ); return( -1 ); } if( value_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value clone function.", function ); return( -1 ); } if( source_list == NULL ) { *destination_list = NULL; return( 1 ); } if( libpff_list_initialize( destination_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list.", function ); goto on_error; } if( *destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination list.", function ); goto on_error; } source_list_element = source_list->first_element; for( element_index = 0; element_index < source_list->number_of_elements; element_index++ ) { if( source_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in source list element: %d.", function, element_index ); goto on_error; } if( value_clone_function( &destination_value, source_list_element->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone value of list element: %d.", function, element_index ); goto on_error; } if( libpff_list_append_value( *destination_list, destination_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value of list element: %d.", function, element_index ); goto on_error; } destination_value = NULL; source_list_element = source_list_element->next_element; } return( 1 ); on_error: if( destination_value != NULL ) { value_free_function( &destination_value, NULL ); } if( *destination_list != NULL ) { libpff_list_free( destination_list, value_free_function, error ); } return( -1 ); } /* Retrieves the number of elements in the list * Returns 1 if successful or -1 on error */ int libpff_list_get_number_of_elements( libpff_list_t *list, int *number_of_elements, libcerror_error_t **error ) { static char *function = "libpff_list_get_number_of_elements"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( number_of_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of elements.", function ); return( -1 ); } *number_of_elements = list->number_of_elements; return( 1 ); } /* Retrieves a specific element from the list * Returns 1 if successful or -1 on error */ int libpff_list_get_element_by_index( libpff_list_t *list, int element_index, libpff_list_element_t **element, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_get_element_by_index"; int element_iterator = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( ( element_index < 0 ) || ( element_index >= list->number_of_elements ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( element_index < ( list->number_of_elements / 2 ) ) { list_element = list->first_element; for( element_iterator = 0; element_iterator < element_index; element_iterator++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_iterator ); return( -1 ); } list_element = list_element->next_element; } } else { list_element = list->last_element; for( element_iterator = ( list->number_of_elements - 1 ); element_iterator > element_index; element_iterator-- ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_iterator ); return( -1 ); } list_element = list_element->previous_element; } } if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing list element.", function ); return( -1 ); } *element = list_element; return( 1 ); } /* Retrieves a specific value from the list * Returns 1 if successful or -1 on error */ int libpff_list_get_value_by_index( libpff_list_t *list, int element_index, intptr_t **value, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_get_value_by_index"; int result = 0; result = libpff_list_get_element_by_index( list, element_index, &list_element, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from list.", function, element_index ); return( -1 ); } if( libpff_list_element_get_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value of list element: %d.", function, element_index ); return( -1 ); } return( 1 ); } /* Prepend an element to the list * Returns 1 if successful or -1 on error */ int libpff_list_prepend_element( libpff_list_t *list, libpff_list_element_t *element, libcerror_error_t **error ) { static char *function = "libpff_list_prepend_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( list->first_element != NULL ) { list->first_element->previous_element = element; element->next_element = list->first_element; } if( list->last_element == NULL ) { list->last_element = element; } list->first_element = element; list->number_of_elements += 1; return( 1 ); } /* Prepend a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libpff_list_prepend_value( libpff_list_t *list, intptr_t *value, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_prepend_value"; if( libpff_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); goto on_error; } if( libpff_list_prepend_element( list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to prepend element to list.", function ); goto on_error; } if( libpff_list_element_set_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of list element.", function ); goto on_error; } return( 1 ); on_error: if( list_element != NULL ) { libpff_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Append an element to the list * Returns 1 if successful or -1 on error */ int libpff_list_append_element( libpff_list_t *list, libpff_list_element_t *element, libcerror_error_t **error ) { static char *function = "libpff_list_append_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( list->first_element == NULL ) { list->first_element = element; } if( list->last_element != NULL ) { list->last_element->next_element = element; element->previous_element = list->last_element; } list->last_element = element; list->number_of_elements += 1; return( 1 ); } /* Append a value to the list * Creates a new list element * Returns 1 if successful or -1 on error */ int libpff_list_append_value( libpff_list_t *list, intptr_t *value, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_append_value"; if( libpff_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); goto on_error; } if( libpff_list_append_element( list, list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to list.", function ); goto on_error; } if( libpff_list_element_set_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of list element.", function ); goto on_error; } return( 1 ); on_error: if( list_element != NULL ) { libpff_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Inserts a list element into the list * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBPFF_LIST_COMPARE_LESS, * LIBPFF_LIST_COMPARE_EQUAL, LIBPFF_LIST_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate value. * Only allowing unique entries can be enforced by setting the flag LIBPFF_LIST_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libpff_list_insert_element( libpff_list_t *list, libpff_list_element_t *element, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_insert_element"; int element_index = 0; int result = -1; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( ( element->previous_element != NULL ) || ( element->next_element != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: list element already part of a list.", function ); return( -1 ); } if( value_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBPFF_LIST_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( list->number_of_elements == 0 ) { if( list->first_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first element already set.", function ); return( -1 ); } if( list->last_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last element already set.", function ); return( -1 ); } list->first_element = element; list->last_element = element; } else { if( list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first.", function ); return( -1 ); } if( list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last.", function ); return( -1 ); } list_element = list->first_element; for( element_index = 0; element_index < list->number_of_elements; element_index++ ) { result = value_compare_function( element->value, list_element->value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare list element: %d.", function, element_index ); return( -1 ); } else if( result == LIBPFF_LIST_COMPARE_EQUAL ) { if( ( insert_flags & LIBPFF_LIST_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBPFF_LIST_COMPARE_LESS ) { break; } else if( result != LIBPFF_LIST_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, result ); return( -1 ); } list_element = list_element->next_element; } if( result == LIBPFF_LIST_COMPARE_LESS ) { element->previous_element = list_element->previous_element; element->next_element = list_element; if( list_element == list->first_element ) { list->first_element = element; } else if( list_element->previous_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing previous in list element: %d.", function, element_index ); return( -1 ); } else { list_element->previous_element->next_element = element; } list_element->previous_element = element; } else { element->previous_element = list->last_element; list->last_element->next_element = element; list->last_element = element; } } list->number_of_elements += 1; return( 1 ); } /* Inserts a value to the list * * Creates a new list element * * Uses the value_compare_function to determine the order of the entries * The value_compare_function should return LIBPFF_LIST_COMPARE_LESS, * LIBPFF_LIST_COMPARE_EQUAL, LIBPFF_LIST_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate value. * Only allowing unique entries can be enforced by setting the flag LIBPFF_LIST_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the list element already exists or -1 on error */ int libpff_list_insert_value( libpff_list_t *list, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_list_insert_value"; int result = 0; if( libpff_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); return( -1 ); } if( libpff_list_element_set_value( list_element, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of list element.", function ); goto on_error; } result = libpff_list_insert_element( list, list_element, value_compare_function, insert_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert element to list.", function ); goto on_error; } else if( result == 0 ) { if( libpff_list_element_free( &list_element, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free list element.", function ); goto on_error; } } return( result ); on_error: if( list_element != NULL ) { libpff_list_element_free( &list_element, NULL, NULL ); } return( -1 ); } /* Removes an element from the list * Returns 1 if successful or -1 on error */ int libpff_list_remove_element( libpff_list_t *list, libpff_list_element_t *element, libcerror_error_t **error ) { static char *function = "libpff_list_remove_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list element.", function ); return( -1 ); } if( element == list->first_element ) { list->first_element = element->next_element; } if( element == list->last_element ) { list->last_element = element->previous_element; } if( element->next_element != NULL ) { element->next_element->previous_element = element->previous_element; } if( element->previous_element != NULL ) { element->previous_element->next_element = element->next_element; } element->next_element = NULL; element->previous_element = NULL; list->number_of_elements -= 1; return( 1 ); } libpff-20120802/libpff/libpff_debug.h0000644000175000017500000000551612005155304014162 00000000000000/* * Debug functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_DEBUG_H ) #define _LIBPFF_DEBUG_H #include #include #include #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_list_type.h" #if defined( __cplusplus ) extern "C" { #endif enum LIBPFF_DEBUG_ITEM_TYPES { LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, LIBPFF_DEBUG_ITEM_TYPE_NAME_TO_ID_MAP }; #if defined( HAVE_DEBUG_OUTPUT ) const char *libpff_debug_get_name_to_id_map_property_type_identifier( uint32_t entry_type, uint32_t value_type ); const char *libpff_debug_get_name_to_id_map_property_type_description( uint32_t entry_type, uint32_t value_type ); void libpff_debug_print_node_identifier_type( uint8_t node_identifier_type ); int libpff_debug_property_type_value_reference_print( libpff_list_t *name_to_id_map_list, uint32_t entry_type, uint32_t value_type, libfdata_reference_t *value_data_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *descriptor_cache, int debug_item_type, int ascii_codepage, libcerror_error_t **error ); int libpff_debug_property_type_value_print( libpff_list_t *name_to_id_map_list, uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int debug_item_type, int ascii_codepage, libcerror_error_t **error ); int libpff_debug_mapi_value_print( libpff_list_t *name_to_id_map_list, uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libpff_debug_name_to_id_map_value_print( uint32_t entry_type, uint32_t value_type, uint8_t *value_data, size_t value_data_size, int ascii_codepage, libcerror_error_t **error ); int libpff_debug_print_read_offsets( libbfio_handle_t *file_io_handle, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_file.c0000644000175000017500000015201712005155304014005 00000000000000/* * File functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_codepage.h" #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_io_handle.h" #include "libpff_item.h" #include "libpff_item_descriptor.h" #include "libpff_file.h" #include "libpff_folder.h" #include "libpff_item_tree.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libcstring.h" #include "libpff_libfdata.h" #include "libpff_list_type.h" #include "libpff_name_to_id_map.h" #include "libpff_offset_list.h" #include "libpff_tree_type.h" #include "libpff_types.h" /* Initialize a file * Make sure the value file is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libpff_file_initialize( libpff_file_t **file, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_initialize"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( *file != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid file value already set.", function ); return( -1 ); } internal_file = memory_allocate_structure( libpff_internal_file_t ); if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create file.", function ); goto on_error; } if( memory_set( internal_file, 0, sizeof( libpff_internal_file_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear file.", function ); goto on_error; } if( libpff_io_handle_initialize( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create IO handle.", function ); goto on_error; } *file = (libpff_file_t *) internal_file; return( 1 ); on_error: if( internal_file != NULL ) { memory_free( internal_file ); } return( -1 ); } /* Frees a file * Returns 1 if successful or -1 on error */ int libpff_file_free( libpff_file_t **file, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_free"; int result = 1; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( *file != NULL ) { internal_file = (libpff_internal_file_t *) *file; if( internal_file->file_io_handle != NULL ) { if( libpff_file_close( *file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file.", function ); result = -1; } } *file = NULL; if( libpff_io_handle_free( &( internal_file->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } memory_free( internal_file ); } return( result ); } /* Signals the file to abort its current activity * Returns 1 if successful or -1 on error */ int libpff_file_signal_abort( libpff_file_t *file, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_signal_abort"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } internal_file->io_handle->abort = 1; return( 1 ); } /* Opens a file * Returns 1 if successful or -1 on error */ int libpff_file_open( libpff_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_open"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( libbfio_file_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libbfio_handle_set_track_offsets_read( file_io_handle, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set track offsets read in file IO handle.", function ); goto on_error; } #endif if( libbfio_file_set_name( file_io_handle, filename, libcstring_narrow_string_length( filename ) + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set filename in file IO handle.", function ); goto on_error; } if( libpff_file_open_file_io_handle( file, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file: %s.", function, filename ); goto on_error; } internal_file->file_io_handle_created_in_library = 1; return( 1 ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( -1 ); } #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Opens a file * Returns 1 if successful or -1 on error */ int libpff_file_open_wide( libpff_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ) { libbfio_handle_t *file_io_handle = NULL; libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_open_wide"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( libbfio_file_initialize( &file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libbfio_handle_set_track_offsets_read( file_io_handle, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set track offsets read in file IO handle.", function ); goto on_error; } #endif if( libbfio_file_set_name_wide( file_io_handle, filename, libcstring_wide_string_length( filename ) + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set filename in file IO handle.", function ); goto on_error; } if( libpff_file_open_file_io_handle( file, file_io_handle, access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file: %ls.", function, filename ); goto on_error; } internal_file->file_io_handle_created_in_library = 1; return( 1 ); on_error: if( file_io_handle != NULL ) { libbfio_handle_free( &file_io_handle, NULL ); } return( -1 ); } #endif /* Opens a file using a Basic File IO (bfio) handle * Returns 1 if successful or -1 on error */ int libpff_file_open_file_io_handle( libpff_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_open_file_io_handle"; int bfio_access_flags = 0; int file_io_handle_is_open = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->file_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - file IO handle already set.", function ); return( -1 ); } if( file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file IO handle.", function ); return( -1 ); } if( ( ( access_flags & LIBPFF_ACCESS_FLAG_READ ) == 0 ) && ( ( access_flags & LIBPFF_ACCESS_FLAG_WRITE ) == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported access flags.", function ); return( -1 ); } if( ( access_flags & LIBPFF_ACCESS_FLAG_WRITE ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: write access currently not supported.", function ); return( -1 ); } if( ( access_flags & LIBPFF_ACCESS_FLAG_READ ) != 0 ) { bfio_access_flags = LIBBFIO_ACCESS_FLAG_READ; } internal_file->file_io_handle = file_io_handle; file_io_handle_is_open = libbfio_handle_is_open( internal_file->file_io_handle, error ); if( file_io_handle_is_open == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); return( -1 ); } else if( file_io_handle_is_open == 0 ) { if( libbfio_handle_open( internal_file->file_io_handle, bfio_access_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file IO handle.", function ); return( -1 ); } } if( libpff_file_open_read( internal_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read from file handle.", function ); return( -1 ); } return( 1 ); } /* Closes a file * Returns 0 if successful or -1 on error */ int libpff_file_close( libpff_file_t *file, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_close"; int result = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->file_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing file IO handle.", function ); return( -1 ); } if( internal_file->file_io_handle_created_in_library != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libpff_debug_print_read_offsets( internal_file->file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print the read offsets.", function ); result = -1; } } #endif if( libbfio_handle_close( internal_file->file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file IO handle.", function ); result = -1; } if( libbfio_handle_free( &( internal_file->file_io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file IO handle.", function ); result = -1; } } internal_file->file_io_handle = NULL; internal_file->file_io_handle_created_in_library = 0; if( internal_file->item_tree_root_node != NULL ) { if( libpff_tree_node_free( &( internal_file->item_tree_root_node ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item tree.", function ); result = -1; } } if( internal_file->orphan_item_list != NULL ) { if( libpff_list_free( &( internal_file->orphan_item_list ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free orphan item list.", function ); result = -1; } } if( internal_file->recovered_item_list != NULL ) { if( libpff_list_free( &( internal_file->recovered_item_list ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_tree_node_free_recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free recovered item list.", function ); result = -1; } } if( internal_file->unallocated_data_block_list != NULL ) { if( libpff_offset_list_free( &( internal_file->unallocated_data_block_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free unallocated data block list.", function ); result = -1; } } if( internal_file->unallocated_page_block_list != NULL ) { if( libpff_offset_list_free( &( internal_file->unallocated_page_block_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free unallocated page block list.", function ); result = -1; } } if( internal_file->name_to_id_map_list != NULL ) { if( libpff_list_free( &( internal_file->name_to_id_map_list ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_name_to_id_map_entry_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free name to id map list.", function ); result = -1; } } return( result ); } /* Opens a file for reading * Returns 1 if successful or -1 on error */ int libpff_file_open_read( libpff_internal_file_t *internal_file, libcerror_error_t **error ) { static char *function = "libpff_file_open_read"; int result = 0; if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal file.", function ); return( -1 ); } if( internal_file->orphan_item_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - orphan item list already set.", function ); return( -1 ); } if( internal_file->name_to_id_map_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - name to id map list already set.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading file header:\n" ); } #endif if( libpff_io_handle_read_file_header( internal_file->io_handle, internal_file->file_io_handle, &( internal_file->content_type ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read file header.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Creating item tree:\n" ); } #endif if( libpff_list_initialize( &( internal_file->orphan_item_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create orphan item list.", function ); return( -1 ); } result = libpff_io_handle_create_item_tree( internal_file->io_handle, internal_file->file_io_handle, &( internal_file->item_tree_root_node ), internal_file->orphan_item_list, &( internal_file->root_folder_item_tree_node ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item tree.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Name to ID map:\n" ); } #endif if( libpff_list_initialize( &( internal_file->name_to_id_map_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create name to id map list.", function ); return( -1 ); } result = libpff_name_to_id_map_read( internal_file->name_to_id_map_list, internal_file->io_handle, internal_file->file_io_handle, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read name to id map.", function ); return( -1 ); } /* TODO flag missing name to id map if 0 */ return( 1 ); } /* Reads the allocation tables * Returns 1 if successful or -1 on error */ int libpff_file_read_allocation_tables( libpff_internal_file_t *internal_file, libcerror_error_t **error ) { static char *function = "libpff_file_read_allocation_tables"; if( internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal file.", function ); return( -1 ); } if( internal_file->read_allocation_tables != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - allocation tables already set.", function ); return( -1 ); } if( internal_file->unallocated_data_block_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - allocaled data block list already set.", function ); return( -1 ); } if( internal_file->unallocated_page_block_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - allocaled page block list already set.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading the unallocated data blocks:\n" ); } #endif if( libpff_offset_list_initialize( &( internal_file->unallocated_data_block_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create unallocated data block list.", function ); return( -1 ); } if( libpff_io_handle_read_unallocated_data_blocks( internal_file->io_handle, internal_file->file_io_handle, internal_file->unallocated_data_block_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read unallocated data blocks.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "Reading the unallocated page blocks:\n" ); } #endif if( libpff_offset_list_initialize( &( internal_file->unallocated_page_block_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create unallocated page block list.", function ); return( -1 ); } if( libpff_io_handle_read_unallocated_page_blocks( internal_file->io_handle, internal_file->file_io_handle, internal_file->unallocated_page_block_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read unallocated page blocks.", function ); return( -1 ); } internal_file->read_allocation_tables = 1; return( 1 ); } /* Recovers deleted items * By default only the unallocated space is checked for recoverable items * Returns 1 if successful or -1 on error */ int libpff_file_recover_items( libpff_file_t *file, uint8_t recovery_flags, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_recover_items"; int result = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( internal_file->recovered_item_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid internal file - recovered item list already set.", function ); return( -1 ); } if( internal_file->read_allocation_tables == 0 ) { if( libpff_file_read_allocation_tables( internal_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read allocation tables.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); /* TODO set recovery_flags |= LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA ? */ } } if( libpff_list_initialize( &( internal_file->recovered_item_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recovered item list.", function ); return( -1 ); } result = libpff_io_handle_recover_items( internal_file->io_handle, internal_file->file_io_handle, internal_file->unallocated_data_block_list, internal_file->unallocated_page_block_list, internal_file->recovered_item_list, recovery_flags, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to recover items.", function ); } if( internal_file->io_handle->abort != 0 ) { internal_file->io_handle->abort = 0; } return( result ); } /* Retrieves the file size * Returns 1 if successful or -1 on error */ int libpff_file_get_size( libpff_file_t *file, size64_t *size, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_size"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = internal_file->io_handle->file_size; return( 1 ); } /* Retrieves the content type * Returns 1 if successful or -1 on error */ int libpff_file_get_content_type( libpff_file_t *file, uint8_t *content_type, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_content_type"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( content_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid content type.", function ); return( -1 ); } *content_type = (uint8_t) internal_file->content_type; return( 1 ); } /* Retrieves the file type * Returns 1 if successful or -1 on error */ int libpff_file_get_type( libpff_file_t *file, uint8_t *type, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_type"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type.", function ); return( -1 ); } *type = internal_file->io_handle->file_type; return( 1 ); } /* Retrieves the encryption type * Returns 1 if successful or -1 on error */ int libpff_file_get_encryption_type( libpff_file_t *file, uint8_t *encryption_type, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_encryption_type"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( encryption_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid encryption type.", function ); return( -1 ); } *encryption_type = internal_file->io_handle->encryption_type; return( 1 ); } /* Retrieves the ASCII codepage * Returns 1 if successful or -1 on error */ int libpff_file_get_ascii_codepage( libpff_file_t *file, int *ascii_codepage, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ascii_codepage == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid ASCII codepage.", function ); return( -1 ); } *ascii_codepage = internal_file->io_handle->ascii_codepage; return( 1 ); } /* Sets the ASCII codepage * Returns 1 if successful or -1 on error */ int libpff_file_set_ascii_codepage( libpff_file_t *file, int ascii_codepage, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_set_ascii_codepage"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing IO handle.", function ); return( -1 ); } if( ( ascii_codepage != LIBPFF_CODEPAGE_ASCII ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_874 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_932 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_936 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1250 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1251 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1252 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1253 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1254 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1256 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1257 ) && ( ascii_codepage != LIBPFF_CODEPAGE_WINDOWS_1258 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported ASCII codepage.", function ); return( -1 ); } internal_file->io_handle->ascii_codepage = ascii_codepage; return( 1 ); } /* Retrieves the number of unallocated blocks * Returns 1 if successful or -1 on error */ int libpff_file_get_number_of_unallocated_blocks( libpff_file_t *file, int unallocated_block_type, int *number_of_unallocated_blocks, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_offset_list_t *unallocated_block_list = NULL; static char *function = "libpff_file_get_number_of_unallocated_blocks"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( ( unallocated_block_type != LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA ) && ( unallocated_block_type != LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported unallocated block type.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->read_allocation_tables == 0 ) { if( libpff_file_read_allocation_tables( internal_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read allocation tables.", function ); return( -1 ); } } if( unallocated_block_type == LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA ) { unallocated_block_list = internal_file->unallocated_data_block_list; } else if( unallocated_block_type == LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE ) { unallocated_block_list = internal_file->unallocated_page_block_list; } if( libpff_offset_list_get_number_of_elements( unallocated_block_list, number_of_unallocated_blocks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of unallocated blocks.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific unallocated block * Returns 1 if successful or -1 on error */ int libpff_file_get_unallocated_block( libpff_file_t *file, int unallocated_block_type, int unallocated_block_index, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_offset_list_t *unallocated_block_list = NULL; static char *function = "libpff_file_get_unallocated_block"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( ( unallocated_block_type != LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA ) && ( unallocated_block_type != LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported unallocated block type.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( unallocated_block_type == LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA ) { unallocated_block_list = internal_file->unallocated_data_block_list; } else if( unallocated_block_type == LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE ) { unallocated_block_list = internal_file->unallocated_page_block_list; } if( unallocated_block_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing unallocated block list.", function ); return( -1 ); } if( internal_file->read_allocation_tables == 0 ) { if( libpff_file_read_allocation_tables( internal_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read allocation tables.", function ); return( -1 ); } } if( libpff_offset_list_get_offset( unallocated_block_list, unallocated_block_index, offset, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve offset list element.", function ); return( -1 ); } return( 1 ); } /* Retrieves the root item * Returns 1 if successful or -1 on error */ int libpff_file_get_root_item( libpff_file_t *file, libpff_item_t **root_item, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_root_item"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->item_tree_root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing item tree root node.", function ); return( -1 ); } if( root_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root item.", function ); return( -1 ); } if( *root_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: root item already set.", function ); return( -1 ); } if( libpff_item_initialize( root_item, internal_file->file_io_handle, internal_file, internal_file->item_tree_root_node, (libpff_item_descriptor_t *) internal_file->item_tree_root_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root item.", function ); return( -1 ); } return( 1 ); } /* Retrieves the message store * Returns 1 if successful, 0 if not present or -1 on error */ int libpff_file_get_message_store( libpff_file_t *file, libpff_item_t **message_store, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_tree_node_t *message_store_item_tree_node = NULL; static char *function = "libpff_file_get_message_store"; int result = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( message_store == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message store.", function ); return( -1 ); } if( *message_store != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: message store already set.", function ); return( -1 ); } result = libpff_item_tree_get_tree_node_by_identifier( internal_file->item_tree_root_node, LIBPFF_DESCRIPTOR_IDENTIFIER_MESSAGE_STORE, &message_store_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message store item tree node: %" PRIu32 ".", function, LIBPFF_DESCRIPTOR_IDENTIFIER_MESSAGE_STORE ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( message_store_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message store item tree node.", function ); return( -1 ); } if( libpff_item_initialize( message_store, internal_file->file_io_handle, internal_file, message_store_item_tree_node, (libpff_item_descriptor_t *) message_store_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create message store.", function ); return( -1 ); } return( 1 ); } /* Retrieves the name to id map * Returns 1 if successful, 0 if not present or -1 on error */ int libpff_file_get_name_to_id_map( libpff_file_t *file, libpff_item_t **name_to_id_map, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_tree_node_t *name_to_id_map_item_tree_node = NULL; static char *function = "libpff_file_get_name_to_id_map"; int result = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( name_to_id_map == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map.", function ); return( -1 ); } if( *name_to_id_map != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: name to id map already set.", function ); return( -1 ); } result = libpff_item_tree_get_tree_node_by_identifier( internal_file->item_tree_root_node, LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP, &name_to_id_map_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to ip map item tree node: %" PRIu32 ".", function, LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( name_to_id_map_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid name to ip map item tree node.", function ); return( -1 ); } if( libpff_item_initialize( name_to_id_map, internal_file->file_io_handle, internal_file, name_to_id_map_item_tree_node, (libpff_item_descriptor_t *) name_to_id_map_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create name to id map.", function ); return( -1 ); } return( 1 ); } /* Retrieves the root folder * Returns 1 if successful or -1 on error */ int libpff_file_get_root_folder( libpff_file_t *file, libpff_item_t **root_folder, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_root_folder"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->root_folder_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing root folder item tree node.", function ); return( -1 ); } if( root_folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root folder.", function ); return( -1 ); } if( *root_folder != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: root folder already set.", function ); return( -1 ); } if( libpff_item_initialize( root_folder, internal_file->file_io_handle, internal_file, internal_file->root_folder_item_tree_node, (libpff_item_descriptor_t *) internal_file->root_folder_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root folder.", function ); return( -1 ); } return( 1 ); } /* Retrieves an item for a specific identifier * Returns 1 if successful, 0 if no such item, or -1 on error */ int libpff_file_get_item_by_identifier( libpff_file_t *file, uint32_t item_identifier, libpff_item_t **item, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_tree_node_t *item_tree_node = NULL; static char *function = "libpff_file_get_item_by_identifier"; int result = 0; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->item_tree_root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid file - missing item tree root node.", function ); return( -1 ); } if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } if( *item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: item already set.", function ); return( -1 ); } result = libpff_item_tree_get_tree_node_by_identifier( internal_file->item_tree_root_node, item_identifier, &item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve item tree node: %" PRIu32 ".", function, item_identifier ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item tree node.", function ); return( -1 ); } if( libpff_item_initialize( item, internal_file->file_io_handle, internal_file, item_tree_node, (libpff_item_descriptor_t *) item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize item.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of orphan items * Returns 1 if successful or -1 on error */ int libpff_file_get_number_of_orphan_items( libpff_file_t *file, int *number_of_orphan_items, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_number_of_orphan_items"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( libpff_list_get_number_of_elements( internal_file->orphan_item_list, number_of_orphan_items, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of orphan items.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific orphan item * Returns 1 if successful or -1 on error */ int libpff_file_get_orphan_item( libpff_file_t *file, int orphan_item_index, libpff_item_t **orphan_item, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_tree_node_t *orphan_item_tree_node = NULL; static char *function = "libpff_file_get_orphan_item"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( internal_file->orphan_item_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal file - missing orphan item list.", function ); return( -1 ); } if( orphan_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid orphan item.", function ); return( -1 ); } if( libpff_list_get_value_by_index( internal_file->orphan_item_list, orphan_item_index, (intptr_t **) &orphan_item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve orphan item tree node: %d.", function, orphan_item_index ); return( -1 ); } if( libpff_item_initialize( orphan_item, internal_file->file_io_handle, internal_file, orphan_item_tree_node, (libpff_item_descriptor_t *) orphan_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create orphan item.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of recovered items * Returns 1 if successful or -1 on error */ int libpff_file_get_number_of_recovered_items( libpff_file_t *file, int *number_of_recovered_items, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; static char *function = "libpff_file_get_number_of_recovered_items"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( libpff_list_get_number_of_elements( internal_file->recovered_item_list, number_of_recovered_items, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered items.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific recovered item * Returns 1 if successful or -1 on error */ int libpff_file_get_recovered_item( libpff_file_t *file, int recovered_item_index, libpff_item_t **recovered_item, libcerror_error_t **error ) { libpff_internal_file_t *internal_file = NULL; libpff_tree_node_t *recovered_item_tree_node = NULL; static char *function = "libpff_file_get_recovered_item"; if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } internal_file = (libpff_internal_file_t *) file; if( recovered_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid recovered item.", function ); return( -1 ); } if( libpff_list_get_value_by_index( internal_file->recovered_item_list, recovered_item_index, (intptr_t **) &recovered_item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered item tree node: %d.", function, recovered_item_index ); return( -1 ); } if( libpff_item_initialize( recovered_item, internal_file->file_io_handle, internal_file, recovered_item_tree_node, (libpff_item_descriptor_t *) recovered_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recovered item.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_table.h0000644000175000017500000002732212005155304014162 00000000000000/* * Table functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_TABLE_H ) #define _LIBPFF_TABLE_H #include #include #include "libpff_array_type.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_list_type.h" #include "libpff_local_descriptor_value.h" #include "libpff_name_to_id_map.h" #include "libpff_record_entry.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif enum LIBPFF_TABLE_FLAGS { /* The data of one or more recrord entries could not be read */ LIBPFF_TABLE_FLAG_MISSING_RECORD_ENTRY_DATA = 0x01, }; typedef struct libpff_table_index_value libpff_table_index_value_t; struct libpff_table_index_value { /* The table data array entry of the value */ uint32_t array_entry; /* The offset of the value */ uint16_t offset; /* The size of the value */ uint16_t size; }; typedef struct libpff_table_index_values libpff_table_index_values_t; struct libpff_table_index_values { /* The number of values */ uint16_t number_of_values; /* The table index values */ libpff_table_index_value_t *value; }; typedef struct libpff_table libpff_table_t; struct libpff_table { /* The descriptor identifier value */ uint32_t descriptor_identifier; /* The data identifier value */ uint64_t data_identifier; /* The local descriptors identifier value */ uint64_t local_descriptors_identifier; /* Value to indicate if the table was recovered */ uint8_t recovered; /* The value index of the recovered data identifier */ int recovered_data_identifier_value_index; /* The value index of the recovered local descriptors identifier */ int recovered_local_descriptors_identifier_value_index; /* The descriptor data block */ libfdata_block_t *descriptor_data_block; /* The descriptor data cache */ libfcache_cache_t *descriptor_data_cache; /* The local descriptors tree */ libfdata_tree_t *local_descriptors_tree; /* The local descriptors cache */ libfcache_cache_t *local_descriptors_cache; /* The index (array) */ libpff_array_t *index; /* The record entries data references (array) */ libpff_array_t *record_entries_data_references; /* TODO refactoring */ /* The record entries */ libpff_record_entry_t **entry; /* The number of records */ int number_of_sets; /* The number of record entries */ int number_of_entries; /* The flags */ uint8_t flags; }; typedef struct libpff_table_values_array_entry libpff_table_values_array_entry_t; struct libpff_table_values_array_entry { /* The identifier */ uint32_t identifier; /* The entry number */ uint32_t entry_number; }; int libpff_table_index_values_initialize( libpff_table_index_values_t **table_index_values, uint16_t number_of_values, libcerror_error_t **error ); int libpff_table_index_values_free( libpff_table_index_values_t **table_index_values, libcerror_error_t **error ); int libpff_table_entries_resize( libpff_table_t *table, int number_of_sets, int number_of_entries, libcerror_error_t **error ); int libpff_table_entries_clone( libpff_table_t *destination, libpff_table_t *source, libcerror_error_t **error ); int libpff_table_initialize( libpff_table_t **table, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ); int libpff_table_free( libpff_table_t **table, libcerror_error_t **error ); int libpff_table_clone( libpff_table_t **destination_table, libpff_table_t *source_table, libcerror_error_t **error ); int libpff_table_get_local_descriptors_value_by_identifier( libpff_table_t *table, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ); int libpff_table_get_index_value_by_reference( libpff_table_t *table, uint32_t table_index_reference, libpff_table_index_value_t **table_index_value, libcerror_error_t **error ); int libpff_table_get_number_of_sets( libpff_table_t *table, int *number_of_sets, libcerror_error_t **error ); int libpff_table_get_number_of_entries( libpff_table_t *table, int *number_of_entries, libcerror_error_t **error ); int libpff_table_get_entry_type_by_index( libpff_table_t *table, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ); int libpff_table_get_entry_value_by_index( libpff_table_t *table, int set_index, int entry_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, libcerror_error_t **error ); int libpff_table_get_entry_value_by_entry_type( libpff_table_t *table, int set_index, uint32_t entry_type, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, uint8_t flags, libcerror_error_t **error ); int libpff_table_get_entry_value_by_utf8_entry_name( libpff_table_t *table, int set_index, uint8_t *utf8_entry_name, size_t utf8_entry_name_length, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, libcerror_error_t **error ); int libpff_table_get_entry_value_by_utf16_entry_name( libpff_table_t *table, int set_index, uint16_t *utf16_entry_name, size_t utf16_entry_name_length, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, libcerror_error_t **error ); int libpff_table_read( libpff_table_t *table, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, int debug_item_type, libcerror_error_t **error ); int libpff_table_read_index( libpff_table_t *table, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_record_entries_data_references( libpff_table_t *table, uint8_t record_entries_level, uint8_t record_entry_identifier_size, uint32_t record_entries_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_values( libpff_table_t *table, uint8_t table_type, uint32_t table_value_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, int debug_item_type, libcerror_error_t **error ); int libpff_table_read_6c_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_7c_values( libpff_table_t *table, uint32_t table_header_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_8c_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_9c_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_a5_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_ac_values( libpff_table_t *table, uint32_t table_header_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_bc_values( libpff_table_t *table, uint32_t table_header_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, int debug_item_type, libcerror_error_t **error ); int libpff_table_read_b5_header( libpff_table_t *table, uint32_t table_header_reference, uint8_t *record_entry_identifier_size, uint8_t *record_entry_value_size, uint8_t *record_entries_level, uint32_t *record_entries_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_6c_record_entries( libpff_table_t *table, uint32_t values_array_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_7c_column_definitions( libpff_array_t *column_definitions_array, libfdata_reference_t *column_definitions_data_reference, int number_of_column_definitions, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, libcerror_error_t **error ); int libpff_table_read_8c_record_entries( libpff_table_t *table, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_9c_record_entries( libpff_table_t *table, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_a5_record_entries( libpff_table_t *table, uint32_t record_entries_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_ac_column_definitions( libpff_table_t *table, libpff_array_t *column_definitions_array, uint32_t column_definitions_reference, int number_of_column_definitions, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, libcerror_error_t **error ); int libpff_table_read_bc_record_entries( libpff_table_t *table, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, int debug_item_type, libcerror_error_t **error ); int libpff_table_read_values_array( libpff_table_t *table, uint32_t record_entries_reference, uint32_t values_array_reference, uint8_t record_entry_identifier_size, uint8_t record_entry_value_size, uint16_t values_array_entry_size, libpff_array_t *column_definitions_array, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_table_read_entry_value( libpff_table_t *table, int set_index, int entry_index, uint32_t record_entry_type, uint32_t record_entry_value_type, uint8_t *record_entry_value, size_t record_entry_value_size, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, libpff_internal_name_to_id_map_entry_t *name_to_id_map_entry, libpff_table_t *record_entry_values_table, int debug_item_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_data_array.h0000644000175000017500000000650112005155304015176 00000000000000/* * Data array functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_DATA_ARRAY_H ) #define _LIBPFF_DATA_ARRAY_H #include #include #include "libpff_array_type.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif enum LIBPFF_DATA_ARRAY_FLAGS { LIBPFF_DATA_ARRAY_FLAG_DECRYPTION_FORCED = 0x02, }; typedef struct libpff_data_array libpff_data_array_t; struct libpff_data_array { /* Value to indicate if the data array descriptor identifier */ uint32_t descriptor_identifier; /* Value to indicate if the data array data identifier */ uint64_t data_identifier; /* A reference to the IO handle */ libpff_io_handle_t *io_handle; /* The total size of the data in the array */ size64_t data_size; /* The data array entries array */ libpff_array_t *entries; /* The (data array) flags */ uint8_t flags; }; int libpff_data_array_initialize( libpff_data_array_t **data_array, uint32_t descriptor_identifier, uint64_t data_identifier, libpff_io_handle_t *io_handle, libcerror_error_t **error ); int libpff_data_array_free( libpff_data_array_t **data_array, libcerror_error_t **error ); int libpff_data_array_clone( libpff_data_array_t **destination_data_array, libpff_data_array_t *source_data_array, libcerror_error_t **error ); int libpff_data_array_read( libpff_data_array_t *data_array, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_block_t *descriptor_data_block, uint8_t recovered, uint8_t *array_data, size_t array_data_size, libcerror_error_t **error ); int libpff_data_array_read_entries( libpff_data_array_t *data_array, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_block_t *descriptor_data_block, uint8_t recovered, uint8_t *array_data, size_t array_data_size, uint32_t *total_data_size, libcerror_error_t **error ); ssize_t libpff_data_array_read_entry_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int array_entry_index, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ); int libpff_data_array_decrypt_entry_data( libpff_data_array_t *data_array, int array_entry_index, uint8_t encryption_type, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/pff_table.h0000644000175000017500000002060012005155305013464 00000000000000/* * The table definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_TABLE_H ) #define _PFF_TABLE_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_table pff_table_t; struct pff_table { /* The table index offset * The offset is relative to the start of the table * Consists of 2 bytes */ uint8_t index_offset[ 2 ]; /* The signature * Consists of 1 byte * Contains: 0xec */ uint8_t signature; /* The table type * Consists of 1 byte * Currently known value types are: * 0x6c * 0x7c * 0x8c * 0x9c * 0xa5 * 0xac * 0xbc * * Other types defined by [MS-PST] are: * 0xb5 (considered as the b5 table header) * 0xcc */ uint8_t type; /* The table value reference * Consists of 4 bytes */ uint8_t value_reference[ 4 ]; /* Padding * Consists of 4 bytes */ uint8_t padding1[ 4 ]; /* The table values */ /* The table index */ }; typedef struct pff_table_index pff_table_index_t; struct pff_table_index { /* The number of offsets in the table index * Consists of 2 bytes */ uint8_t number_of_offsets[ 2 ]; /* The number of unused offsets in the table index * Consists of 2 bytes */ uint8_t number_of_unused_offsets[ 2 ]; /* The table value offsets */ }; typedef struct pff_table_index_item pff_table_index_item_t; struct pff_table_index_item { /* The start offset of the table value * The offset is relative to the start of the table * Consists of 2 bytes */ uint8_t start_offset[ 2 ]; /* The end offset of the table value * The offset is relative to the start of the table * Consists of 2 bytes * Contains the end offset + 1 */ uint8_t end_offset[ 2 ]; }; typedef struct pff_table_header_7c pff_table_header_7c_t; struct pff_table_header_7c { /* The table header type * Consists of 1 byte * Constant value of 0x7c */ uint8_t type; /* The number of column definitions in the 7c header * Consists of 1 byte */ uint8_t number_of_column_definitions; /* The values array end offset of the 32-bit values * Consists of 2 bytes */ uint8_t values_array_end_offset_32bit_values[ 2 ]; /* The values array end offset of the 16-bit values * Consists of 2 bytes */ uint8_t values_array_end_offset_16bit_values[ 2 ]; /* The values array end offset of the 8-bit values * Consists of 2 bytes */ uint8_t values_array_end_offset_8bit_values[ 2 ]; /* The values array end offset of the cell existence block * Consists of 2 bytes */ uint8_t values_array_end_offset_cell_existence_block[ 2 ]; /* The b5 table header index reference * Consists of 4 bytes */ uint8_t b5_table_header_reference[ 4 ]; /* The values array index reference * Consists of 4 bytes */ uint8_t values_array_reference[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; }; typedef struct pff_table_column_definition_7c pff_table_column_definition_7c_t; struct pff_table_column_definition_7c { /* The record entry value type * Consists of 2 bytes */ uint8_t record_entry_value_type[ 2 ]; /* The record entry type * Consists of 2 bytes */ uint8_t record_entry_type[ 2 ]; /* The values array offset * This is an offset relative to the start of a values array * Consists of 2 bytes */ uint8_t values_array_offset[ 2 ]; /* The values array size * Consists of 1 byte */ uint8_t values_array_size; /* The values array number * Consists of 1 byte */ uint8_t values_array_number; }; typedef struct pff_table_header_ac pff_table_header_ac_t; struct pff_table_header_ac { /* The table header type * Consists of 1 byte * Constant value of 0xac */ uint8_t type; /* Padding * Consists of 1 byte */ uint8_t padding1; /* The values array end offset of the 32-bit values * Consists of 2 bytes */ uint8_t values_array_end_offset_32bit_values[ 2 ]; /* The values array end offset of the 16-bit values * Consists of 2 bytes */ uint8_t values_array_end_offset_16bit_values[ 2 ]; /* The values array end offset of the 8-bit values * Consists of 2 bytes */ uint8_t values_array_end_offset_8bit_values[ 2 ]; /* The values array end offset of the cell existence block * Consists of 2 bytes */ uint8_t values_array_end_offset_cell_existence_block[ 2 ]; /* The b5 table header index reference * Consists of 4 bytes */ uint8_t b5_table_header_reference[ 4 ]; /* The values array index reference * Consists of 4 bytes */ uint8_t values_array_reference[ 4 ]; /* Padding * Consists of 4 bytes */ uint8_t padding2[ 4 ]; /* The number of column definitions * Consists of 2 bytes */ uint8_t number_of_column_definitions[ 2 ]; /* The column definitions index reference * Consists of 4 bytes */ uint8_t column_definitions_reference[ 4 ]; /* Unknown * Consists of 12 bytes * Last 4 bytes possible weak crc? */ uint8_t unknown2[ 12 ]; }; typedef struct pff_table_column_definition_ac pff_table_column_definition_ac_t; struct pff_table_column_definition_ac { /* The record entry value type * Consists of 2 bytes */ uint8_t record_entry_value_type[ 2 ]; /* The record entry type * Consists of 2 bytes */ uint8_t record_entry_type[ 2 ]; /* The values array offset * This is an offset relative to the start of a values array * Consists of 2 bytes */ uint8_t values_array_offset[ 2 ]; /* The values array size * Consists of 2 bytes */ uint8_t values_array_size[ 2 ]; /* The values array number * Consists of 2 bytes */ uint8_t values_array_number[ 2 ]; /* Padding * Consists of 2 bytes */ uint8_t padding1[ 2 ]; /* The record entry values table descriptor * Should refer to a table of type a5 * Consists of 4 bytes */ uint8_t record_entry_values_table_descriptor[ 4 ]; }; typedef struct pff_table_header_b5 pff_table_header_b5_t; struct pff_table_header_b5 { /* The table header type * Consists of 1 byte * Constant value of 0xb5 */ uint8_t type; /* The record entry identifier size * Consists of 1 byte */ uint8_t record_entry_identifier_size; /* The record entry value size * Consists of 1 byte */ uint8_t record_entry_value_size; /* The record entries level * Consists of 1 byte */ uint8_t record_entries_level; /* The record entries reference * Consists of 4 bytes */ uint8_t record_entries_reference[ 4 ]; }; typedef struct pff_table_record_entry_6c pff_table_record_entry_6c_t; struct pff_table_record_entry_6c { /* The record entry GUID * Consists of 16 bytes */ uint8_t record_entry_guid[ 16 ]; /* The values array number * Consists of 2 bytes */ uint8_t values_array_number[ 2 ]; }; typedef struct pff_table_record_entry_8c pff_table_record_entry_8c_t; struct pff_table_record_entry_8c { /* Identifier * Consists of 8 bytes */ uint8_t identifier[ 8 ]; /* Descriptor identifier * Consists of 4 bytes */ uint8_t descriptor_identifier[ 4 ]; }; typedef struct pff_table_record_entry_9c pff_table_record_entry_9c_t; struct pff_table_record_entry_9c { /* The record entry GUID * Consists of 16 bytes */ uint8_t record_entry_guid[ 16 ]; /* Descriptor identifier * Consists of 4 bytes */ uint8_t descriptor_identifier[ 4 ]; }; typedef struct pff_table_record_entry_bc pff_table_record_entry_bc_t; struct pff_table_record_entry_bc { /* The record entry type * Consists of 2 bytes */ uint8_t record_entry_type[ 2 ]; /* The record entry value type * Consists of 2 bytes */ uint8_t record_entry_value_type[ 2 ]; /* The record entry value or value reference * The value reference is a descriptor to the table index or local descriptor list * Consists of 4 bytes */ uint8_t record_entry_value[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_libfvalue.h0000644000175000017500000000302612005155304015037 00000000000000/* * The libfvalue header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBFVALUE_H ) #define _LIBPFF_LIBFVALUE_H #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if defined( HAVE_LOCAL_LIBFVALUE ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFVALUE_DLL_IMPORT * before including libfvalue.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFVALUE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_item_tree.c0000644000175000017500000005723012005155304015044 00000000000000/* * Item tree functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_definitions.h" #include "libpff_index_tree.h" #include "libpff_index_value.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_item_descriptor.h" #include "libpff_item_tree.h" #include "libpff_tree_type.h" /* Frees a recovered item tree node * Returns 1 if successful or -1 on error */ int libpff_item_tree_node_free_recovered( libpff_tree_node_t **item_tree_node, libcerror_error_t **error ) { static char *function = "libpff_item_tree_node_free_recovered"; int result = 1; if( item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree node.", function ); return( -1 ); } if( *item_tree_node != NULL ) { if( libpff_tree_node_free( item_tree_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free tree node.", function ); result = -1; } } return( result ); } /* Retrieves the tree node of an item node * Returns 1 if successful, 0 if the item node was not found or -1 on error */ int libpff_item_tree_get_tree_node_by_identifier( libpff_tree_node_t *item_tree_node, uint32_t item_identifier, libpff_tree_node_t **result_item_tree_node, libcerror_error_t **error ) { libpff_item_descriptor_t *item_descriptor = NULL; libpff_tree_node_t *sub_tree_node = NULL; static char *function = "libpff_item_tree_get_tree_node_by_identifier"; int sub_node_iterator = 0; int result = 0; if( item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree node.", function ); return( -1 ); } if( item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item tree node - missing value.", function ); return( -1 ); } item_descriptor = (libpff_item_descriptor_t *) item_tree_node->value; if( item_descriptor->descriptor_identifier == item_identifier ) { if( result_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid result item tree node.", function ); return( -1 ); } if( *result_item_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: result item tree node already set.", function ); return( -1 ); } *result_item_tree_node = item_tree_node; return( 1 ); } if( item_tree_node->number_of_sub_nodes > 0 ) { sub_tree_node = item_tree_node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < item_tree_node->number_of_sub_nodes; sub_node_iterator++ ) { if( sub_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for sub node: %d.", function, sub_node_iterator ); return( -1 ); } result = libpff_item_tree_get_tree_node_by_identifier( sub_tree_node, item_identifier, result_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to traverse sub node: %d.", function, sub_node_iterator ); return( -1 ); } else if( result == 1 ) { break; } sub_tree_node = sub_tree_node->next_node; } } return( result ); } /* Retrieves the sub node of an item node * Returns 1 if successful, 0 if the item node was not found or -1 on error */ int libpff_item_tree_get_sub_node_by_identifier( libpff_tree_node_t *item_tree_node, uint32_t sub_node_identifier, libpff_tree_node_t **sub_node, libcerror_error_t **error ) { libpff_item_descriptor_t *item_descriptor = NULL; libpff_tree_node_t *sub_tree_node = NULL; static char *function = "libpff_item_tree_get_sub_node_by_identifier"; int sub_node_iterator = 0; int result = 0; if( item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree node.", function ); return( -1 ); } if( item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item tree node - missing value.", function ); return( -1 ); } if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node.", function ); return( -1 ); } if( *sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub node already set.", function ); return( -1 ); } if( item_tree_node->number_of_sub_nodes > 0 ) { sub_tree_node = item_tree_node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < item_tree_node->number_of_sub_nodes; sub_node_iterator++ ) { if( sub_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for sub node: %d.", function, sub_node_iterator ); return( -1 ); } if( sub_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value for sub node: %d.", function, sub_node_iterator ); return( -1 ); } item_descriptor = (libpff_item_descriptor_t *) sub_tree_node->value; if( item_descriptor->descriptor_identifier == sub_node_identifier ) { *sub_node = sub_tree_node; return( 1 ); } sub_tree_node = sub_tree_node->next_node; } } return( result ); } /* Creates an item tree node from the descriptor index * * If a descriptor index value has no existing parent it is added to the orphan node list * and the function will return 0 * * Returns 1 if successful, 0 if the item tree node could not be created or -1 on error */ int libpff_item_tree_create_node( libpff_tree_node_t *item_tree_root_node, libbfio_handle_t *file_io_handle, libfdata_tree_t *descriptor_index_tree, libfdata_tree_node_t *descriptor_index_tree_node, libfcache_cache_t *index_tree_cache, libpff_list_t *orphan_node_list, libpff_tree_node_t **root_folder_item_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *descriptor_index_tree_parent_node = NULL; libfdata_tree_node_t *descriptor_index_tree_sub_node = NULL; libpff_index_value_t *descriptor_index_value = NULL; libpff_item_descriptor_t *item_descriptor = NULL; libpff_tree_node_t *item_tree_node = NULL; libpff_tree_node_t *parent_node = NULL; static char *function = "libpff_item_tree_create_node"; int leaf_node_index = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( item_tree_root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree root node.", function ); return( -1 ); } if( orphan_node_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid orphan node list.", function ); return( -1 ); } if( root_folder_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root folder item tree node.", function ); return( -1 ); } /* Check if the index node can be read */ if( libfdata_tree_node_get_number_of_sub_nodes( descriptor_index_tree_node, file_io_handle, index_tree_cache, &number_of_sub_nodes, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub nodes from descriptor index tree node.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); /* TODO flag corrupt item tree */ return( 0 ); } result = libfdata_tree_node_is_deleted( descriptor_index_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if descriptor index tree sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { return( 0 ); } result = libfdata_tree_node_is_leaf( descriptor_index_tree_node, file_io_handle, index_tree_cache, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if descriptor index tree sub node: %d is a leaf node.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( descriptor_index_tree_node, file_io_handle, index_tree_cache, sub_node_index, &descriptor_index_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from descriptor index tree node.", function, sub_node_index ); return( -1 ); } result = libpff_item_tree_create_node( item_tree_root_node, file_io_handle, descriptor_index_tree, descriptor_index_tree_sub_node, index_tree_cache, orphan_node_list, root_folder_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index tree from descriptor index tree sub node: %d.", function, sub_node_index ); return( -1 ); } } } else { if( libfdata_tree_node_get_node_value( descriptor_index_tree_node, file_io_handle, index_tree_cache, (intptr_t **) &descriptor_index_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index tree sub node value.", function ); return( -1 ); } if( descriptor_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing descriptor index tree sub node value.", function ); return( -1 ); } if( descriptor_index_value->identifier > (uint64_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: descriptor index identifier value exceeds maximum.", function ); return( -1 ); } /* Create a new item descriptor */ if( libpff_item_descriptor_initialize( &item_descriptor, (uint32_t) descriptor_index_value->identifier, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item descriptor.", function ); return( -1 ); } if( item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing item descriptor.", function ); return( -1 ); } /* The root folder index descriptor points to itself as its parent */ if( descriptor_index_value->identifier == descriptor_index_value->parent_identifier ) { if( *root_folder_item_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: root folder item tree node already set.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } if( libpff_tree_node_initialize( root_folder_item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root folder item tree node.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } if( libpff_tree_node_set_value( *root_folder_item_tree_node, (intptr_t *) item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set item descriptor in root folder item tree node.", function ); libpff_tree_node_free( root_folder_item_tree_node, NULL, NULL ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } result = libpff_tree_node_insert_node( item_tree_root_node, *root_folder_item_tree_node, &libpff_item_descriptor_compare, LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES, NULL ); /* Free the node if it could not be inserted */ if( result != 1 ) { libpff_tree_node_free( root_folder_item_tree_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, NULL ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert item descriptor in item tree node.", function ); return( -1 ); } } else { result = libpff_item_tree_get_tree_node_by_identifier( item_tree_root_node, descriptor_index_value->parent_identifier, &parent_node, error ); if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading ahead for descriptor: %" PRIu64 " parent %" PRIu32 ".\n", function, descriptor_index_value->identifier, descriptor_index_value->parent_identifier ); } #endif result = libpff_index_tree_get_leaf_node_by_identifier( descriptor_index_tree, file_io_handle, index_tree_cache, descriptor_index_value->parent_identifier, &leaf_node_index, &descriptor_index_tree_parent_node, error ); if( result == 1 ) { if( descriptor_index_tree_parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor index tree parent node.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } result = libpff_item_tree_create_node( item_tree_root_node, file_io_handle, descriptor_index_tree, descriptor_index_tree_parent_node, index_tree_cache, orphan_node_list, root_folder_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index tree from descriptor index tree parent node: %" PRIu32 ".", function, descriptor_index_value->parent_identifier ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } parent_node = NULL; result = libpff_item_tree_get_tree_node_by_identifier( item_tree_root_node, descriptor_index_value->parent_identifier, &parent_node, error ); } } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find parent node: %" PRIu32 ".", function, descriptor_index_value->parent_identifier ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } else if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: parent node: %" PRIu32 " missing - found orphan node: %" PRIu64 ".\n", function, descriptor_index_value->parent_identifier, descriptor_index_value->identifier ); } #endif if( libpff_tree_node_initialize( &item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item tree node.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } if( libpff_tree_node_set_value( item_tree_node, (intptr_t *) item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set item descriptor in item tree root node.", function ); libpff_tree_node_free( &item_tree_node, NULL, NULL ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } item_descriptor = NULL; if( libpff_list_append_value( orphan_node_list, (intptr_t *) item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append orphan node in orphan node list.", function ); libpff_tree_node_free( &item_tree_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, NULL ); return( -1 ); } return( 0 ); } if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid parent node.", function ); libpff_item_descriptor_free( &item_descriptor, NULL ); return( -1 ); } result = libpff_tree_node_insert_value( parent_node, (intptr_t *) item_descriptor, &libpff_item_descriptor_compare, LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES, error ); /* Free the node if it could not be inserted */ if( result != 1 ) { libpff_item_descriptor_free( &item_descriptor, NULL ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert item descriptor in item tree node.", function ); return( -1 ); } } } return( 1 ); } /* Retrieves the identifier of the item * Returns 1 if successful or -1 on error */ int libpff_item_tree_get_identifier( libpff_tree_node_t *item_tree_node, uint32_t *identifier, libcerror_error_t **error ) { libpff_item_descriptor_t *item_descriptor = NULL; static char *function = "libpff_item_tree_get_identifier"; if( item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree node.", function ); return( -1 ); } if( item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item tree node - missing value.", function ); return( -1 ); } item_descriptor = (libpff_item_descriptor_t *) item_tree_node->value; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } *identifier = item_descriptor->descriptor_identifier; return( 1 ); } /* Appends the identifier of the item * Returns 1 if successful or -1 on error */ int libpff_item_tree_append_identifier( libpff_tree_node_t *item_tree_node, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ) { libpff_item_descriptor_t *item_descriptor = NULL; static char *function = "libpff_item_tree_append_identifier"; if( item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item tree node.", function ); return( -1 ); } if( libpff_item_descriptor_initialize( &item_descriptor, descriptor_identifier, data_identifier, local_descriptors_identifier, recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item descriptor.", function ); return( -1 ); } if( item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing item descriptor.", function ); return( -1 ); } if( libpff_tree_node_append_value( item_tree_node, (intptr_t *) item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append item descriptor to item tree node.", function ); memory_free( item_descriptor ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_name_to_id_map.c0000644000175000017500000011703312005155304016020 00000000000000/* * Name to ID map functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_codepage.h" #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_mapi.h" #include "libpff_name_to_id_map.h" #include "libpff_io_handle.h" #include "libpff_index_value.h" #include "libpff_item_values.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_libuna.h" #include "libpff_list_type.h" #include "libpff_types.h" #include "libpff_value_type.h" #include "pff_value_data.h" /* Creates a name to id map entry * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_initialize( libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_initialize"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } if( *name_to_id_map_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid name to id map entry value already set.", function ); return( -1 ); } internal_name_to_id_map_entry = memory_allocate_structure( libpff_internal_name_to_id_map_entry_t ); if( internal_name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name to id map entry.", function ); goto on_error; } if( memory_set( internal_name_to_id_map_entry, 0, sizeof( libpff_internal_name_to_id_map_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear name to id map entry.", function ); goto on_error; } *name_to_id_map_entry = (libpff_name_to_id_map_entry_t *) internal_name_to_id_map_entry; return( 1 ); on_error: if( internal_name_to_id_map_entry != NULL ) { memory_free( internal_name_to_id_map_entry ); } return( -1 ); } /* Frees a name to id map entry * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_free( libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_free"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } if( *name_to_id_map_entry != NULL ) { internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) *name_to_id_map_entry; *name_to_id_map_entry = NULL; if( ( internal_name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) && ( internal_name_to_id_map_entry->string_value != NULL ) ) { memory_free( internal_name_to_id_map_entry->string_value ); } #if defined( HAVE_DEBUG_OUTPUT ) if( internal_name_to_id_map_entry->debug_string != NULL ) { memory_free( internal_name_to_id_map_entry->debug_string ); } #endif memory_free( internal_name_to_id_map_entry ); } return( 1 ); } /* Read the name to id map * Returns 1 if successful, 0 if not available or -1 on error */ int libpff_name_to_id_map_read( libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfcache_cache_t *name_to_id_map_class_identifiers_data_cache = NULL; libfcache_cache_t *name_to_id_map_entries_data_cache = NULL; libfcache_cache_t *name_to_id_map_strings_data_cache = NULL; libfdata_reference_t *name_to_id_map_class_identifiers_data_reference = NULL; libfdata_reference_t *name_to_id_map_entries_data_reference = NULL; libfdata_reference_t *name_to_id_map_strings_data_reference = NULL; libpff_index_value_t *descriptor_index_value = NULL; libpff_name_to_id_map_entry_t *name_to_id_map_entry = NULL; libpff_item_values_t *item_values = NULL; uint8_t *name_to_id_map_class_identifiers_data = NULL; uint8_t *name_to_id_map_entries_data = NULL; uint8_t *name_to_id_map_entry_data = NULL; uint8_t *name_to_id_map_strings_data = NULL; static char *function = "libpff_name_to_id_map_read"; size_t name_to_id_map_class_identifiers_data_size = 0; size_t name_to_id_map_entries_data_size = 0; size_t name_to_id_map_strings_data_size = 0; uint32_t number_of_name_to_id_map_entries = 0; uint32_t name_to_id_map_entry_index = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; if( name_to_id_map_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map list.", function ); return( -1 ); } result = libpff_io_handle_get_descriptor_index_value_by_identifier( io_handle, file_io_handle, (uint32_t) LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP, 0, &descriptor_index_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value: %" PRIu32 ".", function, (uint32_t) LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); return( 0 ); } else if( result == 0 ) { return( 0 ); } if( descriptor_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid descriptor index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: descriptor identifier: %" PRIu64 " ", function, descriptor_index_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( descriptor_index_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 ", parent: %" PRIu32 "\n", descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, descriptor_index_value->parent_identifier ); } #endif if( libpff_item_values_initialize( &item_values, LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP, descriptor_index_value->data_identifier, descriptor_index_value->local_descriptors_identifier, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item values.", function ); goto on_error; } if( libpff_item_values_read( item_values, NULL, io_handle, file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_NAME_TO_ID_MAP, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read name to id map item values.", function ); goto on_error; } if( item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item values - missing table.", function ); goto on_error; } if( libpff_table_get_entry_value_by_entry_type( item_values->table, 0, LIBPFF_ENTRY_TYPE_NAME_TO_ID_MAP_ENTRIES, &value_type, &name_to_id_map_entries_data_reference, &name_to_id_map_entries_data_cache, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to id map entries data reference.", function ); goto on_error; } /* Reading the data at once reduces the amount of reads back and forth * also it prevents having to deal with entry boundary in the middle * of entry values. */ if( libfdata_reference_get_data( name_to_id_map_entries_data_reference, file_io_handle, name_to_id_map_entries_data_cache, &name_to_id_map_entries_data, &name_to_id_map_entries_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to id map entries data.", function ); goto on_error; } if( ( name_to_id_map_entries_data_size % 8 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported name to id map entries size.", function ); goto on_error; } number_of_name_to_id_map_entries = (uint32_t) ( name_to_id_map_entries_data_size / 8 ); if( libpff_table_get_entry_value_by_entry_type( item_values->table, 0, LIBPFF_ENTRY_TYPE_NAME_TO_ID_MAP_STRINGS, &value_type, &name_to_id_map_strings_data_reference, &name_to_id_map_strings_data_cache, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to id map strings data reference.", function ); goto on_error; } /* Reading the data at once reduces the amount of reads back and forth * also it prevents having to deal with entry boundary in the middle * of string values. */ if( libfdata_reference_get_data( name_to_id_map_strings_data_reference, file_io_handle, name_to_id_map_strings_data_cache, &name_to_id_map_strings_data, &name_to_id_map_strings_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to id map strings data.", function ); goto on_error; } if( libpff_table_get_entry_value_by_entry_type( item_values->table, 0, LIBPFF_ENTRY_TYPE_NAME_TO_ID_MAP_CLASS_IDENTIFIERS, &value_type, &name_to_id_map_class_identifiers_data_reference, &name_to_id_map_class_identifiers_data_cache, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to id map class identifiers data reference.", function ); goto on_error; } /* Reading the data at once reduces the amount of reads back and forth * also it prevents having to deal with entry boundary in the middle * of class identifier values. The data is stored in a separate cache. */ if( libfdata_reference_get_data( name_to_id_map_class_identifiers_data_reference, file_io_handle, name_to_id_map_class_identifiers_data_cache, &name_to_id_map_class_identifiers_data, &name_to_id_map_class_identifiers_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to id map class identifiers data.", function ); goto on_error; } name_to_id_map_entry_data = name_to_id_map_entries_data; for( name_to_id_map_entry_index = 0; name_to_id_map_entry_index < number_of_name_to_id_map_entries; name_to_id_map_entry_index++ ) { if( libpff_name_to_id_map_entry_initialize( &name_to_id_map_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create name to id map entry.", function ); goto on_error; } if( libpff_name_to_id_map_entry_read( name_to_id_map_entry, name_to_id_map_entry_data, sizeof( pff_name_to_id_map_entry_t ), name_to_id_map_class_identifiers_data, name_to_id_map_class_identifiers_data_size, name_to_id_map_strings_data, name_to_id_map_strings_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read name to id map entry.", function ); goto on_error; } name_to_id_map_entry_data += sizeof( pff_name_to_id_map_entry_t ); if( libpff_list_append_value( name_to_id_map_list, (intptr_t *) name_to_id_map_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append name to id map entry to list.", function ); goto on_error; } name_to_id_map_entry = NULL; } if( libpff_item_values_free( &item_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item values.", function ); goto on_error; } return( 1 ); on_error: if( name_to_id_map_entry != NULL ) { libpff_name_to_id_map_entry_free( &name_to_id_map_entry, NULL ); } if( item_values != NULL ) { libpff_item_values_free( &item_values, NULL ); } libpff_list_empty( name_to_id_map_list, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_name_to_id_map_entry_free, NULL ); return( -1 ); } /* Read the name to id map entry * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_read( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *name_to_id_map_entry_data, size_t name_to_id_map_entry_data_size, uint8_t *name_to_id_map_class_identifiers_data, size_t name_to_id_map_class_identifiers_data_size, uint8_t *name_to_id_map_strings_data, size_t name_to_id_map_strings_data_size, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; uint8_t *name_to_id_map_string_data = NULL; static char *function = "libpff_name_to_id_map_entry_read"; uint32_t name_to_id_map_entry_value = 0; uint32_t name_to_id_map_string_size = 0; uint16_t name_to_id_map_class_identifier_index = 0; uint16_t name_to_id_map_entry_type = 0; uint16_t name_to_id_map_entry_number = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t name_to_id_map_entry_index = 0; #endif if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( name_to_id_map_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry data.", function ); return( -1 ); } if( name_to_id_map_class_identifiers_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map class identifier data.", function ); return( -1 ); } if( name_to_id_map_strings_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map strings data.", function ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( ( (pff_name_to_id_map_entry_t *) name_to_id_map_entry_data )->entry_value, name_to_id_map_entry_value ); byte_stream_copy_to_uint16_little_endian( ( (pff_name_to_id_map_entry_t *) name_to_id_map_entry_data )->entry_type, name_to_id_map_entry_type ); byte_stream_copy_to_uint16_little_endian( ( (pff_name_to_id_map_entry_t *) name_to_id_map_entry_data )->entry_number, name_to_id_map_entry_number ); internal_name_to_id_map_entry->identifier = name_to_id_map_entry_number + 0x8000; if( name_to_id_map_entry_type > 5 ) { name_to_id_map_class_identifier_index = (uint16_t) ( ( name_to_id_map_entry_type / 2 ) - 3 ); if( (size_t) ( name_to_id_map_class_identifier_index * 16 ) > name_to_id_map_class_identifiers_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name to id map class identifier index value exceeds class identifiers data size.", function ); return( -1 ); } if( memory_copy( internal_name_to_id_map_entry->guid, &( name_to_id_map_class_identifiers_data[ name_to_id_map_class_identifier_index * 16 ] ), 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy name to id map class identifier.", function ); return( -1 ); } } else if( name_to_id_map_entry_type == 5 ) { if( memory_copy( internal_name_to_id_map_entry->guid, libfmapi_guid_public_strings, 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set public strings class identifier.", function ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: entry: %03d name to id map entry value\t\t: 0x%08" PRIx32 "\n", function, name_to_id_map_entry_index, name_to_id_map_entry_value ); if( name_to_id_map_entry_type > 5 ) { libcnotify_printf( "%s: entry: %03d name to id map entry type\t\t: 0x%04" PRIx16 " (class identifier: %02" PRIu16 ", class: %s)\n", function, name_to_id_map_entry_index, name_to_id_map_entry_type, name_to_id_map_class_identifier_index, libfmapi_class_identifier_get_name( internal_name_to_id_map_entry->guid ) ); } else if( name_to_id_map_entry_type == 5 ) { libcnotify_printf( "%s: entry: %03d name to id map entry type\t\t: 0x%04" PRIx16 " (class: %s)\n", function, name_to_id_map_entry_index, name_to_id_map_entry_type, libfmapi_class_identifier_get_name( internal_name_to_id_map_entry->guid ) ); } else { libcnotify_printf( "%s: entry: %03d name to id map entry type\t\t: 0x%04" PRIx16 "\n", function, name_to_id_map_entry_index, name_to_id_map_entry_type ); } libcnotify_printf( "%s: entry: %03d name to id map entry number\t: 0x%04" PRIx16 " (0x%04" PRIx32 ")\n", function, name_to_id_map_entry_index, name_to_id_map_entry_number, internal_name_to_id_map_entry->identifier ); } #endif /* The lowest bit of the name to id map entry type signifies * that the name to id map entry value refers to the name to id map string table or the item values */ if( ( name_to_id_map_entry_type & 0x0001 ) != 0 ) { if( name_to_id_map_entry_value > name_to_id_map_strings_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid name to id map entry value exceeds strings data size.", function ); return( -1 ); } name_to_id_map_string_data = &( name_to_id_map_strings_data[ name_to_id_map_entry_value ] ); byte_stream_copy_to_uint32_little_endian( name_to_id_map_string_data, name_to_id_map_string_size ); name_to_id_map_string_data += 4; internal_name_to_id_map_entry->type = LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING; result = libpff_value_type_string_contains_zero_bytes( name_to_id_map_string_data, name_to_id_map_string_size, error ) ; if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine name to id map entry string contains zero bytes.", function ); return( -1 ); } else if( result == 0 ) { internal_name_to_id_map_entry->is_ascii_string = 1; } internal_name_to_id_map_entry->value_size = name_to_id_map_string_size; internal_name_to_id_map_entry->string_value = (uint8_t *) memory_allocate( sizeof( uint8_t ) * internal_name_to_id_map_entry->value_size ); if( internal_name_to_id_map_entry->string_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name to id map entry string.", function ); return( -1 ); } if( memory_copy( internal_name_to_id_map_entry->string_value, name_to_id_map_string_data, internal_name_to_id_map_entry->value_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set name to id map entry string.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( internal_name_to_id_map_entry->is_ascii_string == 0 ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_size_from_utf16_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, &( internal_name_to_id_map_entry->debug_string_size ), error ); #else result = libuna_utf8_string_size_from_utf16_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, &( internal_name_to_id_map_entry->debug_string_size ), error ); #endif } else { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf8_string_size_from_byte_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, &( internal_name_to_id_map_entry->debug_string_size ), error ); #else result = libuna_utf8_string_size_from_byte_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, &( internal_name_to_id_map_entry->debug_string_size ), error ); #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine name to id map entry string size.", function ); return( -1 ); } internal_name_to_id_map_entry->debug_string = libcstring_system_string_allocate( internal_name_to_id_map_entry->debug_string_size ); if( internal_name_to_id_map_entry->debug_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create UTF-8 name to id map entry string.", function ); return( -1 ); } if( internal_name_to_id_map_entry->is_ascii_string == 0 ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_utf16_stream( (libuna_utf16_character_t *) internal_name_to_id_map_entry->debug_string, internal_name_to_id_map_entry->debug_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, error ); #else result = libuna_utf8_string_copy_from_utf16_stream( (libuna_utf8_character_t *) internal_name_to_id_map_entry->debug_string, internal_name_to_id_map_entry->debug_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, error ); #endif } else { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libuna_utf16_string_copy_from_byte_stream( (libuna_utf16_character_t *) internal_name_to_id_map_entry->debug_string, internal_name_to_id_map_entry->debug_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, error ); #else result = libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) internal_name_to_id_map_entry->debug_string, internal_name_to_id_map_entry->debug_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, error ); #endif } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set name to id map entry string.", function ); memory_free( internal_name_to_id_map_entry->debug_string ); internal_name_to_id_map_entry->debug_string = NULL; return( -1 ); } libcnotify_printf( "%s: entry: %03d name to id map entry string\t: %" PRIs_LIBCSTRING_SYSTEM "\n", function, name_to_id_map_entry_index, internal_name_to_id_map_entry->debug_string ); } #endif } else { internal_name_to_id_map_entry->type = LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC; internal_name_to_id_map_entry->numeric_value = name_to_id_map_entry_value; internal_name_to_id_map_entry->value_size = 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Retrieves the type * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_type( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *entry_type, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_type"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( entry_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry type.", function ); return( -1 ); } *entry_type = internal_name_to_id_map_entry->type; return( 1 ); } /* Retrieves the number * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_number( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint32_t *number, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_number"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( internal_name_to_id_map_entry->type != LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported name to id map entry type.", function ); return( -1 ); } if( number == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number.", function ); return( -1 ); } *number = internal_name_to_id_map_entry->numeric_value; return( 1 ); } /* Retrieves the UTF-8 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_utf8_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf8_string_size, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_utf8_string_size"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( internal_name_to_id_map_entry->type != LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported name to id map entry type.", function ); return( -1 ); } if( internal_name_to_id_map_entry->is_ascii_string == 0 ) { if( libuna_utf8_string_size_from_utf16_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine name to id map entry UTF-8 string size.", function ); return( -1 ); } } else { if( libuna_utf8_string_size_from_byte_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine name to id map entry UTF-8 string size.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the UTF-8 string * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_utf8_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_utf8_string"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( internal_name_to_id_map_entry->type != LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported name to id map entry type.", function ); return( -1 ); } if( internal_name_to_id_map_entry->is_ascii_string == 0 ) { if( libuna_utf8_string_copy_from_utf16_stream( utf8_string, utf8_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 name to id map entry string.", function ); return( -1 ); } } else { if( libuna_utf8_string_copy_from_byte_stream( utf8_string, utf8_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 name to id map entry string.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the UTF-16 string size * The returned size includes the end of string character * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_utf16_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf16_string_size, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_utf16_string_size"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( internal_name_to_id_map_entry->type != LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported name to id map entry type.", function ); return( -1 ); } if( internal_name_to_id_map_entry->is_ascii_string == 0 ) { if( libuna_utf16_string_size_from_utf16_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine name to id map entry UTF-16 string size.", function ); return( -1 ); } } else { if( libuna_utf16_string_size_from_byte_stream( internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine name to id map entry UTF-16 string size.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the UTF-16 string * The size should include the end of string character * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_utf16_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_utf16_string"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( internal_name_to_id_map_entry->type != LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported name to id map entry type.", function ); return( -1 ); } if( internal_name_to_id_map_entry->is_ascii_string == 0 ) { if( libuna_utf16_string_copy_from_utf16_stream( utf16_string, utf16_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 name to id map entry string.", function ); return( -1 ); } } else { if( libuna_utf16_string_copy_from_byte_stream( utf16_string, utf16_string_size, internal_name_to_id_map_entry->string_value, internal_name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 name to id map entry string.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the GUID * Returns 1 if successful or -1 on error */ int libpff_name_to_id_map_entry_get_guid( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *guid, size_t size, libcerror_error_t **error ) { libpff_internal_name_to_id_map_entry_t *internal_name_to_id_map_entry = NULL; static char *function = "libpff_name_to_id_map_entry_get_guid"; if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } internal_name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) name_to_id_map_entry; if( guid == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid GUID.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( size < 16 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: size is too small.", function ); return( -1 ); } if( memory_copy( guid, internal_name_to_id_map_entry->guid, 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set GUID.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_column_definition.h0000644000175000017500000000360312005155304016574 00000000000000/* * Column defintion functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_COLUMN_DEFINITION_H ) #define _LIBPFF_COLUMN_DEFINITION_H #include #include #include "libpff_libcerror.h" #include "libpff_name_to_id_map.h" #include "libpff_table.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_column_definition libpff_column_definition_t; struct libpff_column_definition { /* The entry type */ uint16_t entry_type; /* The value type */ uint16_t value_type; /* The values array entry offset */ uint16_t values_array_offset; /* The value array entry size */ uint16_t values_array_size; /* The record entry values table */ libpff_table_t *record_entry_values_table; /* The name to id map entry */ libpff_internal_name_to_id_map_entry_t *name_to_id_map_entry; }; int libpff_column_definition_initialize( libpff_column_definition_t **column_definition, libcerror_error_t **error ); int libpff_column_definition_free( libpff_column_definition_t **column_definition, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_encryption.h0000644000175000017500000000231112005155304015254 00000000000000/* * De/Encryption functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ENCRYPTION_H ) #define _LIBPFF_ENCRYPTION_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif ssize_t libpff_encryption_decrypt( uint8_t encryption_type, uint32_t key, uint8_t *data, size_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/pff_free_map.h0000644000175000017500000000430512005155304014156 00000000000000/* * The free map definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_FREE_MAP_H ) #define _PFF_FREE_MAP_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_free_map_32bit pff_free_map_32bit_t; struct pff_free_map_32bit { /* Padding * Consists of 4 bytes * Contains 0x0 values */ uint8_t padding1[ 4 ]; /* The free map data * Consists of 496 bytes */ uint8_t data[ 496 ]; /* The type * Consists of 1 byte */ uint8_t type; /* The type copy * Consists of 1 byte */ uint8_t type_copy; /* The signature * Consists of 2 bytes * Contains 0x0 values */ uint8_t signature[ 2 ]; /* The back pointer * Consists of 4 bytes */ uint8_t back_pointer[ 4 ]; /* A weak CRC32 of the 496 bytes of table data * Consists of 4 bytes */ uint8_t crc[ 4 ]; }; typedef struct pff_free_map_64bit pff_free_map_64bit_t; struct pff_free_map_64bit { /* The free map data * Consists of 496 bytes */ uint8_t data[ 496 ]; /* The type * Consists of 1 byte */ uint8_t type; /* The type copy * Consists of 1 byte */ uint8_t type_copy; /* The signature * Consists of 2 bytes * Contains 0x0 values */ uint8_t signature[ 2 ]; /* A weak CRC32 of the 496 bytes of table data * Consists of 4 bytes */ uint8_t crc[ 4 ]; /* The back pointer * Consists of 8 bytes */ uint8_t back_pointer[ 8 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_offset_list.c0000644000175000017500000012257512005155304015415 00000000000000/* * Offset list * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_libcerror.h" #include "libpff_list_type.h" #include "libpff_offset_list.h" /* Creates an offset list value * Returns 1 if successful or -1 on error */ int libpff_offset_list_value_initialize( libpff_offset_list_value_t **offset_list_value, libcerror_error_t **error ) { static char *function = "libpff_offset_list_value_initialize"; if( offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list value.", function ); return( -1 ); } if( *offset_list_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid offset list value value already set.", function ); return( -1 ); } *offset_list_value = memory_allocate_structure( libpff_offset_list_value_t ); if( *offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create offset list value.", function ); goto on_error; } if( memory_set( *offset_list_value, 0, sizeof( libpff_offset_list_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear offset list value.", function ); goto on_error; } return( 1 ); on_error: if( *offset_list_value != NULL ) { memory_free( *offset_list_value ); *offset_list_value = NULL; } return( -1 ); } /* Frees an offset list value */ int libpff_offset_list_value_free( libpff_offset_list_value_t **offset_list_value, libcerror_error_t **error ) { static char *function = "libpff_offset_list_value_free"; if( offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list value.", function ); return( -1 ); } if( *offset_list_value != NULL ) { memory_free( *offset_list_value ); *offset_list_value = NULL; } return( 1 ); } /* Clones the offset list value * Returns 1 if successful or -1 on error */ int libpff_offset_list_value_clone( libpff_offset_list_value_t **destination_offset_list_value, libpff_offset_list_value_t *source_offset_list_value, libcerror_error_t **error ) { static char *function = "libpff_offset_list_value_clone"; if( destination_offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination offset list value.", function ); return( -1 ); } if( *destination_offset_list_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination offset list value value already set.", function ); return( -1 ); } if( source_offset_list_value == NULL ) { *destination_offset_list_value = NULL; return( 1 ); } *destination_offset_list_value = memory_allocate_structure( libpff_offset_list_value_t ); if( *destination_offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination offset list value.", function ); goto on_error; } if( memory_copy( *destination_offset_list_value, source_offset_list_value, sizeof( libpff_offset_list_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy source to destination offset list value.", function ); goto on_error; } return( 1 ); on_error: if( *destination_offset_list_value != NULL ) { memory_free( *destination_offset_list_value ); *destination_offset_list_value = NULL; } return( -1 ); } /* Creates an offset list * Returns 1 if successful or -1 on error */ int libpff_offset_list_initialize( libpff_offset_list_t **offset_list, libcerror_error_t **error ) { static char *function = "libpff_offset_list_initialize"; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( *offset_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid offset list value already set.", function ); return( -1 ); } *offset_list = memory_allocate_structure( libpff_offset_list_t ); if( *offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create offset list.", function ); goto on_error; } if( memory_set( *offset_list, 0, sizeof( libpff_offset_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear offset list.", function ); goto on_error; } return( 1 ); on_error: if( *offset_list != NULL ) { memory_free( *offset_list ); *offset_list = NULL; } return( -1 ); } /* Frees an offset list including the elements * Returns 1 if successful or -1 on error */ int libpff_offset_list_free( libpff_offset_list_t **offset_list, libcerror_error_t **error ) { static char *function = "libpff_offset_list_free"; int result = 1; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( *offset_list != NULL ) { result = libpff_offset_list_empty( *offset_list, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty offset list.", function ); } memory_free( *offset_list ); *offset_list = NULL; } return( result ); } /* Empties an offset list and frees the elements * Returns 1 if successful or -1 on error */ int libpff_offset_list_empty( libpff_offset_list_t *offset_list, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; static char *function = "libpff_offset_list_empty"; int element_index = 0; int number_of_elements = 0; int result = 1; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset_list->number_of_elements > 0 ) { number_of_elements = offset_list->number_of_elements; for( element_index = 0; element_index < number_of_elements; element_index++ ) { list_element = offset_list->first_element; if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, element_index ); return( -1 ); } offset_list->first_element = list_element->next_element; if( offset_list->last_element == list_element ) { offset_list->last_element = list_element->next_element; } offset_list->number_of_elements -= 1; if( list_element->next_element != NULL ) { list_element->next_element->previous_element = NULL; } list_element->next_element = NULL; if( libpff_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); result = -1; } } offset_list->current_element = NULL; offset_list->current_element_index = 0; } return( result ); } /* Clones the offset list * Returns 1 if successful or -1 on error */ int libpff_offset_list_clone( libpff_offset_list_t **destination_offset_list, libpff_offset_list_t *source_offset_list, libcerror_error_t **error ) { libpff_list_element_t *destination_list_element = NULL; libpff_list_element_t *source_list_element = NULL; libpff_offset_list_value_t *destination_value = NULL; static char *function = "libpff_offset_list_clone"; int element_index = 0; if( destination_offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination offset list.", function ); return( -1 ); } if( *destination_offset_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination offset list value already set.", function ); return( -1 ); } if( source_offset_list == NULL ) { *destination_offset_list = NULL; return( 1 ); } if( libpff_offset_list_initialize( destination_offset_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination offset list.", function ); goto on_error; } if( *destination_offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination offset list.", function ); goto on_error; } source_list_element = source_offset_list->first_element; for( element_index = 0; element_index < source_offset_list->number_of_elements; element_index++ ) { if( source_list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in source offset list element: %d.", function, element_index ); goto on_error; } if( libpff_list_element_initialize( &destination_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list element: %d.", function, element_index ); goto on_error; } if( libpff_offset_list_value_clone( &destination_value, (libpff_offset_list_value_t *) source_list_element->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone value of offset list element: %d.", function, element_index ); goto on_error; } if( libpff_list_element_set_value( destination_list_element, (intptr_t *) destination_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to set value of destination list element: %d.", function, element_index ); goto on_error; } destination_value = NULL; if( ( *destination_offset_list )->first_element == NULL ) { ( *destination_offset_list )->first_element = destination_list_element; } if( ( *destination_offset_list )->last_element != NULL ) { ( *destination_offset_list )->last_element->next_element = destination_list_element; destination_list_element->previous_element = ( *destination_offset_list )->last_element; } ( *destination_offset_list )->last_element = destination_list_element; ( *destination_offset_list )->number_of_elements += 1; destination_list_element = NULL; source_list_element = source_list_element->next_element; } return( 1 ); on_error: if( destination_value != NULL ) { libpff_offset_list_value_free( &destination_value, NULL ); } if( destination_list_element != NULL ) { libpff_list_element_free( &destination_list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, NULL ); } if( *destination_offset_list != NULL ) { libpff_offset_list_free( destination_offset_list, NULL ); } return( -1 ); } /* Retrieves the number of elements in the offset list * Returns 1 if successful or -1 on error */ int libpff_offset_list_get_number_of_elements( libpff_offset_list_t *offset_list, int *number_of_elements, libcerror_error_t **error ) { static char *function = "libpff_offset_list_get_number_of_elements"; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( number_of_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of elements.", function ); return( -1 ); } *number_of_elements = offset_list->number_of_elements; return( 1 ); } /* Appends an offset * Returns 1 if successful, or -1 on error */ int libpff_offset_list_append_offset( libpff_offset_list_t *offset_list, off64_t offset, size64_t size, uint8_t merge_ranges, libcerror_error_t **error ) { libpff_list_element_t *last_list_element = NULL; libpff_list_element_t *list_element = NULL; libpff_list_element_t *remove_element = NULL; libpff_offset_list_value_t *offset_list_value = NULL; static char *function = "libpff_offset_list_append_offset"; off64_t last_offset = 0; off64_t last_range_offset = 0; int create_list_element = 0; int element_index = 0; int merge_next_list_element_check = 0; int merge_previous_list_element_check = 0; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid offset value less than zero.", function ); return( -1 ); } if( size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } create_list_element = 1; /* Check if new range should be merged with an existing range */ if( merge_ranges == 0 ) { last_list_element = offset_list->last_element; } else if( offset_list->number_of_elements > 0 ) { last_offset = offset + size; /* Check the last element first, most often the list will be filled linear */ list_element = offset_list->last_element; if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, offset_list->number_of_elements - 1 ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, offset_list->number_of_elements - 1 ); return( -1 ); } offset_list_value = (libpff_offset_list_value_t *) list_element->value; last_range_offset = offset_list_value->offset + offset_list_value->size; /* Check if the offset range overlaps at the end of the last offset range */ if( ( offset >= offset_list_value->offset ) && ( offset <= last_range_offset ) ) { if( last_offset > last_range_offset ) { offset_list_value->size += (size64_t) ( last_offset - last_range_offset ); } create_list_element = 0; merge_next_list_element_check = 1; } /* Check if the offset range overlaps at the beginning of the last offset range */ else if( ( last_offset >= offset_list_value->offset ) && ( last_offset <= last_range_offset ) ) { if( offset < offset_list_value->offset ) { offset_list_value->offset = offset; offset_list_value->size += (size64_t) ( offset_list_value->offset - offset ); } create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range overlaps the last offset range entirely */ else if( ( offset < offset_list_value->offset ) && ( last_offset > last_range_offset ) ) { offset_list_value->offset = offset; offset_list_value->size = size; create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range is beyond the last range */ else if( last_offset > last_range_offset ) { last_list_element = list_element; } else if( offset_list->number_of_elements > 1 ) { if( last_offset > ( last_range_offset / 2 ) ) { list_element = list_element->previous_element; for( element_index = ( offset_list->number_of_elements - 2 ); element_index >= 0; element_index-- ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libpff_offset_list_value_t *) list_element->value; last_range_offset = offset_list_value->offset + offset_list_value->size; /* Check if the offset range overlaps at the end of an existing offset range */ if( ( offset >= offset_list_value->offset ) && ( offset <= last_range_offset ) ) { if( last_offset > last_range_offset ) { offset_list_value->size += (size64_t) ( last_offset - last_range_offset ); } create_list_element = 0; merge_next_list_element_check = 1; } /* Check if the offset range overlaps at the beginning of an existing offset range */ else if( ( last_offset >= offset_list_value->offset ) && ( last_offset <= last_range_offset ) ) { if( offset < offset_list_value->offset ) { offset_list_value->offset = offset; offset_list_value->size += (size64_t) ( offset_list_value->offset - offset ); } create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range overlaps an existing offset range entirely */ else if( ( offset < offset_list_value->offset ) && ( last_offset > last_range_offset ) ) { offset_list_value->offset = offset; offset_list_value->size = size; create_list_element = 0; merge_next_list_element_check = 1; merge_previous_list_element_check = 1; } if( create_list_element == 0 ) { break; } /* Check if the offset range belongs after the exising offset range */ if( last_offset > last_range_offset ) { last_list_element = list_element; break; } last_list_element = list_element; list_element = list_element->previous_element; } } else { list_element = offset_list->first_element; for( element_index = 0; element_index < ( offset_list->number_of_elements - 1 ); element_index++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libpff_offset_list_value_t *) list_element->value; last_range_offset = offset_list_value->offset + offset_list_value->size; /* Check if the offset range overlaps at the end of an existing offset range */ if( ( offset >= offset_list_value->offset ) && ( offset <= last_range_offset ) ) { if( last_offset > last_range_offset ) { offset_list_value->size += (size64_t) ( last_offset - last_range_offset ); } create_list_element = 0; merge_next_list_element_check = 1; } /* Check if the offset range overlaps at the beginning of an existing offset range */ else if( ( last_offset >= offset_list_value->offset ) && ( last_offset <= last_range_offset ) ) { if( offset < offset_list_value->offset ) { offset_list_value->offset = offset; offset_list_value->size += (size64_t) ( offset_list_value->offset - offset ); } create_list_element = 0; merge_previous_list_element_check = 1; } /* Check if the offset range overlaps an existing offset range entirely */ else if( ( offset < offset_list_value->offset ) && ( last_offset > last_range_offset ) ) { offset_list_value->offset = offset; offset_list_value->size = size; create_list_element = 0; merge_next_list_element_check = 1; merge_previous_list_element_check = 1; } if( create_list_element == 0 ) { break; } /* Check if the offset range belongs before the current offset range */ if( last_offset < last_range_offset ) { last_list_element = list_element->previous_element; break; } last_list_element = list_element; list_element = list_element->next_element; } } } /* Check if the current range should be merged with the previous range */ if( merge_previous_list_element_check != 0 ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list element.", function ); return( -1 ); } if( list_element->previous_element != NULL ) { if( list_element->previous_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for previous list element.", function ); return( -1 ); } last_offset = ( (libpff_offset_list_value_t *) list_element->previous_element->value )->offset + ( (libpff_offset_list_value_t *) list_element->previous_element->value )->size; if( last_offset == offset_list_value->offset ) { /* Merge offset range with previous */ offset_list_value->offset = ( (libpff_offset_list_value_t *) list_element->previous_element->value )->offset; offset_list_value->size += ( (libpff_offset_list_value_t *) list_element->previous_element->value )->size; /* Remove previous list element */ remove_element = list_element->previous_element; if( remove_element == offset_list->first_element ) { offset_list->first_element = remove_element->next_element; } if( remove_element == offset_list->last_element ) { offset_list->last_element = remove_element->previous_element; } if( remove_element->next_element != NULL ) { remove_element->next_element->previous_element = remove_element->previous_element; } if( remove_element->previous_element != NULL ) { remove_element->previous_element->next_element = remove_element->next_element; } remove_element->next_element = NULL; remove_element->previous_element = NULL; offset_list->number_of_elements -= 1; if( libpff_list_element_free( &remove_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); return( -1 ); } } } } /* Check if the current range should be merged with the next range */ if( merge_next_list_element_check != 0 ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid list element.", function ); return( -1 ); } if( list_element->next_element != NULL ) { if( list_element->next_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for next list element.", function ); return( -1 ); } last_offset = offset_list_value->offset + offset_list_value->size; if( last_offset == ( (libpff_offset_list_value_t *) list_element->next_element->value )->offset ) { /* Merge offset range with next */ offset_list_value->size += ( (libpff_offset_list_value_t *) list_element->next_element->value )->size; /* Remove next list element */ remove_element = list_element->next_element; if( remove_element == offset_list->first_element ) { offset_list->first_element = remove_element->next_element; } if( remove_element == offset_list->last_element ) { offset_list->last_element = remove_element->previous_element; } if( remove_element->next_element != NULL ) { remove_element->next_element->previous_element = remove_element->previous_element; } if( remove_element->previous_element != NULL ) { remove_element->previous_element->next_element = remove_element->next_element; } remove_element->next_element = NULL; remove_element->previous_element = NULL; offset_list->number_of_elements -= 1; if( libpff_list_element_free( &remove_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free element: %d.", function, element_index ); return( -1 ); } } } } } if( create_list_element != 0 ) { offset_list_value = NULL; if( libpff_offset_list_value_initialize( &offset_list_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create offset list value.", function ); return( -1 ); } if( offset_list_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value.", function ); return( -1 ); } offset_list_value->offset = offset; offset_list_value->size = size; list_element = NULL; if( libpff_list_element_initialize( &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); libpff_offset_list_value_free( &offset_list_value, NULL ); return( -1 ); } if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing list element.", function ); libpff_offset_list_value_free( &offset_list_value, NULL ); return( -1 ); } list_element->value = (intptr_t *) offset_list_value; if( offset_list->number_of_elements == 0 ) { if( offset_list->first_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - first element already set.", function ); libpff_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, NULL ); return( -1 ); } if( offset_list->last_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - last element already set.", function ); libpff_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, NULL ); return( -1 ); } offset_list->first_element = list_element; offset_list->last_element = list_element; } else { if( offset_list->first_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first.", function ); libpff_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, NULL ); return( -1 ); } if( offset_list->last_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last.", function ); libpff_list_element_free( &list_element, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_offset_list_value_free, NULL ); return( -1 ); } if( last_list_element == NULL ) { offset_list->first_element->previous_element = list_element; list_element->next_element = offset_list->first_element; offset_list->first_element = list_element; } else { list_element->previous_element = last_list_element; list_element->next_element = last_list_element->next_element; if( last_list_element == offset_list->last_element ) { offset_list->last_element = list_element; } else if( last_list_element->next_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing next in last list element.", function ); return( -1 ); } else { last_list_element->next_element->previous_element = list_element; } last_list_element->next_element = list_element; } } offset_list->number_of_elements++; } return( 1 ); } /* Retrieves a specific offset * Returns 1 if successful or -1 on error */ int libpff_offset_list_get_offset( libpff_offset_list_t *offset_list, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libpff_offset_list_value_t *offset_list_value = NULL; static char *function = "libpff_offset_list_get_offset"; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( ( index < 0 ) || ( index >= offset_list->number_of_elements ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid index value out of bounds.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( ( offset_list->current_element != NULL ) && ( offset_list->current_element_index != index ) ) { if( index < offset_list->current_element_index ) { if( ( offset_list->current_element_index - index ) < ( offset_list->number_of_elements / 2 ) ) { while( offset_list->current_element_index > index ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->next_element; offset_list->current_element_index--; } } } else { if( ( index - offset_list->current_element_index ) < ( offset_list->number_of_elements / 2 ) ) { while( offset_list->current_element_index < index ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->next_element; offset_list->current_element_index++; } } } } if( ( offset_list->current_element == NULL ) || ( offset_list->current_element_index != index ) ) { if( index < ( offset_list->number_of_elements / 2 ) ) { offset_list->current_element = offset_list->first_element; for( offset_list->current_element_index = 0; offset_list->current_element_index < index; offset_list->current_element_index++ ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->next_element; } } else { offset_list->current_element = offset_list->last_element; for( offset_list->current_element_index = ( offset_list->number_of_elements - 1 ); offset_list->current_element_index > index; offset_list->current_element_index-- ) { if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list->current_element = offset_list->current_element->previous_element; } } } if( offset_list->current_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list element: %d.", function, offset_list->current_element_index ); return( -1 ); } if( offset_list->current_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, offset_list->current_element_index ); return( -1 ); } offset_list_value = (libpff_offset_list_value_t *) offset_list->current_element->value; *offset = offset_list_value->offset; *size = offset_list_value->size; return( 1 ); } /* Retrieves a specific offset by its value * Returns 1 if successful, 0 if not available or -1 on error */ int libpff_offset_list_get_offset_by_value( libpff_offset_list_t *offset_list, off64_t offset_value, off64_t *offset, size64_t *size, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; libpff_offset_list_value_t *offset_list_value = NULL; static char *function = "libpff_offset_list_get_offset_by_value"; int element_index = 0; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } list_element = offset_list->first_element; for( element_index = 0; element_index < offset_list->number_of_elements; element_index++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libpff_offset_list_value_t *) list_element->value; if( ( offset_value >= offset_list_value->offset ) && ( offset_value < (off64_t) ( offset_list_value->offset + offset_list_value->size ) ) ) { *offset = offset_list_value->offset; *size = offset_list_value->size; return( 1 ); } list_element = list_element->next_element; } return( 0 ); } /* Determines if a certain offset range is present in the list * Returns 1 if present, 0 if not present or -1 on error */ int libpff_offset_list_range_is_present( libpff_offset_list_t *offset_list, off64_t offset, size64_t size, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; libpff_offset_list_value_t *offset_list_value = NULL; static char *function = "libpff_offset_list_range_is_present"; off64_t last_offset = 0; int element_index = 0; if( offset_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset list.", function ); return( -1 ); } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid offset value less than zero.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } last_offset = offset + size; list_element = offset_list->first_element; for( element_index = 0; element_index < offset_list->number_of_elements; element_index++ ) { if( list_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for list element: %d.", function, element_index ); return( -1 ); } if( list_element->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset list value for list element: %d.", function, element_index ); return( -1 ); } offset_list_value = (libpff_offset_list_value_t *) list_element->value; if( ( offset >= offset_list_value->offset ) && ( offset < (off64_t) ( offset_list_value->offset + offset_list_value->size ) ) ) { return( 1 ); } if( ( offset_list_value->offset >= offset ) && ( offset_list_value->offset < last_offset ) ) { return( 1 ); } list_element = list_element->next_element; } return( 0 ); } libpff-20120802/libpff/libpff_local_descriptors.h0000644000175000017500000000701512005155304016603 00000000000000/* * Local descriptors functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LOCAL_DESCRIPTORS_H ) #define _LIBPFF_LOCAL_DESCRIPTORS_H #include #include #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_local_descriptor_value.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_local_descriptors libpff_local_descriptors_t; struct libpff_local_descriptors { /* A reference to the IO handle */ libpff_io_handle_t *io_handle; /* The local descriptor nodes list */ libfdata_list_t *local_descriptor_nodes_list; /* The local descriptor nodes cache */ libfcache_cache_t *local_descriptor_nodes_cache; /* The root node offset */ off64_t root_node_offset; /* The root node size */ size32_t root_node_size; /* Value to indicate if the local descriptors were recovered */ uint8_t recovered; }; int libpff_local_descriptors_initialize( libpff_local_descriptors_t **local_descriptors, libpff_io_handle_t *io_handle, off64_t root_node_offset, size32_t root_node_size, uint8_t recovered, libcerror_error_t **error ); int libpff_local_descriptors_free( libpff_local_descriptors_t **local_descriptors, libcerror_error_t **error ); int libpff_local_descriptors_clone( libpff_local_descriptors_t **destination_local_descriptors, libpff_local_descriptors_t *source_local_descriptors, libcerror_error_t **error ); int libpff_local_descriptors_read_node( libpff_local_descriptors_t *local_descriptors, libbfio_handle_t *file_io_handle, off64_t node_offset, libfdata_tree_node_t *local_descriptors_tree_node, libpff_local_descriptor_value_t *local_descriptor_value, libcerror_error_t **error ); int libpff_local_descriptors_read_node_entry( libpff_local_descriptors_t *local_descriptors, libbfio_handle_t *file_io_handle, off64_t node_offset, uint16_t entry_index, libfdata_tree_node_t *local_descriptors_tree_node, libpff_local_descriptor_value_t *local_descriptor_value, libcerror_error_t **error ); int libpff_local_descriptors_read_node_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags, libcerror_error_t **error ); int libpff_local_descriptors_read_sub_nodes( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_data_array.c0000644000175000017500000007647412005155304015211 00000000000000/* * Data array functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_data_array.h" #include "libpff_data_array_entry.h" #include "libpff_data_block.h" #include "libpff_definitions.h" #include "libpff_encryption.h" #include "libpff_index_value.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfdata.h" #include "pff_array.h" /* Initializes the data array and its values * Returns 1 if successful or -1 on error */ int libpff_data_array_initialize( libpff_data_array_t **data_array, uint32_t descriptor_identifier, uint64_t data_identifier, libpff_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libpff_data_array_initialize"; if( data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array.", function ); return( -1 ); } if( *data_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data array value already set.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } *data_array = memory_allocate_structure( libpff_data_array_t ); if( *data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data array.", function ); goto on_error; } if( memory_set( *data_array, 0, sizeof( libpff_data_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data array.", function ); goto on_error; } if( libpff_array_initialize( &( ( *data_array )->entries ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data array entries array.", function ); goto on_error; } ( *data_array )->descriptor_identifier = descriptor_identifier; ( *data_array )->data_identifier = data_identifier; ( *data_array )->io_handle = io_handle; return( 1 ); on_error: if( *data_array != NULL ) { memory_free( *data_array ); *data_array = NULL; } return( -1 ); } /* Frees the data array and its values * Returns 1 if successful or -1 on error */ int libpff_data_array_free( libpff_data_array_t **data_array, libcerror_error_t **error ) { static char *function = "libpff_data_array_free"; int result = 1; if( data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array.", function ); return( -1 ); } if( *data_array != NULL ) { if( libpff_array_free( &( ( *data_array )->entries ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_data_array_entry_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the data array entries array.", function ); result = -1; } memory_free( *data_array ); *data_array = NULL; } return( result ); } /* Clones the data array * Returns 1 if successful or -1 on error */ int libpff_data_array_clone( libpff_data_array_t **destination_data_array, libpff_data_array_t *source_data_array, libcerror_error_t **error ) { static char *function = "libpff_data_array_clone"; if( destination_data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination data array.", function ); return( -1 ); } if( *destination_data_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination data array already set.", function ); return( -1 ); } if( source_data_array == NULL ) { *destination_data_array = NULL; return( 1 ); } *destination_data_array = memory_allocate_structure( libpff_data_array_t ); if( *destination_data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination data array.", function ); goto on_error; } if( memory_set( *destination_data_array, 0, sizeof( libpff_data_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination data array.", function ); goto on_error; } ( *destination_data_array )->descriptor_identifier = source_data_array->descriptor_identifier; ( *destination_data_array )->data_identifier = source_data_array->data_identifier; ( *destination_data_array )->io_handle = source_data_array->io_handle; ( *destination_data_array )->data_size = source_data_array->data_size; ( *destination_data_array )->flags = source_data_array->flags; if( libpff_array_clone( &( ( *destination_data_array )->entries ), source_data_array->entries, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_data_array_entry_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libpff_data_array_entry_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone local descriptors.", function ); goto on_error; } return( 1 ); on_error: if( *destination_data_array != NULL ) { memory_free( *destination_data_array ); *destination_data_array = NULL; } return( -1 ); } /* Reads the data array * Returns 1 if successful or -1 on error */ int libpff_data_array_read( libpff_data_array_t *data_array, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_block_t *descriptor_data_block, uint8_t recovered, uint8_t *array_data, size_t array_data_size, libcerror_error_t **error ) { static char *function = "libpff_data_array_read"; uint32_t total_data_size = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( libpff_data_array_read_entries( data_array, io_handle, file_io_handle, descriptor_data_block, recovered, array_data, array_data_size, &total_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data array entries.", function ); return( -1 ); } return( 1 ); } /* Reads the data array entries * Returns 1 if successful or -1 on error */ int libpff_data_array_read_entries( libpff_data_array_t *data_array, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_block_t *descriptor_data_block, uint8_t recovered, uint8_t *array_data, size_t array_data_size, uint32_t *total_data_size, libcerror_error_t **error ) { libpff_data_array_entry_t *data_array_entry = NULL; libpff_index_value_t *offset_index_value = NULL; uint8_t *sub_array_data = NULL; static char *function = "libpff_data_array_read_entries"; size_t sub_array_data_size = 0; ssize_t read_count = 0; uint64_t array_entry_identifier = 0; uint32_t calculated_total_data_size = 0; uint32_t sub_total_data_size = 0; uint16_t array_entry_iterator = 0; uint16_t number_of_array_entries = 0; uint8_t array_entries_level = 0; uint8_t sub_flags = 0; int previous_number_of_data_array_entries = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array.", function ); return( -1 ); } if( ( io_handle->file_type != LIBPFF_FILE_TYPE_32BIT ) && ( io_handle->file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( array_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array data.", function ); return( -1 ); } if( array_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid array data size value exceeds maximum.", function ); return( -1 ); } if( total_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid total data size.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: array:\n", function ); libcnotify_print_data( array_data, array_data_size, 0 ); } #endif if( ( (pff_array_t *) array_data )->signature != 0x01 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported array signature.", function ); return( -1 ); } array_entries_level = ( (pff_array_t *) array_data )->array_entries_level; byte_stream_copy_to_uint16_little_endian( ( (pff_array_t *) array_data )->number_of_entries, number_of_array_entries ); byte_stream_copy_to_uint32_little_endian( ( (pff_array_t *) array_data )->total_data_size, *total_data_size ); array_data += sizeof( pff_array_t ); array_data_size -= sizeof( pff_array_t ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: array entries level\t: %" PRIu8 "\n", function, array_entries_level ); libcnotify_printf( "%s: array number of entries\t: %" PRIu16 "\n", function, number_of_array_entries ); libcnotify_printf( "%s: array total data size\t: %" PRIu32 "\n", function, *total_data_size ); libcnotify_printf( "\n" ); } #endif if( array_entries_level == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported array entries level: 0.", function ); return( -1 ); } if( data_array->data_size == 0 ) { data_array->data_size = *total_data_size; } if( libpff_array_get_number_of_entries( data_array->entries, &previous_number_of_data_array_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the number of data array entries.", function ); return( -1 ); } if( array_entries_level == 1 ) { if( libfdata_block_resize_segments( descriptor_data_block, previous_number_of_data_array_entries + (int) number_of_array_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize descriptor data block segments.", function ); return( -1 ); } if( libpff_array_resize( data_array->entries, previous_number_of_data_array_entries + (int) number_of_array_entries, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_data_array_entry_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize data array entries array.", function ); return( -1 ); } } for( array_entry_iterator = 0; array_entry_iterator < number_of_array_entries; array_entry_iterator++ ) { if( io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( array_data, array_entry_identifier ); array_data += 4; } else if( io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( array_data, array_entry_identifier ); array_data += 8; } /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_get_offset_index_value_by_identifier( io_handle, file_io_handle, array_entry_identifier, recovered, 0, &offset_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find data identifier: %" PRIu64 ".", function, array_entry_identifier ); return( -1 ); } if( offset_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: array entry: %03" PRIu16 " at level: %" PRIu8 " identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, array_entry_iterator, array_entries_level, offset_index_value->identifier, ( ( offset_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), offset_index_value->file_offset, offset_index_value->data_size ); } #endif if( offset_index_value->file_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid file offset value out of bounds.", function ); return( -1 ); } #if UINT32_MAX > SSIZE_MAX if( offset_index_value->data_size > (size32_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: data size value exceeds maximum.", function ); return( -1 ); } #endif if( array_entries_level == 1 ) { if( ( calculated_total_data_size + offset_index_value->data_size ) > data_array->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: data size: %" PRIu32 " exceeds total data size: %" PRIu32 ".", function, calculated_total_data_size + offset_index_value->data_size, data_array->data_size ); return( -1 ); } if( libfdata_block_set_segment_by_index( descriptor_data_block, previous_number_of_data_array_entries + (int) array_entry_iterator, offset_index_value->file_offset, (size64_t) offset_index_value->data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set descriptor data block segment: %d.", function, previous_number_of_data_array_entries + (int) array_entry_iterator ); return( -1 ); } if( libpff_data_array_entry_initialize( &data_array_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data array entry.", function ); return( -1 ); } data_array_entry->data_identifier = offset_index_value->identifier; if( libpff_array_set_entry_by_index( data_array->entries, previous_number_of_data_array_entries + (int) array_entry_iterator, (intptr_t *) data_array_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data array entry: %d.", function, previous_number_of_data_array_entries + (int) array_entry_iterator ); libpff_data_array_entry_free( &data_array_entry, NULL ); return( -1 ); } data_array_entry = NULL; calculated_total_data_size += offset_index_value->data_size; } else { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading array descriptor data at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, offset_index_value->file_offset, offset_index_value->file_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, offset_index_value->file_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek value offset: %" PRIi64 ".", function, offset_index_value->file_offset ); return( -1 ); } sub_array_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * offset_index_value->data_size ); if( sub_array_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create sub array data.", function ); return( -1 ); } read_count = libpff_data_block_read( file_io_handle, io_handle->file_type, offset_index_value->identifier, sub_array_data, offset_index_value->data_size, &sub_flags, error ); if( read_count != (ssize_t) offset_index_value->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to data.", function ); memory_free( sub_array_data ); return( -1 ); } sub_array_data_size = (size_t) offset_index_value->data_size; if( libpff_data_array_read_entries( data_array, io_handle, file_io_handle, descriptor_data_block, recovered, sub_array_data, sub_array_data_size, &sub_total_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub data array entries.", function ); memory_free( sub_array_data ); return( -1 ); } memory_free( sub_array_data ); calculated_total_data_size += sub_total_data_size; } } if( *total_data_size != calculated_total_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in total data size (%" PRIu32 " != %" PRIu32 ").", function, *total_data_size, calculated_total_data_size ); return( -1 ); } return( 1 ); } /* Reads the data array entry data * Returns the number of bytes read if successful or -1 on error */ ssize_t libpff_data_array_read_entry_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int array_entry_index, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ) { libpff_data_array_t *data_array = NULL; libpff_data_array_entry_t *data_array_entry = NULL; static char *function = "libpff_data_array_read_entry_data"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array IO handle.", function ); return( -1 ); } data_array = (libpff_data_array_t *) io_handle; if( data_array->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid data array - missing IO handle.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } if( libpff_array_get_entry_by_index( data_array->entries, array_entry_index, (intptr_t **) &data_array_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data array entry: %d.", function, array_entry_index ); return( -1 ); } if( data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data array entry.", function ); return( -1 ); } read_count = libpff_data_block_read( file_io_handle, data_array->io_handle->file_type, data_array_entry->data_identifier, data, data_size, &( data_array_entry->flags ), error ); if( read_count != (ssize_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data array entry: %d data.", function, array_entry_index ); return( -1 ); } if( libpff_data_array_decrypt_entry_data( data_array, array_entry_index, data_array->io_handle->encryption_type, data, data_size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ENCRYPTION, LIBCERROR_ENCRYPTION_ERROR_DECRYPT_FAILED, "%s: unable to decrypt data array entry: %d data.", function, array_entry_index ); return( -1 ); } return( (ssize_t) data_size ); } /* Decrypts the data array entry data * Returns 1 if successful or -1 on error */ int libpff_data_array_decrypt_entry_data( libpff_data_array_t *data_array, int array_entry_index, uint8_t encryption_type, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ) { libpff_data_array_entry_t *data_array_entry = NULL; static char *function = "libpff_data_array_decrypt_entry_data"; ssize_t process_count = 0; uint16_t table_index_offset = 0; uint8_t decrypt_data = 0; uint8_t force_decryption = 0; uint8_t node_identifier_type = 0; uint8_t node_contains_table = 0; int number_of_data_array_entries = 0; if( data_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data array.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } if( libpff_array_get_number_of_entries( data_array->entries, &number_of_data_array_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the number of data array entries.", function ); return( -1 ); } if( libpff_array_get_entry_by_index( data_array->entries, array_entry_index, (intptr_t **) &data_array_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data array entry: %d.", function, array_entry_index ); return( -1 ); } if( data_array_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data array entry.", function ); return( -1 ); } /* Check if the internal (unencrypted) flag in (data) offset index identifier is not set */ if( ( data_array_entry->data_identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) == 0 ) { decrypt_data = 1; } /* Check if data is encrypted * Some 'invalid' files have an encryption type of none but contain encrypted data * Although they are considered invalid by Outlook it is still possilble to read them */ if( ( encryption_type == LIBPFF_ENCRYPTION_TYPE_NONE ) && ( ( flags & LIBPFF_READ_FLAG_IGNORE_FORCE_DECRYPTION ) == 0 ) && ( data_size > 4 ) ) { node_identifier_type = (uint8_t) ( data_array->descriptor_identifier & 0x0000001fUL ); if( ( ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_INTERNAL ) && ( ( data_array->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_MESSAGE_STORE ) || ( data_array->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP ) || ( data_array->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2049 ) || ( data_array->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2081 ) || ( data_array->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2113 ) || ( data_array->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_3073 ) ) ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_FOLDER ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_FOLDER ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_MESSAGE ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_ASSOCIATED_CONTENT ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SUB_FOLDERS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SUB_MESSAGES ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SUB_ASSOCIATED_CONTENTS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CONTENTS_TABLE ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENTS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_RECIPIENTS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1718 ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1751 ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1784 ) ) { node_contains_table = 1; } /* Only check the first entry * some table array contain the table type in every array entry but not all */ if( ( array_entry_index == 0 ) && ( node_contains_table != 0 ) ) { /* Test if the data contains an unencrypted table * a table consists of 0xec in the third byte * and 0x6c, 0x7c, 0x8c, 0x9c, 0xa5, 0xac, 0xbc, 0xcc in the fourth */ if( ( data[ 2 ] != 0xec ) || ( ( data[ 3 ] != 0x6c ) && ( data[ 3 ] != 0x7c ) && ( data[ 3 ] != 0x8c ) && ( data[ 3 ] != 0x9c ) && ( data[ 3 ] != 0xa5 ) && ( data[ 3 ] != 0xac ) && ( data[ 3 ] != 0xbc ) && ( data[ 3 ] != 0xcc ) ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table signature missing trying to force decryption.\n", function ); } #endif force_decryption = 1; encryption_type = LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE; decrypt_data = 1; data_array_entry->flags |= LIBPFF_DATA_BLOCK_FLAG_DECRYPTION_FORCED; data_array->flags |= LIBPFF_DATA_ARRAY_FLAG_DECRYPTION_FORCED; } } else if( data_array->io_handle->force_decryption == 1 ) { /* Some of the last table array entries do not seem to be encrypted */ if( ( node_contains_table != 0 ) && ( array_entry_index == ( number_of_data_array_entries - 1 ) ) ) { byte_stream_copy_to_uint16_little_endian( data, table_index_offset ); if( (size_t) table_index_offset > data_size ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: detected encrypted last table array entry - decryption forced.\n", function ); } #endif encryption_type = LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE; decrypt_data = 1; data_array_entry->flags |= LIBPFF_DATA_BLOCK_FLAG_DECRYPTION_FORCED; data_array->flags |= LIBPFF_DATA_ARRAY_FLAG_DECRYPTION_FORCED; } } else { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: decryption forced.\n", function ); } #endif encryption_type = LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE; decrypt_data = 1; data_array_entry->flags |= LIBPFF_DATA_BLOCK_FLAG_DECRYPTION_FORCED; data_array->flags |= LIBPFF_DATA_ARRAY_FLAG_DECRYPTION_FORCED; } } } /* Check if unencrypted flag in offset index identifier is not set */ if( decrypt_data != 0 ) { process_count = libpff_encryption_decrypt( encryption_type, (uint32_t) data_array_entry->data_identifier, data, data_size, error ); if( process_count != (ssize_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ENCRYPTION, LIBCERROR_ENCRYPTION_ERROR_DECRYPT_FAILED, "%s: unable to decrypt array entry data.", function ); return( -1 ); } if( force_decryption != 0 ) { /* Test if the data contains an unencrypted table * a table consists of 0xec in the third byte * and 0x6c, 0x7c, 0x8c, 0x9c, 0xa5, 0xac, 0xbc, 0xcc in the fourth */ if( ( data[ 2 ] == 0xec ) && ( ( data[ 3 ] == 0x6c ) || ( data[ 3 ] == 0x7c ) || ( data[ 3 ] == 0x8c ) || ( data[ 3 ] == 0x9c ) || ( data[ 3 ] == 0xa5 ) || ( data[ 3 ] == 0xac ) || ( data[ 3 ] == 0xbc ) || ( data[ 3 ] == 0xcc ) ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressible encrypted data detected while encryption type is none - decryption forced.\n", function ); } #endif data_array->io_handle->force_decryption = 1; } } } return( 1 ); } libpff-20120802/libpff/libpff_notify.c0000644000175000017500000000521012005155304014366 00000000000000/* * Notification functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_notify.h" #if !defined( HAVE_LOCAL_LIBPFF ) /* Sets the verbose notification */ void libpff_notify_set_verbose( int verbose ) { libcnotify_verbose_set( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libpff_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libpff_notify_set_stream"; if( libcnotify_stream_set( stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set stream.", function ); return( -1 ); } return( 1 ); } /* Opens the notification stream using a filename * The stream is opened in append mode * Returns 1 if successful or -1 on error */ int libpff_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libpff_notify_stream_open"; if( libcnotify_stream_open( filename, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open stream.", function ); return( -1 ); } return( 1 ); } /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ int libpff_notify_stream_close( libcerror_error_t **error ) { static char *function = "libpff_notify_stream_close"; if( libcnotify_stream_close( error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open stream.", function ); return( -1 ); } return( 0 ); } #endif libpff-20120802/libpff/libpff_name_to_id_map.h0000644000175000017500000001044112005155304016020 00000000000000/* * Name to ID map functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_NAME_TO_ID_MAP_H ) #define _LIBPFF_NAME_TO_ID_MAP_H #include #include #include "libpff_extern.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_list_type.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif #define LIBPFF_ENTRY_TYPE_NAME_TO_ID_MAP_CLASS_IDENTIFIERS 0x0002 #define LIBPFF_ENTRY_TYPE_NAME_TO_ID_MAP_ENTRIES 0x0003 #define LIBPFF_ENTRY_TYPE_NAME_TO_ID_MAP_STRINGS 0x0004 typedef struct libpff_internal_name_to_id_map_entry libpff_internal_name_to_id_map_entry_t; struct libpff_internal_name_to_id_map_entry { /* The identifier */ uint32_t identifier; /* The entry type */ uint8_t type; union { /* The numeric value */ uint32_t numeric_value; /* The string value */ uint8_t *string_value; }; /* The value size */ size_t value_size; /* Value to indicate if the string value is an ASCII string */ uint8_t is_ascii_string; /* The GUID containing the class identifier */ uint8_t guid[ 16 ]; #if defined( HAVE_DEBUG_OUTPUT ) /* The debug string value */ libcstring_system_character_t *debug_string; /* The debug string size */ size_t debug_string_size; #endif }; int libpff_name_to_id_map_entry_initialize( libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ); int libpff_name_to_id_map_entry_free( libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ); int libpff_name_to_id_map_read( libpff_list_t *name_to_id_map_list, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_name_to_id_map_entry_read( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *name_to_id_map_entry_data, size_t name_to_id_map_entry_data_size, uint8_t *name_to_id_map_class_identifiers_data, size_t name_to_id_map_class_identifiers_data_size, uint8_t *name_to_id_map_strings_data, size_t name_to_id_map_strings_data_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_type( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *entry_type, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_number( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint32_t *number, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf8_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf8_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf8_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf16_string_size( libpff_name_to_id_map_entry_t *name_to_id_map_entry, size_t *utf16_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_utf16_string( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_name_to_id_map_entry_get_guid( libpff_name_to_id_map_entry_t *name_to_id_map_entry, uint8_t *guid, size_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_libuna.h0000644000175000017500000000276312005155304014347 00000000000000/* * The libuna header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBUNA_H ) #define _LIBPFF_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_item_descriptor.h0000644000175000017500000000450212005155304016262 00000000000000/* * Item descriptor functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ITEM_DESCRIPTOR_H ) #define _LIBPFF_ITEM_DESCRIPTOR_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_item_descriptor libpff_item_descriptor_t; struct libpff_item_descriptor { /* The descriptor identifier value */ uint32_t descriptor_identifier; /* The data identifier value */ uint64_t data_identifier; /* The local descriptors identifier value */ uint64_t local_descriptors_identifier; /* Value to indicate if the item was recovered */ uint8_t recovered; /* The value index of the recovered data identifier */ int recovered_data_identifier_value_index; /* The value index of the recovered local descriptors identifier */ int recovered_local_descriptors_identifier_value_index; }; int libpff_item_descriptor_initialize( libpff_item_descriptor_t **item_descriptor, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ); int libpff_item_descriptor_free( libpff_item_descriptor_t **item_descriptor, libcerror_error_t **error ); int libpff_item_descriptor_clone( intptr_t **destination_item_descriptor, intptr_t *source_item_descriptor, libcerror_error_t **error ); int libpff_item_descriptor_compare( intptr_t *first_item_descriptor, intptr_t *second_item_descriptor, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_offset_list.h0000644000175000017500000000657312005155304015421 00000000000000/* * Offset list * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_OFFSET_LIST_H ) #define _LIBPFF_OFFSET_LIST_H #include #include #include "libpff_libcerror.h" #include "libpff_list_type.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_offset_list_value libpff_offset_list_value_t; struct libpff_offset_list_value { /* The offset */ off64_t offset; /* The size */ size64_t size; }; typedef struct libpff_offset_list libpff_offset_list_t; struct libpff_offset_list { /* The number of elements */ int number_of_elements; /* The first element */ libpff_list_element_t *first_element; /* The last element */ libpff_list_element_t *last_element; /* The current list element */ libpff_list_element_t *current_element; /* The current list element index */ int current_element_index; }; int libpff_offset_list_value_initialize( libpff_offset_list_value_t **offset_list_value, libcerror_error_t **error ); int libpff_offset_list_value_free( libpff_offset_list_value_t **offset_list_value, libcerror_error_t **error ); int libpff_offset_list_value_clone( libpff_offset_list_value_t **destination_offset_list_value, libpff_offset_list_value_t *source_offset_list_value, libcerror_error_t **error ); int libpff_offset_list_initialize( libpff_offset_list_t **offset_list, libcerror_error_t **error ); int libpff_offset_list_free( libpff_offset_list_t **offset_list, libcerror_error_t **error ); int libpff_offset_list_empty( libpff_offset_list_t *offset_list, libcerror_error_t **error ); int libpff_offset_list_clone( libpff_offset_list_t **destination_offset_list, libpff_offset_list_t *source_offset_list, libcerror_error_t **error ); int libpff_offset_list_get_number_of_elements( libpff_offset_list_t *offset_list, int *number_of_elements, libcerror_error_t **error ); int libpff_offset_list_append_offset( libpff_offset_list_t *offset_list, off64_t offset, size64_t size, uint8_t merge_ranges, libcerror_error_t **error ); int libpff_offset_list_get_offset( libpff_offset_list_t *offset_list, int index, off64_t *offset, size64_t *size, libcerror_error_t **error ); int libpff_offset_list_get_offset_by_value( libpff_offset_list_t *offset_list, off64_t offset_value, off64_t *offset, size64_t *size, libcerror_error_t **error ); int libpff_offset_list_range_is_present( libpff_offset_list_t *offset_list, off64_t offset, size64_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_index_node.c0000644000175000017500000005701612005155304015205 00000000000000/* * Index node functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_definitions.h" #include "libpff_index_node.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfmapi.h" #include "pff_index_node.h" /* Initializes the index node * Returns 1 if successful or -1 on error */ int libpff_index_node_initialize( libpff_index_node_t **index_node, libcerror_error_t **error ) { static char *function = "libpff_index_node_initialize"; if( index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index node.", function ); return( -1 ); } if( *index_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid index node value already set.", function ); return( -1 ); } *index_node = memory_allocate_structure( libpff_index_node_t ); if( *index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create index node.", function ); goto on_error; } if( memory_set( *index_node, 0, sizeof( libpff_index_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear index node.", function ); goto on_error; } return( 1 ); on_error: if( *index_node != NULL ) { memory_free( *index_node ); *index_node = NULL; } return( -1 ); } /* Frees the index node * Returns 1 if successful or -1 on error */ int libpff_index_node_free( libpff_index_node_t **index_node, libcerror_error_t **error ) { static char *function = "libpff_index_node_free"; if( index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index node.", function ); return( -1 ); } if( *index_node != NULL ) { if( ( *index_node )->data != NULL ) { memory_free( ( *index_node )->data ); } memory_free( *index_node ); *index_node = NULL; } return( 1 ); } /* Retrieves the data of a specific entry * Returns 1 if successful or -1 on error */ int libpff_index_node_get_entry_data( libpff_index_node_t *index_node, uint8_t entry_index, uint8_t **entry_data, libcerror_error_t **error ) { static char *function = "libpff_index_node_get_entry_data"; size_t entry_offset = 0; if( index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index node.", function ); return( -1 ); } if( index_node->entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid index node - missing entries data.", function ); return( -1 ); } if( entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry data.", function ); return( -1 ); } if( entry_index > index_node->maximum_number_of_entries ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } entry_offset = (size_t) ( index_node->entry_size * entry_index ); if( entry_offset > (size_t) index_node->maximum_entries_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: entry index value exceeds maximum.", function ); return( -1 ); } *entry_data = &( index_node->entries_data[ entry_offset ] ); return( 1 ); } /* Reads an index node * Returns 1 if successful or -1 on error */ int libpff_index_node_read( libpff_index_node_t *index_node, libbfio_handle_t *file_io_handle, off64_t node_offset, uint8_t file_type, libcerror_error_t **error ) { uint8_t *index_node_data = NULL; static char *function = "libpff_index_node_read"; ssize_t read_count = 0; uint32_t calculated_crc = 0; uint32_t stored_crc = 0; uint8_t calculated_entry_size = 0; uint8_t calculated_maximum_number_of_entries = 0; uint8_t index_node_type_copy = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t *index_node_entry_data = NULL; uint64_t value_64bit = 0; uint32_t value_32bit = 0; uint16_t value_16bit = 0; uint8_t entry_index = 0; #endif if( index_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid index node.", function ); return( -1 ); } if( index_node->data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid index node - data already set.", function ); return( -1 ); } if( ( file_type != LIBPFF_FILE_TYPE_32BIT ) && ( file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { index_node->data_size = sizeof( pff_index_node_32bit_t ); index_node->maximum_entries_data_size = 496; } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { index_node->data_size = sizeof( pff_index_node_64bit_t ); index_node->maximum_entries_data_size = 488; } index_node->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * index_node->data_size ); if( index_node->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create index node data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading index node data at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, node_offset, node_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, node_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek node offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, index_node->data, index_node->data_size, error ); if( read_count != (ssize_t) index_node->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read index node data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: index node data:\n", function ); libcnotify_print_data( index_node->data, index_node->data_size, 0 ); } #endif index_node_data = index_node->data; if( file_type == LIBPFF_FILE_TYPE_32BIT ) { index_node->type = ( (pff_index_node_32bit_t *) index_node_data )->type; index_node_type_copy = ( (pff_index_node_32bit_t *) index_node_data )->type_copy; byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_32bit_t *) index_node_data )->back_pointer, index_node->back_pointer ); byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_32bit_t *) index_node_data )->crc, stored_crc ); index_node->number_of_entries = ( (pff_index_node_32bit_t *) index_node_data )->number_of_entries; index_node->maximum_number_of_entries = ( (pff_index_node_32bit_t *) index_node_data )->maximum_number_of_entries; index_node->entry_size = ( (pff_index_node_32bit_t *) index_node_data )->entry_size; index_node->level = ( (pff_index_node_32bit_t *) index_node_data )->level; if( ( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) && ( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) ) { calculated_entry_size = 16; calculated_maximum_number_of_entries = 496 / 16; } else { calculated_entry_size = 12; calculated_maximum_number_of_entries = 496 / 12; } } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { index_node->type = ( (pff_index_node_64bit_t *) index_node_data )->type; index_node_type_copy = ( (pff_index_node_64bit_t *) index_node_data )->type_copy; byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_64bit_t *) index_node_data )->crc, stored_crc ); byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_64bit_t *) index_node_data )->back_pointer, index_node->back_pointer ); index_node->number_of_entries = ( (pff_index_node_64bit_t *) index_node_data )->number_of_entries; index_node->maximum_number_of_entries = ( (pff_index_node_64bit_t *) index_node_data )->maximum_number_of_entries; index_node->entry_size = ( (pff_index_node_64bit_t *) index_node_data )->entry_size; index_node->level = ( (pff_index_node_64bit_t *) index_node_data )->level; if( ( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) && ( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) ) { calculated_entry_size = 32; calculated_maximum_number_of_entries = 488 / 32; } else { calculated_entry_size = 24; calculated_maximum_number_of_entries = 488 / 24; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of entries\t\t\t: %" PRIu8 "\n", function, index_node->number_of_entries ); libcnotify_printf( "%s: maximum number of entries\t\t: %" PRIu8 "\n", function, index_node->maximum_number_of_entries ); libcnotify_printf( "%s: entry size\t\t\t\t: %" PRIu8 "\n", function, index_node->entry_size ); libcnotify_printf( "%s: node level\t\t\t\t: %" PRIu8 "\n", function, index_node->level ); if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_64bit_t *) index_node_data )->padding1, value_32bit ); libcnotify_printf( "%s: padding1\t\t\t\t: 0x%08" PRIx32 "\n", function, value_32bit ); } libcnotify_printf( "%s: index node type\t\t\t\t: 0x%02" PRIx8 "\n", function, index_node->type ); libcnotify_printf( "%s: index node type copy\t\t\t: 0x%02" PRIx8 "\n", function, index_node_type_copy ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_32bit_t *) index_node_data )->signature, value_16bit ); libcnotify_printf( "%s: signature\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: back pointer\t\t\t\t: 0x%08" PRIx64 "\n", function, index_node->back_pointer ); libcnotify_printf( "%s: crc\t\t\t\t\t: 0x%08" PRIx32 "\n", function, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_64bit_t *) index_node_data )->signature, value_16bit ); libcnotify_printf( "%s: signature\t\t\t\t: 0x%04" PRIx16 "\n", function, value_16bit ); libcnotify_printf( "%s: crc\t\t\t\t\t: 0x%08" PRIx32 "\n", function, stored_crc ); libcnotify_printf( "%s: back pointer\t\t\t\t: 0x%08" PRIx64 "\n", function, index_node->back_pointer ); } } #endif if( index_node->type != index_node_type_copy ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in index node type (0x%02" PRIx8 " != 0x%02" PRIx8 ").\n", function, index_node->type, index_node_type_copy ); } #endif if( ( index_node->type != LIBPFF_INDEX_TYPE_DESCRIPTOR ) && ( index_node->type != LIBPFF_INDEX_TYPE_OFFSET ) && ( ( index_node_type_copy == LIBPFF_INDEX_TYPE_DESCRIPTOR ) || ( index_node_type_copy == LIBPFF_INDEX_TYPE_OFFSET ) ) ) { index_node->type = index_node_type_copy; } } if( ( index_node->type != LIBPFF_INDEX_TYPE_DESCRIPTOR ) && ( index_node->type != LIBPFF_INDEX_TYPE_OFFSET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported index node type: 0x%02" PRIx8 ".", function, index_node->type ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { result = libfmapi_crc32_weak_calculate( &calculated_crc, index_node_data, 500, 0, error ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { result = libfmapi_crc32_weak_calculate( &calculated_crc, index_node_data, 496, 0, error ); } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to calculate weak CRC-32.", function ); return( -1 ); } if( stored_crc != calculated_crc ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in CRC-32 ( 0x%08" PRIx32 " != 0x%08" PRIx32 " ).\n", function, stored_crc, calculated_crc ); } #endif /* TODO smart error handling */ } if( ( index_node->entry_size != 0 ) && ( index_node->entry_size != calculated_entry_size ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: entry size mismatch (calculated: %" PRIu8 ", stored: %" PRIu8 ").\n", function, calculated_entry_size, index_node->entry_size ); } #endif index_node->entry_size = calculated_entry_size; } if( ( index_node->maximum_number_of_entries != 0 ) && ( index_node->maximum_number_of_entries != calculated_maximum_number_of_entries ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: maximum number of entries mismatch (calculated: %" PRIu8 ", stored: %" PRIu8 ").\n", function, calculated_maximum_number_of_entries, index_node->maximum_number_of_entries ); } #endif index_node->maximum_number_of_entries = calculated_maximum_number_of_entries; } if( index_node->number_of_entries > index_node->maximum_number_of_entries ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of entries: %" PRIu8 ", exceeds maximum: %" PRIu8 ".", function, index_node->number_of_entries, index_node->maximum_number_of_entries ); } #endif index_node->number_of_entries = index_node->maximum_number_of_entries; } if( ( (uint16_t) index_node->number_of_entries * (uint16_t) index_node->entry_size ) > index_node->maximum_entries_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: size of entries: %" PRIu16 ", exceeds maximum: %" PRIu16 ".", function, index_node->number_of_entries * index_node->entry_size, index_node->maximum_entries_data_size ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { index_node->entries_data = ( (pff_index_node_32bit_t *) index_node_data )->entries_data; } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { index_node->entries_data = ( (pff_index_node_64bit_t *) index_node_data )->entries_data; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { index_node_entry_data = index_node->entries_data; /* Print all the entries */ for( entry_index = 0; entry_index < index_node->maximum_number_of_entries; entry_index++ ) { if( entry_index == index_node->number_of_entries ) { libcnotify_printf( "\n" ); libcnotify_printf( "%s: remaining node entries\n", function ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( index_node_entry_data, value_64bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( index_node_entry_data, value_64bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " index node identifier\t\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); /* Process descriptor index node leaf nodes */ if( ( index_node->type == LIBPFF_INDEX_TYPE_DESCRIPTOR ) && ( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) ) { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) index_node_entry_data )->data_identifier, value_64bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) index_node_entry_data )->data_identifier, value_64bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " data identifier\t\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) index_node_entry_data )->local_descriptors_identifier, value_64bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) index_node_entry_data )->local_descriptors_identifier, value_64bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " local descriptors identifier\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_32bit_t *) index_node_entry_data )->parent_identifier, value_32bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) index_node_entry_data )->parent_identifier, value_32bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " parent identifier\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, entry_index, value_32bit, value_32bit ); if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_descriptor_entry_64bit_t *) index_node_entry_data )->unknown1, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu8 " unknown1\t\t\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, entry_index, value_32bit, value_32bit ); } } /* Process offset and descriptor index node branch nodes and offset index node leaf nodes */ else { if( index_node->level != PFF_INDEX_NODE_LEVEL_LEAF ) { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_branch_entry_32bit_t *) index_node_entry_data )->back_pointer, value_64bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_branch_entry_64bit_t *) index_node_entry_data )->back_pointer, value_64bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " back pointer\t\t\t: 0x%08" PRIx64 "\n", function, entry_index, value_64bit ); } if( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_offset_entry_32bit_t *) index_node_entry_data )->file_offset, value_64bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_offset_entry_64bit_t *) index_node_entry_data )->file_offset, value_64bit ); } } else { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_branch_entry_32bit_t *) index_node_entry_data )->file_offset, value_64bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_index_node_branch_entry_64bit_t *) index_node_entry_data )->file_offset, value_64bit ); } } libcnotify_printf( "%s: entry: %02" PRIu8 " file offset\t\t\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); if( index_node->level == PFF_INDEX_NODE_LEVEL_LEAF ) { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_32bit_t *) index_node_entry_data )->data_size, value_16bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_64bit_t *) index_node_entry_data )->data_size, value_16bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " data size\t\t\t: %" PRIu16 "\n", function, entry_index, value_16bit ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_32bit_t *) index_node_entry_data )->reference_count, value_16bit ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_index_node_offset_entry_64bit_t *) index_node_entry_data )->reference_count, value_16bit ); } libcnotify_printf( "%s: entry: %02" PRIu8 " reference count\t\t: %" PRIu16 "\n", function, entry_index, value_16bit ); if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_index_node_offset_entry_64bit_t *) index_node_entry_data )->data_allocation_table_file_offset, value_32bit ); libcnotify_printf( "%s: entry: %02" PRIu8 " data allocation table offset\t: 0x%08" PRIx32 " (%" PRIu32 ")\n", function, entry_index, value_32bit, value_32bit ); } } } index_node_entry_data += index_node->entry_size; } libcnotify_printf( "\n" ); } #endif return( 1 ); } libpff-20120802/libpff/libpff_local_descriptors_tree.c0000644000175000017500000003003612005155304017614 00000000000000/* * Local descriptors tree functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libpff_index_value.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors_tree.h" /* Retrieves the leaf node for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_local_descriptors_tree_get_leaf_node_by_identifier( libfdata_tree_t *local_descriptors_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libfdata_tree_node_t **leaf_local_descriptors_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *local_descriptors_tree_root_node = NULL; static char *function = "libpff_local_descriptors_tree_get_leaf_node_by_identifier"; int result = 0; if( local_descriptors_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptors tree.", function ); return( -1 ); } if( leaf_local_descriptors_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf local descriptors tree node.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: requested identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, identifier, identifier ); } #endif if( libfdata_tree_get_root_node( local_descriptors_tree, &local_descriptors_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root node from local descriptors tree.", function ); return( -1 ); } result = libpff_local_descriptors_tree_node_get_leaf_node_by_identifier( local_descriptors_tree_root_node, file_io_handle, cache, identifier, leaf_local_descriptors_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node by identifier in root node.", function ); return( -1 ); } return( result ); } /* Retrieves the leaf node for the specific identifier * Returns 1 if successful, 0 if no leaf node was found or -1 on error */ int libpff_local_descriptors_tree_node_get_leaf_node_by_identifier( libfdata_tree_node_t *local_descriptors_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libfdata_tree_node_t **leaf_local_descriptors_tree_node, libcerror_error_t **error ) { libfdata_tree_node_t *local_descriptors_tree_sub_node = NULL; libpff_local_descriptor_value_t *local_descriptors_tree_sub_node_value = NULL; static char *function = "libpff_local_descriptors_tree_node_get_leaf_node_by_identifier"; int16_t compare = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( local_descriptors_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptors tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_number_of_sub_nodes( local_descriptors_tree_node, file_io_handle, cache, &number_of_sub_nodes, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub nodes from local descriptors tree node.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_tree_node_get_sub_node_by_index( local_descriptors_tree_node, file_io_handle, cache, sub_node_index, &local_descriptors_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from local descriptors tree node.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_node_value( local_descriptors_tree_sub_node, file_io_handle, cache, (intptr_t **) &local_descriptors_tree_sub_node_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptors tree sub node value: %d.", function, sub_node_index ); return( -1 ); } if( local_descriptors_tree_sub_node_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptors tree sub node value: %d.", function, sub_node_index ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptors tree sub node value: %d identifier\t: 0x%08" PRIx64 " (%" PRIu64 ").\n", function, sub_node_index, local_descriptors_tree_sub_node_value->identifier, local_descriptors_tree_sub_node_value->identifier ); } #endif if( identifier > local_descriptors_tree_sub_node_value->identifier ) { compare = 1; } else if( identifier < local_descriptors_tree_sub_node_value->identifier ) { compare = -1; } else { compare = 0; } result = libfdata_tree_node_is_leaf( local_descriptors_tree_sub_node, file_io_handle, cache, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if local descriptors tree sub node: %d is a leaf node.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( local_descriptors_tree_sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if local descriptors tree sub node: %d is a deleted node.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( compare == 0 ) { if( leaf_local_descriptors_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf local descriptors tree node.", function ); return( -1 ); } if( *leaf_local_descriptors_tree_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: leaf local descriptors tree node value already set.", function ); return( -1 ); } *leaf_local_descriptors_tree_node = local_descriptors_tree_sub_node; result = 1; break; } } result = 0; } else { /* A branch node contains the identifier of its first sub node */ if( ( compare == 0 ) || ( ( compare > 0 ) && ( sub_node_index == ( number_of_sub_nodes - 1 ) ) ) ) { result = libpff_local_descriptors_tree_node_get_leaf_node_by_identifier( local_descriptors_tree_sub_node, file_io_handle, cache, identifier, leaf_local_descriptors_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf local descriptors tree node by identifier in sub node: %d.", function, sub_node_index ); return( -1 ); } break; } else if( ( compare < 0 ) && ( sub_node_index >= 1 ) ) { if( libfdata_tree_node_get_sub_node_by_index( local_descriptors_tree_node, file_io_handle, cache, sub_node_index - 1, &local_descriptors_tree_sub_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from local descriptors tree node.", function, sub_node_index - 1 ); return( -1 ); } result = libpff_local_descriptors_tree_node_get_leaf_node_by_identifier( local_descriptors_tree_sub_node, file_io_handle, cache, identifier, leaf_local_descriptors_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf local descriptors tree node by identifier in sub node: %d.", function, sub_node_index - 1 ); return( -1 ); } break; } } } return( result ); } /* Retrieves the local descriptor value for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_local_descriptors_tree_get_value_by_identifier( libfdata_tree_t *local_descriptors_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ) { libfdata_tree_node_t *leaf_local_descriptors_tree_node = NULL; static char *function = "libpff_local_descriptors_tree_get_value_by_identifier"; int result = 0; result = libpff_local_descriptors_tree_get_leaf_node_by_identifier( local_descriptors_tree, file_io_handle, cache, identifier, &leaf_local_descriptors_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node by identifier in root node.", function ); return( -1 ); } else if( result != 0 ) { if( leaf_local_descriptors_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing leaf local descriptors tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( leaf_local_descriptors_tree_node, file_io_handle, cache, (intptr_t **) local_descriptor_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf local descriptors tree node value.", function ); return( -1 ); } } return( result ); } libpff-20120802/libpff/libpff_local_descriptor_value.h0000644000175000017500000000430212005155304017610 00000000000000/* * Local descriptor value functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LOCAL_DESCRIPTOR_VALUE_H ) #define _LIBPFF_LOCAL_DESCRIPTOR_VALUE_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_local_descriptor_value libpff_local_descriptor_value_t; struct libpff_local_descriptor_value { /* The identifier value */ uint64_t identifier; union { /* The branch node sub node identifier value * Refers to a value in the file offset index */ uint64_t sub_node_identifier; struct { /* The data identifier value * Refers to a value in the file offset index */ uint64_t data_identifier; /* The leaf node sub node identifier value * Refers to a value in the file offset index */ uint64_t local_descriptors_identifier; }; }; /* TODO remove after refactoring */ uint8_t level; }; int libpff_local_descriptor_value_initialize( libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ); int libpff_local_descriptor_value_free( libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ); int libpff_local_descriptor_value_clone( libpff_local_descriptor_value_t **destination_local_descriptor_value, libpff_local_descriptor_value_t *source_local_descriptor_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_item_tree.h0000644000175000017500000000520412005155304015043 00000000000000/* * Item tree functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ITEM_TREE_H ) #define _LIBPFF_ITEM_TREE_H #include #include #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_list_type.h" #include "libpff_tree_type.h" #if defined( __cplusplus ) extern "C" { #endif int libpff_item_tree_node_free_recovered( libpff_tree_node_t **item_tree_node, libcerror_error_t **error ); int libpff_item_tree_get_tree_node_by_identifier( libpff_tree_node_t *item_tree_node, uint32_t item_identifier, libpff_tree_node_t **result_item_tree_node, libcerror_error_t **error ); int libpff_item_tree_get_sub_node( libpff_tree_node_t *item_tree_node, int sub_node_index, libpff_tree_node_t **sub_node, libcerror_error_t **error ); int libpff_item_tree_get_sub_node_by_identifier( libpff_tree_node_t *item_tree_node, uint32_t sub_node_identifier, libpff_tree_node_t **sub_node, libcerror_error_t **error ); int libpff_item_tree_create_node( libpff_tree_node_t *item_tree_root_node, libbfio_handle_t *file_io_handle, libfdata_tree_t *descriptor_index_tree, libfdata_tree_node_t *descriptor_index_tree_node, libfcache_cache_t *index_tree_cache, libpff_list_t *orphan_node_list, libpff_tree_node_t **root_folder_item_tree_node, libcerror_error_t **error ); int libpff_item_tree_get_identifier( libpff_tree_node_t *item_tree_node, uint32_t *identifier, libcerror_error_t **error ); int libpff_item_tree_append_identifier( libpff_tree_node_t *item_tree_node, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/pff_block.h0000644000175000017500000000345212005155304013474 00000000000000/* * The block definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_BLOCK_H ) #define _PFF_BLOCK_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_block_footer_32bit pff_block_footer_32bit_t; struct pff_block_footer_32bit { /* The block size * Consists of 2 bytes */ uint8_t size[ 2 ]; /* The block signature * Consists of 2 bytes */ uint8_t signature[ 2 ]; /* The block back pointer * Consists of 4 bytes */ uint8_t back_pointer[ 4 ]; /* The block data crc * Consists of 4 bytes */ uint8_t crc[ 4 ]; }; typedef struct pff_block_footer_64bit pff_block_footer_64bit_t; struct pff_block_footer_64bit { /* The block size * Consists of 2 bytes */ uint8_t size[ 2 ]; /* The block signature * Consists of 2 bytes */ uint8_t signature[ 2 ]; /* The block data crc * Consists of 4 bytes */ uint8_t crc[ 4 ]; /* The block back pointer * Consists of 8 bytes */ uint8_t back_pointer[ 8 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_attached_file_io_handle.h0000644000175000017500000000611412005155304017645 00000000000000/* * Attached file IO handle functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ATTACHED_FILE_IO_HANDLE_H ) #define _LIBPFF_ATTACHED_FILE_IO_HANDLE_H #include #include #include "libpff_libcerror.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_attached_file_io_handle libpff_attached_file_io_handle_t; struct libpff_attached_file_io_handle { /* The attachment item */ libpff_item_t *attachment; /* Value to indicate the IO handle is open */ uint8_t is_open; /* The current access flags */ int access_flags; }; int libpff_attached_file_io_handle_initialize( libpff_attached_file_io_handle_t **io_handle, libpff_item_t *attachment, libcerror_error_t **error ); int libpff_attached_file_io_handle_free( libpff_attached_file_io_handle_t **io_handle, libcerror_error_t **error ); int libpff_attached_file_io_handle_clone( libpff_attached_file_io_handle_t **destination_io_handle, libpff_attached_file_io_handle_t *source_io_handle, libcerror_error_t **error ); int libpff_attached_file_io_handle_open( libpff_attached_file_io_handle_t *io_handle, int flags, libcerror_error_t **error ); int libpff_attached_file_io_handle_close( libpff_attached_file_io_handle_t *io_handle, libcerror_error_t **error ); ssize_t libpff_attached_file_io_handle_read( libpff_attached_file_io_handle_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ); ssize_t libpff_attached_file_io_handle_write( libpff_attached_file_io_handle_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ); off64_t libpff_attached_file_io_handle_seek_offset( libpff_attached_file_io_handle_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ); int libpff_attached_file_io_handle_exists( libpff_attached_file_io_handle_t *io_handle, libcerror_error_t **error ); int libpff_attached_file_io_handle_is_open( libpff_attached_file_io_handle_t *io_handle, libcerror_error_t **error ); int libpff_attached_file_io_handle_get_size( libpff_attached_file_io_handle_t *io_handle, size64_t *size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_table_block.h0000644000175000017500000000555412005155304015337 00000000000000/* * Table block functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_TABLE_BLOCK_H ) #define _LIBPFF_TABLE_BLOCK_H #include #include #include "libpff_array_type.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_table_block_value libpff_table_block_value_t; struct libpff_table_block_value { /* The table_block value size */ uint16_t size; /* The offset of the table block value */ uint16_t offset; }; typedef struct libpff_table_block libpff_table_block_t; struct libpff_table_block { /* The table array entry */ int table_array_entry; /* The table block values array */ libpff_array_t *values_array; }; int libpff_table_block_value_initialize( libpff_table_block_value_t **table_block_value, libcerror_error_t **error ); int libpff_table_block_value_free( libpff_table_block_value_t **table_block_value, libcerror_error_t **error ); int libpff_table_block_initialize( libpff_table_block_t **table_block, libcerror_error_t **error ); int libpff_table_block_free( libpff_table_block_t **table_block, libcerror_error_t **error ); int libpff_table_block_read( libpff_table_block_t *table_block, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_block_t *table_array_data_block, libfcache_cache_t *table_array_data_cache, libcerror_error_t **error ); int libpff_table_block_read_index( libpff_table_block_t *table_block, uint8_t *table_block_data, size_t table_block_data_size, uint16_t table_block_index_offset, libcerror_error_t **error ); int libpff_table_block_get_number_of_values( libpff_table_block_t *table_block, int *number_of_values, libcerror_error_t **error ); int libpff_table_block_get_value( libpff_table_block_t *table_block, int value_index, libpff_table_block_value_t **table_block_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_table.c0000644000175000017500000077474012005155304014172 00000000000000/* * Table functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_array_type.h" #include "libpff_column_definition.h" #include "libpff_data_array.h" #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_index.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfguid.h" #include "libpff_libfmapi.h" #include "libpff_libuna.h" #include "libpff_list_type.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors_tree.h" #include "libpff_mapi.h" #include "libpff_name_to_id_map.h" #include "libpff_record_entry.h" #include "libpff_table.h" #include "libpff_tree_type.h" #include "libpff_types.h" #include "pff_table.h" /* Initializes the table index values * Returns 1 if successful or -1 on error */ int libpff_table_index_values_initialize( libpff_table_index_values_t **table_index_values, uint16_t number_of_values, libcerror_error_t **error ) { static char *function = "libpff_table_index_values_initialize"; size_t table_index_values_size = 0; if( table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table index values.", function ); return( -1 ); } if( *table_index_values != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table index values value already set.", function ); return( -1 ); } *table_index_values = memory_allocate_structure( libpff_table_index_values_t ); if( *table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table index values.", function ); goto on_error; } if( memory_set( *table_index_values, 0, sizeof( libpff_table_index_values_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table index values.", function ); memory_free( *table_index_values ); *table_index_values = NULL; return( -1 ); } /* TODO replace by array type ? */ table_index_values_size = sizeof( libpff_table_index_value_t ) * number_of_values; ( *table_index_values )->value = (libpff_table_index_value_t *) memory_allocate( table_index_values_size ); if( ( *table_index_values )->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table index values.", function ); goto on_error; } if( memory_set( ( *table_index_values )->value, 0, table_index_values_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table index values.", function ); goto on_error; } ( *table_index_values )->number_of_values = number_of_values; return( 1 ); on_error: if( *table_index_values != NULL ) { if( ( *table_index_values )->value != NULL ) { memory_free( ( *table_index_values )->value ); } memory_free( *table_index_values ); *table_index_values = NULL; } return( -1 ); } /* Frees table index values * Returns 1 if successful or -1 on error */ int libpff_table_index_values_free( libpff_table_index_values_t **table_index_values, libcerror_error_t **error ) { static char *function = "libpff_table_index_values_free"; if( table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table index values.", function ); return( -1 ); } if( *table_index_values != NULL ) { if( ( *table_index_values )->value != NULL ) { memory_free( ( *table_index_values )->value ); } memory_free( *table_index_values ); *table_index_values = NULL; } return( 1 ); } /* Resizes the record entries * Returns 1 if successful or -1 on error */ int libpff_record_entries_resize( libpff_table_t *table, int number_of_sets, int number_of_entries, libcerror_error_t **error ) { static char *function = "libpff_record_entries_resize"; void *reallocation = NULL; int set_iterator = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( number_of_sets <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid number of sets value zero or less.", function ); return( -1 ); } if( number_of_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid number of entries value zero or less.", function ); return( -1 ); } if( number_of_sets > table->number_of_sets ) { reallocation = memory_reallocate( table->entry, sizeof( libpff_record_entry_t * ) * number_of_sets ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize record entries.", function ); return( -1 ); } table->entry = (libpff_record_entry_t **) reallocation; if( memory_set( &( table->entry[ table->number_of_sets ] ), 0, sizeof( libpff_record_entry_t * ) * ( number_of_sets - table->number_of_sets ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear record entries.", function ); return( -1 ); } for( set_iterator = table->number_of_sets; set_iterator < number_of_sets; set_iterator++ ) { table->entry[ set_iterator ] = (libpff_record_entry_t *) memory_allocate( sizeof( libpff_record_entry_t ) * table->number_of_entries ); if( table->entry[ set_iterator ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create record entries for set: %d.", function, set_iterator ); return( -1 ); } if( memory_set( table->entry[ set_iterator ], 0, sizeof( libpff_record_entry_t ) * table->number_of_entries ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear record entries for set: %d.", function, set_iterator ); return( -1 ); } } table->number_of_sets = number_of_sets; } if( ( table->number_of_sets > 0 ) && ( number_of_entries > table->number_of_entries ) ) { for( set_iterator = 0; set_iterator < table->number_of_sets; set_iterator++ ) { reallocation = memory_reallocate( table->entry[ set_iterator ], sizeof( libpff_record_entry_t ) * number_of_entries ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize record entries for set: %d.", function, set_iterator ); return( -1 ); } table->entry[ set_iterator ] = (libpff_record_entry_t *) reallocation; if( memory_set( &( ( table->entry[ set_iterator ] )[ table->number_of_entries ] ), 0, sizeof( libpff_record_entry_t ) * ( number_of_entries - table->number_of_entries ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear record entries for set: %d.", function, set_iterator ); return( -1 ); } } table->number_of_entries = number_of_entries; } return( 1 ); } /* Copies the values in the record entries * Returns 1 if successful or -1 on error */ int libpff_record_entries_clone( libpff_table_t *destination, libpff_table_t *source, libcerror_error_t **error ) { static char *function = "libpff_record_entries_copy"; int entry_iterator = 0; int set_iterator = 0; int result = 1; if( destination == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination table.", function ); return( -1 ); } if( destination->entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination table - entries already set.", function ); return( -1 ); } if( source == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source table.", function ); return( -1 ); } if( source->entry == NULL ) { destination->entry = NULL; destination->number_of_sets = 0; destination->number_of_entries = 0; return( 1 ); } destination->entry = (libpff_record_entry_t **) memory_allocate( sizeof( libpff_record_entry_t * ) * source->number_of_sets ); if( destination->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create record entries.", function ); return( -1 ); } if( memory_set( destination->entry, 0, sizeof( libpff_record_entry_t * ) * source->number_of_sets ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear record entries.", function ); return( -1 ); } for( set_iterator = 0; set_iterator < source->number_of_sets; set_iterator++ ) { if( source->entry[ set_iterator ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing source table set: %d entries.", function, set_iterator ); result = -1; break; } destination->entry[ set_iterator ] = (libpff_record_entry_t *) memory_allocate( sizeof( libpff_record_entry_t ) * source->number_of_entries ); if( destination->entry[ set_iterator ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination table set: %d entries.", function, set_iterator ); result = -1; break; } if( memory_set( destination->entry[ set_iterator ], 0, sizeof( libpff_record_entry_t ) * source->number_of_entries ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination table set: %d entries.", function, set_iterator ); result = -1; break; } for( entry_iterator = 0; entry_iterator < source->number_of_entries; entry_iterator++ ) { if( memory_copy( &( ( destination->entry[ set_iterator ] )[ entry_iterator ].identifier ), &( ( source->entry[ set_iterator ] )[ entry_iterator ].identifier ), sizeof( libpff_record_entry_identifier_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy record entry identifier of table set: %d entry: %d.", function, set_iterator, entry_iterator ); result = -1; break; } if( libfdata_reference_clone( &( ( destination->entry[ set_iterator ] )[ entry_iterator ].value_data_reference ), ( source->entry[ set_iterator ] )[ entry_iterator ].value_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value data reference of table set: %d entry: %d.", function, set_iterator, entry_iterator ); result = -1; break; } if( libfcache_cache_clone( &( ( destination->entry[ set_iterator ] )[ entry_iterator ].value_data_cache ), ( source->entry[ set_iterator ] )[ entry_iterator ].value_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value data cache of table set: %d entry: %d.", function, set_iterator, entry_iterator ); result = -1; break; } } if( result != 1 ) { break; } } if( result != 1 ) { while( set_iterator >= 0 ) { if( destination->entry[ set_iterator ] != NULL ) { while( entry_iterator >= 0 ) { if( ( destination->entry[ set_iterator ] )[ entry_iterator ].value_data_reference != NULL ) { if( libfdata_reference_free( &( ( destination->entry[ set_iterator ] )[ entry_iterator ].value_data_reference ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table set: %d entry: %d value data reference.", function, set_iterator, entry_iterator ); } if( libfcache_cache_free( &( ( destination->entry[ set_iterator ] )[ entry_iterator ].value_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table set: %d entry: %d value data cache.", function, set_iterator, entry_iterator ); } } entry_iterator--; } memory_free( destination->entry[ set_iterator ] ); } entry_iterator = source->number_of_entries - 1; set_iterator--; } memory_free( destination->entry ); destination->entry = NULL; return( -1 ); } destination->number_of_sets = source->number_of_sets; destination->number_of_entries = source->number_of_entries; return( 1 ); } /* Creates a table * Returns 1 if successful or -1 on error */ int libpff_table_initialize( libpff_table_t **table, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ) { static char *function = "libpff_table_initialize"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( *table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table value already set.", function ); return( -1 ); } *table = memory_allocate_structure( libpff_table_t ); if( *table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table.", function ); goto on_error; } if( memory_set( *table, 0, sizeof( libpff_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table.", function ); goto on_error; } if( libpff_array_initialize( &( ( *table )->index ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create index array.", function ); goto on_error; } ( *table )->descriptor_identifier = descriptor_identifier; ( *table )->data_identifier = data_identifier; ( *table )->local_descriptors_identifier = local_descriptors_identifier; ( *table )->recovered = recovered; return( 1 ); on_error: if( *table != NULL ) { memory_free( *table ); *table = NULL; } return( -1 ); } /* Frees a table * Returns 1 if successful or -1 on error */ int libpff_table_free( libpff_table_t **table, libcerror_error_t **error ) { static char *function = "libpff_table_free"; int entry_iterator = 0; int set_iterator = 0; int result = 1; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( *table != NULL ) { if( ( *table )->descriptor_data_block != NULL ) { if( libfdata_block_free( &( ( *table )->descriptor_data_block ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free descriptor data block.", function ); result = -1; } } if( ( *table )->descriptor_data_cache != NULL ) { if( libfcache_cache_free( &( ( *table )->descriptor_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free descriptor data cache.", function ); result = -1; } } if( ( *table )->local_descriptors_tree != NULL ) { if( libfdata_tree_free( &( ( *table )->local_descriptors_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free local descriptors tree.", function ); result = -1; } } if( ( *table )->local_descriptors_cache != NULL ) { if( libfcache_cache_free( &( ( *table )->local_descriptors_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free local descriptors cache.", function ); result = -1; } } if( ( *table )->index != NULL ) { if( libpff_array_free( &( ( *table )->index ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_table_index_values_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free index array.", function ); result = -1; } } if( ( *table )->record_entries_data_references != NULL ) { if( libpff_array_free( &( ( *table )->record_entries_data_references ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_reference_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record entries data references array.", function ); result = -1; } } if( ( *table )->entry != NULL ) { for( set_iterator = 0; set_iterator < ( *table )->number_of_sets; set_iterator++ ) { for( entry_iterator = 0; entry_iterator < ( *table )->number_of_entries; entry_iterator++ ) { if( ( ( *table )->entry[ set_iterator ] )[ entry_iterator ].value_data_reference != NULL ) { if( libfdata_reference_free( &( ( ( *table )->entry[ set_iterator ] )[ entry_iterator ].value_data_reference ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table set: %d entry: %d value data reference.", function, set_iterator, entry_iterator ); result = -1; } } if( ( ( *table )->entry[ set_iterator ] )[ entry_iterator ].value_data_cache != NULL ) { if( libfcache_cache_free( &( ( ( *table )->entry[ set_iterator ] )[ entry_iterator ].value_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table set: %d entry: %d value data cache.", function, set_iterator, entry_iterator ); result = -1; } } } memory_free( ( *table )->entry[ set_iterator ] ); } memory_free( ( *table )->entry ); ( *table )->entry = NULL; } memory_free( *table ); *table = NULL; } return( result ); } /* Clones the existing table * Returns 1 if successful or -1 on error */ int libpff_table_clone( libpff_table_t **destination_table, libpff_table_t *source_table, libcerror_error_t **error ) { static char *function = "libpff_table_clone"; if( destination_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination table.", function ); return( -1 ); } if( *destination_table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination table value already set.", function ); return( -1 ); } if( source_table == NULL ) { *destination_table = NULL; return( 1 ); } if( libpff_table_initialize( destination_table, source_table->descriptor_identifier, source_table->data_identifier, source_table->local_descriptors_identifier, source_table->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination table.", function ); goto on_error; } /* TODO is this necessary or should it be re-read on demand ? */ if( source_table->local_descriptors_tree != NULL ) { if( libfdata_tree_clone( &( ( *destination_table )->local_descriptors_tree ), source_table->local_descriptors_tree, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination local descriptors tree.", function ); goto on_error; } if( libfcache_cache_clone( &( ( *destination_table )->local_descriptors_cache ), source_table->local_descriptors_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination local descriptors cache.", function ); goto on_error; } } if( libpff_record_entries_clone( *destination_table, source_table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone record entries.", function ); goto on_error; } return( 1 ); on_error: if( *destination_table != NULL ) { libpff_table_free( destination_table, NULL ); } return( -1 ); } /* Retrieves the local descriptor value for the specific identifier * Returns 1 if successful, 0 if no value was found or -1 on error */ int libpff_table_get_local_descriptors_value_by_identifier( libpff_table_t *table, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ) { static char *function = "libpff_table_get_local_descriptors_value_by_identifier"; int result = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->local_descriptors_tree != NULL ) { result = libpff_local_descriptors_tree_get_value_by_identifier( table->local_descriptors_tree, file_io_handle, table->local_descriptors_cache, (uint64_t) descriptor_identifier, local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, descriptor_identifier ); return( -1 ); } } return( result ); } /* Retrieves the table index value for a specific reference * Returns 1 if successful or -1 on error */ int libpff_table_get_index_value_by_reference( libpff_table_t *table, uint32_t table_index_reference, libpff_table_index_value_t **table_index_value, libcerror_error_t **error ) { libpff_table_index_values_t *table_index_values = NULL; static char *function = "libpff_table_get_index_value_by_reference"; uint16_t table_index_array_reference = 0; uint16_t table_index_value_reference = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table index value.", function ); return( -1 ); } if( ( table_index_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table index reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, table_index_reference & 0x0000001fUL, table_index_reference ); return( -1 ); } /* Determine the index array reference */ table_index_array_reference = (uint16_t) ( table_index_reference >> 16 ); if( libpff_array_get_entry_by_index( table->index, (int) table_index_array_reference, (intptr_t **) &table_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table index array entry: %" PRIu16 ".", function, table_index_array_reference ); return( -1 ); } if( table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index values.", function ); return( -1 ); } table_index_value_reference = (uint16_t) ( ( table_index_reference & 0x0000ffe0 ) >> 5 ) - 1; if( table_index_value_reference >= table_index_values->number_of_values ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table index value reference value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: retrieving table index array entry: %" PRIu16 " value: %" PRIu16 ".\n", function, table_index_array_reference, table_index_value_reference ); } #endif *table_index_value = &( table_index_values->value[ table_index_value_reference ] ); return( 1 ); } /* Retrieves the number of sets * Returns 1 if successful or -1 on error */ int libpff_table_get_number_of_sets( libpff_table_t *table, int *number_of_sets, libcerror_error_t **error ) { static char *function = "libpff_table_get_number_of_sets"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( number_of_sets == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sets.", function ); return( -1 ); } *number_of_sets = table->number_of_sets; return( 1 ); } /* Retrieves the number of entries * Returns 1 if successful or -1 on error */ int libpff_table_get_number_of_entries( libpff_table_t *table, int *number_of_entries, libcerror_error_t **error ) { static char *function = "libpff_table_get_number_of_entries"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( number_of_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *number_of_entries = table->number_of_entries; return( 1 ); } /* Retrieves the entry and value type of a the entry matching the index from a table * Returns 1 if successful or -1 on error */ int libpff_table_get_entry_type_by_index( libpff_table_t *table, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ) { libpff_record_entry_t *record_entry = NULL; static char *function = "libpff_table_get_entry_type_by_index"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->number_of_sets == 0 ) { return( 0 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entries.", function ); return( -1 ); } if( entry_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry type.", function ); return( -1 ); } if( value_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value type.", function ); return( -1 ); } if( name_to_id_map_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid name to id map entry.", function ); return( -1 ); } if( ( set_index < 0 ) || ( set_index >= table->number_of_sets ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid set index value out of bounds.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: retrieving table set: %d entry index: %d\n", function, set_index, entry_index ); } #endif if( table->entry[ set_index ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entry set.", function ); return( -1 ); } record_entry = table->entry[ set_index ]; if( ( entry_index < 0 ) || ( entry_index >= table->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } if( ( record_entry[ entry_index ] ).identifier.format != LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_MAPI_PROPERTY ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier format: %" PRIu8 ".", function, ( record_entry[ entry_index ] ).identifier.format ); return( -1 ); } *entry_type = ( record_entry[ entry_index ] ).identifier.entry_type; *value_type = ( record_entry[ entry_index ] ).identifier.value_type; *name_to_id_map_entry = (libpff_name_to_id_map_entry_t *) ( record_entry[ entry_index ] ).name_to_id_map_entry; return( 1 ); } /* Retrieves the value of a the entry matching the index from a table * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_table_get_entry_value_by_index( libpff_table_t *table, int set_index, int entry_index, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, libcerror_error_t **error ) { libpff_record_entry_t *record_entry = NULL; static char *function = "libpff_table_get_entry_value_by_index"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->number_of_sets == 0 ) { return( 0 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entries.", function ); return( -1 ); } if( ( set_index < 0 ) || ( set_index >= table->number_of_sets ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid set index value out of bounds.", function ); return( -1 ); } if( value_data_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data reference.", function ); return( -1 ); } if( value_data_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data cache.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: retrieving entry index: %d from set: %d\n", function, entry_index, set_index ); } #endif if( table->entry[ set_index ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entry set.", function ); return( -1 ); } record_entry = table->entry[ set_index ]; if( ( entry_index < 0 ) || ( entry_index >= table->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } *value_data_reference = ( record_entry[ entry_index ] ).value_data_reference; *value_data_cache = ( record_entry[ entry_index ] ).value_data_cache; return( 1 ); } /* Retrieves the value of a the entry matching the entry type from a table * * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set * the value type is ignored and set. The default behavior is a strict * matching of the value type. In this case the value type must be filled * with the corresponding value type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_table_get_entry_value_by_entry_type( libpff_table_t *table, int set_index, uint32_t entry_type, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, uint8_t flags, libcerror_error_t **error ) { libpff_record_entry_t *record_entry = NULL; static char *function = "libpff_table_get_entry_value_by_entry_type"; int entry_type_match = 0; int record_entry_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->number_of_sets == 0 ) { return( 0 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entries.", function ); return( -1 ); } if( ( set_index < 0 ) || ( set_index >= table->number_of_sets ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid set index value out of bounds.", function ); return( -1 ); } if( value_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value type.", function ); return( -1 ); } if( value_data_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data reference.", function ); return( -1 ); } if( value_data_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data cache.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: retrieving table set: %d entry type: 0x%04" PRIx32 "\n", function, set_index, entry_type ); } #endif if( table->entry[ set_index ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entry set.", function ); return( -1 ); } record_entry = table->entry[ set_index ]; for( record_entry_index = 0; record_entry_index < table->number_of_entries; record_entry_index++ ) { /* Skip tables entries that do not contain a MAPI identifier */ if( ( record_entry[ record_entry_index ] ).identifier.format != LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_MAPI_PROPERTY ) { continue; } /* Ignore the name to identifier map */ if( ( flags & LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) == LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) { if( ( record_entry[ record_entry_index ] ).identifier.entry_type == entry_type ) { entry_type_match = 1; } } else { /* Mapped properties must be accessed through their mapped entry type value */ if( ( record_entry[ record_entry_index ] ).name_to_id_map_entry != NULL ) { if( ( record_entry[ record_entry_index ] ).name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC ) { if( ( record_entry[ record_entry_index ] ).name_to_id_map_entry->numeric_value == entry_type ) { entry_type_match = 1; } } } /* Other properties are accessed through their entry type value */ else if( ( record_entry[ record_entry_index ] ).identifier.entry_type == entry_type ) { entry_type_match = 1; } } if( entry_type_match != 0 ) { if( ( ( flags & LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE ) == LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE ) || ( ( record_entry[ record_entry_index ] ).identifier.value_type == *value_type ) ) { if( ( flags & LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE ) == LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE ) { *value_type = ( record_entry[ record_entry_index ] ).identifier.value_type; } *value_data_reference = ( record_entry[ record_entry_index ] ).value_data_reference; *value_data_cache = ( record_entry[ record_entry_index ] ).value_data_cache; return( 1 ); } } } return( 0 ); } /* Retrieves the value of an UTF-8 encoded entry name matching the entry name from a table * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_table_get_entry_value_by_utf8_entry_name( libpff_table_t *table, int set_index, uint8_t *utf8_entry_name, size_t utf8_entry_name_length, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, libcerror_error_t **error ) { libpff_record_entry_t *record_entry = NULL; static char *function = "libpff_table_get_entry_value_by_utf8_entry_name"; int result = 0; int record_entry_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->number_of_sets == 0 ) { return( 0 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entries.", function ); return( -1 ); } if( ( set_index < 0 ) || ( set_index >= table->number_of_sets ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid set index value out of bounds.", function ); return( -1 ); } if( utf8_entry_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 entry name.", function ); return( -1 ); } if( utf8_entry_name_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-8 entry name length value zero or less.", function ); return( -1 ); } if( utf8_entry_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 entry name length value exceeds maximum.", function ); return( -1 ); } if( value_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value type.", function ); return( -1 ); } if( value_data_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data reference.", function ); return( -1 ); } if( value_data_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data cache.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: retrieving table set: %d entry name: %s\n", function, set_index, utf8_entry_name ); } #endif if( table->entry[ set_index ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entry set.", function ); return( -1 ); } record_entry = table->entry[ set_index ]; for( record_entry_index = 0; record_entry_index < table->number_of_entries; record_entry_index++ ) { /* There is a match * if there is a name-to-id map entry * and the name-to-id map entry is a string * and the entry name string matches the one in the name-to-id map */ if( ( ( record_entry[ record_entry_index ] ).name_to_id_map_entry != NULL ) && ( ( record_entry[ record_entry_index ] ).name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) ) { if( ( record_entry[ record_entry_index ] ).name_to_id_map_entry->is_ascii_string == 0 ) { result = libuna_utf8_string_compare_with_utf16_stream( utf8_entry_name, utf8_entry_name_length + 1, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->string_value, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, error ); } else { result = libuna_utf8_string_compare_with_byte_stream( utf8_entry_name, utf8_entry_name_length + 1, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->string_value, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare entry name.", function ); return( -1 ); } else if( result != 0 ) { *value_type = ( record_entry[ record_entry_index ] ).identifier.value_type; *value_data_reference = ( record_entry[ record_entry_index ] ).value_data_reference; *value_data_cache = ( record_entry[ record_entry_index ] ).value_data_cache; return( 1 ); } } } return( 0 ); } /* Retrieves the value of an UTF-16 encoded entry name matching the entry name from a table * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_table_get_entry_value_by_utf16_entry_name( libpff_table_t *table, int set_index, uint16_t *utf16_entry_name, size_t utf16_entry_name_length, uint32_t *value_type, libfdata_reference_t **value_data_reference, libfcache_cache_t **value_data_cache, libcerror_error_t **error ) { libpff_record_entry_t *record_entry = NULL; static char *function = "libpff_table_get_entry_value_by_utf16_entry_name"; int result = 0; int record_entry_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->number_of_sets == 0 ) { return( 0 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entries.", function ); return( -1 ); } if( ( set_index < 0 ) || ( set_index >= table->number_of_sets ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid set index value out of bounds.", function ); return( -1 ); } if( utf16_entry_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 entry name.", function ); return( -1 ); } if( utf16_entry_name_length == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid UTF-16 entry name length value zero or less.", function ); return( -1 ); } if( utf16_entry_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 entry name length value exceeds maximum.", function ); return( -1 ); } if( value_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value type.", function ); return( -1 ); } if( value_data_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data reference.", function ); return( -1 ); } if( value_data_cache == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value data cache.", function ); return( -1 ); } if( table->entry[ set_index ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entry set.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) /* TODO add system string support if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: retrieving table set: %d entry name: %" PRIs_LIBCSTRING_SYSTEM "\n", function, set_index, utf16_entry_name ); } */ #endif record_entry = table->entry[ set_index ]; for( record_entry_index = 0; record_entry_index < table->number_of_entries; record_entry_index++ ) { /* There is a match * if there is a name-to-id map entry * and the name-to-id map entry is a string * and the entry name string matches the one in the name-to-id map */ if( ( ( record_entry[ record_entry_index ] ).name_to_id_map_entry != NULL ) && ( ( record_entry[ record_entry_index ] ).name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) ) { if( ( record_entry[ record_entry_index ] ).name_to_id_map_entry->is_ascii_string == 0 ) { result = libuna_utf16_string_compare_with_utf16_stream( utf16_entry_name, utf16_entry_name_length + 1, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->string_value, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->value_size, LIBPFF_ENDIAN_LITTLE, error ); } else { result = libuna_utf16_string_compare_with_byte_stream( utf16_entry_name, utf16_entry_name_length + 1, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->string_value, ( record_entry[ record_entry_index ] ).name_to_id_map_entry->value_size, LIBUNA_CODEPAGE_ASCII, error ); } if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to compare entry name.", function ); return( -1 ); } else if( result != 0 ) { *value_type = ( record_entry[ record_entry_index ] ).identifier.value_type; *value_data_reference = ( record_entry[ record_entry_index ] ).value_data_reference; *value_data_cache = ( record_entry[ record_entry_index ] ).value_data_cache; return( 1 ); } } } return( 0 ); } /* Reads a table and its values * Returns 1 if successful or -1 on error */ int libpff_table_read( libpff_table_t *table, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, int debug_item_type, libcerror_error_t **error ) { uint8_t *table_data = NULL; static char *function = "libpff_table_read"; size_t table_data_size = 0; uint32_t table_value_reference = 0; uint8_t table_signature = 0; uint8_t table_type = 0; #if defined( HAVE_DEBUG_OUTPUT ) libpff_table_index_values_t *table_index_values = NULL; uint16_t table_index_values_iterator = 0; int number_of_table_index_array_entries = 0; int table_index_array_iterator = 0; #endif if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->data_identifier == 0 ) { #ifdef TODO libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing data identifier.", function ); #else libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table: %" PRIu32 " - missing data identifier.", function, table->descriptor_identifier ); #endif return( -1 ); } if( table->local_descriptors_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - local descriptors tree already set.", function ); return( -1 ); } if( table->local_descriptors_cache != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - local descriptors cache already set.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( table->local_descriptors_identifier > 0 ) { if( libpff_io_handle_read_descriptor_local_descriptors_tree( io_handle, file_io_handle, table->local_descriptors_identifier, table->recovered, table->recovered_local_descriptors_identifier_value_index, &( table->local_descriptors_tree ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptors tree with identifier: %" PRIu64 ".", function, table->local_descriptors_identifier ); return( -1 ); } if( libfcache_cache_initialize( &( table->local_descriptors_cache ), LIBPFF_MAXIMUM_CACHE_ENTRIES_LOCAL_DESCRIPTORS_VALUES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptors cache.", function ); if( table->local_descriptors_tree != NULL ) { libfdata_tree_free( &( table->local_descriptors_tree ), NULL ); } return( -1 ); } } if( libpff_io_handle_read_descriptor_data_block( io_handle, file_io_handle, table->descriptor_identifier, table->data_identifier, table->recovered, table->recovered_data_identifier_value_index, &( table->descriptor_data_block ), &( table->descriptor_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor: %" PRIu32 " data: %" PRIu64 " block.", function, table->descriptor_identifier, table->data_identifier ); return( -1 ); } /* Retrieve the table array block first segment data */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, 0, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data reference segment: 0 data.", function ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data reference segment: 0 data.", function ); return( -1 ); } if( table_data_size < sizeof( pff_table_t ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: descriptor data:\n", function ); libcnotify_print_data( table_data, table_data_size, 0 ); } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: data reference entry: 0 too small to be a table.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table start:\n", function ); libcnotify_print_data( table_data, sizeof( pff_table_t ), 0 ); } #endif table_signature = ( (pff_table_t *) table_data )->signature; table_type = ( (pff_table_t *) table_data )->type; byte_stream_copy_to_uint32_little_endian( ( (pff_table_t *) table_data )->value_reference, table_value_reference ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table signature\t\t\t\t: 0x%02" PRIx8 "\n", function, table_signature ); libcnotify_printf( "%s: table type\t\t\t\t\t: 0x%02" PRIx8 "\n", function, table_type ); libcnotify_printf( "%s: table value reference\t\t\t: 0x%08" PRIx32 " ", function, table_value_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( table_value_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); } #endif if( table_signature != 0xec ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table signature: 0x%02" PRIx8 ".", function, table_signature ); return( -1 ); } if( ( table_type != 0x6c ) && ( table_type != 0x7c ) && ( table_type != 0x8c ) && ( table_type != 0x9c ) && ( table_type != 0xa5 ) && ( table_type != 0xac ) && ( table_type != 0xbc ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table type: 0x%02" PRIx8 ".", function, table_type ); return( -1 ); } if( libpff_table_read_index( table, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table index.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libpff_array_get_number_of_entries( table->index, &number_of_table_index_array_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of table index array entries.", function ); return( -1 ); } for( table_index_array_iterator = 0; table_index_array_iterator < number_of_table_index_array_entries; table_index_array_iterator++ ) { libcnotify_printf( "%s: table index array entry: %d\n", function, table_index_array_iterator ); if( libpff_array_get_entry_by_index( table->index, table_index_array_iterator, (intptr_t **) &table_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table index array entry: %d.", function, table_index_array_iterator ); return( -1 ); } if( table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table index values.", function ); return( -1 ); } if( table_index_values->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table index values - missing values.", function ); return( -1 ); } for( table_index_values_iterator = 0; table_index_values_iterator < table_index_values->number_of_values; table_index_values_iterator++ ) { if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) ( table_index_values->value[ table_index_values_iterator ] ).array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu16 ".", function, ( table_index_values->value[ table_index_values_iterator ] ).array_entry ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu16 ".", function, ( table_index_values->value[ table_index_values_iterator ] ).array_entry ); return( -1 ); } libcnotify_printf( "%s: table value: %d at offset: %" PRIu16 " of size: %" PRIu16 "\n", function, table_index_values_iterator, ( table_index_values->value[ table_index_values_iterator ] ).offset, ( table_index_values->value[ table_index_values_iterator ] ).size ); libcnotify_print_data( &( table_data[ ( table_index_values->value[ table_index_values_iterator ] ).offset ] ), (size_t) ( table_index_values->value[ table_index_values_iterator ] ).size, 0 ); } } libcnotify_printf( "\n" ); } #endif if( libpff_table_read_values( table, table_type, table_value_reference, io_handle, name_to_id_map_list, file_io_handle, debug_item_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table values.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads the table index * Returns 1 if successful or -1 on error */ int libpff_table_read_index( libpff_table_t *table, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_table_index_values_t *table_index_values = NULL; uint8_t *table_data = NULL; uint8_t *table_index_data = NULL; static char *function = "libpff_table_read_index"; size_t table_data_size = 0; ssize_t table_data_offset = 0; uint16_t table_index_offset = 0; uint16_t table_value_start_offset = 0; uint16_t table_value_end_offset = 0; uint16_t table_number_of_index_offsets = 0; uint16_t table_number_of_unused_index_offsets = 0; uint16_t table_index_iterator = 0; int number_of_table_array_entries = 0; int table_array_entry_iterator = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( libfdata_block_get_number_of_segments( table->descriptor_data_block, &number_of_table_array_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of table array entries.", function ); goto on_error; } if( libpff_array_resize( table->index, number_of_table_array_entries, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_table_index_values_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize table index array.", function ); goto on_error; } /* Iterate the table array to fill the table index array */ for( table_array_entry_iterator = 0; table_array_entry_iterator < number_of_table_array_entries; table_array_entry_iterator++ ) { if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, table_array_entry_iterator, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %d.", function, table_array_entry_iterator ); goto on_error; } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %d.", function, table_array_entry_iterator ); goto on_error; } byte_stream_copy_to_uint16_little_endian( table_data, table_index_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table data offset\t\t\t: %" PRIzd "\n", function, table_data_offset ); libcnotify_printf( "%s: table size\t\t\t\t: %" PRIzd "\n", function, table_data_size ); libcnotify_printf( "%s: table index offset\t\t\t: %" PRIu16 "\n", function, table_index_offset ); } #endif if( table_index_offset == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table index offset.", function ); goto on_error; } /* The table index offset should point to an offset within the table */ if( (size_t) table_index_offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table index offset exceeds table data size.", function ); goto on_error; } /* Determine which values are in the table using the index */ table_index_data = &( table_data[ table_index_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table index:\n", function ); libcnotify_print_data( table_index_data, 4, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( ( (pff_table_index_t *) table_index_data )->number_of_offsets, table_number_of_index_offsets ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_index_t *) table_index_data )->number_of_unused_offsets, table_number_of_unused_index_offsets ); table_index_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table number of index offsets\t\t: %" PRIu16 "\n", function, table_number_of_index_offsets ); libcnotify_printf( "%s: table number of unused index offsets\t: %" PRIu16 "\n", function, table_number_of_unused_index_offsets ); } #endif if( (size_t) ( table_index_offset + 4 + ( ( table_number_of_index_offsets + 1 ) * 2 ) ) > table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of index offsets do not fit in table.", function ); goto on_error; } /* Create the table index values structure * The table number of index items should be considered more of a last item number * The table actually contains 1 additional table index value */ if( libpff_table_index_values_initialize( &table_index_values, table_number_of_index_offsets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table index values.", function ); goto on_error; } if( table_number_of_index_offsets > 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); libcnotify_printf( "%s: table index offsets:\n", function ); libcnotify_print_data( table_index_data, ( table_number_of_index_offsets + 1 ) * 2, 0 ); } #endif /* Fill the table index values */ byte_stream_copy_to_uint16_little_endian( table_index_data, table_value_start_offset ); table_index_data += 2; for( table_index_iterator = 0; table_index_iterator < table_number_of_index_offsets; table_index_iterator++ ) { byte_stream_copy_to_uint16_little_endian( table_index_data, table_value_end_offset ); table_index_data += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table index value: %03" PRIu16 " offset\t\t: %" PRIu16 " - %" PRIu16 "\n", function, table_index_iterator, table_value_start_offset, table_value_end_offset ); } #endif if( table_value_start_offset > table_value_end_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: table index start offset: %" PRIu16 " exceeds end offset: %" PRIu16 ".", function, table_value_start_offset, table_value_end_offset ); goto on_error; } /* TODO add function to set index values */ ( table_index_values->value[ table_index_iterator ] ).array_entry = (uint32_t) table_array_entry_iterator; ( table_index_values->value[ table_index_iterator ] ).offset = table_value_start_offset; ( table_index_values->value[ table_index_iterator ] ).size = table_value_end_offset - table_value_start_offset; table_value_start_offset = table_value_end_offset; } if( table_value_end_offset > table_index_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: last table index value end offset: %" PRIu16 " exceeds table index offset: %" PRIu16 ".", function, table_value_end_offset, table_index_offset ); goto on_error; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( table_value_end_offset < table_index_offset ) { libcnotify_printf( "%s: last table index values end offset: %" PRIu16 " does not match table index offset: %" PRIu16 "\n", function, table_value_start_offset, table_index_offset ); libcnotify_print_data( &( table_data[ table_value_end_offset ] ), ( table_index_offset - table_value_end_offset ), 0 ); } if( (size_t) ( table_index_data - table_data ) != table_data_size ) { libcnotify_printf( "\n" ); libcnotify_printf( "%s: data after table index of size: %" PRIzd "\n", function, table_data_size - (size_t) ( table_index_data - table_data ) ); libcnotify_print_data( table_index_data, table_data_size - (size_t) ( table_index_data - table_data ), 0 ); } } #endif table_data_offset += table_data_size; if( libpff_array_set_entry_by_index( table->index, table_array_entry_iterator, (intptr_t *) table_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set table index array entry: %d.", function, table_array_entry_iterator ); goto on_error; } table_index_values = NULL; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); on_error: if( table_index_values != NULL ) { libpff_table_index_values_free( &table_index_values, NULL ); } return( -1 ); } /* Reads the record entries data references * Returns 1 if successful or -1 on error */ int libpff_table_read_record_entries_data_references( libpff_table_t *table, uint8_t record_entries_level, uint8_t record_entry_identifier_size, uint32_t record_entries_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfdata_reference_t *record_entries_data_reference = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *record_entries_data = NULL; uint8_t *table_data = NULL; static char *function = "libpff_table_read_record_entries_data_references"; size_t number_of_record_entries = 0; size_t record_entries_data_size = 0; size_t record_entry_size = 0; size_t table_data_size = 0; int record_entry_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libcstring_system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; uint64_t record_entry_identifier = 0; int result = 0; #endif if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->record_entries_data_references == NULL ) { if( libpff_array_initialize( &( table->record_entries_data_references ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entries data references array.", function ); goto on_error; } } if( ( record_entry_identifier_size != 2 ) && ( record_entry_identifier_size != 4 ) && ( record_entry_identifier_size != 8 ) && ( record_entry_identifier_size != 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: %" PRIu8 ".", function, record_entry_identifier_size ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading record entries at level: %" PRIu8 " with reference: 0x%08" PRIx32 " ", function, record_entries_level, record_entries_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( record_entries_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif if( record_entries_reference == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no record entries.\n", function ); } #endif return( 1 ); } if( ( record_entries_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, record_entries_reference & 0x0000001fUL, record_entries_reference ); goto on_error; } /* Retrieve the index value of the record entries reference */ if( libpff_table_get_index_value_by_reference( table, record_entries_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries reference.", function ); goto on_error; } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); goto on_error; } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); goto on_error; } /* Create a buffer data reference of the record entries data */ if( libfdata_buffer_reference_initialize( &record_entries_data_reference, &( table_data[ table_index_value->offset ] ), table_index_value->size, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entries data reference.", function ); goto on_error; } if( record_entries_level == 0 ) { if( libpff_array_append_entry( table->record_entries_data_references, &record_entry_index, (intptr_t *) record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to append record entries data reference.", function ); goto on_error; } } else { record_entry_size = record_entry_identifier_size + 4; if( ( table_index_value->size % record_entry_size ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries size.", function ); goto on_error; } number_of_record_entries = table_index_value->size / record_entry_size; for( record_entry_index = 0; (size_t) record_entry_index < number_of_record_entries; record_entry_index++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( record_entries_data_reference, file_io_handle, NULL, (off64_t) ( record_entry_index * record_entry_size ), &record_entries_data, &record_entries_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data at offset: %" PRIzd ".", function, record_entry_index * record_entry_size ); goto on_error; } if( record_entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entries data.", function ); goto on_error; } if( record_entries_data_size < record_entry_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record entries data size value out of bounds.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( record_entry_identifier_size == 2 ) || ( record_entry_identifier_size == 4 ) || ( record_entry_identifier_size == 8 ) ) { if( record_entry_identifier_size == 2 ) { byte_stream_copy_to_uint16_little_endian( record_entries_data, record_entry_identifier ); } else if( record_entry_identifier_size == 4 ) { byte_stream_copy_to_uint32_little_endian( record_entries_data, record_entry_identifier ); } else if( record_entry_identifier_size == 8 ) { byte_stream_copy_to_uint64_little_endian( record_entries_data, record_entry_identifier ); } libcnotify_printf( "%s: record entry: %03d at level: %" PRIu8 " identifier\t\t\t: 0x%08" PRIx64 "\n", function, record_entry_index, record_entries_level, record_entry_identifier ); } else if( record_entry_identifier_size == 16 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); goto on_error; } if( libfguid_identifier_copy_from_byte_stream( guid, record_entries_data, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); goto on_error; } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "%s: record entry: %03d at level: %" PRIu8 " identifier\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "s\n", function, record_entry_index, record_entries_level, guid_string ); } } #endif /* TODO use the record entry identifier to validate sub level record entries */ record_entries_data += record_entry_identifier_size; byte_stream_copy_to_uint32_little_endian( record_entries_data, record_entries_reference ); record_entries_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entry: %03d at level: %" PRIu8 " reference\t\t\t: 0x%08" PRIx32 " ", function, record_entry_index, record_entries_level, record_entries_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( record_entries_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif if( libpff_table_read_record_entries_data_references( table, record_entries_level - 1, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); goto on_error; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif if( libfdata_reference_free( &record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free record entries data reference.", function ); goto on_error; } } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif if( record_entries_data_reference != NULL ) { libfdata_reference_free( &record_entries_data_reference, NULL ); } if( table->record_entries_data_references != NULL ) { libpff_array_free( &( table->record_entries_data_references ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_reference_free, NULL ); } return( -1 ); } /* Reads the table values * Returns 1 if successful or -1 on error */ int libpff_table_read_values( libpff_table_t *table, uint8_t table_type, uint32_t table_value_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, int debug_item_type, libcerror_error_t **error ) { static char *function = "libpff_table_read_values"; int result = 0; switch( table_type ) { case 0x6c: result = libpff_table_read_6c_values( table, table_value_reference, file_io_handle, error ); break; case 0x7c: result = libpff_table_read_7c_values( table, table_value_reference, io_handle, name_to_id_map_list, file_io_handle, error ); break; case 0x8c: result = libpff_table_read_8c_values( table, table_value_reference, file_io_handle, error ); break; case 0x9c: result = libpff_table_read_9c_values( table, table_value_reference, file_io_handle, error ); break; case 0xa5: result = libpff_table_read_a5_values( table, table_value_reference, file_io_handle, error ); break; case 0xac: result = libpff_table_read_ac_values( table, table_value_reference, io_handle, name_to_id_map_list, file_io_handle, error ); break; case 0xbc: result = libpff_table_read_bc_values( table, table_value_reference, io_handle, name_to_id_map_list, file_io_handle, debug_item_type, error ); break; } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table values.", function ); return( -1 ); } return( 1 ); } /* Reads the 6c table values * Returns 1 if successful or -1 on error */ int libpff_table_read_6c_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *table_value_data = NULL; static char *function = "libpff_table_read_6c_values"; size_t table_data_size = 0; uint32_t b5_table_header_reference = 0; uint32_t record_entries_reference = 0; uint32_t values_array_reference = 0; uint8_t record_entry_identifier_size = 0; uint8_t record_entry_value_size = 0; uint8_t record_entries_level = 0; if( ( table_header_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, table_header_reference & 0x0000001fUL, table_header_reference ); return( -1 ); } /* Fetch the 6c table header reference */ if( libpff_table_get_index_value_by_reference( table, table_header_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 6c table header reference.", function ); return( -1 ); } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); return( -1 ); } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); return( -1 ); } table_value_data = &( table_data[ table_index_value->offset ] ); /* Read the 6c table header * This table header contains no type indicator * to make sure the it is supported the size is checked */ if( table_index_value->size != 8 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: unsupported 6c table header of size: %" PRIu16 ".", function, table_index_value->size ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( table_value_data, b5_table_header_reference ); table_value_data += 4; byte_stream_copy_to_uint32_little_endian( table_value_data, values_array_reference ); table_value_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: b5 table header reference\t\t: 0x%08" PRIx32 " ", function, b5_table_header_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( b5_table_header_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: values array reference\t\t: 0x%08" PRIx32 " ", function, values_array_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( values_array_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); } #endif /* Read the b5 table header */ if( libpff_table_read_b5_header( table, b5_table_header_reference, &record_entry_identifier_size, &record_entry_value_size, &record_entries_level, &record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read b5 table header.", function ); return( -1 ); } if( ( record_entry_identifier_size != 16 ) || ( record_entry_value_size != 2 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: %" PRIu8 " and record entry value size: %" PRIu8 ".", function, record_entry_identifier_size, record_entry_value_size ); return( -1 ); } /* Check if the table contains any entries */ if( ( record_entries_reference == 0 ) && ( values_array_reference == 0 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no entries.\n", function ); } #endif return( 1 ); } if( record_entries_reference == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table contains value array but no record entries.", function ); return( -1 ); } if( values_array_reference == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table contains record entries but no value array.", function ); return( -1 ); } if( libpff_table_read_record_entries_data_references( table, record_entries_level, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); return( -1 ); } if( libpff_table_read_6c_record_entries( table, values_array_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read 6c table record entries.", function ); return( -1 ); } return( 1 ); } /* Reads the 7c table values * Returns 1 if successful or -1 on error */ int libpff_table_read_7c_values( libpff_table_t *table, uint32_t table_header_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_array_t *column_definitions_array = NULL; libfdata_reference_t *column_definitions_data_reference = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *table_header_data = NULL; static char *function = "libpff_table_read_7c_values"; size_t table_data_size = 0; size_t table_header_data_size = 0; uint32_t b5_table_header_reference = 0; uint32_t values_array_reference = 0; uint32_t record_entries_reference = 0; uint16_t values_array_size = 0; uint8_t record_entry_identifier_size = 0; uint8_t record_entry_value_size = 0; uint8_t record_entries_level = 0; int number_of_column_definitions = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( ( table_header_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, table_header_reference & 0x0000001fUL, table_header_reference ); return( -1 ); } /* Fetch the 7c table header reference */ if( libpff_table_get_index_value_by_reference( table, table_header_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 7c table header reference.", function ); goto on_error; } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); goto on_error; } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); goto on_error; } table_header_data = &( table_data[ table_index_value->offset ] ); table_header_data_size = (size_t) table_index_value->size; /* Read the 7c table header */ if( ( (pff_table_header_7c_t *) table_header_data )->type != 0x7c ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header type: 0x%02x.", function, ( (pff_table_header_7c_t *) table_header_data )->type ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_7c_t *) table_header_data )->values_array_end_offset_cell_existence_block, values_array_size ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_header_7c_t *) table_header_data )->b5_table_header_reference, b5_table_header_reference ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_header_7c_t *) table_header_data )->values_array_reference, values_array_reference ); number_of_column_definitions = (int) ( (pff_table_header_7c_t *) table_header_data )->number_of_column_definitions; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table header type\t\t\t\t\t: 0x%02" PRIx8 "\n", function, ( (pff_table_header_7c_t *) table_header_data )->type ); libcnotify_printf( "%s: number of column definitions\t\t\t: %d\n", function, number_of_column_definitions ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_7c_t *) table_header_data )->values_array_end_offset_32bit_values, value_16bit ); libcnotify_printf( "%s: values array end offset 32-bit values\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_7c_t *) table_header_data )->values_array_end_offset_16bit_values, value_16bit ); libcnotify_printf( "%s: values array end offset 16-bit values\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_7c_t *) table_header_data )->values_array_end_offset_8bit_values, value_16bit ); libcnotify_printf( "%s: values array end offset 8-bit values\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_7c_t *) table_header_data )->values_array_end_offset_cell_existence_block, value_16bit ); libcnotify_printf( "%s: values array end offset cell existence block\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: b5 table header reference\t\t\t\t: 0x%08" PRIx32 " ", function, b5_table_header_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( b5_table_header_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: values array reference\t\t\t\t: 0x%08" PRIx32 " ", function, values_array_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( values_array_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: unknown1:\n", function ); libcnotify_print_data( ( (pff_table_header_7c_t *) table_header_data )->unknown1, 4, 0 ); } #endif table_header_data += sizeof( pff_table_header_7c_t ); table_header_data_size -= sizeof( pff_table_header_7c_t ); /* Read the column definitions in the 7c table header */ if( ( (size_t) number_of_column_definitions * sizeof( pff_table_column_definition_7c_t ) ) != table_header_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: mismatch in number of the column definitions and data size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: 7c column definitions data:\n", function ); libcnotify_print_data( table_header_data, table_header_data_size, 0 ); } #endif /* Create a buffer data reference of the column definitions data */ if( libfdata_buffer_reference_initialize( &column_definitions_data_reference, table_header_data, table_header_data_size, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column definitions data reference.", function ); goto on_error; } /* Read the b5 table header */ if( libpff_table_read_b5_header( table, b5_table_header_reference, &record_entry_identifier_size, &record_entry_value_size, &record_entries_level, &record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read b5 table header.", function ); goto on_error; } if( ( record_entry_identifier_size != 4 ) || ( ( record_entry_value_size != 2 ) && ( record_entry_value_size != 4 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: 0x%02" PRIx8 " and record entry value size: 0x%02" PRIx8 ".", function, record_entry_identifier_size, record_entry_value_size ); goto on_error; } /* Create the column definitions array */ if( libpff_array_initialize( &column_definitions_array, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column definitions array.", function ); goto on_error; } if( libpff_table_read_7c_column_definitions( column_definitions_array, column_definitions_data_reference, number_of_column_definitions, file_io_handle, name_to_id_map_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read 7c table column definitions.", function ); goto on_error; } if( libpff_table_read_record_entries_data_references( table, record_entries_level, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); goto on_error; } if( number_of_column_definitions > 0 ) { if( libpff_table_read_values_array( table, record_entries_reference, values_array_reference, record_entry_identifier_size, record_entry_value_size, values_array_size, column_definitions_array, io_handle, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read values array.", function ); goto on_error; } } if( libpff_array_free( &column_definitions_array, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_column_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the column definitions array.", function ); goto on_error; } if( libfdata_reference_free( &column_definitions_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column definitions data reference.", function ); goto on_error; } return( 1 ); on_error: if( column_definitions_array != NULL ) { libpff_array_free( &column_definitions_array, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_column_definition_free, NULL ); } if( column_definitions_data_reference != NULL ) { libfdata_reference_free( &column_definitions_data_reference, NULL ); } return( -1 ); } /* Reads the 8c table values * Returns 1 if successful or -1 on error */ int libpff_table_read_8c_values( libpff_table_t *table, uint32_t b5_table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { static char *function = "libpff_table_read_8c_values"; uint32_t record_entries_reference = 0; uint8_t record_entry_identifier_size = 0; uint8_t record_entry_value_size = 0; uint8_t record_entries_level = 0; /* Read the b5 table header */ if( libpff_table_read_b5_header( table, b5_table_header_reference, &record_entry_identifier_size, &record_entry_value_size, &record_entries_level, &record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read b5 table header.", function ); return( -1 ); } if( ( record_entry_identifier_size != 8 ) || ( record_entry_value_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: 0x%02" PRIx8 " and record entry value size: 0x%02" PRIx8 ".", function, record_entry_identifier_size, record_entry_value_size ); return( -1 ); } if( libpff_table_read_record_entries_data_references( table, record_entries_level, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); return( -1 ); } if( libpff_table_read_8c_record_entries( table, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table record entries.", function ); return( -1 ); } return( 1 ); } /* Reads the 9c table values * Returns 1 if successful or -1 on error */ int libpff_table_read_9c_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *table_value_data = NULL; static char *function = "libpff_table_read_9c_values"; size_t table_data_size = 0; uint32_t b5_table_header_reference = 0; uint32_t record_entries_reference = 0; uint8_t record_entry_identifier_size = 0; uint8_t record_entry_value_size = 0; uint8_t record_entries_level = 0; if( ( table_header_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, table_header_reference & 0x0000001fUL, table_header_reference ); return( -1 ); } /* Fetch the 9c table header reference */ if( libpff_table_get_index_value_by_reference( table, table_header_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 9c table header reference.", function ); return( -1 ); } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); return( -1 ); } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); return( -1 ); } table_value_data = &( table_data[ table_index_value->offset ] ); /* Read the 9c table header * This table header contains no type indicator * to make sure the it is supported the size is checked */ if( table_index_value->size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: unsupported 9c table header of size: %" PRIu16 ".", function, table_index_value->size ); return( -1 ); } byte_stream_copy_to_uint32_little_endian( table_value_data, b5_table_header_reference ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: b5 table header reference\t\t: 0x%08" PRIx32 " ", function, b5_table_header_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( b5_table_header_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); } #endif /* Read the b5 table header */ if( libpff_table_read_b5_header( table, b5_table_header_reference, &record_entry_identifier_size, &record_entry_value_size, &record_entries_level, &record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read b5 table header.", function ); return( -1 ); } if( ( record_entry_identifier_size != 16 ) || ( record_entry_value_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: 0x%02" PRIx8 " and record entry value size: 0x%02" PRIx8 ".", function, record_entry_identifier_size, record_entry_value_size ); return( -1 ); } if( libpff_table_read_record_entries_data_references( table, record_entries_level, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); return( -1 ); } if( libpff_table_read_9c_record_entries( table, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read 9c table record entries.", function ); return( -1 ); } return( 1 ); } /* Reads the a5 table values * Returns 1 if successful or -1 on error */ int libpff_table_read_a5_values( libpff_table_t *table, uint32_t table_header_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_table_index_values_t *table_index_values = NULL; static char *function = "libpff_table_read_a5_values"; /* The a5 table contains no b5 table header */ if( table_header_reference != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header reference: 0x%08" PRIx32 ".", function, table_header_reference ); return( -1 ); } if( libpff_array_get_entry_by_index( table->index, 0, (intptr_t **) &table_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table index array entry: 0.", function ); return( -1 ); } if( table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table index values.", function ); return( -1 ); } if( table_index_values->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table index values - missing values.", function ); return( -1 ); } if( table_index_values->number_of_values > 1 ) { if( libpff_table_read_a5_record_entries( table, 0x00000020, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read a5 table record entries.", function ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) else if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no entries.\n", function ); } #endif return( 1 ); } /* Reads the ac table values * Returns 1 if successful or -1 on error */ int libpff_table_read_ac_values( libpff_table_t *table, uint32_t table_header_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_array_t *column_definitions_array = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *table_header_data = NULL; static char *function = "libpff_table_read_ac_values"; size_t table_data_size = 0; size_t table_header_data_size = 0; uint32_t b5_table_header_reference = 0; uint32_t record_entries_reference = 0; uint32_t column_definitions_reference = 0; uint32_t values_array_reference = 0; uint16_t values_array_size = 0; uint8_t record_entry_identifier_size = 0; uint8_t record_entry_value_size = 0; uint8_t record_entries_level = 0; int number_of_column_definitions = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint16_t value_16bit = 0; #endif if( ( table_header_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, table_header_reference & 0x0000001fUL, table_header_reference ); return( -1 ); } /* Fetch the ac table header reference */ if( libpff_table_get_index_value_by_reference( table, table_header_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve ac table header reference.", function ); goto on_error; } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); goto on_error; } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); goto on_error; } table_header_data = &( table_data[ table_index_value->offset ] ); table_header_data_size = (size_t) table_index_value->size; /* Read the ac table header */ if( ( (pff_table_header_ac_t *) table_header_data )->type != 0xac ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header type: 0x%02x.", function, ( (pff_table_header_ac_t *) table_header_data )->type ); goto on_error; } /* TODO check ac header size */ byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_ac_t *) table_header_data )->values_array_end_offset_cell_existence_block, values_array_size ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_header_ac_t *) table_header_data )->b5_table_header_reference, b5_table_header_reference ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_header_ac_t *) table_header_data )->values_array_reference, values_array_reference ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_ac_t *) table_header_data )->number_of_column_definitions, number_of_column_definitions ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_header_ac_t *) table_header_data )->column_definitions_reference, column_definitions_reference ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table header type\t\t\t\t\t: 0x%02" PRIx8 "\n", function, ( (pff_table_header_ac_t *) table_header_data )->type ); libcnotify_printf( "%s: padding1\t\t\t\t\t\t: 0x%02" PRIx8 "\n", function, ( (pff_table_header_ac_t *) table_header_data )->padding1 ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_ac_t *) table_header_data )->values_array_end_offset_32bit_values, value_16bit ); libcnotify_printf( "%s: values array end offset 32-bit values\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_ac_t *) table_header_data )->values_array_end_offset_16bit_values, value_16bit ); libcnotify_printf( "%s: values array end offset 16-bit values\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_ac_t *) table_header_data )->values_array_end_offset_8bit_values, value_16bit ); libcnotify_printf( "%s: values array end offset 8-bit values\t\t: %" PRIu16 "\n", function, value_16bit ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_header_ac_t *) table_header_data )->values_array_end_offset_cell_existence_block, value_16bit ); libcnotify_printf( "%s: values array end offset cell existence block\t: %" PRIu16 "\n", function, value_16bit ); libcnotify_printf( "%s: b5 table header reference\t\t\t\t: 0x%08" PRIx32 " ", function, b5_table_header_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( b5_table_header_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: values array reference\t\t\t\t: 0x%08" PRIx32 " ", function, values_array_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( values_array_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: padding2:\n", function ); libcnotify_print_data( ( (pff_table_header_ac_t *) table_header_data )->padding2, 4, 0 ); libcnotify_printf( "%s: number of column definitions\t\t\t: %d\n", function, number_of_column_definitions ); libcnotify_printf( "%s: column definitions reference\t\t\t: 0x%08" PRIx32 " ", function, column_definitions_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( column_definitions_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "%s: unknown2:\n", function ); libcnotify_print_data( ( (pff_table_header_ac_t *) table_header_data )->unknown2, 12, 0 ); } #endif /* Read the b5 table header */ if( libpff_table_read_b5_header( table, b5_table_header_reference, &record_entry_identifier_size, &record_entry_value_size, &record_entries_level, &record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read b5 table header.", function ); goto on_error; } if( ( record_entry_identifier_size != 4 ) || ( record_entry_value_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: 0x%02" PRIx8 " and record entry value size: 0x%02" PRIx8 ".", function, record_entry_identifier_size, record_entry_value_size ); goto on_error; } /* Create the column definitions array */ if( libpff_array_initialize( &column_definitions_array, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column definitions array.", function ); goto on_error; } if( libpff_table_read_ac_column_definitions( table, column_definitions_array, column_definitions_reference, number_of_column_definitions, io_handle, file_io_handle, name_to_id_map_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read ac table column definitions.", function ); goto on_error; } if( libpff_table_read_record_entries_data_references( table, record_entries_level, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); goto on_error; } if( libpff_array_get_number_of_entries( table->index, &number_of_column_definitions, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of column definitions.", function ); goto on_error; } if( number_of_column_definitions > 0 ) { if( libpff_table_read_values_array( table, record_entries_reference, values_array_reference, record_entry_identifier_size, record_entry_value_size, values_array_size, column_definitions_array, io_handle, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read values array.", function ); goto on_error; } } if( libpff_array_free( &column_definitions_array, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_column_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the column definitions array.", function ); goto on_error; } return( 1 ); on_error: if( column_definitions_array != NULL ) { libpff_array_free( &column_definitions_array, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_column_definition_free, NULL ); } return( -1 ); } /* Reads the bc table values * Returns 1 if successful or -1 on error */ int libpff_table_read_bc_values( libpff_table_t *table, uint32_t b5_table_header_reference, libpff_io_handle_t *io_handle, libpff_list_t *name_to_id_map_list, libbfio_handle_t *file_io_handle, int debug_item_type, libcerror_error_t **error ) { static char *function = "libpff_table_read_bc_values"; uint32_t record_entries_reference = 0; uint8_t record_entry_identifier_size = 0; uint8_t record_entry_value_size = 0; uint8_t record_entries_level = 0; /* Read the b5 table header */ if( libpff_table_read_b5_header( table, b5_table_header_reference, &record_entry_identifier_size, &record_entry_value_size, &record_entries_level, &record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read b5 table header.", function ); return( -1 ); } if( ( record_entry_identifier_size != 2 ) || ( record_entry_value_size != 6 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: 0x%02" PRIx8 " and record entry value size: 0x%02" PRIx8 ".", function, record_entry_identifier_size, record_entry_value_size ); return( -1 ); } if( libpff_table_read_record_entries_data_references( table, record_entries_level, record_entry_identifier_size, record_entries_reference, file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entries data references.", function ); return( -1 ); } if( libpff_table_read_bc_record_entries( table, io_handle, file_io_handle, name_to_id_map_list, debug_item_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table record entries.", function ); return( -1 ); } return( 1 ); } /* Reads the b5 table header * Returns 1 if successful or -1 on error */ int libpff_table_read_b5_header( libpff_table_t *table, uint32_t table_header_reference, uint8_t *record_entry_identifier_size, uint8_t *record_entry_value_size, uint8_t *record_entries_level, uint32_t *record_entries_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *table_value_data = NULL; static char *function = "libpff_table_read_b5_header"; size_t table_data_size = 0; if( record_entry_identifier_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record entry identifier size.", function ); return( -1 ); } if( record_entry_value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record entry value size.", function ); return( -1 ); } if( record_entries_level == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record entries level.", function ); return( -1 ); } if( record_entries_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record entries reference.", function ); return( -1 ); } if( ( table_header_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, table_header_reference & 0x0000001fUL, table_header_reference ); return( -1 ); } /* Fetch the b5 table header reference */ if( libpff_table_get_index_value_by_reference( table, table_header_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve b5 table header reference.", function ); return( -1 ); } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); return( -1 ); } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); return( -1 ); } table_value_data = &( table_data[ table_index_value->offset ] ); if( ( (pff_table_header_b5_t *) table_value_data )->type != 0xb5 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported table header type: 0x%02x.", function, ( (pff_table_header_b5_t *) table_value_data )->type ); return( -1 ); } *record_entry_identifier_size = ( (pff_table_header_b5_t *) table_value_data )->record_entry_identifier_size; *record_entry_value_size = ( (pff_table_header_b5_t *) table_value_data )->record_entry_value_size; *record_entries_level = ( (pff_table_header_b5_t *) table_value_data )->record_entries_level; byte_stream_copy_to_uint32_little_endian( ( (pff_table_header_b5_t *) table_value_data )->record_entries_reference, *record_entries_reference ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table header type\t\t\t: 0x%02" PRIx8 "\n", function, ( (pff_table_header_b5_t *) table_value_data )->type ); libcnotify_printf( "%s: record entry identifier size\t: %" PRIu8 "\n", function, *record_entry_identifier_size ); libcnotify_printf( "%s: record entry value size\t\t: %" PRIu8 "\n", function, *record_entry_value_size ); libcnotify_printf( "%s: record entries level\t\t: %" PRIu8 "\n", function, ( (pff_table_header_b5_t *) table_value_data )->record_entries_level ); libcnotify_printf( "%s: record entries reference\t\t: 0x%08" PRIx32 " ", function, *record_entries_reference ); libpff_debug_print_node_identifier_type( (uint8_t) ( *record_entries_reference & 0x0000001fUL ) ); libcnotify_printf( "\n" ); libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads the 6c table record entries and their values * Returns 1 if successful or -1 on error */ int libpff_table_read_6c_record_entries( libpff_table_t *table, uint32_t values_array_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfdata_reference_t *record_entries_data_reference = NULL; libpff_record_entry_t *record_entry = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *record_entries_data = NULL; uint8_t *table_values_array_data = NULL; static char *function = "libpff_table_read_6c_record_entries"; size64_t record_entries_data_reference_size = 0; size_t number_of_record_entries = 0; size_t table_data_size = 0; size_t record_entries_data_size = 0; size_t table_values_array_data_size = 0; uint32_t record_entry_iterator = 0; uint16_t values_array_number = 0; int number_of_record_entries_data_references = 0; int record_entries_data_references_index = 0; int record_entry_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libcstring_system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; int result = 0; #endif if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - entries already set.", function ); return( -1 ); } if( values_array_reference == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table contains no value array.", function ); return( -1 ); } if( ( values_array_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported values array entries reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, values_array_reference & 0x0000001fUL, values_array_reference ); return( -1 ); } /* Fetch the values array */ if( libpff_table_get_index_value_by_reference( table, values_array_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values array entries reference.", function ); goto on_error; } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); goto on_error; } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); goto on_error; } table_values_array_data = &( table_data[ table_index_value->offset ] ); table_values_array_data_size = (size_t) table_index_value->size; if( libpff_array_get_number_of_entries( table->record_entries_data_references, &number_of_record_entries_data_references, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of record entries data references.", function ); goto on_error; } for( record_entries_data_references_index = 0; record_entries_data_references_index < number_of_record_entries_data_references; record_entries_data_references_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entries data reference: %d\n", function, record_entries_data_references_index ); } #endif if( libpff_array_get_entry_by_index( table->record_entries_data_references, record_entries_data_references_index, (intptr_t **) &record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference: %d.", function, record_entries_data_references_index ); goto on_error; } if( libfdata_reference_get_size( record_entries_data_reference, &record_entries_data_reference_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference size: %d.", function, record_entries_data_references_index ); goto on_error; } if( record_entries_data_reference_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record entries data reference size value exceeds maximum.", function ); goto on_error; } if( ( record_entries_data_reference_size % sizeof( pff_table_record_entry_6c_t ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries data reference size.", function ); goto on_error; } number_of_record_entries = (size_t) record_entries_data_reference_size / sizeof( pff_table_record_entry_6c_t ); if( number_of_record_entries > (size_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: number of record entries value exceeds maximum.", function ); goto on_error; } if( libpff_record_entries_resize( table, 1, table->number_of_entries + (int) number_of_record_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); goto on_error; } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing record entries.", function ); goto on_error; } record_entry = table->entry[ 0 ]; if( record_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry.", function ); goto on_error; } for( record_entry_iterator = 0; record_entry_iterator < number_of_record_entries; record_entry_iterator++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( record_entries_data_reference, file_io_handle, NULL, (off64_t) ( record_entry_iterator * sizeof( pff_table_record_entry_6c_t ) ), &record_entries_data, &record_entries_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data at offset: %" PRIzd ".", function, (size_t) record_entry_iterator * sizeof( pff_table_record_entry_6c_t ) ); goto on_error; } if( record_entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entries data.", function ); goto on_error; } if( record_entries_data_size < sizeof( pff_table_record_entry_6c_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record entries data size value out of bounds.", function ); goto on_error; } ( record_entry[ record_entry_index ] ).identifier.format = LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_GUID; if( memory_copy( ( record_entry[ record_entry_index ] ).identifier.guid, ( (pff_table_record_entry_6c_t *) record_entries_data )->record_entry_guid, 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy record entry identifier GUID.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (pff_table_record_entry_6c_t *) record_entries_data )->values_array_number, values_array_number ); if( (size_t) ( 16 * values_array_number ) > table_values_array_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: values array number exceeds table values array data size.", function ); goto on_error; } /* Create a buffer data reference of the record entry value data */ if( libfdata_buffer_reference_initialize( &( ( record_entry[ record_entry_index ] ).value_data_reference ), &( table_values_array_data[ 16 * values_array_number ] ), 16, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entry value data reference.", function ); goto on_error; } /* TODO do something with values_array_number ? */ #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); goto on_error; } if( libfguid_identifier_copy_from_byte_stream( guid, ( record_entry[ record_entry_index ] ).identifier.guid, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); goto on_error; } libcnotify_printf( "%s: table set: %03d entry: %03d record entry guid\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", function, 0, record_entry_index, guid_string ); if( libfguid_identifier_copy_from_byte_stream( guid, &( table_values_array_data[ 16 * values_array_number ] ), 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); goto on_error; } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "%s: table set: %03d entry: %03d record entry value guid\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", function, 0, record_entry_index, guid_string ); libcnotify_printf( "%s: table set: %03d entry: %03d record entry value identifier\t: 0x%04" PRIx16 "\n", function, 0, record_entry_index, values_array_number ); libcnotify_printf( "\n" ); } #endif record_entries_data += sizeof( pff_table_record_entry_6c_t ); record_entry_index++; } } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif return( -1 ); } /* Reads the 7c table column definitions * Returns 1 if successful or -1 on error */ int libpff_table_read_7c_column_definitions( libpff_array_t *column_definitions_array, libfdata_reference_t *column_definitions_data_reference, int number_of_column_definitions, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, libcerror_error_t **error ) { libpff_list_element_t *list_element = NULL; libpff_column_definition_t *column_definition = NULL; uint8_t *column_definitions_data = NULL; static char *function = "libpff_table_read_7c_column_definitions"; size_t column_definitions_data_size = 0; uint8_t column_definition_number = 0; int list_iterator = 0; int column_definition_index = 0; if( column_definitions_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column definitions array.", function ); return( -1 ); } if( number_of_column_definitions == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no column definitions.\n", function ); } #endif return( 1 ); } if( libpff_array_resize( column_definitions_array, number_of_column_definitions, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_column_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize column definition array.", function ); goto on_error; } for( column_definition_index = 0; column_definition_index < number_of_column_definitions; column_definition_index++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( column_definitions_data_reference, file_io_handle, NULL, (off64_t) ( column_definition_index * sizeof( pff_table_column_definition_7c_t ) ), &column_definitions_data, &column_definitions_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column definitions data at offset: %" PRIzd ".", function, (size_t) column_definition_index * sizeof( pff_table_column_definition_7c_t ) ); goto on_error; } if( column_definitions_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column definitions data.", function ); goto on_error; } if( column_definitions_data_size < sizeof( pff_table_column_definition_7c_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid column definitions data size value out of bounds.", function ); goto on_error; } if( libpff_column_definition_initialize( &column_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column definition.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_7c_t *) column_definitions_data )->record_entry_type, column_definition->entry_type ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_7c_t *) column_definitions_data )->record_entry_value_type, column_definition->value_type ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_7c_t *) column_definitions_data )->values_array_offset, column_definition->values_array_offset ); column_definition->values_array_size = ( (pff_table_column_definition_7c_t *) column_definitions_data )->values_array_size; column_definition_number = ( (pff_table_column_definition_7c_t *) column_definitions_data )->values_array_number; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: column definition: %03d record entry type\t: 0x%04" PRIx16 "", function, column_definition_index, column_definition->entry_type ); } #endif if( ( column_definition->entry_type >= 0x8000 ) || ( column_definition->entry_type <= 0xfffe ) ) { if( name_to_id_map_list != NULL ) { list_element = name_to_id_map_list->first_element; for( list_iterator = 0; list_iterator < name_to_id_map_list->number_of_elements; list_iterator++ ) { if( list_element == NULL ) { break; } if( list_element->value == NULL ) { continue; } if( ( (libpff_internal_name_to_id_map_entry_t *) list_element->value )->identifier == (uint32_t) column_definition->entry_type ) { column_definition->name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) list_element->value; } list_element = list_element->next_element; } } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( column_definition->name_to_id_map_entry != NULL ) { if( column_definition->name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcnotify_printf( " maps to: %s (%s : %s)\n", (char *) column_definition->name_to_id_map_entry->debug_string, libfmapi_named_property_type_get_identifier( column_definition->name_to_id_map_entry->guid, (char *) column_definition->name_to_id_map_entry->debug_string, column_definition->name_to_id_map_entry->value_size, column_definition->value_type ), libfmapi_named_property_type_get_description( column_definition->name_to_id_map_entry->guid, (char *) column_definition->name_to_id_map_entry->debug_string, column_definition->name_to_id_map_entry->value_size, column_definition->value_type ) ); } else { libcnotify_printf( " maps to: 0x%04" PRIx32 " (%s : %s)\n", column_definition->name_to_id_map_entry->numeric_value, libfmapi_property_type_get_identifier( column_definition->name_to_id_map_entry->guid, column_definition->name_to_id_map_entry->numeric_value, column_definition->value_type ), libfmapi_property_type_get_description( column_definition->name_to_id_map_entry->guid, column_definition->name_to_id_map_entry->numeric_value, column_definition->value_type ) ); } } else { libcnotify_printf( " (%s : %s)\n", libfmapi_property_type_get_identifier( NULL, column_definition->entry_type, column_definition->value_type ), libfmapi_property_type_get_description( NULL, column_definition->entry_type, column_definition->value_type ) ); } libcnotify_printf( "%s: column definition: %03d record entry value type\t: 0x%04" PRIx16 " (%s : %s)\n", function, column_definition_index, column_definition->value_type, libfmapi_value_type_get_identifier( column_definition->value_type ), libfmapi_value_type_get_description( column_definition->value_type ) ); libcnotify_printf( "%s: column definition: %03d values array offset\t: %" PRIu16 "\n", function, column_definition_index, column_definition->values_array_offset ); libcnotify_printf( "%s: column definition: %03d values array size\t: %" PRIu16 "\n", function, column_definition_index, column_definition->values_array_size ); libcnotify_printf( "%s: column definition: %03d values array number\t: %" PRIu8 "\n", function, column_definition_index, column_definition_number ); libcnotify_printf( "\n" ); } #endif if( libpff_array_set_entry_by_index( column_definitions_array, (int) column_definition_number, (intptr_t *) column_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set column definitions: %" PRIu8 " in array.", function, column_definition_number ); goto on_error; } column_definition = NULL; } return( 1 ); on_error: if( column_definition != NULL ) { libpff_column_definition_free( &column_definition, NULL ); } return( -1 ); } /* Reads the 8c table record entries and their values * Returns 1 if successful or -1 on error */ int libpff_table_read_8c_record_entries( libpff_table_t *table, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfdata_reference_t *record_entries_data_reference = NULL; libpff_record_entry_t *record_entry = NULL; uint8_t *record_entries_data = NULL; static char *function = "libpff_table_read_8c_record_entries"; size64_t record_entries_data_reference_size = 0; size_t number_of_record_entries = 0; size_t record_entries_data_size = 0; uint32_t record_entry_iterator = 0; int number_of_record_entries_data_references = 0; int record_entries_data_references_index = 0; int record_entry_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0; #endif if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - entries already set.", function ); return( -1 ); } if( libpff_array_get_number_of_entries( table->record_entries_data_references, &number_of_record_entries_data_references, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of record entries data references.", function ); return( -1 ); } for( record_entries_data_references_index = 0; record_entries_data_references_index < number_of_record_entries_data_references; record_entries_data_references_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entries data reference: %d\n", function, record_entries_data_references_index ); } #endif if( libpff_array_get_entry_by_index( table->record_entries_data_references, record_entries_data_references_index, (intptr_t **) &record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference: %d.", function, record_entries_data_reference ); return( -1 ); } if( libfdata_reference_get_size( record_entries_data_reference, &record_entries_data_reference_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference size.", function ); return( -1 ); } if( record_entries_data_reference_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record entries data reference size value exceeds maximum.", function ); return( -1 ); } if( ( record_entries_data_reference_size % sizeof( pff_table_record_entry_8c_t ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries data reference size.", function ); return( -1 ); } number_of_record_entries = (size_t) ( record_entries_data_reference_size / sizeof( pff_table_record_entry_8c_t ) ); if( number_of_record_entries > (size_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: number of record entries value exceeds maximum.", function ); return( -1 ); } if( libpff_record_entries_resize( table, 1, table->number_of_entries + (int) number_of_record_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); return( -1 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing record entries.", function ); return( -1 ); } record_entry = table->entry[ 0 ]; if( record_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry.", function ); return( -1 ); } for( record_entry_iterator = 0; record_entry_iterator < number_of_record_entries; record_entry_iterator++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( record_entries_data_reference, file_io_handle, NULL, (off64_t) ( record_entry_iterator * sizeof( pff_table_record_entry_8c_t ) ), &record_entries_data, &record_entries_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data at offset: %" PRIzd ".", function, (size_t) record_entry_iterator * sizeof( pff_table_record_entry_8c_t ) ); return( -1 ); } if( record_entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entries data.", function ); return( -1 ); } if( record_entries_data_size < sizeof( pff_table_record_entry_8c_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record entries data size value out of bounds.", function ); return( -1 ); } ( record_entry[ record_entry_index ] ).identifier.format = LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_SECURE4; byte_stream_copy_to_uint64_little_endian( ( (pff_table_record_entry_8c_t *) record_entries_data )->identifier, ( record_entry[ record_entry_index ] ).identifier.secure4 ); /* Create a buffer data reference of the record entry value data */ if( libfdata_buffer_reference_initialize( &( ( record_entry[ record_entry_index ] ).value_data_reference ), ( (pff_table_record_entry_8c_t *) record_entries_data )->descriptor_identifier, sizeof( uint32_t ), LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entry value data reference.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03d entry: %03d identifier\t\t\t: 0x%" PRIx64 "\n", function, 0, record_entry_index, ( record_entry[ record_entry_index ] ).identifier.secure4 ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_record_entry_8c_t *) record_entries_data )->descriptor_identifier, value_32bit ); libcnotify_printf( "%s: table set: %03d entry: %03d descriptor identifier\t: 0x%08" PRIx32 "\n", function, 0, record_entry_index, value_32bit ); libcnotify_printf( "\n" ); } #endif record_entries_data += sizeof( pff_table_record_entry_8c_t ); record_entry_index++; } } return( 1 ); } /* Reads the 9c table record entries and their values * Returns 1 if successful or -1 on error */ int libpff_table_read_9c_record_entries( libpff_table_t *table, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfdata_reference_t *record_entries_data_reference = NULL; libpff_record_entry_t *record_entry = NULL; uint8_t *record_entries_data = NULL; static char *function = "libpff_table_read_9c_record_entries"; size64_t record_entries_data_reference_size = 0; size_t number_of_record_entries = 0; size_t record_entries_data_size = 0; uint32_t record_entry_iterator = 0; int number_of_record_entries_data_references = 0; int record_entries_data_references_index = 0; int record_entry_index = 0; #if defined( HAVE_DEBUG_OUTPUT ) libcstring_system_character_t guid_string[ 48 ]; libfguid_identifier_t *guid = NULL; uint32_t value_32bit = 0; int result = 0; #endif if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - entries already set.", function ); return( -1 ); } if( libpff_array_get_number_of_entries( table->record_entries_data_references, &number_of_record_entries_data_references, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of record entries data references.", function ); goto on_error; } for( record_entries_data_references_index = 0; record_entries_data_references_index < number_of_record_entries_data_references; record_entries_data_references_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entries data reference: %d\n", function, record_entries_data_references_index ); } #endif if( libpff_array_get_entry_by_index( table->record_entries_data_references, record_entries_data_references_index, (intptr_t **) &record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference: %d.", function, record_entries_data_references_index ); goto on_error; } if( libfdata_reference_get_size( record_entries_data_reference, &record_entries_data_reference_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data size: %d.", function, record_entries_data_references_index ); goto on_error; } if( record_entries_data_reference_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record entries data reference size value exceeds maximum.", function ); goto on_error; } if( ( record_entries_data_reference_size % sizeof( pff_table_record_entry_9c_t ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries data reference size.", function ); goto on_error; } number_of_record_entries = (size_t) record_entries_data_reference_size / sizeof( pff_table_record_entry_9c_t ); if( number_of_record_entries > (size_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: number of record entries value exceeds maximum.", function ); goto on_error; } if( libpff_record_entries_resize( table, 1, table->number_of_entries + (int) number_of_record_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); goto on_error; } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing record entries.", function ); goto on_error; } record_entry = table->entry[ 0 ]; if( record_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry.", function ); goto on_error; } for( record_entry_iterator = 0; record_entry_iterator < number_of_record_entries; record_entry_iterator++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( record_entries_data_reference, file_io_handle, NULL, (off64_t) ( record_entry_iterator * sizeof( pff_table_record_entry_9c_t ) ), &record_entries_data, &record_entries_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data at offset: %" PRIzd ".", function, (size_t) record_entry_iterator * sizeof( pff_table_record_entry_9c_t ) ); goto on_error; } if( record_entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entries data.", function ); goto on_error; } if( record_entries_data_size < sizeof( pff_table_record_entry_9c_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record entries data size value out of bounds.", function ); goto on_error; } ( record_entry[ record_entry_index ] ).identifier.format = LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_GUID; if( memory_copy( ( record_entry[ record_entry_index ] ).identifier.guid, ( (pff_table_record_entry_9c_t *) record_entries_data )->record_entry_guid, 16 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy record entry identifier GUID.", function ); goto on_error; } /* Create a buffer data reference of the record entry value data */ if( libfdata_buffer_reference_initialize( &( ( record_entry[ record_entry_index ] ).value_data_reference ), ( (pff_table_record_entry_9c_t *) record_entries_data )->descriptor_identifier, sizeof( uint32_t ), LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entry value data reference.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); goto on_error; } if( libfguid_identifier_copy_from_byte_stream( guid, ( record_entry[ record_entry_index ] ).identifier.guid, 16, LIBFGUID_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); goto on_error; } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } libcnotify_printf( "%s: table set: %03d entry: %03d record entry guid\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n", function, 0, record_entry_index, guid_string ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_record_entry_9c_t *) record_entries_data )->descriptor_identifier, value_32bit ); libcnotify_printf( "%s: table set: %03d entry: %03d record entry descriptor identifier\t: 0x%08" PRIx32 "\n", function, 0, record_entry_index, value_32bit ); libcnotify_printf( "\n" ); } #endif record_entries_data += sizeof( pff_table_record_entry_9c_t ); record_entry_index++; } } return( 1 ); on_error: #if defined( HAVE_DEBUG_OUTPUT ) if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } #endif return( -1 ); } /* Reads the a5 table record entry values * Returns 1 if successful or -1 on error */ int libpff_table_read_a5_record_entries( libpff_table_t *table, uint32_t record_entries_reference, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libpff_record_entry_t *record_entry = NULL; libpff_table_index_value_t *table_index_value = NULL; libpff_table_index_values_t *table_index_values = NULL; uint8_t *table_data = NULL; static char *function = "libpff_table_read_a5_record_entries"; size_t table_data_size = 0; uint16_t table_index_values_iterator = 0; int number_of_table_index_array_entries = 0; int table_index_array_entries_iterator = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - entries already set.", function ); return( -1 ); } /* Check if the table contains any entries */ if( record_entries_reference == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no entries.\n", function ); } #endif return( 1 ); } if( ( record_entries_reference & 0x0000001fUL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries reference: 0x%08" PRIx32 " (0x%08" PRIx32 ").", function, record_entries_reference & 0x0000001fUL, record_entries_reference ); return( -1 ); } if( libpff_array_get_number_of_entries( table->index, &number_of_table_index_array_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of table index array entries.", function ); return( -1 ); } for( table_index_array_entries_iterator = 0; table_index_array_entries_iterator < number_of_table_index_array_entries; table_index_array_entries_iterator++ ) { if( libpff_array_get_entry_by_index( table->index, table_index_array_entries_iterator, (intptr_t **) &table_index_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table index array entry: %" PRIu16 ".", function, table_index_array_entries_iterator ); return( -1 ); } if( table_index_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index values.", function ); return( -1 ); } if( table_index_values->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table index values - missing value.", function ); return( -1 ); } if( ( number_of_table_index_array_entries > table->number_of_sets ) || ( table_index_values->number_of_values > table->number_of_entries ) ) { if( libpff_record_entries_resize( table, number_of_table_index_array_entries, (int) table_index_values->number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); return( -1 ); } } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing record entries.", function ); return( -1 ); } record_entry = table->entry[ table_index_array_entries_iterator ]; if( record_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry.", function ); return( -1 ); } for( table_index_values_iterator = 0; table_index_values_iterator < table_index_values->number_of_values; table_index_values_iterator++ ) { table_index_value = &( table_index_values->value[ table_index_values_iterator ] ); if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03d value at offset: %" PRIu32 " with size: %" PRIu16 ".\n", function, table_index_array_entries_iterator, table_index_values_iterator, table_index_value->offset, table_index_value->size ); } #endif /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); return( -1 ); } /* Create a buffer data reference of the record entry value data */ if( libfdata_buffer_reference_initialize( &( ( record_entry[ table_index_values_iterator ] ).value_data_reference ), &( table_data[ table_index_value->offset ] ), table_index_value->size, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entry value data reference.", function ); return( -1 ); } } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); } #endif return( 1 ); } /* Reads the ac table column definitions * Returns 1 if successful or -1 on error */ int libpff_table_read_ac_column_definitions( libpff_table_t *table, libpff_array_t *column_definitions_array, uint32_t column_definitions_reference, int number_of_column_definitions, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, libcerror_error_t **error ) { libfcache_cache_t *column_definitions_data_cache = NULL; libfdata_reference_t *column_definitions_data_reference = NULL; libpff_column_definition_t *column_definition = NULL; libpff_list_element_t *list_element = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *column_definition_data = NULL; uint8_t *column_definitions_data = NULL; static char *function = "libpff_table_read_ac_column_definitions"; size_t column_definition_data_size = 0; size_t column_definitions_data_size = 0; uint32_t record_entry_values_table_descriptor = 0; uint16_t column_definition_number = 0; int list_iterator = 0; int result = 0; int column_definition_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( column_definitions_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column definitions array.", function ); return( -1 ); } if( number_of_column_definitions == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no column definitions.\n", function ); } #endif return( 1 ); } /* Read the column definitions */ result = libpff_local_descriptors_tree_get_value_by_identifier( table->local_descriptors_tree, file_io_handle, table->local_descriptors_cache, column_definitions_reference, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor identifier: %" PRIu32 " from local descriptors.", function, column_definitions_reference ); goto on_error; } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column definitions descriptor: 0x%08" PRIx32 " (%" PRIu32 ").", function, column_definitions_reference, column_definitions_reference ); goto on_error; } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_read_descriptor_data_reference( io_handle, file_io_handle, column_definitions_reference, local_descriptor_value->data_identifier, table->recovered, 0, &column_definitions_data_reference, &column_definitions_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor: %" PRIu32 " data: %" PRIu64 ".", function, column_definitions_reference, local_descriptor_value->data_identifier ); goto on_error; } /* Retrieve the corresponding column definitions data reference segment */ if( libfdata_reference_get_segment_data( column_definitions_data_reference, file_io_handle, column_definitions_data_cache, 0, &column_definitions_data, &column_definitions_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column definitions data reference segment: 0.", function ); goto on_error; } if( column_definitions_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: ac column definitions:\n", function ); libcnotify_print_data( column_definitions_data, column_definitions_data_size, 0 ); } #endif if( ( (size_t) number_of_column_definitions * sizeof( pff_table_column_definition_ac_t ) ) != column_definitions_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in number of column definitions and the data size.", function ); goto on_error; } if( libpff_array_resize( column_definitions_array, number_of_column_definitions, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_column_definition_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize column definition array.", function ); goto on_error; } for( column_definition_index = 0; column_definition_index < number_of_column_definitions; column_definition_index++ ) { if( libpff_column_definition_initialize( &column_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create column definition.", function ); goto on_error; } if( libfdata_reference_get_segment_data_at_offset( column_definitions_data_reference, file_io_handle, column_definitions_data_cache, (off64_t) ( column_definition_index * sizeof( pff_table_column_definition_ac_t ) ), &column_definition_data, &column_definition_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column definitions data at offset: %" PRIzd ".", function, (size_t) column_definition_index * sizeof( pff_table_column_definition_ac_t ) ); goto on_error; } if( column_definition_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column definitions data.", function ); goto on_error; } if( column_definition_data_size < sizeof( pff_table_column_definition_ac_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid column definitions data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_ac_t *) column_definition_data )->record_entry_type, column_definition->entry_type ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_ac_t *) column_definition_data )->record_entry_value_type, column_definition->value_type ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_ac_t *) column_definition_data )->values_array_offset, column_definition->values_array_offset ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_ac_t *) column_definition_data )->values_array_size, column_definition->values_array_size ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_column_definition_ac_t *) column_definition_data )->values_array_number, column_definition_number ); byte_stream_copy_to_uint32_little_endian( ( (pff_table_column_definition_ac_t *) column_definition_data )->record_entry_values_table_descriptor, record_entry_values_table_descriptor ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: column definition: %03d record entry type\t\t\t: 0x%04" PRIx16 "", function, column_definition_index, column_definition->entry_type ); } #endif if( ( column_definition->entry_type >= 0x8000 ) || ( column_definition->entry_type <= 0xfffe ) ) { if( name_to_id_map_list != NULL ) { list_element = name_to_id_map_list->first_element; for( list_iterator = 0; list_iterator < name_to_id_map_list->number_of_elements; list_iterator++ ) { if( list_element == NULL ) { break; } if( list_element->value == NULL ) { continue; } if( ( (libpff_internal_name_to_id_map_entry_t *) list_element->value )->identifier == (uint32_t) column_definition->entry_type ) { column_definition->name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) list_element->value; } list_element = list_element->next_element; } } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( column_definition->name_to_id_map_entry != NULL ) { if( column_definition->name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcnotify_printf( " maps to: %s (%s : %s)\n", (char *) column_definition->name_to_id_map_entry->debug_string, libfmapi_named_property_type_get_identifier( column_definition->name_to_id_map_entry->guid, (char *) column_definition->name_to_id_map_entry->debug_string, column_definition->name_to_id_map_entry->value_size, column_definition->value_type ), libfmapi_named_property_type_get_description( column_definition->name_to_id_map_entry->guid, (char *) column_definition->name_to_id_map_entry->debug_string, column_definition->name_to_id_map_entry->value_size, column_definition->value_type ) ); } else { libcnotify_printf( " maps to: 0x%04" PRIx32 " (%s : %s)\n", column_definition->name_to_id_map_entry->numeric_value, libfmapi_property_type_get_identifier( column_definition->name_to_id_map_entry->guid, column_definition->name_to_id_map_entry->numeric_value, column_definition->value_type ), libfmapi_property_type_get_description( column_definition->name_to_id_map_entry->guid, column_definition->name_to_id_map_entry->numeric_value, column_definition->value_type ) ); } } else { libcnotify_printf( " (%s : %s)\n", libfmapi_property_type_get_identifier( NULL, column_definition->entry_type, column_definition->value_type ), libfmapi_property_type_get_description( NULL, column_definition->entry_type, column_definition->value_type ) ); } libcnotify_printf( "%s: column definition: %03d record entry value type\t\t: 0x%04" PRIx16 " (%s : %s)\n", function, column_definition_index, column_definition->value_type, libfmapi_value_type_get_identifier( column_definition->value_type ), libfmapi_value_type_get_description( column_definition->value_type ) ); libcnotify_printf( "%s: column definition: %03d values array offset\t\t: %" PRIu16 "\n", function, column_definition_index, column_definition->values_array_offset ); libcnotify_printf( "%s: column definition: %03d values array size\t\t: %" PRIu16 "\n", function, column_definition_index, column_definition->values_array_size ); libcnotify_printf( "%s: column definition: %03d values array number\t\t: %" PRIu16 "\n", function, column_definition_index, column_definition_number ); libcnotify_printf( "%s: padding1:\n", function ); libcnotify_print_data( ( (pff_table_column_definition_ac_t *) column_definition_data )->padding1, 2, 0 ); libcnotify_printf( "%s: column definition: %03d record entry values table descriptor\t: %" PRIu32 "\n", function, column_definition_index, record_entry_values_table_descriptor ); libcnotify_printf( "\n" ); } #endif /* Read the record entry values table if necessary */ if( record_entry_values_table_descriptor > 0 ) { result = libpff_local_descriptors_tree_get_value_by_identifier( table->local_descriptors_tree, file_io_handle, table->local_descriptors_cache, record_entry_values_table_descriptor, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor identifier: %" PRIu32 " from local descriptors.", function, record_entry_values_table_descriptor ); goto on_error; } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptor identifier: %" PRIu32 ".", function, record_entry_values_table_descriptor ); goto on_error; } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif if( local_descriptor_value->data_identifier == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor identifier: %" PRIu32 " - missing data identifier.", function, record_entry_values_table_descriptor ); goto on_error; } if( libpff_table_initialize( &( column_definition->record_entry_values_table ), record_entry_values_table_descriptor, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier, table->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entry values table.", function ); goto on_error; } if( libpff_table_read( column_definition->record_entry_values_table, io_handle, file_io_handle, name_to_id_map_list, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entry values table.", function ); goto on_error; } } if( libpff_array_set_entry_by_index( column_definitions_array, (int) column_definition_number, (intptr_t *) column_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set column definition: %" PRIu16 " in array.", function, column_definition_number ); goto on_error; } column_definition = NULL; } if( libfcache_cache_free( &column_definitions_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column definitions data cache.", function ); goto on_error; } if( libfdata_reference_free( &column_definitions_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free column definitions data reference.", function ); goto on_error; } return( 1 ); on_error: if( column_definition != NULL ) { libpff_column_definition_free( &column_definition, NULL ); } if( column_definitions_data_cache != NULL ) { libfcache_cache_free( &column_definitions_data_cache, NULL ); } if( column_definitions_data_reference != NULL ) { libfdata_reference_free( &column_definitions_data_reference, NULL ); } return( -1 ); } /* Reads the bc table record entries and their values * Returns 1 if successful or -1 on error */ int libpff_table_read_bc_record_entries( libpff_table_t *table, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, int debug_item_type, libcerror_error_t **error ) { libfdata_reference_t *record_entries_data_reference = NULL; uint8_t *record_entries_data = NULL; static char *function = "libpff_table_read_bc_record_entries"; size64_t record_entries_data_reference_size = 0; size_t number_of_record_entries = 0; size_t record_entries_data_size = 0; uint32_t record_entry_iterator = 0; uint16_t record_entry_type = 0; uint16_t record_entry_value_type = 0; int number_of_record_entries_data_references = 0; int record_entries_data_references_index = 0; int record_entry_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table - entries already set.", function ); return( -1 ); } if( libpff_array_get_number_of_entries( table->record_entries_data_references, &number_of_record_entries_data_references, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of record entries data references.", function ); return( -1 ); } for( record_entries_data_references_index = 0; record_entries_data_references_index < number_of_record_entries_data_references; record_entries_data_references_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entries data reference: %d\n", function, record_entries_data_references_index ); } #endif if( libpff_array_get_entry_by_index( table->record_entries_data_references, record_entries_data_references_index, (intptr_t **) &record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference: %d.", function, record_entries_data_reference ); return( -1 ); } if( libfdata_reference_get_size( record_entries_data_reference, &record_entries_data_reference_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference size.", function ); return( -1 ); } if( record_entries_data_reference_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record entries data reference size value exceeds maximum.", function ); return( -1 ); } if( ( record_entries_data_reference_size % sizeof( pff_table_record_entry_bc_t ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries data reference size.", function ); return( -1 ); } number_of_record_entries = (size_t) record_entries_data_reference_size / sizeof( pff_table_record_entry_bc_t ); if( number_of_record_entries > (size_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: number of record entries value exceeds maximum.", function ); return( -1 ); } if( libpff_record_entries_resize( table, 1, table->number_of_entries + (int) number_of_record_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); return( -1 ); } for( record_entry_iterator = 0; record_entry_iterator < number_of_record_entries; record_entry_iterator++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( record_entries_data_reference, file_io_handle, NULL, (off64_t) ( record_entry_iterator * sizeof( pff_table_record_entry_bc_t ) ), &record_entries_data, &record_entries_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data at offset: %" PRIzd ".", function, (size_t) record_entry_iterator * sizeof( pff_table_record_entry_bc_t ) ); return( -1 ); } if( record_entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entries data.", function ); return( -1 ); } if( record_entries_data_size < sizeof( pff_table_record_entry_bc_t ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record entries data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( ( (pff_table_record_entry_bc_t *) record_entries_data )->record_entry_type, record_entry_type ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_record_entry_bc_t *) record_entries_data )->record_entry_value_type, record_entry_value_type ); if( libpff_table_read_entry_value( table, 0, record_entry_index, (uint32_t) record_entry_type, (uint32_t) record_entry_value_type, (uint8_t *) ( (pff_table_record_entry_bc_t *) record_entries_data )->record_entry_value, 4, io_handle, file_io_handle, name_to_id_map_list, NULL, NULL, debug_item_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read entry value: %" PRIu32 ".", function, record_entry_index ); return( -1 ); } record_entry_index++; } } return( 1 ); } /* Reads the table values array * Returns 1 if successful or -1 on error */ int libpff_table_read_values_array( libpff_table_t *table, uint32_t record_entries_reference, uint32_t values_array_reference, uint8_t record_entry_identifier_size, uint8_t record_entry_value_size, uint16_t values_array_size, libpff_array_t *column_definitions_array, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcerror_error_t **error ) { libfcache_cache_t *table_values_data_cache = NULL; libfdata_reference_t *record_entries_data_reference = NULL; libfdata_reference_t *table_values_data_reference = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; libpff_column_definition_t *column_definition = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *record_entries_data = NULL; uint8_t *record_entry_values_data = NULL; uint8_t *table_values_data = NULL; static char *function = "libpff_table_read_values_array"; size64_t record_entries_data_reference_size = 0; size_t number_of_record_entries = 0; size_t number_of_values_array_entries = 0; size_t table_data_size = 0; size_t record_entries_data_size = 0; size_t record_entry_size = 0; size_t record_entry_values_data_size = 0; size_t table_values_data_size = 0; uint32_t record_entry_iterator = 0; uint32_t record_entry_values_array_identifier = 0; uint32_t record_entry_values_array_number = 0; uint32_t table_values_array_identifier = 0; int column_definition_index = 0; int number_of_record_entries_data_references = 0; int result = 0; int record_entries_data_references_index = 0; int record_entry_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( ( record_entry_identifier_size != 4 ) || ( ( record_entry_value_size != 2 ) && ( record_entry_value_size != 4 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry identifier size: 0x%02" PRIx8 " and record entry value size: 0x%02" PRIx8 ".", function, record_entry_identifier_size, record_entry_value_size ); return( -1 ); } if( values_array_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid values array size value zero or less.", function ); return( -1 ); } if( column_definitions_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid column definitions array.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } /* Check if the table contains any entries */ if( ( record_entries_reference == 0 ) && ( values_array_reference == 0 ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table contains no entries.\n", function ); } #endif return( 1 ); } if( record_entries_reference == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table contains value array but no record entries.", function ); goto on_error; } if( values_array_reference == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table contains record entries but no value array.", function ); goto on_error; } record_entry_size = record_entry_identifier_size + record_entry_value_size; /* Determine the values array entries */ /* TODO check node type ! */ if( ( values_array_reference & 0x0000001fUL ) != 0 ) { result = libpff_local_descriptors_tree_get_value_by_identifier( table->local_descriptors_tree, file_io_handle, table->local_descriptors_cache, values_array_reference, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor identifier: %" PRIu32 " from local descriptors.", function, values_array_reference ); goto on_error; } else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing values array descriptor: 0x%08" PRIx32 " (%" PRIu32 ").", function, values_array_reference, values_array_reference ); goto on_error; } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_read_descriptor_data_reference( io_handle, file_io_handle, values_array_reference, local_descriptor_value->data_identifier, table->recovered, 0, &table_values_data_reference, &table_values_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read descriptor: %" PRIu32 " data: %" PRIu64 ".", function, values_array_reference, local_descriptor_value->data_identifier ); goto on_error; } } else { if( libpff_table_get_index_value_by_reference( table, values_array_reference, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve values array entries reference.", function ); goto on_error; } if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); goto on_error; } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table values array data reference segment: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); goto on_error; } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); goto on_error; } /* Embed the data in a buffer data reference */ if( libfdata_buffer_reference_initialize( &table_values_data_reference, &( table_data[ table_index_value->offset ] ), table_index_value->size, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data reference.", function ); goto on_error; } } if( libfdata_reference_get_segment_data( table_values_data_reference, file_io_handle, table_values_data_cache, 0, &table_values_data, &table_values_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table values data reference segment: 0.", function ); goto on_error; } if( table_values_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table values data.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( ( values_array_reference & 0x0000001fUL ) != 0 ) { libcnotify_printf( "%s: table values data:\n", function ); libcnotify_print_data( table_values_data, table_values_data_size, 0 ); } } #endif number_of_values_array_entries = table_values_data_size / values_array_size; if( libpff_array_get_number_of_entries( table->record_entries_data_references, &number_of_record_entries_data_references, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of record entries data references.", function ); goto on_error; } for( record_entries_data_references_index = 0; record_entries_data_references_index < number_of_record_entries_data_references; record_entries_data_references_index++ ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entries data reference\t\t\t: %d\n", function, record_entries_data_references_index ); } #endif if( libpff_array_get_entry_by_index( table->record_entries_data_references, record_entries_data_references_index, (intptr_t **) &record_entries_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference: %d.", function, record_entries_data_references_index ); goto on_error; } if( libfdata_reference_get_size( record_entries_data_reference, &record_entries_data_reference_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data reference size.", function ); goto on_error; } if( record_entries_data_reference_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid record entries data reference size value exceeds maximum.", function ); goto on_error; } if( ( record_entries_data_reference_size % record_entry_size ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entries data reference size.", function ); goto on_error; } number_of_record_entries = (size_t) ( record_entries_data_reference_size / record_entry_size ); if( number_of_record_entries > (size_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: number of record entries value exceeds maximum.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of record entries\t\t\t: %" PRIzd "\n", function, number_of_record_entries ); } #endif if( table->number_of_sets < ( record_entry_index + (int) number_of_record_entries ) ) { /* TODO column_definitions_array->number_of_entries replace by function */ if( libpff_record_entries_resize( table, record_entry_index + (int) number_of_record_entries, column_definitions_array->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); goto on_error; } } for( record_entry_iterator = 0; record_entry_iterator < number_of_record_entries; record_entry_iterator++ ) { /* The buffer data reference does not require a cache */ if( libfdata_reference_get_segment_data_at_offset( record_entries_data_reference, file_io_handle, NULL, (off64_t) ( record_entry_iterator * record_entry_size ), &record_entries_data, &record_entries_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entries data at offset: %" PRIzd ".", function, (size_t) record_entry_iterator * record_entry_size ); goto on_error; } if( record_entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entries data.", function ); goto on_error; } if( record_entries_data_size < record_entry_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid record entries data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( record_entries_data, record_entry_values_array_identifier ); record_entries_data += 4; if( record_entry_value_size == 2 ) { byte_stream_copy_to_uint16_little_endian( record_entries_data, record_entry_values_array_number ); record_entries_data += 2; } else if( record_entry_value_size == 4 ) { byte_stream_copy_to_uint32_little_endian( record_entries_data, record_entry_values_array_number ); record_entries_data += 4; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: record entry: %03" PRIu32 " values array identifier\t: 0x%08" PRIx32 "\n", function, record_entry_iterator, record_entry_values_array_identifier ); libcnotify_printf( "%s: record entry: %03" PRIu32 " values array number\t\t: %" PRIu32 "\n", function, record_entry_iterator, record_entry_values_array_number ); libcnotify_printf( "\n" ); } #endif /* If the value array numbers are not stored sequential * resize the record entries to the required size */ if( (uint32_t) table->number_of_sets < record_entry_values_array_number ) { /* TODO column_definitions_array->number_of_entries replace by function */ if( libpff_record_entries_resize( table, (int) record_entry_values_array_number, column_definitions_array->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize record entries.", function ); goto on_error; } } if( libfdata_reference_get_segment_data_at_value_index( table_values_data_reference, file_io_handle, table_values_data_cache, (int) record_entry_values_array_number, (size_t) values_array_size, &record_entry_values_data, &record_entry_values_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entry values data for index: %" PRIu32 ".", function, record_entry_values_array_number ); goto on_error; } if( record_entry_values_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry values data.", function ); goto on_error; } if( record_entry_values_data_size < (size_t) values_array_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table values data size value out of bounds.", function ); goto on_error; } /* TODO column_definitions_array->number_of_entries replace by function */ for( column_definition_index = 0; column_definition_index < column_definitions_array->number_of_entries; column_definition_index++ ) { if( libpff_array_get_entry_by_index( column_definitions_array, column_definition_index, (intptr_t **) &column_definition, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve column definitions array entry: %d.", function, column_definition_index ); goto on_error; } if( column_definition == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing column definition: %d.", function, column_definition_index ); goto on_error; } /* For some unknown reason when the values array is read * the data array is padded with zero or remnant values * therefore the values array entries do not align * this check is makes sure the aligment is correct */ if( column_definition_index == 0 ) { if( column_definition->values_array_offset != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported first column definition values array offset.", function ); goto on_error; } if( column_definition->values_array_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported first column definition values array size.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( record_entry_values_data, table_values_array_identifier ); /* If decryption was forced reread the entry without decryption */ if( ( io_handle->force_decryption != 0 ) && ( record_entry_values_array_identifier != table_values_array_identifier ) ) { if( libfdata_reference_get_segment_data_at_value_index( table_values_data_reference, file_io_handle, table_values_data_cache, (int) record_entry_values_array_number, (size_t) values_array_size, &record_entry_values_data, &record_entry_values_data_size, LIBFDATA_READ_FLAG_IGNORE_CACHE | LIBPFF_READ_FLAG_IGNORE_FORCE_DECRYPTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entry values data for index: %" PRIu32 ".", function, record_entry_values_array_number ); goto on_error; } if( record_entry_values_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry values data.", function ); goto on_error; } if( record_entry_values_data_size < (size_t) values_array_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table values data size value out of bounds.", function ); goto on_error; } byte_stream_copy_to_uint32_little_endian( record_entry_values_data, table_values_array_identifier ); } if( record_entry_values_array_identifier != table_values_array_identifier ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in values array identifier (%" PRIu32 " != %" PRIu32 ").", function, record_entry_values_array_identifier, table_values_array_identifier ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: values array data:\n", function ); libcnotify_print_data( record_entry_values_data, values_array_size, 0 ); } #endif } if( column_definition->values_array_offset > values_array_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid column definition values array offset value exceeds values array size.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: values array data at offset: %" PRIu16 " of size: %" PRIu16 "\n", function, column_definition->values_array_offset, column_definition->values_array_size ); libcnotify_print_data( &( record_entry_values_data[ column_definition->values_array_offset ] ), (size_t) column_definition->values_array_size, 0 ); } #endif /* To prevent multiple lookups the name to id map is not passed */ if( libpff_table_read_entry_value( table, record_entry_index, column_definition_index, column_definition->entry_type, column_definition->value_type, &( record_entry_values_data[ column_definition->values_array_offset ] ), (size_t) column_definition->values_array_size, io_handle, file_io_handle, NULL, column_definition->name_to_id_map_entry, column_definition->record_entry_values_table, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read entry value: %" PRIu32 ".", function, record_entry_values_array_number ); goto on_error; } } record_entry_index++; } } if( table_values_data_cache != NULL ) { if( libfcache_cache_free( &table_values_data_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table values data cache.", function ); goto on_error; } } if( libfdata_reference_free( &table_values_data_reference, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table values data reference.", function ); goto on_error; } return( 1 ); on_error: if( table_values_data_cache != NULL ) { libfcache_cache_free( &table_values_data_cache, NULL ); } if( table_values_data_reference != NULL ) { libfdata_reference_free( &table_values_data_reference, NULL ); } return( -1 ); } /* Reads a table record entry value * Returns 1 if successful or -1 on error */ int libpff_table_read_entry_value( libpff_table_t *table, int set_index, int entry_index, uint32_t record_entry_type, uint32_t record_entry_value_type, uint8_t *record_entry_value, size_t record_entry_value_size, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_list_t *name_to_id_map_list, libpff_internal_name_to_id_map_entry_t *name_to_id_map_entry, libpff_table_t *record_entry_values_table, int debug_item_type, libcerror_error_t **error ) { libfcache_cache_t *record_entry_value_data_cache = NULL; libfdata_reference_t *record_entry_value_data_reference = NULL; libpff_list_element_t *list_element = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; libpff_record_entry_t *record_entry = NULL; libpff_table_index_value_t *table_index_value = NULL; uint8_t *table_data = NULL; uint8_t *record_entry_value_data = NULL; static char *function = "libpff_table_read_entry_value"; size_t table_data_size = 0; size_t record_entry_value_data_size = 0; uint64_t entry_value = 0; int list_iterator = 0; int result = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( table->entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entries.", function ); return( -1 ); } if( ( set_index < 0 ) || ( set_index >= table->number_of_sets ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid set index value out of bounds.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= table->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } if( record_entry_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid record entry value.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( table->entry[ set_index ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid table - missing entry set.", function ); return( -1 ); } record_entry = table->entry[ set_index ]; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry type\t\t\t: 0x%04" PRIx32 "", function, set_index, entry_index, record_entry_type ); } #endif if( ( record_entry_type >= 0x8000 ) || ( record_entry_type <= 0xfffe ) ) { /* The corresponding name to id map entry was already determined */ if( name_to_id_map_entry != NULL ) { ( record_entry[ entry_index ] ).name_to_id_map_entry = name_to_id_map_entry; } else if( name_to_id_map_list != NULL ) { list_element = name_to_id_map_list->first_element; for( list_iterator = 0; list_iterator < name_to_id_map_list->number_of_elements; list_iterator++ ) { if( list_element == NULL ) { break; } if( list_element->value == NULL ) { continue; } if( ( (libpff_internal_name_to_id_map_entry_t *) list_element->value )->identifier == record_entry_type ) { ( record_entry[ entry_index ] ).name_to_id_map_entry = (libpff_internal_name_to_id_map_entry_t *) list_element->value; } list_element = list_element->next_element; } } } ( record_entry[ entry_index ] ).identifier.format = LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_MAPI_PROPERTY; ( record_entry[ entry_index ] ).identifier.entry_type = record_entry_type; ( record_entry[ entry_index ] ).identifier.value_type = record_entry_value_type; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( debug_item_type == LIBPFF_DEBUG_ITEM_TYPE_NAME_TO_ID_MAP ) { libcnotify_printf( " (%s : %s)\n", libpff_debug_get_name_to_id_map_property_type_identifier( record_entry_type, record_entry_value_type ), libpff_debug_get_name_to_id_map_property_type_description( record_entry_type, record_entry_value_type ) ); } else if( ( record_entry[ entry_index ] ).name_to_id_map_entry != NULL ) { if( ( record_entry[ entry_index ] ).name_to_id_map_entry->type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { libcnotify_printf( " maps to: %s (%s : %s)\n", (char *) ( record_entry[ entry_index ] ).name_to_id_map_entry->debug_string, libfmapi_named_property_type_get_identifier( ( record_entry[ entry_index ] ).name_to_id_map_entry->guid, (char *) ( record_entry[ entry_index ] ).name_to_id_map_entry->debug_string, ( record_entry[ entry_index ] ).name_to_id_map_entry->value_size, ( record_entry[ entry_index ] ).identifier.value_type ), libfmapi_named_property_type_get_description( ( record_entry[ entry_index ] ).name_to_id_map_entry->guid, (char *) ( record_entry[ entry_index ] ).name_to_id_map_entry->debug_string, ( record_entry[ entry_index ] ).name_to_id_map_entry->value_size, ( record_entry[ entry_index ] ).identifier.value_type ) ); } else { libcnotify_printf( " maps to: 0x%04" PRIx32 " (%s : %s)\n", ( record_entry[ entry_index ] ).name_to_id_map_entry->numeric_value, libfmapi_property_type_get_identifier( ( record_entry[ entry_index ] ).name_to_id_map_entry->guid, ( record_entry[ entry_index ] ).name_to_id_map_entry->numeric_value, ( record_entry[ entry_index ] ).identifier.value_type ), libfmapi_property_type_get_description( ( record_entry[ entry_index ] ).name_to_id_map_entry->guid, ( record_entry[ entry_index ] ).name_to_id_map_entry->numeric_value, ( record_entry[ entry_index ] ).identifier.value_type ) ); } } else { libcnotify_printf( " (%s : %s)\n", libfmapi_property_type_get_identifier( NULL, ( record_entry[ entry_index ] ).identifier.entry_type, ( record_entry[ entry_index ] ).identifier.value_type ), libfmapi_property_type_get_description( NULL, ( record_entry[ entry_index ] ).identifier.entry_type, ( record_entry[ entry_index ] ).identifier.value_type ) ); } libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value type\t\t: 0x%04" PRIx16 " (%s : %s)\n", function, set_index, entry_index, record_entry_value_type, libfmapi_value_type_get_identifier( ( record_entry[ entry_index ] ).identifier.value_type ), libfmapi_value_type_get_description( ( record_entry[ entry_index ] ).identifier.value_type ) ); } #endif if( record_entry_value_size == 1 ) { entry_value = record_entry_value[ 0 ]; } else if( record_entry_value_size == 2 ) { byte_stream_copy_to_uint16_little_endian( record_entry_value, entry_value ); } else if( record_entry_value_size == 4 ) { byte_stream_copy_to_uint32_little_endian( record_entry_value, entry_value ); } else if( record_entry_value_size == 8 ) { byte_stream_copy_to_uint64_little_endian( record_entry_value, entry_value ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported record entry value size: %" PRIu8 ".", function, record_entry_value_size ); return( -1 ); } /* Check if there is a record entry values (a5) table */ if( record_entry_values_table != NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry values table reference\t: 0x%08" PRIx64 "\n", function, set_index, entry_index, entry_value ); } #endif /* TODO check entry value type */ if( ( entry_value & 0x0000001fUL ) != 0 ) { result = libpff_local_descriptors_tree_get_value_by_identifier( table->local_descriptors_tree, file_io_handle, table->local_descriptors_cache, (uint32_t) entry_value, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor identifier: %" PRIu32 " from local descriptors.", function, (uint32_t) entry_value ); return( -1 ); } else if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing descriptor: %" PRIu32 " - marked as missing.\n", function, (uint32_t) entry_value ); } #endif ( record_entry[ entry_index ] ).value_data_reference = NULL; ( record_entry[ entry_index ] ).flags |= LIBPFF_RECORD_ENTRY_FLAG_MISSING_DATA_DESCRIPTOR; table->flags |= LIBPFF_TABLE_FLAG_MISSING_RECORD_ENTRY_DATA; } else { if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_read_descriptor_data_reference( io_handle, file_io_handle, (uint32_t) entry_value, local_descriptor_value->data_identifier, table->recovered, 0, &( ( record_entry[ entry_index ] ).value_data_reference ), &( ( record_entry[ entry_index ] ).value_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entry value data with descriptor: %" PRIu32 " - marked as missing.", function, (uint32_t) entry_value ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); /* If the data descriptor could not be read mark it as missing * and give it an empty value data reference */ ( record_entry[ entry_index ] ).value_data_reference = NULL; ( record_entry[ entry_index ] ).flags |= LIBPFF_RECORD_ENTRY_FLAG_MISSING_DATA_DESCRIPTOR; table->flags |= LIBPFF_TABLE_FLAG_MISSING_RECORD_ENTRY_DATA; } } } /* Check if the entry value is a value within the record entry values (a5) table */ else if( entry_value > 0 ) { /* The record entry value reference needs to be transformed into a table set and entry * value. Table array entries have been stored as separate sets. */ result = libpff_table_get_entry_value_by_index( record_entry_values_table, (int) ( ( entry_value >> 16 ) & 0xffff ), (int) ( ( ( entry_value & 0xffe0 ) >> 5 ) - 1 ), &record_entry_value_data_reference, &record_entry_value_data_cache, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entry value index: 0x%08" PRIx64 " (set: %d, entry: %d)", function, entry_value, (int) ( ( entry_value >> 16 ) & 0xffff ), (int) ( ( ( entry_value & 0xffe0 ) >> 5 ) - 1 ) ); return( -1 ); } /* A missing record entry value reference signifies an empty value (NULL) */ else if( result != 0 ) { if( libfdata_reference_get_segment_data_at_offset( record_entry_value_data_reference, file_io_handle, record_entry_value_data_cache, 0, &record_entry_value_data, &record_entry_value_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entry value data at offset: 0.", function ); return( -1 ); } if( record_entry_value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing record entry value data.", function ); return( -1 ); } } } } else { /* The Boolean (0x000b) * is 1 byte of size in the 7c table * is 4 bytes of size in the bc table * * the first byte contains the value * the value is 0x00 if false or true otherwise */ if( record_entry_value_type == LIBPFF_VALUE_TYPE_BOOLEAN ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value\t\t\t: 0x%08" PRIx64 "\n", function, set_index, entry_index, entry_value ); if( ( record_entry_value_size != 1 ) && ( record_entry_value_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%08" PRIx32 " with value size: %" PRIu8 ".", function, record_entry_value_type, record_entry_value_size ); return( -1 ); } } #endif /* The first byte in the record entry value buffer * contains the actual value of the boolean */ record_entry_value_data = record_entry_value; record_entry_value_data_size = sizeof( uint8_t ); } /* The Integer 16-bit signed (0x0002) * is 2 bytes of size in the 7c table * is 4 bytes of size in the bc table * * the first two bytes contains the value */ else if( record_entry_value_type == LIBPFF_VALUE_TYPE_INTEGER_16BIT_SIGNED ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value\t\t\t: 0x%08" PRIx64 "\n", function, set_index, entry_index, entry_value ); if( ( record_entry_value_size != 2 ) && ( record_entry_value_size != 4 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%08" PRIx32 " with value size: %" PRIu8 ".", function, record_entry_value_type, record_entry_value_size ); return( -1 ); } } #endif record_entry_value_data = record_entry_value; record_entry_value_data_size = sizeof( uint16_t ); } /* The Integer 32-bit signed (0x0003) * Floating point single precision (0x0004) * Error scode (0x000a) * * is 4 bytes of size in the 7c and bc table */ else if( ( record_entry_value_type == LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_FLOAT_32BIT ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_ERROR ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value\t\t\t: 0x%08" PRIx64 "\n", function, set_index, entry_index, entry_value ); if( record_entry_value_size != 4 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%08" PRIx32 " with value size: %" PRIu8 ".", function, record_entry_value_type, record_entry_value_size ); return( -1 ); } } #endif record_entry_value_data = record_entry_value; record_entry_value_data_size = sizeof( uint32_t ); } /* The Floating point double precision (0x0005) * Currency (64-bit) (0x0006) * Application time (64-bit) (0x0007) * Integer 64-bit signed (0x0014) * Windows Filetime (64-bit) (0x0040) * * is 8 bytes of size in the 7c table */ else if( ( record_entry_value_size == 8 ) && ( ( record_entry_value_type == LIBPFF_VALUE_TYPE_DOUBLE_64BIT ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_CURRENCY ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_APPLICATION_TIME ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_FILETIME ) ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value\t\t\t: 0x%08" PRIx64 "\n", function, set_index, entry_index, entry_value ); } #endif record_entry_value_data = record_entry_value; record_entry_value_data_size = sizeof( uint64_t ); } /* These values are references in the bc table */ else if( ( record_entry_value_type == LIBPFF_VALUE_TYPE_DOUBLE_64BIT ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_CURRENCY ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_APPLICATION_TIME ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_OBJECT ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_FILETIME ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_GUID ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_SERVER_IDENTIFIER ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_RESTRICTION ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_RULE_ACTION ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_16BIT_SIGNED ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_32BIT_SIGNED ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_FLOAT_32BIT ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_DOUBLE_64BIT ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_CURRENCY ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_APPLICATION_TIME ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_64BIT_SIGNED ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_ASCII ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_UNICODE ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_FILETIME ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_GUID ) || ( record_entry_value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA ) ) { /* Check if the entry value is a referenced local descriptor */ /* TODO check entry value type */ if( ( entry_value & 0x0000001fUL ) != 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value reference\t\t: %" PRIu64 " ", function, set_index, entry_index, entry_value ); libpff_debug_print_node_identifier_type( (uint8_t) ( entry_value & 0x0000001fUL ) ); libcnotify_printf( "\n" ); } #endif if( entry_value > (uint64_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: entry value reference value exceeds maximum.", function ); return( -1 ); } result = libpff_local_descriptors_tree_get_value_by_identifier( table->local_descriptors_tree, file_io_handle, table->local_descriptors_cache, (uint32_t) entry_value, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor identifier: %" PRIu32 " from local descriptors.", function, (uint32_t) entry_value ); return( -1 ); } else if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: missing descriptor: %" PRIu32 " - marked as missing.\n", function, (uint32_t) entry_value ); } #endif ( record_entry[ entry_index ] ).value_data_reference = NULL; ( record_entry[ entry_index ] ).flags |= LIBPFF_RECORD_ENTRY_FLAG_MISSING_DATA_DESCRIPTOR; table->flags |= LIBPFF_TABLE_FLAG_MISSING_RECORD_ENTRY_DATA; } else { if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_read_descriptor_data_reference( io_handle, file_io_handle, (uint32_t) entry_value, local_descriptor_value->data_identifier, table->recovered, 0, &( ( record_entry[ entry_index ] ).value_data_reference ), &( ( record_entry[ entry_index ] ).value_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read record entry value data with descriptor: %" PRIu32 " - marked as missing.", function, (uint32_t) entry_value ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); /* If the data descriptor could not be read mark it as missing * and give it an empty value data reference */ ( record_entry[ entry_index ] ).value_data_reference = NULL; ( record_entry[ entry_index ] ).flags |= LIBPFF_RECORD_ENTRY_FLAG_MISSING_DATA_DESCRIPTOR; table->flags |= LIBPFF_TABLE_FLAG_MISSING_RECORD_ENTRY_DATA; } } } /* Check if the entry value is empty */ else if( entry_value == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value\t\t\t: \n", function, set_index, entry_index ); } #endif } /* Otherwise the entry value is a referenced table value */ else { /* Fetch the record entry value reference */ if( libpff_table_get_index_value_by_reference( table, (uint32_t) entry_value, &table_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve record entry value reference: 0x%08" PRIx64 ".", function, entry_value ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); ( record_entry[ entry_index ] ).value_data_reference = NULL; ( record_entry[ entry_index ] ).flags |= LIBPFF_RECORD_ENTRY_FLAG_MISSING_DATA_DESCRIPTOR; table->flags |= LIBPFF_TABLE_FLAG_MISSING_RECORD_ENTRY_DATA; } else { if( table_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table index value.", function ); return( -1 ); } /* Retrieve the corresponding table array entry */ if( libfdata_block_get_segment_data( table->descriptor_data_block, file_io_handle, table->descriptor_data_cache, (int) table_index_value->array_entry, &table_data, &table_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( table_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table array entry: %" PRIu32 ".", function, table_index_value->array_entry ); return( -1 ); } if( (size_t) table_index_value->offset >= table_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table value offset exceeds table data size.", function ); return( -1 ); } record_entry_value_data = &( table_data[ table_index_value->offset ] ); record_entry_value_data_size = table_index_value->size; } } } else { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table set: %03" PRIu32 " entry: %03" PRIu32 " record entry value (reference)\t: 0x%08" PRIx64 "\n", function, set_index, entry_index, entry_value ); libcnotify_printf( "\n" ); } #endif libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%08" PRIx32 " with value size: %" PRIu8 ".", function, record_entry_value_type, record_entry_value_size ); return( -1 ); } } if( ( record_entry[ entry_index ] ).value_data_reference == NULL ) { /* Create a buffer data reference of the record entry value data */ if( libfdata_buffer_reference_initialize( &( ( record_entry[ entry_index ] ).value_data_reference ), record_entry_value_data, record_entry_value_data_size, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create record entry value data reference.", function ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( libpff_debug_property_type_value_reference_print( name_to_id_map_list, ( record_entry[ entry_index ] ).identifier.entry_type, ( record_entry[ entry_index ] ).identifier.value_type, ( record_entry[ entry_index ] ).value_data_reference, file_io_handle, ( record_entry[ entry_index ] ).value_data_cache, debug_item_type, io_handle->ascii_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print record entry value reference.", function ); return( -1 ); } } #endif return( 1 ); } libpff-20120802/libpff/libpff_local_descriptors.c0000644000175000017500000007077512005155304016613 00000000000000/* * Local descriptors functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_definitions.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_local_descriptor_node.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors.h" #include "libpff_unused.h" #include "pff_local_descriptor_node.h" /* Initializes the local descriptors and its values * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_initialize( libpff_local_descriptors_t **local_descriptors, libpff_io_handle_t *io_handle, off64_t root_node_offset, size32_t root_node_size, uint8_t recovered, libcerror_error_t **error ) { static char *function = "libpff_local_descriptors_initialize"; int element_index = 0; if( local_descriptors == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptors.", function ); return( -1 ); } if( *local_descriptors != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid local descriptors value already set.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } *local_descriptors = memory_allocate_structure( libpff_local_descriptors_t ); if( *local_descriptors == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create local descriptors.", function ); goto on_error; } if( memory_set( *local_descriptors, 0, sizeof( libpff_local_descriptors_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear local descriptors.", function ); memory_free( *local_descriptors ); *local_descriptors = NULL; return( -1 ); } if( libfdata_list_initialize( &( ( *local_descriptors )->local_descriptor_nodes_list ), (intptr_t* ) io_handle, NULL, NULL, &libpff_io_handle_read_local_descriptor_node, LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptor nodes list.", function ); goto on_error; } if( libfcache_cache_initialize( &( ( *local_descriptors )->local_descriptor_nodes_cache ), LIBPFF_MAXIMUM_CACHE_ENTRIES_LOCAL_DESCRIPTORS_NODES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptor nodes cache.", function ); goto on_error; } if( libfdata_list_append_element( ( *local_descriptors )->local_descriptor_nodes_list, &element_index, root_node_offset, (size64_t) root_node_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append local descriptor nodes list element.", function ); goto on_error; } ( *local_descriptors )->io_handle = io_handle; ( *local_descriptors )->root_node_offset = root_node_offset; ( *local_descriptors )->root_node_size = root_node_size; ( *local_descriptors )->recovered = recovered; return( 1 ); on_error: if( *local_descriptors != NULL ) { if( ( *local_descriptors )->local_descriptor_nodes_cache != NULL ) { libfcache_cache_free( &( ( *local_descriptors )->local_descriptor_nodes_cache ), NULL ); } if( ( *local_descriptors )->local_descriptor_nodes_list != NULL ) { libfdata_list_free( &( ( *local_descriptors )->local_descriptor_nodes_list ), NULL ); } memory_free( *local_descriptors ); *local_descriptors = NULL; } return( -1 ); } /* Frees the local descriptors and its values * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_free( libpff_local_descriptors_t **local_descriptors, libcerror_error_t **error ) { static char *function = "libpff_local_descriptors_free"; int result = 1; if( local_descriptors == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptors.", function ); return( -1 ); } if( *local_descriptors != NULL ) { if( libfdata_list_free( &( ( *local_descriptors )->local_descriptor_nodes_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free local descriptor nodes list.", function ); result = -1; } if( libfcache_cache_free( &( ( *local_descriptors )->local_descriptor_nodes_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free local descriptor nodes cache.", function ); result = -1; } memory_free( *local_descriptors ); *local_descriptors = NULL; } return( result ); } /* Clones the local descriptors * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_clone( libpff_local_descriptors_t **destination_local_descriptors, libpff_local_descriptors_t *source_local_descriptors, libcerror_error_t **error ) { static char *function = "libpff_local_descriptors_clone"; if( destination_local_descriptors == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination local descriptors.", function ); return( -1 ); } if( *destination_local_descriptors != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination local descriptors already set.", function ); return( -1 ); } if( source_local_descriptors == NULL ) { *destination_local_descriptors = NULL; return( 1 ); } if( libpff_local_descriptors_initialize( destination_local_descriptors, source_local_descriptors->io_handle, source_local_descriptors->root_node_offset, source_local_descriptors->root_node_size, source_local_descriptors->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination local descriptors.", function ); return( -1 ); } return( 1 ); } /* Reads the local descriptor node * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_read_node( libpff_local_descriptors_t *local_descriptors, libbfio_handle_t *file_io_handle, off64_t node_offset, libfdata_tree_node_t *local_descriptors_tree_node, libpff_local_descriptor_value_t *local_descriptor_value, libcerror_error_t **error ) { libfdata_list_element_t *local_descriptor_node_list_element = NULL; libpff_index_value_t *offset_index_value = NULL; libpff_local_descriptor_node_t *local_descriptor_node = NULL; uint8_t *node_entry_data = NULL; static char *function = "libpff_local_descriptors_read_node"; off64_t node_data_offset = 0; uint64_t local_descriptor_sub_node_identifier = 0; uint16_t entry_index = 0; int element_index = 0; int local_descriptor_node_list_element_index = 0; if( local_descriptors == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local_descriptors.", function ); return( -1 ); } if( local_descriptors->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local_descriptors - missing IO handle.", function ); return( -1 ); } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor value.", function ); return( -1 ); } if( libfdata_list_get_element_by_offset( local_descriptors->local_descriptor_nodes_list, node_offset, &local_descriptor_node_list_element_index, &local_descriptor_node_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor node list element at offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } if( libfdata_list_element_get_element_value( local_descriptor_node_list_element, file_io_handle, local_descriptors->local_descriptor_nodes_cache, (intptr_t **) &local_descriptor_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor node at offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } if( local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptor node.", function ); return( -1 ); } if( local_descriptor_node->number_of_entries > 0 ) { if( libfdata_tree_node_resize_sub_nodes( local_descriptors_tree_node, (int) local_descriptor_node->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize number of sub nodes.", function ); return( -1 ); } node_data_offset = node_offset; for( entry_index = 0; entry_index < local_descriptor_node->number_of_entries; entry_index++ ) { if( local_descriptor_node->level != PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { if( libpff_local_descriptor_node_get_entry_data( local_descriptor_node, entry_index, &node_entry_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node entry: %" PRIu16 " data.", function, entry_index ); return( -1 ); } if( node_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node entry: %" PRIu16 " data.", function, entry_index ); return( -1 ); } if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( ( (pff_local_descriptor_branch_node_entry_type_32bit_t *) node_entry_data )->sub_node_identifier, local_descriptor_sub_node_identifier ); node_entry_data += 4; } else if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( ( (pff_local_descriptor_branch_node_entry_type_64bit_t *) node_entry_data )->sub_node_identifier, local_descriptor_sub_node_identifier ); node_entry_data += 8; } /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_get_offset_index_value_by_identifier( local_descriptors->io_handle, file_io_handle, local_descriptor_sub_node_identifier, local_descriptors->recovered, 0, &offset_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find sub node identifier: %" PRIu64 ".", function, local_descriptor_sub_node_identifier ); return( -1 ); } if( offset_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor entry: %03" PRIu16 " at level: %" PRIu8 " identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, entry_index, local_descriptor_node->level, offset_index_value->identifier, ( ( offset_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), offset_index_value->file_offset, offset_index_value->data_size ); } #endif if( libfdata_list_append_element( local_descriptors->local_descriptor_nodes_list, &element_index, offset_index_value->file_offset, (off64_t) offset_index_value->data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append local descriptor nodes list element.", function ); return( -1 ); } } if( libfdata_tree_node_set_sub_node_by_index( local_descriptors_tree_node, (int) entry_index, node_data_offset, (size64_t) entry_index, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set local descriptor node entry: %" PRIu16 " as sub node.", function, entry_index ); return( -1 ); } node_data_offset += local_descriptor_node->entry_size; } } return( 1 ); } /* Reads the local descriptor node entry * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_read_node_entry( libpff_local_descriptors_t *local_descriptors, libbfio_handle_t *file_io_handle, off64_t node_offset, uint16_t entry_index, libfdata_tree_node_t *local_descriptors_tree_node, libpff_local_descriptor_value_t *local_descriptor_value, libcerror_error_t **error ) { libfdata_list_element_t *local_descriptor_node_list_element = NULL; libpff_index_value_t *offset_index_value = NULL; libpff_local_descriptor_node_t *local_descriptor_node = NULL; uint8_t *node_entry_data = NULL; static char *function = "libpff_local_descriptors_read_node_entry"; int local_descriptor_node_list_element_index = 0; if( local_descriptors == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local_descriptors.", function ); return( -1 ); } if( local_descriptors->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local_descriptors - missing IO handle.", function ); return( -1 ); } if( ( local_descriptors->io_handle->file_type != LIBPFF_FILE_TYPE_32BIT ) && ( local_descriptors->io_handle->file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor value.", function ); return( -1 ); } if( libfdata_list_get_element_by_offset( local_descriptors->local_descriptor_nodes_list, node_offset, &local_descriptor_node_list_element_index, &local_descriptor_node_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor node list element at offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } if( libfdata_list_element_get_element_value( local_descriptor_node_list_element, file_io_handle, local_descriptors->local_descriptor_nodes_cache, (intptr_t **) &local_descriptor_node, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor node at offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } if( local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptor node.", function ); return( -1 ); } if( libpff_local_descriptor_node_get_entry_data( local_descriptor_node, entry_index, &node_entry_data, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node entry: %" PRIu16 " data.", function, entry_index ); return( -1 ); } if( node_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing node entry: %" PRIu16 " data.", function, entry_index ); return( -1 ); } if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value->identifier ); node_entry_data += 4; } else if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value->identifier ); node_entry_data += 8; } /* Ignore the upper 32-bit of local descriptor identifiers */ local_descriptor_value->identifier &= 0xffffffffUL; if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value->data_identifier ); node_entry_data += 4; byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value->local_descriptors_identifier ); node_entry_data += 4; } else if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value->data_identifier ); node_entry_data += 8; byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value->local_descriptors_identifier ); node_entry_data += 8; } } else { if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( node_entry_data, local_descriptor_value->sub_node_identifier ); node_entry_data += 4; } else if( local_descriptors->io_handle->file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( node_entry_data, local_descriptor_value->sub_node_identifier ); node_entry_data += 8; } } if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { if( libfdata_tree_node_set_leaf( local_descriptors_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set leaf in local descriptors tree node.", function ); return( -1 ); } } else { /* TODO handle multiple recovered offset index values */ if( libpff_io_handle_get_offset_index_value_by_identifier( local_descriptors->io_handle, file_io_handle, local_descriptor_value->sub_node_identifier, local_descriptors->recovered, 0, &offset_index_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find sub node identifier: %" PRIu64 ".", function, local_descriptor_value->sub_node_identifier ); return( -1 ); } if( offset_index_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing offset index value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor entry: %03" PRIu16 " at level: %" PRIu8 " identifier: %" PRIu64 " (%s) at offset: %" PRIi64 " of size: %" PRIu32 "\n", function, entry_index, local_descriptor_node->level, offset_index_value->identifier, ( ( offset_index_value->identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) ? "internal" : "external" ), offset_index_value->file_offset, offset_index_value->data_size ); } #endif if( libfdata_tree_node_set_sub_nodes_range( local_descriptors_tree_node, offset_index_value->file_offset, (size64_t) entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub nodes range.", function ); return( -1 ); } } return( 1 ); } /* Reads the local descriptor value * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_read_node_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags LIBPFF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libpff_local_descriptors_t *local_descriptors = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; static char *function = "libpff_local_descriptors_read_node_data"; int result = 0; LIBPFF_UNREFERENCED_PARAMETER( read_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local_descriptors IO handle.", function ); return( -1 ); } local_descriptors = (libpff_local_descriptors_t *) io_handle; if( node_data_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid node data offset value less than zero.", function ); return( -1 ); } if( node_data_size > (off64_t) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid node data size value exceeds maximum.", function ); return( -1 ); } if( libpff_local_descriptor_value_initialize( &local_descriptor_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create local descriptor value.", function ); return( -1 ); } result = libfdata_tree_node_is_root( node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if node is the root.", function ); libpff_local_descriptor_value_free( &local_descriptor_value, NULL ); return( -1 ); } else if( result != 0 ) { /* The local descriptors tree root node is virtual */ if( libfdata_tree_node_set_sub_nodes_range( node, local_descriptors->root_node_offset, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set root node as sub nodes range.", function ); libpff_local_descriptor_value_free( &local_descriptor_value, NULL ); return( -1 ); } } else { /* node_data_size contains the local descriptor node entry */ if( libpff_local_descriptors_read_node_entry( local_descriptors, file_io_handle, node_data_offset, (uint16_t) node_data_size, node, local_descriptor_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptor node entry at offset: %" PRIi64 ".", function, node_data_offset ); libpff_local_descriptor_value_free( &local_descriptor_value, NULL ); return( -1 ); } } if( libfdata_tree_node_set_node_value( node, cache, (intptr_t *) local_descriptor_value, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_local_descriptor_value_free, LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set local descriptor value as node value.", function ); libpff_local_descriptor_value_free( &local_descriptor_value, NULL ); return( -1 ); } return( 1 ); } /* Reads the local_descriptors sub nodes * Returns 1 if successful or -1 on error */ int libpff_local_descriptors_read_sub_nodes( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size LIBPFF_ATTRIBUTE_UNUSED, uint8_t read_flags LIBPFF_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { libpff_local_descriptors_t *local_descriptors = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; static char *function = "libpff_local_descriptors_read_sub_nodes"; LIBPFF_UNREFERENCED_PARAMETER( node_data_size ) LIBPFF_UNREFERENCED_PARAMETER( read_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local_descriptors IO handle.", function ); return( -1 ); } local_descriptors = (libpff_local_descriptors_t *) io_handle; if( node_data_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid node data offset value less than zero.", function ); return( -1 ); } if( libfdata_tree_node_get_node_value( node, file_io_handle, cache, (intptr_t **) &local_descriptor_value, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptor value.", function ); return( -1 ); } if( libpff_local_descriptors_read_node( local_descriptors, file_io_handle, node_data_offset, node, local_descriptor_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptor node at offset: %" PRIi64 ".", function, node_data_offset ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_index_node.h0000644000175000017500000000430112005155304015177 00000000000000/* * Index node functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_NODE_INDEX_H ) #define _LIBPFF_NODE_INDEX_H #include #include #include "libpff_libbfio.h" #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_index_node libpff_index_node_t; struct libpff_index_node { /* The node data */ uint8_t *data; /* The node data size */ size_t data_size; /* The type */ uint8_t type; /* The level */ uint8_t level; /* The number of entries */ uint8_t number_of_entries; /* The maximum number of entries */ uint8_t maximum_number_of_entries; /* The entry size */ uint8_t entry_size; /* The entries data */ uint8_t *entries_data; /* The maximum entries data size */ uint16_t maximum_entries_data_size; /* The back pointer */ uint64_t back_pointer; }; int libpff_index_node_initialize( libpff_index_node_t **index_node, libcerror_error_t **error ); int libpff_index_node_free( libpff_index_node_t **index_node, libcerror_error_t **error ); int libpff_index_node_get_entry_data( libpff_index_node_t *index_node, uint8_t entry_index, uint8_t **entry_data, libcerror_error_t **error ); int libpff_index_node_read( libpff_index_node_t *index_node, libbfio_handle_t *file_io_handle, off64_t node_offset, uint8_t file_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_attached_file_io_handle.c0000644000175000017500000003402512005155304017642 00000000000000/* * Attached file IO handle functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_attached_file_io_handle.h" #include "libpff_attachment.h" #include "libpff_definitions.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_types.h" /* Initializes the IO handle * Returns 1 if successful or -1 on error */ int libpff_attached_file_io_handle_initialize( libpff_attached_file_io_handle_t **io_handle, libpff_item_t *attachment, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_initialize"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid IO handle value already set.", function ); return( -1 ); } if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } *io_handle = memory_allocate_structure( libpff_attached_file_io_handle_t ); if( *io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create IO handle.", function ); goto on_error; } if( memory_set( *io_handle, 0, sizeof( libpff_attached_file_io_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear IO handle.", function ); goto on_error; } ( *io_handle )->attachment = attachment; return( 1 ); on_error: if( *io_handle != NULL ) { memory_free( *io_handle ); *io_handle = NULL; } return( -1 ); } /* Frees the IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libpff_attached_file_io_handle_free( libpff_attached_file_io_handle_t **io_handle, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_free"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( *io_handle != NULL ) { /* The attachment reference is freed elsewhere */ memory_free( *io_handle ); *io_handle = NULL; } return( 1 ); } /* Clones (duplicates) the IO handle and its attributes * Returns 1 if succesful or -1 on error */ int libpff_attached_file_io_handle_clone( libpff_attached_file_io_handle_t **destination_io_handle, libpff_attached_file_io_handle_t *source_io_handle, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_clone"; if( destination_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination IO handle.", function ); return( -1 ); } if( *destination_io_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination IO handle already set.", function ); return( -1 ); } if( source_io_handle == NULL ) { *destination_io_handle = NULL; return( 1 ); } if( libpff_attached_file_io_handle_initialize( destination_io_handle, source_io_handle->attachment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create IO handle.", function ); return( -1 ); } ( *destination_io_handle )->access_flags = source_io_handle->access_flags; return( 1 ); } /* Opens the IO handle * Returns 1 if successful or -1 on error */ int libpff_attached_file_io_handle_open( libpff_attached_file_io_handle_t *io_handle, int flags, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_open"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing attachment item.", function ); return( -1 ); } if( io_handle->is_open != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: IO handle already open.", function ); return( -1 ); } if( ( flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } /* Currently only support for reading data */ if( ( flags & ~( LIBBFIO_ACCESS_FLAG_READ ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags.", function ); return( -1 ); } io_handle->access_flags = flags; io_handle->is_open = 1; return( 1 ); } /* Closes the IO handle * Returns 0 if successful or -1 on error */ int libpff_attached_file_io_handle_close( libpff_attached_file_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_close"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing attachment item.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } io_handle->is_open = 0; return( 0 ); } /* Reads a buffer from the IO handle * Returns the number of bytes read if successful, or -1 on errror */ ssize_t libpff_attached_file_io_handle_read( libpff_attached_file_io_handle_t *io_handle, uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_read"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing attachment item.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } if( ( io_handle->access_flags & LIBBFIO_ACCESS_FLAG_READ ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - no read access.", function ); return( -1 ); } read_count = libpff_attachment_data_read_buffer( io_handle->attachment, buffer, size, error ); if( read_count <= -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read buffer from attachment data.", function ); return( -1 ); } return( read_count ); } /* Writes a buffer to the IO handle * Returns the number of bytes written if successful, or -1 on errror */ ssize_t libpff_attached_file_io_handle_write( libpff_attached_file_io_handle_t *io_handle, const uint8_t *buffer, size_t size, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_write"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing attachment item.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } if( ( io_handle->access_flags & LIBBFIO_ACCESS_FLAG_WRITE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - no write access.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } return( 0 ); } /* Seeks a certain offset within the IO handle * Returns the offset if the seek is successful or -1 on error */ off64_t libpff_attached_file_io_handle_seek_offset( libpff_attached_file_io_handle_t *io_handle, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_seek_offset"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing attachment item.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - not open.", function ); return( -1 ); } offset = libpff_attachment_data_seek_offset( io_handle->attachment, offset, whence, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset in attachment data.", function ); return( -1 ); } return( offset ); } /* Function to determine if the attached file exists * Returns 1 if the attached file exists, 0 if not or -1 on error */ int libpff_attached_file_io_handle_exists( libpff_attached_file_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_exists"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { return( 0 ); } return( 1 ); } /* Check if the attached file is open * Returns 1 if open, 0 if not or -1 on error */ int libpff_attached_file_io_handle_is_open( libpff_attached_file_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_is_open"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( io_handle->attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid IO handle - missing attachment item.", function ); return( -1 ); } if( io_handle->is_open == 0 ) { return( 0 ); } return( 1 ); } /* Retrieves the attached file size * Returns 1 if successful or -1 on error */ int libpff_attached_file_io_handle_get_size( libpff_attached_file_io_handle_t *io_handle, size64_t *size, libcerror_error_t **error ) { static char *function = "libpff_attached_file_io_handle_get_size"; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } if( libpff_attachment_get_data_size( io_handle->attachment, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachment data size.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_record_entry.h0000644000175000017500000000526312005155304015572 00000000000000/* * Record functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_RECORD_H ) #define _LIBPFF_RECORD_H #include #include #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_name_to_id_map.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif enum LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMATS { /* The entry identifier consists of a MAPI property type * (entry type, value type) */ LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_MAPI_PROPERTY = 1, /* The entry identifier consists of a GUID */ LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_GUID = 2, /* The entry identifier consists of a PRQ_ID_SECURE4 value * the PRQ_ID_SECURE4 value is a yet unknown 10-byte value */ LIBPFF_RECORD_ENTRY_IDENTIFIER_FORMAT_SECURE4 = 3 }; enum LIBPFF_RECORD_ENTRY_FLAGS { /* The data descriptor could not be read */ LIBPFF_RECORD_ENTRY_FLAG_MISSING_DATA_DESCRIPTOR = 0x01, }; typedef struct libpff_record_entry_identifier libpff_record_entry_identifier_t; struct libpff_record_entry_identifier { /* The entry identifier format */ uint8_t format; /* The entry identifier */ union { /* The MAPI property based entry identifier */ struct { /* The entry type */ uint32_t entry_type; /* The value type */ uint32_t value_type; }; /* The GUID based entry identifier */ uint8_t guid[ 16 ]; /* The PRQ_ID_SECURE4 based entry identifier */ uint64_t secure4; }; }; typedef struct libpff_record_entry libpff_record_entry_t; struct libpff_record_entry { /* The record entry identifier */ libpff_record_entry_identifier_t identifier; /* The value data reference */ libfdata_reference_t *value_data_reference; /* The value data cache */ libfcache_cache_t *value_data_cache; /* The name to id map entry */ libpff_internal_name_to_id_map_entry_t *name_to_id_map_entry; /* The flags */ uint8_t flags; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_data_array_entry.h0000644000175000017500000000331412005155304016416 00000000000000/* * Data array entry functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_DATA_ARRAY_ENTRY_H ) #define _LIBPFF_DATA_ARRAY_ENTRY_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_data_array_entry libpff_data_array_entry_t; struct libpff_data_array_entry { /* Value to indicate if the data array data identifier */ uint64_t data_identifier; /* The (data block) flags */ uint8_t flags; }; int libpff_data_array_entry_initialize( libpff_data_array_entry_t **data_array_entry, libcerror_error_t **error ); int libpff_data_array_entry_free( libpff_data_array_entry_t **data_array_entry, libcerror_error_t **error ); int libpff_data_array_entry_clone( libpff_data_array_entry_t **destination_data_array_entry, libpff_data_array_entry_t *source_data_array_entry, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_data_block.c0000644000175000017500000005261612005155304015155 00000000000000/* * Data block functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_definitions.h" #include "libpff_data_block.h" #include "libpff_encryption.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfmapi.h" #include "pff_block.h" /* Initializes the data block and its values * Returns 1 if successful or -1 on error */ int libpff_data_block_initialize( libpff_data_block_t **data_block, uint32_t descriptor_identifier, uint64_t data_identifier, libpff_io_handle_t *io_handle, libcerror_error_t **error ) { static char *function = "libpff_data_block_initialize"; if( data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data block.", function ); return( -1 ); } if( *data_block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data block value already set.", function ); return( -1 ); } if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid IO handle.", function ); return( -1 ); } *data_block = memory_allocate_structure( libpff_data_block_t ); if( *data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data block.", function ); goto on_error; } if( memory_set( *data_block, 0, sizeof( libpff_data_block_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data block.", function ); goto on_error; } ( *data_block )->descriptor_identifier = descriptor_identifier; ( *data_block )->data_identifier = data_identifier; ( *data_block )->io_handle = io_handle; return( 1 ); on_error: if( *data_block != NULL ) { memory_free( *data_block ); *data_block = NULL; } return( -1 ); } /* Frees the block and its values * Returns 1 if successful or -1 on error */ int libpff_data_block_free( libpff_data_block_t **data_block, libcerror_error_t **error ) { static char *function = "libpff_data_block_free"; if( data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data block.", function ); return( -1 ); } if( *data_block != NULL ) { memory_free( *data_block ); *data_block = NULL; } return( 1 ); } /* Clones the data block * Returns 1 if successful or -1 on error */ int libpff_data_block_clone( libpff_data_block_t **destination_data_block, libpff_data_block_t *source_data_block, libcerror_error_t **error ) { static char *function = "libpff_data_block_clone"; if( destination_data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination data block.", function ); return( -1 ); } if( *destination_data_block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination data block already set.", function ); return( -1 ); } if( source_data_block == NULL ) { *destination_data_block = NULL; return( 1 ); } if( libpff_data_block_initialize( destination_data_block, source_data_block->descriptor_identifier, source_data_block->data_identifier, source_data_block->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination data block.", function ); return( -1 ); } if( *destination_data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination data block.", function ); return( -1 ); } ( *destination_data_block )->flags = source_data_block->flags; return( 1 ); } /* Reads a data block data * Returns the number of bytes read if successful or -1 on error */ ssize_t libpff_data_block_read_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int segment_index, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ) { libpff_data_block_t *data_block = NULL; static char *function = "libpff_data_block_read_entry_data"; ssize_t read_count = 0; if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data block IO handle.", function ); return( -1 ); } data_block = (libpff_data_block_t *) io_handle; if( data_block->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid data block - missing IO handle.", function ); return( -1 ); } if( segment_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } read_count = libpff_data_block_read( file_io_handle, data_block->io_handle->file_type, data_block->data_identifier, data, data_size, &( data_block->flags ), error ); if( read_count != (ssize_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data block data.", function ); return( -1 ); } if( libpff_data_block_decrypt_data( data_block, data_block->io_handle->encryption_type, data, data_size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ENCRYPTION, LIBCERROR_ENCRYPTION_ERROR_DECRYPT_FAILED, "%s: unable to decrypt data block data.", function ); return( -1 ); } return( (ssize_t) data_size ); } /* Reads the data block * Returns the number of bytes read if successful or -1 on error */ ssize_t libpff_data_block_read( libbfio_handle_t *file_io_handle, uint8_t file_type, uint64_t data_identifier, uint8_t *data, size_t data_size, uint8_t *flags, libcerror_error_t **error ) { uint8_t *data_block_data = NULL; uint8_t *data_block_footer = NULL; static char *function = "libpff_data_block_read"; size_t data_block_size = 0; size_t data_block_footer_size = 0; size_t data_block_padding_size = 0; ssize_t read_count = 0; uint64_t data_block_back_pointer = 0; uint32_t calculated_crc = 0; uint32_t stored_crc = 0; uint16_t data_block_data_size = 0; uint16_t data_block_signature = 0; if( ( file_type != LIBPFF_FILE_TYPE_32BIT ) && ( file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: data size value exceeds maximum.", function ); return( -1 ); } if( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { data_block_footer_size = sizeof( pff_block_footer_32bit_t ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { data_block_footer_size = sizeof( pff_block_footer_64bit_t ); } if( data_size > 0 ) { read_count = libbfio_handle_read_buffer( file_io_handle, data, data_size, error ); if( read_count != (ssize_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read data block data.", function ); return( -1 ); } } if( ( *flags & LIBPFF_DATA_BLOCK_FLAG_VALIDATED ) == 0 ) { if( data_size > 0 ) { data_block_size = data_size / 64; if( ( data_size % 64 ) != 0 ) { data_block_size += 1; } data_block_size *= 64; if( ( data_block_size - data_size ) < data_block_footer_size ) { data_block_size += 64; } data_block_padding_size = data_block_size - data_size; data_block_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_block_padding_size ); if( data_block_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create remaining data block data.", function ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, data_block_data, data_block_padding_size, error ); if( read_count != (ssize_t) data_block_padding_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read remaining data block data.", function ); memory_free( data_block_data ); return( -1 ); } data_block_padding_size -= data_block_footer_size; data_block_footer = &( data_block_data[ data_block_padding_size ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data block padding size\t: %" PRIzd "\n", function, data_block_padding_size ); libcnotify_printf( "%s: data block padding:\n", function ); libcnotify_print_data( data_block_data, data_block_padding_size, 0 ); libcnotify_printf( "%s: data block footer:\n", function ); libcnotify_print_data( data_block_footer, data_block_footer_size, 0 ); } #endif if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->size, data_block_data_size ); byte_stream_copy_to_uint16_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->signature, data_block_signature ); byte_stream_copy_to_uint32_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->back_pointer, data_block_back_pointer ); byte_stream_copy_to_uint32_little_endian( ( (pff_block_footer_32bit_t *) data_block_footer )->crc, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint16_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->size, data_block_data_size ); byte_stream_copy_to_uint16_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->signature, data_block_signature ); byte_stream_copy_to_uint32_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->crc, stored_crc ); byte_stream_copy_to_uint64_little_endian( ( (pff_block_footer_64bit_t *) data_block_footer )->back_pointer, data_block_back_pointer ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: data block data size\t: %" PRIu16 "\n", function, data_block_data_size ); libcnotify_printf( "%s: data block signature\t: 0x%04" PRIx16 "\n", function, data_block_signature ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { libcnotify_printf( "%s: data block back pointer\t: 0x%08" PRIx64 "\n", function, data_block_back_pointer ); libcnotify_printf( "%s: data block data crc\t: 0x%08" PRIx32 "\n", function, stored_crc ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { libcnotify_printf( "%s: data block data crc\t: 0x%08" PRIx32 "\n", function, stored_crc ); libcnotify_printf( "%s: data block back pointer\t: 0x%08" PRIx64 "\n", function, data_block_back_pointer ); } libcnotify_printf( "\n" ); } #endif memory_free( data_block_data ); if( data_block_data_size != 0 ) { if( data_size != (size_t) data_block_data_size ) { /* TODO flag size mismatch and error tollerance */ *flags |= LIBPFF_DATA_BLOCK_FLAG_SIZE_MISMATCH; libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_INPUT, LIBCERROR_INPUT_ERROR_VALUE_MISMATCH, "%s: mismatch in data size ( %" PRIzd " != %" PRIu16 " ).", function, data_size, data_block_data_size ); return( -1 ); } } if( stored_crc != 0 ) { if( libfmapi_crc32_weak_calculate( &calculated_crc, data, data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unable to calculate CRC-32.", function ); return( -1 ); } if( stored_crc != calculated_crc ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in data block CRC-32 ( %" PRIu32 " != %" PRIu32 " ).\n", function, stored_crc, calculated_crc ); } #endif *flags |= LIBPFF_DATA_BLOCK_FLAG_CRC_MISMATCH; /* TODO smart error handling */ } } if( data_block_back_pointer != 0 ) { if( data_identifier != data_block_back_pointer ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: mismatch in data identifier: %" PRIu64 " and back pointer: 0x%08" PRIx64 ".\n", function, data_identifier, data_block_back_pointer ); } #endif *flags |= LIBPFF_DATA_BLOCK_FLAG_IDENTIFIER_MISMATCH; /* TODO smart error handling */ } } } *flags |= LIBPFF_DATA_BLOCK_FLAG_VALIDATED; } return( (ssize_t) data_size ); } /* Decrypts the data block data * Returns 1 if successful or -1 on error */ int libpff_data_block_decrypt_data( libpff_data_block_t *data_block, uint8_t encryption_type, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ) { static char *function = "libpff_data_block_decrypt_data"; ssize_t process_count = 0; uint8_t decrypt_data = 0; uint8_t force_decryption = 0; uint8_t node_identifier_type = 0; uint8_t node_contains_table = 0; if( data_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data block.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: data size value exceeds maximum.", function ); return( -1 ); } /* Check if internal (unencrypted) flag in the (data) offset index identifier is not set */ if( ( data_block->data_identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) == 0 ) { decrypt_data = 1; } /* Check if data is encrypted * Some 'invalid' files have an encryption type of none but contain encrypted data * Although they are considered invalid by Outlook it is still possilble to read them */ if( ( encryption_type == LIBPFF_ENCRYPTION_TYPE_NONE ) && ( ( flags & LIBPFF_READ_FLAG_IGNORE_FORCE_DECRYPTION ) == 0 ) && ( data_size > 4 ) ) { node_identifier_type = (uint8_t) ( data_block->descriptor_identifier & 0x0000001fUL ); /* Check if the node identifier type consists of a table */ if( ( ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_INTERNAL ) && ( ( data_block->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_MESSAGE_STORE ) || ( data_block->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP ) || ( data_block->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2049 ) || ( data_block->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2081 ) || ( data_block->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2113 ) || ( data_block->descriptor_identifier == LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_3073 ) ) ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_FOLDER ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_FOLDER ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_MESSAGE ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_ASSOCIATED_CONTENT ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SUB_FOLDERS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SUB_MESSAGES ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SUB_ASSOCIATED_CONTENTS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CONTENTS_TABLE ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENTS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_RECIPIENTS ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1718 ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1751 ) || ( node_identifier_type == LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1784 ) ) { node_contains_table = 1; } if( node_contains_table != 0 ) { /* Test if the data contains an unencrypted table * a table consists of 0xec in the third byte * and 0x6c, 0x7c, 0x8c, 0x9c, 0xa5, 0xac, 0xbc, 0xcc in the fourth */ if( ( data[ 2 ] != 0xec ) || ( ( data[ 3 ] != 0x6c ) && ( data[ 3 ] != 0x7c ) && ( data[ 3 ] != 0x8c ) && ( data[ 3 ] != 0x9c ) && ( data[ 3 ] != 0xa5 ) && ( data[ 3 ] != 0xac ) && ( data[ 3 ] != 0xbc ) && ( data[ 3 ] != 0xcc ) ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table signature missing trying to force decryption.\n", function ); } #endif force_decryption = 1; encryption_type = LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE; decrypt_data = 1; data_block->flags |= LIBPFF_DATA_BLOCK_FLAG_DECRYPTION_FORCED; } } else if( data_block->io_handle->force_decryption == 1 ) { /* Check if the internal (unencrypted) flag in (data) offset index identifier is not set */ if( ( data_block->data_identifier & LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL ) == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: decryption forced.\n", function ); } #endif encryption_type = LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE; decrypt_data = 1; data_block->flags |= LIBPFF_DATA_BLOCK_FLAG_DECRYPTION_FORCED; } } } if( decrypt_data != 0 ) { process_count = libpff_encryption_decrypt( encryption_type, (uint32_t) data_block->data_identifier, data, data_size, error ); if( process_count != (ssize_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ENCRYPTION, LIBCERROR_ENCRYPTION_ERROR_DECRYPT_FAILED, "%s: unable to decrypt data block data.", function ); return( -1 ); } if( force_decryption != 0 ) { /* Test if the data contains an unencrypted table * a table consists of 0xec in the third byte * and 0x6c, 0x7c, 0x8c, 0x9c, 0xa5, 0xac, 0xbc, 0xcc in the fourth */ if( ( data[ 2 ] == 0xec ) && ( ( data[ 3 ] == 0x6c ) || ( data[ 3 ] == 0x7c ) || ( data[ 3 ] == 0x8c ) || ( data[ 3 ] == 0x9c ) || ( data[ 3 ] == 0xa5 ) || ( data[ 3 ] == 0xac ) || ( data[ 3 ] == 0xbc ) || ( data[ 3 ] == 0xcc ) ) ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: compressible encrypted data detected while encryption type is none - decryption forced.\n", function ); } #endif data_block->io_handle->force_decryption = 1; } } } return( 1 ); } libpff-20120802/libpff/libpff_error.h0000644000175000017500000000321012005155304014212 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_ERROR_H ) #define _LIBPFF_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBPFF ) #include #endif #include "libpff_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBPFF ) LIBPFF_EXTERN \ void libpff_error_free( libpff_error_t **error ); LIBPFF_EXTERN \ int libpff_error_fprint( libpff_error_t *error, FILE *stream ); LIBPFF_EXTERN \ int libpff_error_sprint( libpff_error_t *error, char *string, size_t size ); LIBPFF_EXTERN \ int libpff_error_backtrace_fprint( libpff_error_t *error, FILE *stream ); LIBPFF_EXTERN \ int libpff_error_backtrace_sprint( libpff_error_t *error, char *string, size_t size ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_libfdata.h0000644000175000017500000000310312005155304014630 00000000000000/* * The libfdata header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBFDATA_H ) #define _LIBPFF_LIBFDATA_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFDATA_DLL_IMPORT * before including libfdata.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFDATA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_index_value.h0000644000175000017500000000447312005155304015400 00000000000000/* * Index value functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INDEX_VALUES_H ) #define _LIBPFF_INDEX_VALUES_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_index_value libpff_index_value_t; struct libpff_index_value { /* The identifier value */ uint64_t identifier; union { /* Definition for branch node */ struct { /* The back pointer */ uint64_t back_pointer; }; /* Definition for offset index leaf node */ struct { /* The file offset */ off64_t file_offset; /* The data size */ size32_t data_size; /* The reference count */ uint16_t reference_count; }; /* Definition for a descriptor index leaf node */ struct { /* The data identifier * Refers to a value in the file offset index */ uint64_t data_identifier; /* The local descriptors identifier * Refers to a value in the file offset index */ uint64_t local_descriptors_identifier; /* The parent identifier * Refers to a value in descriptor index */ uint32_t parent_identifier; }; }; }; int libpff_index_value_initialize( libpff_index_value_t **index_value, libcerror_error_t **error ); int libpff_index_value_free( libpff_index_value_t **index_value, libcerror_error_t **error ); int libpff_index_value_compare( libpff_index_value_t *first_index_value, libpff_index_value_t *second_index_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_index.h0000644000175000017500000000604112005155304014175 00000000000000/* * Index functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INDEX_H ) #define _LIBPFF_INDEX_H #include #include #include "libpff_index_value.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_index libpff_index_t; struct libpff_index { /* A reference to the IO handle */ libpff_io_handle_t *io_handle; /* The index type */ uint8_t type; /* The root node offset */ off64_t root_node_offset; /* The root node back pointer */ uint64_t root_node_back_pointer; /* Value to indicate if the index was recovered */ uint8_t recovered; }; int libpff_index_initialize( libpff_index_t **index, libpff_io_handle_t *io_handle, uint8_t type, off64_t root_node_offset, uint64_t root_node_back_pointer, uint8_t recovered, libcerror_error_t **error ); int libpff_index_free( libpff_index_t **index, libcerror_error_t **error ); int libpff_index_clone( libpff_index_t **destination_index, libpff_index_t *source_index, libcerror_error_t **error ); int libpff_index_read_node( libpff_index_t *index, libbfio_handle_t *file_io_handle, off64_t node_offset, libfdata_tree_node_t *index_tree_node, libpff_index_value_t *index_value, libcerror_error_t **error ); int libpff_index_read_node_entry( libpff_index_t *index, libbfio_handle_t *file_io_handle, off64_t node_offset, uint8_t entry_index, libfdata_tree_node_t *index_tree_node, libpff_index_value_t *index_value, libcerror_error_t **error ); int libpff_index_read_node_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags, libcerror_error_t **error ); int libpff_index_read_sub_nodes( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_attachment.h0000644000175000017500000000406512005155304015222 00000000000000/* * Attachment functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ATTACHMENT_H ) #define _LIBPFF_ATTACHMENT_H #include #include #include "libpff_extern.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBPFF_EXTERN \ int libpff_attachment_get_type( libpff_item_t *attachment, int *attachment_type, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_attachment_get_data_size( libpff_item_t *attachment, size64_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ ssize_t libpff_attachment_data_read_buffer( libpff_item_t *attachment, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); LIBPFF_EXTERN \ off64_t libpff_attachment_data_seek_offset( libpff_item_t *attachment, off64_t offset, int whence, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_attachment_get_data_file_io_handle( libpff_item_t *attachment, libbfio_handle_t **file_io_handle, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_attachment_get_item( libpff_item_t *attachment, libpff_item_t **attached_item, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/pff_value_data.h0000644000175000017500000000346312005155305014512 00000000000000/* * The value data definitions of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_VALUE_DATA_H ) #define _PFF_VALUE_DATA_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_folder_information_reference pff_folder_information_reference_t; struct pff_folder_information_reference { /* Padding * Consists of 4 bytes */ uint8_t padding[ 4 ]; /* The GUID * Consists of 16 bytes */ uint8_t guid[ 16 ]; /* The folder information data identifier * Refers to a descriptor index identifier refering to a folder information table * Consists of 4 bytes */ uint8_t data_identifier[ 4 ]; }; typedef struct pff_name_to_id_map_entry pff_name_to_id_map_entry_t; struct pff_name_to_id_map_entry { /* The entry value or value reference * Consists of 4 bytes */ uint8_t entry_value[ 4 ]; /* The entry type * Consists of 2 bytes */ uint8_t entry_type[ 2 ]; /* The entry number * Consists of 2 bytes */ uint8_t entry_number[ 2 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_allocation_table.h0000644000175000017500000000263712005155304016371 00000000000000/* * Allocation table functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ALLOCATION_TABLE_H ) #define _LIBPFF_ALLOCATION_TABLE_H #include #include #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_offset_list.h" #if defined( __cplusplus ) extern "C" { #endif #define LIBPFF_ALLOCATION_TABLE_TYPE_PAGE 0x83 #define LIBPFF_ALLOCATION_TABLE_TYPE_DATA 0x84 int libpff_allocation_table_read( libpff_offset_list_t *unallocated_block_list, libbfio_handle_t *file_io_handle, off64_t allocation_table_offset, uint8_t file_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_definitions.h0000664000175000017500000002433612006536127015421 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_DEFINITIONS_H ) #define _LIBPFF_INTERNAL_DEFINITIONS_H #include #include /* The endian definitions */ #define LIBPFF_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBPFF_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE /* Define HAVE_LOCAL_LIBPFF for local use of libpff */ #if !defined( HAVE_LOCAL_LIBPFF ) #include /* The definitions in are copied here * for local use of libpff */ #else #define LIBPFF_VERSION 20120802 /* The version string */ #define LIBPFF_VERSION_STRING "20120802" /* The file access flags * bit 1 set to 1 for read access * bit 2 set to 1 for write access * bit 3-8 not used */ enum LIBPFF_ACCESS_FLAGS { LIBPFF_ACCESS_FLAG_READ = 0x01, /* Reserved: not supported yet */ LIBPFF_ACCESS_FLAG_WRITE = 0x02 }; /* The file access macros */ #define LIBPFF_OPEN_READ ( LIBPFF_ACCESS_FLAG_READ ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_WRITE ( LIBPFF_ACCESS_FLAG_WRITE ) /* Reserved: not supported yet */ #define LIBPFF_OPEN_READ_WRITE ( LIBPFF_ACCESS_FLAG_READ | LIBPFF_ACCESS_FLAG_WRITE ) /* TODO deprecated remove after a while */ #define LIBPFF_FLAG_READ LIBPFF_ACCESS_FLAG_READ #define LIBPFF_FLAG_WRITE LIBPFF_ACCESS_FLAG_WRITE /* The recovery flags */ enum LIBPFF_RECOVERY_FLAGS { LIBPFF_RECOVERY_FLAG_IGNORE_ALLOCATION_DATA = 0x01, LIBPFF_RECOVERY_FLAG_SCAN_FOR_FRAGMENTS = 0x02 }; /* The file types */ enum LIBPFF_FILE_TYPES { LIBPFF_FILE_TYPE_32BIT = 32, LIBPFF_FILE_TYPE_64BIT = 64 }; /* The file content types */ enum LIBPFF_FILE_CONTENT_TYPES { LIBPFF_FILE_CONTENT_TYPE_PAB = (int) 'a', LIBPFF_FILE_CONTENT_TYPE_PST = (int) 'p', LIBPFF_FILE_CONTENT_TYPE_OST = (int) 'o' }; /* The encryption types */ enum LIBPFF_ENCRYPTION_TYPES { LIBPFF_ENCRYPTION_TYPE_NONE = 0, LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE = 1, LIBPFF_ENCRYPTION_TYPE_HIGH = 2 }; /* The item types * These item types partially map to the message classes * LIBPFF_ITEM_TYPE_UNDEFINED (initialization value) * LIBPFF_ITEM_TYPE_ACTIVITY IPM.Activity * LIBPFF_ITEM_TYPE_APPOINTMENT IPM.Appointment * LIBPFF_ITEM_TYPE_ATTACHMENT (attachment) * LIBPFF_ITEM_TYPE_ATTACHMENTS (attachments) * LIBPFF_ITEM_TYPE_COMMON IPM * LIBPFF_ITEM_TYPE_CONFIGURATION IPM.Configuration.* * LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE IPM.Conflict.Message * LIBPFF_ITEM_TYPE_CONTACT IPM.Contact * LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST IPM.DistList * LIBPFF_ITEM_TYPE_DOCUMENT IPM.Document.* * LIBPFF_ITEM_TYPE_EMAIL IPM.Note, REPORT.IPM.Note.* * LIBPFF_ITEM_TYPE_EMAIL_SMIME IPM.Note.SMIME.* * LIBPFF_ITEM_TYPE_FAX IPM.FAX, IPM.Note.Fax * LIBPFF_ITEM_TYPE_FOLDER (folder/container) * LIBPFF_ITEM_TYPE_MEETING IPM.Schedule.Meeting * LIBPFF_ITEM_TYPE_MMS IPM.Note.Mobile.MMS * LIBPFF_ITEM_TYPE_NOTE IPM.StickyNote * LIBPFF_ITEM_TYPE_POSTING_NOTE IPM.Post * LIBPFF_ITEM_TYPE_RECIPIENTS (recipients) * LIBPFF_ITEM_TYPE_RSS_FEED IPM.Post.RSS * LIBPFF_ITEM_TYPE_SHARING IPM.Sharing.* * LIBPFF_ITEM_TYPE_SMS IPM.Note.Mobile.SMS * LIBPFF_ITEM_TYPE_TASK IPM.Task * LIBPFF_ITEM_TYPE_TASK_REQUEST IPM.TaskRequest.* * LIBPFF_ITEM_TYPE_VOICEMAIL IPM.Note.Voicemail * LIBPFF_ITEM_TYPE_UNKNOWN (unknown item type, used in folder content type) * * Unsupported: * IPM.Post */ enum LIBPFF_ITEM_TYPES { LIBPFF_ITEM_TYPE_UNDEFINED, LIBPFF_ITEM_TYPE_ACTIVITY, LIBPFF_ITEM_TYPE_APPOINTMENT, LIBPFF_ITEM_TYPE_ATTACHMENT, LIBPFF_ITEM_TYPE_ATTACHMENTS, LIBPFF_ITEM_TYPE_COMMON, LIBPFF_ITEM_TYPE_CONFIGURATION, LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE, LIBPFF_ITEM_TYPE_CONTACT, LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST, LIBPFF_ITEM_TYPE_DOCUMENT, LIBPFF_ITEM_TYPE_EMAIL, LIBPFF_ITEM_TYPE_EMAIL_SMIME, LIBPFF_ITEM_TYPE_FAX, LIBPFF_ITEM_TYPE_FOLDER, LIBPFF_ITEM_TYPE_MEETING, LIBPFF_ITEM_TYPE_MMS, LIBPFF_ITEM_TYPE_NOTE, LIBPFF_ITEM_TYPE_POSTING_NOTE, LIBPFF_ITEM_TYPE_RECIPIENTS, LIBPFF_ITEM_TYPE_RSS_FEED, LIBPFF_ITEM_TYPE_SHARING, LIBPFF_ITEM_TYPE_SMS, LIBPFF_ITEM_TYPE_SUB_ASSOCIATED_CONTENTS, LIBPFF_ITEM_TYPE_SUB_FOLDERS, LIBPFF_ITEM_TYPE_SUB_MESSAGES, LIBPFF_ITEM_TYPE_TASK, LIBPFF_ITEM_TYPE_TASK_REQUEST, LIBPFF_ITEM_TYPE_VOICEMAIL, LIBPFF_ITEM_TYPE_UNKNOWN }; /* The attachment types */ enum LIBPFF_ATTACHMENT_TYPES { LIBPFF_ATTACHMENT_TYPE_UNDEFINED = 0, LIBPFF_ATTACHMENT_TYPE_DATA = (int) 'd', LIBPFF_ATTACHMENT_TYPE_ITEM = (int) 'i', LIBPFF_ATTACHMENT_TYPE_REFERENCE = (int) 'r' }; /* The unallocated block type */ enum LIBPFF_UNALLOCATED_BLOCK_TYPES { LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA = (int) 'd', LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE = (int) 'p' }; /* The name to id map entry types */ enum LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPES { LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC = (int) 'n', LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING = (int) 's' }; /* The entry value flags */ enum LIBPFF_ENTRY_VALUE_FLAGS { LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE = 0x01, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP = 0x02 }; #endif /* !defined( HAVE_LOCAL_LIBPFF ) */ /* The index types */ enum LIBPFF_INDEX_TYPES { LIBPFF_INDEX_TYPE_OFFSET = 0x80, LIBPFF_INDEX_TYPE_DESCRIPTOR = 0x81 }; /* The node identifier type * Stored in the 5 LSB of the descriptor identifier */ enum LIBPFF_NODE_IDENTIFIER_TYPES { LIBPFF_NODE_IDENTIFIER_TYPE_TABLE_VALUE = 0x00, LIBPFF_NODE_IDENTIFIER_TYPE_INTERNAL = 0x01, LIBPFF_NODE_IDENTIFIER_TYPE_FOLDER = 0x02, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_FOLDER = 0x03, LIBPFF_NODE_IDENTIFIER_TYPE_MESSAGE = 0x04, LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENT = 0x05, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_UPDATE_QUEUE = 0x06, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CRITERIA_OBJECT = 0x07, LIBPFF_NODE_IDENTIFIER_TYPE_ASSOCIATED_CONTENT = 0x08, LIBPFF_NODE_IDENTIFIER_TYPE_CONTENTS_TABLE_INDEX = 0x0a, LIBPFF_NODE_IDENTIFIER_TYPE_INBOX = 0x0b, LIBPFF_NODE_IDENTIFIER_TYPE_OUTBOX = 0x0c, LIBPFF_NODE_IDENTIFIER_TYPE_SUB_FOLDERS = 0x0d, LIBPFF_NODE_IDENTIFIER_TYPE_SUB_MESSAGES = 0x0e, LIBPFF_NODE_IDENTIFIER_TYPE_SUB_ASSOCIATED_CONTENTS = 0x0f, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_CONTENTS_TABLE = 0x10, LIBPFF_NODE_IDENTIFIER_TYPE_ATTACHMENTS = 0x11, LIBPFF_NODE_IDENTIFIER_TYPE_RECIPIENTS = 0x12, LIBPFF_NODE_IDENTIFIER_TYPE_SEARCH_TABLE = 0x13, LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1718 = 0x16, LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1751 = 0x17, LIBPFF_NODE_IDENTIFIER_TYPE_UNKNOWN_1784 = 0x18, LIBPFF_NODE_IDENTIFIER_TYPE_LOCAL_DESCRIPTOR_VALUE = 0x1f }; /* Predefined descriptor identifiers */ enum LIBPFF_DESCRIPTOR_IDENTIFIERS { LIBPFF_DESCRIPTOR_IDENTIFIER_MESSAGE_STORE = 0x0021, LIBPFF_DESCRIPTOR_IDENTIFIER_NAME_TO_ID_MAP = 0x0061, LIBPFF_DESCRIPTOR_IDENTIFIER_FOLDER_TEMPLATE = 0x00a1, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_FOLDER_TEMPLATE = 0x00c1, LIBPFF_DESCRIPTOR_IDENTIFIER_ROOT_FOLDER = 0x0122, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_MANAGEMENT_QUEUE = 0x01e1, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_ACTIVITY_LIST = 0x0201, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_RESERVED1 = 0x0241, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_GATHERER_QUEUE = 0x0281, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_GATHERER_DESCRIPTOR = 0x02a1, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_RESERVED2 = 0x02e1, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_RESERVED3 = 0x0301, LIBPFF_DESCRIPTOR_IDENTIFIER_SEARCH_GATHERER_FOLDER_QUEUE = 0x0321, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2049 = 0x0801, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2081 = 0x0821, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_2113 = 0x0841, LIBPFF_DESCRIPTOR_IDENTIFIER_UNKNOWN_3073 = 0x0c01, }; /* Predefined local descriptor identifiers */ enum LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIERS { LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS = 0x0671, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS = 0x0692, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1718 = 0x06b6, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1753 = 0x06d9, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_UNKNOWN_1781 = 0x06f5, }; /* Flags for the data_array_read_segment function */ enum LIBPFF_READ_FLAGS { LIBPFF_READ_FLAG_IGNORE_FORCE_DECRYPTION = 0x02 }; /* The mask for the (file) offset index identifier * The lower order bit of the (file) offset index identifier is used for other purposes * and needs to be excluded when the identifier is searched in the index */ #define LIBPFF_OFFSET_INDEX_IDENTIFIER_MASK 0xfffffffffffffffeULL /* The 2nd LSB of the (file) offset index identifier is used to flag * if the block is intended for internal use (contains a data array or local descriptors) * or external use (contains raw data or a table) */ #define LIBPFF_OFFSET_INDEX_IDENTIFIER_FLAG_INTERNAL 0x0000000000000002ULL /* The item flags */ enum LIBPFF_ITEM_FLAGS { LIBPFF_ITEM_FLAG_NON_MANAGED_FILE_IO_HANDLE = 0x00, LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE = 0x01, LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE = 0x02, }; /* The maximum number of cache entries defintions */ #define LIBPFF_MAXIMUM_CACHE_ENTRIES_INDEX_NODES 16384 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_DESCRIPTOR_INDEX_VALUES 8192 - 3 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_OFFSET_INDEX_VALUES 32768 - 3 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_LOCAL_DESCRIPTORS_NODES 256 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_LOCAL_DESCRIPTORS_VALUES 128 - 3 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_DATA_ARRAY 8 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_DATA_BLOCK 1 #define LIBPFF_MAXIMUM_CACHE_ENTRIES_ITEM 8 #endif libpff-20120802/libpff/libpff_message.c0000644000175000017500000021603612005155304014514 00000000000000/* * Message functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_item.h" #include "libpff_item_descriptor.h" #include "libpff_item_tree.h" #include "libpff_item_values.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_mapi.h" #include "libpff_message.h" #include "libpff_item.h" #include "libpff_libuna.h" #include "libpff_value_type.h" #define LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS 0 #define LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS 1 /* Retrieves the UTF-8 string size of a specific entry from the referenced message item * Length includes the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ int libpff_message_get_entry_value_utf8_string_size( libpff_item_t *message, uint32_t entry_type, size_t *utf8_string_size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_entry_value_utf8_string_size"; size_t value_data_size = 0; uint32_t ascii_codepage = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, entry_type, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { result = libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE, &ascii_codepage, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message codepage.", function ); return( -1 ); } else if( result == 0 ) { ascii_codepage = (uint32_t) internal_item->internal_file->io_handle->ascii_codepage; } is_ascii_string = 1; } if( libpff_value_type_get_utf8_string_size( value_data, value_data_size, is_ascii_string, ascii_codepage, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size.", function ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-8 string value of a specific entry from the referenced message item * The function uses a codepage if necessary, it uses the codepage set for the library * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ int libpff_message_get_entry_value_utf8_string( libpff_item_t *message, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_entry_value_utf8_string"; size_t value_data_size = 0; uint32_t ascii_codepage = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, entry_type, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { result = libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE, &ascii_codepage, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message codepage.", function ); return( -1 ); } else if( result == 0 ) { ascii_codepage = (uint32_t) internal_item->internal_file->io_handle->ascii_codepage; } is_ascii_string = 1; } if( libpff_value_type_copy_to_utf8_string( value_data, value_data_size, is_ascii_string, ascii_codepage, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string size of a specific entry from the referenced message item * Length includes the end of string character * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ int libpff_message_get_entry_value_utf16_string_size( libpff_item_t *message, uint32_t entry_type, size_t *utf16_string_size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_entry_value_utf16_string_size"; size_t value_data_size = 0; uint32_t ascii_codepage = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, entry_type, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { result = libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE, &ascii_codepage, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message codepage.", function ); return( -1 ); } else if( result == 0 ) { ascii_codepage = (uint32_t) internal_item->internal_file->io_handle->ascii_codepage; } is_ascii_string = 1; } if( libpff_value_type_get_utf16_string_size( value_data, value_data_size, is_ascii_string, ascii_codepage, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size.", function ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Retrieves the UTF-16 string value of a specific entry from the referenced message item * The function uses a codepage if necessary, it uses the codepage set for the library * Returns 1 if successful, 0 if the message does not contain such value or -1 on error */ int libpff_message_get_entry_value_utf16_string( libpff_item_t *message, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_entry_value_utf16_string"; size_t value_data_size = 0; uint32_t ascii_codepage = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, entry_type, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { result = libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE, &ascii_codepage, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message codepage.", function ); return( -1 ); } else if( result == 0 ) { ascii_codepage = (uint32_t) internal_item->internal_file->io_handle->ascii_codepage; } is_ascii_string = 1; } if( libpff_value_type_copy_to_utf16_string( value_data, value_data_size, is_ascii_string, ascii_codepage, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string.", function ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Determine if the message item has attachments * Returns 1 if successful or -1 on error */ int libpff_message_determine_attachments( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_item_descriptor_t *item_descriptor = NULL; libpff_item_descriptor_t *attachments_item_descriptor = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_determine_attachments"; size_t value_data_size = 0; uint32_t attachment_descriptor_identifier = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; int attachment_iterator = 0; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing internal file.", function ); return( -1 ); } if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item tree node.", function ); return( -1 ); } if( internal_item->item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid item tree node - missing value.", function ); return( -1 ); } item_descriptor = (libpff_item_descriptor_t *) internal_item->item_tree_node->value; if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item values.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: attachments sub item tree node already set.", function ); return( -1 ); } /* Make sure the item values have been read */ /* TODO is this still needed ? */ if( internal_item->item_values->table == NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading item values of descriptor: %" PRIu32 "\n", function, item_descriptor->descriptor_identifier ); } #endif if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item values - missing table.", function ); return( -1 ); } } /* Determine if the item has attachments */ result = libpff_item_values_get_local_descriptors_value_by_identifier( internal_item->item_values, internal_item->file_io_handle, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS ); return( -1 ); } else if( result != 0 ) { if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif if( libpff_item_values_initialize( &( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] ), (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier , item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attachments item values.", function ); return( -1 ); } /* Cache the attachments items values for successive usage */ if( libpff_item_values_read( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read attachments local descriptor recipiens identifier: %" PRIu32 ".", function, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ]->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachments item values - missing table.", function ); return( -1 ); } /* Create an attachments item descriptor */ if( libpff_item_descriptor_initialize( &attachments_item_descriptor, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier , item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attachments item descriptor.", function ); return( -1 ); } if( libpff_tree_node_initialize( &( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attachments sub item tree node.", function ); memory_free( attachments_item_descriptor ); return( -1 ); } if( libpff_tree_node_set_value( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], (intptr_t *) attachments_item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set attachments item descriptor in attachments sub item tree node.", function ); libpff_tree_node_free( &( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] ), NULL, NULL ); memory_free( attachments_item_descriptor ); return( -1 ); } for( attachment_iterator = 0; attachment_iterator < internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ]->table->number_of_sets; attachment_iterator++ ) { if( libpff_item_values_get_entry_value( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, attachment_iterator, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER, &value_type, &value_data_reference, &value_data_cache, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, &attachment_descriptor_identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } result = libpff_item_values_get_local_descriptors_value_by_identifier( internal_item->item_values, internal_item->file_io_handle, attachment_descriptor_identifier, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, attachment_descriptor_identifier ); return( -1 ); } /* TODO error tollerability flag an attachment as missing if result == 0 */ else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptor identifier: %" PRIu32 ".", function, attachment_descriptor_identifier ); return( -1 ); } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif /* Make the attachment item the sub item of the attachments */ if( libpff_item_tree_append_identifier( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], attachment_descriptor_identifier, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier, item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append attachment item: %" PRIu32 " to attachments item tree node.", function ); return( -1 ); } } } return( 1 ); } /* Determine if the message item has recipients * Returns 1 if successful or -1 on error */ int libpff_message_determine_recipients( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libpff_item_descriptor_t *item_descriptor = NULL; libpff_item_descriptor_t *recipients_item_descriptor = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; static char *function = "libpff_message_determine_recipients"; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing internal file.", function ); return( -1 ); } if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item tree node.", function ); return( -1 ); } if( internal_item->item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid item tree node - missing value.", function ); return( -1 ); } item_descriptor = (libpff_item_descriptor_t *) internal_item->item_tree_node->value; if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item values.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ] != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: recipients sub item tree node already set.", function ); return( -1 ); } /* Make sure the item values have been read */ if( internal_item->item_values->table == NULL ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading item values of descriptor: %" PRIu32 "\n", function, item_descriptor->descriptor_identifier ); } #endif if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item values - missing table.", function ); return( -1 ); } } /* Determine if the item has recipients */ result = libpff_item_values_get_local_descriptors_value_by_identifier( internal_item->item_values, internal_item->file_io_handle, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, (uint32_t) LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS ); return( -1 ); } else if( result != 0 ) { if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif if( libpff_item_values_initialize( &( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ] ), LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier , item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recipients item values.", function ); return( -1 ); } /* Cache the recipients items values for successive usage */ if( libpff_item_values_read( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ], internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read recipients local descriptor identifier: %" PRIu32 ".", function, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS ); return( -1 ); } if( internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ]->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid recipients item values - missing table.", function ); return( -1 ); } /* Create an recipients item descriptor */ if( libpff_item_descriptor_initialize( &recipients_item_descriptor, LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier , item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recipients item descriptor.", function ); return( -1 ); } if( libpff_tree_node_initialize( &( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recipients sub item tree node.", function ); memory_free( recipients_item_descriptor ); return( -1 ); } if( libpff_tree_node_set_value( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ], (intptr_t *) recipients_item_descriptor, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set recipients item descriptor in recipients sub item tree node.", function ); libpff_tree_node_free( &( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ] ), NULL, NULL ); memory_free( recipients_item_descriptor ); return( -1 ); } /* All the recipient data is in the recipients item * there are no sub items like for the attachments item */ } return( 1 ); } /* Retrieves the number of attachments from a message item * Returns 1 if successful or -1 on error */ int libpff_message_get_number_of_attachments( libpff_item_t *message, int *number_of_attachments, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_message_get_number_of_attachments"; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item tree node.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENT ) || ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENTS ) || ( internal_item->type == LIBPFF_ITEM_TYPE_FOLDER ) || ( internal_item->type == LIBPFF_ITEM_TYPE_RECIPIENTS ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( number_of_attachments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of attachments.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] == NULL ) { if( libpff_message_determine_attachments( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine attachments.", function ); return( -1 ); } } *number_of_attachments = 0; if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] != NULL ) { *number_of_attachments = internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ]->number_of_sub_nodes; } return( 1 ); } /* Retrieves the attachment for the specific index from a message item * Returns 1 if successful or -1 on error */ int libpff_message_get_attachment( libpff_item_t *message, int attachment_index, libpff_item_t **attachment, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *attachment_tree_node = NULL; static char *function = "libpff_message_get_attachment"; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item tree node.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item values.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENT ) || ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENTS ) || ( internal_item->type == LIBPFF_ITEM_TYPE_FOLDER ) || ( internal_item->type == LIBPFF_ITEM_TYPE_RECIPIENTS ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } if( *attachment != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: attachment already set.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] == NULL ) { if( libpff_message_determine_attachments( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine attachments.", function ); return( -1 ); } } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] != NULL ) { if( ( attachment_index < 0 ) || ( (uint64_t) attachment_index > (uint64_t) UINT32_MAX ) || ( attachment_index >= internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ]->number_of_sub_nodes ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid attachment index value out of bounds.", function ); return( -1 ); } if( libpff_tree_node_get_sub_node_by_index( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], attachment_index, &attachment_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachment item tree node.", function ); return( -1 ); } if( attachment_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment item tree node.", function ); return( -1 ); } if( libpff_item_initialize( attachment, internal_item->file_io_handle, internal_item->internal_file, attachment_tree_node, (libpff_item_descriptor_t *) attachment_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT | LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attachment.", function ); return( -1 ); } if( *attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment.", function ); return( -1 ); } ( (libpff_internal_item_t *) *attachment )->type = LIBPFF_ITEM_TYPE_ATTACHMENT; } return( 1 ); } /* Retrieves the attachments from a message item * Returns 1 if successful, 0 if the message item does not contain such value or -1 on error */ int libpff_message_get_attachments( libpff_item_t *message, libpff_item_t **attachments, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_message_get_attachments"; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item tree node.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item values.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENT ) || ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENTS ) || ( internal_item->type == LIBPFF_ITEM_TYPE_FOLDER ) || ( internal_item->type == LIBPFF_ITEM_TYPE_RECIPIENTS ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( attachments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachments.", function ); return( -1 ); } if( *attachments != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: attachments already set.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] == NULL ) { if( libpff_message_determine_attachments( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine attachments.", function ); return( -1 ); } } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ] == NULL ) { return( 0 ); } if( libpff_item_initialize( attachments, internal_item->file_io_handle, internal_item->internal_file, internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], (libpff_item_descriptor_t *) internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ]->value, LIBPFF_ITEM_FLAGS_DEFAULT | LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attachments.", function ); return( -1 ); } if( *attachments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachments.", function ); return( -1 ); } ( (libpff_internal_item_t *) *attachments )->type = LIBPFF_ITEM_TYPE_ATTACHMENTS; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *attachments )->item_values, internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_ATTACHMENTS ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy attachments item values.", function ); libpff_item_free( attachments, NULL ); return( -1 ); } return( 1 ); } /* Retrieves the recipients from a message item * Returns 1 if successful, 0 if the message item does not contain such value or -1 on error */ int libpff_message_get_recipients( libpff_item_t *message, libpff_item_t **recipients, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_message_get_recipients"; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item tree node.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid message - missing item values.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } if( ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENT ) || ( internal_item->type == LIBPFF_ITEM_TYPE_ATTACHMENTS ) || ( internal_item->type == LIBPFF_ITEM_TYPE_FOLDER ) || ( internal_item->type == LIBPFF_ITEM_TYPE_RECIPIENTS ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported item type: 0x%08" PRIx32 "", function, internal_item->type ); return( -1 ); } if( recipients == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid recipients.", function ); return( -1 ); } if( *recipients != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: recipients already set.", function ); return( -1 ); } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ] == NULL ) { if( libpff_message_determine_recipients( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine recipients.", function ); return( -1 ); } } if( internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ] == NULL ) { return( 0 ); } if( libpff_item_initialize( recipients, internal_item->file_io_handle, internal_item->internal_file, internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ], (libpff_item_descriptor_t *) internal_item->sub_item_tree_node[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ]->value, LIBPFF_ITEM_FLAGS_DEFAULT | LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recipients.", function ); return( -1 ); } if( *recipients == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid recipients.", function ); return( -1 ); } ( (libpff_internal_item_t *) *recipients )->type = LIBPFF_ITEM_TYPE_RECIPIENTS; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *recipients )->item_values, internal_item->sub_item_values[ LIBPFF_MESSAGE_SUB_ITEM_RECIPIENTS ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy recipients item values.", function ); libpff_item_free( recipients, NULL ); return( -1 ); } return( 1 ); } /* Retrieves the plain text message body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_message_get_plain_text_body_size( libpff_item_t *message, size_t *size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_plain_text_body_size"; size_t value_data_size = 0; uint32_t ascii_codepage = 0; uint32_t message_codepage = 0; uint32_t message_body_codepage = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_PLAIN_TEXT, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { if( libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_CODEPAGE, &message_body_codepage, 0, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message body codepage.", function ); return( -1 ); } if( libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE, &message_codepage, 0, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message codepage.", function ); return( -1 ); } /* TODO ignore the message body codepage for now if( message_body_codepage != 0 ) { ascii_codepage = message_body_codepage; } else if( message_codepage != 0 ) */ if( message_body_codepage != 0 ) { ascii_codepage = message_codepage; } else { ascii_codepage = (uint32_t) internal_item->internal_file->io_handle->ascii_codepage; } is_ascii_string = 1; } if( libpff_value_type_get_utf8_string_size( value_data, value_data_size, is_ascii_string, ascii_codepage, size, error ) != 1 ) { /* Sometimes the message codepage is not available */ if( ( message_codepage == message_body_codepage ) || ( message_codepage == 0 ) ) { message_codepage = internal_item->internal_file->io_handle->ascii_codepage; } /* Sometimes the message body codepade is not the one used to encode * the message body, so try the message codepage as well */ if( ( ascii_codepage == message_codepage ) || ( libpff_value_type_get_utf8_string_size( value_data, value_data_size, is_ascii_string, message_codepage, size, error ) != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine message body size.", function ); return( -1 ); } libcerror_error_free( error ); } } else if( value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) { /* Add the end of string byte */ *size = value_data_size + 1; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Retrieves the plain text message body * The body is encoded in UTF-8 * The function uses a codepage if necessary, it tries to read PidTagInternetCodepage first, * after that PidTagMessageCodepage and if not available it uses the codepage set for the library * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_message_get_plain_text_body( libpff_item_t *message, uint8_t *message_body, size_t size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_plain_text_body"; size_t value_data_size = 0; uint32_t ascii_codepage = 0; uint32_t message_codepage = 0; uint32_t message_body_codepage = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( message_body == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message body.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_PLAIN_TEXT, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { if( libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_CODEPAGE, &message_body_codepage, 0, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message body codepage.", function ); return( -1 ); } if( libpff_item_get_entry_value_32bit( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE, &message_codepage, 0, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve the message codepage.", function ); return( -1 ); } /* TODO ignore the message body codepage for now if( message_body_codepage != 0 ) { ascii_codepage = message_body_codepage; } else if( message_codepage != 0 ) */ if( message_codepage != 0 ) { ascii_codepage = message_codepage; } else { ascii_codepage = (uint32_t) internal_item->internal_file->io_handle->ascii_codepage; } is_ascii_string = 1; } if( libpff_value_type_copy_to_utf8_string( value_data, value_data_size, is_ascii_string, ascii_codepage, message_body, size, error ) != 1 ) { /* Sometimes the message codepage is not available */ if( ( message_codepage == message_body_codepage ) || ( message_codepage == 0 ) ) { message_codepage = internal_item->internal_file->io_handle->ascii_codepage; } /* Sometimes the message body codepade is not the one used to encode * the message body, so try the message codepage as well */ if( ( ascii_codepage == message_codepage ) || ( libpff_value_type_copy_to_utf8_string( value_data, value_data_size, is_ascii_string, message_codepage, message_body, size, error ) != 1 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set message body.", function ); return( -1 ); } libcerror_error_free( error ); } } else if( value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) { if( size < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: message body size too small.", function ); return( -1 ); } if( memory_copy( message_body, value_data, value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set message body .", function ); return( -1 ); } /* Add the end of string byte */ message_body[ value_data_size ] = 0; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Retrieves the RTF message body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_message_get_rtf_body_size( libpff_item_t *message, size_t *size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_message_get_rtf_body_size"; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_COMPRESSED_RTF, &value_type, &value_data, size, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( value_data == NULL ) { *size = 0; } else if( libfmapi_lzfu_get_uncompressed_data_size( value_data, *size, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable to determine uncompressed RTF body size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the RTF message body * The body is encoded in UTF-8 * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_message_get_rtf_body( libpff_item_t *message, uint8_t *message_body, size_t size, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_message_get_rtf_body"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } if( message_body == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message body.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_COMPRESSED_RTF, &value_type, &value_data, &value_data_size, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( libfmapi_lzfu_decompress( message_body, &size, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_COMPRESSION, LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED, "%s: unable to decompress message body.", function ); return( -1 ); } return( 1 ); } /* Retrieves the HTML message body size * Size includes the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_message_get_html_body_size( libpff_item_t *message, size_t *size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_html_body_size"; size_t value_data_size = 0; uint32_t value_type = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_HTML, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( value_data == NULL ) { return( 0 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { *size = value_data_size; if( value_data[ value_data_size - 1 ] != 0 ) { /* Add the end of string byte */ *size += 1; } } else if( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) { *size = value_data_size; if( ( value_data[ value_data_size - 1 ] != 0 ) || ( value_data[ value_data_size - 2 ] != 0 ) ) { /* Add the end of string byte */ *size += 2; } } else if( value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) { *size = value_data_size; if( value_data[ value_data_size - 1 ] != 0 ) { /* Add the end of string byte */ *size += 1; } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } /* Retrieves the HTML message body * Size should include the end of string character * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_message_get_html_body( libpff_item_t *message, uint8_t *message_body, size_t size, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_message_get_html_body"; size_t value_data_size = 0; uint32_t value_type = 0; int result = 0; if( message == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) message; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( message_body == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid message body.", function ); return( -1 ); } result = libpff_item_get_entry_value( message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_HTML, &value_type, &value_data, &value_data_size, 1, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( value_data == NULL ) { return( 0 ); } if( ( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) || ( value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) ) { if( size < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: message body size too small.", function ); return( -1 ); } if( memory_copy( message_body, value_data, value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set message body .", function ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { if( value_data[ value_data_size - 1 ] != 0 ) { if( ( size + 1 ) < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: message body size too small.", function ); return( -1 ); } message_body[ value_data_size ] = 0; } } else if( value_type == LIBPFF_VALUE_TYPE_STRING_UNICODE ) { if( ( value_data[ value_data_size - 1 ] != 0 ) || ( value_data[ value_data_size - 2 ] != 0 ) ) { if( ( size + 2 ) < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: message body size too small.", function ); return( -1 ); } message_body[ value_data_size ] = 0; message_body[ value_data_size + 1 ] = 0; } } else if( value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) { if( value_data[ value_data_size - 1 ] != 0 ) { if( ( size + 1 ) < value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: message body size too small.", function ); return( -1 ); } message_body[ value_data_size ] = 0; } } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/pff_array.h0000644000175000017500000000301112005155304013507 00000000000000/* * The array definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_ARRAY_H ) #define _PFF_ARRAY_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_array pff_array_t; struct pff_array { /* The array signature * Consists of 1 byte * Contains 0x01 */ uint8_t signature; /* The array entries level * Consists of 1 byte */ uint8_t array_entries_level; /* The number of array entries * Consists of 2 bytes */ uint8_t number_of_entries[ 2 ]; /* The total data size * Consists of 4 bytes */ uint8_t total_data_size[ 4 ]; /* The array entries * Consist of 4 bytes each * Contains a (file) offset index identifier */ }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_mapi.h0000644000175000017500000003012312005155304014012 00000000000000/* * Message API (MAPI) definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_MAPI_H ) #define _LIBPFFPFF_INTERNAL_H #include #include #ifdef __cplusplus extern "C" { #endif #if !defined( HAVE_LOCAL_LIBPFF ) #include /* Define HAVE_LOCAL_LIBPFF for local use of libpff * The definitions in are copied here * for local use of libpff */ #else /* The attachment methods */ enum LIBPFF_ATTACHMENT_METHODS { LIBPFF_ATTACHMENT_METHOD_NONE = 0, LIBPFF_ATTACHMENT_METHOD_BY_VALUE = 1, LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE = 2, LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE_RESOLVE = 3, LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE_ONLY = 4, LIBPFF_ATTACHMENT_METHOD_EMBEDDED_MESSAGE = 5, LIBPFF_ATTACHMENT_METHOD_OLE = 6 }; /* The message flags */ enum LIBPFF_MESSAGE_FLAGS { LIBPFF_MESSAGE_FLAG_READ = 0x00000001, LIBPFF_MESSAGE_FLAG_UNMODIFIED = 0x00000002, LIBPFF_MESSAGE_FLAG_SUBMIT = 0x00000004, LIBPFF_MESSAGE_FLAG_UNSENT = 0x00000008, LIBPFF_MESSAGE_FLAG_HAS_ATTACHMENTS = 0x00000010, LIBPFF_MESSAGE_FLAG_FROM_ME = 0x00000020, LIBPFF_MESSAGE_FLAG_ASSOCIATED = 0x00000040, LIBPFF_MESSAGE_FLAG_RESEND = 0x00000080, LIBPFF_MESSAGE_FLAG_RN_PENDING = 0x00000100, LIBPFF_MESSAGE_FLAG_NRN_PENDING = 0x00000200 }; /* The message importance types */ enum LIBPFF_MESSAGE_IMPORTANCE_TYPES { LIBPFF_MESSAGE_IMPORTANCE_TYPE_LOW = 0, LIBPFF_MESSAGE_IMPORTANCE_TYPE_NORMAL = 1, LIBPFF_MESSAGE_IMPORTANCE_TYPE_HIGH = 2 }; /* The message priority types */ enum LIBPFF_MESSAGE_PRIORITY_TYPES { LIBPFF_MESSAGE_PRIORITY_TYPE_NON_URGENT = -1, LIBPFF_MESSAGE_PRIORITY_TYPE_NORMAL = 0, LIBPFF_MESSAGE_PRIORITY_TYPE_URGENT = 1 }; /* The message sensitivity types */ enum LIBPFF_MESSAGE_SENSITIVITY_TYPES { LIBPFF_MESSAGE_SENSITIVITY_TYPE_NONE = 0, LIBPFF_MESSAGE_SENSITIVITY_TYPE_PERSONAL = 1, LIBPFF_MESSAGE_SENSITIVITY_TYPE_PRIVATE = 2, LIBPFF_MESSAGE_SENSITIVITY_TYPE_CONFIDENTIAL = 3 }; /* The message store valid folder masks */ enum LIBPFF_MESSAGE_STORE_VALID_FOLDER_MASKS { LIBPFF_VALID_FOLDER_MASK_SUBTREE = 0x00000001, LIBPFF_VALID_FOLDER_MASK_INBOX = 0x00000002, LIBPFF_VALID_FOLDER_MASK_OUTBOX = 0x00000004, LIBPFF_VALID_FOLDER_MASK_WASTEBOX = 0x00000008, LIBPFF_VALID_FOLDER_MASK_SENTMAIL = 0x00000010, LIBPFF_VALID_FOLDER_MASK_VIEWS = 0x00000020, LIBPFF_VALID_FOLDER_MASK_COMMON_VIEWS = 0x00000040, LIBPFF_VALID_FOLDER_MASK_FINDER = 0x00000080 }; /* The object types * TODO enum LIBPFF_OBJECT_TYPES { MAPI_STORE = 0x00000001, MAPI_ADDRBOOK = 0x00000002, MAPI_FOLDER = 0x00000003, MAPI_ABCONT = 0x00000004, MAPI_MESSAGE = 0x00000005, MAPI_MAILUSER = 0x00000006, MAPI_ATTACH = 0x00000007, MAPI_DISTLIST = 0x00000008, MAPI_PROFSECT = 0x00000009, MAPI_STATUS = 0x0000000a, MAPI_SESSION = 0x0000000b, MAPI_FORMINFO = 0x0000000c }; */ /* The recipient type */ enum LIBPFF_RECIPIENT_TYPES { LIBPFF_RECIPIENT_TYPE_ORIGINATOR = 0, LIBPFF_RECIPIENT_TYPE_TO = 1, LIBPFF_RECIPIENT_TYPE_CC = 2, LIBPFF_RECIPIENT_TYPE_BCC = 3 }; /* The value types */ enum LIBPFF_VALUE_TYPES { LIBPFF_VALUE_TYPE_UNSPECIFIED = 0x0000, LIBPFF_VALUE_TYPE_NULL = 0x0001, LIBPFF_VALUE_TYPE_INTEGER_16BIT_SIGNED = 0x0002, LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED = 0x0003, LIBPFF_VALUE_TYPE_FLOAT_32BIT = 0x0004, LIBPFF_VALUE_TYPE_DOUBLE_64BIT = 0x0005, LIBPFF_VALUE_TYPE_CURRENCY = 0x0006, LIBPFF_VALUE_TYPE_APPLICATION_TIME = 0x0007, LIBPFF_VALUE_TYPE_ERROR = 0x000a, LIBPFF_VALUE_TYPE_BOOLEAN = 0x000b, LIBPFF_VALUE_TYPE_OBJECT = 0x000d, LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED = 0x0014, LIBPFF_VALUE_TYPE_STRING_ASCII = 0x001e, LIBPFF_VALUE_TYPE_STRING_UNICODE = 0x001f, LIBPFF_VALUE_TYPE_FILETIME = 0x0040, LIBPFF_VALUE_TYPE_GUID = 0x0048, LIBPFF_VALUE_TYPE_SERVER_IDENTIFIER = 0x00fb, LIBPFF_VALUE_TYPE_RESTRICTION = 0x00fd, LIBPFF_VALUE_TYPE_RULE_ACTION = 0x00fe, LIBPFF_VALUE_TYPE_BINARY_DATA = 0x0102, LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_16BIT_SIGNED = 0x1002, LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_32BIT_SIGNED = 0x1003, LIBPFF_VALUE_TYPE_MULTI_VALUE_FLOAT_32BIT = 0x1004, LIBPFF_VALUE_TYPE_MULTI_VALUE_DOUBLE_64BIT = 0x1005, LIBPFF_VALUE_TYPE_MULTI_VALUE_CURRENCY = 0x1006, LIBPFF_VALUE_TYPE_MULTI_VALUE_APPLICATION_TIME = 0x1007, LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_64BIT_SIGNED = 0x1014, LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_ASCII = 0x101e, LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_UNICODE = 0x101f, LIBPFF_VALUE_TYPE_MULTI_VALUE_FILETIME = 0x1040, LIBPFF_VALUE_TYPE_MULTI_VALUE_GUID = 0x1048, LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA = 0x1102 }; #define LIBPFF_VALUE_TYPE_MULTI_VALUE_FLAG 0x1000 /* The entry types */ enum LIBPFF_ENTRY_TYPES { LIBPFF_ENTRY_TYPE_MESSAGE_IMPORTANCE = 0x0017, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS = 0x001a, LIBPFF_ENTRY_TYPE_MESSAGE_PRIORITY = 0x0026, LIBPFF_ENTRY_TYPE_MESSAGE_SENSITIVITY = 0x0036, LIBPFF_ENTRY_TYPE_MESSAGE_SUBJECT = 0x0037, LIBPFF_ENTRY_TYPE_MESSAGE_CLIENT_SUBMIT_TIME = 0x0039, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_SEARCH_KEY = 0x003b, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_ENTRY_IDENTIFIER = 0x003f, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_NAME = 0x0040, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_ENTRY_IDENTIFIER = 0x0041, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME = 0x0042, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_ENTRY_IDENTIFIER = 0x0043, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_NAME = 0x0044, LIBPFF_ENTRY_TYPE_MESSAGE_REPLY_RECIPIENT_ENTRIES = 0x004f, LIBPFF_ENTRY_TYPE_MESSAGE_REPLY_RECIPIENT_NAMES = 0x0050, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_SEARCH_KEY = 0x0051, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_SEARCH_KEY = 0x0052, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_ADDRESS_TYPE = 0x0064, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS = 0x0065, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC = 0x0070, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_INDEX = 0x0071, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_ADDRESS_TYPE = 0x0075, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_BY_EMAIL_ADDRESS = 0x0076, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_ADDRESS_TYPE = 0x0077, LIBPFF_ENTRY_TYPE_MESSAGE_RECEIVED_REPRESENTING_EMAIL_ADDRESS = 0x0078, LIBPFF_ENTRY_TYPE_MESSAGE_TRANSPORT_HEADERS = 0x007d, LIBPFF_ENTRY_TYPE_RECIPIENT_TYPE = 0x0c15, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_ENTRY_IDENTIFIER = 0x0c19, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME = 0x0c1a, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_SEARCH_KEY = 0x0c1d, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_ADDRESS_TYPE = 0x0c1e, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS = 0x0c1f, LIBPFF_ENTRY_TYPE_MESSAGE_DISPLAY_TO = 0x0e04, LIBPFF_ENTRY_TYPE_MESSAGE_DELIVERY_TIME = 0x0e06, LIBPFF_ENTRY_TYPE_MESSAGE_FLAGS = 0x0e07, LIBPFF_ENTRY_TYPE_MESSAGE_SIZE = 0x0e08, LIBPFF_ENTRY_TYPE_MESSAGE_STATUS = 0x0e17, LIBPFF_ENTRY_TYPE_ATTACHMENT_SIZE = 0x0e20, LIBPFF_ENTRY_TYPE_MESSAGE_INTERNET_ARTICLE_NUMBER = 0x0e23, LIBPFF_ENTRY_TYPE_MESSAGE_PERMISSION = 0x0e27, LIBPFF_ENTRY_TYPE_MESSAGE_URL_COMPUTER_NAME_SET = 0x0e62, LIBPFF_ENTRY_TYPE_MESSAGE_TRUST_SENDER = 0x0e79, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_PLAIN_TEXT = 0x1000, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_COMPRESSED_RTF = 0x1009, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_HTML = 0x1013, LIBPFF_ENTRY_TYPE_EMAIL_EML_FILENAME = 0x10f3, LIBPFF_ENTRY_TYPE_DISPLAY_NAME = 0x3001, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE = 0x3002, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS = 0x3003, LIBPFF_ENTRY_TYPE_MESSAGE_CREATION_TIME = 0x3007, LIBPFF_ENTRY_TYPE_MESSAGE_MODIFICATION_TIME = 0x3008, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_VALID_FOLDER_MASK = 0x35df, LIBPFF_ENTRY_TYPE_FOLDER_TYPE = 0x3601, LIBPFF_ENTRY_TYPE_NUMBER_OF_CONTENT_ITEMS = 0x3602, LIBPFF_ENTRY_TYPE_NUMBER_OF_UNREAD_CONTENT_ITEMS = 0x3603, LIBPFF_ENTRY_TYPE_HAS_SUB_FOLDERS = 0x360a, LIBPFF_ENTRY_TYPE_CONTAINER_CLASS = 0x3613, LIBPFF_ENTRY_TYPE_NUMBER_OF_ASSOCIATED_CONTENT = 0x3617, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT = 0x3701, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_SHORT = 0x3704, LIBPFF_ENTRY_TYPE_ATTACHMENT_METHOD = 0x3705, LIBPFF_ENTRY_TYPE_ATTACHMENT_FILENAME_LONG = 0x3707, LIBPFF_ENTRY_TYPE_ATTACHMENT_RENDERING_POSITION = 0x370b, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER = 0x3a02, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION = 0x3a05, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME = 0x3a06, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1 = 0x3a08, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER = 0x3a09, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS = 0x3a0a, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME = 0x3a11, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS = 0x3a15, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME = 0x3a16, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE = 0x3a17, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME = 0x3a18, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION = 0x3a19, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER = 0x3a1a, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2 = 0x3a1b, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER = 0x3a1c, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER = 0x3a24, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY = 0x3a26, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY = 0x3a27, LIBPFF_ENTRY_TYPE_CONTACT_TITLE = 0x3a45, LIBPFF_ENTRY_TYPE_MESSAGE_BODY_CODEPAGE = 0x3fde, LIBPFF_ENTRY_TYPE_MESSAGE_CODEPAGE = 0x3ffd, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME = 0x5ff6, LIBPFF_ENTRY_TYPE_FOLDER_CHILD_COUNT = 0x6638, LIBPFF_ENTRY_TYPE_SUB_ITEM_IDENTIFIER = 0x67f2, LIBPFF_ENTRY_TYPE_MESSAGE_STORE_PASSWORD_CHECKSUM = 0x67ff, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER = 0x8005, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1 = 0x8083, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2 = 0x8093, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3 = 0x80a3, LIBPFF_ENTRY_TYPE_TASK_STATUS = 0x8101, LIBPFF_ENTRY_TYPE_TASK_PERCENTAGE_COMPLETE = 0x8102, LIBPFF_ENTRY_TYPE_TASK_START_DATE = 0x8104, LIBPFF_ENTRY_TYPE_TASK_DUE_DATE = 0x8105, LIBPFF_ENTRY_TYPE_TASK_ACTUAL_EFFORT = 0x8110, LIBPFF_ENTRY_TYPE_TASK_TOTAL_EFFORT = 0x8111, LIBPFF_ENTRY_TYPE_TASK_VERSION = 0x8112, LIBPFF_ENTRY_TYPE_TASK_IS_COMPLETE = 0x811c, LIBPFF_ENTRY_TYPE_TASK_IS_RECURRING = 0x8126, LIBPFF_ENTRY_TYPE_APPOINTMENT_BUSY_STATUS = 0x8205, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION = 0x8208, LIBPFF_ENTRY_TYPE_APPOINTMENT_START_TIME = 0x820d, LIBPFF_ENTRY_TYPE_APPOINTMENT_END_TIME = 0x820e, LIBPFF_ENTRY_TYPE_APPOINTMENT_DURATION = 0x8213, LIBPFF_ENTRY_TYPE_APPOINTMENT_IS_RECURRING = 0x8223, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN = 0x8232, LIBPFF_ENTRY_TYPE_APPOINTMENT_TIMEZONE_DESCRIPTION = 0x8234, LIBPFF_ENTRY_TYPE_APPOINTMENT_FIRST_EFFECTIVE_TIME = 0x8235, LIBPFF_ENTRY_TYPE_APPOINTMENT_LAST_EFFECTIVE_TIME = 0x8236, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_TIME = 0x8502, LIBPFF_ENTRY_TYPE_MESSAGE_IS_REMINDER = 0x8503, LIBPFF_ENTRY_TYPE_MESSAGE_IS_PRIVATE = 0x8506, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_SIGNAL_TIME = 0x8550 }; #endif #ifdef __cplusplus } #endif #endif libpff-20120802/libpff/libpff_libcnotify.h0000644000175000017500000000253712005155304015236 00000000000000/* * The internal libcnotify header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBCNOTIFY_H ) #define _LIBPFF_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_item.h0000644000175000017500000002116512005155304014030 00000000000000/* * Item functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_ITEM_H ) #define _LIBPFF_INTERNAL_ITEM_H #include #include #include "libpff_extern.h" #include "libpff_file.h" #include "libpff_item_descriptor.h" #include "libpff_item_values.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_multi_value.h" #include "libpff_tree_type.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_DEBUG_OUTPUT ) #define LIBPFF_ITEM_FLAGS_DEFAULT LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE #else #define LIBPFF_ITEM_FLAGS_DEFAULT LIBPFF_ITEM_FLAG_NON_MANAGED_FILE_IO_HANDLE #endif #define LIBPFF_ITEM_NUMBER_OF_SUB_ITEMS 4 typedef struct libpff_internal_item libpff_internal_item_t; struct libpff_internal_item { /* The file IO handle */ libbfio_handle_t *file_io_handle; /* The internal file */ libpff_internal_file_t *internal_file; /* The item tree node */ libpff_tree_node_t *item_tree_node; /* The item type */ uint8_t type; /* The item flags */ uint8_t flags; /* The item descriptor */ libpff_item_descriptor_t *item_descriptor; /* The item values */ libpff_item_values_t *item_values; /* Sub item tree nodes */ libpff_tree_node_t *sub_item_tree_node[ LIBPFF_ITEM_NUMBER_OF_SUB_ITEMS ]; /* Sub item values */ libpff_item_values_t *sub_item_values[ LIBPFF_ITEM_NUMBER_OF_SUB_ITEMS ]; /* Embedded object data reference */ libfdata_reference_t *embedded_object_data_reference; /* Embedded object data cache */ libfcache_cache_t *embedded_object_data_cache; }; int libpff_item_initialize( libpff_item_t **item, libbfio_handle_t *file_io_handle, libpff_internal_file_t *internal_file, libpff_tree_node_t *item_tree_node, libpff_item_descriptor_t *item_descriptor, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_free( libpff_item_t **item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_clone( libpff_item_t **destination_item, libpff_item_t *source_item, libcerror_error_t **error ); int libpff_item_determine_type( libpff_internal_item_t *internal_item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_identifier( libpff_item_t *item, uint32_t *identifier, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_number_of_sets( libpff_item_t *item, uint32_t *number_of_sets, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_number_of_entries( libpff_item_t *item, uint32_t *number_of_entries, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_type( libpff_item_t *item, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_value_type( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_by_utf8_name( libpff_item_t *item, int set_index, uint8_t *utf8_entry_name, size_t utf8_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_by_utf16_name( libpff_item_t *item, int set_index, uint16_t *utf16_entry_name, size_t utf16_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_boolean( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_16bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_32bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_64bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_filetime( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_floating_point( libpff_item_t *item, int set_index, uint32_t entry_type, double *entry_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf8_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf8_string_size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf8_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf16_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *utf16_string_size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_utf16_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_binary_data_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_binary_data( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *binary_data, size_t size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_value_guid( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *guid, size_t size, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_entry_multi_value( libpff_item_t *item, int set_index, uint32_t entry_type, libpff_multi_value_t **multi_value, uint8_t flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_type( libpff_item_t *item, uint8_t *item_type, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_number_of_sub_items( libpff_item_t *item, int *number_of_sub_items, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_sub_item( libpff_item_t *item, int sub_item_index, libpff_item_t **sub_item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_item_get_sub_item_by_identifier( libpff_item_t *item, uint32_t sub_item_identifier, libpff_item_t **sub_item, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_file.h0000644000175000017500000001420512005155304014006 00000000000000/* * File functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_FILE_H ) #define _LIBPFF_INTERNAL_FILE_H #include #include #include "libpff_extern.h" #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_list_type.h" #include "libpff_offset_list.h" #include "libpff_tree_type.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_internal_file libpff_internal_file_t; struct libpff_internal_file { /* The IO handle */ libpff_io_handle_t *io_handle; /* The file IO handle */ libbfio_handle_t *file_io_handle; /* Value to indicate if the file IO handle was created inside the library */ uint8_t file_io_handle_created_in_library; /* The item tree root node */ libpff_tree_node_t *item_tree_root_node; /* The root folder item tree node */ libpff_tree_node_t *root_folder_item_tree_node; /* The orphan item list */ libpff_list_t *orphan_item_list; /* The recovered item list */ libpff_list_t *recovered_item_list; /* Value to indicate if the allocation tables * have been read */ int read_allocation_tables; /* The unallocated data block (offset) list */ libpff_offset_list_t *unallocated_data_block_list; /* The unallocated page block (offset) list */ libpff_offset_list_t *unallocated_page_block_list; /* The name to id map list */ libpff_list_t *name_to_id_map_list; /* The content type */ int content_type; }; LIBPFF_EXTERN \ int libpff_file_initialize( libpff_file_t **file, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_free( libpff_file_t **file, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_signal_abort( libpff_file_t *file, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_open( libpff_file_t *file, const char *filename, int access_flags, libcerror_error_t **error ); #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBPFF_EXTERN \ int libpff_file_open_wide( libpff_file_t *file, const wchar_t *filename, int access_flags, libcerror_error_t **error ); #endif LIBPFF_EXTERN \ int libpff_file_open_file_io_handle( libpff_file_t *file, libbfio_handle_t *file_io_handle, int access_flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_close( libpff_file_t *file, libcerror_error_t **error ); int libpff_file_open_read( libpff_internal_file_t *internal_file, libcerror_error_t **error ); int libpff_file_read_allocation_tables( libpff_internal_file_t *internal_file, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_recover_items( libpff_file_t *file, uint8_t recovery_flags, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_size( libpff_file_t *file, size64_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_content_type( libpff_file_t *file, uint8_t *content_type, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_type( libpff_file_t *file, uint8_t *type, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_encryption_type( libpff_file_t *file, uint8_t *encryption_type, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_ascii_codepage( libpff_file_t *file, int *ascii_codepage, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_set_ascii_codepage( libpff_file_t *file, int ascii_codepage, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_number_of_unallocated_blocks( libpff_file_t *file, int unallocated_block_type, int *number_of_unallocated_blocks, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_unallocated_block( libpff_file_t *file, int unallocated_block_type, int unallocated_block_index, off64_t *offset, size64_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_root_item( libpff_file_t *file, libpff_item_t **root_item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_message_store( libpff_file_t *file, libpff_item_t **message_store, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_name_to_id_map( libpff_file_t *file, libpff_item_t **name_to_id_map, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_root_folder( libpff_file_t *file, libpff_item_t **root_folder, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_item_by_identifier( libpff_file_t *file, uint32_t item_identifier, libpff_item_t **item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_number_of_orphan_items( libpff_file_t *file, int *number_of_orphan_items, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_orphan_item( libpff_file_t *file, int orphan_item_index, libpff_item_t **orphan_item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_number_of_recovered_items( libpff_file_t *file, int *number_of_recovered_items, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_file_get_recovered_item( libpff_file_t *file, int recovered_item_index, libpff_item_t **recovered_item, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_libcstring.h0000644000175000017500000000262012005155304015225 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBCSTRING_H ) #define _LIBPFF_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_table_block.c0000644000175000017500000004223412005155304015326 00000000000000/* * Table block functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_array_type.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_table_block.h" #include "pff_table_block.h" /* Creates a table block value * Returns 1 if successful or -1 on error */ int libpff_table_block_value_initialize( libpff_table_block_value_t **table_block_value, libcerror_error_t **error ) { static char *function = "libpff_table_block_value_initialize"; if( table_block_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block value.", function ); return( -1 ); } if( *table_block_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table block value value already set.", function ); return( -1 ); } *table_block_value = memory_allocate_structure( libpff_table_block_value_t ); if( *table_block_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table block value.", function ); goto on_error; } if( memory_set( *table_block_value, 0, sizeof( libpff_table_block_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table block value.", function ); goto on_error; } return( 1 ); on_error: if( *table_block_value != NULL ) { memory_free( *table_block_value ); *table_block_value = NULL; } return( -1 ); } /* Frees the table block value * Returns 1 if successful or -1 on error */ int libpff_table_block_value_free( libpff_table_block_value_t **table_block_value, libcerror_error_t **error ) { static char *function = "libpff_table_block_value_free"; if( table_block_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block value.", function ); return( -1 ); } if( *table_block_value != NULL ) { /* The data is referenced and freed elsewhere */ memory_free( *table_block_value ); *table_block_value = NULL; } return( 1 ); } /* Creates a table_block * Returns 1 if successful or -1 on error */ int libpff_table_block_initialize( libpff_table_block_t **table_block, libcerror_error_t **error ) { static char *function = "libpff_table_block_initialize"; if( table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block.", function ); return( -1 ); } if( *table_block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table block value already set.", function ); return( -1 ); } *table_block = memory_allocate_structure( libpff_table_block_t ); if( *table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create table block.", function ); goto on_error; } if( memory_set( *table_block, 0, sizeof( libpff_table_block_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear table block.", function ); goto on_error; } if( libpff_array_initialize( &( ( *table_block )->values_array ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table block values array.", function ); goto on_error; } return( 1 ); on_error: if( *table_block != NULL ) { memory_free( *table_block ); *table_block = NULL; } return( -1 ); } /* Frees table_block * Returns 1 if successful or -1 on error */ int libpff_table_block_free( libpff_table_block_t **table_block, libcerror_error_t **error ) { static char *function = "libpff_table_block_free"; int result = 1; if( table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block.", function ); return( -1 ); } if( *table_block != NULL ) { if( libpff_array_free( &( ( *table_block )->values_array ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_table_block_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the table block values array.", function ); result = -1; } memory_free( *table_block ); *table_block = NULL; } return( result ); } /* Reads a table block and its values * Returns 1 if successful or -1 on error */ int libpff_table_block_read( libpff_table_block_t *table_block, libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_block_t *table_array_data_block, libfcache_cache_t *table_array_data_cache, libcerror_error_t **error ) { uint8_t *table_block_data = NULL; static char *function = "libpff_table_block_read"; size_t table_block_data_size = 0; uint16_t table_block_index_offset = 0; if( table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block.", function ); return( -1 ); } if( libfdata_block_get_segment_data( table_array_data_block, file_io_handle, table_array_data_cache, table_block->table_array_entry, &table_block_data, &table_block_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table block data: %d.", function, table_block->table_array_entry ); return( -1 ); } if( table_block_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing table block data.", function ); return( -1 ); } if( table_block_data_size < 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table block data size value out of bounds.", function ); return( -1 ); } byte_stream_copy_to_uint16_little_endian( table_block_data, table_block_index_offset ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table block index offset\t\t: %" PRIu16 "\n", function, table_block_index_offset ); libcnotify_printf( "\n" ); } #endif if( libpff_table_block_read_index( table_block, table_block_data, table_block_data_size, table_block_index_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read table block index.", function ); return( -1 ); } return( 1 ); } /* Reads the table block index * Returns 1 if successful or -1 on error */ int libpff_table_block_read_index( libpff_table_block_t *table_block, uint8_t *table_block_data, size_t table_block_data_size, uint16_t table_block_index_offset, libcerror_error_t **error ) { libpff_table_block_value_t *table_block_value = NULL; uint8_t *table_block_index_data = NULL; static char *function = "libpff_table_block_read_index"; uint16_t index_offset_iterator = 0; uint16_t number_of_index_offsets = 0; uint16_t number_of_unused_index_offsets = 0; uint16_t value_end_offset = 0; uint16_t value_start_offset = 0; if( table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block.", function ); return( -1 ); } if( table_block_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block data.", function ); return( -1 ); } if( table_block_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid table block data size value exceeds maximum.", function ); return( -1 ); } if( table_block_index_offset == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table block index offset.", function ); return( -1 ); } /* The table block index offset should point to an offset within the table block */ if( (size_t) table_block_index_offset >= table_block_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: table index block offset exceeds table block data size.", function ); return( -1 ); } table_block_index_data = &( table_block_data[ table_block_index_offset ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table block index:\n", function ); libcnotify_print_data( table_block_index_data, 4, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( ( (pff_table_block_index_t *) table_block_index_data )->number_of_offsets, number_of_index_offsets ); byte_stream_copy_to_uint16_little_endian( ( (pff_table_block_index_t *) table_block_index_data )->number_of_unused_offsets, number_of_unused_index_offsets ); table_block_index_data += 4; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: number of index offsets\t\t: %" PRIu16 "\n", function, number_of_index_offsets ); libcnotify_printf( "%s: number of unused index offsets\t: %" PRIu16 "\n", function, number_of_unused_index_offsets ); libcnotify_printf( "\n" ); } #endif if( (size_t) ( table_block_index_offset + 4 + ( ( number_of_index_offsets + 1 ) * 2 ) ) > table_block_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of index offsets do not fit in table block.", function ); return( -1 ); } if( number_of_index_offsets > 0 ) { if( libpff_array_resize( table_block->values_array, (int) number_of_index_offsets, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_table_block_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize table block index array.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table block index data:\n", function ); libcnotify_print_data( table_block_index_data, ( number_of_index_offsets + 1 ) * 2, 0 ); } #endif byte_stream_copy_to_uint16_little_endian( table_block_index_data, value_start_offset ); table_block_index_data += 2; for( index_offset_iterator = 0; index_offset_iterator < number_of_index_offsets; index_offset_iterator++ ) { byte_stream_copy_to_uint16_little_endian( table_block_index_data, value_end_offset ); table_block_index_data += 2; #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: table block value: %03" PRIu16 " index offset range\t: %" PRIu16 " - %" PRIu16 "\n", function, index_offset_iterator, value_start_offset, value_end_offset ); } #endif if( value_start_offset > value_end_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: table block index start offset: %" PRIu16 " exceeds end offset: %" PRIu16 ".", function, value_start_offset, value_end_offset ); return( -1 ); } if( libpff_table_block_value_initialize( &table_block_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create table block value.", function ); return( -1 ); } /* TODO check sanity of size */ table_block_value->offset = value_start_offset; table_block_value->size = value_end_offset - value_start_offset; if( libpff_array_set_entry_by_index( table_block->values_array, (int) index_offset_iterator, (intptr_t *) table_block_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set table block value: %" PRIu16 ".", function, index_offset_iterator ); libpff_table_block_value_free( &table_block_value, NULL ); return( -1 ); } table_block_value = NULL; value_start_offset = value_end_offset; } if( value_end_offset > table_block_index_offset ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: last index value end offset: %" PRIu16 " exceeds table block index offset: %" PRIu16 ".", function, value_end_offset, table_block_index_offset ); return( -1 ); } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "\n" ); if( value_end_offset < table_block_index_offset ) { libcnotify_printf( "%s: last index value end offset: %" PRIu16 " does not match table block index offset: %" PRIu16 "\n", function, value_start_offset, table_block_index_offset ); libcnotify_print_data( &( table_block_data[ value_end_offset ] ), table_block_index_offset - value_end_offset, 0 ); } if( (size_t) ( table_block_index_data - table_block_data ) != table_block_data_size ) { libcnotify_printf( "%s: trailing data of size: %" PRIzd "\n", function, table_block_data_size - (size_t) ( table_block_index_data - table_block_data ) ); libcnotify_print_data( table_block_index_data, table_block_data_size - (size_t) ( table_block_index_data - table_block_data ), 0 ); } } #endif return( 1 ); } /* Retrieves the number of table block values * Returns 1 if successful or -1 on error */ int libpff_table_block_get_number_of_values( libpff_table_block_t *table_block, int *number_of_values, libcerror_error_t **error ) { static char *function = "libpff_table_block_get_number_of_values"; if( table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block.", function ); return( -1 ); } if( libpff_array_get_number_of_entries( table_block->values_array, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of values.", function ); return( -1 ); } return( 1 ); } /* Retrieves the table block value at the index * Returns 1 if successful or -1 on error */ int libpff_table_block_get_value( libpff_table_block_t *table_block, int value_index, libpff_table_block_value_t **table_block_value, libcerror_error_t **error ) { static char *function = "libpff_table_block_get_value"; if( table_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table block.", function ); return( -1 ); } if( libpff_array_get_entry_by_index( table_block->values_array, value_index, (intptr_t **) table_block_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve table block value: %d.", function, value_index ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/Makefile.in0000664000175000017500000010252512006536016013452 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libpff DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/libpff.rc.in $(srcdir)/libpff_definitions.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = libpff_definitions.h libpff.rc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libpff_la_DEPENDENCIES = am_libpff_la_OBJECTS = libpff.lo libpff_allocation_table.lo \ libpff_array_type.lo libpff_attached_file_io_handle.lo \ libpff_attachment.lo libpff_column_definition.lo \ libpff_data_array.lo libpff_data_array_entry.lo \ libpff_data_block.lo libpff_debug.lo libpff_encryption.lo \ libpff_error.lo libpff_file.lo libpff_folder.lo \ libpff_free_map.lo libpff_index.lo libpff_index_node.lo \ libpff_index_tree.lo libpff_index_value.lo libpff_io_handle.lo \ libpff_item.lo libpff_item_descriptor.lo libpff_item_tree.lo \ libpff_item_values.lo libpff_list_type.lo \ libpff_local_descriptor_node.lo \ libpff_local_descriptor_value.lo libpff_local_descriptors.lo \ libpff_local_descriptors_tree.lo libpff_message.lo \ libpff_multi_value.lo libpff_name_to_id_map.lo \ libpff_notify.lo libpff_offset_list.lo libpff_support.lo \ libpff_table.lo libpff_table_block.lo libpff_tree_type.lo \ libpff_value_type.lo libpff_la_OBJECTS = $(am_libpff_la_OBJECTS) libpff_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libpff_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libpff_la_SOURCES) DIST_SOURCES = $(libpff_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBFMAPI_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ lib_LTLIBRARIES = libpff.la libpff_la_SOURCES = \ libpff.c \ libpff_allocation_table.c libpff_allocation_table.h \ libpff_array_type.c libpff_array_type.h \ libpff_attached_file_io_handle.c libpff_attached_file_io_handle.h \ libpff_attachment.c libpff_attachment.h \ libpff_codepage.h \ libpff_column_definition.c libpff_column_definition.h \ libpff_data_array.c libpff_data_array.h \ libpff_data_array_entry.c libpff_data_array_entry.h \ libpff_data_block.c libpff_data_block.h \ libpff_debug.c libpff_debug.h \ libpff_definitions.h \ libpff_encryption.c libpff_encryption.h \ libpff_error.c libpff_error.h \ libpff_extern.h \ libpff_file.c libpff_file.h \ libpff_folder.c libpff_folder.h \ libpff_free_map.c libpff_free_map.h \ libpff_index.c libpff_index.h \ libpff_index_node.c libpff_index_node.h \ libpff_index_tree.c libpff_index_tree.h \ libpff_index_value.c libpff_index_value.h \ libpff_io_handle.c libpff_io_handle.h \ libpff_item.c libpff_item.h \ libpff_item_descriptor.c libpff_item_descriptor.h \ libpff_item_tree.c libpff_item_tree.h \ libpff_item_values.c libpff_item_values.h \ libpff_libbfio.h \ libpff_libcerror.h \ libpff_libclocale.h \ libpff_libcnotify.h \ libpff_libcstring.h \ libpff_libfcache.h \ libpff_libfdata.h \ libpff_libfguid.h \ libpff_libfmapi.h \ libpff_libfvalue.h \ libpff_libuna.h \ libpff_list_type.c libpff_list_type.h \ libpff_local_descriptor_node.c libpff_local_descriptor_node.h \ libpff_local_descriptor_value.c libpff_local_descriptor_value.h \ libpff_local_descriptors.c libpff_local_descriptors.h \ libpff_local_descriptors_tree.c libpff_local_descriptors_tree.h \ libpff_mapi.h \ libpff_message.c libpff_message.h \ libpff_multi_value.c libpff_multi_value.h \ libpff_name_to_id_map.c libpff_name_to_id_map.h \ libpff_notify.c libpff_notify.h \ libpff_offset_list.c libpff_offset_list.h \ libpff_record_entry.h \ libpff_support.c libpff_support.h \ libpff_table.c libpff_table.h \ libpff_table_block.c libpff_table_block.h \ libpff_tree_type.c libpff_tree_type.h \ libpff_types.h \ libpff_unused.h \ libpff_value_type.c libpff_value_type.h \ pff_allocation_table.h \ pff_array.h \ pff_block.h \ pff_file_header.h \ pff_free_map.h \ pff_index_node.h \ pff_local_descriptor_node.h \ pff_table.h \ pff_table_block.h \ pff_value_data.h libpff_la_LIBADD = \ @LIBCSTRING_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCSPLIT_LIBADD@ \ @LIBUNA_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBBFIO_LIBADD@ \ @LIBFCACHE_LIBADD@ \ @LIBFDATA_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFMAPI_LIBADD@ libpff_la_LDFLAGS = -no-undefined -version-info 1:0:0 EXTRA_DIST = \ libpff_definitions.h.in \ libpff.rc \ libpff.rc.in MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libpff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libpff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libpff_definitions.h: $(top_builddir)/config.status $(srcdir)/libpff_definitions.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libpff.rc: $(top_builddir)/config.status $(srcdir)/libpff.rc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpff.la: $(libpff_la_OBJECTS) $(libpff_la_DEPENDENCIES) $(libpff_la_LINK) -rpath $(libdir) $(libpff_la_OBJECTS) $(libpff_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_allocation_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_array_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_attached_file_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_attachment.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_column_definition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_data_array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_data_array_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_data_block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_encryption.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_folder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_free_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_index.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_index_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_index_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_index_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_io_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_item_descriptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_item_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_item_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_list_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_local_descriptor_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_local_descriptor_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_local_descriptors.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_local_descriptors_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_multi_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_name_to_id_map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_offset_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_table_block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_tree_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpff_value_type.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES distclean: clean /bin/rm -f libpff_definitions.h /bin/rm -f libpff.rc /bin/rm -f Makefile splint: @echo "Running splint on libpff ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libpff_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libpff/pff_index_node.h0000644000175000017500000001361212005155304014515 00000000000000/* * The index node definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_INDEX_NODE_H ) #define _PFF_INDEX_NODE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #define PFF_INDEX_NODE_LEVEL_LEAF 0x00 typedef struct pff_index_node_32bit pff_index_node_32bit_t; struct pff_index_node_32bit { /* The node entries data * Consists of 496 bytes */ uint8_t entries_data[ 496 ]; /* The number of node entries * Consists of 1 byte */ uint8_t number_of_entries; /* The maximum number of node entries * Consists of 1 byte */ uint8_t maximum_number_of_entries; /* The entry size * Consists of 1 byte */ uint8_t entry_size; /* The level of the node * Consists of 1 byte */ uint8_t level; /* Type indicator * Consists of 1 byte */ uint8_t type; /* Copy of type indicator * Consists of 1 byte */ uint8_t type_copy; /* Signature * Consists of 2 bytes */ uint8_t signature[ 2 ]; /* The back pointer value * Consists of 4 bytes */ uint8_t back_pointer[ 4 ]; /* A weak CRC32 of the first 500 bytes * Consists of 4 bytes */ uint8_t crc[ 4 ]; }; typedef struct pff_index_node_branch_entry_32bit pff_index_node_branch_entry_32bit_t; struct pff_index_node_branch_entry_32bit { /* The first identifier of the sub node * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The back pointer * Consists of 4 bytes */ uint8_t back_pointer[ 4 ]; /* The file offset of the index sub node * Consists of 4 bytes */ uint8_t file_offset[ 4 ]; }; typedef struct pff_index_node_descriptor_entry_32bit pff_index_node_descriptor_entry_32bit_t; struct pff_index_node_descriptor_entry_32bit { /* The descriptor identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The data offset identifier * Consists of 4 bytes */ uint8_t data_identifier[ 4 ]; /* The local descriptors offset identifier * Consists of 4 bytes */ uint8_t local_descriptors_identifier[ 4 ]; /* The parent descriptor identifier * Consists of 4 bytes */ uint8_t parent_identifier[ 4 ]; }; typedef struct pff_index_node_offset_entry_32bit pff_index_node_offset_entry_32bit_t; struct pff_index_node_offset_entry_32bit { /* The offset identifier * Consists of 4 bytes */ uint8_t identifier[ 4 ]; /* The file offset of the index sub node * Consists of 4 bytes */ uint8_t file_offset[ 4 ]; /* The data size * Consists of 2 bytes */ uint8_t data_size[ 2 ]; /* The reference count * Consists of 2 bytes */ uint8_t reference_count[ 2 ]; }; typedef struct pff_index_node_64bit pff_index_node_64bit_t; struct pff_index_node_64bit { /* The node entries data * Consists of 488 bytes */ uint8_t entries_data[ 488 ]; /* The number of node entries * Consists of 1 byte */ uint8_t number_of_entries; /* The maximum number of node entries * Consists of 1 byte */ uint8_t maximum_number_of_entries; /* The entry size * Consists of 1 byte */ uint8_t entry_size; /* The level of the node * Consists of 1 byte */ uint8_t level; /* Padding * Consists of 4 bytes */ uint8_t padding1[ 4 ]; /* Type indicator * Consists of 1 byte */ uint8_t type; /* Copy of type indicator * Consists of 1 byte */ uint8_t type_copy; /* Signature * Consists of 2 bytes */ uint8_t signature[ 2 ]; /* A weak CRC32 of the first 492 bytes * Consists of 4 bytes */ uint8_t crc[ 4 ]; /* The back pointer value * Consists of 8 bytes */ uint8_t back_pointer[ 8 ]; }; typedef struct pff_index_node_branch_entry_64bit pff_index_node_branch_entry_64bit_t; struct pff_index_node_branch_entry_64bit { /* The first identifier of the sub node * Consists of 8 bytes */ uint8_t identifier[ 8 ]; /* The back pointer * Consists of 8 bytes */ uint8_t back_pointer[ 8 ]; /* The file offset of the index sub node * Consists of 8 bytes */ uint8_t file_offset[ 8 ]; }; typedef struct pff_index_node_descriptor_entry_64bit pff_index_node_descriptor_entry_64bit_t; struct pff_index_node_descriptor_entry_64bit { /* The descriptor identifier * Consists of 8 bytes * Only the lower 32-bits are used */ uint8_t identifier[ 8 ]; /* The data offset identifier * Consists of 8 bytes */ uint8_t data_identifier[ 8 ]; /* The local descriptors offset identifier * Consists of 8 bytes */ uint8_t local_descriptors_identifier[ 8 ]; /* The parent descriptor identifier * Consists of 4 bytes */ uint8_t parent_identifier[ 4 ]; /* Unknown * Consists of 4 bytes */ uint8_t unknown1[ 4 ]; }; typedef struct pff_index_node_offset_entry_64bit pff_index_node_offset_entry_64bit_t; struct pff_index_node_offset_entry_64bit { /* The offset identifier * Consists of 8 bytes */ uint8_t identifier[ 8 ]; /* The file offset of the index sub node * Consists of 8 bytes */ uint8_t file_offset[ 8 ]; /* The data size * Consists of 2 bytes */ uint8_t data_size[ 2 ]; /* The reference count * Consists of 2 bytes */ uint8_t reference_count[ 2 ]; /* The file offset of the data allocation table * Consists of 4 bytes */ uint8_t data_allocation_table_file_offset[ 4 ]; }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_item.c0000644000175000017500000033305212005155304014024 00000000000000/* * Item functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_item.h" #include "libpff_item_descriptor.h" #include "libpff_item_tree.h" #include "libpff_item_values.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libcstring.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_mapi.h" #include "libpff_multi_value.h" #include "libpff_table.h" #include "libpff_tree_type.h" #include "libpff_types.h" #include "libpff_value_type.h" /* Initializes the item and its values * Returns 1 if successful or -1 on error */ int libpff_item_initialize( libpff_item_t **item, libbfio_handle_t *file_io_handle, libpff_internal_file_t *internal_file, libpff_tree_node_t *item_tree_node, libpff_item_descriptor_t *item_descriptor, uint8_t flags, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_initialize"; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } if( *item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid item value already set.", function ); return( -1 ); } if( item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item descriptor.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE | LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } internal_item = memory_allocate_structure( libpff_internal_item_t ); if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item.", function ); goto on_error; } if( memory_set( internal_item, 0, sizeof( libpff_internal_item_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear item.", function ); memory_free( internal_item ); return( -1 ); } if( libpff_item_values_initialize( &( internal_item->item_values ), item_descriptor->descriptor_identifier, item_descriptor->data_identifier, item_descriptor->local_descriptors_identifier, item_descriptor->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item values.", function ); goto on_error; } internal_item->type = LIBPFF_ITEM_TYPE_UNDEFINED; if( ( flags & LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE ) == 0 ) { internal_item->file_io_handle = file_io_handle; } else { if( libbfio_handle_clone( &( internal_item->file_io_handle ), file_io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy file IO handle.", function ); goto on_error; } if( libbfio_handle_set_open_on_demand( internal_item->file_io_handle, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to set open on demand in file IO handle.", function ); goto on_error; } } internal_item->internal_file = internal_file; internal_item->flags = flags; if( ( flags & LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE ) == 0 ) { internal_item->item_tree_node = item_tree_node; } else { if( libpff_tree_node_clone( &( internal_item->item_tree_node ), item_tree_node, (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, &libpff_item_descriptor_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy item tree node.", function ); goto on_error; } } internal_item->item_descriptor = item_descriptor; *item = (libpff_item_t *) internal_item; return( 1 ); on_error: if( internal_item != NULL ) { if( ( flags & LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE ) != 0 ) { if( internal_item->file_io_handle != NULL ) { libbfio_handle_free( &( internal_item->file_io_handle ), NULL ); } } if( internal_item->item_values != NULL ) { libpff_item_values_free( &( internal_item->item_values ), NULL ); } memory_free( internal_item ); } return( -1 ); } /* Frees an item * Returns 1 if successful or -1 on error */ int libpff_item_free( libpff_item_t **item, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_free"; int result = 1; int sub_item_iterator = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } if( *item != NULL ) { internal_item = (libpff_internal_item_t *) *item; *item = NULL; /* The internal_file reference is freed elsewhere */ /* If not managed the file_io_handle and the item_tree_node reference are freed elsewhere */ if( ( internal_item->flags & LIBPFF_ITEM_FLAG_MANAGED_FILE_IO_HANDLE ) != 0 ) { if( internal_item->file_io_handle != NULL ) { if( libbfio_handle_close( internal_item->file_io_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file IO handle.", function ); return( -1 ); } if( libbfio_handle_free( &( internal_item->file_io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file IO handle.", function ); return( -1 ); } } } if( ( internal_item->flags & LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE ) != 0 ) { if( internal_item->item_tree_node != NULL ) { if( libpff_tree_node_free( &( internal_item->item_tree_node ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item tree node.", function ); return( -1 ); } } } if( internal_item->item_values != NULL ) { if( libpff_item_values_free( &( internal_item->item_values ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item values.", function ); result = -1; } } for( sub_item_iterator = 0; sub_item_iterator < LIBPFF_ITEM_NUMBER_OF_SUB_ITEMS; sub_item_iterator++ ) { if( internal_item->sub_item_tree_node[ sub_item_iterator ] != NULL ) { if( libpff_tree_node_free( &( internal_item->sub_item_tree_node[ sub_item_iterator ] ), (int (*)(intptr_t **, libcerror_error_t **)) &libpff_item_descriptor_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub item tree node: %d.", function, sub_item_iterator ); result = -1; } } } for( sub_item_iterator = 0; sub_item_iterator < LIBPFF_ITEM_NUMBER_OF_SUB_ITEMS; sub_item_iterator++ ) { if( internal_item->sub_item_values[ sub_item_iterator ] != NULL ) { if( libpff_item_values_free( &( internal_item->sub_item_values[ sub_item_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub item values: %d.", function, sub_item_iterator ); result = -1; } } } if( internal_item->embedded_object_data_reference != NULL ) { if( libfdata_reference_free( &( internal_item->embedded_object_data_reference ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free embedded object data reference.", function ); result = -1; } } if( internal_item->embedded_object_data_cache != NULL ) { if( libfcache_cache_free( &( internal_item->embedded_object_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free embedded object data cache.", function ); result = -1; } } memory_free( internal_item ); } return( result ); } /* Clones an item * Returns 1 if successful or -1 on error */ int libpff_item_clone( libpff_item_t **destination_item, libpff_item_t *source_item, libcerror_error_t **error ) { libpff_internal_item_t *internal_source_item = NULL; static char *function = "libpff_item_clone"; if( destination_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination item.", function ); return( -1 ); } if( *destination_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination item already set.", function ); return( -1 ); } if( source_item == NULL ) { *destination_item = NULL; return( 1 ); } internal_source_item = (libpff_internal_item_t *) source_item; if( libpff_item_initialize( destination_item, internal_source_item->file_io_handle, internal_source_item->internal_file, internal_source_item->item_tree_node, internal_source_item->item_descriptor, internal_source_item->flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination item.", function ); return( -1 ); } ( (libpff_internal_item_t *) *destination_item )->type = internal_source_item->type; /* Clones the item values sub elements from the cached sub item values */ if( libpff_item_values_clone_copy( ( (libpff_internal_item_t *) *destination_item )->item_values, internal_source_item->item_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy item values.", function ); libpff_item_free( destination_item, NULL ); return( -1 ); } return( 1 ); } /* Determines the item type * Returns 1 if successful or -1 on error */ int libpff_item_determine_type( libpff_internal_item_t *internal_item, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; uint8_t *value_data = NULL; char *item_type_string = NULL; static char *function = "libpff_item_determine_type"; size_t item_type_string_size = 0; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( internal_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal item.", function ); return( -1 ); } if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( internal_item->type != LIBPFF_ITEM_TYPE_UNDEFINED ) { return( 1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CLASS, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); goto on_error; } else if( result == 0 ) { /* The item does not contain a message class and therefore is a folder */ internal_item->type = LIBPFF_ITEM_TYPE_FOLDER; } else { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); goto on_error; } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); goto on_error; } if( libpff_value_type_get_utf8_string_size( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, &item_type_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string size.", function ); goto on_error; } if( item_type_string_size > 0 ) { item_type_string = libcstring_narrow_string_allocate( item_type_string_size ); if( item_type_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create item type string.", function ); goto on_error; } if( libpff_value_type_copy_to_utf8_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, (uint8_t *) item_type_string, item_type_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); goto on_error; } if( item_type_string_size == 4 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM", 3 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_COMMON; } } else if( item_type_string_size == 8 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.FAX", 7 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_FAX; } } else if( item_type_string_size == 9 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note", 8 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_EMAIL; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Post", 8 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_POSTING_NOTE; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Task", 8 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_TASK; } } else if( item_type_string_size == 12 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Contact", 11 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_CONTACT; } } else if( item_type_string_size == 13 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Activity", 12 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_ACTIVITY; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.DistList", 12 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_DISTRIBUTION_LIST; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note.Fax", 12 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_FAX; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Post.RSS", 12 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_RSS_FEED; } } else if( item_type_string_size == 15 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.StickyNote", 15 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_NOTE; } } else if( item_type_string_size == 16 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Appointment", 15 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_APPOINTMENT; } } else if( item_type_string_size == 19 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note.Voicemail", 18 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_VOICEMAIL; } } else if( item_type_string_size == 20 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note.Mobile.SMS", 19 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_SMS; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note.Mobile.MMS", 19 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_MMS; } } else if( item_type_string_size == 21 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Conflict.Message", 20 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE; } } else if( item_type_string_size == 53 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046}", 52 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_APPOINTMENT; } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 12 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Sharing", 11 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_SHARING; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 13 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Document", 12 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_DOCUMENT; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 15 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note.SMIME", 14 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_EMAIL_SMIME; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 16 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.TaskRequest", 15 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_TASK_REQUEST; } else if( libcstring_narrow_string_compare_no_case( item_type_string, "REPORT.IPM.Note", 15 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_EMAIL; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 18 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Configuration", 17 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_CONFIGURATION; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 21 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Schedule.Meeting", 20 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_MEETING; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( item_type_string_size >= 28 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "REPORT.IPM.Schedule.Meeting", 27 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_MEETING; } } } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { /* Consider any remaining IPM.Note as an e-mail * should catch IPM.Note.StorageQuotaWarning */ if( item_type_string_size >= 10 ) { if( libcstring_narrow_string_compare_no_case( item_type_string, "IPM.Note.", 9 ) == 0 ) { internal_item->type = LIBPFF_ITEM_TYPE_EMAIL; } } } #if defined( HAVE_DEBUG_OUTPUT ) if( ( libcnotify_verbose != 0 ) && ( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) ) { libcnotify_printf( "%s: unsupported item type: %s\n", function, item_type_string ); } #endif memory_free( item_type_string ); } } return( 1 ); on_error: if( item_type_string != NULL ) { memory_free( item_type_string ); } return( -1 ); } /* Retrieves the identifier * Returns 1 if successful or -1 on error */ int libpff_item_get_identifier( libpff_item_t *item, uint32_t *identifier, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_identifier"; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( libpff_item_tree_get_identifier( internal_item->item_tree_node, identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve item identifier.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of sets values * Returns 1 if successful or -1 on error */ int libpff_item_get_number_of_sets( libpff_item_t *item, uint32_t *number_of_sets, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_number_of_sets"; int table_number_of_sets = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing item values.", function ); return( -1 ); } if( number_of_sets == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sets.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - invalid item values - missing table.", function ); return( -1 ); } } if( libpff_table_get_number_of_sets( internal_item->item_values->table, &table_number_of_sets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sets.", function ); return( -1 ); } *number_of_sets = (uint32_t) table_number_of_sets; return( 1 ); } /* Retrieves the number of entries (of a set) * All sets in an item contain the same number of entries * Returns 1 if successful or -1 on error */ int libpff_item_get_number_of_entries( libpff_item_t *item, uint32_t *number_of_entries, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_number_of_entries"; int table_number_of_entries = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing item values.", function ); return( -1 ); } if( number_of_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - invalid item values - missing table.", function ); return( -1 ); } } if( libpff_table_get_number_of_entries( internal_item->item_values->table, &table_number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); return( -1 ); } *number_of_entries = (uint32_t) table_number_of_entries; return( 1 ); } /* Retrieves the entry and value type of a specific entry * Returns 1 if successful or -1 on error */ int libpff_item_get_entry_type( libpff_item_t *item, int set_index, int entry_index, uint32_t *entry_type, uint32_t *value_type, libpff_name_to_id_map_entry_t **name_to_id_map_entry, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_entry_type"; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - invalid item values - missing table.", function ); return( -1 ); } } if( libpff_table_get_entry_type_by_index( internal_item->item_values->table, set_index, entry_index, entry_type, value_type, name_to_id_map_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry type.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value type of a specific entry type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_value_type( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_value_type"; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } return( result ); } /* Retrieves the value of a specific entry * * The value type must be filled with the corresponding value type * When the LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE is set * the value type is ignored and set. The default behavior is a strict * matching of the value type. In this case the value type must be filled * with the corresponding value type * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_entry_value"; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE | LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } } return( result ); } /* Retrieves the value of a specific entry for an UTF-8 encoded name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_by_utf8_name( libpff_item_t *item, int set_index, uint8_t *utf8_entry_name, size_t utf8_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_entry_value_by_utf8_name"; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - invalid item values - missing table.", function ); return( -1 ); } } result = libpff_table_get_entry_value_by_utf8_entry_name( internal_item->item_values->table, set_index, utf8_entry_name, utf8_entry_name_length, value_type, &value_data_reference, &value_data_cache, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } } return( result ); } /* Retrieves the value of a specific entry for an UTF-16 encoded name * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_by_utf16_name( libpff_item_t *item, int set_index, uint16_t *utf16_entry_name, size_t utf16_entry_name_length, uint32_t *value_type, uint8_t **value_data, size_t *value_data_size, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_entry_value_by_utf16_name"; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { if( libpff_item_values_read( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, LIBPFF_DEBUG_ITEM_TYPE_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read item values.", function ); return( -1 ); } if( internal_item->item_values->table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - invalid item values - missing table.", function ); return( -1 ); } } result = libpff_table_get_entry_value_by_utf16_entry_name( internal_item->item_values->table, set_index, utf16_entry_name, utf16_entry_name_length, value_type, &value_data_reference, &value_data_cache, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } } return( result ); } /* Retrieves the boolean value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_boolean( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_boolean"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BOOLEAN; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_boolean( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set boolean entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 16-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_16bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_16bit"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_16BIT_SIGNED; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_16bit( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 16-bit entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 32-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_32bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint32_t *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_32bit"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_32bit( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 32-bit entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 64-bit value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_64bit( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_64bit"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_64bit( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set 64-bit entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the 64-bit filetime value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_filetime( libpff_item_t *item, int set_index, uint32_t entry_type, uint64_t *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_filetime"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_FILETIME; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_64bit( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set filetime entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the size value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_size"; uint32_t value_type = 0; size_t value_data_size = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type != LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED ) && ( value_type != LIBPFF_VALUE_TYPE_INTEGER_64BIT_SIGNED ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported size value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_size( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set size entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the floating point value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_floating_point( libpff_item_t *item, int set_index, uint32_t entry_type, double *entry_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_floating_point"; uint32_t value_type = 0; size_t value_data_size = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type != LIBPFF_VALUE_TYPE_FLOAT_32BIT ) && ( value_type != LIBPFF_VALUE_TYPE_DOUBLE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_floating_point( value_data, value_data_size, entry_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set floating point entry value.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-8 string size of a specific entry * Length includes the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_utf8_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_utf8_string_size"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_get_utf8_string_size( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-8 string size.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-8 string value of a specific entry * The function uses a codepage if necessary, it uses the codepage set for the library * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_utf8_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_utf8_string"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_utf8_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-16 string size of a specific entry * Length includes the end of string character * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_utf16_string_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_utf16_string_size"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_get_utf16_string_size( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve UTF-16 string size.", function ); return( -1 ); } } return( result ); } /* Retrieves the UTF-16 string value of a specific entry * The function uses a codepage if necessary, it uses the codepage set for the library * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_utf16_string( libpff_item_t *item, int set_index, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_utf16_string"; size_t value_data_size = 0; uint32_t value_type = 0; uint8_t is_ascii_string = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type != LIBPFF_VALUE_TYPE_STRING_ASCII ) && ( value_type != LIBPFF_VALUE_TYPE_STRING_UNICODE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_STRING_ASCII ) { is_ascii_string = 1; } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_utf16_string( value_data, value_data_size, is_ascii_string, internal_item->internal_file->io_handle->ascii_codepage, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-16 string.", function ); return( -1 ); } } return( result ); } /* Retrieves the binary data size of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_binary_data_size( libpff_item_t *item, int set_index, uint32_t entry_type, size_t *size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_binary_data_size"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_get_binary_data_size( value_data, value_data_size, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set binary data size.", function ); return( -1 ); } } return( result ); } /* Retrieves the binary data value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_binary_data( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *binary_data, size_t size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_binary_data"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_BINARY_DATA; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_binary_data( value_data, value_data_size, binary_data, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set binary data.", function ); return( -1 ); } } return( result ); } /* Retrieves the GUID value of a specific entry * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_value_guid( libpff_item_t *item, int set_index, uint32_t entry_type, uint8_t *guid, size_t size, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_value_guid"; size_t value_data_size = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_GUID; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_value_type_copy_to_binary_data( value_data, value_data_size, guid, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set GUID.", function ); return( -1 ); } } return( result ); } /* Retrieves the multi value of a specific entry * Creates a new multi value * * When the LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP is set * the name to identifier mapping is ignored. The default behavior is * the use the mapped entry value. In this case named properties are not * retrieved. * * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_item_get_entry_multi_value( libpff_item_t *item, int set_index, uint32_t entry_type, libpff_multi_value_t **multi_value, uint8_t flags, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; libpff_internal_multi_value_t *internal_multi_value = NULL; uint8_t *value_data = NULL; static char *function = "libpff_item_get_entry_multi_value"; size_t number_of_values = 0; size_t value_data_size = 0; size_t value_size = 0; uint32_t value_type = 0; uint32_t value_offset_iterator = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( internal_item->internal_file->io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid internal file - missing IO handle.", function ); return( -1 ); } if( multi_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid multi value.", function ); return( -1 ); } if( *multi_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: multi value already set.", function ); return( -1 ); } if( ( flags & ~( LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, set_index, entry_type, &value_type, &value_data_reference, &value_data_cache, flags | LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result != 0 ) { if( ( value_type & LIBPFF_VALUE_TYPE_MULTI_VALUE_FLAG ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported multi value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data reference data.", function ); return( -1 ); } if( libpff_multi_value_initialize( multi_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create multi value.", function ); return( -1 ); } internal_multi_value = (libpff_internal_multi_value_t *) *multi_value; internal_multi_value->value_type = value_type; /* Internally an empty multi value is represented by a NULL reference */ if( value_data != NULL ) { internal_multi_value->value_data_size = value_data_size; internal_multi_value->value_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * internal_multi_value->value_data_size ); if( internal_multi_value->value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create multi value data.", function ); libpff_multi_value_free( multi_value, NULL ); return( -1 ); } if( memory_copy( internal_multi_value->value_data, value_data, internal_multi_value->value_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set multi value data.", function ); libpff_multi_value_free( multi_value, NULL ); return( -1 ); } switch( value_type ) { case LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_16BIT_SIGNED: value_size = 2; break; case LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_32BIT_SIGNED: value_size = 4; break; case LIBPFF_VALUE_TYPE_MULTI_VALUE_INTEGER_64BIT_SIGNED: case LIBPFF_VALUE_TYPE_MULTI_VALUE_FILETIME: value_size = 8; break; case LIBPFF_VALUE_TYPE_MULTI_VALUE_GUID: value_size = 16; break; case LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_ASCII: case LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_UNICODE: case LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA: /* The first 4 bytes contain the number of values */ byte_stream_copy_to_uint32_little_endian( value_data, internal_multi_value->number_of_values ); break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported multi value type: 0x%04" PRIx32 ".", function, value_type ); return( -1 ); } if( value_size != 0 ) { if( ( value_data_size % value_size ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: value data size: %" PRIzd " not a multitude of value size: %" PRIzd ".", function, value_data_size, value_size ); return( -1 ); } number_of_values = value_data_size / value_size; #if SIZE_MAX > UINT32_MAX if( number_of_values > UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: number of values value exceeds maximum.\n", function ); return( -1 ); } #endif internal_multi_value->number_of_values = (uint32_t) number_of_values; } if( internal_multi_value->number_of_values > 0 ) { internal_multi_value->value_offset = (uint32_t *) memory_allocate( sizeof( uint32_t ) * internal_multi_value->number_of_values ); if( internal_multi_value->value_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create multi value offsets.", function ); libpff_multi_value_free( multi_value, NULL ); return( -1 ); } internal_multi_value->value_size = (size_t *) memory_allocate( sizeof( size_t ) * internal_multi_value->number_of_values ); if( internal_multi_value->value_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create multi value offsets.", function ); libpff_multi_value_free( multi_value, NULL ); return( -1 ); } for( value_offset_iterator = 0; value_offset_iterator < internal_multi_value->number_of_values; value_offset_iterator++ ) { if( ( value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_UNICODE ) || ( value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA ) ) { value_data += 4; byte_stream_copy_to_uint32_little_endian( value_data, internal_multi_value->value_offset[ value_offset_iterator ] ); if( internal_multi_value->value_offset[ value_offset_iterator ] > internal_multi_value->value_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value offset: %" PRIu32 " exceeds value data size: %" PRIzd ".", function, internal_multi_value->value_offset[ value_offset_iterator ], internal_multi_value->value_data_size ); libpff_multi_value_free( multi_value, NULL ); return( -1 ); } if( value_offset_iterator > 0 ) { internal_multi_value->value_size[ value_offset_iterator - 1 ] = internal_multi_value->value_offset[ value_offset_iterator ] - internal_multi_value->value_offset[ value_offset_iterator - 1 ]; } } else { internal_multi_value->value_offset[ value_offset_iterator ] = (uint32_t) ( value_offset_iterator * value_size ); internal_multi_value->value_size[ value_offset_iterator ] = value_size; } } if( ( value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_ASCII ) || ( value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_STRING_UNICODE ) || ( value_type == LIBPFF_VALUE_TYPE_MULTI_VALUE_BINARY_DATA ) ) { internal_multi_value->value_size[ value_offset_iterator - 1 ] = internal_multi_value->value_data_size - internal_multi_value->value_offset[ value_offset_iterator - 1 ]; } internal_multi_value->ascii_codepage = internal_item->internal_file->io_handle->ascii_codepage; } } } return( result ); } /* Retrieves the type * Determines the item type if neccessary * Returns 1 if successful or -1 on error */ int libpff_item_get_type( libpff_item_t *item, uint8_t *item_type, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_type"; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( item_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item type.", function ); return( -1 ); } if( internal_item->type == LIBPFF_ITEM_TYPE_UNDEFINED ) { if( libpff_item_determine_type( internal_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine item type.", function ); return( -1 ); } } *item_type = internal_item->type; return( 1 ); } /* Retrieves the number of sub items from a item * Returns 1 if successful or -1 on error */ int libpff_item_get_number_of_sub_items( libpff_item_t *item, int *number_of_sub_items, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; static char *function = "libpff_item_get_number_of_sub_items"; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( libpff_tree_node_get_number_of_sub_nodes( internal_item->item_tree_node, number_of_sub_items, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub items.", function ); return( -1 ); } return( 1 ); } /* Retrieves the sub item for the specific index from a item * Returns 1 if successful or -1 on error */ int libpff_item_get_sub_item( libpff_item_t *item, int sub_item_index, libpff_item_t **sub_item, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_item_tree_node = NULL; static char *function = "libpff_item_get_sub_item"; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( sub_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub item.", function ); return( -1 ); } if( *sub_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub item already set.", function ); return( -1 ); } if( libpff_tree_node_get_sub_node_by_index( internal_item->item_tree_node, sub_item_index, &sub_item_tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub item tree node.", function ); return( -1 ); } if( sub_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub item tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_item, internal_item->file_io_handle, internal_item->internal_file, sub_item_tree_node, (libpff_item_descriptor_t *) sub_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize sub item.", function ); return( -1 ); } return( 1 ); } /* Retrieves the sub item for the specific identifier from a item * Returns 1 if successful, 0 if no such item or -1 on error */ int libpff_item_get_sub_item_by_identifier( libpff_item_t *item, uint32_t sub_item_identifier, libpff_item_t **sub_item, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_tree_node_t *sub_item_tree_node = NULL; static char *function = "libpff_item_get_sub_item_by_identifier"; uint8_t flags = 0; int result = 0; if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) item; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid item - missing internal file.", function ); return( -1 ); } if( sub_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub item.", function ); return( -1 ); } if( *sub_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: sub item already set.", function ); return( -1 ); } result = libpff_item_tree_get_sub_node_by_identifier( internal_item->item_tree_node, sub_item_identifier, &sub_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub item tree node: %" PRIu32 ".", function, sub_item_identifier ); return( -1 ); } else if( result == 0 ) { return( 0 ); } if( sub_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub item tree node.", function ); return( -1 ); } if( libpff_item_initialize( sub_item, internal_item->file_io_handle, internal_item->internal_file, sub_item_tree_node, (libpff_item_descriptor_t *) sub_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT | flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize sub item.", function ); return( -1 ); } if( *sub_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub item.", function ); return( -1 ); } if( ( flags & LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE ) == LIBPFF_ITEM_FLAG_MANAGED_ITEM_TREE_NODE ) { if( internal_item->type != LIBPFF_ITEM_TYPE_FOLDER ) { if( sub_item_identifier == LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_ATTACHMENTS ) { ( (libpff_internal_item_t *) *sub_item )->type = LIBPFF_ITEM_TYPE_ATTACHMENTS; } else if( sub_item_identifier == LIBPFF_LOCAL_DESCRIPTOR_IDENTIFIER_RECIPIENTS ) { ( (libpff_internal_item_t *) *sub_item )->type = LIBPFF_ITEM_TYPE_RECIPIENTS; } else { ( (libpff_internal_item_t *) *sub_item )->type = LIBPFF_ITEM_TYPE_ATTACHMENT; } } } return( 1 ); } libpff-20120802/libpff/libpff_folder.h0000644000175000017500000001036512005155304014345 00000000000000/* * Folder functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_FOLDER_H ) #define _LIBPFF_FOLDER_H #include #include #include "libpff_extern.h" #include "libpff_item.h" #include "libpff_libcerror.h" #include "libpff_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBPFF_EXTERN \ int libpff_folder_get_type( libpff_item_t *folder, uint8_t *type, libcerror_error_t **error ); int libpff_folder_determine_sub_folders( libpff_internal_item_t *internal_item, libcerror_error_t **error ); int libpff_folder_determine_sub_messages( libpff_internal_item_t *internal_item, libcerror_error_t **error ); int libpff_folder_determine_sub_associated_contents( libpff_internal_item_t *internal_item, libcerror_error_t **error ); int libpff_folder_determine_unknowns( libpff_internal_item_t *internal_item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_folders( libpff_item_t *folder, int *number_of_sub_folders, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_folder( libpff_item_t *folder, int sub_folder_index, libpff_item_t **sub_folder, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_folder_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_folder_name, size_t utf8_sub_folder_name_size, libpff_item_t **sub_folder, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_folder_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_folder_name, size_t utf16_sub_folder_name_size, libpff_item_t **sub_folder, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_folders( libpff_item_t *item, libpff_item_t **sub_folders, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_messages( libpff_item_t *folder, int *number_of_sub_messages, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_message( libpff_item_t *folder, int sub_message_index, libpff_item_t **sub_message, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_message_by_utf8_name( libpff_item_t *folder, uint8_t *utf8_sub_message_name, size_t utf8_sub_message_name_size, libpff_item_t **sub_message, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_message_by_utf16_name( libpff_item_t *folder, uint16_t *utf16_sub_message_name, size_t utf16_sub_message_name_size, libpff_item_t **sub_message, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_messages( libpff_item_t *item, libpff_item_t **sub_messages, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_number_of_sub_associated_contents( libpff_item_t *folder, int *number_of_sub_associated_contents, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_associated_content( libpff_item_t *folder, int sub_associated_content_index, libpff_item_t **sub_associated_content, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_sub_associated_contents( libpff_item_t *item, libpff_item_t **sub_associated_contents, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_folder_get_unknowns( libpff_item_t *folder, libpff_item_t **unknowns, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_codepage.h0000644000175000017500000000477412005155304014650 00000000000000/* * Codepage functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_CODEPAGE_H ) #define _LIBPFF_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBPFF ) #include /* Define HAVE_LOCAL_LIBPFF for local use of libpff * The definitions in are copied here * for local use of libpff */ #else /* The codepage definitions */ enum LIBPFF_CODEPAGE { LIBPFF_CODEPAGE_ASCII = 20127, LIBPFF_CODEPAGE_ISO_8859_1 = 28591, LIBPFF_CODEPAGE_ISO_8859_2 = 28592, LIBPFF_CODEPAGE_ISO_8859_3 = 28593, LIBPFF_CODEPAGE_ISO_8859_4 = 28594, LIBPFF_CODEPAGE_ISO_8859_5 = 28595, LIBPFF_CODEPAGE_ISO_8859_6 = 28596, LIBPFF_CODEPAGE_ISO_8859_7 = 28597, LIBPFF_CODEPAGE_ISO_8859_8 = 28598, LIBPFF_CODEPAGE_ISO_8859_9 = 28599, LIBPFF_CODEPAGE_ISO_8859_10 = 28600, LIBPFF_CODEPAGE_ISO_8859_11 = 28601, LIBPFF_CODEPAGE_ISO_8859_13 = 28603, LIBPFF_CODEPAGE_ISO_8859_14 = 28604, LIBPFF_CODEPAGE_ISO_8859_15 = 28605, LIBPFF_CODEPAGE_ISO_8859_16 = 28606, LIBPFF_CODEPAGE_KOI8_R = 20866, LIBPFF_CODEPAGE_KOI8_U = 21866, LIBPFF_CODEPAGE_WINDOWS_874 = 874, LIBPFF_CODEPAGE_WINDOWS_932 = 932, LIBPFF_CODEPAGE_WINDOWS_936 = 936, LIBPFF_CODEPAGE_WINDOWS_949 = 949, LIBPFF_CODEPAGE_WINDOWS_950 = 950, LIBPFF_CODEPAGE_WINDOWS_1250 = 1250, LIBPFF_CODEPAGE_WINDOWS_1251 = 1251, LIBPFF_CODEPAGE_WINDOWS_1252 = 1252, LIBPFF_CODEPAGE_WINDOWS_1253 = 1253, LIBPFF_CODEPAGE_WINDOWS_1254 = 1254, LIBPFF_CODEPAGE_WINDOWS_1255 = 1255, LIBPFF_CODEPAGE_WINDOWS_1256 = 1256, LIBPFF_CODEPAGE_WINDOWS_1257 = 1257, LIBPFF_CODEPAGE_WINDOWS_1258 = 1258 }; #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_value_type.h0000644000175000017500000000755412005155304015255 00000000000000/* * Values type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_VALUE_TYPE_H ) #define _LIBPFF_VALUE_TYPE_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libpff_value_type_string_contains_zero_bytes( uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); int libpff_value_type_copy_to_boolean( uint8_t *value_data, size_t value_data_size, uint8_t *value_boolean, libcerror_error_t **error ); int libpff_value_type_copy_to_16bit( uint8_t *value_data, size_t value_data_size, uint16_t *value_16bit, libcerror_error_t **error ); int libpff_value_type_copy_to_32bit( uint8_t *value_data, size_t value_data_size, uint32_t *value_32bit, libcerror_error_t **error ); int libpff_value_type_copy_to_64bit( uint8_t *value_data, size_t value_data_size, uint64_t *value_64bit, libcerror_error_t **error ); int libpff_value_type_copy_to_size( uint8_t *value_data, size_t value_data_size, size_t *value_size, libcerror_error_t **error ); int libpff_value_type_copy_to_floating_point( uint8_t *value_data, size_t value_data_size, double *value_floating_point, libcerror_error_t **error ); int libpff_value_type_get_utf8_string_size( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, size_t *utf8_string_size, libcerror_error_t **error ); int libpff_value_type_copy_to_utf8_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); int libpff_value_type_compare_with_utf8_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); int libpff_value_type_get_utf16_string_size( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, size_t *utf16_string_size, libcerror_error_t **error ); int libpff_value_type_copy_to_utf16_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); int libpff_value_type_compare_with_utf16_string( uint8_t *value_data, size_t value_data_size, uint8_t is_ascii_string, uint32_t ascii_codepage, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); int libpff_value_type_get_binary_data_size( uint8_t *value_data, size_t value_data_size, size_t *binary_data_size, libcerror_error_t **error ); int libpff_value_type_copy_to_binary_data( uint8_t *value_data, size_t value_data_size, uint8_t *binary_data, size_t binary_data_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_item_descriptor.c0000644000175000017500000001466212005155304016265 00000000000000/* * Item descriptor functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_item_descriptor.h" #include "libpff_libcerror.h" #include "libpff_tree_type.h" /* Creates an item descriptor * Returns 1 if successful or -1 on error */ int libpff_item_descriptor_initialize( libpff_item_descriptor_t **item_descriptor, uint32_t descriptor_identifier, uint64_t data_identifier, uint64_t local_descriptors_identifier, uint8_t recovered, libcerror_error_t **error ) { static char *function = "libpff_item_descriptor_initialize"; if( item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item descriptor.", function ); return( -1 ); } if( *item_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid item descriptor value already set.", function ); return( -1 ); } *item_descriptor = memory_allocate_structure( libpff_item_descriptor_t ); if( *item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create item descriptor.", function ); goto on_error; } if( memory_set( *item_descriptor, 0, sizeof( libpff_item_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear item descriptor.", function ); goto on_error; } ( *item_descriptor )->descriptor_identifier = descriptor_identifier; ( *item_descriptor )->data_identifier = data_identifier; ( *item_descriptor )->local_descriptors_identifier = local_descriptors_identifier; ( *item_descriptor )->recovered = recovered; return( 1 ); on_error: if( *item_descriptor != NULL ) { memory_free( *item_descriptor ); *item_descriptor = NULL; } return( -1 ); } /* Frees an item descriptor * Returns 1 if successful or -1 on error */ int libpff_item_descriptor_free( libpff_item_descriptor_t **item_descriptor, libcerror_error_t **error ) { static char *function = "libpff_item_descriptor_free"; if( item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item descriptor.", function ); return( -1 ); } if( *item_descriptor != NULL ) { memory_free( *item_descriptor ); *item_descriptor = NULL; } return( 1 ); } /* Clones the item descriptor * Returns 1 if successful or -1 on error */ int libpff_item_descriptor_clone( intptr_t **destination_item_descriptor, intptr_t *source_item_descriptor, libcerror_error_t **error ) { static char *function = "libpff_item_descriptor_clone"; if( destination_item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination item descriptor.", function ); return( -1 ); } if( *destination_item_descriptor != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination item descriptor already set.", function ); return( -1 ); } if( source_item_descriptor == NULL ) { *destination_item_descriptor = NULL; } else { *destination_item_descriptor = memory_allocate_structure_as_value( libpff_item_descriptor_t ); if( *destination_item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination item descriptor.", function ); goto on_error; } if( memory_copy( *destination_item_descriptor, source_item_descriptor, sizeof( libpff_item_descriptor_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy item descriptor.", function ); goto on_error; } } return( 1 ); on_error: if( *destination_item_descriptor != NULL ) { memory_free( *destination_item_descriptor ); *destination_item_descriptor = NULL; } return( -1 ); } /* Compares two item descriptors * Returns LIBPFF_TREE_NODE_COMPARE_LESS, LIBPFF_TREE_NODE_COMPARE_EQUAL, LIBPFF_TREE_NODE_COMPARE_GREATER if successful or -1 on error */ int libpff_item_descriptor_compare( intptr_t *first_item_descriptor, intptr_t *second_item_descriptor, libcerror_error_t **error ) { static char *function = "libpff_item_descriptor_compare"; if( first_item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first item descriptor.", function ); return( -1 ); } if( second_item_descriptor == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid second item descriptor.", function ); return( 1 ); } if( ( (libpff_item_descriptor_t *) first_item_descriptor )->descriptor_identifier < ( (libpff_item_descriptor_t *) second_item_descriptor )->descriptor_identifier ) { return( LIBPFF_TREE_NODE_COMPARE_LESS ); } else if( ( (libpff_item_descriptor_t *) first_item_descriptor )->descriptor_identifier > ( (libpff_item_descriptor_t *) second_item_descriptor )->descriptor_identifier ) { return( LIBPFF_TREE_NODE_COMPARE_GREATER ); } return( LIBPFF_TREE_NODE_COMPARE_EQUAL ); } libpff-20120802/libpff/libpff.rc0000664000175000017500000000210212006536127013166 00000000000000#include #ifdef GCC_WINDRES VS_VERSION_INFO VERSIONINFO #else VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE #endif FILEVERSION 1,0,0,0 PRODUCTVERSION 1,0,0,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS VOS__WINDOWS32 FILETYPE VFT_DLL FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN VALUE "FileDescription", "Library to support the Personal Folder File (OST, PAB and PST) format\0" VALUE "FileVersion", "20120802" "\0" VALUE "InternalName", "libpff.dll\0" VALUE "LegalCopyright", "(c) 2008-2012 Joachim Metz \0" VALUE "OriginalFilename", "libpff.dll\0" VALUE "ProductName", "libpff\0" VALUE "ProductVersion", "20120802" "\0" VALUE "Comments", "For more information visit http://code.google.com/p/libpff/\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0409, 1200 END END libpff-20120802/libpff/libpff_libfcache.h0000644000175000017500000000252212005155304014766 00000000000000/* * The internal libfcache header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBFCACHE_H ) #define _LIBPFF_LIBFCACHE_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if defined( HAVE_LOCAL_LIBFCACHE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBFCACHE_DLL_IMPORT * before including libfcache.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFCACHE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff.c0000644000175000017500000000336412005155304013006 00000000000000/* * Library to support the Personal Folder File (OST, PAB and PST) format * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #if defined( WINAPI ) #include #endif #include "libpff_unused.h" /* Define HAVE_LOCAL_LIBPFF for local use of libpff */ #if !defined( HAVE_LOCAL_LIBPFF ) #if defined( WINAPI ) #if defined( _MANAGED ) #pragma managed( push, off ) #endif /* Defines the entry point for the DLL */ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) { LIBPFF_UNREFERENCED_PARAMETER( lpvReserved ) switch( fdwReason ) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls( hinstDLL ); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; case DLL_PROCESS_DETACH: break; } return( TRUE ); } /* Function that indicates the library is a DLL * Returns 1 */ int libpff_is_dll( void ) { return( 1 ); } #endif /* defined( WINAPI ) */ #endif /* !defined( HAVE_LOCAL_LIBPFF ) */ libpff-20120802/libpff/libpff_message.h0000644000175000017500000000711512005155304014515 00000000000000/* * Message functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_MESSAGE_H ) #define _LIBPFF_MESSAGE_H #include #include #include "libpff_extern.h" #include "libpff_item.h" #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libpff_message_determine_attachments( libpff_internal_item_t *internal_item, libcerror_error_t **error ); int libpff_message_determine_recipients( libpff_internal_item_t *internal_item, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf8_string_size( libpff_item_t *item, uint32_t entry_type, size_t *utf8_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf8_string( libpff_item_t *item, uint32_t entry_type, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf16_string_size( libpff_item_t *item, uint32_t entry_type, size_t *utf16_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_entry_value_utf16_string( libpff_item_t *item, uint32_t entry_type, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_number_of_attachments( libpff_item_t *message, int *number_of_attachments, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_attachment( libpff_item_t *message, int attachment_index, libpff_item_t **attachment, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_attachments( libpff_item_t *message, libpff_item_t **attachments, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_recipients( libpff_item_t *message, libpff_item_t **recipients, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_plain_text_body_size( libpff_item_t *message, size_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_plain_text_body( libpff_item_t *message, uint8_t *message_body, size_t size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_rtf_body_size( libpff_item_t *message, size_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_rtf_body( libpff_item_t *message, uint8_t *message_body, size_t size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_html_body_size( libpff_item_t *message, size_t *size, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_message_get_html_body( libpff_item_t *message, uint8_t *message_body, size_t size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_notify.h0000644000175000017500000000272512005155304014403 00000000000000/* * Notification function * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_NOTIFY_H ) #define _LIBPFF_NOTIFY_H #include #include #include #include "libpff_extern.h" #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBPFF ) LIBPFF_EXTERN \ void libpff_notify_set_verbose( int verbose ); LIBPFF_EXTERN \ int libpff_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBPFF_EXTERN \ int libpff_notify_stream_close( libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_local_descriptors_tree.h0000644000175000017500000000415212005155304017621 00000000000000/* * Local descriptors tree functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LOCAL_DESCRIPTORS_TREE_H ) #define _LIBPFF_LOCAL_DESCRIPTORS_H #include #include #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_local_descriptor_value.h" #if defined( __cplusplus ) extern "C" { #endif int libpff_local_descriptors_tree_get_leaf_node_by_identifier( libfdata_tree_t *local_descriptors_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libfdata_tree_node_t **leaf_local_descriptors_tree_node, libcerror_error_t **error ); int libpff_local_descriptors_tree_node_get_leaf_node_by_identifier( libfdata_tree_node_t *local_descriptors_tree_node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libfdata_tree_node_t **leaf_local_descriptors_tree_node, libcerror_error_t **error ); int libpff_local_descriptors_tree_get_value_by_identifier( libfdata_tree_t *local_descriptors_tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint64_t identifier, libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_attachment.c0000644000175000017500000007107612005155304015223 00000000000000/* * Attachment functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_attached_file_io_handle.h" #include "libpff_attachment.h" #include "libpff_debug.h" #include "libpff_definitions.h" #include "libpff_item.h" #include "libpff_item_descriptor.h" #include "libpff_item_tree.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_libfmapi.h" #include "libpff_local_descriptor_value.h" #include "libpff_local_descriptors_tree.h" #include "libpff_mapi.h" #include "libpff_types.h" /* Retrieves the attachment type * Returns 1 if successful or -1 on error */ int libpff_attachment_get_type( libpff_item_t *attachment, int *attachment_type, libcerror_error_t **error ) { uint8_t *value_data = NULL; static char *function = "libpff_attachment_get_type"; uint32_t value_type = 0; uint32_t attachment_method = 0; size_t value_data_size = 0; if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } if( attachment_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment type.", function ); return( -1 ); } if( libpff_item_get_entry_value_32bit( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_METHOD, &attachment_method, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachment method.", function ); return( -1 ); } if( ( attachment_method != LIBPFF_ATTACHMENT_METHOD_BY_VALUE ) && ( attachment_method != LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE ) && ( attachment_method != LIBPFF_ATTACHMENT_METHOD_EMBEDDED_MESSAGE ) && ( attachment_method != LIBPFF_ATTACHMENT_METHOD_OLE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported attachment method: 0x%08" PRIx32 ".", function, attachment_method ); return( -1 ); } if( attachment_method == LIBPFF_ATTACHMENT_METHOD_BY_REFERENCE ) { *attachment_type = LIBPFF_ATTACHMENT_TYPE_REFERENCE; } else if( ( attachment_method == LIBPFF_ATTACHMENT_METHOD_BY_VALUE ) || ( attachment_method == LIBPFF_ATTACHMENT_METHOD_EMBEDDED_MESSAGE ) || ( attachment_method == LIBPFF_ATTACHMENT_METHOD_OLE ) ) { if( libpff_item_get_entry_value( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT, &value_type, &value_data, &value_data_size, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( value_type == LIBPFF_VALUE_TYPE_BINARY_DATA ) { *attachment_type = LIBPFF_ATTACHMENT_TYPE_DATA; } else if( value_type == LIBPFF_VALUE_TYPE_OBJECT ) { if( attachment_method == LIBPFF_ATTACHMENT_METHOD_EMBEDDED_MESSAGE ) { *attachment_type = LIBPFF_ATTACHMENT_TYPE_ITEM; } else if( attachment_method == LIBPFF_ATTACHMENT_METHOD_OLE ) { *attachment_type = LIBPFF_ATTACHMENT_TYPE_DATA; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported attachment method: 0x%08" PRIx32 " for object value type.", function, attachment_method ); return( -1 ); } } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry value type: 0x%08" PRIx32 ".", function, value_type ); return( -1 ); } } return( 1 ); } /* Retrieves the attachment data size * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_attachment_get_data_size( libpff_item_t *attachment, size64_t *size, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_attachment_get_data_size"; size_t value_data_size = 0; uint32_t value_type = 0; uint32_t embedded_object_data_identifier = 0; int result = 0; if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) attachment; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing item values.", function ); return( -1 ); } if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item tree node.", function ); return( -1 ); } if( internal_item->item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid item tree node - missing value.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } /* The OLE attachment method could refer to an OLE embedded object */ if( value_type == LIBPFF_VALUE_TYPE_OBJECT ) { if( internal_item->embedded_object_data_reference == NULL ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve embedded object data.", function ); return( -1 ); } if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing embedded object data.", function ); return( -1 ); } /* The descriptor identifier is located in the local descriptors tree */ byte_stream_copy_to_uint32_little_endian( value_data, embedded_object_data_identifier ); if( libpff_item_values_read_local_descriptor_data( internal_item->item_values, internal_item->internal_file->io_handle, internal_item->file_io_handle, embedded_object_data_identifier, &( internal_item->embedded_object_data_reference ), &( internal_item->embedded_object_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read embedded object: %" PRIu32 ".", function, embedded_object_data_identifier ); return( -1 ); } } value_data_reference = internal_item->embedded_object_data_reference; value_data_cache = internal_item->embedded_object_data_cache; } if( libfdata_reference_get_size( value_data_reference, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value data size.", function ); return( -1 ); } return( 1 ); } /* Reads attachment data from the current offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libpff_attachment_data_read_buffer( libpff_item_t *attachment, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_attachment_data_read_buffer"; size_t value_data_size = 0; ssize_t read_count = 0; uint32_t embedded_object_data_identifier = 0; uint32_t value_type = 0; int result = 0; if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) attachment; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing item values.", function ); return( -1 ); } if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item tree node.", function ); return( -1 ); } if( internal_item->item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid item tree node - missing value.", function ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } /* The OLE attachment method could refer to an OLE embedded object */ if( value_type == LIBPFF_VALUE_TYPE_OBJECT ) { if( internal_item->embedded_object_data_reference == NULL ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve embedded object data.", function ); return( -1 ); } if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid entry embedded object data.", function ); return( -1 ); } /* The descriptor identifier is located in the local descriptors tree */ byte_stream_copy_to_uint32_little_endian( value_data, embedded_object_data_identifier ); if( libpff_item_values_read_local_descriptor_data( internal_item->item_values, internal_item->internal_file->io_handle, internal_item->file_io_handle, embedded_object_data_identifier, &( internal_item->embedded_object_data_reference ), &( internal_item->embedded_object_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read embedded object: %" PRIu32 ".", function, embedded_object_data_identifier ); return( -1 ); } } value_data_reference = internal_item->embedded_object_data_reference; value_data_cache = internal_item->embedded_object_data_cache; } read_count = libfdata_reference_read_buffer( value_data_reference, internal_item->file_io_handle, value_data_cache, buffer, buffer_size, error ); if( read_count <= -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read buffer from value data reference.", function ); return( -1 ); } return( read_count ); } /* Seeks a certain offset of the attachment data * Returns the offset if seek is successful or -1 on error */ off64_t libpff_attachment_data_seek_offset( libpff_item_t *attachment, off64_t offset, int whence, libcerror_error_t **error ) { libfcache_cache_t *value_data_cache = NULL; libfdata_reference_t *value_data_reference = NULL; libpff_internal_item_t *internal_item = NULL; uint8_t *value_data = NULL; static char *function = "libpff_attachment_data_seek_offset"; size_t value_data_size = 0; uint32_t embedded_object_data_identifier = 0; uint32_t value_type = 0; int result = 0; if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) attachment; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing item values.", function ); return( -1 ); } if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item tree node.", function ); return( -1 ); } if( internal_item->item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid item tree node - missing value.", function ); return( -1 ); } result = libpff_item_values_get_entry_value( internal_item->item_values, internal_item->internal_file->name_to_id_map_list, internal_item->internal_file->io_handle, internal_item->file_io_handle, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT, &value_type, &value_data_reference, &value_data_cache, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } else if( result == 0 ) { return( 0 ); } /* The OLE attachment method could refer to an OLE embedded object */ if( value_type == LIBPFF_VALUE_TYPE_OBJECT ) { if( internal_item->embedded_object_data_reference == NULL ) { if( libfdata_reference_get_data( value_data_reference, internal_item->file_io_handle, value_data_cache, &value_data, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve embedded object data.", function ); return( -1 ); } if( value_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid entry embedded object data.", function ); return( -1 ); } /* The descriptor identifier is located in the local descriptors tree */ byte_stream_copy_to_uint32_little_endian( value_data, embedded_object_data_identifier ); if( libpff_item_values_read_local_descriptor_data( internal_item->item_values, internal_item->internal_file->io_handle, internal_item->file_io_handle, embedded_object_data_identifier, &( internal_item->embedded_object_data_reference ), &( internal_item->embedded_object_data_cache ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to read embedded object: %" PRIu32 ".", function, embedded_object_data_identifier ); return( -1 ); } } value_data_reference = internal_item->embedded_object_data_reference; value_data_cache = internal_item->embedded_object_data_cache; } offset = libfdata_reference_seek_offset( value_data_reference, offset, whence, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset in value data reference.", function ); return( -1 ); } return( offset ); } /* Retrieves the attachment data file IO handle * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_attachment_get_data_file_io_handle( libpff_item_t *attachment, libbfio_handle_t **file_io_handle, libcerror_error_t **error ) { libpff_attached_file_io_handle_t *io_handle = NULL; static char *function = "libpff_attachment_get_data_file_io_handle"; if( libpff_attached_file_io_handle_initialize( &io_handle, attachment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attached file IO handle.", function ); goto on_error; } if( libbfio_handle_initialize( file_io_handle, (intptr_t *) io_handle, (int (*)(intptr_t **, libcerror_error_t **)) libpff_attached_file_io_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libpff_attached_file_io_handle_clone, (int (*)(intptr_t *, int flags, libcerror_error_t **)) libpff_attached_file_io_handle_open, (int (*)(intptr_t *, libcerror_error_t **)) libpff_attached_file_io_handle_close, (ssize_t (*)(intptr_t *, uint8_t *, size_t, libcerror_error_t **)) libpff_attached_file_io_handle_read, (ssize_t (*)(intptr_t *, const uint8_t *, size_t, libcerror_error_t **)) libpff_attached_file_io_handle_write, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libpff_attached_file_io_handle_seek_offset, (int (*)(intptr_t *, libcerror_error_t **)) libpff_attached_file_io_handle_exists, (int (*)(intptr_t *, libcerror_error_t **)) libpff_attached_file_io_handle_is_open, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libpff_attached_file_io_handle_get_size, LIBBFIO_FLAG_IO_HANDLE_MANAGED | LIBBFIO_FLAG_IO_HANDLE_CLONE_BY_FUNCTION, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file IO handle.", function ); goto on_error; } return( 1 ); on_error: if( io_handle != NULL ) { libpff_attached_file_io_handle_free( &io_handle, NULL ); } return( -1 ); } /* Retrieves the attachment item * Returns 1 if successful, 0 if the item does not contain such value or -1 on error */ int libpff_attachment_get_item( libpff_item_t *attachment, libpff_item_t **attached_item, libcerror_error_t **error ) { libpff_internal_item_t *internal_item = NULL; libpff_local_descriptor_value_t *local_descriptor_value = NULL; libpff_tree_node_t *embedded_item_tree_node = NULL; uint8_t *value_data = NULL; static char *function = "libpff_attachment_get_item"; uint32_t value_type = LIBPFF_VALUE_TYPE_OBJECT; uint32_t embedded_object_item_identifier = 0; size_t value_data_size = 0; int result = 0; if( attachment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attachment.", function ); return( -1 ); } internal_item = (libpff_internal_item_t *) attachment; if( internal_item->internal_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing internal file.", function ); return( -1 ); } if( internal_item->item_values == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attachment - missing item values.", function ); return( -1 ); } if( internal_item->item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - missing item tree node.", function ); return( -1 ); } if( internal_item->item_tree_node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid internal item - invalid item tree node - missing value.", function ); return( -1 ); } if( attached_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid attached item.", function ); return( -1 ); } if( *attached_item != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid attached item already set.", function ); return( -1 ); } if( libpff_item_get_entry_value( attachment, 0, LIBPFF_ENTRY_TYPE_ATTACHMENT_DATA_OBJECT, &value_type, &value_data, &value_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value.", function ); return( -1 ); } if( value_data == NULL ) { return( 0 ); } /* The descriptor identifier is located in the local descriptors tree */ byte_stream_copy_to_uint32_little_endian( value_data, embedded_object_item_identifier ); /* TODO add support for recovered embedded items */ result = libpff_item_tree_get_tree_node_by_identifier( internal_item->internal_file->item_tree_root_node, embedded_object_item_identifier, &embedded_item_tree_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve descriptor index value of attached item: %" PRIu32 ".", function, embedded_object_item_identifier ); return( -1 ); } if( result == 0 ) { result = libpff_item_values_get_local_descriptors_value_by_identifier( internal_item->item_values, internal_item->file_io_handle, embedded_object_item_identifier, &local_descriptor_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve local descriptor identifier: %" PRIu32 ".", function, embedded_object_item_identifier ); return( -1 ); } /* TODO error tollerability flag an attachment as missing if result == 0 */ else if( result == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing local descriptor identifier: %" PRIu32 ".", function, embedded_object_item_identifier ); return( -1 ); } if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor value.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor identifier: %" PRIu64 " ", function, local_descriptor_value->identifier ); libpff_debug_print_node_identifier_type( (uint8_t) ( local_descriptor_value->identifier & 0x0000001fUL ) ); libcnotify_printf( ", data: %" PRIu64 ", local descriptors: %" PRIu64 "\n", local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier ); } #endif /* Make the embedded item the sub item of the attachment */ if( libpff_item_tree_append_identifier( internal_item->item_tree_node, embedded_object_item_identifier, local_descriptor_value->data_identifier, local_descriptor_value->local_descriptors_identifier, internal_item->item_values->recovered, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append attached item: %" PRIu32 " to attachment item tree node.", function, embedded_object_item_identifier ); return( -1 ); } /* Only a single embedded item per attachment should exists */ embedded_item_tree_node = internal_item->item_tree_node->first_sub_node; } if( embedded_item_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attached item tree node.", function ); return( -1 ); } if( libpff_item_initialize( attached_item, internal_item->file_io_handle, internal_item->internal_file, embedded_item_tree_node, (libpff_item_descriptor_t *) embedded_item_tree_node->value, LIBPFF_ITEM_FLAGS_DEFAULT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create attached item.", function ); return( -1 ); } if( *attached_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid attached item.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_unused.h0000644000175000017500000000245212005155304014373 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_INTERNAL_UNUSED_H ) #define _LIBPFF_INTERNAL_UNUSED_H #include #if !defined( LIBPFF_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBPFF_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBPFF_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBPFF_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBPFF_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libpff/libpff_local_descriptor_node.h0000644000175000017500000000440112005155304017421 00000000000000/* * Local descriptor node functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_NODE_LOCAL_DESCRIPTOR_H ) #define _LIBPFF_NODE_LOCAL_DESCRIPTOR_H #include #include #include "libpff_libbfio.h" #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libpff_local_descriptor_node libpff_local_descriptor_node_t; struct libpff_local_descriptor_node { /* The node data */ uint8_t *data; /* The node data size */ size_t data_size; /* The level */ uint8_t level; /* The number of entries */ uint16_t number_of_entries; /* The entry size */ uint8_t entry_size; /* The entries data */ uint8_t *entries_data; /* The maximum entries data size */ uint16_t maximum_entries_data_size; }; int libpff_local_descriptor_node_initialize( libpff_local_descriptor_node_t **local_descriptor_node, libcerror_error_t **error ); int libpff_local_descriptor_node_free( libpff_local_descriptor_node_t **local_descriptor_node, libcerror_error_t **error ); int libpff_local_descriptor_node_get_entry_data( libpff_local_descriptor_node_t *local_descriptor_node, uint16_t entry_index, uint8_t **entry_data, libcerror_error_t **error ); int libpff_local_descriptor_node_read( libpff_local_descriptor_node_t *local_descriptor_node, libbfio_handle_t *file_io_handle, off64_t node_offset, size32_t node_size, uint8_t file_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_tree_type.c0000644000175000017500000007240512005155304015070 00000000000000/* * Tree type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_libcerror.h" #include "libpff_tree_type.h" /* Creates a tree node * Make sure the value node is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libpff_tree_node_initialize( libpff_tree_node_t **node, libcerror_error_t **error ) { static char *function = "libpff_tree_node_initialize"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node value already set.", function ); return( -1 ); } *node = memory_allocate_structure( libpff_tree_node_t ); if( *node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create node.", function ); goto on_error; } if( memory_set( *node, 0, sizeof( libpff_tree_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear node.", function ); goto on_error; } return( 1 ); on_error: if( *node != NULL ) { memory_free( *node ); *node = NULL; } return( -1 ); } /* Frees a tree node, its sub nodes * Uses the value_free_function to free the value * Returns 1 if successful or -1 on error */ int libpff_tree_node_free( libpff_tree_node_t **node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ) { libpff_tree_node_t *sub_node = NULL; static char *function = "libpff_tree_node_free"; int number_of_sub_nodes = 0; int sub_node_iterator = 0; int result = 1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { if( ( ( *node )->parent_node != NULL ) || ( ( *node )->previous_node != NULL ) || ( ( *node )->next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node - connected to other nodes.", function ); return( -1 ); } number_of_sub_nodes = ( *node )->number_of_sub_nodes; for( sub_node_iterator = 0; sub_node_iterator < number_of_sub_nodes; sub_node_iterator++ ) { sub_node = ( *node )->first_sub_node; if( sub_node->previous_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected in sub node: %d.", function, sub_node_iterator ); return( -1 ); } ( *node )->first_sub_node = sub_node->next_node; if( ( *node )->last_sub_node == sub_node ) { ( *node )->last_sub_node = sub_node->next_node; } ( *node )->number_of_sub_nodes -= 1; if( sub_node->next_node != NULL ) { sub_node->next_node->previous_node = NULL; } sub_node->parent_node = NULL; sub_node->next_node = NULL; if( libpff_tree_node_free( &sub_node, value_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub node: %d.", function, sub_node_iterator ); result = -1; } } if( ( *node )->value != NULL ) { if( value_free_function != NULL ) { if( value_free_function( &( ( *node )->value ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); result = -1; } ( *node )->value = NULL; } } memory_free( *node ); *node = NULL; } return( result ); } /* Clones the tree node and its sub nodes * * The values are cloned using the value_clone_function * On error the values are freed using the value_free_function * * Returns 1 if successful or -1 on error */ int libpff_tree_node_clone( libpff_tree_node_t **destination_node, libpff_tree_node_t *source_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { libpff_tree_node_t *destination_sub_node = NULL; libpff_tree_node_t *source_sub_node = NULL; static char *function = "libpff_tree_node_clone"; int sub_node_iterator = 0; if( destination_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination tree node.", function ); return( -1 ); } if( *destination_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination tree node already set.", function ); return( -1 ); } if( value_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value free function.", function ); return( -1 ); } if( value_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value clone function.", function ); return( -1 ); } if( source_node == NULL ) { *destination_node = NULL; return( 1 ); } if( libpff_tree_node_initialize( destination_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination tree node.", function ); return( -1 ); } if( *destination_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination tree node.", function ); return( -1 ); } if( value_clone_function( &( ( *destination_node )->value ), source_node->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone tree node value.", function ); goto on_error; } /* Clone the sub nodes */ source_sub_node = source_node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < source_node->number_of_sub_nodes; sub_node_iterator++ ) { if( source_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected in source sub node: %d.", function, sub_node_iterator ); goto on_error; } if( libpff_tree_node_clone( &destination_sub_node, source_sub_node, value_free_function, value_clone_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to clone sub node: %d.", function, sub_node_iterator ); goto on_error; } if( libpff_tree_node_append_node( *destination_node, destination_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append sub node: %d to destination tree node.", function, sub_node_iterator ); goto on_error; } destination_sub_node = NULL; source_sub_node = source_sub_node->next_node; } return( 1 ); on_error: if( destination_sub_node != NULL ) { libpff_tree_node_free( &destination_sub_node, value_free_function, NULL ); } if( destination_node != NULL ) { libpff_tree_node_free( destination_node, value_free_function, NULL ); } return( -1 ); } /* Retrieves the value from the tree node * Returns 1 if successful or -1 on error */ int libpff_tree_node_get_value( libpff_tree_node_t *node, intptr_t **value, libcerror_error_t **error ) { static char *function = "libpff_tree_node_get_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } *value = node->value; return( 1 ); } /* Sets the value in the tree node * Returns 1 if successful or -1 on error */ int libpff_tree_node_set_value( libpff_tree_node_t *node, intptr_t *value, libcerror_error_t **error ) { static char *function = "libpff_tree_node_set_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } node->value = value; return( 1 ); } /* Appends a tree node to the parent node * Returns 1 if successful or -1 on error */ int libpff_tree_node_append_node( libpff_tree_node_t *parent_node, libpff_tree_node_t *node, libcerror_error_t **error ) { static char *function = "libpff_tree_node_append_node"; if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent node.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( ( node->parent_node != NULL ) || ( node->previous_node != NULL ) || ( node->next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: node already part of another.", function ); return( -1 ); } node->parent_node = parent_node; if( parent_node->number_of_sub_nodes == 0 ) { if( parent_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( parent_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } parent_node->first_sub_node = node; parent_node->last_sub_node = node; } else { if( parent_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first sub node.", function ); return( -1 ); } if( parent_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last sub node.", function ); return( -1 ); } node->previous_node = parent_node->last_sub_node; parent_node->last_sub_node->next_node = node; parent_node->last_sub_node = node; } parent_node->number_of_sub_nodes += 1; return( 1 ); } /* Appends a value to the parent node * Creates a new tree node * Returns 1 if successful or -1 on error */ int libpff_tree_node_append_value( libpff_tree_node_t *parent_node, intptr_t *value, libcerror_error_t **error ) { libpff_tree_node_t *tree_node = NULL; static char *function = "libpff_tree_node_append_value"; if( libpff_tree_node_initialize( &tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create tree node.", function ); goto on_error; } if( libpff_tree_node_append_node( parent_node, tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append tree node.", function ); goto on_error; } if( libpff_tree_node_set_value( tree_node, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set value in tree node.", function ); goto on_error; } return( 1 ); on_error: if( tree_node != NULL ) { libpff_tree_node_free( &tree_node, NULL, NULL ); } return( -1 ); } /* Inserts a tree node in the parent node * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBPFF_TREE_NODE_COMPARE_LESS, * LIBPFF_TREE_NODE_COMPARE_EQUAL, LIBPFF_TREE_NODE_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libpff_tree_node_insert_node( libpff_tree_node_t *parent_node, libpff_tree_node_t *node, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libpff_tree_node_t *sub_node = NULL; static char *function = "libpff_tree_node_insert_node"; int result = -1; int sub_node_iterator = 0; if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent node.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( ( node->parent_node != NULL ) || ( node->previous_node != NULL ) || ( node->next_node != NULL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: node already part of another.", function ); return( -1 ); } if( value_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( parent_node->number_of_sub_nodes == 0 ) { if( parent_node->first_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - first sub node already set.", function ); return( -1 ); } if( parent_node->last_sub_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: corruption detected - last sub node already set.", function ); return( -1 ); } parent_node->first_sub_node = node; parent_node->last_sub_node = node; } else { if( parent_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first sub node.", function ); return( -1 ); } if( parent_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last sub node.", function ); return( -1 ); } sub_node = parent_node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < parent_node->number_of_sub_nodes; sub_node_iterator++ ) { result = value_compare_function( node->value, sub_node->value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare sub node: %d.", function, sub_node_iterator ); return( -1 ); } else if( result == LIBPFF_TREE_NODE_COMPARE_EQUAL ) { if( ( insert_flags & LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBPFF_TREE_NODE_COMPARE_LESS ) { break; } else if( result != LIBPFF_TREE_NODE_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported value compare function return value: %d.", function, result ); return( -1 ); } sub_node = sub_node->next_node; } if( result == LIBPFF_TREE_NODE_COMPARE_LESS ) { node->previous_node = sub_node->previous_node; node->next_node = sub_node; if( sub_node == parent_node->first_sub_node ) { parent_node->first_sub_node = node; } else if( sub_node->previous_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing previous node in sub node: %d.", function, sub_node_iterator ); return( -1 ); } else { sub_node->previous_node->next_node = node; } sub_node->previous_node = node; } else { node->previous_node = parent_node->last_sub_node; parent_node->last_sub_node->next_node = node; parent_node->last_sub_node = node; } } node->parent_node = parent_node; parent_node->number_of_sub_nodes += 1; return( 1 ); } /* Inserts a value in the parent node * * Creates a new tree node * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBPFF_TREE_NODE_COMPARE_LESS, * LIBPFF_TREE_NODE_COMPARE_EQUAL, LIBPFF_TREE_NODE_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libpff_tree_node_insert_value( libpff_tree_node_t *parent_node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { libpff_tree_node_t *tree_node = NULL; static char *function = "libpff_tree_node_insert_value"; int result = 0; if( libpff_tree_node_initialize( &tree_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create tree node.", function ); goto on_error; } if( libpff_tree_node_set_value( tree_node, value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set value in tree node.", function ); goto on_error; } result = libpff_tree_node_insert_node( parent_node, tree_node, value_compare_function, insert_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert node.", function ); goto on_error; } else if( result == 0 ) { if( libpff_tree_node_free( &tree_node, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free tree node.", function ); goto on_error; } } return( result ); on_error: if( tree_node != NULL ) { libpff_tree_node_free( &tree_node, NULL, NULL ); } return( -1 ); } /* Removes a tree node from the parent node * Returns 1 if successful or -1 on error */ int libpff_tree_node_remove_node( libpff_tree_node_t *parent_node, libpff_tree_node_t *node, libcerror_error_t **error ) { static char *function = "libpff_tree_node_remove_node"; if( parent_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid parent node.", function ); return( -1 ); } if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( parent_node != node->parent_node ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in parent node.", function ); return( -1 ); } if( parent_node->number_of_sub_nodes == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing number of sub nodes.", function ); return( -1 ); } if( parent_node->first_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing first sub node.", function ); return( -1 ); } if( parent_node->last_sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected - missing last sub node.", function ); return( -1 ); } if( parent_node->first_sub_node == node ) { parent_node->first_sub_node = node->next_node; } if( parent_node->last_sub_node == node ) { parent_node->last_sub_node = node->previous_node; } if( node->next_node != NULL ) { node->next_node->previous_node = node->previous_node; } if( node->previous_node != NULL ) { node->previous_node->next_node = node->next_node; } node->parent_node = NULL; node->previous_node = NULL; node->next_node = NULL; parent_node->number_of_sub_nodes -= 1; return( 1 ); } /* Retrieves the number of sub nodes in the tree node * Returns 1 if successful or -1 on error */ int libpff_tree_node_get_number_of_sub_nodes( libpff_tree_node_t *node, int *number_of_sub_nodes, libcerror_error_t **error ) { static char *function = "libpff_tree_node_get_number_of_sub_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( number_of_sub_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of sub nodes.", function ); return( -1 ); } *number_of_sub_nodes = node->number_of_sub_nodes; return( 1 ); } /* Retrieves a specific sub node from the tree node * Returns 1 if successful or -1 on error */ int libpff_tree_node_get_sub_node_by_index( libpff_tree_node_t *node, int sub_node_index, libpff_tree_node_t **sub_node, libcerror_error_t **error ) { static char *function = "libpff_tree_node_get_sub_node_by_index"; int result = -1; int sub_node_iterator = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( ( sub_node_index < 0 ) || ( sub_node_index >= node->number_of_sub_nodes ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sub node index value out of bounds.", function ); return( -1 ); } if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node.", function ); return( -1 ); } /* Check if the sub nodes should be searched front to back * or back to front */ if( sub_node_index < ( node->number_of_sub_nodes / 2 ) ) { *sub_node = node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < node->number_of_sub_nodes; sub_node_iterator++ ) { if( *sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for sub node: %d.", function, sub_node_iterator ); return( -1 ); } if( sub_node_iterator == sub_node_index ) { result = 1; break; } *sub_node = ( *sub_node )->next_node; } } else { *sub_node = node->last_sub_node; for( sub_node_iterator = ( node->number_of_sub_nodes - 1 ); sub_node_iterator >= 0; sub_node_iterator-- ) { if( *sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for sub node: %d.", function, sub_node_iterator ); return( -1 ); } if( sub_node_iterator == sub_node_index ) { result = 1; break; } *sub_node = ( *sub_node )->previous_node; } } return( result ); } /* Retrieves a list of all the leaf nodes * Returns 1 if successful or -1 on error */ int libpff_tree_node_get_leaf_node_list( libpff_tree_node_t *node, libpff_list_t **leaf_node_list, libcerror_error_t **error ) { libpff_tree_node_t *sub_node = NULL; static char *function = "libpff_tree_node_get_leaf_node_list"; int sub_node_iterator = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( leaf_node_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf node list.", function ); return( -1 ); } if( *leaf_node_list == NULL ) { if( libpff_list_initialize( leaf_node_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create leaf node list.", function ); return( -1 ); } } /* Traverse the sub nodes */ if( node->number_of_sub_nodes > 0 ) { sub_node = node->first_sub_node; for( sub_node_iterator = 0; sub_node_iterator < node->number_of_sub_nodes; sub_node_iterator++ ) { if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: corruption detected for sub node: %d.", function, sub_node_iterator ); return( -1 ); } if( libpff_tree_node_get_leaf_node_list( sub_node, leaf_node_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: unable to traverse sub node: %d.", function, sub_node_iterator ); return( -1 ); } sub_node = sub_node->next_node; } } else if( node->value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid node - missing value.", function ); return( -1 ); } else if( libpff_list_append_value( *leaf_node_list, node->value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append tree node to leaf node list.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libpff/libpff_error.c0000644000175000017500000000502412005155304014212 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_error.h" #include "libpff_libcerror.h" #if !defined( HAVE_LOCAL_LIBPFF ) /* Free an error and its elements */ void libpff_error_free( libpff_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libpff_error_fprint( libpff_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libpff_error_sprint( libpff_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libpff_error_backtrace_fprint( libpff_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libpff_error_backtrace_sprint( libpff_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif libpff-20120802/libpff/libpff_array_type.c0000644000175000017500000005320512005155304015244 00000000000000/* * Array type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_array_type.h" #include "libpff_libcerror.h" /* Creates an array * Make sure the value array is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libpff_array_initialize( libpff_array_t **array, int number_of_entries, libcerror_error_t **error ) { static char *function = "libpff_array_initialize"; size_t entries_size = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid array value already set.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *array = memory_allocate_structure( libpff_array_t ); if( *array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array.", function ); goto on_error; } if( memory_set( *array, 0, sizeof( libpff_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array.", function ); goto on_error; } if( number_of_entries > 0 ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); goto on_error; } ( *array )->entries = (intptr_t **) memory_allocate( entries_size ); if( ( *array )->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array entries.", function ); goto on_error; } if( memory_set( ( *array )->entries, 0, entries_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); goto on_error; } ( *array )->number_of_allocated_entries = number_of_entries; ( *array )->number_of_entries = number_of_entries; } return( 1 ); on_error: if( *array != NULL ) { if( ( *array )->entries != NULL ) { memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( -1 ); } /* Frees an array * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libpff_array_free( libpff_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libpff_array_free"; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { if( ( *array )->entries != NULL ) { if( libpff_array_clear( *array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); result = -1; } memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( result ); } /* Empties an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libpff_array_empty( libpff_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libpff_array_empty"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( libpff_array_clear( array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); return( -1 ); } array->number_of_entries = 0; return( 1 ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libpff_array_clear( libpff_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libpff_array_clear"; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } } return( result ); } /* Clones the array and its entries * * The entries are cloned using the entry_clone_function * On error the entries are freed using the entry_free_function * * Returns 1 if successful or -1 on error */ int libpff_array_clone( libpff_array_t **destination_array, libpff_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libpff_array_clone"; int entry_iterator = 0; if( destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination array.", function ); return( -1 ); } if( *destination_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination array already set.", function ); return( -1 ); } if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } if( entry_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry clone function.", function ); return( -1 ); } if( source_array == NULL ) { *destination_array = NULL; return( 1 ); } if( libpff_array_initialize( destination_array, source_array->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination array.", function ); goto on_error; } if( *destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination array.", function ); goto on_error; } if( source_array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < source_array->number_of_entries; entry_iterator++ ) { if( source_array->entries[ entry_iterator ] != NULL ) { if( entry_clone_function( &( ( *destination_array )->entries[ entry_iterator ] ), source_array->entries[ entry_iterator ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone array entry: %d.", function, entry_iterator ); goto on_error; } } } } return( 1 ); on_error: if( *destination_array != NULL ) { libpff_array_free( destination_array, entry_free_function, NULL ); } return( -1 ); } /* Resizes an array * Returns 1 if successful or -1 on error */ int libpff_array_resize( libpff_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { void *reallocation = NULL; static char *function = "libpff_array_resize"; size_t entries_size = 0; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } if( number_of_entries > array->number_of_allocated_entries ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( array->entries, entries_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize array entries.", function ); return( -1 ); } array->entries = (intptr_t **) reallocation; if( memory_set( &( array->entries[ array->number_of_allocated_entries ] ), 0, sizeof( intptr_t * ) * ( number_of_entries - array->number_of_allocated_entries ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); result = -1; } array->number_of_allocated_entries = number_of_entries; array->number_of_entries = number_of_entries; } else if( number_of_entries > array->number_of_entries ) { array->number_of_entries = number_of_entries; } else if( array->entries != NULL ) { if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } for( entry_iterator = number_of_entries; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } array->number_of_entries = number_of_entries; } return( result ); } /* Retrieves the number of entries in the array * Returns 1 if successful or -1 on error */ int libpff_array_get_number_of_entries( libpff_array_t *array, int *number_of_entries, libcerror_error_t **error ) { static char *function = "libpff_array_get_number_of_entries"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *number_of_entries = array->number_of_entries; return( 1 ); } /* Retrieves a specific entry from the array * Returns 1 if successful or -1 on error */ int libpff_array_get_entry_by_index( libpff_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ) { static char *function = "libpff_array_get_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } if( entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry.", function ); return( -1 ); } *entry = array->entries[ entry_index ]; return( 1 ); } /* Sets a specific entry in the array * Returns 1 if successful or -1 on error */ int libpff_array_set_entry_by_index( libpff_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libpff_array_set_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } array->entries[ entry_index ] = entry; return( 1 ); } /* Appends an entry * Sets the entry index to the newly appended entry * Returns 1 if successful or -1 on error */ int libpff_array_append_entry( libpff_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libpff_array_append_entry"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } *entry_index = array->number_of_entries; if( libpff_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; return( 1 ); } /* Inserts an entry in the array * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBPFF_ARRAY_COMPARE_LESS, * LIBPFF_ARRAY_COMPARE_EQUAL, LIBPFF_ARRAY_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBPFF_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libpff_array_insert_entry( libpff_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { static char *function = "libpff_tree_node_insert_node"; int entry_iterator = 0; int result = -1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } if( entry_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBPFF_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { result = entry_compare_function( entry, array->entries[ entry_iterator ], error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare entry: %d.", function, entry_iterator ); return( -1 ); } else if( result == LIBPFF_ARRAY_COMPARE_EQUAL ) { if( ( insert_flags & LIBPFF_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBPFF_ARRAY_COMPARE_LESS ) { break; } else if( result != LIBPFF_ARRAY_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry compare function return value: %d.", function, result ); return( -1 ); } } } if( ( array->entries != NULL ) && ( result == LIBPFF_ARRAY_COMPARE_LESS ) ) { *entry_index = entry_iterator; if( libpff_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } for( entry_iterator = array->number_of_entries - 1; entry_iterator > *entry_index; entry_iterator-- ) { array->entries[ entry_iterator ] = array->entries[ entry_iterator - 1 ]; } array->entries[ *entry_index ] = entry; } else { *entry_index = array->number_of_entries; if( libpff_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; } return( 1 ); } libpff-20120802/libpff/libpff_local_descriptor_value.c0000644000175000017500000001210112005155304017577 00000000000000/* * Local descriptor value functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libpff_libcerror.h" #include "libpff_local_descriptor_value.h" /* Creates local descriptor value * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_value_initialize( libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ) { static char *function = "libpff_local_descriptor_value_initialize"; if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor value.", function ); return( -1 ); } if( *local_descriptor_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid local descriptor value value already set.", function ); return( -1 ); } *local_descriptor_value = memory_allocate_structure( libpff_local_descriptor_value_t ); if( *local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create local descriptor value.", function ); goto on_error; } if( memory_set( *local_descriptor_value, 0, sizeof( libpff_local_descriptor_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear local descriptor value.", function ); goto on_error; } return( 1 ); on_error: if( *local_descriptor_value != NULL ) { memory_free( *local_descriptor_value ); *local_descriptor_value = NULL; } return( -1 ); } /* Frees local descriptor value * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_value_free( libpff_local_descriptor_value_t **local_descriptor_value, libcerror_error_t **error ) { static char *function = "libpff_local_descriptor_value_free"; if( local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor value.", function ); return( -1 ); } if( *local_descriptor_value != NULL ) { memory_free( *local_descriptor_value ); *local_descriptor_value = NULL; } return( 1 ); } /* Clones the local descriptor value * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_value_clone( libpff_local_descriptor_value_t **destination_local_descriptor_value, libpff_local_descriptor_value_t *source_local_descriptor_value, libcerror_error_t **error ) { static char *function = "libpff_local_descriptor_value_clone"; if( destination_local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination local descriptor value.", function ); return( -1 ); } if( *destination_local_descriptor_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination local descriptor value already set.", function ); return( -1 ); } if( source_local_descriptor_value == NULL ) { *destination_local_descriptor_value = NULL; return( 1 ); } *destination_local_descriptor_value = memory_allocate_structure( libpff_local_descriptor_value_t ); if( *destination_local_descriptor_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination local descriptor value.", function ); goto on_error; } if( memory_copy( *destination_local_descriptor_value, source_local_descriptor_value, sizeof( libpff_local_descriptor_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy local descriptor value.", function ); goto on_error; } return( 1 ); on_error: if( *destination_local_descriptor_value != NULL ) { memory_free( *destination_local_descriptor_value ); *destination_local_descriptor_value = NULL; } return( -1 ); } libpff-20120802/libpff/libpff_tree_type.h0000644000175000017500000001104212005155304015063 00000000000000/* * Tree type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_TREE_TYPE_H ) #define _LIBPFF_TREE_TYPE_H #include #include #include "libpff_libcerror.h" #include "libpff_list_type.h" #if defined( __cplusplus ) extern "C" { #endif /* The tree node comparison definitions */ enum LIBPFF_TREE_NODE_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBPFF_TREE_NODE_COMPARE_LESS, /* The first and second values are equal */ LIBPFF_TREE_NODE_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBPFF_TREE_NODE_COMPARE_GREATER }; /* The tree node insert flag definitions */ enum LIBPFF_TREE_NODE_INSERT_FLAGS { /* Allow duplicate entries */ LIBPFF_TREE_NODE_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBPFF_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libpff_tree_node libpff_tree_node_t; struct libpff_tree_node { /* The parent node */ libpff_tree_node_t *parent_node; /* The previous node list */ libpff_tree_node_t *previous_node; /* The next node list */ libpff_tree_node_t *next_node; /* The first sub node */ libpff_tree_node_t *first_sub_node; /* The last sub node */ libpff_tree_node_t *last_sub_node; /* The number of sub nodes */ int number_of_sub_nodes; /* The node value */ intptr_t *value; }; int libpff_tree_node_initialize( libpff_tree_node_t **node, libcerror_error_t **error ); int libpff_tree_node_free( libpff_tree_node_t **node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_tree_node_clone( libpff_tree_node_t **destination_node, libpff_tree_node_t *source_node, int (*value_free_function)( intptr_t **value, libcerror_error_t **error ), int (*value_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_tree_node_get_value( libpff_tree_node_t *node, intptr_t **value, libcerror_error_t **error ); int libpff_tree_node_set_value( libpff_tree_node_t *node, intptr_t *value, libcerror_error_t **error ); int libpff_tree_node_append_node( libpff_tree_node_t *parent_node, libpff_tree_node_t *node, libcerror_error_t **error ); int libpff_tree_node_append_value( libpff_tree_node_t *parent_node, intptr_t *value, libcerror_error_t **error ); int libpff_tree_node_insert_node( libpff_tree_node_t *parent_node, libpff_tree_node_t *node, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); int libpff_tree_node_insert_value( libpff_tree_node_t *parent_node, intptr_t *value, int (*value_compare_function)( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); int libpff_tree_node_remove_node( libpff_tree_node_t *parent_node, libpff_tree_node_t *node, libcerror_error_t **error ); int libpff_tree_node_get_number_of_sub_nodes( libpff_tree_node_t *node, int *number_of_sub_nodes, libcerror_error_t **error ); int libpff_tree_node_get_sub_node_by_index( libpff_tree_node_t *node, int sub_node_index, libpff_tree_node_t **sub_node, libcerror_error_t **error ); int libpff_tree_node_get_leaf_node_list( libpff_tree_node_t *node, libpff_list_t **leaf_node_list, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_local_descriptor_node.c0000644000175000017500000003537312005155304017430 00000000000000/* * Local descriptor node functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libpff_definitions.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libcnotify.h" #include "libpff_libfmapi.h" #include "libpff_local_descriptor_node.h" #include "pff_local_descriptor_node.h" /* Initializes the local descriptor node * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_node_initialize( libpff_local_descriptor_node_t **local_descriptor_node, libcerror_error_t **error ) { static char *function = "libpff_local_descriptor_node_initialize"; if( local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor node.", function ); return( -1 ); } if( *local_descriptor_node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid local descriptor node value already set.", function ); return( -1 ); } *local_descriptor_node = memory_allocate_structure( libpff_local_descriptor_node_t ); if( *local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create local descriptor node.", function ); goto on_error; } if( memory_set( *local_descriptor_node, 0, sizeof( libpff_local_descriptor_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear local descriptor node.", function ); goto on_error; } return( 1 ); on_error: if( *local_descriptor_node != NULL ) { memory_free( *local_descriptor_node ); *local_descriptor_node = NULL; } return( -1 ); } /* Frees the local descriptor node * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_node_free( libpff_local_descriptor_node_t **local_descriptor_node, libcerror_error_t **error ) { static char *function = "libpff_local_descriptor_node_free"; if( local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor node.", function ); return( -1 ); } if( *local_descriptor_node != NULL ) { if( ( *local_descriptor_node )->data != NULL ) { memory_free( ( *local_descriptor_node )->data ); } memory_free( *local_descriptor_node ); *local_descriptor_node = NULL; } return( 1 ); } /* Retrieves the data of a specific entry * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_node_get_entry_data( libpff_local_descriptor_node_t *local_descriptor_node, uint16_t entry_index, uint8_t **entry_data, libcerror_error_t **error ) { static char *function = "libpff_local_descriptor_node_get_entry_data"; size_t entry_offset = 0; if( local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor node.", function ); return( -1 ); } if( local_descriptor_node->entries_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid local descriptor node - missing entries data.", function ); return( -1 ); } if( entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry data.", function ); return( -1 ); } entry_offset = (size_t) ( local_descriptor_node->entry_size * entry_index ); if( entry_offset > (size_t) local_descriptor_node->maximum_entries_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: entry index value exceeds maximum.", function ); return( -1 ); } *entry_data = &( local_descriptor_node->entries_data[ entry_offset ] ); return( 1 ); } /* Reads an local descriptor node * Returns 1 if successful or -1 on error */ int libpff_local_descriptor_node_read( libpff_local_descriptor_node_t *local_descriptor_node, libbfio_handle_t *file_io_handle, off64_t node_offset, size32_t node_size, uint8_t file_type, libcerror_error_t **error ) { uint8_t *local_descriptor_node_data = NULL; static char *function = "libpff_local_descriptor_node_read"; size_t local_descriptor_node_header_size = 0; ssize_t read_count = 0; uint8_t node_signature = 0; #if defined( HAVE_DEBUG_OUTPUT ) uint8_t *local_descriptor_node_entry_data = NULL; uint64_t value_64bit = 0; uint16_t entry_index = 0; #endif if( local_descriptor_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid local descriptor node.", function ); return( -1 ); } if( local_descriptor_node->data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid local descriptor node - data already set.", function ); return( -1 ); } if( node_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid node offset value out of bounds.", function ); return( -1 ); } if( node_size > (size32_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: node size value exceeds maximum.", function ); return( -1 ); } if( ( file_type != LIBPFF_FILE_TYPE_32BIT ) && ( file_type != LIBPFF_FILE_TYPE_64BIT ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported file type.", function ); return( -1 ); } local_descriptor_node->data_size = (size_t) node_size; local_descriptor_node->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * local_descriptor_node->data_size ); if( local_descriptor_node->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create local descriptor node data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading local descriptor node data at offset: %" PRIi64 " (0x%08" PRIx64 ")\n", function, node_offset, node_offset ); } #endif if( libbfio_handle_seek_offset( file_io_handle, node_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek node offset: %" PRIi64 ".", function, node_offset ); return( -1 ); } read_count = libbfio_handle_read_buffer( file_io_handle, local_descriptor_node->data, local_descriptor_node->data_size, error ); if( read_count != (ssize_t) local_descriptor_node->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read local descriptor node data.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptor node data:\n", function ); libcnotify_print_data( local_descriptor_node->data, local_descriptor_node->data_size, 0 ); } #endif local_descriptor_node_data = local_descriptor_node->data; /* Parse the local descriptors node data */ if( file_type == LIBPFF_FILE_TYPE_32BIT ) { node_signature = ( (pff_local_descriptor_node_32bit_t *) local_descriptor_node_data )->signature; local_descriptor_node->level = ( (pff_local_descriptor_node_32bit_t *) local_descriptor_node_data )->level; byte_stream_copy_to_uint16_little_endian( ( (pff_local_descriptor_node_32bit_t *) local_descriptor_node_data )->number_of_entries, local_descriptor_node->number_of_entries ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { node_signature = ( (pff_local_descriptor_node_64bit_t *) local_descriptor_node_data )->signature; local_descriptor_node->level = ( (pff_local_descriptor_node_64bit_t *) local_descriptor_node_data )->level; byte_stream_copy_to_uint16_little_endian( ( (pff_local_descriptor_node_64bit_t *) local_descriptor_node_data )->number_of_entries, local_descriptor_node->number_of_entries ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: local descriptors node signature\t\t: 0x%02" PRIx8 "\n", function, node_signature ); libcnotify_printf( "%s: local descriptors node level\t\t\t: %" PRIu8 "\n", function, local_descriptor_node->level ); libcnotify_printf( "%s: number of entries\t\t\t\t: %" PRIu16 "\n", function, local_descriptor_node->number_of_entries ); if( file_type == LIBPFF_FILE_TYPE_64BIT ) { libcnotify_printf( "%s: padding1:\n", function ); libcnotify_print_data( ( (pff_local_descriptor_node_64bit_t *) local_descriptor_node_data )->padding1, 4, 0 ); } } #endif if( node_signature != 0x02 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: unsupported local descriptors node signature: 0x%02" PRIx8 ".", function, node_signature ); return( -1 ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { local_descriptor_node_header_size = sizeof( pff_local_descriptor_node_32bit_t ); if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { local_descriptor_node->entry_size = sizeof( pff_local_descriptor_leaf_node_entry_type_32bit_t ); } else { local_descriptor_node->entry_size = sizeof( pff_local_descriptor_branch_node_entry_type_32bit_t ); } } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { local_descriptor_node_header_size = sizeof( pff_local_descriptor_node_64bit_t ); if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { local_descriptor_node->entry_size = sizeof( pff_local_descriptor_leaf_node_entry_type_64bit_t ); } else { local_descriptor_node->entry_size = sizeof( pff_local_descriptor_branch_node_entry_type_64bit_t ); } } /* TODO additional sanity checks */ if( local_descriptor_node->number_of_entries == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of entries.", function ); /* TODO implement error tollerance */ return( -1 ); } local_descriptor_node->maximum_entries_data_size = local_descriptor_node->number_of_entries * (uint16_t) local_descriptor_node->entry_size; if( (size_t) local_descriptor_node->maximum_entries_data_size != ( local_descriptor_node->data_size - local_descriptor_node_header_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch in total size of the entries data and the size of the entries.", function ); /* TODO implement error tollerance */ return( -1 ); } local_descriptor_node->entries_data = &( local_descriptor_node_data[ local_descriptor_node_header_size ] ); #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { local_descriptor_node_entry_data = local_descriptor_node->entries_data; for( entry_index = 0; entry_index < local_descriptor_node->number_of_entries; entry_index++ ) { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( local_descriptor_node_entry_data, value_64bit ); local_descriptor_node_entry_data += 4; } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( local_descriptor_node_entry_data, value_64bit ); local_descriptor_node_entry_data += 8; } libcnotify_printf( "%s: entry: %03d identifier\t\t\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( local_descriptor_node_entry_data, value_64bit ); local_descriptor_node_entry_data += 4; } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( local_descriptor_node_entry_data, value_64bit ); local_descriptor_node_entry_data += 8; } libcnotify_printf( "%s: entry: %03d data identifier\t\t\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); } if( file_type == LIBPFF_FILE_TYPE_32BIT ) { byte_stream_copy_to_uint32_little_endian( local_descriptor_node_entry_data, value_64bit ); local_descriptor_node_entry_data += 4; } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { byte_stream_copy_to_uint64_little_endian( local_descriptor_node_entry_data, value_64bit ); local_descriptor_node_entry_data += 8; } if( local_descriptor_node->level == PFF_LOCAL_DESCRIPTOR_NODE_LEVEL_LEAF ) { libcnotify_printf( "%s: entry: %03d local descriptors identifier\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); } else { libcnotify_printf( "%s: entry: %03d sub node identifier\t\t: 0x%08" PRIx64 " (%" PRIu64 ")\n", function, entry_index, value_64bit, value_64bit ); } } libcnotify_printf( "\n" ); } #endif return( 1 ); } libpff-20120802/libpff/pff_table_block.h0000644000175000017500000000327112005155305014643 00000000000000/* * The table block definition of a Personal Folder File * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFF_TABLE_BLOCK_H ) #define _PFF_TABLE_BLOCK_H #include #include #if defined( __cplusplus ) extern "C" { #endif typedef struct pff_table_block pff_table_block_t; struct pff_table_block { /* The index offset * Consists of 2 bytes * The offset is relative to the start of the table block */ uint8_t index_offset[ 2 ]; /* The table block values */ /* The table block index */ }; typedef struct pff_table_block_index pff_table_block_index_t; struct pff_table_block_index { /* The number of offsets in the table index * Consists of 2 bytes */ uint8_t number_of_offsets[ 2 ]; /* The number of unused offsets in the table index * Consists of 2 bytes */ uint8_t number_of_unused_offsets[ 2 ]; /* The offsets array * Each index offset consists of 2 bytes */ }; #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_io_handle.h0000644000175000017500000001622712005155304015017 00000000000000/* * Input/Output (IO) handle functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_IO_HANDLE_H ) #define _LIBPFF_IO_HANDLE_H #include #include #include "libpff_index_value.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_libfcache.h" #include "libpff_libfdata.h" #include "libpff_list_type.h" #include "libpff_offset_list.h" #include "libpff_tree_type.h" #if defined( __cplusplus ) extern "C" { #endif extern const uint8_t pff_file_signature[ 4 ]; typedef struct libpff_io_handle libpff_io_handle_t; struct libpff_io_handle { /* The index nodes vector */ libfdata_vector_t *index_nodes_vector; /* The index nodes cache */ libfcache_cache_t *index_nodes_cache; /* The descriptor index (data) tree */ libfdata_tree_t *descriptor_index_tree; /* The offset index (data) tree */ libfdata_tree_t *offset_index_tree; /* The recovered descriptor index (data) tree */ libfdata_tree_t *recovered_descriptor_index_tree; /* The recovered offset index (data) tree */ libfdata_tree_t *recovered_offset_index_tree; /* The descriptor index tree (value) cache */ libfcache_cache_t *descriptor_index_tree_cache; /* The offset index tree (value) cache */ libfcache_cache_t *offset_index_tree_cache; /* The file size */ size64_t file_size; /* The descriptor index root node offset */ off64_t descriptor_index_root_node_offset; /* The offset index root node offset */ off64_t offset_index_root_node_offset; /* The encryption type */ uint8_t encryption_type; /* Value to indicate decryption should be forced */ uint8_t force_decryption; /* The file type */ uint8_t file_type; /* The codepage of the extended ASCII strings */ int ascii_codepage; /* Value to indicate if abort was signalled */ int abort; }; int libpff_io_handle_initialize( libpff_io_handle_t **io_handle, libcerror_error_t **error ); int libpff_io_handle_free( libpff_io_handle_t **io_handle, libcerror_error_t **error ); int libpff_io_handle_read_file_header( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, int *file_content_type, libcerror_error_t **error ); int libpff_io_handle_read_unallocated_data_blocks( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, libcerror_error_t **error ); int libpff_io_handle_read_unallocated_page_blocks( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_page_block_list, libcerror_error_t **error ); int libpff_io_handle_create_item_tree( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_tree_node_t **item_tree_root_node, libpff_list_t *orphan_node_list, libpff_tree_node_t **root_folder_item_tree_node, libcerror_error_t **error ); int libpff_io_handle_read_index_node( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, off64_t element_data_offset, size64_t element_data_size, uint8_t read_flags, libcerror_error_t **error ); int libpff_io_handle_read_local_descriptor_node( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ); int libpff_io_handle_get_descriptor_index_value_by_identifier( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, uint8_t recovered, libpff_index_value_t **descriptor_index_value, libcerror_error_t **error ); int libpff_io_handle_get_offset_index_value_by_identifier( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint64_t data_identifier, uint8_t recovered, int recovered_value_index, libpff_index_value_t **offset_index_value, libcerror_error_t **error ); int libpff_io_handle_read_descriptor_local_descriptors_tree( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint64_t local_descriptors_identifier, uint8_t recovered, int recovered_value_index, libfdata_tree_t **local_descriptors_tree, libcerror_error_t **error ); int libpff_io_handle_read_descriptor_data_block( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, uint64_t data_identifier, uint8_t recovered, int recovered_value_index, libfdata_block_t **descriptor_data_block, libfcache_cache_t **descriptor_data_cache, libcerror_error_t **error ); int libpff_io_handle_read_descriptor_data_reference( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint32_t descriptor_identifier, uint64_t data_identifier, uint8_t recovered, int recovered_value_index, libfdata_reference_t **descriptor_data_reference, libfcache_cache_t **descriptor_data_cache, libcerror_error_t **error ); int libpff_io_handle_recover_items( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, libpff_offset_list_t *unallocated_page_block_list, libpff_list_t *recovered_item_list, uint8_t recovery_flags, libcerror_error_t **error ); int libpff_io_handle_recover_index_nodes( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libcerror_error_t **error ); int libpff_io_handle_recover_data_blocks( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, libpff_offset_list_t *unallocated_page_block_list, uint8_t recovery_flags, libcerror_error_t **error ); int libpff_io_handle_recover_index_values( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, libpff_offset_list_t *unallocated_data_block_list, size64_t node_offset, uint8_t recovery_flags, libcerror_error_t **error ); int libpff_io_handle_recover_local_descriptors( libpff_io_handle_t *io_handle, libbfio_handle_t *file_io_handle, uint64_t local_descriptors_identifier, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_array_type.h0000644000175000017500000000775612005155304015263 00000000000000/* * Array type functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_ARRAY_TYPE_H ) #define _LIBPFF_ARRAY_TYPE_H #include #include #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The array comparison definitions */ enum LIBPFF_ARRAY_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBPFF_ARRAY_COMPARE_LESS, /* The first and second values are equal */ LIBPFF_ARRAY_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBPFF_ARRAY_COMPARE_GREATER }; /* The array insert flag definitions */ enum LIBPFF_ARRAY_INSERT_FLAGS { /* Allow duplicate entries */ LIBPFF_ARRAY_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBPFF_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libpff_array libpff_array_t; struct libpff_array { /* The number of allocated entries */ int number_of_allocated_entries; /* The number of entries */ int number_of_entries; /* The entries */ intptr_t **entries; }; int libpff_array_initialize( libpff_array_t **array, int number_of_entries, libcerror_error_t **error ); int libpff_array_free( libpff_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_array_empty( libpff_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_array_clear( libpff_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_array_clone( libpff_array_t **destination_array, libpff_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_array_resize( libpff_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libpff_array_get_number_of_entries( libpff_array_t *array, int *number_of_entries, libcerror_error_t **error ); int libpff_array_get_entry_by_index( libpff_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ); int libpff_array_set_entry_by_index( libpff_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ); int libpff_array_append_entry( libpff_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ); int libpff_array_insert_entry( libpff_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_data_block.h0000644000175000017500000000554512005155304015161 00000000000000/* * Data block functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_DATA_BLOCK_H ) #define _LIBPFF_DATA_BLOCK_H #include #include #include "libpff_io_handle.h" #include "libpff_libbfio.h" #include "libpff_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif enum LIBPFF_DATA_BLOCK_FLAGS { LIBPFF_DATA_BLOCK_FLAG_VALIDATED = 0x01, LIBPFF_DATA_BLOCK_FLAG_DECRYPTION_FORCED = 0x02, LIBPFF_DATA_BLOCK_FLAG_CRC_MISMATCH = 0x10, LIBPFF_DATA_BLOCK_FLAG_SIZE_MISMATCH = 0x20, LIBPFF_DATA_BLOCK_FLAG_IDENTIFIER_MISMATCH = 0x40 }; typedef struct libpff_data_block libpff_data_block_t; struct libpff_data_block { /* Value to indicate if the descriptor identifier */ uint32_t descriptor_identifier; /* Value to indicate if the data identifier */ uint64_t data_identifier; /* A reference to the IO handle */ libpff_io_handle_t *io_handle; /* The flags */ uint8_t flags; }; int libpff_data_block_initialize( libpff_data_block_t **data_block, uint32_t descriptor_identifier, uint64_t data_identifier, libpff_io_handle_t *io_handle, libcerror_error_t **error ); int libpff_data_block_free( libpff_data_block_t **data_block, libcerror_error_t **error ); int libpff_data_block_clone( libpff_data_block_t **destination_data_block, libpff_data_block_t *source_data_block, libcerror_error_t **error ); ssize_t libpff_data_block_read_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int segment_index, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ); ssize_t libpff_data_block_read( libbfio_handle_t *file_io_handle, uint8_t file_type, uint64_t data_identifier, uint8_t *data, size_t data_size, uint8_t *flags, libcerror_error_t **error ); int libpff_data_block_decrypt_data( libpff_data_block_t *data_block, uint8_t encryption_type, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_free_map.h0000644000175000017500000000254712005155304014653 00000000000000/* * Free map functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_FREE_MAP_H ) #define _LIBPFF_FREE_MAP_H #include #include #include "libpff_libbfio.h" #include "libpff_libcerror.h" #include "libpff_offset_list.h" #if defined( __cplusplus ) extern "C" { #endif #define LIBPFF_FREE_MAP_TYPE_PAGE 0x82 #define LIBPFF_FREE_MAP_TYPE_DATA 0x85 int libpff_free_map_read( libpff_offset_list_t *unallocated_block_list, libbfio_handle_t *file_io_handle, off64_t free_map_offset, uint8_t file_type, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libpff/libpff_libfmapi.h0000644000175000017500000000322012005155304014645 00000000000000/* * The libfmapi header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBFMAPI_H ) #define _LIBPFF_LIBFMAPI_H #include /* Define HAVE_LOCAL_LIBFMAPI for local use of libfmapi */ #if defined( HAVE_LOCAL_LIBFMAPI ) #include #include #include #include #include #include #include #include #include #include #include #if defined( HAVE_DEBUG_OUTPUT ) #include #endif #else /* If libtool DLL support is enabled set LIBFMAPI_DLL_IMPORT * before including libfmapi.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFMAPI_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libpff/libpff_libcerror.h0000644000175000017500000000251712005155304015055 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBPFF_LIBCERROR_H ) #define _LIBPFF_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/0000775000175000017500000000000012006536213012166 500000000000000libpff-20120802/libfvalue/libfvalue_support.h0000644000175000017500000000221212005153163016015 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_SUPPORT_H ) #define _LIBFVALUE_SUPPORT_H #include #include #include "libfvalue_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFVALUE ) LIBFVALUE_EXTERN \ const char *libfvalue_get_version( void ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_value_entry.c0000644000175000017500000001077112005153163016642 00000000000000/* * Value entry functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_value_entry.h" /* Initialize a value entry * Returns 1 if successful or -1 on error */ int libfvalue_value_entry_initialize( libfvalue_value_entry_t **value_entry, libcerror_error_t **error ) { static char *function = "libfvalue_value_entry_initialize"; if( value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry.", function ); return( -1 ); } if( *value_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value entry value already set.", function ); return( -1 ); } *value_entry = memory_allocate_structure( libfvalue_value_entry_t ); if( *value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value entry.", function ); goto on_error; } if( memory_set( *value_entry, 0, sizeof( libfvalue_value_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear value entry.", function ); goto on_error; } return( 1 ); on_error: if( *value_entry != NULL ) { memory_free( *value_entry ); *value_entry = NULL; } return( -1 ); } /* Frees a value entry * Returns 1 if successful or -1 on error */ int libfvalue_value_entry_free( libfvalue_value_entry_t **value_entry, libcerror_error_t **error ) { static char *function = "libfvalue_value_entry_free"; if( value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry.", function ); return( -1 ); } if( *value_entry != NULL ) { memory_free( *value_entry ); *value_entry = NULL; } return( 1 ); } /* Clones a value entry * Returns 1 if successful or -1 on error */ int libfvalue_value_entry_clone( libfvalue_value_entry_t **destination_value_entry, libfvalue_value_entry_t *source_value_entry, libcerror_error_t **error ) { static char *function = "libfvalue_value_entry_clone"; if( destination_value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination value entry.", function ); return( -1 ); } if( *destination_value_entry != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination value entry already set.", function ); return( -1 ); } if( source_value_entry == NULL ) { *destination_value_entry = NULL; return( 1 ); } *destination_value_entry = memory_allocate_structure( libfvalue_value_entry_t ); if( *destination_value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination value entry.", function ); goto on_error; } if( memory_copy( *destination_value_entry, source_value_entry, sizeof( libfvalue_value_entry_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value entry.", function ); goto on_error; } return( 1 ); on_error: if( *destination_value_entry != NULL ) { memory_free( *destination_value_entry ); *destination_value_entry = NULL; } return( -1 ); } libpff-20120802/libfvalue/libfvalue_libfwnt.h0000644000175000017500000000252112005153163015751 00000000000000/* * The libfwnt header wrapper * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBFWNT_H ) #define _LIBFVALUE_LIBFWNT_H #include /* Define HAVE_LOCAL_LIBFWNT for local use of libfwnt */ #if defined( HAVE_LOCAL_LIBFWNT ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBFWNT_DLL_IMPORT * before including libfwnt.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFWNT_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/libfvalue_libcerror.h0000644000175000017500000000252512005153163016273 00000000000000/* * The internal libcerror header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBCERROR_H ) #define _LIBFVALUE_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/libfvalue_value.c0000644000175000017500000033201212005153163015414 00000000000000/* * Value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcnotify.h" #include "libfvalue_libcstring.h" #include "libfvalue_types.h" #include "libfvalue_value.h" /* Initialize a value * Returns 1 if successful or -1 on error */ int libfvalue_value_initialize( libfvalue_value_t **value, const char *type_string, const char *type_description, /* Data handle functions */ intptr_t *data_handle, int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ), int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ), int (*get_data)( intptr_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_data)( intptr_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ), int (*get_number_of_value_entries)( intptr_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ), int (*get_value_entry)( intptr_t *data_handle, int value_entry_index, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_value_entry)( intptr_t *data_handle, int value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), int (*append_value_entry)( intptr_t *data_handle, int *value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), /* Value instance functions */ int (*initialize_instance)( intptr_t **instance, libcerror_error_t **error ), int (*free_instance)( intptr_t **instance, libcerror_error_t **error ), int (*clone_instance)( intptr_t **destination_instance, intptr_t *source_instance, libcerror_error_t **error ), int (*copy_from_byte_stream)( intptr_t *instance, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ), int (*copy_from_integer)( intptr_t *instance, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ), int (*copy_to_integer)( intptr_t *instance, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ), int (*copy_from_floating_point)( intptr_t *instance, double floating_point_value, size_t floating_point_value_size, libcerror_error_t **error ), int (*copy_to_floating_point)( intptr_t *instance, double *floating_point_value, size_t *floating_point_value_size, libcerror_error_t **error ), int (*copy_from_utf8_string_with_index)( intptr_t *instance, const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*get_utf8_string_size)( intptr_t *instance, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_to_utf8_string_with_index)( intptr_t *instance, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_from_utf16_string_with_index)( intptr_t *instance, const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*get_utf16_string_size)( intptr_t *instance, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_to_utf16_string_with_index)( intptr_t *instance, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_from_utf32_string_with_index)( intptr_t *instance, const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*get_utf32_string_size)( intptr_t *instance, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_to_utf32_string_with_index)( intptr_t *instance, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ), libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_initialize"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } if( *value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value value already set.", function ); return( -1 ); } if( type_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid type string", function ); return( -1 ); } internal_value = memory_allocate_structure( libfvalue_internal_value_t ); if( internal_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value.", function ); goto on_error; } if( memory_set( internal_value, 0, sizeof( libfvalue_internal_value_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear value.", function ); goto on_error; } if( libfvalue_array_initialize( &( internal_value->value_instances ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value instances array.", function ); goto on_error; } internal_value->type_string = type_string; internal_value->type_description = type_description; /* Data handle functions */ internal_value->data_handle = data_handle; internal_value->free_data_handle = free_data_handle; internal_value->clone_data_handle = clone_data_handle; internal_value->get_data = get_data; internal_value->set_data = set_data; internal_value->get_number_of_value_entries = get_number_of_value_entries; internal_value->get_value_entry = get_value_entry; internal_value->set_value_entry = set_value_entry; internal_value->append_value_entry = append_value_entry; /* Value instance functions */ internal_value->initialize_instance = initialize_instance; internal_value->free_instance = free_instance; internal_value->clone_instance = clone_instance; internal_value->copy_from_byte_stream = copy_from_byte_stream; internal_value->copy_from_integer = copy_from_integer; internal_value->copy_to_integer = copy_to_integer; internal_value->copy_from_floating_point = copy_from_floating_point; internal_value->copy_to_floating_point = copy_to_floating_point; internal_value->copy_from_utf8_string_with_index = copy_from_utf8_string_with_index; internal_value->get_utf8_string_size = get_utf8_string_size; internal_value->copy_to_utf8_string_with_index = copy_to_utf8_string_with_index; internal_value->copy_from_utf16_string_with_index = copy_from_utf16_string_with_index; internal_value->get_utf16_string_size = get_utf16_string_size; internal_value->copy_to_utf16_string_with_index = copy_to_utf16_string_with_index; internal_value->copy_from_utf32_string_with_index = copy_from_utf32_string_with_index; internal_value->get_utf32_string_size = get_utf32_string_size; internal_value->copy_to_utf32_string_with_index = copy_to_utf32_string_with_index; *value = (libfvalue_value_t *) internal_value; return( 1 ); on_error: if( internal_value != NULL ) { memory_free( internal_value ); } return( -1 ); } /* Frees a value * Returns 1 if successful or -1 on error */ int libfvalue_value_free( libfvalue_value_t **value, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_free"; int result = 1; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } if( *value != NULL ) { internal_value = (libfvalue_internal_value_t *) *value; *value = NULL; if( ( internal_value->flags & LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED ) != 0 ) { if( internal_value->identifier != NULL ) { memory_free( internal_value->identifier ); } } if( internal_value->data_handle != NULL ) { if( internal_value->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free data handle function.", function ); result = -1; } else if( internal_value->free_data_handle( &( internal_value->data_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data handle.", function ); result = -1; } } if( internal_value->free_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free instance function.", function ); result = -1; } if( libfvalue_array_free( &( internal_value->value_instances ), internal_value->free_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value instances array.", function ); result = -1; } memory_free( internal_value ); } return( result ); } /* Clones a value * Returns 1 if successful or -1 on error */ int libfvalue_value_clone( libfvalue_value_t **destination_value, libfvalue_value_t *source_value, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_destination_value = NULL; libfvalue_internal_value_t *internal_source_value = NULL; static char *function = "libfvalue_value_clone"; if( destination_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination value.", function ); return( -1 ); } if( *destination_value != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination value already set.", function ); return( -1 ); } if( source_value == NULL ) { *destination_value = NULL; return( 1 ); } internal_source_value = (libfvalue_internal_value_t *) source_value; if( libfvalue_value_initialize( destination_value, internal_source_value->type_string, internal_source_value->type_description, internal_source_value->data_handle, internal_source_value->free_data_handle, internal_source_value->clone_data_handle, internal_source_value->get_data, internal_source_value->set_data, internal_source_value->get_number_of_value_entries, internal_source_value->get_value_entry, internal_source_value->set_value_entry, internal_source_value->append_value_entry, internal_source_value->initialize_instance, internal_source_value->free_instance, internal_source_value->clone_instance, internal_source_value->copy_from_byte_stream, internal_source_value->copy_from_integer, internal_source_value->copy_to_integer, internal_source_value->copy_from_floating_point, internal_source_value->copy_to_floating_point, internal_source_value->copy_from_utf8_string_with_index, internal_source_value->get_utf8_string_size, internal_source_value->copy_to_utf8_string_with_index, internal_source_value->copy_from_utf16_string_with_index, internal_source_value->get_utf16_string_size, internal_source_value->copy_to_utf16_string_with_index, internal_source_value->copy_from_utf32_string_with_index, internal_source_value->get_utf32_string_size, internal_source_value->copy_to_utf32_string_with_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value.", function ); return( -1 ); } if( *destination_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination value.", function ); return( -1 ); } internal_destination_value = (libfvalue_internal_value_t *) *destination_value; if( internal_source_value->identifier != NULL ) { if( libfvalue_value_set_identifier( *destination_value, internal_source_value->identifier, internal_source_value->identifier_size, LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set identifier in destination value.", function ); goto on_error; } } if( internal_source_value->data_handle != NULL ) { if( internal_source_value->clone_data_handle( &( internal_destination_value->data_handle ), internal_source_value->data_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value data handle.", function ); goto on_error; } } /* The value instances are not cloned and are re-created on demand */ return( 1 ); on_error: if( *destination_value != NULL ) { libfvalue_value_free( destination_value, NULL ); } return( -1 ); } /* Retrieves the value type * Returns 1 if successful or -1 on error */ int libfvalue_value_get_type( libfvalue_value_t *value, int *value_type, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_type"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_type == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value type.", function ); return( -1 ); } *value_type = internal_value->type; return( 1 ); } /* Compares two index values * Returns LIBFVALUE_ARRAY_COMPARE_LESS, LIBFVALUE_ARRAY_COMPARE_EQUAL, LIBFVALUE_ARRAY_COMPARE_GREATER if successful or -1 on error */ int libfvalue_compare_identifier( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_first_value = NULL; libfvalue_internal_value_t *internal_second_value = NULL; static char *function = "libfvalue_compare_identifier"; size_t compare_size = 0; int result = 0; if( first_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first value.", function ); return( -1 ); } internal_first_value = (libfvalue_internal_value_t *) first_value; if( second_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid second value.", function ); return( -1 ); } internal_second_value = (libfvalue_internal_value_t *) second_value; if( internal_first_value->identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid first value - missing identifier.", function ); return( -1 ); } if( internal_second_value->identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid second value - missing identifier.", function ); return( -1 ); } if( internal_first_value->identifier_size <= internal_second_value->identifier_size ) { compare_size = internal_first_value->identifier_size; } else { compare_size = internal_second_value->identifier_size; } result = memory_compare( internal_first_value->identifier, internal_second_value->identifier, compare_size ); if( result < 0 ) { return( LIBFVALUE_ARRAY_COMPARE_LESS ); } else if( result > 0 ) { return( LIBFVALUE_ARRAY_COMPARE_GREATER ); } if( internal_first_value->identifier_size < internal_second_value->identifier_size ) { return( LIBFVALUE_ARRAY_COMPARE_LESS ); } else if( internal_first_value->identifier_size > internal_second_value->identifier_size ) { return( LIBFVALUE_ARRAY_COMPARE_GREATER ); } return( LIBFVALUE_ARRAY_COMPARE_EQUAL ); } /* Retrieves the identifier * Returns 1 if successful or -1 on error */ int libfvalue_value_get_identifier( libfvalue_value_t *value, uint8_t **identifier, size_t *identifier_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_identifier"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( identifier_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier size.", function ); return( -1 ); } *identifier = internal_value->identifier; *identifier_size = internal_value->identifier_size; return( 1 ); } /* Sets the identifier * Returns 1 if successful or -1 on error */ int libfvalue_value_set_identifier( libfvalue_value_t *value, const uint8_t *identifier, size_t identifier_size, uint8_t flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_set_identifier"; uint8_t supported_flags = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->identifier != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value - identifier already set.", function ); return( -1 ); } if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( ( identifier_size == 0 ) || ( identifier_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid identifier length value out of bounds.", function ); return( -1 ); } supported_flags = LIBFVALUE_VALUE_IDENTIFIER_FLAG_MANAGED | LIBFVALUE_VALUE_IDENTIFIER_FLAG_CLONE_BY_REFERENCE; if( ( flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } if( ( internal_value->flags & LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED ) != 0 ) { if( internal_value->identifier != NULL ) { memory_free( internal_value->identifier ); internal_value->identifier = NULL; internal_value->identifier_size = 0; } internal_value->flags &= ~( LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED ); } if( ( flags & LIBFVALUE_VALUE_IDENTIFIER_FLAG_CLONE_BY_REFERENCE ) != 0 ) { internal_value->identifier = (uint8_t *) identifier; if( ( flags & LIBFVALUE_VALUE_IDENTIFIER_FLAG_MANAGED ) != 0 ) { internal_value->flags |= LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED; } } else { internal_value->identifier = (uint8_t *) memory_allocate( sizeof( uint8_t ) * identifier_size ); if( internal_value->identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create identifier.", function ); goto on_error; } if( memory_copy( internal_value->identifier, identifier, identifier_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy identifier.", function ); goto on_error; } internal_value->flags |= LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED; } internal_value->identifier_size = identifier_size; return( 1 ); on_error: if( internal_value->identifier != NULL ) { memory_free( internal_value->identifier ); internal_value->identifier = NULL; } return( -1 ); } /* Initializes the data * Returns 1 if successful or -1 on error */ int libfvalue_value_initialize_data( libfvalue_internal_value_t *internal_value, size_t data_size, libcerror_error_t **error ) { uint8_t *data = NULL; static char *function = "libfvalue_value_initialize_data"; if( internal_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal value.", function ); return( -1 ); } if( internal_value->set_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing set data function.", function ); return( -1 ); } if( ( data_size == 0 ) || ( data_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data size value out of bounds.", function ); return( -1 ); } data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data.", function ); goto on_error; } if( internal_value->set_data( internal_value->data_handle, data, data_size, LIBFVALUE_ENDIAN_NATIVE, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data in data handle.", function ); goto on_error; } return( 1 ); on_error: if( data != NULL ) { memory_free( data ); } return( -1 ); } /* Determines if the value has data * Returns 1 if the value has data, 0 if not or -1 on error */ int libfvalue_value_has_data( libfvalue_value_t *value, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; uint8_t *data = NULL; static char *function = "libfvalue_value_has_data"; size_t data_size = 0; int encoding = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get data function.", function ); return( -1 ); } if( internal_value->get_data( internal_value->data_handle, &data, &data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data handle.", function ); return( -1 ); } if( data == NULL ) { return( 0 ); } return( 1 ); } /* Retrieves the data size * Returns 1 if successful or -1 on error */ int libfvalue_value_get_data_size( libfvalue_value_t *value, size_t *data_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; uint8_t *data = NULL; static char *function = "libfvalue_value_get_data_size"; int encoding = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get data function.", function ); return( -1 ); } if( internal_value->get_data( internal_value->data_handle, &data, data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data handle.", function ); return( -1 ); } if( data == NULL ) { if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } *data_size = 0; } return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libfvalue_value_get_data( libfvalue_value_t *value, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_data"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get data function.", function ); return( -1 ); } if( internal_value->get_data( internal_value->data_handle, data, data_size, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data handle.", function ); return( -1 ); } return( 1 ); } /* Sets the data * Returns 1 if successful or -1 on error */ int libfvalue_value_set_data( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_set_data"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->set_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing set data function.", function ); return( -1 ); } if( internal_value->set_data( internal_value->data_handle, data, data_size, encoding, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data in data handle.", function ); return( -1 ); } return( 1 ); } /* Copies the data * Returns 1 if successful or -1 on error */ int libfvalue_value_copy_data( libfvalue_value_t *value, uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; uint8_t *data_handle_data = NULL; static char *function = "libfvalue_value_copy_data"; size_t data_handle_data_size = 0; int encoding = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get data function.", function ); return( -1 ); } if( internal_value->get_data( internal_value->data_handle, &data_handle_data, &data_handle_data_size, &encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data handle.", function ); return( -1 ); } if( ( data_handle_data == NULL ) || ( data_handle_data_size == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data in data handle.", function ); return( -1 ); } if( data_handle_data_size > data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: invalid data size value too small.", function ); return( -1 ); } if( memory_copy( data, data_handle_data, data_handle_data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); return( -1 ); } return( 1 ); } /* Retrieves the format flags * Returns 1 if successful or -1 on error */ int libfvalue_value_get_format_flags( libfvalue_value_t *value, uint32_t *format_flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_format_flags"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( format_flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid format flags.", function ); return( -1 ); } *format_flags = internal_value->format_flags; return( 1 ); } /* Sets the format flags * Returns 1 if successful or -1 on error */ int libfvalue_value_set_format_flags( libfvalue_value_t *value, uint32_t format_flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_set_format_flags"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; internal_value->format_flags = format_flags; return( 1 ); } /* Value instance functions */ /* Retrieves the value instance * The value instance is created if it does not exist * Returns 1 if successful or -1 on error */ int libfvalue_value_get_value_instance_by_index( libfvalue_value_t *value, int value_entry_index, intptr_t **value_instance, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; uint8_t *value_entry_data = NULL; static char *function = "libfvalue_value_get_value_instance_by_index"; size_t value_entry_data_size = 0; int encoding = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->initialize_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing initialize instance function.", function ); return( -1 ); } if( internal_value->free_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free instance function.", function ); return( -1 ); } if( internal_value->copy_from_byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free copy from byte stream function.", function ); return( -1 ); } if( value_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value instance.", function ); return( -1 ); } if( *value_instance != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid value instance value already set.", function ); return( -1 ); } if( libfvalue_array_get_entry_by_index( internal_value->value_instances, value_entry_index, value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values instances array.", function, value_entry_index ); goto on_error; } if( *value_instance == NULL ) { result = libfvalue_value_get_entry_data( value, value_entry_index, &value_entry_data, &value_entry_data_size, &encoding, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry data: %d.", function, value_entry_index ); goto on_error; } else if( result != 0 ) { if( internal_value->initialize_instance( value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value instance.", function ); goto on_error; } if( internal_value->copy_from_byte_stream( *value_instance, value_entry_data, value_entry_data_size, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to copy value instance from byte stream.", function ); goto on_error; } } else { *value_instance = NULL; } if( libfvalue_array_set_entry_by_index( internal_value->value_instances, value_entry_index, *value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values instances array.", function, value_entry_index ); goto on_error; } } return( 1 ); on_error: if( *value_instance != NULL ) { internal_value->free_instance( value_instance, NULL ); } return( -1 ); } /* Value entry functions */ /* Retrieves the number of values entries * Returns 1 if successful or -1 on error */ int libfvalue_value_get_number_of_value_entries( libfvalue_value_t *value, int *number_of_value_entries, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_number_of_value_entries"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( number_of_value_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of value entries.", function ); return( -1 ); } result = libfvalue_value_has_data( value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value has data.", function ); return( -1 ); } else if( result != 0 ) { /* If a value instance does not provide for means to query * value entries there is only one value entry, namely the data */ if( internal_value->get_number_of_value_entries == NULL ) { *number_of_value_entries = 1; } else { if( internal_value->get_number_of_value_entries( internal_value->data_handle, number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of value entries from data handle.", function ); return( -1 ); } } } else { if( libfvalue_array_get_number_of_entries( internal_value->value_instances, number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from values instances array.", function ); return( -1 ); } } if( *number_of_value_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of value entries value out of bounds.", function ); return( -1 ); } return( 1 ); } /* Retrieves the entry data * Returns 1 if successful, 0 if the value has no data or -1 on error */ int libfvalue_value_get_entry_data( libfvalue_value_t *value, int value_entry_index, uint8_t **entry_data, size_t *entry_data_size, int *encoding, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_get_entry_data"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get value entry function.", function ); return( -1 ); } result = libfvalue_value_has_data( value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value has data.", function ); return( -1 ); } else if( result != 0 ) { if( internal_value->get_value_entry( internal_value->data_handle, value_entry_index, entry_data, entry_data_size, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from data handle.", function, value_entry_index ); return( -1 ); } if( ( *entry_data == NULL ) || ( *entry_data_size == 0 ) ) { result = 0; } } if( result == 0 ) { *entry_data = NULL; *entry_data_size = 0; } return( result ); } /* Sets the entry data * Returns 1 if successful or -1 on error */ int libfvalue_value_set_entry_data( libfvalue_value_t *value, int value_entry_index, const uint8_t *entry_data, size_t entry_data_size, int encoding, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_set_entry_data"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->free_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free instance function.", function ); return( -1 ); } if( internal_value->set_value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing set value entry function.", function ); return( -1 ); } if( libfvalue_array_get_entry_by_index( internal_value->value_instances, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values instances array.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( libfvalue_array_set_entry_by_index( internal_value->value_instances, value_entry_index, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values instances array.", function, value_entry_index ); return( -1 ); } if( internal_value->free_instance( &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value instance: %d.", function, value_entry_index ); return( -1 ); } } if( internal_value->set_value_entry( internal_value->data_handle, value_entry_index, entry_data, entry_data_size, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in data handle.", function, value_entry_index ); return( -1 ); } return( 1 ); } /* Appends the entry data * Returns 1 if successful or -1 on error */ int libfvalue_value_append_entry_data( libfvalue_value_t *value, int *value_entry_index, const uint8_t *entry_data, size_t entry_data_size, int encoding, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_append_entry_data"; int number_of_value_entries = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->append_value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing set value entry function.", function ); return( -1 ); } if( internal_value->get_number_of_value_entries( internal_value->data_handle, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of value entries from data handle.", function ); return( -1 ); } if( libfvalue_array_resize( internal_value->value_instances, number_of_value_entries + 1, internal_value->free_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to resize value instances array.", function ); return( -1 ); } if( number_of_value_entries == 1 ) { if( libfvalue_array_get_entry_by_index( internal_value->value_instances, 0, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: 0 from values instances array.", function ); return( -1 ); } if( value_instance != NULL ) { if( libfvalue_array_set_entry_by_index( internal_value->value_instances, 0, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: 0 in values instances array.", function ); return( -1 ); } if( internal_value->free_instance( &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value instance: 0.", function ); return( -1 ); } } } if( internal_value->append_value_entry( internal_value->data_handle, value_entry_index, entry_data, entry_data_size, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append entry to data handle.", function ); return( -1 ); } return( 1 ); } /* Boolean value functions */ /* Copies the value data from a boolean value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_boolean( libfvalue_value_t *value, int value_entry_index, uint8_t value_boolean, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_boolean"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_integer( value_instance, (uint64_t) value_boolean, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from boolean.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to a boolean value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_boolean( libfvalue_value_t *value, int value_entry_index, uint8_t *value_boolean, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_boolean"; size_t integer_value_size = 0; uint64_t integer_value = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_boolean == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value boolean.", function ); return( -1 ); } if( internal_value->copy_to_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_integer( value_instance, &integer_value, &integer_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to boolean.", function ); return( -1 ); } if( integer_value != 0 ) { *value_boolean = 1; } else { *value_boolean = 0; } result = 1; } } return( result ); } /* Integer value functions */ /* Copies the value data from an 8-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_8bit( libfvalue_value_t *value, int value_entry_index, uint8_t value_8bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_8bit"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_integer( value_instance, (uint64_t) value_8bit, 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from 8-bit integer.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to an 8-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_8bit( libfvalue_value_t *value, int value_entry_index, uint8_t *value_8bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_8bit"; size_t integer_value_size = 0; uint64_t integer_value = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_8bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value 8-bit.", function ); return( -1 ); } if( internal_value->copy_to_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_integer( value_instance, &integer_value, &integer_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to integer value.", function ); return( -1 ); } if( integer_value > (uint64_t) UINT8_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: integer value out of bounds.", function ); return( -1 ); } *value_8bit = (uint8_t) integer_value; result = 1; } } return( result ); } /* Copies the value data from a 16-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_16bit( libfvalue_value_t *value, int value_entry_index, uint16_t value_16bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_16bit"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_integer( value_instance, (uint64_t) value_16bit, 16, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from 16-bit integer.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to a 16-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_16bit( libfvalue_value_t *value, int value_entry_index, uint16_t *value_16bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_16bit"; size_t integer_value_size = 0; uint64_t integer_value = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_16bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value 16-bit.", function ); return( -1 ); } if( internal_value->copy_to_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_integer( value_instance, &integer_value, &integer_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to integer value.", function ); return( -1 ); } if( integer_value > (uint64_t) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: integer value out of bounds.", function ); return( -1 ); } *value_16bit = (uint16_t) integer_value; result = 1; } } return( result ); } /* Copies the value data from a 32-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_32bit( libfvalue_value_t *value, int value_entry_index, uint32_t value_32bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_32bit"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_integer( value_instance, (uint64_t) value_32bit, 32, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from 32-bit integer.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to a 32-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_32bit( libfvalue_value_t *value, int value_entry_index, uint32_t *value_32bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_32bit"; size_t integer_value_size = 0; uint64_t integer_value = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_32bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value 32-bit.", function ); return( -1 ); } if( internal_value->copy_to_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_integer( value_instance, &integer_value, &integer_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to integer value.", function ); return( -1 ); } if( integer_value > (uint64_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: integer value out of bounds.", function ); return( -1 ); } *value_32bit = (uint32_t) integer_value; result = 1; } } return( result ); } /* Copies the value data from a 64-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_64bit( libfvalue_value_t *value, int value_entry_index, uint64_t value_64bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_64bit"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_integer( value_instance, (uint64_t) value_64bit, 64, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from 64-bit integer.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to a 64-bit value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_64bit( libfvalue_value_t *value, int value_entry_index, uint64_t *value_64bit, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_64bit"; size_t integer_value_size = 0; uint64_t integer_value = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value 64-bit.", function ); return( -1 ); } if( internal_value->copy_to_integer != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_integer( value_instance, &integer_value, &integer_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to integer value.", function ); return( -1 ); } *value_64bit = (uint64_t) integer_value; result = 1; } } return( result ); } /* Floating point value functions */ /* Copies the value data from a float value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_float( libfvalue_value_t *value, int value_entry_index, float value_float, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_float"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_floating_point != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_floating_point( value_instance, (double) value_float, 32, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from 32-bit floating point.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to a float value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_float( libfvalue_value_t *value, int value_entry_index, float *value_float, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_float"; size_t floating_point_value_size = 0; double floating_point_value = 0.0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_float == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value float.", function ); return( -1 ); } if( internal_value->copy_to_floating_point != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_floating_point( value_instance, &floating_point_value, &floating_point_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to floating point value.", function ); return( -1 ); } *value_float = (float) floating_point_value; result = 1; } } return( result ); } /* Copies the value data from a double value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_double( libfvalue_value_t *value, int value_entry_index, double value_double, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_double"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_floating_point != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_from_floating_point( value_instance, (double) value_double, 64, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from 32-bit floating point.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to a double value * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_double( libfvalue_value_t *value, int value_entry_index, double *value_double, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_double"; size_t floating_point_value_size = 0; double floating_point_value = 0.0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( value_double == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value double.", function ); return( -1 ); } if( internal_value->copy_to_floating_point != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_floating_point( value_instance, &floating_point_value, &floating_point_value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to floating point value.", function ); return( -1 ); } *value_double = (double) floating_point_value; result = 1; } } return( result ); } /* String value functions */ /* Copies the value data from an UTF-8 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_utf8_string( libfvalue_value_t *value, int value_entry_index, const uint8_t *utf8_string, size_t utf8_string_length, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_utf8_string"; size_t utf8_string_index = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->initialize_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing initialize instance function.", function ); return( -1 ); } if( internal_value->free_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free instance function.", function ); return( -1 ); } if( internal_value->copy_from_utf8_string_with_index != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance == NULL ) { if( internal_value->initialize_instance( &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value instance.", function ); return( -1 ); } if( libfvalue_array_set_entry_by_index( internal_value->value_instances, value_entry_index, value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values instances array.", function, value_entry_index ); internal_value->free_instance( &value_instance, NULL ); return( -1 ); } } if( internal_value->copy_from_utf8_string_with_index( value_instance, utf8_string, utf8_string_length, &utf8_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from UTF-8 string.", function ); return( -1 ); } result = 1; } return( result ); } /* Retrieves the size of an UTF-8 encoded string of the value data * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_get_utf8_string_size( libfvalue_value_t *value, int value_entry_index, size_t *utf8_string_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_get_utf8_string_size"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_utf8_string_size != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->get_utf8_string_size( value_instance, utf8_string_size, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size UTF-8 string of instance.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to an UTF-8 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_utf8_string( libfvalue_value_t *value, int value_entry_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libfvalue_value_copy_to_utf8_string"; size_t utf8_string_index = 0; int result = 0; result = libfvalue_value_copy_to_utf8_string_with_index( value, value_entry_index, utf8_string, utf8_string_size, &utf8_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value: %d to UTF-8 string.", function, value_entry_index ); return( -1 ); } return( result ); } /* Copies the value data to an UTF-8 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_utf8_string_with_index( libfvalue_value_t *value, int value_entry_index, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_utf8_string_with_index"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_to_utf8_string_with_index != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_utf8_string_with_index( value_instance, utf8_string, utf8_string_size, utf8_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to UTF-8 string.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data from an UTF-16 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_utf16_string( libfvalue_value_t *value, int value_entry_index, const uint16_t *utf16_string, size_t utf16_string_length, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_utf16_string"; size_t utf16_string_index = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->initialize_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing initialize instance function.", function ); return( -1 ); } if( internal_value->free_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free instance function.", function ); return( -1 ); } if( internal_value->copy_from_utf16_string_with_index != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance == NULL ) { if( internal_value->initialize_instance( &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value instance.", function ); return( -1 ); } if( libfvalue_array_set_entry_by_index( internal_value->value_instances, value_entry_index, value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values instances array.", function, value_entry_index ); internal_value->free_instance( &value_instance, NULL ); return( -1 ); } } if( internal_value->copy_from_utf16_string_with_index( value_instance, utf16_string, utf16_string_length, &utf16_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from UTF-16 string.", function ); return( -1 ); } result = 1; } return( result ); } /* Retrieves the size of an UTF-16 encoded string of the value data * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_get_utf16_string_size( libfvalue_value_t *value, int value_entry_index, size_t *utf16_string_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_get_utf16_string_size"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_utf16_string_size != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->get_utf16_string_size( value_instance, utf16_string_size, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size UTF-16 string of instance.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to an UTF-16 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_utf16_string( libfvalue_value_t *value, int value_entry_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ) { static char *function = "libfvalue_value_copy_to_utf16_string"; size_t utf16_string_index = 0; int result = 0; result = libfvalue_value_copy_to_utf16_string_with_index( value, value_entry_index, utf16_string, utf16_string_size, &utf16_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value: %d to UTF-16 string.", function, value_entry_index ); return( -1 ); } return( result ); } /* Copies the value data to an UTF-16 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_utf16_string_with_index( libfvalue_value_t *value, int value_entry_index, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_utf16_string_with_index"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_to_utf16_string_with_index != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_utf16_string_with_index( value_instance, utf16_string, utf16_string_size, utf16_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to UTF-16 string.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data from an UTF-32 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_from_utf32_string( libfvalue_value_t *value, int value_entry_index, const uint32_t *utf32_string, size_t utf32_string_length, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_from_utf32_string"; size_t utf32_string_index = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } if( internal_value->initialize_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing initialize instance function.", function ); return( -1 ); } if( internal_value->free_instance == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing free instance function.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_utf32_string_with_index != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance == NULL ) { if( internal_value->initialize_instance( &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value instance.", function ); return( -1 ); } if( libfvalue_array_set_entry_by_index( internal_value->value_instances, value_entry_index, value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values instances array.", function, value_entry_index ); internal_value->free_instance( &value_instance, NULL ); return( -1 ); } } if( internal_value->copy_from_utf32_string_with_index( value_instance, utf32_string, utf32_string_length, &utf32_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance from UTF-32 string.", function ); return( -1 ); } result = 1; } return( result ); } /* Retrieves the size of an UTF-32 encoded string of the value data * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_get_utf32_string_size( libfvalue_value_t *value, int value_entry_index, size_t *utf32_string_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_get_utf32_string_size"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->get_utf32_string_size != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->get_utf32_string_size( value_instance, utf32_string_size, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size UTF-32 string of instance.", function ); return( -1 ); } result = 1; } } return( result ); } /* Copies the value data to an UTF-32 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_utf32_string( libfvalue_value_t *value, int value_entry_index, uint32_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ) { static char *function = "libfvalue_value_copy_to_utf32_string"; size_t utf32_string_index = 0; int result = 0; result = libfvalue_value_copy_to_utf32_string_with_index( value, value_entry_index, utf32_string, utf32_string_size, &utf32_string_index, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy value: %d to UTF-32 string.", function, value_entry_index ); return( -1 ); } return( result ); } /* Copies the value data to an UTF-32 encoded string * Returns 1 if successful, 0 if value could not be set or -1 on error */ int libfvalue_value_copy_to_utf32_string_with_index( libfvalue_value_t *value, int value_entry_index, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_copy_to_utf32_string_with_index"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_to_utf32_string_with_index != NULL ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); return( -1 ); } if( value_instance != NULL ) { if( internal_value->copy_to_utf32_string_with_index( value_instance, utf32_string, utf32_string_size, utf32_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to UTF-32 string.", function ); return( -1 ); } result = 1; } } return( result ); } /* Marshalling functions */ #ifdef TODO /* Reads the value data from a file stream * Returns the number of bytes read or -1 on error */ ssize_t libfvalue_value_read_from_file_stream( libfvalue_value_t *value, FILE *file_stream, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_read_from_file_stream"; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->copy_from_utf8_string_with_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing copy from UTF-8 string function.", function ); return( -1 ); } if( file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file stream.", function ); return( -1 ); } /* TODO implement function */ return( -1 ); } #endif /* TODO */ /* Writes the value data to a file stream * Returns the number of bytes written or -1 on error */ ssize_t libfvalue_value_write_to_file_stream( libfvalue_value_t *value, FILE *file_stream, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; intptr_t *value_instance = NULL; uint8_t *value_string = NULL; static char *function = "libfvalue_value_write_to_file_stream"; size_t value_string_index = 0; size_t value_string_size = 0; ssize_t write_count = 0; int print_count = 0; int number_of_value_entries = 0; int value_entry_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->type_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing type string.", function ); return( -1 ); } if( ( internal_value->identifier == NULL ) || ( internal_value->identifier[ 0 ] == 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing identifier.", function ); return( -1 ); } if( internal_value->get_utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get UTF-8 string size function.", function ); return( -1 ); } if( internal_value->copy_to_utf8_string_with_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing copy to UTF-8 string function.", function ); return( -1 ); } if( file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file stream.", function ); return( -1 ); } if( libfvalue_value_get_number_of_value_entries( value, &number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of value entries.", function ); goto on_error; } for( value_entry_index = 0; value_entry_index < number_of_value_entries; value_entry_index++ ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); goto on_error; } print_count = fprintf( file_stream, "<%s type=\"%s\">", (char *) internal_value->identifier, internal_value->type_string ); if( print_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file stream.", function ); goto on_error; } write_count += print_count; if( number_of_value_entries > 1 ) { print_count = fprintf( file_stream, "" ); if( print_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file stream.", function ); goto on_error; } write_count += print_count; } if( value_instance != NULL ) { if( internal_value->get_utf8_string_size( value_instance, &value_string_size, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size UTF-8 string of instance.", function ); goto on_error; } if( value_string_size > 0 ) { value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to value string.", function ); goto on_error; } if( internal_value->copy_to_utf8_string_with_index( value_instance, value_string, value_string_size, &value_string_index, internal_value->format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to UTF-8 string.", function ); goto on_error; } print_count = fprintf( file_stream, "%s", value_string ); if( print_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file stream.", function ); goto on_error; } write_count += print_count; memory_free( value_string ); value_string = NULL; } } if( number_of_value_entries > 1 ) { print_count = fprintf( file_stream, "" ); if( print_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file stream.", function ); goto on_error; } write_count += print_count; } print_count = fprintf( file_stream, "", (char *) internal_value->identifier ); if( print_count < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write to file stream.", function ); goto on_error; } write_count += print_count; } return( write_count ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Prints the value * Returns 1 if successful or -1 on error */ int libfvalue_value_print( libfvalue_value_t *value, int value_entry_index, uint8_t flags, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; libcstring_system_character_t *value_string = NULL; intptr_t *value_instance = NULL; static char *function = "libfvalue_value_print"; size_t value_string_index = 0; size_t value_string_size = 0; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( internal_value->type_description == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing type description.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( internal_value->get_utf16_string_size == NULL ) #else if( internal_value->get_utf8_string_size == NULL ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing get string size function.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( internal_value->copy_to_utf16_string_with_index == NULL ) #else if( internal_value->copy_to_utf8_string_with_index == NULL ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid value - missing copy to string function.", function ); return( -1 ); } if( ( flags & ~( LIBFVALUE_PRINT_FLAG_WITH_TYPE_DESCRIPTION ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } if( ( flags & LIBFVALUE_PRINT_FLAG_WITH_TYPE_DESCRIPTION ) != 0 ) { libcnotify_printf( "%s\t: ", internal_value->type_description ); } result = libfvalue_value_has_data( value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if value has data.", function ); goto on_error; } else if( result != 0 ) { if( libfvalue_value_get_value_instance_by_index( value, value_entry_index, &value_instance, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve value instance: %d.", function, value_entry_index ); goto on_error; } if( value_instance != NULL ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = internal_value->get_utf16_string_size( value_instance, &value_string_size, internal_value->format_flags, error ); #else result = internal_value->get_utf8_string_size( value_instance, &value_string_size, internal_value->format_flags, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size value string of instance.", function ); goto on_error; } if( value_string_size > 0 ) { value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to value string.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = internal_value->copy_to_utf16_string_with_index( value_instance, (uint16_t *) value_string, value_string_size, &value_string_index, internal_value->format_flags, error ); #else result = internal_value->copy_to_utf8_string_with_index( value_instance, (uint8_t *) value_string, value_string_size, &value_string_index, internal_value->format_flags, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy instance to value string.", function ); goto on_error; } libcnotify_printf( "%" PRIs_LIBCSTRING_SYSTEM "", value_string ); memory_free( value_string ); value_string = NULL; } } } if( ( flags & LIBFVALUE_PRINT_FLAG_WITH_TYPE_DESCRIPTION ) != 0 ) { libcnotify_printf( "\n\n" ); } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } libpff-20120802/libfvalue/libfvalue_libcnotify.h0000644000175000017500000000254512005153164016455 00000000000000/* * The internal libcnotify header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBCNOTIFY_H ) #define _LIBFVALUE_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/libfvalue_types.h0000644000175000017500000000310712005153164015452 00000000000000/* * The internal type definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_TYPES_H ) #define _LIBFVALUE_TYPES_H #include #include /* External value type definition hides internal structure */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfvalue_data_handle {} libfvalue_data_handle_t; typedef struct libfvalue_split_utf8_string {} libfvalue_split_utf8_string_t; typedef struct libfvalue_split_utf16_string {} libfvalue_split_utf16_string_t; typedef struct libfvalue_table {} libfvalue_table_t; typedef struct libfvalue_value {} libfvalue_value_t; #else typedef intptr_t libfvalue_data_handle_t; typedef intptr_t libfvalue_split_utf8_string_t; typedef intptr_t libfvalue_split_utf16_string_t; typedef intptr_t libfvalue_table_t; typedef intptr_t libfvalue_value_t; #endif #endif libpff-20120802/libfvalue/Makefile.am0000644000175000017500000000270412005153164014142 00000000000000if HAVE_LOCAL_LIBFVALUE AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfvalue.la libfvalue_la_SOURCES = \ libfvalue_array_type.c libfvalue_array_type.h \ libfvalue_binary_data.c libfvalue_binary_data.h \ libfvalue_codepage.h \ libfvalue_data_handle.c libfvalue_data_handle.h \ libfvalue_definitions.h \ libfvalue_error.c libfvalue_error.h \ libfvalue_extern.h \ libfvalue_floating_point.c libfvalue_floating_point.h \ libfvalue_integer.c libfvalue_integer.h \ libfvalue_libcerror.h \ libfvalue_libcnotify.h \ libfvalue_libcstring.h \ libfvalue_libfdatetime.h \ libfvalue_libfguid.h \ libfvalue_libfwnt.h \ libfvalue_libuna.h \ libfvalue_split_string.c libfvalue_split_string.h \ libfvalue_string.c libfvalue_string.h \ libfvalue_types.h \ libfvalue_table.c libfvalue_table.h \ libfvalue_value.c libfvalue_value.h \ libfvalue_value_entry.c libfvalue_value_entry.h \ libfvalue_value_type.c libfvalue_value_type.h \ libfvalue_support.c libfvalue_support.h \ libfvalue_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfvalue ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfvalue_la_SOURCES) libpff-20120802/libfvalue/libfvalue_array_type.h0000644000175000017500000001013112005153164016460 00000000000000/* * Array type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_ARRAY_TYPE_H ) #define _LIBFVALUE_ARRAY_TYPE_H #include #include #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The array comparison definitions */ enum LIBFVALUE_ARRAY_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBFVALUE_ARRAY_COMPARE_LESS, /* The first and second values are equal */ LIBFVALUE_ARRAY_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBFVALUE_ARRAY_COMPARE_GREATER }; /* The array insert flag definitions */ enum LIBFVALUE_ARRAY_INSERT_FLAGS { /* Allow duplicate entries */ LIBFVALUE_ARRAY_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBFVALUE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libfvalue_array libfvalue_array_t; struct libfvalue_array { /* The number of allocated entries */ int number_of_allocated_entries; /* The number of entries */ int number_of_entries; /* The entries */ intptr_t **entries; }; int libfvalue_array_initialize( libfvalue_array_t **array, int number_of_entries, libcerror_error_t **error ); int libfvalue_array_free( libfvalue_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfvalue_array_empty( libfvalue_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfvalue_array_clear( libfvalue_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfvalue_array_clone( libfvalue_array_t **destination_array, libfvalue_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libfvalue_array_resize( libfvalue_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfvalue_array_get_number_of_entries( libfvalue_array_t *array, int *number_of_entries, libcerror_error_t **error ); int libfvalue_array_get_entry_by_index( libfvalue_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ); int libfvalue_array_set_entry_by_index( libfvalue_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ); int libfvalue_array_append_entry( libfvalue_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ); int libfvalue_array_insert_entry( libfvalue_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_integer.h0000644000175000017500000001636312005153164015753 00000000000000/* * Integer value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTEGER_H ) #define _LIBFVALUE_INTEGER_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_integer libfvalue_integer_t; struct libfvalue_integer { /* The value */ uint64_t value; /* The value size */ size_t value_size; }; int libfvalue_integer_initialize( libfvalue_integer_t **integer, libcerror_error_t **error ); int libfvalue_integer_free( libfvalue_integer_t **integer, libcerror_error_t **error ); int libfvalue_integer_clone( libfvalue_integer_t **destination_integer, libfvalue_integer_t *source_integer, libcerror_error_t **error ); int libfvalue_integer_copy_from_byte_stream( libfvalue_integer_t *integer, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_integer_copy_from_integer( libfvalue_integer_t *integer, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ); int libfvalue_integer_copy_to_integer( libfvalue_integer_t *integer, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ); int libfvalue_integer_get_string_size( libfvalue_integer_t *integer, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_from_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_to_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_from_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_to_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_from_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_integer_copy_to_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_string_size_from_integer( size_t *string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_copy_from_integer( uint8_t *utf8_string, size_t utf8_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_with_index_copy_from_integer( uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_with_index_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_with_index_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_with_index_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_with_index_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_with_index_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_support.c0000644000175000017500000000216512005153164016020 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_support.h" #if !defined( HAVE_LOCAL_LIBFVALUE ) /* Returns the library version as a string */ const char *libfvalue_get_version( void ) { return( (const char *) LIBFVALUE_VERSION_STRING ); } #endif libpff-20120802/libfvalue/libfvalue_unused.h0000644000175000017500000000247712005153164015622 00000000000000/* * The internal unused definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_UNUSED_H ) #define _LIBFVALUE_INTERNAL_UNUSED_H #include #if !defined( LIBFVALUE_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFVALUE_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFVALUE_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFVALUE_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFVALUE_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libfvalue/libfvalue_floating_point.c0000644000175000017500000025167212005153164017331 00000000000000/* * Floating point value (IEEE 754) functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_floating_point.h" #include "libfvalue_libcerror.h" /* Initialize a floating point * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_initialize( libfvalue_floating_point_t **floating_point, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_initialize"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( *floating_point != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid floating point value already set.", function ); return( -1 ); } *floating_point = memory_allocate_structure( libfvalue_floating_point_t ); if( *floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create floating point.", function ); goto on_error; } if( memory_set( *floating_point, 0, sizeof( libfvalue_floating_point_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear floating point.", function ); goto on_error; } return( 1 ); on_error: if( *floating_point != NULL ) { memory_free( *floating_point ); *floating_point = NULL; } return( -1 ); } /* Frees a floating point * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_free( libfvalue_floating_point_t **floating_point, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_free"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( *floating_point != NULL ) { memory_free( *floating_point ); *floating_point = NULL; } return( 1 ); } /* Clones a floating point * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_clone( libfvalue_floating_point_t **destination_floating_point, libfvalue_floating_point_t *source_floating_point, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_clone"; if( destination_floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination floating point.", function ); return( -1 ); } if( *destination_floating_point != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination floating point already set.", function ); return( -1 ); } if( source_floating_point == NULL ) { *destination_floating_point = NULL; return( 1 ); } *destination_floating_point = memory_allocate_structure( libfvalue_floating_point_t ); if( *destination_floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination floating point.", function ); goto on_error; } if( memory_copy( *destination_floating_point, source_floating_point, sizeof( libfvalue_floating_point_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy floating point.", function ); goto on_error; } return( 1 ); on_error: if( *destination_floating_point != NULL ) { memory_free( *destination_floating_point ); *destination_floating_point = NULL; } return( -1 ); } /* Copies the floating point from a byte stream * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_byte_stream( libfvalue_floating_point_t *floating_point, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_byte_stream"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( ( encoding != LIBFVALUE_ENDIAN_BIG ) && ( encoding != LIBFVALUE_ENDIAN_LITTLE ) && ( encoding != LIBFVALUE_ENDIAN_NATIVE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); return( -1 ); } switch( byte_stream_size ) { case 4: if( encoding == LIBFVALUE_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, floating_point->value ); } else if( encoding == LIBFVALUE_ENDIAN_LITTLE ) { byte_stream_copy_to_uint32_little_endian( byte_stream, floating_point->value ); } else { floating_point->value = (uint64_t) *( (uint32_t *) byte_stream ); } break; case 8: if( encoding == LIBFVALUE_ENDIAN_BIG ) { byte_stream_copy_to_uint64_big_endian( byte_stream, floating_point->value ); } else if( encoding == LIBFVALUE_ENDIAN_LITTLE ) { byte_stream_copy_to_uint64_little_endian( byte_stream, floating_point->value ); } else { floating_point->value = (uint64_t) *( (uint64_t *) byte_stream ); } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte stream size: %" PRIzd ".", function, byte_stream_size ); return( -1 ); } floating_point->value_size = byte_stream_size * 8; return( 1 ); } /* Copies the floating point from an integer value * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_integer( libfvalue_floating_point_t *floating_point, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_floating_point_copy_from_integer"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } value_float64.floating_point = (double) integer_value; floating_point->value = value_float64.integer; floating_point->value_size = 64; return( 1 ); } /* Copies the floating point to an integer value * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_integer( libfvalue_floating_point_t *floating_point, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ) { byte_stream_float64_t value_float64; static char *function = "libfvalue_floating_point_copy_to_integer"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( integer_value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value size.", function ); return( -1 ); } value_float64.integer = floating_point->value; *integer_value = (uint64_t) value_float64.floating_point; *integer_value_size = 64; return( 1 ); } /* Retrieves the size of a string of the floating point * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_get_string_size( libfvalue_floating_point_t *floating_point, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_get_string_size"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_string_size_from_floating_point( string_size, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to determine size of string of %" PRIzd "-bit floating point.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point from an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_utf8_string_with_index( libfvalue_floating_point_t *floating_point, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_utf8_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_to_floating_point( utf8_string, utf8_string_size, utf8_string_index, &( floating_point->value ), floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point from UTF-8 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point to an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_utf8_string_with_index( libfvalue_floating_point_t *floating_point, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_to_utf8_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_from_floating_point( utf8_string, utf8_string_size, utf8_string_index, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point to UTF-8 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_utf16_string_with_index( libfvalue_floating_point_t *floating_point, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_utf16_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_to_floating_point( utf16_string, utf16_string_size, utf16_string_index, &( floating_point->value ), floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point from UTF-16 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point to an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_utf16_string_with_index( libfvalue_floating_point_t *floating_point, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_to_utf16_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_from_floating_point( utf16_string, utf16_string_size, utf16_string_index, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point to UTF-16 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_from_utf32_string_with_index( libfvalue_floating_point_t *floating_point, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_from_utf32_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_to_floating_point( utf32_string, utf32_string_size, utf32_string_index, &( floating_point->value ), floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point from UTF-32 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Copies the floating point to an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_floating_point_copy_to_utf32_string_with_index( libfvalue_floating_point_t *floating_point, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_floating_point_copy_to_utf32_string_with_index"; if( floating_point == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_from_floating_point( utf32_string, utf32_string_size, utf32_string_index, floating_point->value, floating_point->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit floating point to UTF-32 string.", function, floating_point->value_size ); return( -1 ); } return( 1 ); } /* Determines the size of a string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_string_size_from_floating_point( size_t *string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_string_size_from_floating_point"; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { *string_size = ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: if( floating_point_value == 0x7ff0000000000000ULL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } floating_point_value &= 0x000fffffffffffffULL; bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ *string_size = 2; if( is_signed != 0 ) { *string_size += 1; } if( is_indeterminate != 0 ) { *string_size += 3; } else if( is_infinite != 0 ) { *string_size += 3; } else if( is_not_a_number != 0 ) { *string_size += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift > 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { *string_size += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; *string_size += 1; } if( exponent != 0 ) { if( exponent < 0 ) { exponent *= -1; } exponent_divider = 1; while( ( exponent / exponent_divider ) >= 10 ) { exponent_divider *= 10; *string_size += 1; } *string_size += 3; } } } } return( 1 ); } /* Copies an UTF-8 encoded string from a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_copy_from_floating_point( uint8_t *utf8_string, size_t utf8_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_copy_from_floating_point"; size_t utf8_string_index = 0; if( libfvalue_utf8_string_with_index_copy_from_floating_point( utf8_string, utf8_string_size, &utf8_string_index, floating_point_value, floating_point_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 encoded string of from floating_point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_from_floating_point( uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_utf8_string_with_index_copy_from_floating_point"; size_t string_index = 0; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; int16_t exponent_value = 0; uint8_t byte_value = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t number_of_characters = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: if( floating_point_value == 0x7ff0000000000000ULL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } floating_point_value &= 0x000fffffffffffffULL; bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ number_of_characters = 2; if( is_signed != 0 ) { number_of_characters += 1; } if( is_indeterminate != 0 ) { number_of_characters += 3; } else if( is_infinite != 0 ) { number_of_characters += 3; } else if( is_not_a_number != 0 ) { number_of_characters += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift >= 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { number_of_characters += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } exponent_value = exponent; if( exponent_value != 0 ) { if( exponent_value < 0 ) { exponent_value *= -1; } exponent_divider = 1; while( ( exponent_value / exponent_divider ) >= 10 ) { exponent_divider *= 10; number_of_characters += 1; } number_of_characters += 3; } } } } if( ( string_index + number_of_characters ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; bit_shift = (uint8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint8_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf8_string[ string_index++ ] = (uint8_t) '-'; } if( is_indeterminate != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'I'; utf8_string[ string_index++ ] = (uint8_t) 'n'; utf8_string[ string_index++ ] = (uint8_t) 'd'; } else if( is_infinite != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'I'; utf8_string[ string_index++ ] = (uint8_t) 'n'; utf8_string[ string_index++ ] = (uint8_t) 'f'; } else if( is_not_a_number != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'N'; utf8_string[ string_index++ ] = (uint8_t) 'a'; utf8_string[ string_index++ ] = (uint8_t) 'N'; } else if( is_zero == 0 ) { if( use_value_string != 0 ) { utf8_string[ string_index++ ] = (uint8_t) value_string[ 0 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 1 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 2 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 3 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 4 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 5 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 6 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 7 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 8 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 9 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 10 ]; utf8_string[ string_index++ ] = (uint8_t) value_string[ 11 ]; } else { if( divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; utf8_string[ string_index++ ] = (uint8_t) '.'; while( divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; } } utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( floating_point_value / divider ); if( exponent != 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'e'; if( exponent < 0 ) { exponent *= -1; utf8_string[ string_index++ ] = (uint8_t) '-'; } else { utf8_string[ string_index++ ] = (uint8_t) '+'; } while( exponent_divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( exponent / exponent_divider ); exponent %= exponent_divider; exponent_divider /= 10; } utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( exponent / exponent_divider ); } } } else { utf8_string[ string_index++ ] = (uint8_t) '0'; } } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Copies an UTF-8 encoded string to a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_to_floating_point( uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_with_index_copy_to_floating_point"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( floating_point_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( floating_point_value_size >> 2 ) + 3; } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( floating_point_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { if( utf8_string[ string_index ] != (uint8_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf8_string[ string_index ] != (uint8_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'A' + 10 ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { /* In the maximum possible string one character is substituted for the sign */ if( utf8_string[ string_index ] == (uint8_t) '-' ) { string_index++; sign = -1; } else if( utf8_string[ string_index ] == (uint8_t) '+' ) { string_index++; } while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf8_string[ string_index ] < (uint8_t) '0' ) && ( utf8_string[ string_index ] > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf8_string_index = string_index; *floating_point_value = value_64bit; return( 1 ); } /* Copies an UTF-16 encoded string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_copy_from_floating_point( uint16_t *utf16_string, size_t utf16_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_copy_from_floating_point"; size_t utf16_string_index = 0; if( libfvalue_utf16_string_with_index_copy_from_floating_point( utf16_string, utf16_string_size, &utf16_string_index, floating_point_value, floating_point_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 encoded string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_from_floating_point( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_utf16_string_with_index_copy_from_floating_point"; size_t string_index = 0; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; int16_t exponent_value = 0; uint8_t byte_value = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t number_of_characters = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: if( floating_point_value == 0x7ff0000000000000ULL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } floating_point_value &= 0x000fffffffffffffULL; bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ number_of_characters = 2; if( is_signed != 0 ) { number_of_characters += 1; } if( is_indeterminate != 0 ) { number_of_characters += 3; } else if( is_infinite != 0 ) { number_of_characters += 3; } else if( is_not_a_number != 0 ) { number_of_characters += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift >= 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { number_of_characters += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } exponent_value = exponent; if( exponent_value != 0 ) { if( exponent_value < 0 ) { exponent_value *= -1; } exponent_divider = 1; while( ( exponent_value / exponent_divider ) >= 10 ) { exponent_divider *= 10; number_of_characters += 1; } number_of_characters += 3; } } } } if( ( string_index + number_of_characters ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; bit_shift = (uint8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint8_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '-'; } if( is_indeterminate != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'I'; utf16_string[ string_index++ ] = (uint16_t) 'n'; utf16_string[ string_index++ ] = (uint16_t) 'd'; } else if( is_infinite != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'I'; utf16_string[ string_index++ ] = (uint16_t) 'n'; utf16_string[ string_index++ ] = (uint16_t) 'f'; } else if( is_not_a_number != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'N'; utf16_string[ string_index++ ] = (uint16_t) 'a'; utf16_string[ string_index++ ] = (uint16_t) 'N'; } else if( is_zero == 0 ) { if( use_value_string != 0 ) { utf16_string[ string_index++ ] = (uint16_t) value_string[ 0 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 1 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 2 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 3 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 4 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 5 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 6 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 7 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 8 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 9 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 10 ]; utf16_string[ string_index++ ] = (uint16_t) value_string[ 11 ]; } else { if( divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; utf16_string[ string_index++ ] = (uint16_t) '.'; while( divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; } } utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( floating_point_value / divider ); if( exponent != 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'e'; if( exponent < 0 ) { exponent *= -1; utf16_string[ string_index++ ] = (uint16_t) '-'; } else { utf16_string[ string_index++ ] = (uint16_t) '+'; } while( exponent_divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( exponent / exponent_divider ); exponent %= exponent_divider; exponent_divider /= 10; } utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( exponent / exponent_divider ); } } } else { utf16_string[ string_index++ ] = (uint16_t) '0'; } } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Copies an UTF-16 encoded string to a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_to_floating_point( uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_with_index_copy_to_floating_point"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( floating_point_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( floating_point_value_size >> 2 ) + 3; } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( floating_point_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { if( utf16_string[ string_index ] != (uint16_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf16_string[ string_index ] != (uint16_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'A' + 10 ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { /* In the maximum possible string one character is substituted for the sign */ if( utf16_string[ string_index ] == (uint16_t) '-' ) { string_index++; sign = -1; } else if( utf16_string[ string_index ] == (uint16_t) '+' ) { string_index++; } while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf16_string[ string_index ] < (uint16_t) '0' ) && ( utf16_string[ string_index ] > (uint16_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf16_string_index = string_index; *floating_point_value = value_64bit; return( 1 ); } /* Copies an UTF-32 encoded string of a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_copy_from_floating_point( uint32_t *utf32_string, size_t utf32_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_copy_from_floating_point"; size_t utf32_string_index = 0; if( libfvalue_utf32_string_with_index_copy_from_floating_point( utf32_string, utf32_string_size, &utf32_string_index, floating_point_value, floating_point_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 encoded string of from floating_point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_from_floating_point( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { char value_string[ 16 ]; byte_stream_float32_t value_float32; byte_stream_float64_t value_float64; static char *function = "libfvalue_utf32_string_with_index_copy_from_floating_point"; size_t string_index = 0; uint64_t divider = 0; uint64_t multiplier = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint16_t exponent_divider = 0; int16_t exponent = 0; int16_t exponent_value = 0; uint8_t byte_value = 0; uint8_t is_denormalized = 0; uint8_t is_indeterminate = 0; uint8_t is_infinite = 0; uint8_t is_not_a_number = 0; uint8_t is_signed = 0; uint8_t is_zero = 0; uint8_t number_of_characters = 0; uint8_t use_value_string = 0; int8_t bit_shift = 0; int print_count = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( floating_point_value_size >> 2 ) + 3; } else { bit_shift = (uint8_t) ( floating_point_value_size - 1 ); is_signed = (uint8_t) ( floating_point_value >> bit_shift ); if( is_signed != 0 ) { floating_point_value &= ~( (uint64_t) 1 << bit_shift ); } switch( floating_point_value_size ) { case 32: if( floating_point_value == 0x7f800000UL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7fc00000UL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7f800001UL ) && ( floating_point_value <= 0x7fffffffUL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float32.integer = (uint32_t) floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float32.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 23 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -126; } else { exponent -= 127; } floating_point_value &= 0x007fffffUL; bit_shift = 23; } else { is_zero = 1; } break; case 64: if( floating_point_value == 0x7ff0000000000000ULL ) { is_infinite = 1; } else if( ( is_signed != 0 ) && ( floating_point_value == 0x7ff8000000000000ULL ) ) { is_indeterminate = 1; } else if( ( floating_point_value >= 0x7ff0000000000001ULL ) && ( floating_point_value <= 0x7fffffffffffffffULL ) ) { is_not_a_number = 1; } else if( floating_point_value != 0 ) { value_float64.integer = floating_point_value; print_count = libcstring_narrow_string_snprintf( value_string, 16, "%06e", value_float64.floating_point ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_PRINT_FAILED, "%s: unable to print floating point value to string.", function ); return( -1 ); } exponent = (int16_t) ( floating_point_value >> 52 ); if( exponent == 0 ) { is_denormalized = 1; exponent = -1023; } else { exponent -= 1023; } floating_point_value &= 0x000fffffffffffffULL; bit_shift = 52; } else { is_zero = 1; } break; } /* The string is at least a single digit with an end of string character */ number_of_characters = 2; if( is_signed != 0 ) { number_of_characters += 1; } if( is_indeterminate != 0 ) { number_of_characters += 3; } else if( is_infinite != 0 ) { number_of_characters += 3; } else if( is_not_a_number != 0 ) { number_of_characters += 3; } else if( is_zero == 0 ) { if( is_denormalized != 0 ) { while( bit_shift >= 0 ) { if( ( ( floating_point_value >> bit_shift ) & 0x01 ) != 0 ) { break; } bit_shift--; exponent--; } use_value_string = 1; } else { if( floating_point_value != 0 ) { use_value_string = 1; } if( exponent != 0 ) { use_value_string = 1; } floating_point_value |= (uint64_t) 1 << bit_shift; } if( use_value_string == 0 ) { multiplier = 1; while( bit_shift >= 0 ) { value_64bit *= 10; value_64bit += ( ( floating_point_value >> bit_shift ) & 0x01 ) * multiplier; multiplier *= 5; floating_point_value ^= (uint64_t) 1 << bit_shift; if( floating_point_value == 0 ) { break; } if( multiplier > 15625 ) { use_value_string = 1; break; } bit_shift--; } floating_point_value = value_64bit; } if( use_value_string != 0 ) { number_of_characters += 12; } else { divider = 1; while( ( floating_point_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } exponent_value = exponent; if( exponent_value != 0 ) { if( exponent_value < 0 ) { exponent_value *= -1; } exponent_divider = 1; while( ( exponent_value / exponent_divider ) >= 10 ) { exponent_divider *= 10; number_of_characters += 1; } number_of_characters += 3; } } } } if( ( string_index + number_of_characters ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; bit_shift = (uint8_t) ( floating_point_value_size - 4 ); do { byte_value = (uint8_t) ( ( floating_point_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '-'; } if( is_indeterminate != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'I'; utf32_string[ string_index++ ] = (uint32_t) 'n'; utf32_string[ string_index++ ] = (uint32_t) 'd'; } else if( is_infinite != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'I'; utf32_string[ string_index++ ] = (uint32_t) 'n'; utf32_string[ string_index++ ] = (uint32_t) 'f'; } else if( is_not_a_number != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'N'; utf32_string[ string_index++ ] = (uint32_t) 'a'; utf32_string[ string_index++ ] = (uint32_t) 'N'; } else if( is_zero == 0 ) { if( use_value_string != 0 ) { utf32_string[ string_index++ ] = (uint32_t) value_string[ 0 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 1 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 2 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 3 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 4 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 5 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 6 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 7 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 8 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 9 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 10 ]; utf32_string[ string_index++ ] = (uint32_t) value_string[ 11 ]; } else { if( divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; utf32_string[ string_index++ ] = (uint32_t) '.'; while( divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( floating_point_value / divider ); floating_point_value %= divider; divider /= 10; } } utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( floating_point_value / divider ); if( exponent != 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'e'; if( exponent < 0 ) { exponent *= -1; utf32_string[ string_index++ ] = (uint32_t) '-'; } else { utf32_string[ string_index++ ] = (uint32_t) '+'; } while( exponent_divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( exponent / exponent_divider ); exponent %= exponent_divider; exponent_divider /= 10; } utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( exponent / exponent_divider ); } } } else { utf32_string[ string_index++ ] = (uint32_t) '0'; } } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } /* Copies an UTF-32 encoded string to a floating point value * The floating_point value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_to_floating_point( uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_with_index_copy_to_floating_point"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( floating_point_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid floating point value.", function ); return( -1 ); } if( ( floating_point_value_size != 32 ) && ( floating_point_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported floating point value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( floating_point_value_size >> 2 ) + 3; } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( floating_point_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL ) { if( utf32_string[ string_index ] != (uint32_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf32_string[ string_index ] != (uint32_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'A' + 10 ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { /* In the maximum possible string one character is substituted for the sign */ if( utf32_string[ string_index ] == (uint32_t) '-' ) { string_index++; sign = -1; } else if( utf32_string[ string_index ] == (uint32_t) '+' ) { string_index++; } while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf32_string[ string_index ] < (uint32_t) '0' ) && ( utf32_string[ string_index ] > (uint32_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf32_string_index = string_index; *floating_point_value = value_64bit; return( 1 ); } libpff-20120802/libfvalue/libfvalue_codepage.h0000644000175000017500000000545512005153164016065 00000000000000/* * Codepage functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_CODEPAGE_H ) #define _LIBFVALUE_INTERNAL_CODEPAGE_H #include #include #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFVALUE ) #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue * The definitions in are copied here * for local use of libfvalue */ #else /* The codepage definitions */ enum LIBFVALUE_CODEPAGE { LIBFVALUE_CODEPAGE_ASCII = 20127, LIBFVALUE_CODEPAGE_ISO_8859_1 = 28591, LIBFVALUE_CODEPAGE_ISO_8859_2 = 28592, LIBFVALUE_CODEPAGE_ISO_8859_3 = 28593, LIBFVALUE_CODEPAGE_ISO_8859_4 = 28594, LIBFVALUE_CODEPAGE_ISO_8859_5 = 28595, LIBFVALUE_CODEPAGE_ISO_8859_6 = 28596, LIBFVALUE_CODEPAGE_ISO_8859_7 = 28597, LIBFVALUE_CODEPAGE_ISO_8859_8 = 28598, LIBFVALUE_CODEPAGE_ISO_8859_9 = 28599, LIBFVALUE_CODEPAGE_ISO_8859_10 = 28600, LIBFVALUE_CODEPAGE_ISO_8859_11 = 28601, LIBFVALUE_CODEPAGE_ISO_8859_13 = 28603, LIBFVALUE_CODEPAGE_ISO_8859_14 = 28604, LIBFVALUE_CODEPAGE_ISO_8859_15 = 28605, LIBFVALUE_CODEPAGE_ISO_8859_16 = 28606, LIBFVALUE_CODEPAGE_KOI8_R = 20866, LIBFVALUE_CODEPAGE_KOI8_U = 21866, LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN = 1200, LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN = 1201, LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN = 12000, LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN = 12001, LIBFVALUE_CODEPAGE_UTF7 = 65000, LIBFVALUE_CODEPAGE_UTF8 = 65001, LIBFVALUE_CODEPAGE_WINDOWS_874 = 874, LIBFVALUE_CODEPAGE_WINDOWS_932 = 932, LIBFVALUE_CODEPAGE_WINDOWS_936 = 936, LIBFVALUE_CODEPAGE_WINDOWS_1250 = 1250, LIBFVALUE_CODEPAGE_WINDOWS_1251 = 1251, LIBFVALUE_CODEPAGE_WINDOWS_1252 = 1252, LIBFVALUE_CODEPAGE_WINDOWS_1253 = 1253, LIBFVALUE_CODEPAGE_WINDOWS_1254 = 1254, LIBFVALUE_CODEPAGE_WINDOWS_1255 = 1255, LIBFVALUE_CODEPAGE_WINDOWS_1256 = 1256, LIBFVALUE_CODEPAGE_WINDOWS_1257 = 1257, LIBFVALUE_CODEPAGE_WINDOWS_1258 = 1258 }; #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_string.c0000644000175000017500000020546412005153164015621 00000000000000/* * String value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfvalue_codepage.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcnotify.h" #include "libfvalue_libcstring.h" #include "libfvalue_libuna.h" #include "libfvalue_split_string.h" #include "libfvalue_string.h" #include "libfvalue_types.h" /* Initialize a string * Returns 1 if successful or -1 on error */ int libfvalue_string_initialize( libfvalue_string_t **string, libcerror_error_t **error ) { static char *function = "libfvalue_string_initialize"; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( *string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid string value already set.", function ); return( -1 ); } *string = memory_allocate_structure( libfvalue_string_t ); if( *string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_set( *string, 0, sizeof( libfvalue_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear string.", function ); goto on_error; } ( *string )->codepage = LIBFVALUE_CODEPAGE_UTF8; return( 1 ); on_error: if( *string != NULL ) { memory_free( *string ); *string = NULL; } return( -1 ); } /* Frees a string * Returns 1 if successful or -1 on error */ int libfvalue_string_free( libfvalue_string_t **string, libcerror_error_t **error ) { static char *function = "libfvalue_string_free"; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( *string != NULL ) { if( ( *string )->data != NULL ) { if( ( ( *string )->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( ( *string )->data ); } } memory_free( *string ); *string = NULL; } return( 1 ); } /* Clones a string * Returns 1 if successful or -1 on error */ int libfvalue_string_clone( libfvalue_string_t **destination_string, libfvalue_string_t *source_string, libcerror_error_t **error ) { static char *function = "libfvalue_string_clone"; if( destination_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination string.", function ); return( -1 ); } if( *destination_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination string already set.", function ); return( -1 ); } if( source_string == NULL ) { *destination_string = NULL; return( 1 ); } *destination_string = memory_allocate_structure( libfvalue_string_t ); if( *destination_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination string.", function ); goto on_error; } if( ( source_string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) == 0 ) { ( *destination_string )->data = source_string->data; ( *destination_string )->data_size = source_string->data_size; } else { ( *destination_string )->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * source_string->data_size ); if( ( *destination_string )->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination string data.", function ); goto on_error; } ( *destination_string )->data_size = source_string->data_size; ( *destination_string )->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; if( memory_copy( ( *destination_string )->data, source_string->data, sizeof( uint8_t ) * source_string->data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy string data.", function ); goto on_error; } } ( *destination_string )->codepage = source_string->codepage; return( 1 ); on_error: if( *destination_string != NULL ) { if( ( ( *destination_string )->data != NULL ) && ( ( *destination_string )->data != source_string->data ) ) { memory_free( ( *destination_string )->data ); } memory_free( *destination_string ); *destination_string = NULL; } return( -1 ); } /* Copies the string from a byte stream * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_byte_stream( libfvalue_string_t *string, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_byte_stream"; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( ( encoding != LIBFVALUE_CODEPAGE_ASCII ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_1 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_2 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_3 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_4 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_5 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_6 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_7 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_8 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_9 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_10 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_11 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_13 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_14 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_15 ) && ( encoding != LIBFVALUE_CODEPAGE_ISO_8859_16 ) && ( encoding != LIBFVALUE_CODEPAGE_KOI8_R ) && ( encoding != LIBFVALUE_CODEPAGE_KOI8_U ) && ( encoding != LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN ) && ( encoding != LIBFVALUE_CODEPAGE_UTF7 ) && ( encoding != LIBFVALUE_CODEPAGE_UTF8 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_874 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_932 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_936 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1250 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1251 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1252 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1253 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1254 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1256 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1257 ) && ( encoding != LIBFVALUE_CODEPAGE_WINDOWS_1258 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); return( -1 ); } string->data = (uint8_t *) byte_stream; string->data_size = byte_stream_size; string->codepage = encoding; return( 1 ); } /* Copies the string from an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_utf8_string_with_index( libfvalue_string_t *string, const uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_utf8_string_with_index"; size_t value_data_size = 0; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( libuna_utf16_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 stream size of UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( libuna_utf32_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 stream size of UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-7 stream size of UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_size_from_utf8( utf8_string, utf8_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 stream size of UTF-8 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_size_from_utf8( utf8_string, utf8_string_size, string->codepage, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream size of UTF-8 string.", function ); goto on_error; } break; } if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } string->data_size = value_data_size; string->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string->data_size ); if( string->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string data.", function ); goto on_error; } string->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_stream_copy_from_utf8( string->data, string->data_size, byte_order, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream from UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_stream_copy_from_utf8( string->data, string->data_size, byte_order, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream from UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_copy_from_utf8( string->data, string->data_size, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream from UTF-8 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_copy_from_utf8( string->data, string->data_size, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream from UTF-8 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_copy_from_utf8( string->data, string->data_size, string->codepage, utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream from UTF-8 string.", function ); goto on_error; } break; } return( 1 ); on_error: if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } return( -1 ); } /* Retrieves the size of an UTF-8 encoded string of the string * Returns 1 if successful or -1 on error */ int libfvalue_string_get_utf8_string_size( libfvalue_string_t *string, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_get_utf8_string_size"; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } if( ( string->data == NULL ) || ( string->data_size == 0 ) ) { if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string_size = 1; } else switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf8_string_size_from_utf16_stream( string->data, string->data_size, byte_order, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size of UTF-16 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf8_string_size_from_utf32_stream( string->data, string->data_size, byte_order, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size of UTF-32 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf8_string_size_from_utf7_stream( string->data, string->data_size, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size of UTF-7 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_string_size_from_utf8_stream( string->data, string->data_size, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size of UTF-8 stream.", function ); return( -1 ); } break; default: if( libuna_utf8_string_size_from_byte_stream( string->data, string->data_size, string->codepage, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 string size of byte stream.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string to an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_to_utf8_string_with_index( libfvalue_string_t *string, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_to_utf8_string_with_index"; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } if( ( string->data == NULL ) || ( string->data_size == 0 ) ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } else switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf8_string_with_index_copy_from_utf16_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf8_string_with_index_copy_from_utf32_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf8_string_with_index_copy_from_utf7_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_string_with_index_copy_from_utf8_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream to UTF-8 string.", function ); return( -1 ); } break; default: if( libuna_utf8_string_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, utf8_string_index, string->data, string->data_size, string->codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-8 string.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_utf16_string_with_index( libfvalue_string_t *string, const uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_utf16_string_with_index"; size_t value_data_size = 0; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( libuna_utf16_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 stream size of UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( libuna_utf32_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 stream size of UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-7 stream size of UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_size_from_utf16( utf16_string, utf16_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 stream size of UTF-16 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_size_from_utf16( utf16_string, utf16_string_size, string->codepage, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream size of UTF-16 string.", function ); goto on_error; } break; } if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } string->data_size = value_data_size; string->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string->data_size ); if( string->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string data.", function ); goto on_error; } string->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_stream_copy_from_utf16( string->data, string->data_size, byte_order, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream from UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_stream_copy_from_utf16( string->data, string->data_size, byte_order, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream from UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_copy_from_utf16( string->data, string->data_size, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream from UTF-16 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_copy_from_utf16( string->data, string->data_size, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream from UTF-16 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_copy_from_utf16( string->data, string->data_size, string->codepage, utf16_string, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream from UTF-16 string.", function ); goto on_error; } break; } return( 1 ); on_error: if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } return( -1 ); } /* Retrieves the size of an UTF-16 encoded string of the string * Returns 1 if successful or -1 on error */ int libfvalue_string_get_utf16_string_size( libfvalue_string_t *string, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_get_utf16_string_size"; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } if( ( string->data == NULL ) || ( string->data_size == 0 ) ) { if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string_size = 1; } else switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_string_size_from_utf16_stream( string->data, string->data_size, byte_order, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size of UTF-16 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_string_size_from_utf32_stream( string->data, string->data_size, byte_order, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size of UTF-32 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf16_string_size_from_utf7_stream( string->data, string->data_size, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size of UTF-7 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf16_string_size_from_utf8_stream( string->data, string->data_size, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size of UTF-8 stream.", function ); return( -1 ); } break; default: if( libuna_utf16_string_size_from_byte_stream( string->data, string->data_size, string->codepage, utf16_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 string size of byte stream.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string to an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_to_utf16_string_with_index( libfvalue_string_t *string, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_to_utf16_string_with_index"; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } if( ( string->data == NULL ) || ( string->data_size == 0 ) ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } else switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_string_with_index_copy_from_utf16_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-16 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_string_with_index_copy_from_utf32_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-16 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf16_string_with_index_copy_from_utf7_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream to UTF-16 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf16_string_with_index_copy_from_utf8_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream to UTF-16 string.", function ); return( -1 ); } break; default: if( libuna_utf16_string_with_index_copy_from_byte_stream( utf16_string, utf16_string_size, utf16_string_index, string->data, string->data_size, string->codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-16 string.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_from_utf32_string_with_index( libfvalue_string_t *string, const uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_from_utf32_string_with_index"; size_t value_data_size = 0; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( libuna_utf16_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-16 stream size of UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( libuna_utf32_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 stream size of UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-7 stream size of UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_size_from_utf32( utf32_string, utf32_string_size, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-8 stream size of UTF-32 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_size_from_utf32( utf32_string, utf32_string_size, string->codepage, &value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine byte stream size of UTF-32 string.", function ); goto on_error; } break; } if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } string->data_size = value_data_size; string->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * string->data_size ); if( string->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string data.", function ); goto on_error; } string->flags |= LIBFVALUE_VALUE_FLAG_DATA_MANAGED; switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf16_stream_copy_from_utf32( string->data, string->data_size, byte_order, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream from UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_stream_copy_from_utf32( string->data, string->data_size, byte_order, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream from UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf7_stream_copy_from_utf32( string->data, string->data_size, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream from UTF-32 string.", function ); goto on_error; } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf8_stream_copy_from_utf32( string->data, string->data_size, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream from UTF-32 string.", function ); goto on_error; } break; default: if( libuna_byte_stream_copy_from_utf32( string->data, string->data_size, string->codepage, utf32_string, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream from UTF-32 string.", function ); goto on_error; } break; } return( 1 ); on_error: if( string->data != NULL ) { if( ( string->flags & LIBFVALUE_VALUE_FLAG_DATA_MANAGED ) != 0 ) { memory_free( string->data ); string->flags &= ~( LIBFVALUE_VALUE_FLAG_DATA_MANAGED ); } string->data = NULL; string->data_size = 0; } return( -1 ); } /* Retrieves the size of an UTF-32 encoded string of the string * Returns 1 if successful or -1 on error */ int libfvalue_string_get_utf32_string_size( libfvalue_string_t *string, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_get_utf32_string_size"; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } if( ( string->data == NULL ) || ( string->data_size == 0 ) ) { if( utf32_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string size.", function ); return( -1 ); } *utf32_string_size = 1; } else switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_string_size_from_utf16_stream( string->data, string->data_size, byte_order, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 string size of UTF-16 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_string_size_from_utf32_stream( string->data, string->data_size, byte_order, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 string size of UTF-32 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf32_string_size_from_utf7_stream( string->data, string->data_size, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 string size of UTF-7 stream.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf32_string_size_from_utf8_stream( string->data, string->data_size, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 string size of UTF-8 stream.", function ); return( -1 ); } break; default: if( libuna_utf32_string_size_from_byte_stream( string->data, string->data_size, string->codepage, utf32_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine UTF-32 string size of byte stream.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the string to an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_string_copy_to_utf32_string_with_index( libfvalue_string_t *string, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_copy_to_utf32_string_with_index"; int byte_order = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_format_flags != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } if( ( string->data == NULL ) || ( string->data_size == 0 ) ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } else switch( string->codepage ) { case LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF16_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_string_with_index_copy_from_utf16_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 stream to UTF-32 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN: case LIBFVALUE_CODEPAGE_UTF32_LITTLE_ENDIAN: if( string->codepage == LIBFVALUE_CODEPAGE_UTF32_BIG_ENDIAN ) { byte_order = LIBFVALUE_ENDIAN_BIG; } else { byte_order = LIBFVALUE_ENDIAN_LITTLE; } if( libuna_utf32_string_with_index_copy_from_utf32_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, byte_order, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 stream to UTF-32 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF7: if( libuna_utf32_string_with_index_copy_from_utf7_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-7 stream to UTF-32 string.", function ); return( -1 ); } break; case LIBFVALUE_CODEPAGE_UTF8: if( libuna_utf32_string_with_index_copy_from_utf8_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 stream to UTF-32 string.", function ); return( -1 ); } break; default: if( libuna_utf32_string_with_index_copy_from_byte_stream( utf32_string, utf32_string_size, utf32_string_index, string->data, string->data_size, string->codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to UTF-32 string.", function ); return( -1 ); } break; } return( 1 ); } /* Splits an UTF-8 string * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_split( const uint8_t *utf8_string, size_t utf8_string_size, uint8_t delimiter, libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ) { uint8_t *segment_start = NULL; uint8_t *segment_end = NULL; uint8_t *string_end = NULL; static char *function = "libfvalue_utf8_string_split"; size_t string_size = 0; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( utf8_string_size == 0 ) || ( utf8_string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (uint8_t *) utf8_string; string_end = (uint8_t *) &( utf8_string[ utf8_string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != utf8_string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libfvalue_split_utf8_string_initialize( split_string, utf8_string, utf8_string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libfvalue_split_utf8_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split UTF-8 string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } segment_end = segment_start; string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libfvalue_split_utf8_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split UTF-8 string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == string_end ) { segment_start++; } if( segment_end != string_end ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libfvalue_split_utf8_string_free( split_string, NULL ); } return( -1 ); } /* Splits an UTF-16 string * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_split( const uint16_t *utf16_string, size_t utf16_string_size, uint16_t delimiter, libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ) { uint16_t *segment_start = NULL; uint16_t *segment_end = NULL; uint16_t *string_end = NULL; static char *function = "libfvalue_utf16_string_split"; size_t string_size = 0; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( utf16_string_size == 0 ) || ( utf16_string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (uint16_t *) utf16_string; string_end = (uint16_t *) &( utf16_string[ utf16_string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != utf16_string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libfvalue_split_utf16_string_initialize( split_string, utf16_string, utf16_string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libfvalue_split_utf16_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split UTF-16 string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } segment_end = segment_start; string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libfvalue_split_utf16_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split UTF-16 string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == string_end ) { segment_start++; } if( segment_end != string_end ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libfvalue_split_utf16_string_free( split_string, NULL ); } return( -1 ); } libpff-20120802/libfvalue/libfvalue_data_handle.c0000644000175000017500000006476612005153164016547 00000000000000/* * Data handle functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #include "libfvalue_value_entry.h" /* Creates a data handle * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_initialize( libfvalue_data_handle_t **data_handle, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_initialize"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } if( *data_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid data handle value already set.", function ); return( -1 ); } internal_data_handle = memory_allocate_structure( libfvalue_internal_data_handle_t ); if( internal_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data handle.", function ); goto on_error; } if( memory_set( internal_data_handle, 0, sizeof( libfvalue_internal_data_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear data handle.", function ); goto on_error; } *data_handle = (libfvalue_data_handle_t *) internal_data_handle; return( 1 ); on_error: if( internal_data_handle != NULL ) { memory_free( internal_data_handle ); } return( -1 ); } /* Frees the data handle * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_free( libfvalue_data_handle_t **data_handle, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_free"; int result = 1; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } if( *data_handle != NULL ) { internal_data_handle = (libfvalue_internal_data_handle_t *) *data_handle; *data_handle = NULL; if( ( internal_data_handle->flags & LIBFVALUE_VALUE_DATA_FLAG_MANAGED ) != 0 ) { if( internal_data_handle->data != NULL ) { memory_free( internal_data_handle->data ); } } if( internal_data_handle->value_entries != NULL ) { if( libfvalue_array_free( &( internal_data_handle->value_entries ), (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_entry_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value entries array.", function ); result = -1; } } memory_free( internal_data_handle ); } return( result ); } /* Clones a data handle * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_clone( libfvalue_data_handle_t **destination_data_handle, libfvalue_data_handle_t *source_data_handle, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_source_data_handle = NULL; static char *function = "libfvalue_data_handle_clone"; if( destination_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination data handle.", function ); return( -1 ); } if( *destination_data_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination data handle already set.", function ); return( -1 ); } if( source_data_handle == NULL ) { *destination_data_handle = NULL; return( 1 ); } internal_source_data_handle = (libfvalue_internal_data_handle_t *) source_data_handle; if( libfvalue_data_handle_initialize( destination_data_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination data handle.", function ); goto on_error; } if( *destination_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination data handle.", function ); goto on_error; } if( internal_source_data_handle->data != NULL ) { if( libfvalue_data_handle_set_data( *destination_data_handle, internal_source_data_handle->data, internal_source_data_handle->data_size, internal_source_data_handle->encoding, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data in destination data handle.", function ); goto on_error; } } if( internal_source_data_handle->value_entries != NULL ) { if( libfvalue_array_clone( &( ( (libfvalue_internal_data_handle_t *) *destination_data_handle )->value_entries ), internal_source_data_handle->value_entries, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_entry_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfvalue_value_entry_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination value entries array.", function ); goto on_error; } } return( 1 ); on_error: if( *destination_data_handle != NULL ) { libfvalue_data_handle_free( destination_data_handle, NULL ); } return( -1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_get_data( libfvalue_data_handle_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_get_data"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } internal_data_handle = (libfvalue_internal_data_handle_t *) data_handle; if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( encoding == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte order.", function ); return( -1 ); } *data = internal_data_handle->data; *data_size = internal_data_handle->data_size; *encoding = internal_data_handle->encoding; return( 1 ); } /* Sets the data * Returns 1 if successful or -1 on error */ int libfvalue_data_handle_set_data( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_set_data"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } internal_data_handle = (libfvalue_internal_data_handle_t *) data_handle; if( ( flags & ~( LIBFVALUE_VALUE_DATA_FLAG_MANAGED | LIBFVALUE_VALUE_DATA_FLAG_CLONE_BY_REFERENCE ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } if( ( internal_data_handle->flags & LIBFVALUE_VALUE_DATA_FLAG_MANAGED ) != 0 ) { if( internal_data_handle->data != NULL ) { memory_free( internal_data_handle->data ); internal_data_handle->data = NULL; internal_data_handle->data_size = 0; } internal_data_handle->flags &= ~( LIBFVALUE_VALUE_DATA_FLAG_MANAGED ); } /* Make sure empty values have data that refers to NULL */ if( ( data == NULL ) || ( data_size == 0 ) ) { internal_data_handle->data = NULL; } else if( ( flags & LIBFVALUE_VALUE_DATA_FLAG_CLONE_BY_REFERENCE ) != 0 ) { internal_data_handle->data = (uint8_t *) data; if( ( flags & LIBFVALUE_VALUE_DATA_FLAG_MANAGED ) != 0 ) { internal_data_handle->flags |= LIBFVALUE_VALUE_DATA_FLAG_MANAGED; } } else { internal_data_handle->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( internal_data_handle->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data.", function ); goto on_error; } if( memory_copy( internal_data_handle->data, data, data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); goto on_error; } internal_data_handle->flags |= LIBFVALUE_VALUE_DATA_FLAG_MANAGED; } internal_data_handle->data_size = data_size; internal_data_handle->encoding = encoding; return( 1 ); on_error: if( internal_data_handle->data != NULL ) { memory_free( internal_data_handle->data ); internal_data_handle->data = NULL; } return( -1 ); } /* Retrieves the number of value entries * Return if successful or -1 on error */ int libfvalue_data_handle_get_number_of_value_entries( libfvalue_data_handle_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; static char *function = "libfvalue_data_handle_get_number_of_value_entries"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } internal_data_handle = (libfvalue_internal_data_handle_t *) data_handle; if( number_of_value_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of value entries.", function ); return( -1 ); } if( internal_data_handle->data == NULL ) { *number_of_value_entries = 0; } else if( internal_data_handle->value_entries == NULL ) { *number_of_value_entries = 1; } else { if( libfvalue_array_get_number_of_entries( internal_data_handle->value_entries, number_of_value_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from value entries array.", function ); return( -1 ); } } return( 1 ); } /* Retrieves a specific value entry * Return if successful or -1 on error */ int libfvalue_data_handle_get_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, uint8_t **value_entry_data, size_t *value_entry_data_size, int *encoding, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; libfvalue_value_entry_t *value_entry = NULL; static char *function = "libfvalue_data_handle_get_value_entry"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } internal_data_handle = (libfvalue_internal_data_handle_t *) data_handle; if( internal_data_handle->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid data handle - missing data.", function ); return( -1 ); } if( value_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry data.", function ); return( -1 ); } if( value_entry_data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry data size.", function ); return( -1 ); } if( encoding == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid encoding.", function ); return( -1 ); } if( internal_data_handle->value_entries == NULL ) { if( value_entry_index != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value index value out of bounds.", function ); return( -1 ); } *value_entry_data = internal_data_handle->data; *value_entry_data_size = internal_data_handle->data_size; } else { if( libfvalue_array_get_entry_by_index( internal_data_handle->value_entries, value_entry_index, (intptr_t **) &value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values entries array.", function, value_entry_index ); return( -1 ); } if( value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value entry.", function ); return( -1 ); } if( value_entry->offset > internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry offset: %d out of bounds.", function, value_entry_index ); return( -1 ); } if( ( value_entry->offset + value_entry->size ) > internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry size: %d out of bounds.", function, value_entry_index ); return( -1 ); } if( value_entry->size != 0 ) { *value_entry_data = &( ( internal_data_handle->data )[ value_entry->offset ] ); } else { *value_entry_data = NULL; } *value_entry_data_size = value_entry->size; } *encoding = internal_data_handle->encoding; return( 1 ); } /* Sets a specific value entry * Return if successful or -1 on error */ int libfvalue_data_handle_set_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, const uint8_t *value_entry_data, size_t value_entry_data_size, int encoding, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; libfvalue_value_entry_t *value_entry = NULL; static char *function = "libfvalue_data_handle_set_value_entry"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } internal_data_handle = (libfvalue_internal_data_handle_t *) data_handle; if( internal_data_handle->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid data handle - missing data.", function ); return( -1 ); } if( value_entry_index != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry index value out of bounds.", function ); return( -1 ); } if( value_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry data.", function ); return( -1 ); } if( value_entry_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry data size value exceeds maximum.", function ); return( -1 ); } if( encoding != internal_data_handle->encoding ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid encoding value out of bounds.", function ); return( -1 ); } if( internal_data_handle->value_entries == NULL ) { if( value_entry_index != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value index value out of bounds.", function ); return( -1 ); } if( value_entry_data_size != internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry data size value out of bounds.", function ); return( -1 ); } if( internal_data_handle->data_size > 0 ) { if( memory_copy( internal_data_handle->data, value_entry_data, internal_data_handle->data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value entry data.", function ); return( -1 ); } } } else { if( libfvalue_array_get_entry_by_index( internal_data_handle->value_entries, value_entry_index, (intptr_t **) &value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values entries array.", function, value_entry_index ); return( -1 ); } if( value_entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value entry.", function ); return( -1 ); } if( value_entry->offset > internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry offset: %d out of bounds.", function, value_entry_index ); return( -1 ); } if( ( value_entry->offset + value_entry->size ) > internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: value entry size: %d out of bounds.", function, value_entry_index ); return( -1 ); } if( value_entry->size != internal_data_handle->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value entry data size value out of bounds.", function ); return( -1 ); } if( value_entry->size > 0 ) { if( memory_copy( &( ( internal_data_handle->data )[ value_entry->offset ] ), value_entry_data, value_entry->size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value entry data.", function ); return( -1 ); } } } return( 1 ); } /* Appends a value entry * Return if successful or -1 on error */ int libfvalue_data_handle_append_value_entry( libfvalue_data_handle_t *data_handle, int *value_entry_index, const uint8_t *value_entry_data, size_t value_entry_data_size, int encoding, libcerror_error_t **error ) { libfvalue_internal_data_handle_t *internal_data_handle = NULL; libfvalue_value_entry_t *value_entry = NULL; void *reallocation = NULL; static char *function = "libfvalue_data_handle_append_value_entry"; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } internal_data_handle = (libfvalue_internal_data_handle_t *) data_handle; if( value_entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry index.", function ); return( -1 ); } if( value_entry_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value entry data.", function ); return( -1 ); } if( value_entry_data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry data size value exceeds maximum.", function ); return( -1 ); } if( internal_data_handle->data == NULL ) { if( libfvalue_data_handle_set_data( data_handle, value_entry_data, value_entry_data_size, encoding, LIBFVALUE_VALUE_DATA_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data in data handle.", function ); goto on_error; } internal_data_handle->encoding = encoding; } else { if( encoding != internal_data_handle->encoding ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid encoding value out of bounds.", function ); return( -1 ); } if( ( internal_data_handle->data_size + value_entry_data_size ) > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value entry data size value exceeds maximum.", function ); return( -1 ); } if( internal_data_handle->value_entries == NULL ) { if( libfvalue_array_initialize( &( internal_data_handle->value_entries ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value entries array.", function ); goto on_error; } if( libfvalue_value_entry_initialize( &value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value entry.", function ); goto on_error; } value_entry->offset = 0; value_entry->size = internal_data_handle->data_size; if( libfvalue_array_set_entry_by_index( internal_data_handle->value_entries, 0, (intptr_t *) value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: 0 in values entries array.", function ); goto on_error; } value_entry = NULL; } if( libfvalue_value_entry_initialize( &value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value entry.", function ); goto on_error; } value_entry->offset = internal_data_handle->data_size; value_entry->size = value_entry_data_size; reallocation = memory_reallocate( internal_data_handle->data, internal_data_handle->data_size + value_entry_data_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize array entries.", function ); goto on_error; } internal_data_handle->data = (uint8_t *) reallocation; internal_data_handle->data_size += value_entry_data_size; if( memory_copy( &( ( internal_data_handle->data )[ value_entry->offset ] ), value_entry_data, value_entry->size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy value entry data.", function ); goto on_error; } if( libfvalue_array_append_entry( internal_data_handle->value_entries, value_entry_index, (intptr_t *) value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append entry to values entries array.", function ); goto on_error; } value_entry = NULL; } return( 1 ); on_error: if( value_entry != NULL ) { libfvalue_value_entry_free( &value_entry, NULL ); } return( -1 ); } libpff-20120802/libfvalue/libfvalue_extern.h0000644000175000017500000000242612005153164015616 00000000000000/* * The internal extern definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_EXTERN_H ) #define _LIBFVALUE_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if !defined( HAVE_LOCAL_LIBFVALUE ) /* If libtool DLL support is enabled set LIBFVALUE_DLL_EXPORT * before including libfvalue/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFVALUE_DLL_EXPORT #endif #include #else #define LIBFVALUE_EXTERN extern #endif #endif libpff-20120802/libfvalue/libfvalue_libfdatetime.h0000644000175000017500000000315312005153164016740 00000000000000/* * The libfdatetime header wrapper * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBFDATETIME_H ) #define _LIBFVALUE_LIBFDATETIME_H #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if defined( HAVE_LOCAL_LIBFDATETIME ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFDATETIME_DLL_IMPORT * before including libfdatetime.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFDATETIME_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/libfvalue_value_entry.h0000644000175000017500000000313012005153164016637 00000000000000/* * Value entry functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_VALUE_ENTRY_H ) #define _LIBFVALUE_VALUE_ENTRY_H #include #include #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_value_entry libfvalue_value_entry_t; struct libfvalue_value_entry { /* The offset */ size_t offset; /* The size */ size_t size; }; int libfvalue_value_entry_initialize( libfvalue_value_entry_t **value_entry, libcerror_error_t **error ); int libfvalue_value_entry_free( libfvalue_value_entry_t **value_entry, libcerror_error_t **error ); int libfvalue_value_entry_clone( libfvalue_value_entry_t **destination_value_entry, libfvalue_value_entry_t *source_value_entry, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_split_string.c0000644000175000017500000006440112005153164017026 00000000000000/* * Split string functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_libcerror.h" #include "libfvalue_libcstring.h" #include "libfvalue_split_string.h" #include "libfvalue_types.h" /* Initializes the split UTF-8 string * Returns 1 if successful or -1 on error */ int libfvalue_split_utf8_string_initialize( libfvalue_split_utf8_string_t **split_string, const uint8_t *utf8_string, size_t utf8_string_size, int number_of_segments, libcerror_error_t **error ) { libfvalue_internal_split_utf8_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf8_string_initialize"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( number_of_segments < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of segments less than zero.", function ); return( -1 ); } if( *split_string == NULL ) { internal_split_string = memory_allocate_structure( libfvalue_internal_split_utf8_string_t ); if( internal_split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create split string.", function ); goto on_error; } if( memory_set( internal_split_string, 0, sizeof( libfvalue_internal_split_utf8_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear split string.", function ); memory_free( internal_split_string ); return( -1 ); } if( ( utf8_string != NULL ) && ( utf8_string_size > 0 ) ) { internal_split_string->string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * utf8_string_size ); if( internal_split_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_copy( internal_split_string->string, utf8_string, sizeof( uint8_t ) * ( utf8_string_size - 1 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to copy string.", function ); goto on_error; } internal_split_string->string[ utf8_string_size - 1 ] = 0; internal_split_string->string_size = utf8_string_size; } if( number_of_segments > 0 ) { internal_split_string->segments = (uint8_t **) memory_allocate( sizeof( uint8_t * ) * number_of_segments ); if( internal_split_string->segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segments.", function ); goto on_error; } if( memory_set( internal_split_string->segments, 0, sizeof( uint8_t * ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segments.", function ); goto on_error; } internal_split_string->segment_sizes = (size_t *) memory_allocate( sizeof( size_t ) * number_of_segments ); if( internal_split_string->segment_sizes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segment sizes.", function ); goto on_error; } if( memory_set( internal_split_string->segment_sizes, 0, sizeof( size_t ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segment sizes.", function ); goto on_error; } } internal_split_string->number_of_segments = number_of_segments; *split_string = (libfvalue_split_utf8_string_t *) internal_split_string; } return( 1 ); on_error: if( internal_split_string != NULL ) { if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } memory_free( internal_split_string ); } return( -1 ); } /* Frees the split UTF-8 string including elements * Returns 1 if successful or -1 on error */ int libfvalue_split_utf8_string_free( libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ) { libfvalue_internal_split_utf8_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf8_string_free"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { internal_split_string = (libfvalue_internal_split_utf8_string_t *) *split_string; *split_string = NULL; if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } memory_free( internal_split_string ); } return( 1 ); } /* Retrieves the UTF-8 string * Returns 1 if successful or -1 on error */ int libfvalue_split_utf8_string_get_string( libfvalue_split_utf8_string_t *split_string, uint8_t **utf8_string, size_t *utf8_string_size, libcerror_error_t **error ) { libfvalue_internal_split_utf8_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf8_string_get_string"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf8_string_t *) split_string; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } *utf8_string = internal_split_string->string; *utf8_string_size = internal_split_string->string_size; return( 1 ); } /* Retrieves the number of segments * Returns 1 if successful or -1 on error */ int libfvalue_split_utf8_string_get_number_of_segments( libfvalue_split_utf8_string_t *split_string, int *number_of_segments, libcerror_error_t **error ) { libfvalue_internal_split_utf8_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf8_string_get_number_of_segments"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf8_string_t *) split_string; if( number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of segments.", function ); return( -1 ); } *number_of_segments = internal_split_string->number_of_segments; return( 1 ); } /* Retrieves a specific segment * Returns 1 if successful or -1 on error */ int libfvalue_split_utf8_string_get_segment_by_index( libfvalue_split_utf8_string_t *split_string, int segment_index, uint8_t **utf8_string_segment, size_t *utf8_string_segment_size, libcerror_error_t **error ) { libfvalue_internal_split_utf8_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf8_string_get_segment_by_index"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf8_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( utf8_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string segment.", function ); return( -1 ); } if( utf8_string_segment_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string segment size.", function ); return( -1 ); } *utf8_string_segment = internal_split_string->segments[ segment_index ]; *utf8_string_segment_size = internal_split_string->segment_sizes[ segment_index ]; return( 1 ); } /* Sets a specific segment * Returns 1 if successful or -1 on error */ int libfvalue_split_utf8_string_set_segment_by_index( libfvalue_split_utf8_string_t *split_string, int segment_index, uint8_t *utf8_string_segment, size_t utf8_string_segment_size, libcerror_error_t **error ) { libfvalue_internal_split_utf8_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf8_string_set_segment_by_index"; size_t utf8_string_segment_offset = 0; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf8_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( utf8_string_segment == NULL ) { if( utf8_string_segment_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string segment size value out of bounds.", function ); return( -1 ); } } else { if( utf8_string_segment < internal_split_string->string ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string segment value out of bounds.", function ); return( -1 ); } utf8_string_segment_offset = (size_t) ( utf8_string_segment - internal_split_string->string ); if( utf8_string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string segment value out of bounds.", function ); return( -1 ); } utf8_string_segment_offset += utf8_string_segment_size; if( utf8_string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string segment value out of bounds.", function ); return( -1 ); } } internal_split_string->segments[ segment_index ] = utf8_string_segment; internal_split_string->segment_sizes[ segment_index ] = utf8_string_segment_size; return( 1 ); } /* Initializes the split UTF-16 string * Returns 1 if successful or -1 on error */ int libfvalue_split_utf16_string_initialize( libfvalue_split_utf16_string_t **split_string, const uint16_t *utf16_string, size_t utf16_string_size, int number_of_segments, libcerror_error_t **error ) { libfvalue_internal_split_utf16_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf16_string_initialize"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( number_of_segments < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of segments less than zero.", function ); return( -1 ); } if( *split_string == NULL ) { internal_split_string = memory_allocate_structure( libfvalue_internal_split_utf16_string_t ); if( internal_split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create split string.", function ); goto on_error; } if( memory_set( internal_split_string, 0, sizeof( libfvalue_internal_split_utf16_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear split string.", function ); memory_free( internal_split_string ); return( -1 ); } if( ( utf16_string != NULL ) && ( utf16_string_size > 0 ) ) { internal_split_string->string = (uint16_t *) memory_allocate( sizeof( uint16_t ) * utf16_string_size ); if( internal_split_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_copy( internal_split_string->string, utf16_string, sizeof( uint16_t ) * ( utf16_string_size - 1 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to copy string.", function ); goto on_error; } internal_split_string->string[ utf16_string_size - 1 ] = 0; internal_split_string->string_size = utf16_string_size; } if( number_of_segments > 0 ) { internal_split_string->segments = (uint16_t **) memory_allocate( sizeof( uint16_t * ) * number_of_segments ); if( internal_split_string->segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segments.", function ); goto on_error; } if( memory_set( internal_split_string->segments, 0, sizeof( uint16_t * ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segments.", function ); goto on_error; } internal_split_string->segment_sizes = (size_t *) memory_allocate( sizeof( size_t ) * number_of_segments ); if( internal_split_string->segment_sizes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segment sizes.", function ); goto on_error; } if( memory_set( internal_split_string->segment_sizes, 0, sizeof( size_t ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segment sizes.", function ); goto on_error; } } internal_split_string->number_of_segments = number_of_segments; *split_string = (libfvalue_split_utf16_string_t *) internal_split_string; } return( 1 ); on_error: if( internal_split_string != NULL ) { if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } memory_free( internal_split_string ); } return( -1 ); } /* Frees the split UTF-16 string including elements * Returns 1 if successful or -1 on error */ int libfvalue_split_utf16_string_free( libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ) { libfvalue_internal_split_utf16_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf16_string_free"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { internal_split_string = (libfvalue_internal_split_utf16_string_t *) *split_string; *split_string = NULL; if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } memory_free( internal_split_string ); } return( 1 ); } /* Retrieves the UTF-16 string * Returns 1 if successful or -1 on error */ int libfvalue_split_utf16_string_get_string( libfvalue_split_utf16_string_t *split_string, uint16_t **utf16_string, size_t *utf16_string_size, libcerror_error_t **error ) { libfvalue_internal_split_utf16_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf16_string_get_string"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf16_string_t *) split_string; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string size.", function ); return( -1 ); } *utf16_string = internal_split_string->string; *utf16_string_size = internal_split_string->string_size; return( 1 ); } /* Retrieves the number of segments * Returns 1 if successful or -1 on error */ int libfvalue_split_utf16_string_get_number_of_segments( libfvalue_split_utf16_string_t *split_string, int *number_of_segments, libcerror_error_t **error ) { libfvalue_internal_split_utf16_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf16_string_get_number_of_segments"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf16_string_t *) split_string; if( number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of segments.", function ); return( -1 ); } *number_of_segments = internal_split_string->number_of_segments; return( 1 ); } /* Retrieves a specific segment * Returns 1 if successful or -1 on error */ int libfvalue_split_utf16_string_get_segment_by_index( libfvalue_split_utf16_string_t *split_string, int segment_index, uint16_t **utf16_string_segment, size_t *utf16_string_segment_size, libcerror_error_t **error ) { libfvalue_internal_split_utf16_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf16_string_get_segment_by_index"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf16_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( utf16_string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string segment.", function ); return( -1 ); } if( utf16_string_segment_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string segment size.", function ); return( -1 ); } *utf16_string_segment = internal_split_string->segments[ segment_index ]; *utf16_string_segment_size = internal_split_string->segment_sizes[ segment_index ]; return( 1 ); } /* Sets a specific segment * Returns 1 if successful or -1 on error */ int libfvalue_split_utf16_string_set_segment_by_index( libfvalue_split_utf16_string_t *split_string, int segment_index, uint16_t *utf16_string_segment, size_t utf16_string_segment_size, libcerror_error_t **error ) { libfvalue_internal_split_utf16_string_t *internal_split_string = NULL; static char *function = "libfvalue_split_utf16_string_set_segment_by_index"; size_t utf16_string_segment_offset = 0; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } internal_split_string = (libfvalue_internal_split_utf16_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( utf16_string_segment_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string segment size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_segment == NULL ) { if( utf16_string_segment_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string segment size value out of bounds.", function ); return( -1 ); } } else { if( utf16_string_segment < internal_split_string->string ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string segment value out of bounds.", function ); return( -1 ); } utf16_string_segment_offset = (size_t) ( utf16_string_segment - internal_split_string->string ); if( utf16_string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string segment value out of bounds.", function ); return( -1 ); } utf16_string_segment_offset += utf16_string_segment_size; if( utf16_string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string segment value out of bounds.", function ); return( -1 ); } } internal_split_string->segments[ segment_index ] = utf16_string_segment; internal_split_string->segment_sizes[ segment_index ] = utf16_string_segment_size; return( 1 ); } libpff-20120802/libfvalue/libfvalue_value.h0000644000175000017500000005235512005153164015433 00000000000000/* * Value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_VALUE_H ) #define _LIBFVALUE_INTERNAL_VALUE_H #include #include #include #include "libfvalue_array_type.h" #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_internal_value libfvalue_internal_value_t; struct libfvalue_internal_value { /* The type */ int type; /* The type string */ const char *type_string; /* The type description */ const char *type_description; /* The identifier */ uint8_t *identifier; /* The identifier size */ size_t identifier_size; /* The data handle */ intptr_t *data_handle; /* The free data handle function */ int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ); /* The clone (duplicate) data handle function */ int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ); /* The data handle get data function */ int (*get_data)( intptr_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ); /* The data handle set data function */ int (*set_data)( intptr_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ); /* The data handle get number of value entries function */ int (*get_number_of_value_entries)( intptr_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ); /* The data handle get value entry function */ int (*get_value_entry)( intptr_t *data_handle, int value_entry_index, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ); /* The data handle set value entry function */ int (*set_value_entry)( intptr_t *data_handle, int value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ); /* The data handle append value entry function */ int (*append_value_entry)( intptr_t *data_handle, int *value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ); /* The value instances array */ libfvalue_array_t *value_instances; /* The initialize instance function */ int (*initialize_instance)( intptr_t **instance, libcerror_error_t **error ); /* The free instance function */ int (*free_instance)( intptr_t **instance, libcerror_error_t **error ); /* The clone (duplicate) instance function */ int (*clone_instance)( intptr_t **destination_instance, intptr_t *source_instance, libcerror_error_t **error ); /* The instance copy from byte stream */ int (*copy_from_byte_stream)( intptr_t *instance, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); /* The instance copy from integer function */ int (*copy_from_integer)( intptr_t *instance, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ); /* The instance copy to integer function */ int (*copy_to_integer)( intptr_t *instance, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ); /* The instance copy from floating point function */ int (*copy_from_floating_point)( intptr_t *instance, double floating_point_value, size_t floating_point_value_size, libcerror_error_t **error ); /* The instance copy to floating point function */ int (*copy_to_floating_point)( intptr_t *instance, double *floating_point_value, size_t *floating_point_value_size, libcerror_error_t **error ); /* The instance copy from UTF-8 string with index function */ int (*copy_from_utf8_string_with_index)( intptr_t *instance, const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance get UTF-8 string size function */ int (*get_utf8_string_size)( intptr_t *instance, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance copy to UTF-8 string with index function */ int (*copy_to_utf8_string_with_index)( intptr_t *instance, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance copy from UTF-16 string with index function */ int (*copy_from_utf16_string_with_index)( intptr_t *instance, const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance get UTF-16 string size function */ int (*get_utf16_string_size)( intptr_t *instance, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance copy to UTF-16 string with index function */ int (*copy_to_utf16_string_with_index)( intptr_t *instance, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance copy from UTF-32 string with index function */ int (*copy_from_utf32_string_with_index)( intptr_t *instance, const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance get UTF-32 string size function */ int (*get_utf32_string_size)( intptr_t *instance, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); /* The instance copy to UTF-32 string with index function */ int (*copy_to_utf32_string_with_index)( intptr_t *instance, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); /* The format flags */ uint32_t format_flags; /* The flags */ uint8_t flags; }; LIBFVALUE_EXTERN \ int libfvalue_value_initialize( libfvalue_value_t **value, const char *type_string, const char *type_description, /* Data handle functions */ intptr_t *data_handle, int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ), int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ), int (*get_data)( intptr_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_data)( intptr_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ), int (*get_number_of_value_entries)( intptr_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ), int (*get_value_entry)( intptr_t *data_handle, int value_entry_index, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_value_entry)( intptr_t *data_handle, int value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), int (*append_value_entry)( intptr_t *data_handle, int *value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), /* Value instance functions */ int (*initialize_instance)( intptr_t **instance, libcerror_error_t **error ), int (*free_instance)( intptr_t **instance, libcerror_error_t **error ), int (*clone_instance)( intptr_t **destination_instance, intptr_t *source_instance, libcerror_error_t **error ), int (*copy_from_byte_stream)( intptr_t *instance, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ), int (*copy_from_integer)( intptr_t *instance, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ), int (*copy_to_integer)( intptr_t *instance, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ), int (*copy_from_floating_point)( intptr_t *instance, double floating_point_value, size_t floating_point_value_size, libcerror_error_t **error ), int (*copy_to_floating_point)( intptr_t *instance, double *floating_point_value, size_t *floating_point_value_size, libcerror_error_t **error ), int (*copy_from_utf8_string_with_index)( intptr_t *instance, const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*get_utf8_string_size)( intptr_t *instance, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_to_utf8_string_with_index)( intptr_t *instance, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_from_utf16_string_with_index)( intptr_t *instance, const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*get_utf16_string_size)( intptr_t *instance, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_to_utf16_string_with_index)( intptr_t *instance, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_from_utf32_string_with_index)( intptr_t *instance, const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ), int (*get_utf32_string_size)( intptr_t *instance, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ), int (*copy_to_utf32_string_with_index)( intptr_t *instance, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ), libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_free( libfvalue_value_t **value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_clone( libfvalue_value_t **destination_value, libfvalue_value_t *source_value, libcerror_error_t **error ); int libfvalue_compare_identifier( intptr_t *first_value, intptr_t *second_value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_type( libfvalue_value_t *value, int *value_type, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_identifier( libfvalue_value_t *value, uint8_t **identifier, size_t *identifier_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_set_identifier( libfvalue_value_t *value, const uint8_t *identifier, size_t identifier_size, uint8_t flags, libcerror_error_t **error ); int libfvalue_value_initialize_data( libfvalue_internal_value_t *internal_value, size_t data_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_has_data( libfvalue_value_t *value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_data_size( libfvalue_value_t *value, size_t *data_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_data( libfvalue_value_t *value, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_set_data( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_data( libfvalue_value_t *value, uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_format_flags( libfvalue_value_t *value, uint32_t *format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_set_format_flags( libfvalue_value_t *value, uint32_t format_flags, libcerror_error_t **error ); /* Value instance functions */ int libfvalue_value_get_value_instance_by_index( libfvalue_value_t *value, int value_entry_index, intptr_t **value_instance, libcerror_error_t **error ); /* Value entry functions */ LIBFVALUE_EXTERN \ int libfvalue_value_get_number_of_value_entries( libfvalue_value_t *value, int *number_of_value_entries, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_entry_data( libfvalue_value_t *value, int value_entry_index, uint8_t **entry_data, size_t *entry_data_size, int *encoding, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_set_entry_data( libfvalue_value_t *value, int value_entry_index, const uint8_t *entry_data, size_t entry_data_size, int encoding, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_append_entry_data( libfvalue_value_t *value, int *value_entry_index, const uint8_t *entry_data, size_t entry_data_size, int encoding, libcerror_error_t **error ); /* Boolean value functions */ LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_boolean( libfvalue_value_t *value, int value_entry_index, uint8_t value_boolean, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_boolean( libfvalue_value_t *value, int value_entry_index, uint8_t *value_boolean, libcerror_error_t **error ); /* Integer value functions */ LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_8bit( libfvalue_value_t *value, int value_entry_index, uint8_t value_8bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_8bit( libfvalue_value_t *value, int value_entry_index, uint8_t *value_8bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_16bit( libfvalue_value_t *value, int value_entry_index, uint16_t value_16bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_16bit( libfvalue_value_t *value, int value_entry_index, uint16_t *value_16bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_32bit( libfvalue_value_t *value, int value_entry_index, uint32_t value_32bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_32bit( libfvalue_value_t *value, int value_entry_index, uint32_t *value_32bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_64bit( libfvalue_value_t *value, int value_entry_index, uint64_t value_64bit, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_64bit( libfvalue_value_t *value, int value_entry_index, uint64_t *value_64bit, libcerror_error_t **error ); /* Floating point value functions */ LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_float( libfvalue_value_t *value, int value_entry_index, float value_float, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_float( libfvalue_value_t *value, int value_entry_index, float *value_float, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_double( libfvalue_value_t *value, int value_entry_index, double value_double, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_double( libfvalue_value_t *value, int value_entry_index, double *value_double, libcerror_error_t **error ); /* String value functions */ LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_utf8_string( libfvalue_value_t *value, int value_entry_index, const uint8_t *utf8_string, size_t utf8_string_length, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_utf8_string_size( libfvalue_value_t *value, int value_entry_index, size_t *utf8_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_utf8_string( libfvalue_value_t *value, int value_entry_index, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_utf8_string_with_index( libfvalue_value_t *value, int value_entry_index, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_utf16_string( libfvalue_value_t *value, int value_entry_index, const uint16_t *utf16_string, size_t utf16_string_length, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_utf16_string_size( libfvalue_value_t *value, int value_entry_index, size_t *utf16_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_utf16_string( libfvalue_value_t *value, int value_entry_index, uint16_t *utf16_string, size_t utf16_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_utf16_string_with_index( libfvalue_value_t *value, int value_entry_index, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_from_utf32_string( libfvalue_value_t *value, int value_entry_index, const uint32_t *utf32_string, size_t utf32_string_length, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_get_utf32_string_size( libfvalue_value_t *value, int value_entry_index, size_t *utf32_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_utf32_string( libfvalue_value_t *value, int value_entry_index, uint32_t *utf32_string, size_t utf32_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_copy_to_utf32_string_with_index( libfvalue_value_t *value, int value_entry_index, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, libcerror_error_t **error ); /* Marshalling functions */ LIBFVALUE_EXTERN \ ssize_t libfvalue_value_read_from_file_stream( libfvalue_value_t *value, FILE *file_stream, libcerror_error_t **error ); LIBFVALUE_EXTERN \ ssize_t libfvalue_value_write_to_file_stream( libfvalue_value_t *value, FILE *file_stream, libcerror_error_t **error ); /* Print functions */ int libfvalue_value_print( libfvalue_value_t *value, int value_entry_index, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_binary_data.h0000644000175000017500000000541112005153164016563 00000000000000/* * Binary data value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_BINARY_DATA_H ) #define _LIBFVALUE_BINARY_DATA_H #include #include #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_binary_data libfvalue_binary_data_t; struct libfvalue_binary_data { /* The data */ const uint8_t *data; /* The data size */ size_t data_size; }; int libfvalue_binary_data_initialize( libfvalue_binary_data_t **binary_data, libcerror_error_t **error ); int libfvalue_binary_data_free( libfvalue_binary_data_t **binary_data, libcerror_error_t **error ); int libfvalue_binary_data_clone( libfvalue_binary_data_t **destination_binary_data, libfvalue_binary_data_t *source_binary_data, libcerror_error_t **error ); int libfvalue_binary_data_copy_from_byte_stream( libfvalue_binary_data_t *binary_data, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_binary_data_get_string_size( libfvalue_binary_data_t *binary_data, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_binary_data_copy_to_utf8_string_with_index( libfvalue_binary_data_t *binary_data, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_binary_data_copy_to_utf16_string_with_index( libfvalue_binary_data_t *binary_data, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_binary_data_copy_to_utf32_string_with_index( libfvalue_binary_data_t *binary_data, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_value_type.h0000644000175000017500000000734712005153164016475 00000000000000/* * Value type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_VALUE_TYPE_H ) #define _LIBFVALUE_INTERNAL_VALUE_TYPE_H #include #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBFVALUE_EXTERN \ int libfvalue_value_type_initialize( libfvalue_value_t **value, int type, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_value_type_initialize_with_data_handle( libfvalue_value_t **value, int type, intptr_t *data_handle, int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ), int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ), int (*get_data)( intptr_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_data)( intptr_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ), int (*get_number_of_value_entries)( intptr_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ), int (*get_value_entry)( intptr_t *data_handle, int value_entry_index, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_value_entry)( intptr_t *data_handle, int value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), int (*append_value_entry)( intptr_t *data_handle, int *value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), libcerror_error_t **error ); ssize_t libfvalue_value_type_get_string_size( libfvalue_value_t *value, const uint8_t *data, size_t data_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ ssize_t libfvalue_value_type_set_data_string( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ ssize_t libfvalue_value_type_append_data_string( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ); LIBFVALUE_EXTERN \ ssize_t libfvalue_value_type_set_data_strings_array( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_array_type.c0000644000175000017500000005345212005153164016470 00000000000000/* * Array type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_array_type.h" #include "libfvalue_libcerror.h" /* Creates an array * Make sure the value array is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfvalue_array_initialize( libfvalue_array_t **array, int number_of_entries, libcerror_error_t **error ) { static char *function = "libfvalue_array_initialize"; size_t entries_size = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid array value already set.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *array = memory_allocate_structure( libfvalue_array_t ); if( *array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array.", function ); goto on_error; } if( memory_set( *array, 0, sizeof( libfvalue_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array.", function ); goto on_error; } if( number_of_entries > 0 ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); goto on_error; } ( *array )->entries = (intptr_t **) memory_allocate( entries_size ); if( ( *array )->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array entries.", function ); goto on_error; } if( memory_set( ( *array )->entries, 0, entries_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); goto on_error; } ( *array )->number_of_allocated_entries = number_of_entries; ( *array )->number_of_entries = number_of_entries; } return( 1 ); on_error: if( *array != NULL ) { if( ( *array )->entries != NULL ) { memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( -1 ); } /* Frees an array * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfvalue_array_free( libfvalue_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfvalue_array_free"; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { if( ( *array )->entries != NULL ) { if( libfvalue_array_clear( *array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); result = -1; } memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( result ); } /* Empties an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfvalue_array_empty( libfvalue_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfvalue_array_empty"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( libfvalue_array_clear( array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); return( -1 ); } array->number_of_entries = 0; return( 1 ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfvalue_array_clear( libfvalue_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfvalue_array_clear"; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } } return( result ); } /* Clones the array and its entries * * The entries are cloned using the entry_clone_function * On error the entries are freed using the entry_free_function * * Returns 1 if successful or -1 on error */ int libfvalue_array_clone( libfvalue_array_t **destination_array, libfvalue_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfvalue_array_clone"; int entry_iterator = 0; if( destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination array.", function ); return( -1 ); } if( *destination_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination array already set.", function ); return( -1 ); } if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } if( entry_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry clone function.", function ); return( -1 ); } if( source_array == NULL ) { *destination_array = NULL; return( 1 ); } if( libfvalue_array_initialize( destination_array, source_array->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination array.", function ); goto on_error; } if( *destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination array.", function ); goto on_error; } if( source_array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < source_array->number_of_entries; entry_iterator++ ) { if( source_array->entries[ entry_iterator ] != NULL ) { if( entry_clone_function( &( ( *destination_array )->entries[ entry_iterator ] ), source_array->entries[ entry_iterator ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone array entry: %d.", function, entry_iterator ); goto on_error; } } } } return( 1 ); on_error: if( *destination_array != NULL ) { libfvalue_array_free( destination_array, entry_free_function, NULL ); } return( -1 ); } /* Resizes an array * Returns 1 if successful or -1 on error */ int libfvalue_array_resize( libfvalue_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { void *reallocation = NULL; static char *function = "libfvalue_array_resize"; size_t entries_size = 0; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } if( number_of_entries > array->number_of_allocated_entries ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( array->entries, entries_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize array entries.", function ); return( -1 ); } array->entries = (intptr_t **) reallocation; if( memory_set( &( array->entries[ array->number_of_allocated_entries ] ), 0, sizeof( intptr_t * ) * ( number_of_entries - array->number_of_allocated_entries ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); result = -1; } array->number_of_allocated_entries = number_of_entries; array->number_of_entries = number_of_entries; } else if( number_of_entries > array->number_of_entries ) { array->number_of_entries = number_of_entries; } else if( array->entries != NULL ) { if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } for( entry_iterator = number_of_entries; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } array->number_of_entries = number_of_entries; } return( result ); } /* Retrieves the number of entries in the array * Returns 1 if successful or -1 on error */ int libfvalue_array_get_number_of_entries( libfvalue_array_t *array, int *number_of_entries, libcerror_error_t **error ) { static char *function = "libfvalue_array_get_number_of_entries"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *number_of_entries = array->number_of_entries; return( 1 ); } /* Retrieves a specific entry from the array * Returns 1 if successful or -1 on error */ int libfvalue_array_get_entry_by_index( libfvalue_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ) { static char *function = "libfvalue_array_get_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } if( entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry.", function ); return( -1 ); } *entry = array->entries[ entry_index ]; return( 1 ); } /* Sets a specific entry in the array * Returns 1 if successful or -1 on error */ int libfvalue_array_set_entry_by_index( libfvalue_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libfvalue_array_set_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } array->entries[ entry_index ] = entry; return( 1 ); } /* Appends an entry * Sets the entry index to the newly appended entry * Returns 1 if successful or -1 on error */ int libfvalue_array_append_entry( libfvalue_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libfvalue_array_append_entry"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } *entry_index = array->number_of_entries; if( libfvalue_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; return( 1 ); } /* Inserts an entry in the array * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBFVALUE_ARRAY_COMPARE_LESS, * LIBFVALUE_ARRAY_COMPARE_EQUAL, LIBFVALUE_ARRAY_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBFVALUE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libfvalue_array_insert_entry( libfvalue_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { static char *function = "libfvalue_tree_node_insert_node"; int entry_iterator = 0; int result = -1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } if( entry_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBFVALUE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { result = entry_compare_function( entry, array->entries[ entry_iterator ], error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare entry: %d.", function, entry_iterator ); return( -1 ); } else if( result == LIBFVALUE_ARRAY_COMPARE_EQUAL ) { if( ( insert_flags & LIBFVALUE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBFVALUE_ARRAY_COMPARE_LESS ) { break; } else if( result != LIBFVALUE_ARRAY_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry compare function return value: %d.", function, result ); return( -1 ); } } } if( ( array->entries != NULL ) && ( result == LIBFVALUE_ARRAY_COMPARE_LESS ) ) { *entry_index = entry_iterator; if( libfvalue_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } for( entry_iterator = array->number_of_entries - 1; entry_iterator > *entry_index; entry_iterator-- ) { array->entries[ entry_iterator ] = array->entries[ entry_iterator - 1 ]; } array->entries[ *entry_index ] = entry; } else { *entry_index = array->number_of_entries; if( libfvalue_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; } return( 1 ); } libpff-20120802/libfvalue/libfvalue_value_type.c0000644000175000017500000011463612005153164016470 00000000000000/* * Value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libfvalue_binary_data.h" #include "libfvalue_data_handle.h" #include "libfvalue_definitions.h" #include "libfvalue_floating_point.h" #include "libfvalue_integer.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcnotify.h" #include "libfvalue_string.h" #include "libfvalue_types.h" #include "libfvalue_unused.h" #include "libfvalue_value.h" #include "libfvalue_value_type.h" #if defined( HAVE_LIBFDATETIME_H ) || defined( HAVE_LOCAL_LIBFDATETIME ) #include "libfvalue_libfdatetime.h" #endif #if defined( HAVE_LIBFGUID_H ) || defined( HAVE_LOCAL_LIBFGUID ) #include "libfvalue_libfguid.h" #endif #if defined( HAVE_LIBFWNT_H ) || defined( HAVE_LOCAL_LIBFWNT ) #include "libfvalue_libfwnt.h" #endif const char *libfvalue_value_type_strings[ 27 ] = { NULL, "binary-data", "boolean", "enum", "int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64", "float32", "float64", "byte-stream-string", "utf8-string", "utf16-string", "utf32-string", "fat-date-time", "filetime", "floatingtime", "nsf-timedate", "hfs-time", "posix-time", "systemtime", "guid", "nt-sid", }; const char *libfvalue_value_type_descriptions[ 27 ] = { NULL, "Binary data", "Boolean", "Enumeration", "Integer 8-bit signed", "Integer 8-bit unsigned", "Integer 16-bit signed", "Integer 16-bit unsigned", "Integer 32-bit signed", "Integer 32-bit unsigned", "Integer 64-bit signed", "Integer 64-bit unsigned", "Floating point 32-bit (single precision)", "Floating point 64-bit (double precision)", "Byte stream string", "UTF-8 string", "UTF-16 string", "UTF-32 string", "FAT date time", "Filetime", "FLoatingtime", "NSF timedate", "HFS time", "POSIX time", "Systemtime", "Globally Unique Identifier (GUID)", "NT Security Identifier (SID)", }; /* Initialize a value of a specific type * Returns 1 if successful or -1 on error */ int libfvalue_value_type_initialize( libfvalue_value_t **value, int type, libcerror_error_t **error ) { libfvalue_data_handle_t *data_handle = NULL; static char *function = "libfvalue_value_type_initialize"; if( libfvalue_data_handle_initialize( &data_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data handle.", function ); goto on_error; } if( libfvalue_value_type_initialize_with_data_handle( value, type, (intptr_t *) data_handle, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_data_handle_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfvalue_data_handle_clone, (int (*)(intptr_t *, uint8_t **, size_t *, int *, libcerror_error_t **)) &libfvalue_data_handle_get_data, (int (*)(intptr_t *, const uint8_t *, size_t, int, uint8_t, libcerror_error_t **)) &libfvalue_data_handle_set_data, (int (*)(intptr_t *, int *, libcerror_error_t **)) &libfvalue_data_handle_get_number_of_value_entries, (int (*)(intptr_t *, int, uint8_t **, size_t *, int *, libcerror_error_t **)) &libfvalue_data_handle_get_value_entry, (int (*)(intptr_t *, int, const uint8_t *, size_t, int, libcerror_error_t **)) &libfvalue_data_handle_set_value_entry, (int (*)(intptr_t *, int *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfvalue_data_handle_append_value_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value with data handle.", function ); goto on_error; } return( 1 ); on_error: if( data_handle != NULL ) { libfvalue_data_handle_free( &data_handle, NULL ); } return( -1 ); } /* Initialize a value of a specific type with a custom data handle * Returns 1 if successful or -1 on error */ int libfvalue_value_type_initialize_with_data_handle( libfvalue_value_t **value, int type, intptr_t *data_handle, int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ), int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ), int (*get_data)( intptr_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_data)( intptr_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ), int (*get_number_of_value_entries)( intptr_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ), int (*get_value_entry)( intptr_t *data_handle, int value_entry_index, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ), int (*set_value_entry)( intptr_t *data_handle, int value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), int (*append_value_entry)( intptr_t *data_handle, int *value_entry_index, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfvalue_value_type_initialize_with_data_handle"; int result = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } switch( type ) { case LIBFVALUE_VALUE_TYPE_BINARY_DATA: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_binary_data_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_binary_data_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfvalue_binary_data_clone, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfvalue_binary_data_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_binary_data_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_FLOATING_POINT_32BIT: case LIBFVALUE_VALUE_TYPE_FLOATING_POINT_64BIT: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_floating_point_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_floating_point_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfvalue_floating_point_clone, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfvalue_floating_point_copy_from_byte_stream, (int (*)(intptr_t *, uint64_t, size_t, libcerror_error_t **)) &libfvalue_floating_point_copy_from_integer, (int (*)(intptr_t *, uint64_t *, size_t *, libcerror_error_t **)) &libfvalue_floating_point_copy_to_integer, NULL, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_copy_from_utf8_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_copy_to_utf8_string_with_index, (int (*)(intptr_t *, const uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_copy_from_utf16_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_copy_to_utf16_string_with_index, (int (*)(intptr_t *, const uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_copy_from_utf32_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_floating_point_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_BOOLEAN: case LIBFVALUE_VALUE_TYPE_INTEGER_8BIT: case LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_8BIT: case LIBFVALUE_VALUE_TYPE_INTEGER_16BIT: case LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_16BIT: case LIBFVALUE_VALUE_TYPE_INTEGER_32BIT: case LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT: case LIBFVALUE_VALUE_TYPE_INTEGER_64BIT: case LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_64BIT: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_integer_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_integer_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfvalue_integer_clone, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfvalue_integer_copy_from_byte_stream, (int (*)(intptr_t *, uint64_t, size_t, libcerror_error_t **)) &libfvalue_integer_copy_from_integer, (int (*)(intptr_t *, uint64_t *, size_t *, libcerror_error_t **)) &libfvalue_integer_copy_to_integer, NULL, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_copy_from_utf8_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_copy_to_utf8_string_with_index, (int (*)(intptr_t *, const uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_copy_from_utf16_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_copy_to_utf16_string_with_index, (int (*)(intptr_t *, const uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_copy_from_utf32_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_integer_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM: case LIBFVALUE_VALUE_TYPE_STRING_UTF8: case LIBFVALUE_VALUE_TYPE_STRING_UTF16: case LIBFVALUE_VALUE_TYPE_STRING_UTF32: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_string_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_string_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) &libfvalue_string_clone, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfvalue_string_copy_from_byte_stream, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_copy_from_utf8_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_get_utf8_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_copy_to_utf8_string_with_index, (int (*)(intptr_t *, const uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_copy_from_utf16_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_get_utf16_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_copy_to_utf16_string_with_index, (int (*)(intptr_t *, const uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_copy_from_utf32_string_with_index, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_get_utf32_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfvalue_string_copy_to_utf32_string_with_index, error ); break; #if defined( HAVE_LIBFDATETIME_H ) || defined( HAVE_LOCAL_LIBFDATETIME ) case LIBFVALUE_VALUE_TYPE_FAT_DATE_TIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_fat_date_time_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_fat_date_time_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfdatetime_fat_date_time_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_fat_date_time_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_fat_date_time_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_fat_date_time_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_fat_date_time_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_fat_date_time_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_fat_date_time_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_FILETIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_filetime_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_filetime_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfdatetime_filetime_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_filetime_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_filetime_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_filetime_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_filetime_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_filetime_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_filetime_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_FLOATINGTIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_floatingtime_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_floatingtime_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfdatetime_floatingtime_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_floatingtime_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_floatingtime_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_floatingtime_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_floatingtime_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_floatingtime_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_floatingtime_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_NSF_TIMEDATE: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_nsf_timedate_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_nsf_timedate_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfdatetime_nsf_timedate_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_nsf_timedate_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_nsf_timedate_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_nsf_timedate_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_nsf_timedate_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_nsf_timedate_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_nsf_timedate_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_POSIX_TIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_posix_time_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_posix_time_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfdatetime_posix_time_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_posix_time_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_posix_time_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_posix_time_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_posix_time_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_posix_time_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_posix_time_copy_to_utf32_string_with_index, error ); break; case LIBFVALUE_VALUE_TYPE_SYSTEMTIME: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_systemtime_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfdatetime_systemtime_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfdatetime_systemtime_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_systemtime_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_systemtime_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_systemtime_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_systemtime_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_systemtime_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfdatetime_systemtime_copy_to_utf32_string_with_index, error ); break; #endif #if defined( HAVE_LIBFGUID_H ) || defined( HAVE_LOCAL_LIBFGUID ) case LIBFVALUE_VALUE_TYPE_GUID: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfguid_identifier_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfguid_identifier_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfguid_identifier_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfguid_identifier_copy_to_utf32_string_with_index, error ); break; #endif #if defined( HAVE_LIBFWNT_H ) || defined( HAVE_LOCAL_LIBFWNT ) case LIBFVALUE_VALUE_TYPE_NT_SECURITY_IDENTIFIER: result = libfvalue_value_initialize( value, libfvalue_value_type_strings[ type ], libfvalue_value_type_descriptions[ type ], data_handle, free_data_handle, clone_data_handle, get_data, set_data, get_number_of_value_entries, get_value_entry, set_value_entry, append_value_entry, (int (*)(intptr_t **, libcerror_error_t **)) &libfwnt_security_identifier_initialize, (int (*)(intptr_t **, libcerror_error_t **)) &libfwnt_security_identifier_free, NULL, (int (*)(intptr_t *, const uint8_t *, size_t, int, libcerror_error_t **)) &libfwnt_security_identifier_copy_from_byte_stream, NULL, NULL, NULL, NULL, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfwnt_security_identifier_get_string_size, (int (*)(intptr_t *, uint8_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfwnt_security_identifier_copy_to_utf8_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfwnt_security_identifier_get_string_size, (int (*)(intptr_t *, uint16_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfwnt_security_identifier_copy_to_utf16_string_with_index, NULL, (int (*)(intptr_t *, size_t *, uint32_t, libcerror_error_t **)) &libfwnt_security_identifier_get_string_size, (int (*)(intptr_t *, uint32_t *, size_t, size_t *, uint32_t, libcerror_error_t **)) &libfwnt_security_identifier_copy_to_utf32_string_with_index, error ); break; #endif default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported type: 0x%02" PRIx8 ".", function, type ); break; } if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value.", function ); return( -1 ); } if( *value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing value.", function ); return( -1 ); } ( (libfvalue_internal_value_t *) *value )->type = type; return( 1 ); } /* Determines the size of a variable sized string * This function will look for a end-of-string character as the indicator * of the end of the string upto data size * Returns data size of the string if successful or -1 on error */ ssize_t libfvalue_value_type_get_string_size( libfvalue_value_t *value, const uint8_t *data, size_t data_size, libcerror_error_t **error ) { libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_value_type_get_string_size"; size_t data_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; if( ( internal_value->type != LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM ) && ( internal_value->type != LIBFVALUE_VALUE_TYPE_STRING_UTF8 ) && ( internal_value->type != LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) && ( internal_value->type != LIBFVALUE_VALUE_TYPE_STRING_UTF32 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported type: 0x%02" PRIx8 ".", function, internal_value->type ); return( -1 ); } if( data != NULL ) { if( ( internal_value->type == LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM ) || ( internal_value->type == LIBFVALUE_VALUE_TYPE_STRING_UTF8 ) ) { while( data_index < data_size ) { if( data[ data_index ] == 0 ) { data_index += 1; break; } data_index += 1; } } else if( internal_value->type == LIBFVALUE_VALUE_TYPE_STRING_UTF16 ) { while( ( data_index + 1 ) < data_size ) { if( ( data[ data_index ] == 0 ) && ( data[ data_index + 1 ] == 0 ) ) { data_index += 2; break; } data_index += 2; } } else if( internal_value->type == LIBFVALUE_VALUE_TYPE_STRING_UTF32 ) { while( ( data_index + 3 ) < data_size ) { if( ( data[ data_index ] == 0 ) && ( data[ data_index + 1 ] == 0 ) && ( data[ data_index + 2 ] == 0 ) && ( data[ data_index + 3 ] == 0 ) ) { data_index += 4; break; } data_index += 4; } } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: string data:\n", function ); libcnotify_print_data( data, data_index, 0 ); } #endif } return( (ssize_t) data_index ); } /* Sets the data of a variable sized string * This function will look for a end-of-string character as the indicator * of the end of the string upto data size * Returns data size of the string if successful or -1 on error */ ssize_t libfvalue_value_type_set_data_string( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_set_data_string"; ssize_t data_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } data_index = libfvalue_value_type_get_string_size( value, data, data_size, error ); if( data_index == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine data string size.", function ); return( -1 ); } if( libfvalue_value_set_data( value, data, (size_t) data_index, encoding, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value entry.", function ); return( -1 ); } return( data_index ); } /* Append the data of a variable sized string * This function will look for a end-of-string character as the indicator * of the end of the string upto data size * Returns data size of the string if successful or -1 on error */ ssize_t libfvalue_value_type_append_data_string( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_append_data_string"; ssize_t data_index = 0; int value_entry_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } data_index = libfvalue_value_type_get_string_size( value, data, data_size, error ); if( data_index == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine data string size.", function ); return( -1 ); } if( libfvalue_value_append_entry_data( value, &value_entry_index, data, (size_t) data_index, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value entry.", function ); return( -1 ); } return( data_index ); } /* Sets the data of an array of variable sized strings * This function will look for a NUL-character as the indicator of * the end of the string upto data_size * Returns data size of the string array if successful or -1 on error */ ssize_t libfvalue_value_type_set_data_strings_array( libfvalue_value_t *value, const uint8_t *data, size_t data_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_value_type_set_data_strings_array"; ssize_t data_index = 0; ssize_t last_data_index = 0; int value_entry_index = 0; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } while( (size_t) last_data_index < data_size ) { data_index = libfvalue_value_type_get_string_size( value, &( data[ last_data_index ] ), data_size - last_data_index, error ); if( data_index == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to determine data string size.", function ); return( -1 ); } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: strings array value entry: %d data:\n", function, value_entry_index ); libcnotify_print_data( &( data[ last_data_index ] ), (size_t) data_index, 0 ); } #endif if( libfvalue_value_append_entry_data( value, &value_entry_index, &( data[ last_data_index ] ), (size_t) data_index, encoding, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append value entry.", function ); return( -1 ); } last_data_index += data_index; } return( last_data_index ); } libpff-20120802/libfvalue/Makefile.in0000664000175000017500000007065112006536016014165 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfvalue DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfvalue_la_LIBADD = am__libfvalue_la_SOURCES_DIST = libfvalue_array_type.c \ libfvalue_array_type.h libfvalue_binary_data.c \ libfvalue_binary_data.h libfvalue_codepage.h \ libfvalue_data_handle.c libfvalue_data_handle.h \ libfvalue_definitions.h libfvalue_error.c libfvalue_error.h \ libfvalue_extern.h libfvalue_floating_point.c \ libfvalue_floating_point.h libfvalue_integer.c \ libfvalue_integer.h libfvalue_libcerror.h \ libfvalue_libcnotify.h libfvalue_libcstring.h \ libfvalue_libfdatetime.h libfvalue_libfguid.h \ libfvalue_libfwnt.h libfvalue_libuna.h \ libfvalue_split_string.c libfvalue_split_string.h \ libfvalue_string.c libfvalue_string.h libfvalue_types.h \ libfvalue_table.c libfvalue_table.h libfvalue_value.c \ libfvalue_value.h libfvalue_value_entry.c \ libfvalue_value_entry.h libfvalue_value_type.c \ libfvalue_value_type.h libfvalue_support.c libfvalue_support.h \ libfvalue_unused.h @HAVE_LOCAL_LIBFVALUE_TRUE@am_libfvalue_la_OBJECTS = \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_array_type.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_binary_data.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_data_handle.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_error.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_floating_point.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_integer.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_split_string.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_string.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_table.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_entry.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_type.lo \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_support.lo libfvalue_la_OBJECTS = $(am_libfvalue_la_OBJECTS) @HAVE_LOCAL_LIBFVALUE_TRUE@am_libfvalue_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfvalue_la_SOURCES) DIST_SOURCES = $(am__libfvalue_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFVALUE_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFVALUE_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFVALUE_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBFDATETIME_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBFGUID_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBFWNT_CPPFLAGS@ \ @HAVE_LOCAL_LIBFVALUE_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFVALUE_TRUE@noinst_LTLIBRARIES = libfvalue.la @HAVE_LOCAL_LIBFVALUE_TRUE@libfvalue_la_SOURCES = \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_array_type.c libfvalue_array_type.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_binary_data.c libfvalue_binary_data.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_codepage.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_data_handle.c libfvalue_data_handle.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_definitions.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_error.c libfvalue_error.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_extern.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_floating_point.c libfvalue_floating_point.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_integer.c libfvalue_integer.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcerror.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcnotify.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcstring.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libfdatetime.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libfguid.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libfwnt.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libuna.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_split_string.c libfvalue_split_string.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_string.c libfvalue_string.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_types.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_table.c libfvalue_table.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value.c libfvalue_value.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_entry.c libfvalue_value_entry.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_value_type.c libfvalue_value_type.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_support.c libfvalue_support.h \ @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfvalue/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfvalue/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfvalue.la: $(libfvalue_la_OBJECTS) $(libfvalue_la_DEPENDENCIES) $(LINK) $(am_libfvalue_la_rpath) $(libfvalue_la_OBJECTS) $(libfvalue_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_array_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_binary_data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_data_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_floating_point.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_integer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_split_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_table.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value_entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfvalue_value_type.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfvalue ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfvalue_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfvalue/libfvalue_libuna.h0000644000175000017500000000320512005153164015557 00000000000000/* * The internal libuna header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBUNA_H ) #define _LIBFVALUE_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/libfvalue_error.c0000644000175000017500000000466012005153164015437 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_error.h" #include "libfvalue_libcerror.h" #if !defined( HAVE_LOCAL_LIBFVALUE ) /* Free an error and its elements */ void libfvalue_error_free( libfvalue_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfvalue_error_fprint( libfvalue_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfvalue_error_sprint( libfvalue_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfvalue_error_backtrace_fprint( libfvalue_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfvalue_error_backtrace_sprint( libfvalue_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif libpff-20120802/libfvalue/libfvalue_error.h0000644000175000017500000000330212005153164015434 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_ERROR_H ) #define _LIBFVALUE_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFVALUE ) #include #endif #include "libfvalue_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFVALUE ) LIBFVALUE_EXTERN \ void libfvalue_error_free( libfvalue_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_error_fprint( libfvalue_error_t *error, FILE *stream ); LIBFVALUE_EXTERN \ int libfvalue_error_sprint( libfvalue_error_t *error, char *string, size_t size ); LIBFVALUE_EXTERN \ int libfvalue_error_backtrace_fprint( libfvalue_error_t *error, FILE *stream ); LIBFVALUE_EXTERN \ int libfvalue_error_backtrace_sprint( libfvalue_error_t *error, char *string, size_t size ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_table.c0000644000175000017500000007753512005153164015410 00000000000000/* * Values table functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_array_type.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libcstring.h" #include "libfvalue_table.h" #include "libfvalue_types.h" #include "libfvalue_value.h" #include "libfvalue_value_type.h" /* Initializes the values table * Returns 1 if successful or -1 on error */ int libfvalue_table_initialize( libfvalue_table_t **table, int number_of_values, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_initialize"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } if( *table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid table value already set.", function ); return( -1 ); } internal_table = memory_allocate_structure( libfvalue_internal_table_t ); if( internal_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create values table.", function ); goto on_error; } if( memory_set( internal_table, 0, sizeof( libfvalue_internal_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear values table.", function ); goto on_error; } if( libfvalue_array_initialize( &( internal_table->values ), number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create values array.", function ); goto on_error; } *table = (libfvalue_table_t *) internal_table; return( 1 ); on_error: if( internal_table != NULL ) { memory_free( internal_table ); } return( -1 ); } /* Frees a table * Returns 1 if successful or -1 on error */ int libfvalue_table_free( libfvalue_table_t **table, libcerror_error_t **error ) { static char *function = "libfvalue_table_free"; int result = 1; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table.", function ); return( -1 ); } if( *table != NULL ) { if( libfvalue_table_free_as_value( (intptr_t *) *table, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free table.", function ); result = -1; } *table = NULL; } return( result ); } /* Frees the values table including elements * Returns 1 if successful or -1 on error */ int libfvalue_table_free_as_value( intptr_t *table, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_free_as_value"; int result = 1; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( libfvalue_array_free( &( internal_table->values ), (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the values array.", function ); result = -1; } memory_free( internal_table ); return( result ); } /* Empties the values table * Returns 1 if successful or -1 on error */ int libfvalue_table_empty( libfvalue_table_t *table, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_empty"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( libfvalue_array_empty( internal_table->values, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty values array.", function ); return( -1 ); } return( 1 ); } /* Resizes the values table * Returns 1 if successful or -1 on error */ int libfvalue_table_resize( libfvalue_table_t *table, int number_of_values, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_resize"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( libfvalue_array_resize( internal_table->values, number_of_values, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize values array.", function ); return( -1 ); } return( 1 ); } /* Clones a table * Returns 1 if successful or -1 on error */ int libfvalue_table_clone( libfvalue_table_t **destination_table, libfvalue_table_t *source_table, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_destination_table = NULL; libfvalue_internal_table_t *internal_source_table = NULL; static char *function = "libfvalue_table_clone"; if( destination_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination table.", function ); return( -1 ); } if( *destination_table != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination table already set.", function ); return( -1 ); } if( source_table == NULL ) { *destination_table = NULL; return( 1 ); } internal_destination_table = memory_allocate_structure( libfvalue_internal_table_t ); if( internal_destination_table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination values table.", function ); goto on_error; } if( memory_set( internal_destination_table, 0, sizeof( libfvalue_internal_table_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination values table.", function ); goto on_error; } if( libfvalue_array_clone( &( internal_destination_table->values ), internal_source_table->values, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **) ) &libfvalue_value_clone, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination values array.", function ); goto on_error; } *destination_table = (libfvalue_table_t *) internal_destination_table; return( 1 ); on_error: if( internal_destination_table != NULL ) { memory_free( internal_destination_table ); } return( -1 ); } /* Retrieves the number of values * Returns 1 if successful or -1 on error */ int libfvalue_table_get_number_of_values( libfvalue_table_t *table, int *number_of_values, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_get_number_of_values"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( libfvalue_array_get_number_of_entries( internal_table->values, number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries in the values array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the index for an identifier * * When LIBFVALUE_TABLE_FLAG_ALLOW_PARTIAL_MATCH is set a match * of the first part of the identifier is allowed. * * Returns 1 if successful, 0 if no index was found or -1 on error */ int libfvalue_table_get_index_by_identifier( libfvalue_table_t *table, const uint8_t *identifier, size_t identifier_size, int *value_index, uint8_t flags, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; libfvalue_internal_value_t *internal_value = NULL; static char *function = "libfvalue_table_get_index_by_identifier"; size_t compare_size = 0; int number_of_values = 0; int result = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid identifier.", function ); return( -1 ); } if( ( identifier_size == 0 ) || ( identifier_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid identifier size value out of bounds.", function ); return( -1 ); } if( value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value index.", function ); return( -1 ); } if( ( flags & ~( LIBFVALUE_TABLE_FLAG_ALLOW_PARTIAL_MATCH ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } if( libfvalue_array_get_number_of_entries( internal_table->values, &number_of_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries in the values array.", function ); return( -1 ); } for( *value_index = 0; *value_index < number_of_values; *value_index += 1 ) { if( libfvalue_array_get_entry_by_index( internal_table->values, *value_index, (intptr_t **) &internal_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values array.", function, *value_index ); return( -1 ); } if( internal_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing internal value.", function ); return( -1 ); } if( ( flags & LIBFVALUE_TABLE_FLAG_ALLOW_PARTIAL_MATCH ) == 0 ) { if( internal_value->identifier_size != identifier_size ) { continue; } } if( internal_value->identifier_size <= identifier_size ) { compare_size = internal_value->identifier_size; } else { compare_size = identifier_size; } result = memory_compare( internal_value->identifier, identifier, compare_size ); if( result == 0 ) { return( 1 ); } } return( 0 ); } /* Retrieves a specific value * Returns 1 if successful or -1 on error */ int libfvalue_table_get_value_by_index( libfvalue_table_t *table, int value_index, libfvalue_value_t **value, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_get_value_by_index"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( libfvalue_array_get_entry_by_index( internal_table->values, value_index, (intptr_t **) value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values array.", function, value_index ); return( -1 ); } return( 1 ); } /* Retrieves a value for the specific identifier * * When LIBFVALUE_TABLE_FLAG_ALLOW_PARTIAL_MATCH is set a match * of the first part of the identifier is allowed. * * Returns 1 if successful, 0 if value not available or -1 on error */ int libfvalue_table_get_value_by_identifier( libfvalue_table_t *table, const uint8_t *identifier, size_t identifier_size, libfvalue_value_t **value, uint8_t flags, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; static char *function = "libfvalue_table_get_value_by_identifier"; int value_index = 0; int result = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } result = libfvalue_table_get_index_by_identifier( table, identifier, identifier_size, &value_index, flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find index for: %s.", function, identifier ); return( -1 ); } else if( result != 0 ) { if( libfvalue_array_get_entry_by_index( internal_table->values, value_index, (intptr_t **) value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values array.", function, value_index ); return( -1 ); } } return( result ); } /* Sets a specific value * Frees the stored value if necessary * Returns 1 if successful or -1 on error */ int libfvalue_table_set_value_by_index( libfvalue_table_t *table, int value_index, libfvalue_value_t *value, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; libfvalue_value_t *stored_value = NULL; static char *function = "libfvalue_table_set_value_by_index"; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( libfvalue_array_get_entry_by_index( internal_table->values, value_index, (intptr_t **) &stored_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values array.", function, value_index ); return( -1 ); } if( ( stored_value != NULL ) && ( stored_value != value ) ) { if( libfvalue_value_free( &stored_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value: %d.", function, value_index ); return( -1 ); } } if( libfvalue_array_set_entry_by_index( internal_table->values, value_index, (intptr_t *) value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values array.", function, value_index ); return( -1 ); } return( 1 ); } /* Sets a value in the values table * This function appends a new value or replaces an existing value * Returns 1 if successful or -1 on error */ int libfvalue_table_set_value( libfvalue_table_t *table, libfvalue_value_t *value, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; libfvalue_internal_value_t *internal_value = NULL; libfvalue_value_t *stored_value = NULL; static char *function = "libfvalue_table_set_value"; int value_index = 0; int result = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value.", function ); return( -1 ); } internal_value = (libfvalue_internal_value_t *) value; result = libfvalue_table_get_index_by_identifier( table, internal_value->identifier, internal_value->identifier_size, &value_index, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find index for: %s.", function, (char *) internal_value->identifier ); return( -1 ); } else if( result == 0 ) { if( libfvalue_array_insert_entry( internal_table->values, &value_index, (intptr_t *) value, &libfvalue_compare_identifier, LIBFVALUE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert value: %s in values array.", function, (char *) internal_value->identifier ); return( -1 ); } } else { if( libfvalue_array_get_entry_by_index( internal_table->values, value_index, (intptr_t **) &stored_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values array.", function, value_index ); return( -1 ); } if( ( stored_value != NULL ) && ( stored_value != value ) ) { if( libfvalue_array_set_entry_by_index( internal_table->values, value_index, (intptr_t *) value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in values array.", function, value_index ); return( -1 ); } if( libfvalue_value_free( &stored_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value: %d.", function, value_index ); return( -1 ); } } } return( 1 ); } enum LIBFVALUE_XML_TAG_TYPES { LIBFVALUE_XML_TAG_TYPE_CLOSE = (uint8_t) 'c', LIBFVALUE_XML_TAG_TYPE_OPEN = (uint8_t) 'o' }; /* Copies the values table from an UTF-8 encoded XML string * Returns 1 if successful, 0 if the requested section could not be found or -1 on error */ int libfvalue_table_copy_from_utf8_xml_string( libfvalue_table_t *table, const uint8_t *utf8_string, size_t utf8_string_size, const uint8_t *table_name, size_t table_name_length, libcerror_error_t **error ) { libfvalue_internal_table_t *internal_table = NULL; libfvalue_value_t *value = NULL; uint8_t *value_data = NULL; uint8_t *value_identifier = NULL; const uint8_t *xml_table_name = NULL; const uint8_t *xml_tag_data = NULL; const uint8_t *xml_tag_name = NULL; static char *function = "libfvalue_table_copy_from_utf8_xml_string"; size_t string_index = 0; size_t value_identifier_length = 0; size_t value_data_length = 0; size_t xml_table_name_length = 0; size_t xml_tag_name_length = 0; uint8_t xml_tag_type = 0; int result = 0; int value_index = 0; if( table == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid values table.", function ); return( -1 ); } internal_table = (libfvalue_internal_table_t *) table; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string size value out of bounds.", function ); return( -1 ); } if( table_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid table name.", function ); return( -1 ); } if( table_name_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid table name size value out of bounds.", function ); return( -1 ); } #ifdef TODO if( libfvalue_array_empty( internal_table->values, (int (*)(intptr_t **, libcerror_error_t **)) &libfvalue_value_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty values array.", function ); return( -1 ); } #endif /* TODO check for "\n"; */ /* Note that below numeric values for the characters are used to prevent * platform specific values being assigned */ while( string_index < utf8_string_size ) { /* Look for the start of the XML tag: '<' */ if( utf8_string[ string_index++ ] != 0x3c ) { continue; } /* Determine if the XML tag is an open or close tag: '/' */ if( utf8_string[ string_index ] != 0x2f ) { xml_tag_type = LIBFVALUE_XML_TAG_TYPE_OPEN; } else { xml_tag_type = LIBFVALUE_XML_TAG_TYPE_CLOSE; string_index++; } xml_tag_name = &( utf8_string[ string_index ] ); xml_tag_name_length = 0; while( string_index < utf8_string_size ) { /* The XML tag name should only consists of: [A-Za-z0-9_] */ if( ( ( utf8_string[ string_index ] >= 0x41 ) && ( utf8_string[ string_index ] <= 0x5a ) ) || ( ( utf8_string[ string_index ] >= 0x61 ) && ( utf8_string[ string_index ] <= 0x7a ) ) || ( ( utf8_string[ string_index ] >= 0x30 ) && ( utf8_string[ string_index ] <= 0x39 ) ) || ( utf8_string[ string_index ] == 0x5f ) ) { xml_tag_name_length++; } else { break; } string_index++; } /* TODO add support for XML tag attributes but ignore them for now */ while( string_index < utf8_string_size ) { /* Look for the end of the XML tag: '>' */ if( utf8_string[ string_index ] == 0x3e ) { break; } string_index++; } /* Look for the end of the XML tag: '>' */ if( utf8_string[ string_index++ ] != 0x3e ) { xml_tag_name = NULL; xml_tag_name_length = 0; continue; } if( ( xml_tag_name == NULL ) || ( xml_tag_name_length == 0 ) ) { continue; } if( xml_table_name == NULL ) { if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_OPEN ) && ( xml_tag_name_length == table_name_length ) && ( libcstring_narrow_string_compare( table_name, xml_tag_name, xml_tag_name_length ) == 0 ) ) { xml_table_name = xml_tag_name; xml_table_name_length = xml_tag_name_length; } } else if( value_identifier == NULL ) { if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_CLOSE ) && ( xml_tag_name_length == xml_table_name_length ) && ( libcstring_narrow_string_compare( xml_table_name, xml_tag_name, xml_tag_name_length ) == 0 ) ) { xml_table_name = NULL; xml_table_name_length = 0; result = 1; break; } else if( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_OPEN ) { value_identifier_length = xml_tag_name_length; value_identifier = (uint8_t *) memory_allocate( sizeof( uint8_t ) * ( value_identifier_length + 1 ) ); if( value_identifier == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value identifier.", function ); goto on_error; } if( memory_copy( value_identifier, xml_tag_name, value_identifier_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear values table.", function ); goto on_error; } value_identifier[ value_identifier_length ] = 0; xml_tag_data = &( utf8_string[ string_index ] ); } } else { if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_CLOSE ) && ( xml_tag_name_length == value_identifier_length ) && ( libcstring_narrow_string_compare( value_identifier, xml_tag_name, xml_tag_name_length ) == 0 ) ) { result = libfvalue_table_get_index_by_identifier( table, value_identifier, value_identifier_length + 1, &value_index, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to find index for: %s.", function, (char *) value_identifier ); goto on_error; } else if( result == 0 ) { if( libfvalue_value_type_initialize( &value, LIBFVALUE_VALUE_TYPE_STRING_UTF8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value: %s.", function, (char *) value_identifier ); goto on_error; } if( libfvalue_value_set_identifier( value, value_identifier, value_identifier_length + 1, LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set identifier in value: %s.", function, (char *) value_identifier ); libfvalue_value_free( &value, NULL ); goto on_error; } if( libfvalue_array_insert_entry( internal_table->values, &value_index, (intptr_t *) value, &libfvalue_compare_identifier, LIBFVALUE_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to insert value: %s in values array.", function, (char *) value_identifier ); libfvalue_value_free( &value, NULL ); goto on_error; } } else { if( libfvalue_array_get_entry_by_index( internal_table->values, value_index, (intptr_t **) &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from values array.", function, value_index ); goto on_error; } } /* Note that the XML tag name of the closing tag is preceded by * 2 characters ' * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBFGUID_H ) #define _LIBFVALUE_LIBFGUID_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) #include #include #include #else /* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT * before including libfguid.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFGUID_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfvalue/libfvalue_string.h0000644000175000017500000001050012005153164015607 00000000000000/* * String value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBVALUE_STRING_H ) #define _LIBVALUE_STRING_H #include #include #include "libfvalue_definitions.h" #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( _cplusplus ) extern "C" { #endif typedef struct libfvalue_string libfvalue_string_t; struct libfvalue_string { /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The codepage */ int codepage; /* The flags */ uint8_t flags; }; int libfvalue_string_initialize( libfvalue_string_t **string, libcerror_error_t **error ); int libfvalue_string_free( libfvalue_string_t **string, libcerror_error_t **error ); int libfvalue_string_clone( libfvalue_string_t **destination_string, libfvalue_string_t *source_string, libcerror_error_t **error ); int libfvalue_string_copy_from_byte_stream( libfvalue_string_t *string, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_string_copy_from_utf8_string_with_index( libfvalue_string_t *string, const uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_get_utf8_string_size( libfvalue_string_t *string, size_t *utf8_string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_to_utf8_string_with_index( libfvalue_string_t *string, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_from_utf16_string_with_index( libfvalue_string_t *string, const uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_get_utf16_string_size( libfvalue_string_t *string, size_t *utf16_string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_to_utf16_string_with_index( libfvalue_string_t *string, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_from_utf32_string_with_index( libfvalue_string_t *string, const uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_get_utf32_string_size( libfvalue_string_t *string, size_t *utf32_string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_string_copy_to_utf32_string_with_index( libfvalue_string_t *string, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_split( const uint8_t *utf8_string, size_t utf8_string_size, uint8_t delimiter, libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_split( const uint16_t *utf16_string, size_t utf16_string_size, uint16_t delimiter, libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ); #if defined( _cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_table.h0000644000175000017500000000662212005153164015402 00000000000000/* * Values table functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_TABLE_H ) #define _LIBFVALUE_INTERNAL_TABLE_H #include #include #include "libfvalue_array_type.h" #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_internal_table libfvalue_internal_table_t; struct libfvalue_internal_table { /* The values array */ libfvalue_array_t *values; }; LIBFVALUE_EXTERN \ int libfvalue_table_initialize( libfvalue_table_t **table, int number_of_values, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_free( libfvalue_table_t **table, libcerror_error_t **error ); int libfvalue_table_free_as_value( intptr_t *table, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_empty( libfvalue_table_t *table, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_resize( libfvalue_table_t *table, int number_of_values, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_clone( libfvalue_table_t **destination_table, libfvalue_table_t *source_table, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_get_number_of_values( libfvalue_table_t *table, int *number_of_values, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_get_index_by_identifier( libfvalue_table_t *table, const uint8_t *identifier, size_t identifier_size, int *value_index, uint8_t flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_get_value_by_index( libfvalue_table_t *table, int value_index, libfvalue_value_t **value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_get_value_by_identifier( libfvalue_table_t *table, const uint8_t *identifier, size_t identifier_size, libfvalue_value_t **value, uint8_t flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_set_value_by_index( libfvalue_table_t *table, int value_index, libfvalue_value_t *value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_set_value( libfvalue_table_t *table, libfvalue_value_t *value, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_table_copy_from_utf8_xml_string( libfvalue_table_t *table, const uint8_t *utf8_string, size_t utf8_string_size, const uint8_t *table_name, size_t table_name_length, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_split_string.h0000644000175000017500000001061212005153164017026 00000000000000/* * Split string functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_SPLIT_STRING_H ) #define _LIBFVALUE_INTERNAL_SPLIT_STRING_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_internal_split_utf8_string libfvalue_internal_split_utf8_string_t; struct libfvalue_internal_split_utf8_string { /* The number of string segments */ int number_of_segments; /* The string */ uint8_t *string; /* The string size */ size_t string_size; /* The segments */ uint8_t **segments; /* The segment sizes */ size_t *segment_sizes; }; typedef struct libfvalue_internal_split_utf16_string libfvalue_internal_split_utf16_string_t; struct libfvalue_internal_split_utf16_string { /* The number of string segments */ int number_of_segments; /* The string */ uint16_t *string; /* The string size */ size_t string_size; /* The segments */ uint16_t **segments; /* The segment sizes */ size_t *segment_sizes; }; int libfvalue_split_utf8_string_initialize( libfvalue_split_utf8_string_t **split_string, const uint8_t *utf8_string, size_t utf8_string_size, int number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_free( libfvalue_split_utf8_string_t **split_string, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_get_string( libfvalue_split_utf8_string_t *split_string, uint8_t **utf8_string, size_t *utf8_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_get_number_of_segments( libfvalue_split_utf8_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_get_segment_by_index( libfvalue_split_utf8_string_t *split_string, int segment_index, uint8_t **utf8_string_segment, size_t *utf8_string_segment_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf8_string_set_segment_by_index( libfvalue_split_utf8_string_t *split_string, int segment_index, uint8_t *utf8_string_segment, size_t utf8_string_segment_size, libcerror_error_t **error ); int libfvalue_split_utf16_string_initialize( libfvalue_split_utf16_string_t **split_string, const uint16_t *utf16_string, size_t utf16_string_size, int number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_free( libfvalue_split_utf16_string_t **split_string, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_get_string( libfvalue_split_utf16_string_t *split_string, uint16_t **utf16_string, size_t *utf16_string_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_get_number_of_segments( libfvalue_split_utf16_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_get_segment_by_index( libfvalue_split_utf16_string_t *split_string, int segment_index, uint16_t **utf16_string_segment, size_t *utf16_string_segment_size, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_split_utf16_string_set_segment_by_index( libfvalue_split_utf16_string_t *split_string, int segment_index, uint16_t *utf16_string_segment, size_t utf16_string_segment_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_floating_point.h0000644000175000017500000001576612005153164017340 00000000000000/* * Floating point value (IEEE 754) functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_FLOATING_POINT_H ) #define _LIBFVALUE_FLOATING_POINT_H #include #include #include "libfvalue_extern.h" #include "libfvalue_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_floating_point libfvalue_floating_point_t; struct libfvalue_floating_point { /* The value */ uint64_t value; /* The value size */ size_t value_size; }; int libfvalue_floating_point_initialize( libfvalue_floating_point_t **floating_point, libcerror_error_t **error ); int libfvalue_floating_point_free( libfvalue_floating_point_t **floating_point, libcerror_error_t **error ); int libfvalue_floating_point_clone( libfvalue_floating_point_t **destination_floating_point, libfvalue_floating_point_t *source_floating_point, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_byte_stream( libfvalue_floating_point_t *floating_point, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_integer( libfvalue_floating_point_t *floating_point, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ); int libfvalue_floating_point_copy_to_integer( libfvalue_floating_point_t *floating_point, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ); int libfvalue_floating_point_get_string_size( libfvalue_floating_point_t *floating_point, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_utf8_string_with_index( libfvalue_floating_point_t *floating_point, uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_floating_point_copy_to_utf8_string_with_index( libfvalue_floating_point_t *floating_point, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_utf16_string_with_index( libfvalue_floating_point_t *floating_point, uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_floating_point_copy_to_utf16_string_with_index( libfvalue_floating_point_t *floating_point, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_floating_point_copy_from_utf32_string_with_index( libfvalue_floating_point_t *floating_point, uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); int libfvalue_floating_point_copy_to_utf32_string_with_index( libfvalue_floating_point_t *floating_point, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_string_size_from_floating_point( size_t *string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_copy_from_floating_point( uint8_t *utf8_string, size_t utf8_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_with_index_copy_from_floating_point( uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf8_string_with_index_copy_to_floating_point( uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_copy_from_floating_point( uint16_t *utf16_string, size_t utf16_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_with_index_copy_from_floating_point( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf16_string_with_index_copy_to_floating_point( uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_copy_from_floating_point( uint32_t *utf32_string, size_t utf32_string_size, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_with_index_copy_from_floating_point( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); LIBFVALUE_EXTERN \ int libfvalue_utf32_string_with_index_copy_to_floating_point( uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *floating_point_value, size_t floating_point_value_size, uint32_t string_format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_binary_data.c0000644000175000017500000007134712005153164016571 00000000000000/* * Binary data value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfvalue_binary_data.h" #include "libfvalue_definitions.h" #include "libfvalue_libcerror.h" #include "libfvalue_libuna.h" /* Initialize a binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_initialize( libfvalue_binary_data_t **binary_data, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_initialize"; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( *binary_data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid binary data value already set.", function ); return( -1 ); } *binary_data = memory_allocate_structure( libfvalue_binary_data_t ); if( *binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create binary data.", function ); goto on_error; } if( memory_set( *binary_data, 0, sizeof( libfvalue_binary_data_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear binary data.", function ); goto on_error; } return( 1 ); on_error: if( *binary_data != NULL ) { memory_free( *binary_data ); *binary_data = NULL; } return( -1 ); } /* Frees a binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_free( libfvalue_binary_data_t **binary_data, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_free"; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( *binary_data != NULL ) { memory_free( *binary_data ); *binary_data = NULL; } return( 1 ); } /* Clones a binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_clone( libfvalue_binary_data_t **destination_binary_data, libfvalue_binary_data_t *source_binary_data, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_clone"; if( destination_binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination binary data.", function ); return( -1 ); } if( *destination_binary_data != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination binary data already set.", function ); return( -1 ); } if( source_binary_data == NULL ) { *destination_binary_data = NULL; return( 1 ); } *destination_binary_data = memory_allocate_structure( libfvalue_binary_data_t ); if( *destination_binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination binary data.", function ); goto on_error; } if( memory_copy( *destination_binary_data, source_binary_data, sizeof( libfvalue_binary_data_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy binary data.", function ); goto on_error; } return( 1 ); on_error: if( *destination_binary_data != NULL ) { memory_free( *destination_binary_data ); *destination_binary_data = NULL; } return( -1 ); } /* Copies the binary data from a byte stream * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_copy_from_byte_stream( libfvalue_binary_data_t *binary_data, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_copy_from_byte_stream"; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( encoding != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); return( -1 ); } binary_data->data = byte_stream; binary_data->data_size = byte_stream_size; return( 1 ); } /* Retrieves the size of a string of the binary data * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_get_string_size( libfvalue_binary_data_t *binary_data, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_get_string_size"; uint32_t format_flags = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_LOWER | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_UPPER; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( ( binary_data->data == NULL ) || ( binary_data->data_size == 0 ) ) { if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } *string_size = 1; } else switch( string_format_type ) { case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16: format_flags = LIBUNA_BASE16_VARIANT_CASE_UPPER | LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE; if( libuna_base16_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, string_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of string of base16 formatted binary data.", function ); return( -1 ); } break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32: format_flags = LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED; if( libuna_base32_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, string_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of string of base32 formatted binary data.", function ); return( -1 ); } break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64: format_flags = LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED; if( libuna_base64_stream_size_from_byte_stream( binary_data->data, binary_data->data_size, string_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine size of string of base64 formatted binary data.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the binary data to an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_copy_to_utf8_string_with_index( libfvalue_binary_data_t *binary_data, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_copy_to_utf8_string_with_index"; uint32_t format_flags = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_LOWER | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_UPPER; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( ( binary_data->data == NULL ) || ( binary_data->data_size == 0 ) ) { if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string is too small.", function ); return( -1 ); } utf8_string[ *utf8_string_index ] = 0; *utf8_string_index += 1; } else switch( string_format_type ) { case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16: format_flags = LIBUNA_BASE16_VARIANT_CASE_UPPER | LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE; if( libuna_base16_stream_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, utf8_string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base16 formatted binary data to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32: format_flags = LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED; if( libuna_base32_stream_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, utf8_string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base32 formatted binary data to UTF-8 string.", function ); return( -1 ); } break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64: format_flags = LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED; if( libuna_base64_stream_with_index_copy_from_byte_stream( utf8_string, utf8_string_size, utf8_string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base64 formatted binary data to UTF-8 string.", function ); return( -1 ); } break; } return( 1 ); } /* Copies the binary data to an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_copy_to_utf16_string_with_index( libfvalue_binary_data_t *binary_data, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_copy_to_utf16_string_with_index"; size_t string_index = 0; uint32_t format_flags = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_LOWER | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_UPPER; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( ( binary_data->data == NULL ) || ( binary_data->data_size == 0 ) ) { if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string is too small.", function ); return( -1 ); } utf16_string[ *utf16_string_index ] = 0; *utf16_string_index += 1; } else switch( string_format_type ) { case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16: format_flags = LIBUNA_BASE16_VARIANT_CASE_UPPER | LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE; if( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } string_index = *utf16_string_index * sizeof( uint16_t ); if( libuna_base16_stream_with_index_copy_from_byte_stream( (uint8_t *) utf16_string, utf16_string_size, &string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base16 formatted binary data to UTF-16 string.", function ); return( -1 ); } *utf16_string_index = string_index / sizeof( uint16_t ); break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32: format_flags = LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED; if( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } string_index = *utf16_string_index * sizeof( uint16_t ); if( libuna_base32_stream_with_index_copy_from_byte_stream( (uint8_t *) utf16_string, utf16_string_size, &string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base32 formatted binary data to UTF-16 string.", function ); return( -1 ); } *utf16_string_index = string_index / sizeof( uint16_t ); break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64: format_flags = LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED; if( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } string_index = *utf16_string_index * sizeof( uint16_t ); if( libuna_base64_stream_with_index_copy_from_byte_stream( (uint8_t *) utf16_string, utf16_string_size, &string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base64 formatted binary data to UTF-16 string.", function ); return( -1 ); } *utf16_string_index = string_index / sizeof( uint16_t ); break; } return( 1 ); } /* Copies the binary data to an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_binary_data_copy_to_utf32_string_with_index( libfvalue_binary_data_t *binary_data, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_binary_data_copy_to_utf32_string_with_index"; size_t string_index = 0; uint32_t format_flags = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; if( binary_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid binary data.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_LOWER | LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_UPPER; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32 ) && ( string_format_type != LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( ( binary_data->data == NULL ) || ( binary_data->data_size == 0 ) ) { if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string is too small.", function ); return( -1 ); } utf32_string[ *utf32_string_index ] = 0; *utf32_string_index += 1; } else switch( string_format_type ) { case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16: format_flags = LIBUNA_BASE16_VARIANT_CASE_UPPER | LIBUNA_BASE16_VARIANT_CHARACTER_LIMIT_NONE; if( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE16_VARIANT_ENCODING_UTF32_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE16_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } string_index = *utf32_string_index * sizeof( uint32_t ); if( libuna_base16_stream_with_index_copy_from_byte_stream( (uint8_t *) utf32_string, utf32_string_size, &string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base16 formatted binary data to UTF-32 string.", function ); return( -1 ); } *utf32_string_index = string_index / sizeof( uint32_t ); break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32: format_flags = LIBUNA_BASE32_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE32_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE32_VARIANT_PADDING_REQUIRED; if( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF32_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE32_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } string_index = *utf32_string_index * sizeof( uint32_t ); if( libuna_base32_stream_with_index_copy_from_byte_stream( (uint8_t *) utf32_string, utf32_string_size, &string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base32 formatted binary data to UTF-32 string.", function ); return( -1 ); } *utf32_string_index = string_index / sizeof( uint32_t ); break; case LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64: format_flags = LIBUNA_BASE64_VARIANT_ALPHABET_NORMAL | LIBUNA_BASE64_VARIANT_CHARACTER_LIMIT_NONE | LIBUNA_BASE64_VARIANT_PADDING_REQUIRED; if( _BYTE_STREAM_HOST_IS_ENDIAN_BIG ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF32_BIG_ENDIAN; } else if( _BYTE_STREAM_HOST_IS_ENDIAN_LITTLE ) { format_flags |= LIBUNA_BASE64_VARIANT_ENCODING_UTF32_LITTLE_ENDIAN; } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported host byte order.", function ); return( -1 ); } string_index = *utf32_string_index * sizeof( uint32_t ); if( libuna_base64_stream_with_index_copy_from_byte_stream( (uint8_t *) utf32_string, utf32_string_size, &string_index, binary_data->data, binary_data->data_size, format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base64 formatted binary data to UTF-32 string.", function ); return( -1 ); } *utf32_string_index = string_index / sizeof( uint32_t ); break; } return( 1 ); } libpff-20120802/libfvalue/libfvalue_integer.c0000644000175000017500000020712512005153164015744 00000000000000/* * Integer value functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "libfvalue_definitions.h" #include "libfvalue_integer.h" #include "libfvalue_libcerror.h" /* Initialize an integer * Returns 1 if successful or -1 on error */ int libfvalue_integer_initialize( libfvalue_integer_t **integer, libcerror_error_t **error ) { static char *function = "libfvalue_integer_initialize"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( *integer != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid integer value already set.", function ); return( -1 ); } *integer = memory_allocate_structure( libfvalue_integer_t ); if( *integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create integer.", function ); goto on_error; } if( memory_set( *integer, 0, sizeof( libfvalue_integer_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear integer.", function ); goto on_error; } return( 1 ); on_error: if( *integer != NULL ) { memory_free( *integer ); *integer = NULL; } return( -1 ); } /* Frees an integer * Returns 1 if successful or -1 on error */ int libfvalue_integer_free( libfvalue_integer_t **integer, libcerror_error_t **error ) { static char *function = "libfvalue_integer_free"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( *integer != NULL ) { memory_free( *integer ); *integer = NULL; } return( 1 ); } /* Clones an integer * Returns 1 if successful or -1 on error */ int libfvalue_integer_clone( libfvalue_integer_t **destination_integer, libfvalue_integer_t *source_integer, libcerror_error_t **error ) { static char *function = "libfvalue_integer_clone"; if( destination_integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination integer.", function ); return( -1 ); } if( *destination_integer != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination integer already set.", function ); return( -1 ); } if( source_integer == NULL ) { *destination_integer = NULL; return( 1 ); } *destination_integer = memory_allocate_structure( libfvalue_integer_t ); if( *destination_integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination integer.", function ); goto on_error; } if( memory_copy( *destination_integer, source_integer, sizeof( libfvalue_integer_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy integer.", function ); goto on_error; } return( 1 ); on_error: if( *destination_integer != NULL ) { memory_free( *destination_integer ); *destination_integer = NULL; } return( -1 ); } /* Copies the integer from a byte stream * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_byte_stream( libfvalue_integer_t *integer, const uint8_t *byte_stream, size_t byte_stream_size, int encoding, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_byte_stream"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( byte_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid byte stream.", function ); return( -1 ); } if( byte_stream_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid byte stream size value exceeds maximum.", function ); return( -1 ); } if( ( encoding != LIBFVALUE_ENDIAN_BIG ) && ( encoding != LIBFVALUE_ENDIAN_LITTLE ) && ( encoding != LIBFVALUE_ENDIAN_NATIVE ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported encoding.", function ); return( -1 ); } switch( byte_stream_size ) { case 1: integer->value = (uint64_t) *( (uint8_t *) byte_stream ); break; case 2: if( encoding == LIBFVALUE_ENDIAN_BIG ) { byte_stream_copy_to_uint16_big_endian( byte_stream, integer->value ); } else if( encoding == LIBFVALUE_ENDIAN_LITTLE ) { byte_stream_copy_to_uint16_little_endian( byte_stream, integer->value ); } else { integer->value = (uint64_t) *( (uint16_t *) byte_stream ); } break; case 4: if( encoding == LIBFVALUE_ENDIAN_BIG ) { byte_stream_copy_to_uint32_big_endian( byte_stream, integer->value ); } else if( encoding == LIBFVALUE_ENDIAN_LITTLE ) { byte_stream_copy_to_uint32_little_endian( byte_stream, integer->value ); } else { integer->value = (uint64_t) *( (uint32_t *) byte_stream ); } break; case 8: if( encoding == LIBFVALUE_ENDIAN_BIG ) { byte_stream_copy_to_uint64_big_endian( byte_stream, integer->value ); } else if( encoding == LIBFVALUE_ENDIAN_LITTLE ) { byte_stream_copy_to_uint64_little_endian( byte_stream, integer->value ); } else { integer->value = (uint64_t) *( (uint64_t *) byte_stream ); } break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported byte stream size: %" PRIzd ".", function, byte_stream_size ); return( -1 ); } integer->value_size = byte_stream_size * 8; return( 1 ); } /* Copies the integer from an integer value * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_integer( libfvalue_integer_t *integer, uint64_t integer_value, size_t integer_value_size, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_integer"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } integer->value = integer_value; integer->value_size = integer_value_size; return( 1 ); } /* Copies the integer to an integer value * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_integer( libfvalue_integer_t *integer, uint64_t *integer_value, size_t *integer_value_size, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_integer"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( integer_value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value size.", function ); return( -1 ); } *integer_value = integer->value; *integer_value_size = integer->value_size; return( 1 ); } /* Retrieves the size of a string of the integer * Returns 1 if successful or -1 on error */ int libfvalue_integer_get_string_size( libfvalue_integer_t *integer, size_t *string_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_get_string_size"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_string_size_from_integer( string_size, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to determine size of string of %" PRIzd "-bit integer.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer from an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_utf8_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_to_integer( utf8_string, utf8_string_size, utf8_string_index, &( integer->value ), integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer from UTF-8 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer to an UTF-8 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_utf8_string_with_index( libfvalue_integer_t *integer, uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_utf8_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf8_string_with_index_copy_from_integer( utf8_string, utf8_string_size, utf8_string_index, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer to UTF-8 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer from an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_utf16_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_to_integer( utf16_string, utf16_string_size, utf16_string_index, &( integer->value ), integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer from UTF-16 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer to an UTF-16 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_utf16_string_with_index( libfvalue_integer_t *integer, uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_utf16_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf16_string_with_index_copy_from_integer( utf16_string, utf16_string_size, utf16_string_index, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer to UTF-16 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer from an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_from_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_from_utf32_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_to_integer( utf32_string, utf32_string_size, utf32_string_index, &( integer->value ), integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer from UTF-32 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Copies the integer to an UTF-32 encoded string * Returns 1 if successful or -1 on error */ int libfvalue_integer_copy_to_utf32_string_with_index( libfvalue_integer_t *integer, uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_integer_copy_to_utf32_string_with_index"; if( integer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer.", function ); return( -1 ); } if( libfvalue_utf32_string_with_index_copy_from_integer( utf32_string, utf32_string_size, utf32_string_index, integer->value, integer->value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy %" PRIzd "-bit integer to UTF-32 string.", function, integer->value_size ); return( -1 ); } return( 1 ); } /* Determines the size of a string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_string_size_from_integer( size_t *string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_string_size_from_integer"; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t is_signed = 0; int8_t bit_shift = 0; if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { *string_size = 6; } else { *string_size = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { *string_size = ( integer_value_size >> 2 ) + 1; if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { *string_size += 2; } } else { /* The string is at least a single digit with an end of string character */ *string_size = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { is_signed = (uint8_t) ( integer_value >> bit_shift ); if( is_signed != 0 ) { *string_size += 1; integer_value &= ~( (uint64_t) 1 << bit_shift ); if( integer_value == 0 ) { integer_value |= (uint64_t) 1 << bit_shift; } } } divider = 1; while( ( integer_value / divider ) >= 10 ) { divider *= 10; *string_size += 1; } } return( 1 ); } /* Copies an UTF-8 encoded string from an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_copy_from_integer( uint8_t *utf8_string, size_t utf8_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_copy_from_integer"; size_t utf8_string_index = 0; if( libfvalue_utf8_string_with_index_copy_from_integer( utf8_string, utf8_string_size, &utf8_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy integer value to UTF-8 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 encoded string of from integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_from_integer( uint8_t *utf8_string, size_t utf8_string_size, size_t *utf8_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_with_index_copy_from_integer"; size_t string_index = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t is_signed = 0; uint8_t number_of_characters = 0; int8_t bit_shift = 0; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { number_of_characters = 6; } else { number_of_characters = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( integer_value_size >> 2 ) + 1; if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { number_of_characters += 2; } } else { /* The string is at least a single digit with an end of string character */ number_of_characters = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { is_signed = (uint8_t) ( integer_value >> bit_shift ); if( is_signed != 0 ) { number_of_characters += 1; integer_value &= ~( (uint64_t) 1 << bit_shift ); if( integer_value == 0 ) { integer_value |= (uint64_t) 1 << bit_shift; } } } divider = 1; while( ( integer_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } } if( ( string_index + number_of_characters ) > utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { utf8_string[ string_index++ ] = (uint8_t) 'f'; utf8_string[ string_index++ ] = (uint8_t) 'a'; utf8_string[ string_index++ ] = (uint8_t) 'l'; utf8_string[ string_index++ ] = (uint8_t) 's'; utf8_string[ string_index++ ] = (uint8_t) 'e'; } else { utf8_string[ string_index++ ] = (uint8_t) 't'; utf8_string[ string_index++ ] = (uint8_t) 'r'; utf8_string[ string_index++ ] = (uint8_t) 'u'; utf8_string[ string_index++ ] = (uint8_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf8_string[ string_index++ ] = (uint8_t) '0'; utf8_string[ string_index++ ] = (uint8_t) 'x'; } bit_shift = (uint8_t) ( integer_value_size - 4 ); do { byte_value = (uint8_t) ( ( integer_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + byte_value; } else { utf8_string[ string_index++ ] = (uint8_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf8_string[ string_index++ ] = (uint8_t) '-'; } while( divider > 1 ) { utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf8_string[ string_index++ ] = (uint8_t) '0' + (uint8_t) ( integer_value / divider ); } utf8_string[ string_index++ ] = 0; *utf8_string_index = string_index; return( 1 ); } /* Copies an UTF-8 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_copy_to_integer"; size_t utf8_string_index = 0; if( libfvalue_utf8_string_with_index_copy_to_integer( utf8_string, utf8_string_length, &utf8_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-8 string to integer value.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-8 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf8_string_with_index_copy_to_integer( const uint8_t *utf8_string, size_t utf8_string_length, size_t *utf8_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf8_string_with_index_copy_to_integer"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t divider = 0; uint64_t value_64bit = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string index.", function ); return( -1 ); } if( *utf8_string_index >= utf8_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-8 string index value out of bounds.", function ); return( -1 ); } string_index = *utf8_string_index; if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { maximum_string_index = 5; } else { maximum_string_index = 4; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( integer_value_size >> 2 ); if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { maximum_string_index += 2; } } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { /* TODO */ } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { if( utf8_string[ string_index ] != (uint8_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf8_string[ string_index ] != (uint8_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } string_index++; } while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf8_string[ string_index ] >= (uint8_t) '0' ) && ( utf8_string[ string_index ] <= (uint8_t) '9' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'A' ) && ( utf8_string[ string_index ] <= (uint8_t) 'F' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'A' + 10 ); } else if( ( utf8_string[ string_index ] >= (uint8_t) 'a' ) && ( utf8_string[ string_index ] <= (uint8_t) 'f' ) ) { byte_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { /* In the maximum possible string one character is substituted for the sign */ if( utf8_string[ string_index ] == (uint8_t) '-' ) { string_index++; sign = -1; } else if( utf8_string[ string_index ] == (uint8_t) '+' ) { string_index++; } } while( string_index < utf8_string_length ) { if( utf8_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf8_string[ string_index ] < (uint8_t) '0' ) && ( utf8_string[ string_index ] > (uint8_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x02%" PRIx8 " at index: %d.", function, utf8_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf8_string[ string_index ] - (uint8_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf8_string_index = string_index; *integer_value = value_64bit; return( 1 ); } /* Copies an UTF-16 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_copy_from_integer"; size_t utf16_string_index = 0; if( libfvalue_utf16_string_with_index_copy_from_integer( utf16_string, utf16_string_size, &utf16_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy integer value to UTF-16 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_from_integer( uint16_t *utf16_string, size_t utf16_string_size, size_t *utf16_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_with_index_copy_from_integer"; size_t string_index = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t is_signed = 0; uint8_t number_of_characters = 0; int8_t bit_shift = 0; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { number_of_characters = 6; } else { number_of_characters = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( integer_value_size >> 2 ) + 1; if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { number_of_characters += 2; } } else { /* The string is at least a single digit with an end of string character */ number_of_characters = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { is_signed = (uint8_t) ( integer_value >> bit_shift ); if( is_signed != 0 ) { number_of_characters += 1; integer_value &= ~( (uint64_t) 1 << bit_shift ); if( integer_value == 0 ) { integer_value |= (uint64_t) 1 << bit_shift; } } } divider = 1; while( ( integer_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } } if( ( string_index + number_of_characters ) > utf16_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-16 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { utf16_string[ string_index++ ] = (uint16_t) 'f'; utf16_string[ string_index++ ] = (uint16_t) 'a'; utf16_string[ string_index++ ] = (uint16_t) 'l'; utf16_string[ string_index++ ] = (uint16_t) 's'; utf16_string[ string_index++ ] = (uint16_t) 'e'; } else { utf16_string[ string_index++ ] = (uint16_t) 't'; utf16_string[ string_index++ ] = (uint16_t) 'r'; utf16_string[ string_index++ ] = (uint16_t) 'u'; utf16_string[ string_index++ ] = (uint16_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf16_string[ string_index++ ] = (uint16_t) '0'; utf16_string[ string_index++ ] = (uint16_t) 'x'; } bit_shift = (uint8_t) ( integer_value_size - 4 ); do { byte_value = (uint16_t) ( ( integer_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + byte_value; } else { utf16_string[ string_index++ ] = (uint16_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf16_string[ string_index++ ] = (uint16_t) '-'; } while( divider > 1 ) { utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf16_string[ string_index++ ] = (uint16_t) '0' + (uint16_t) ( integer_value / divider ); } utf16_string[ string_index++ ] = 0; *utf16_string_index = string_index; return( 1 ); } /* Copies an UTF-16 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_copy_to_integer"; size_t utf16_string_index = 0; if( libfvalue_utf16_string_with_index_copy_to_integer( utf16_string, utf16_string_length, &utf16_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-16 string to integer value.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-16 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf16_string_with_index_copy_to_integer( const uint16_t *utf16_string, size_t utf16_string_length, size_t *utf16_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf16_string_with_index_copy_to_integer"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf16_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string.", function ); return( -1 ); } if( utf16_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-16 string size value exceeds maximum.", function ); return( -1 ); } if( utf16_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-16 string index.", function ); return( -1 ); } if( *utf16_string_index >= utf16_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-16 string index value out of bounds.", function ); return( -1 ); } string_index = *utf16_string_index; if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { maximum_string_index = 5; } else { maximum_string_index = 4; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( integer_value_size >> 2 ); if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { maximum_string_index += 2; } } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { /* TODO */ } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { if( utf16_string[ string_index ] != (uint16_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf16_string[ string_index ] != (uint16_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } string_index++; } while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf16_string[ string_index ] >= (uint16_t) '0' ) && ( utf16_string[ string_index ] <= (uint16_t) '9' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'A' ) && ( utf16_string[ string_index ] <= (uint16_t) 'F' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'A' + 10 ); } else if( ( utf16_string[ string_index ] >= (uint16_t) 'a' ) && ( utf16_string[ string_index ] <= (uint16_t) 'f' ) ) { byte_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { /* In the maximum possible string one character is substituted for the sign */ if( utf16_string[ string_index ] == (uint16_t) '-' ) { string_index++; sign = -1; } else if( utf16_string[ string_index ] == (uint16_t) '+' ) { string_index++; } } while( string_index < utf16_string_length ) { if( utf16_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf16_string[ string_index ] < (uint16_t) '0' ) && ( utf16_string[ string_index ] > (uint16_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x04%" PRIx16 " at index: %d.", function, utf16_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf16_string[ string_index ] - (uint16_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf16_string_index = string_index; *integer_value = value_64bit; return( 1 ); } /* Copies an UTF-32 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_copy_from_integer"; size_t utf32_string_index = 0; if( libfvalue_utf32_string_with_index_copy_from_integer( utf32_string, utf32_string_size, &utf32_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy integer value to UTF-32 string.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 encoded string of an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_from_integer( uint32_t *utf32_string, size_t utf32_string_size, size_t *utf32_string_index, uint64_t integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_with_index_copy_from_integer"; size_t string_index = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t is_signed = 0; uint8_t number_of_characters = 0; int8_t bit_shift = 0; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { number_of_characters = 6; } else { number_of_characters = 5; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { number_of_characters = (uint8_t) ( integer_value_size >> 2 ) + 1; if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { number_of_characters += 2; } } else { /* The string is at least a single digit with an end of string character */ number_of_characters = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { is_signed = (uint8_t) ( integer_value >> bit_shift ); if( is_signed != 0 ) { number_of_characters += 1; integer_value &= ~( (uint64_t) 1 << bit_shift ); if( integer_value == 0 ) { integer_value |= (uint64_t) 1 << bit_shift; } } } divider = 1; while( ( integer_value / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } } if( ( string_index + number_of_characters ) > utf32_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-32 string size too small.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { utf32_string[ string_index++ ] = (uint32_t) 'f'; utf32_string[ string_index++ ] = (uint32_t) 'a'; utf32_string[ string_index++ ] = (uint32_t) 'l'; utf32_string[ string_index++ ] = (uint32_t) 's'; utf32_string[ string_index++ ] = (uint32_t) 'e'; } else { utf32_string[ string_index++ ] = (uint32_t) 't'; utf32_string[ string_index++ ] = (uint32_t) 'r'; utf32_string[ string_index++ ] = (uint32_t) 'u'; utf32_string[ string_index++ ] = (uint32_t) 'e'; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { utf32_string[ string_index++ ] = (uint32_t) '0'; utf32_string[ string_index++ ] = (uint32_t) 'x'; } bit_shift = (uint8_t) ( integer_value_size - 4 ); do { byte_value = (uint32_t) ( ( integer_value >> bit_shift ) & 0x0f ); if( byte_value <= 9 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + byte_value; } else { utf32_string[ string_index++ ] = (uint32_t) 'a' + byte_value - 10; } bit_shift -= 4; } while( bit_shift >= 0 ); } else { if( is_signed != 0 ) { utf32_string[ string_index++ ] = (uint32_t) '-'; } while( divider > 1 ) { utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( integer_value / divider ); integer_value %= divider; divider /= 10; } utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( integer_value / divider ); } utf32_string[ string_index++ ] = 0; *utf32_string_index = string_index; return( 1 ); } /* Copies an UTF-32 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_copy_to_integer"; size_t utf32_string_index = 0; if( libfvalue_utf32_string_with_index_copy_to_integer( utf32_string, utf32_string_length, &utf32_string_index, integer_value, integer_value_size, string_format_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy UTF-32 string to integer value.", function ); return( -1 ); } return( 1 ); } /* Copies an UTF-32 encoded string to an integer value * The integer value size is in bits * Returns 1 if successful or -1 on error */ int libfvalue_utf32_string_with_index_copy_to_integer( const uint32_t *utf32_string, size_t utf32_string_length, size_t *utf32_string_index, uint64_t *integer_value, size_t integer_value_size, uint32_t string_format_flags, libcerror_error_t **error ) { static char *function = "libfvalue_utf32_string_with_index_copy_to_integer"; size_t maximum_string_index = 0; size_t string_index = 0; uint64_t value_64bit = 0; uint64_t divider = 0; uint32_t string_format_type = 0; uint32_t supported_flags = 0; uint8_t byte_value = 0; uint8_t character_value = 0; int8_t bit_shift = 0; int8_t sign = 1; if( utf32_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string.", function ); return( -1 ); } if( utf32_string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-32 string size value exceeds maximum.", function ); return( -1 ); } if( utf32_string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-32 string index.", function ); return( -1 ); } if( *utf32_string_index >= utf32_string_length ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid UTF-32 string index value out of bounds.", function ); return( -1 ); } string_index = *utf32_string_index; if( integer_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid integer value.", function ); return( -1 ); } if( ( integer_value_size != 8 ) && ( integer_value_size != 16 ) && ( integer_value_size != 32 ) && ( integer_value_size != 64 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported integer value size.", function ); return( -1 ); } supported_flags = 0x000000ffUL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED | LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR; if( ( string_format_flags & ~( supported_flags ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format flags: 0x%08" PRIx32 ".", function, string_format_flags ); return( -1 ); } string_format_type = string_format_flags & 0x000000ffUL; if( ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) && ( string_format_type != LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported string format type.", function ); return( -1 ); } if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { if( integer_value == 0 ) { maximum_string_index = 5; } else { maximum_string_index = 4; } } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { maximum_string_index = (size_t) ( integer_value_size >> 2 ); if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { maximum_string_index += 2; } } else { /* The string is at least a single digit with an end of string character */ maximum_string_index = 2; bit_shift = (uint8_t) ( integer_value_size - 1 ); divider = 1; value_64bit = ~( ( ~( (uint64_t) 1 << bit_shift ) >> bit_shift ) << bit_shift ); while( ( value_64bit / divider ) >= 10 ) { divider *= 10; maximum_string_index += 1; } } maximum_string_index += string_index; if( maximum_string_index > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid maximum string index value exceeds maximum.", function ); return( -1 ); } value_64bit = 0; if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN ) { /* TODO */ } else if( string_format_type == LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL ) { if( ( supported_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR ) == 0 ) { if( utf32_string[ string_index ] != (uint32_t) '0' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; if( utf32_string[ string_index ] != (uint32_t) 'x' ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } string_index++; } while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit <<= 4; if( ( utf32_string[ string_index ] >= (uint32_t) '0' ) && ( utf32_string[ string_index ] <= (uint32_t) '9' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'A' ) && ( utf32_string[ string_index ] <= (uint32_t) 'F' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'A' + 10 ); } else if( ( utf32_string[ string_index ] >= (uint32_t) 'a' ) && ( utf32_string[ string_index ] <= (uint32_t) 'f' ) ) { byte_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) 'a' + 10 ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } value_64bit += byte_value; string_index++; } } else { if( ( string_format_flags & LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED ) != 0 ) { /* In the maximum possible string one character is substituted for the sign */ if( utf32_string[ string_index ] == (uint32_t) '-' ) { string_index++; sign = -1; } else if( utf32_string[ string_index ] == (uint32_t) '+' ) { string_index++; } } while( string_index < utf32_string_length ) { if( utf32_string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } value_64bit *= 10; if( ( utf32_string[ string_index ] < (uint32_t) '0' ) && ( utf32_string[ string_index ] > (uint32_t) '9' ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: 0x08%" PRIx32 " at index: %d.", function, utf32_string[ string_index ], string_index ); return( -1 ); } character_value = (uint8_t) ( utf32_string[ string_index ] - (uint32_t) '0' ); value_64bit += character_value; string_index++; } if( sign == -1 ) { value_64bit |= (uint64_t) 1 << bit_shift; } } *utf32_string_index = string_index; *integer_value = value_64bit; return( 1 ); } libpff-20120802/libfvalue/libfvalue_data_handle.h0000644000175000017500000000612412005153164016534 00000000000000/* * Data handle functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_INTERNAL_DATA_HANDLE_H ) #define _LIBFVALUE_INTERNAL_DATA_HANDLE_H #include #include #include "libfvalue_array_type.h" #include "libfvalue_libcerror.h" #include "libfvalue_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfvalue_internal_data_handle libfvalue_internal_data_handle_t; struct libfvalue_internal_data_handle { /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The encoding */ int encoding; /* The value entries array */ libfvalue_array_t *value_entries; /* The flags */ uint8_t flags; }; int libfvalue_data_handle_initialize( libfvalue_data_handle_t **data_handle, libcerror_error_t **error ); int libfvalue_data_handle_free( libfvalue_data_handle_t **data_handle, libcerror_error_t **error ); int libfvalue_data_handle_clone( libfvalue_data_handle_t **destination_data_handle, libfvalue_data_handle_t *source_data_handle, libcerror_error_t **error ); int libfvalue_data_handle_get_data( libfvalue_data_handle_t *data_handle, uint8_t **data, size_t *data_size, int *encoding, libcerror_error_t **error ); int libfvalue_data_handle_set_data( libfvalue_data_handle_t *data_handle, const uint8_t *data, size_t data_size, int encoding, uint8_t flags, libcerror_error_t **error ); int libfvalue_data_handle_get_number_of_value_entries( libfvalue_data_handle_t *data_handle, int *number_of_value_entries, libcerror_error_t **error ); int libfvalue_data_handle_get_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, uint8_t **value_entry_data, size_t *value_entry_data_size, int *encoding, libcerror_error_t **error ); int libfvalue_data_handle_set_value_entry( libfvalue_data_handle_t *data_handle, int value_entry_index, const uint8_t *value_entry_data, size_t value_entry_data_size, int encoding, libcerror_error_t **error ); int libfvalue_data_handle_append_value_entry( libfvalue_data_handle_t *data_handle, int *value_entry_index, const uint8_t *value_entry_data, size_t value_entry_data_size, int encoding, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfvalue/libfvalue_definitions.h0000644000175000017500000001546212005153164016630 00000000000000/* * The internal definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBFVALUE_INTERNAL_DEFINITIONS_H ) #define LIBFVALUE_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if !defined( HAVE_LOCAL_LIBFVALUE ) #include /* The definitions in are copied here * for local use of libfvalue */ #else #include #define LIBFVALUE_VERSION 20120712 /* The libfvalue version string */ #define LIBFVALUE_VERSION_STRING "20120712" /* The endian definitions */ #define LIBFVALUE_ENDIAN_BIG _BYTE_STREAM_ENDIAN_BIG #define LIBFVALUE_ENDIAN_LITTLE _BYTE_STREAM_ENDIAN_LITTLE #define LIBFVALUE_ENDIAN_NATIVE (uint8_t) 'n' /* The value identifier flags definitions */ enum LIBFVALUE_VALUE_IDENTIFIER_FLAGS { /* The identifier is not managed by the value * * if LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED is not set * the identifier is expected to be available * during the life-time of the value * * if LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED is set * a copy of the identifier will be managed by the value */ LIBFVALUE_VALUE_IDENTIFIER_FLAG_NON_MANAGED = 0x00, /* The identifier is managed by the value * This will also set LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED in the value */ LIBFVALUE_VALUE_IDENTIFIER_FLAG_MANAGED = 0x01, /* The identifier is not cloned, but passed as a reference */ LIBFVALUE_VALUE_IDENTIFIER_FLAG_CLONE_BY_REFERENCE = 0x10 }; /* The value data flags definitions */ enum LIBFVALUE_VALUE_DATA_FLAGS { /* The data is not managed by the value * * if LIBFVALUE_VALUE_FLAG_DATA_MANAGED is not set * the data is expected to be available * during the life-time of the value * * if LIBFVALUE_VALUE_FLAG_DATA_MANAGED is set * a copy of the data will be managed by the value */ LIBFVALUE_VALUE_DATA_FLAG_NON_MANAGED = 0x00, /* The data is managed by the value * This will also set LIBFVALUE_VALUE_FLAG_DATA_MANAGED in the value */ LIBFVALUE_VALUE_DATA_FLAG_MANAGED = 0x02, /* The data is not cloned, but passed as a reference */ LIBFVALUE_VALUE_DATA_FLAG_CLONE_BY_REFERENCE = 0x10 }; /* The value class definitions */ enum LIBFVALUE_VALUE_CLASSES { LIBFVALUE_VALUE_CLASS_UNDEFINED = 0, LIBFVALUE_VALUE_CLASS_BINARY, LIBFVALUE_VALUE_CLASS_BOOLEAN, LIBFVALUE_VALUE_CLASS_DATETIME, LIBFVALUE_VALUE_CLASS_ENUMERATION, LIBFVALUE_VALUE_CLASS_FLOATING_POINT, LIBFVALUE_VALUE_CLASS_INTEGER, LIBFVALUE_VALUE_CLASS_STRING }; /* The value type definitions */ enum LIBFVALUE_VALUE_TYPES { LIBFVALUE_VALUE_TYPE_UNDEFINED = 0, LIBFVALUE_VALUE_TYPE_BINARY_DATA, LIBFVALUE_VALUE_TYPE_BOOLEAN, LIBFVALUE_VALUE_TYPE_ENUMERATION, LIBFVALUE_VALUE_TYPE_INTEGER_8BIT, LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_8BIT, LIBFVALUE_VALUE_TYPE_INTEGER_16BIT, LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_16BIT, LIBFVALUE_VALUE_TYPE_INTEGER_32BIT, LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT, LIBFVALUE_VALUE_TYPE_INTEGER_64BIT, LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_64BIT, LIBFVALUE_VALUE_TYPE_FLOATING_POINT_32BIT, LIBFVALUE_VALUE_TYPE_FLOATING_POINT_64BIT, LIBFVALUE_VALUE_TYPE_STRING_BYTE_STREAM, LIBFVALUE_VALUE_TYPE_STRING_UTF8, LIBFVALUE_VALUE_TYPE_STRING_UTF16, LIBFVALUE_VALUE_TYPE_STRING_UTF32, LIBFVALUE_VALUE_TYPE_FAT_DATE_TIME, LIBFVALUE_VALUE_TYPE_FILETIME, LIBFVALUE_VALUE_TYPE_FLOATINGTIME, LIBFVALUE_VALUE_TYPE_NSF_TIMEDATE, LIBFVALUE_VALUE_TYPE_HFSTIME, LIBFVALUE_VALUE_TYPE_POSIX_TIME, LIBFVALUE_VALUE_TYPE_SYSTEMTIME, LIBFVALUE_VALUE_TYPE_GUID, LIBFVALUE_VALUE_TYPE_NT_SECURITY_IDENTIFIER }; /* The binary data value format flags */ enum LIBFVALUE_BINARY_DATA_FORMAT_FLAGS { LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE16 = 0x00000001UL, LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE32 = 0x00000002UL, LIBFVALUE_BINARY_DATA_FORMAT_TYPE_BASE64 = 0x00000003UL, LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_LOWER = 0x00000100UL, LIBFVALUE_BINARY_DATA_FORMAT_FLAG_CASE_UPPER = 0x00000200UL, }; /* The floating point value format flags */ enum LIBFVALUE_FLOATING_POINT_FORMAT_FLAGS { LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_DECIMAL = 0x00000001UL, LIBFVALUE_FLOATING_POINT_FORMAT_TYPE_HEXADECIMAL = 0x00000002UL }; /* The integer value format flags */ enum LIBFVALUE_INTEGER_FORMAT_FLAGS { LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL = 0x00000001UL, LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL = 0x00000002UL, LIBFVALUE_INTEGER_FORMAT_TYPE_BOOLEAN = 0x00000003UL, LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED = 0x00000100UL, LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED = 0x00000200UL, /* The integer has no base indicator e.g. 0x */ LIBFVALUE_INTEGER_FORMAT_FLAG_NO_BASE_INDICATOR = 0x00010000UL }; #define LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_SIGNED \ LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL | LIBFVALUE_INTEGER_FORMAT_FLAG_SIGNED #define LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_UNSIGNED \ LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL | LIBFVALUE_INTEGER_FORMAT_FLAG_UNSIGNED /* The table flag definitions */ enum LIBFVALUE_TABLE_FLAGS { /* Allow a partial match of the identifier */ LIBFVALUE_TABLE_FLAG_ALLOW_PARTIAL_MATCH = 0x01 }; /* The print flags definitions */ enum LIBFVALUE_PRINT_FLAGS { /* Print the value with a type description */ LIBFVALUE_PRINT_FLAG_WITH_TYPE_DESCRIPTION = 0x01 }; #endif /* The value flags definitions */ enum LIBFVALUE_VALUE_FLAGS { /* The identifier is not managed by the value * the identifier is expected to be available * during the life-time of the value */ LIBFVALUE_VALUE_FLAG_IDENTIFIER_NON_MANAGED = 0x00, /* The identifier is managed by the value */ LIBFVALUE_VALUE_FLAG_IDENTIFIER_MANAGED = 0x01, /* The data is not managed by the value * the data is expected to be available * during the life-time of the value */ LIBFVALUE_VALUE_FLAG_DATA_NON_MANAGED = 0x00, /* The data is managed by the value */ LIBFVALUE_VALUE_FLAG_DATA_MANAGED = 0x02, /* The value has a runtime instance of the value type */ LIBFVALUE_VALUE_FLAG_HAS_RUNTIME_INSTANCE = 0x10, }; #endif libpff-20120802/libfvalue/libfvalue_libcstring.h0000644000175000017500000000262612005153164016453 00000000000000/* * The internal libcstring header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFVALUE_LIBCSTRING_H ) #define _LIBFVALUE_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/Makefile.in0000664000175000017500000011367012006536016012213 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libpff.pc.in \ $(srcdir)/libpff.spec.in $(top_srcdir)/configure \ $(top_srcdir)/dpkg/changelog.in \ $(top_srcdir)/dpkg/copyright.in \ $(top_srcdir)/include/libpff/definitions.h.in \ $(top_srcdir)/include/libpff/features.h.in \ $(top_srcdir)/include/libpff/types.h.in ABOUT-NLS AUTHORS \ COPYING ChangeLog INSTALL NEWS config.guess config.rpath \ config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = include/libpff/definitions.h \ include/libpff/features.h include/libpff/types.h \ dpkg/changelog dpkg/copyright libpff.pc libpff.spec CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = \ include \ common \ libcstring \ libcerror \ libclocale \ libcnotify \ libcsplit \ libuna \ libcfile \ libcpath \ libbfio \ libfcache \ libfdata \ libfdatetime \ libfguid \ libfvalue \ libfwnt \ libfmapi \ libpff \ libcsystem \ pfftools \ jpff \ pypff \ po \ manuals \ tests \ examples \ macosx \ msvscpp \ contrib DPKG_FILES = \ dpkg/changelog \ dpkg/changelog.in \ dpkg/compat \ dpkg/control \ dpkg/copyright \ dpkg/copyright.in \ dpkg/rules \ dpkg/libpff-dev.docs \ dpkg/libpff.docs \ dpkg/libpff-tools.docs GETTEXT_FILES = \ config.rpath \ po/Makevars.in PKGCONFIG_FILES = \ libpff.pc.in SPEC_FILES = \ libpff.spec \ libpff.spec.in EXTRA_DIST = \ README.dll \ README.macosx \ README.mingw \ README.static \ $(DPKG_FILES) \ $(GETTEXT_FILES) \ $(PKGCONFIG_FILES) \ $(SPEC_FILES) MAINTAINERCLEANFILES = \ Makefile.in pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libpff.pc all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/libpff/definitions.h: $(top_builddir)/config.status $(top_srcdir)/include/libpff/definitions.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ include/libpff/features.h: $(top_builddir)/config.status $(top_srcdir)/include/libpff/features.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ include/libpff/types.h: $(top_builddir)/config.status $(top_srcdir)/include/libpff/types.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ dpkg/changelog: $(top_builddir)/config.status $(top_srcdir)/dpkg/changelog.in cd $(top_builddir) && $(SHELL) ./config.status $@ dpkg/copyright: $(top_builddir)/config.status $(top_srcdir)/dpkg/copyright.in cd $(top_builddir) && $(SHELL) ./config.status $@ libpff.pc: $(top_builddir)/config.status $(srcdir)/libpff.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libpff.spec: $(top_builddir)/config.status $(srcdir)/libpff.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgconfigDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-pkgconfigDATA libtool: @LIBTOOL_DEPS@ cd $(srcdir) && $(SHELL) ./config.status --recheck lib: library library: (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcstring && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libclocale && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcnotify && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsplit && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libuna && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcfile && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libcpath && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libbfio && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfvalue && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwnt && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libfmapi && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/libpff && $(MAKE) $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS)) distclean: clean /bin/rm -f Makefile /bin/rm -f config.status /bin/rm -f config.cache /bin/rm -f config.log /bin/rm -f libpff.pc /bin/rm -f libpff.spec @for dir in ${subdirs}; do \ (cd $$dir && $(MAKE) distclean) \ || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" splint: (cd $(srcdir)/libcstring && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libclocale && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcnotify && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsplit && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libuna && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcfile && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcpath && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libbfio && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfcache && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdata && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfdatetime && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfguid && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfvalue && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfwnt && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libfmapi && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libpff && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/libcsystem && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/pfftools && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/pypff && $(MAKE) splint $(AM_MAKEFLAGS)) (cd $(srcdir)/po && $(MAKE) splint $(AM_MAKEFLAGS)) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/ChangeLog0000644000175000017500000017122212006536000011704 00000000000000TODO * pffexport/export handle: - handle MIME attachments - protect against duplicate name clashes - dump attachment item values - add support for LIBPFF_ITEM_TYPE_COMMON (IPM) - separate item file into separate structure - move message specific funtionality into message file ? * item file: - create function to write enum values to the item file - create function to write flag values to the item file * pypff - add Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS - add attributes - improved pydoc comment * code clean up - what's the status of table block ? - unused and goto * libpff: UTF8/UTF16 - libpff_message_get_plain_text_body_size - libpff_message_get_rtf_body * update codegear files - re-enable them * what about debug export and error notifications * code clean up - refactor table index into fdata list? - does table index contain full copy of table data ? if so refactor * add table API ? - read data on demand like libesedb - move low-level item functions to table API - should table manage local descriptors and cache ? - separate item values code from table ? * remove ascii codepage param from libpff_item_values_get_entry_value ? * add const to export path in export handle * replace internal_file by io_handle in item * add item (descriptor identifier) type support - e.g. do not read a table if item does not contain a table * cache local descriptor node (list element) in local descriptor value ? - reduces search for list element libpff * rename value (type) to table entry value (type) * check node values ranges in index tree * add abort support in long running function - make sure to return library to safe state - make sure to reset library abort value * reduce impact of duplicate MAPI entry types * validate table entry identifiers of level >= 1 with those of lower levels? * codepage support - implement libuna-libpff codepage mapping function libpff - check/test * check support for multiple level 8c tables libpff - API * message store - add functions to retrieve special folder entry items * add function to retrieve: - the file offset ranges used by an item ? * name to id map - API access to entire name to id map ? - add libpff_file_get_name_to_id_map to include file? * add a function to retrieve the total number of items? - maintain the total number of items? - maintain the total number of folder items? * item - add read in buffers functions for entry values like message body? libpff - error tollerance and recovery * handle multiple descriptors in libpff_io_handle_get_descriptor_index_value_by_identifier and libpff_io_handle_get_offset_index_value_by_identifier * analyze remaining/deleted content * fragment recovery - add fragment support - allow fragments/partial items (add upper level reporting) - allow items without/with invalid local descriptors? * item recovery - improve local descriptors read test - to read and check entire tree - improve performance of deleted offset index value duplicate check - handle duplicate offset index value identifiers - check fragment scan for correct looping of buffer - group recovered items with the same parent (do not link with allocated parent) - add support for recovered embedded items * CRC error recovery - detect CRC32 corruption - detect data corruption * automatically detect if allocation tables are useable ? libpff - performance * allocation tables - read allocation tables on demand ? - for large list support replace allocation offset list by tree variant * optimized version of libpff_encryption_decrypt ? * item hierarchy (tree) - build on demand ? - flag if sub nodes have been created ? * item values - read directly into external buffer? * attachment data - read directly into external buffer? * does pre-reading item values of attachment improve performance ? libpff - file format support * add free maps support * add support for cell existence * add support for cc table type * add support for the density list libpff - clean up and refactoring * libpff_table - cleaner reusable data structure? (libfdata) - create 7c table read entry definitions function - create ac table read entry definitions function * have multi type work with data reference (in libpff_item) ? * tree type implement use of initialize function (grep sizeof( libpff_tree_node_t ) ) * refactor direct use of array, list, and tree value attributes * improve force decryption check pfftools * pffinfo - add byte size string * pffexport - add flag to overwrite export directory? - export the data in the pff file (embedded objects) - use identifier numbering for traceability? - add support for export to mbox, eml (ole2) - support control code in subject - provide export summary - allow to set date format - remove ftk output - create outlook html output - add support for setting recovery method * export handle - try to export items without item type ? - handle duplicate attachment names (add suffix number) - export attachment to separate subdirectory - improve filename sanitation - do a sanity test - use close related character replacements to improve readability - check into unable to export attachment not being notified in export log - correctly handle skipping an item without class name - check if 0x0e1f (PidTagRtfInSync) is set and export alternating RTF body - move target path to common functions as much as possible - handle multi message body formats for non email items add function to handle prefered and available message body change text message body export of item types into prefered/available message body - item support - IPM.DistList - IPM.FAX - IPM.Post - IPM.StickyNote - IPM.Configuration.RssRule - IPM.Configuration.HomeTimeZone - IPM.Configuration.AvailabilityOptions - IPM.Configuration.Calendar - IPM.Configuration.CategoryList - IPM.Configuration.WorkHours - IPM.Configuration.RssRule - IPM.Sharing - IPM.Sharing.Binding.In - item support (also check library) - IPM.Recall.Report.Success - IPM.Microsoft.ScheduleData.FreeBusy - IPM.Microsoft.SniffData - IPM.Microsoft.FolderDesign.NamedView - IPM.MessageManager * create pffcrack - implement password cracking - implement password reset (requires write) * create pffconvert - convert pst into ost and vice versa (requires write functionality) * create pffsearch/pfffind * handle url as filename - improve sanitize filename function * export attachment in small sized buffers - do not read entire item before its needed? - move item value debug to higher levels than table? * contact - export rtf body Multi language/locale support * library data returns UTF-8 (done) * input filenames remain system string (done) * move character_t functionality to system_character_t (done) * remove string conversion code (done) * print output convert to system string * to reduce conversions use as much as possible the system string type in the tools (have error use system string? or convert before print?) Check/Validate * parse code with slint Debug * check windows debug output * do not error return on debug error? - do not fail item if debug print was unsuccessful - only fail on serious errors * formatting problems in XP with "%s: %s index entry: %" PRIu8 " identifier: %" PRIu64 " is recoverable.\n"," - identifier is off pypff * add more functions Documentation: * add 'getting started with programming libpff' document * add C and Python, Java examples Deployment: * have configure set the default codepage ? also for debug * create debian package files Beta release * remove deprecated functions in include/libpff.h * remove deprecated definition in include/libpff/definitions.h * remove deprecated definition in include/libpff/mapi.h * remove deprecated functions in libpff_legacy.[ch] * check if libpff.3 manual file is up to date Test: * add autoconf/make test suite File Format: * handle missing message store (check) * handle missing name to id map attributes (check) * handle encryption type none, but data is still encrypted (check) * what is the reason for empty (NULL) attachment data, however attachment has a size value !? * Unknown reason for additional padding in external values array entries data * What do some binary data item values contain? * value '/' in (64-bit pst) UTF-16 eml filename is replaced by 0xff 0xf8 but not in subject * PR_HTML seems to contain 7-bit ASCII with HTML encoding of extended characters * Is there multiple level table entries support for bc, a5 and 9c tables? * What is the relation between the 6c and 8c table and the secure id4 Notes: * in the descriptor index a parent can have a child with a lower identifier value * cannot create libpff_item_get_sub_item_by_utf8_name, only folders and messages have names 20120802 * bug fix in pffexport 20120729 * applied updates * changes for project move * bug fix in export handle, address type and email address were swapped in the previous update * Changed how duplicate attachments are named, attachment are now prefixed with their index number * updated msvscpp files 20120611 * bug fix in item file hexdump function 20120610 * applied updates * bug fixes in macros in include header * worked on WINAPI UTF-16 output support 20120513 * applied updates * worked on pypff * disabled codegear files * API - removed deprecated functions - added support for contact email adress 1, 2 and 3 * pffexport: - added support for contact email adress 1, 2 and 3 - removed export_handle_make_directory * updated msvscpp files 20120424 * applied updates 20120304 * moved LCID from libfmapi to libfwnt 20120213 * added dpkg files * pypff: added -avoid-version to Makefile.am * updated libnotify, libsystem, libbfio, libfvalue 20120127 * code clean up * pffinfo: implemented info handle 20120103 * code clean up 20120102 * 2012 update * code clean up 20111025 * updated m4 files * code clean up 20111018 * updated configure.ac and m4 files * updated README files * updated spec and pc files * updated common, libsystem, libuna, libbfio, libfdatetime, libfvalue * pypff: code clean up 20110927 * updated libfmapi 20110904 * pypff: code clean up * updated configure, common, array type, libcstring, log handle, libuna, libbfio, libfdata, libfdatetime, libfvalue 20110705 * updated libfmapi 20110523 * code clean up 20110508 * updated libfmapi 20110425 * updated libuna with codepage 932 and 936 support * updated msvscpp and codegear files 20110413 * bug fix in libfdata regarding recovery 20110412 * bug fix in libfdata regarding attachment data read without initial seek offset 20110320 * update libcstring, libsystem * fix for INTLLIBS 20110317 * updated configure.ac, libcstring, libsystem, libuna, libbfio, libfdata, libfguid, libfwnt, * worked on restriction for sanitized filename and path 20110209 * updated libfmapi 20110201 * update libsystem, bug fix for split of empty string 20110120 * pfftools: code clean 20110119 * pfftools: code clean 20110118 * updated libcstring, libsystem, libuna, libbfio, libfdata * API: worked on UTF-8 and UTF-16 macros * pfftools: code clean * updated libpff.3 man page 20110116 * updated libfmapi 20110114 * updated libcstring 20110113 * updated common, libsystem, libuna, libbfio, libfdata, libfvalue * pfftools: code clean * API: worked on UTF-8 and UTF-16 macros * updated libpff.3 man page 20110107 * updated configure.ac * updated libsystem, libuna, libbfio, libfdata, libfdatetime, libfguid, libfvalue, libfwnt, * 2011 update * code clean up * fixed typo changed unsuported => unsupported * API: add conveniance macros for: - sent representing name - sent representing email address - postal address - primary phone number - home phone number - primary and secondary business phone number - mobile phone number * pffexport: added value to (outlook) message header output - sent representing name - sent representing email address * pffexport: fixed missing note and rss feed body text * pffexport: added some values to contact output * libfmapi: updated some property types 20101224 * code clean up * updated libcstring 20101219 * updated array type * updated libsystem, libbfio, libfvalue * updated log_handle.[ch] * code clean up libpff, pfftools 20101218 * code clean up pfftools 20101216 * updated configure, added gettext * updated array type, list type, offset list * updated libsystem, libbfio, libfvalue 20101203 * updated common, array type, list type, tree type, offset list, liberror, libnotify, libsystem, libuna, libbfio, libfdata, libfdatetime * changes for libfdata update * updated contrib * code clean up * fix for clone data array * optimized libfdatetime filetime to date time values conversion 20101120 * updated configure, libcstring, liberror, libbfio, libfvalue * updated offset list * updated libpff.pc.in libpff.spec.in 20101113 * updated libfmapi * updated pffinput.c 20101111 * updated libfvalue 20101110 * worked on fix for force decryption being set by recovered items * updated libfvalue 20101106 * updated include/error.h, liberror, libbfio, libsystem * fixed some 64-bit WINAPI compilation warnings 20101105 * added libpff.rc for DLL build, currently only supported in msvscpp build 20101028 * pffexport: - worked on code clean up - added dump item values (-d) option export mode debug no longer dumps item values and exports orphan/recovered items - added dump item values of recipients and attachments items - added quiet (-q) option * fixed invalid cache issue for cloned items * added support for: IPM.Conflict.Message * fixes for pypff * added contrib directory for msvscpp win64 build files 20101027 * updated configure.ac * updated include/error.h * updated include/types.h * updated array type, offset list * updated common, liberror, libsystem, libbfio, libfvalue * worked on pypff error handling * libfmapi added support for unknown one-off entryid flag * libfmapi debug output fix * default version info of pfftools is now short * fix in Windows debug output * pffexport: added export of recipients and attachments for activities * fixed invalid cache issue for embedded attachments * fixed rougue detach signal handler pffinfo 20101014 * corrections in examples 20101012 * added missing jpff files 20101008 * fixed bug in debug output * fixed issue in libfdata reference 20101007 * fix for binary mode issue in export_handle * fix for premature end of string issue in libpff_message_get_html_body * pffexport: check for existing directories now based on export type * pffexport: replaced sprintf due to cross platform inconsistencies * updated liberror, libnotify, libsystem, libbfio, libfvalue 20100915 * changes for make dist 20100911 * updated array type * updated libfdata, libfdatetime, libfwnt * worked on Java binding (jpff) * worked on examples 20100903 * code clean up of table and item values * added support for recurring appointment: IPM.OLE.CLASS.{00061055-0000-0000-C000-000000000046} * updated libfguid 20100902 * code clean up of table and item values 20100901 * code clean up of table and item values * added cache timestamp to libfdata 20100831 * code clean up of table and item values * worked on moving data reference to libfdata 20100830 * worked on moving data reference to libfdata 20100828 * worked on moving data reference to libfdata 20100825 * libfdata: protect against small tree node cache sizes < 4 entries 20100824 * small correction in debug output * libfdata: fixed cache entry duplicate on insert 20100818 * updated libcstring, libsystem, libuna, libbfio, libfdatetime * worked on Java binding (jpff) 20100725 * worked on pypff * the folder functions now try to determine the item type if type is undefined * added mingw compilation document * updated libbfio * changed add into append * message body codepage is ignored, seems to be incorrect 20100724 * updated include/error.h and liberror * updated array type * update libuna, libbfio * worked on pypff * deprecated LIBPFF_FLAG_READ/WRITE in favor of LIBPFF_ACCESS_FLAG_READ/WRITE 20100722 * changes to libfdata * updated libfvalue 20100717 * initial work on pypff * pffexport added error tollerability for failed recipient export 20100716 * updated libuna, libbfio, libfdata, libfdatetime, libfguid, libfmapi, libfwnt, libsystem * updatad include/codepage.h * updated include/error.h and liberror * updated array, list and tree types * code clean up and refactoring * added support for handling attachments with duplicate filenames 20100712 * changes to libpff_item_clone behaviour, a clone of NULL is now valid * textual changes 20100711 * textual changes 20100710 * code clean up and refactoring * bug fix in debug output of libfmapi * worked on improving recovery * worked on item type support * add missing libfguid and libfwnt directories to configure.ac 20100709 * code clean up and refactoring * worked on libfdata cache lookup performance * removed libpff_item_values_get_sub_node_by_identifier 20100708 * code clean up and refactoring * worked on libfdata version of local descriptors tree for faster cloning * worked on libfdata cache lookup performance 20100707 * code clean up and refactoring * worked on libfdata version of local descriptors tree for faster cloning 20100706 * worked on libfdata block full cache handling * code clean up and refactoring * updated libuna, libbfio, libfdatetime * small fixes * updated array, list and tree type * worked on clone functions 20100705 * reverted to 20100704-6 * worked on recovery performance * updated libbfio 20100704 * worked on tree recovered node support * worked on improving recovery * worked on recovery performance 20100703 * worked on improving recovery * code clean up and refactoring * worked on recovery performance 20100702 * worked on libfmapi * code clean up and refactoring 20100701 * worked on file exists speed improvement based on idea by Björn Ganster * worked on on-demand read of index nodes * updated common, libbfio * updated msvscpp files * updated codegear files * worked on libfmapi 20100629 * updated common, libcstring, liberror, libnotify, libsystem * updated libuna, libbfio, libfdata, libfdatetime, libfmapi * added libfguid, libfwnt * clean up * worked on on-demand read of index nodes 20100624 * updated libfmapi 20100619 * updated libbfio and libfdata * updated array type 20100611 * worked on libfdata * updated libbfio * refactored index item to index entry 20100610 * worked on libfdata * fixed memory leak in pffinfo 20100608 * updated msvscpp files * updated libbfio * worked on libfdata 20100607 * worked on libfdata * moved buffer data reference into separate file 20100606 * worked on libfdata 20100604 * worked on libpff_data_block 20100603 * worked on libpff_data_block * worked on libfdata_block - worked on cache hit handling - worked on set segment data 20100601 * added cache release to libfdata_block * worked on libpff_data_block 20100531 * worked on integrating libfdata into data_reference * worked on refactoring data_array 20100530 * worked on integrating libfdata into data_reference 20100529 * added initial version of libfdata * removed attach/detach * worked on integrating libfdata into data_reference 20100524 * some code refactoring 20100522 * some code refactoring 20100514 * added WINAPI heap allocation function support to common/memory.h * small adjustment libpff_file.c 20100512 * small adjustment in liberror_error.c 20100510 * export handle: additional characters for sanitation * bug report email change in manuals 20100506 * worked on configure.ac clean up 20100505 * updated configure.ac and added MAINTAINERCLEANFILES to Makefile.am files * updated common, libcstring, liberror, libnotify, libsystem, libuna, libbfio, libfdatetime * changed amount of in number of 20100504 * updated msvscpp and codegear files * fix in debug output of local descriptors * export handle added notification of unable to export sub folders and messages * added error tollerance for table entry value reference outside of range of table index 20100503 * worked on improving libfmapi debug string codepage support * refactored value type string handling code 20100501 * added mingw support to include type header * updated common, libcstring, libbfio, libsystem * worked on acinclude.m4 clean up 20100429 * libfmapi: added support for codepage 1200 * improved support for narrow string name-to-id map string (RIM) - support to handle trailing zero - removed trailing s in debug output * added codepage 1200 support like in libesedb * file content version check more tollernant <= 0x000f ANSI, >= 0x0015 Unicode other versions unknown * updated libcstring * fixed small leak cleaning up orphan items due to tree node change 20100427 * worked on data array caching 20100424 * worked on Windows extended filename support 20100419 * adjusted export handle error output * fixed error in ignore data array cache flag 20100416 * updated libbfio, libuna, libfdatetime * fixed bug in liberror * removed restriction for recovering items with existing and duplicate identifiers 20100415 * worked on support for 'unencrypted' encrypted pst files added support for unencrypted values array entry * worked on refactoring export handle to support writing prefered message body to stream 20100414 * worked on Windows extended filename support 20100412 * fixed 7c table 8 byte value issue * worked on Windows extended filename support 20100411 * worked on Windows extended filename support 20100403 * worked on Windows extended filename support 20100330 * applied fix for non-linear values array 20100329 * fixed error in debug output * added pffexport -m noatt option for testing export without attachments 20100328 * updated libstring, liberror, libuna, libbfio, libsystem, libfdatetime, libnotify * updated pfftools for libcstring and libsystem update * Email change * updated msvscpp and codegear files * updated macosx package files * removed common/narrow_string.h common/wide_string.h * updated common 20100327 * worked on libstring 20100324 * worked on libstring * removed libpff_guid.[ch] * updated libbfio 20100322 * improved debug/verbose output in data array 20100321 * fix in export handle for handling empty conversation indexes * improved reading ac table * added support for 64-bit local descriptor branch nodes * updated libfdatetime 20100320 * fixed small memory leak in recovery functions, introduced by update * fixed clean up issues in recovery functions, introduced by update * refactored several memory allocate to initialize functions * missing local descriptor values in recovered items are considered empty * fixed recovery with no unallocated ranges * added recovery sanity check: check if the local descriptors of a recoverable item are readable 20100319 * fix for stand-alone libfdatetime inclusion in pfftools * fixed typo in acinclude.m4 * fixed error in handling LIBPFF_RECOVERY_FLAG_IGNORE_INDEX_DATA * fixed error in handling table index introduced by MS-PST update for a5 table * updated libuna, libbfio, libfdatetime 20100315 * updated libbfio * small fixes in attached file io handle 20100304 * worked on support of unused table index values * worked on support for 'unencrypted' encrypted pst files 20100221 * small changes 20100220 * worked on support for 'unencrypted' encrypted pst files 20100202 * worked on support for data blocks 20100130 * worked on support for data blocks 20100129 * worked on new file format findings from [MS-PST] * API: changed index node blocks into page blocks * removed deprecated libpff_email_get_internet_headers_size and libpff_email_get_internet_headers * debug: added name-to-id-map identifiers * libpfmapi: changed value type identifiers to newer definitions * libpff not uses the sentinal to determine the file type of unknown PFF versions 20100128 * worked on error tollerabilty and recovery for PST file with invalid index and invalid allocation tables 20100127 * worked on error tollerabilty and recovery for PST file with invalid index and invalid allocation tables 20100126 * updated common, liberror, libbfio, libsystem * worked on error tollerabilty and recovery for PST file with invalid index and invalid allocation tables 20100114 * small fixes * updated common, libfmapi 20100111 * fixed typo 20100107 * added export of conversation index to separate file * updated common, liberror, libsystem, libuna, libbfio, libfdatetime 20100106 * minor changes in libfmapi 20100105 * updated common, libbfio 20100103 * small changes * updated common, liberror, libnotify, libuna, libbfio, libfdatetime * 2010 update * updated tree type * updated include/types.h 20091225 * small changes * removed unnecessary calls to libpff_item_detach 20091223 * worked on MAPI definitions 20091222 * worked on MAPI definitions * renamed internet headers to message transport headers 20091220 * updated libuna 20091219 * changed default codepage * updated manuals * removed filetime from export handle using libfdatetime instead * updated libuna * worked on UTF-7 support 20091217 * updated libfdatetime 20091214 * updated libbfio, libfdatetime, libuna 20091211 * worked on accessing items by name * updated libuna 20091210 * added local descriptors support for libpff_item_get_sub_item_by_identifier 20091209 * worked on libpff_file_get_item_by_identifier 20091208 * worked on libpff_file_get_item_by_identifier 20091207 * worked on libpff_name_to_id_map_entry_get_utf16_string 20091204 * updated libfdatetime * worked on exporting IPM.Document * added check for zero byte in HTML binary data * worked on accessing items by name * fix for 0 return in libpff_item_get_sub_item_by_identifier * updated libuna, for compare functions 20091128 * fixed export of incorrect date and time values in OutlookHeaders.txt - bug in byte stream macros 20091122 * small changes 20091117 * worked on get value type function 20091115 * updated common * removed item list element 20091114 * updated libbfio - open on demand * added open on demand for cloned file io handles 20091113 * removed item_reference_list * fix for cloning of file io handle for items * removed handling of HTML body codepage because of possible conflict with html parser * removed libpff_item_free_no_detach * improved tree node clone function * worked on moving data array file io handle to item layer * updated libbfio, fix for file clone 20091112 * worked on moving io handle file io handle to item layer * updated libbfio (fix for handle_clone) * add cloning of file io handle for items * fixed error in libpff_attached_file_io_handle_clone * removed All rights reserved * updated libsystem, liberror, libnotify 20091111 * worked on item clone function * worked on improving asynchronous usage of sub items (attachment) * moved stdout to notify_stream in export handle * added definition for default export handle notify stream * added support for LIBPFF_ITEM_TYPE_EMAIL_SMIME to export handle * fixes for msvscpp and codegear compilation * worked on moving file io handle to item layer 20091110 * worked on item clone function * worked on local libpff and libfmapi 20091109 * worked on improving asynchronous usage of sub items (recipients, attachments) 20091029 * updated libbfio * changed behavior of non-managed BFIO handle 20091028 * worked on attachment data libbfio object 20091026 * worked on refactoring endian.h into byte_stream.h * updated libuna, libbfio, libfdatetime 20091024 * removed backwards compatibility macros from API * added flags to get entry functions to ignore name to id map 20091023 * added multi value test code in export handle 20091022 * fixed typo in multiple error output string 20091019 * worked on API support for conversation index 20091016 * added missing set ascii codepage to pffexport * refactored libpff handle out of extraction handle * fixed error in set codepage function * fixed 0 return in message string functions 20091014 * worked on ftk 'compatible' output of pffexport 20091013 * worked on ftk 'compatible' output of pffexport 20091008 * added failsave in libfmapi debug 20091003 * corrected license in list and array type and several of the pfftool handles * updated libbfio * updated acinclude 20091001 * updated array and list type * code clean up for use of array and list type * change function to libpff_list_get_value where better suited than libpff_list_get_element 20090930 * worked on generic b5 header indirection level support * worked on code clean up * added support for attachments with attachment method by reference * fixed multiple memory leaks * added a5 table array support, for this the a5 table gets a set per table array entry this is necessary because of table value references to the values in the a5 table 20090929 * Worked on CodeGear project files - disabled creation of precompiled headers * Worked on MSVSCPP solution files - enabled DEP - enbled random base * worked on UTF-7 support (libuna) * worked on b5 header indirection level support for bc table * worked on generic b5 header indirection level support * worked on code clean up 20090928 * code clean up * worked on reading attachment data buffer wise * added support for incorrect message body codepage with missing message codepage * updated libuna 20090927 * updated libbfio, libsystem * worked on data array cache * worked on reading attachment data buffer wise * libpff_attachment_get_data is currently left in the code for backwards compatibility 20090921 * added LCID debug code * moved codepage debug code to separate file 20090919 * worked on list and tree types 20090918 * added initial support for sticky notes * remaining IPM.Note item classes are considered an e-mail e.g. IPM.Note.StorageQuotaWarning * changed behavior of libpff_table_get_entry_value_by_entry_type to allow unmapped matching 20090917 * refactored creation of array out of libpff_table_read_index * fixed name to id map boundary problem, also solves unnecessary rereads of name to identifier data from file * worked on UTF-16 string support * added support for handling invalid message body codepages * fixed error in detection of encrypted data * worked on multiple level array support 20090916 * worked on variating named properties - implemented support for IPM.Schedule.Meeting.Request * pffexport now exports meetings, tasks and contacts to seperate directories 20090914 * added seek offset 0 when reading file header * worked on functions to retreieve - the number of sub folders in a folder - a sub folder in a folder - the number of messages in a folder - a message in a folder - the number of associated items in a folder - an associated item in a folder * fixed error in libpff_item_tree_get_child_node_by_identifier * worked on exporting item values in debug mode * pffexport now export the item values of unknown items in debug mode * worked on export summary 20090911 * Added missing C++ closing statement in libsystem_support.h * Fixed passing of incorrect size to data reference buffer initialize * Worked on handling corrupt Exmerge pst files 20090910 * worked on implementation on reading data on demand * pffexport no longer generates an error when e-mail does not contain a body text * updated msvscpp solution * worked on refactoring 7c table function * worked on refactoring ac table function * worked on handling attachment without attachment data 20090909 * worked on implementation on reading data on demand * worked on refactoring 7c table function 20090907 * made corrections to configure.ac * worked on libfdatetime integration * changed libfmapi integration preperation for stand-alone version * updated behavior of pffexport export mode to handle recover, debug and all export 20090905 * updated libpff Makefile.am * updated pffinput codepage detection 20090904 * worked on orphan item support * worked on integrating pffexport and pffrecover * worked on exporting orphan items * moved functionality of pffrecover into pffexport * removed pffrecover * updated common, libuna * updated codpage definitions * worked on removing notify stream, use functions instead necessary for integration of notify without stream (e.g. for glib) 20090903 * small fixes for BFIO API support * small fixes in output of pfftools * fixed error reading bc table due to behavior change of reading data on demand * added support for ignoring item tree nodes with an invalid parent node 20090830 * small adjustment to configure.ac * worked on data array read on demand * worked on refactoring out some of the item_values functions * worked on refactoring direct access to array type to use functions 20090829 * updated common, libnotify, libbfio, libuna * update msvscpp and codegear files * removed pffsignal deprecated by libsystem_signal * worked in libbfio support * added signature functions * worked on detecting 'invalid' encrypted PFF's with encryption type none * removed encryption key from library and API * fixed incorrect addition to item hierarchy of related items for unknowns related items are now cached locally in item no longer globally in item hierarchy * worked on local use of libpff * fixed libbfio detection * worked on generic support for 6c, 8c and 9c tables * fixed leak in libfmapi_debug * fixed error reading a5 table introduced by handling empty a5 table * worked on data array read on demand 20090816 * implemented libsystem for pfftools 20090811 * fix in date and time 20090810 * fixed initial notify output to be verbose in pfftools * fixed missing fclose in error handling in export handle 20090808 * worked on handling empty a5 tables * worked on multi values debug output * multi value elements are now set to NULL if element has size of 0 * updated libbfio * worked on Borland C++ compiler support * removed deprecated API functions * implemented libpff_message_get_string(_size) functions that handle message specific codepage handling * refactored codepage handling code from libpff_message to libpff_value_type * added debug support for 0x1013 (PidTagHtml) 20090807 * fixed error in debug of conversation index (error in MSDN documentation) * fixed error in libpff_message_get_modification_time macro * moved MAPI debug code to libfmapi * added support for handling codepage 65001 (UTF-8) and 65000 (UTF-7) * fixed several memory leaks in pfftools export handle * fixed several memory leaks in libpff ac and 9c tables 20090803 * updated libbfio * updated include/libpff/types.h.in * small changes for MSVSCPP build 20090802 * updated libuna * updated libbfio * updated common code for Borland C++ compiler support * added debug support for several definitions * updated liberror * updated libpff_error * updated libbfio * updated serveral of the code files in pfftools for Borland C++ compiler support * added m4 directory support to autoconf/make files for libtool * refactored plain text body macros to function to support message codepage * fixed error in data array initialize, not resetting pointer to NULL on error (pointed out by B. Ganster) 20090801 * fixed missing error return in libpff_table (pointed out by Jim) * small updates to configure.ac 20090724 * worked on runtime 6c, 8c and 9c table support 20090722 * worked on read data array entry on demand * fixed incorrect addition to item hierarchy of related items * fixed several memory leaks in pff tools export handle (in sub_folders, recipients and unknowns export functions) 20090721 * worked on read data array entry on demand 20090720 * worked on read data array entry on demand - added descriptor data layer * fixed error regarding return value of message rtf and html body functions * several small adjustments in libfmapi 20090719 * several small adjustments in libfmapi 20090718 * worked on read data array entry on demand 20090717 * worked on get sub item by identifier API function * worked on read data array entry on demand 20090716 * several small adjustments in libfmapi * added debug support for several definitions * fixed error in debug output - the description of mapped numeric entries was not resolved correctly 20090715 * fixed in error in error output of export handle * fixed error in retrieving mapped numeric entry types * several small adjustments in libfmapi 20090711 * several small adjustments in libfmapi 20090710 * several small adjustments * refactored class_identifier out of name to id map entry using GUID instead * worked on sub messages support * worked on sub associated contents support * fixed missing mapping of named attributes in debug output 20090708 * applied table array aligment fix from earlier fixes on other platform 20090629 * small fixes to libpff_multi_value.h 20090628 * worked on sub folders support * clone allows empty table * implement fail safe for usupported table entries level * export handle now handles duplicate folder names * refactored attachments and recipients to libpff_message and unknowns to libpff_folder 20090627 * fixed Windows 64-bit ssize_t definition issue (pointerd out by Xavier Roche) * fixed incorrect name of 32 and 64-bit in libpff_multi_value.h (pointed out by Warren Brown ) * fixed incorrect libpff_name_to_id_map_entry_get_name in libpff_name_to_id_map.h (pointed out by Warren Brown) * worked on implementation of multi values * fixed handling of multiple levels of local descriptors * updated libbfio * worked on 8c table support 20090625 * implemented multiple level table entries support for 7c and ac table * fixed error table values array realignment no longer skips 0 value part of realignment value * fixed typo in export handle * fixed print of verbose data without verbose flag in libfmapi 20090624 * updated libbfio * worked on multiple level table entries support 20090623 * worked on failure of handling embedded OLE attachment * add missing C++ wrapped to libnotify * worked on name to id map rewrite 20090622 * worked on libnotify * small updated for liberror * replaced libpff_notify by libnotify 20090621 * worked on libnotify it is the starting point of improved verbose and debug notification support * added libfdatetime 20090620 * implemented the notification stream file (based on patch by wbrown) * moved attachment and recipient functions from email to item * added support exporting attachment and recipient in appointments 20090618 * added behavior to libpff_table_get_entry_value_by_entry_type to allow access to named properties using the entry_type value 20090617 * added support for ASCII Name-to-ID strings * add named_property argument to libpff_item_get_entry_type * removed libpff_item_get_item_type macro from include file 20090616 * fixed pffinfo not handling missing message store values * fixed handling corrupted table index and correcting corrupted first table index * the table definitions name to id map entry is now passed to prevent a second lookup 20090615 * worked on libfmapi and MAPI value debug output * add GUID and multi value GUID support API functions 20090614 * worked on libfmapi and MAPI value debug output 20090613 * worked on libfmapi and MAPI value debug output 20090611 * worked on multi value support 20090528 * updated libbfio 20090527 * fixed 16-bit value reference to a 32-bit value in libpff_table_read this caused problems with table headers in table arrays entries other than the first * fixed OLE attachment method in libpff_attachment_get_data_size - item now caches attachment embedded object data * added embedded object debugging 20090526 * worked on multi value support * refactored value type conversion to separate functions * export handle now handles recipient type orginator and BCC * fixed wide string issue regarding log handle output "Processing folder X in path Y" 20090525 * added libpff_item_get_entry_value_16bit to API based on patch of Warren Brown * added libpff_item_get_entry_value_binary_data_size and libpff_item_get_entry_value_binary_data to API * worked on multi value support 20090524 * fixed last offset inclusion in libpff_offset_list_range_is_present * updated libbfio * updated API for notify and error functions * updated common/types.h to be generated by autoconf * implemented libpff_table_initialize 20090522 * some minor changes * worked on implementing support for local use of library * updated libbfio * updated array and list type with newer versions * updated tree type - created initialize function - changed free node function * updated item values - created initialize function - changed free function 20090521 * fixed typo in libpff.spec.in * refactored libpff error functions into libpff_error.c 20090520 * worked on conversation index child blocks 20090519 * worked on conversation index child blocks 20090518 * worked on conversation index child blocks 20090517 * worked on debug output for X.400 object identifiers * updated tree node value functions to have an error parameter * implemented tree node clone function * worked on local descriptor hierarchy support * fixed issue in error handling in libpff_index_node_initialize * removed remove list hierarchy quick hack (libpff_descriptor_read_local_descriptors_append) * changed local descriptors node level into node type * removed LIBPFF_CODEPAGE_WINDOWS_1250 in item values, codepage is now passed from handle 20090516 * worked on integrating the recipients patch by Krzysztof Mazur * worked on clone functions * updated list value functions to have an error parameter * updated libbfio * fixed error in libpff_list_insert_value and libpff_offset_list_add_offset * the internet headers are now always exported to a separate file * attachments are now stored in the subdirectory Attachments 20090514 * made libfmapi less dependent on libpff for libnk2 * worked on integrating the recipients patch by Krzysztof Mazur * updated common/endian.h with libewf version 20090513 * worked on integrating the recipients patch by Krzysztof Mazur * corrected fopen in export handle, on consideration only the attachment and e-mail files need to be opened in binary mode, not the contact and other output files 20090512 * updated liberror and libuna 20090509 * fixed missing C++ definition in log handle * fixed fopen binary mode for WINAPI pointed out by krzysztofmazur (Krzysztof Mazur) * fixed incorrect sizeof type in export handle pointed out by warrenthebrown (w brown) * fixed missing default of system string ASCII codepage 20090427 * updated libuna for bug regarding UTF-16 <= 2 20090424 * several small updates 20090408 * updated libbfio * added API functions to retrieve number of item values sets and entries (per set) * added API function to retrieve the entry and value type of an item set/entry index * changed API function libpff_item_get_entry_value to use value_type as input now matches the behavior of the MAPI properties, but still allows for any value type lookup * fixed TODO in libpff_folder_get_content_type * several MAPI definition changes * libpff now remaps numbered entry types, this allows access to some of the mapi properties in the name to id map * added float and double value type API functions * renamed multiple API function to match MAPI - libpff_folder_get_content_type to libpff_folder_get_type - message_get_type_x to message_get_class_x - libpff_contact_get_file_as to libpff_address_get_file_under macro - email_get_x_body to message_get_x_body 20090404 * added static executable build 20090331 * Worked on initial version * Updated WINAPI wide character support * added wide character mkdir support * moved class identifier debug code in name_to_id_map to libpff_debug * added debug print of name to id map validation entries * removed report item type, updated item type detection 20090330 * Worked on initial version * Worked on support for UNICODE directive * Updated libbfio with libewf 20090329 version * Updated caseless compare functions with WINAPI support 20090328 * Worked on initial version * Worked on security descriptor structure in libfmapi * Worked on entry identifier structure in libfmapi * Made libpff_debug_property_type_value_print item type aware 20090327 * Worked on initial version * worked on libfmapi property type support * added caseless compare functions to common string functions 20090326 * Worked on initial version * Corrected Windows printf integer specifications * implemented guid to class identifier conversion and class identifier compare functions in libfmapi * Corrected some errors in debug output * changed several unknowns to possible knowns 20090325 * Worked on initial version * Fixed error in libpff_attachment_get_short_filename_size and libpff_attachment_get_short_filename pointed out by Igor Rogov * Fixed strange issue in libfmapi_filetime_to_string sprintf_s crashes when string is too small - which is unexpected behavior * implement class identifier aware property debug 20090322 * Worked on initial version * working on MAPI type debugging * worked on unknowns 20090321 * Worked on initial version * Implemented libpff_attachment_get_data_size as a function due to attachment size mismatch with size of data and size in the attachment item table * Changed comment in .pc .spec and library manual page * update glob.[ch] with version of libewf - glob is currently not used, but will remain in the code for now * refactored _allocate( to _initialize( - except for table entries allocation function * added support for the 0x0f pst version type * worked on renaming list to local_descriptors and change it into a tree * working on MAPI type debugging 20090313 * Worked on initial version * updates msvscpp files 20090312 * Worked on initial version * added support for separate libbfio * updated libbfio to 20090312 version 20090307 * Worked on initial version * Updated libbfio - removed libbfio_interface 20090302 * Worked on initial version * Fixed error creating recovery directory 20090224 * Worked on initial version * Fixed error regarding export of small attachment names (introduced by export handle) 20090223 * Worked on initial version * Fixed errors in path creation (introduced by export handle) * Fixed error in log handle 20090222 * Worked on initial version * Updated msvscpp files * Worked on full locale support - removed character_t - updated charset detection 20090221 * Worked on initial version * Worked on full locale support * moved file_io_handle creation to libpff_file 20090220 * Worked on initial version * Small fixes * ascii codepage now passed to debug function * fixed month 13 in filetime string * worked on export handle 20090219 * Worked on initial version * Update of error output 20090204 * Worked on initial version * Updated msvcpp files 20090202 * Worked on initial version * Worked on libfmapi (synced with msdn) 20090201 * Worked on initial version * Worked on libfmapi (synced with libmapi 0.8 mapi-properties) 20090131 * Worked on initial version * fixed codepage 1258 restriction in libpff_file_set_ascii_codepage * moved MAPI and codepage definitions to separate header file * moved MAPI code to libfmapi (file MAPI library) intended for local use only 20090128 * Worked on initial version * fixed small bugs in distribution files 20090125 * Worked on initial version * Worked on RTF uncompress buffer too small * Worked on false HTML body export * Worked on name to id map 20090124 * Worked on initial version * Updated libuna and liberror * Added support for libbfio * Implemented crc check on 64 bit file header data * Worked on named properties * Implemented big endian GUID support * Worked on RTF uncompress buffer 2 bytes off the uncompressed size does not equal the actual number of resulting rtf bytes the uncompressed size does not entail the 2 trailing zero bytes * Worked on name to id map 20090118 * Worked on initial version * Worked on HTML body functions * Updated configure to conform to cache value naming schema * Output format now allows txt and htm also as type definitions * Worked on all output format type definition * Moved html, rtf and plain text body export to separate functions 20090116 * Worked on initial version * Fixed debug output of file header values to match other * Created an unambiguous filetime string * Added debug values for password and attachment descriptor item * Worked on changing output format into preferred output format * An non empty body is preferred above an empty 20090115 * Worked on initial version * Updates headers * Fixed missing debug definition for non debug compilation * limited debug output to verbose output mode 20081221 * Worked on initial version * Worked on filetime string error * Worked on integrating basic file IO library (libbfio) 20081218 * Worked on initial version 20081217 * Worked on initial version * Changed pst_file_signature to pff_file_signature * Fixed potential segfault in array type 20081216 * Worked on initial version * Fixed buffer size for file header data debug 20081213 * Worked on initial version * Worked on property types * Renamed extended attributes to name to id map * Worked on name to id map * Separated name to id map table debug function from (default) item debug function 20081212 * Worked on initial version * Worked on property types 20081209 * Worked on initial version * Worked on extended attributes * Worked on file header * Added support for data version (NDB version) 0x15 20081208 * Worked on initial version * Worked on extended attributes * Worked on file header 20081207 * Worked on initial version * Worked on extended attributes * Worked on file header * Fix for GUID representation * Updated item value types (property types) debug strings 20081206 * Worked on initial version * Worked on extended attributes * Worked on file header 20081202 * Worked on initial version * Fixed error in usage output of pffexport 20081201 * Worked on initial version * Fixed error in debug output of 64-bit list unknown1 value * Changed 64-bit index unknown2 to hexadecimal output * Fixed bug in recovery not cleaning items on missing data identifiers 20081128 * Worked on initial version * Worked on recovery failure on ost file 20081127 * Worked on initial version * Worked on extended attributes * Changed list type into type and level 20081031 * Worked on initial version * added print for item type 20081030 * Worked on initial version * Fixed error in debug print of list type 20081029 * Worked on initial version * worked on support on content type * Fixed leak in pffcommon * Fixed list element size calculation for 64bit list 20081028 * Worked on initial version * added support for list type 0x0102 * added support for file content type 20081026 * Worked on initial version * Worked on rtf export mode * Fixed correct handling of string_snprintf return value * Fixed error in pffexport_determine_export_mode * Updated libpff header file * Worked on extended attributes 20081024 * Worked on initial version * Added more detailed error output for unsupported pff data * Fixed error in sanitize filename * Fixed 1 off in filetime_to_string * Updated README * Fixed leak on error in libpff_index_read_node * Looked into index node type 0x85 0x85 20081023 * Worked on initial version * added attachment method to libpff_attachment_get_type to detect embedded OLE2 attachments 20081022 * Worked on initial version * pffcommon_export_attachment no longer export attachment for unknown type 20081021 * Worked on initial version * Added basic support for value type 0x1048 * pfftools now sanitize \ and / * fixed error in pffcommon_export_attachment 20081020 * Worked on initial version * made pffexport more tollerant for missing transport headers and plain text body 20081019 * Worked on initial version * Worked on embedded object in attachments * Fixed missing list type in libpff_file_io_handle.h * Multiple fixes regarding user output in pffcommon * Made export tollerant of attachment without name * Removed newline in error strings * Fixed offset read list for debug 20081018 * Worked on initial version * worked on adding error handling * Worked on man pages * Added description of functionality of tools in usage information * Added flag to show allocation information to pffinfo * Added target directory option to pffrecover * Added logfile option to pffrecover * Updated rpm spec file * Updated AUTHORS * Fixed leaks in libpff item recovery * Added MSVS CPP solution files * Changes for MSVS CPP compilation * pffexport now tests if file exists before creating target directory 20081017 * Worked on initial version * Fixed leaks in pffcommon * Fixed missing liberror makefile for deployment * worked on adding error handling 20081015 * Worked on initial version * Worked on signal handling 20081014 * Worked on initial version * worked on adding error handling 20081013 * Worked on initial version * worked on adding error handling 20081011 * Worked on initial version * worked on adding error handling * Worked on refactoring common 20081009 * Worked on initial version * worked on adding error handling 20081007 * Worked on initial version * worked on adding error handling 20081005 * Worked on initial version * worked on adding error handling * worked on refactoring common 20080923 * Worked on initial version * worked on adding error handling 20080922 * Worked on initial version * replaced libuca by libuna * added liberror * worked on adding error handling * separated Makefiles * moved base64 to tools * renamed HAVE_WINDOWS_API to WINAPI (in libpff) 20080905 * Worked on initial version * added list type prepend 20080904 * Worked on initial version * Updated libuca 20080831 * Worked on initial version * Replaced unistring with libuca 20080830 * Worked on initial version * Improved common and configure.ac 20080829 * Worked on initial version * Now supports dynamic folder length in pffcommon_export_folder 20080828 * Worked on initial version * Worked on improving Unicode conversion routines 20080827 * Worked on initial version * Worked on improving Unicode conversion routines * Moved unicode conversion routines into libunistring 20080826 * Worked on initial version * Worked on improving Unicode conversion routines 20080825 * Worked on initial version * Worked on improving Unicode conversion routines * Added maximum allowed UTF 0x110000 in strict mode * Worked on support for converting extended ASCII stream into UTF 20080824 * Worked on initial version * Worked on improving Unicode conversion routines 20080823 * Worked on initial version * Worked on improving Unicode conversion routines 20080821 * Worked on initial version * Worked on export of appointment 20080819 * Worked on initial version * Rewrote item specific function to be macros that use the generic item functions 20080818 * Worked on initial version * Implemented 9c table entries (guid, item descriptor) 20080817 * Worked on initial version * worked on ac and a5 table type support * Added item entry values table instance to the table entry definition * Handle empty table number of index items * Added fix for non 4 bytes aligned padding in external values array entries data * Changed libpff_notify_dump_data format 20080816 * Worked on initial version * Removed libpff_item_tree_allocate * Refactor item tree to use item descriptor instead of item tree values * Made remaining descriptor list part of the item tree * Added support for external values array entries data * Added fix for additional padding in external values array entries data * Worked on ac table type support, found additional a5 table type 20080815 * Worked on initial version * removed item values from item tree * Worked on libpff_file_get_message_store * refactored item tree values to item descriptor * Adjusted libpff_list_insert to return 0 if value exists 20080814 * Worked on initial version * Fixed error in retrieve unallocated block function * refactored item values to separate structure 20080813 * Worked on initial version * Item functions can now handle recovered items * Implemented print value on "last table index values end offset" * Rewritten libpff_folder_get_content_type to use string compare for Unicode string support * refactored common code in item and item tree * fixed issue exporting recovered attachments recovery now only analyzes leaf index nodes 20080812 * Worked on initial version * Worked on recovering deleted content and pffrecover * Made parent identifier 32 bit * Made item tree descriptor identifier 32 bit 20080811 * Worked on initial version * Moved item export code from pffexport to pffcommon * Worked on recovering deleted content and pffrecover 20080810 * Worked on initial version * Worked on recovering deleted content * Created pffrecover 20080809 * Worked on initial version * Worked on high encryption 20080807 * Worked on initial version * Worked on reducing memory usage * Fixed strange output directory name * refactored most table usage to item to reduce memory usage for large files 20080806 * Worked on initial version * Fixed 0-byte set memory corruption in libpff_item_tree_get_entry_value_string 20080805 * Worked on initial version * Worked on item API 20080804 * Worked on initial version * Worked on item API 20080725 * Worked on initial version * Worked on item API 20080724 * Worked on initial version * refactored item and item reference 20080720 * Worked on initial version * Worked on 64-bit pff and ost * Worked on basic unicode conversion * Fixed make dist 20080719 * Worked on initial version * allow reading ahead index nodes before the a reading ahead index node * Worked on 64-bit pff and ost * Worked on basic unicode conversion 20080718 * Worked on initial version * Found pst without message store and extended attributes The actual file could not be opened in Outlook, made libpff not dependent on both * Worked on 64-bit pff and ost 20080717 * Worked on initial version * Worked on recovering deleted content * Worked on 64-bit pff and ost 20080716 * Worked on initial version * Worked on recovering deleted content 20080715 * Worked on initial version * Worked on recovering deleted content 20080714 * Worked on initial version * Worked on recovering deleted content 20080713 * Worked on initial version * Worked on recovering deleted content 20080711 * Worked on initial version * Worked on recovering deleted content 20080710 * Worked on initial version * Worked on recovering deleted content 20080709 * Worked on initial version * Worked on recovering deleted content 20080708 * Worked on initial version * Fixed error in encrypted flag for offset identifier * Worked on stricter item entry value check and reduced memory finger print for values < 32-bit 20080707 * Worked on initial version 20080706 * Worked on initial version 20080705 * Worked on initial version * Worked on pffexport * fixed small memory leak * removed dependency on zlib 20080704 * Worked on initial version * Worked on attachments * Worked on pffexport 20080703 * Worked on initial version * Worked on attachments 20080702 * Worked on initial version * Worked on attachments 20080701 * Worked on initial version * Worked on attachments 20080630 * Worked on initial version * Worked on attachments 20080628 * Worked on initial version * Worked on attachments 20080627 * Worked on initial version * Refactoring of io * Worked on attachments 20080626 * Worked on initial version * Moved libpff_io_handle_read_table_descriptor to libpff_item_values_read * Refactoring of io_handle/table/item * Removed libpff_array 20080625 * Worked on initial version * Worked on attachments * Fixed multiple memory leaks * Refactoring of io_handle/table/item 20080624 * Worked on initial version * Worked on email 20080623 * Worked on initial version * Worked on item reference 20080619 * Worked on initial version 20080615 * Worked on initial version * Worked on high encryption support * Fixed index value offset for array tables 20080614 * Worked on initial version * Worked on handling table in array 20080613 * Worked on initial version 20080612 * Worked on initial version * Worked on io handle, fixed memory issue * Worked on folder, fixed folder reference list issue 20080611 * Worked on initial version * Worked on item values * Worked on io handle 20080610 * Worked on initial version * Worked on folder API 20080608 * Worked on initial version * Worked on array handling * Fixed 0 byte wrap around issue in LZFu * renamed handle to file * Worked on file API 20080607 * Worked on initial version * Implemented LZFu uncompress function * Implemented weak crc calculation for LZFu * Implemented (file) offset no compression flag handling * Worked on array handling 20080606 * Worked on initial version 20080605 * Worked on initial version 20080603 * Worked on initial version * Worked on 7c table header and different b5 table headers 20080602 * Worked on initial version * Worked on 7c table header and different b5 table headers 20080601 * Worked on initial version * Worked on 7c table header and different b5 table headers 20080531 * Worked on initial version * Worked on filetime conversion functions 20080529 * Worked on initial version * Fixed 1-off error in ASCII values of hexdump 20080528 * Worked on initial version 20080527 * Worked on initial version 20080526 * Worked on initial version 20080522 * Worked on initial version 20080521 * Worked on initial version * Worked on readable encode base64 function 20080520 * Worked on initial version * rename descriptor to table 20080516 * Worked on initial version 20080515 * Worked on initial version 20080514 * Worked on initial version 20080513 * Worked on initial version * implemented offset list 20080512 * Worked on initial version 20080511 * Created initial version based on libpst-0.6.8 to analyze the pst file format and libtableau for the library structure libpff-20120802/m4/0000775000175000017500000000000012006536212010534 500000000000000libpff-20120802/m4/libuna.m40000644000175000017500000004250712005152462012176 00000000000000dnl Functions for libuna dnl dnl Version: 20120630 dnl Function to detect if libuna is available as library dnl ac_libuna_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBUNA_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libuna" != x && test "x$ac_cv_with_libuna" != xno && test "x$ac_cv_with_libuna" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libuna"], [CFLAGS="$CFLAGS -I${ac_cv_with_libuna}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libuna}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libuna]) ]) ]) AS_IF( [test "x$ac_cv_with_libuna" = xno], [ac_cv_libuna=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libuna], [libuna >= 20120425], [ac_cv_libuna=yes], [ac_cv_libuna=no]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [ac_cv_libuna_CPPFLAGS="$pkg_cv_libuna_CFLAGS" ac_cv_libuna_LIBADD="$pkg_cv_libuna_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libuna.h]) AS_IF( [test "x$ac_cv_header_libuna_h" = xno], [ac_cv_libuna=no], [dnl Check for the individual functions ac_cv_libuna=yes AC_CHECK_LIB( una, libuna_get_version, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Base16 stream functions AC_CHECK_LIB( una, libuna_base16_stream_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base16_stream_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Base32 stream functions AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_from_base32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_to_base32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_quintuplet_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base32_stream_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Base64 stream functions AC_CHECK_LIB( una, libuna_base64_triplet_copy_from_base64_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_triplet_copy_to_base64_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_triplet_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_triplet_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_size_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_copy_to_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_base64_stream_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl Byte stream functions AC_CHECK_LIB( una, libuna_byte_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_byte_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-8 stream functions AC_CHECK_LIB( una, libuna_utf8_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-16 stream functions AC_CHECK_LIB( una, libuna_utf16_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-32 stream functions AC_CHECK_LIB( una, libuna_utf32_stream_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_stream_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-8 string functions AC_CHECK_LIB( una, libuna_utf8_string_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf8_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-16 string functions AC_CHECK_LIB( una, libuna_utf16_string_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_size_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf16_string_with_index_copy_from_utf32, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) dnl UTF-32 string functions AC_CHECK_LIB( una, libuna_utf32_string_size_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_byte_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf7_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf8_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf16_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf32_stream, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( libuna_utf32_string_with_index_copy_from_utf8, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_size_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) AC_CHECK_LIB( una, libuna_utf32_string_with_index_copy_from_utf16, [ac_cv_libuna_dummy=yes], [ac_cv_libuna=no]) ac_cv_libuna_LIBADD="-luna" ]) ]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_DEFINE( [HAVE_LIBUNA], [1], [Define to 1 if you have the `una' library (-luna).]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_SUBST( [HAVE_LIBUNA], [1]) ], [AC_SUBST( [HAVE_LIBUNA], [0]) ]) ]) dnl Function to detect how to enable libuna AC_DEFUN([AX_LIBUNA_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libuna], [libuna], [search for libuna in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBUNA_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libuna" != xyes], [ac_cv_libuna_CPPFLAGS="-I../libuna"; ac_cv_libuna_LIBADD="../libuna/libuna.la"; ac_cv_libuna=local AC_DEFINE( [HAVE_LOCAL_LIBUNA], [1], [Define to 1 if the local version of libuna is used.]) AC_SUBST( [HAVE_LOCAL_LIBUNA], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBUNA], [test "x$ac_cv_libuna" = xlocal]) AS_IF( [test "x$ac_cv_libuna_CPPFLAGS" != "x"], [AC_SUBST( [LIBUNA_CPPFLAGS], [$ac_cv_libuna_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libuna_LIBADD" != "x"], [AC_SUBST( [LIBUNA_LIBADD], [$ac_cv_libuna_LIBADD]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_SUBST( [ax_libuna_pc_libs_private], [-luna]) ]) AS_IF( [test "x$ac_cv_libuna" = xyes], [AC_SUBST( [ax_libuna_spec_requires], [libuna]) AC_SUBST( [ax_libuna_spec_build_requires], [libuna-devel]) ]) ]) libpff-20120802/m4/gettext.m40000644000175000017500000003457011502470476012422 00000000000000# gettext.m4 serial 60 (gettext-0.17) dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2006. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], ifelse([$1], [external], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. if test $gt_api_version -ge 3; then gt_revision_test_code=' #ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], [$gt_func_gnugettext_libintl], [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) libpff-20120802/m4/lib-prefix.m40000644000175000017500000001503611502470476012773 00000000000000# lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) libpff-20120802/m4/ltoptions.m40000644000175000017500000002725612006536007012765 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) libpff-20120802/m4/libfwnt.m40000644000175000017500000000576511753433732012411 00000000000000dnl Functions for libfwnt dnl dnl Version: 20120501 dnl Function to detect if libfwnt is available dnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFWNT_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfwnt" != x && test "x$ac_cv_with_libfwnt" != xno && test "x$ac_cv_with_libfwnt" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfwnt"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfwnt}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfwnt}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfwnt]) ]) ]) AS_IF( [test "x$ac_cv_with_libfwnt" = xno], [ac_cv_libfwnt=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfwnt], [libfwnt >= 20120426], [ac_cv_libfwnt=yes], [ac_cv_libfwnt=no]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [ac_cv_libfwnt_CPPFLAGS="$pkg_cv_libfwnt_CFLAGS" ac_cv_libfwnt_LIBADD="$pkg_cv_libfwnt_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfwnt.h]) AS_IF( [test "x$ac_cv_header_libfwnt_h" = xno], [ac_cv_libfwnt=no], [dnl Check for the individual functions ac_cv_libfwnt=yes AC_CHECK_LIB( fwnt, libfwnt_get_version, [ac_cv_libfwnt_dummy=yes], [ac_cv_libfwnt=no]) dnl TODO add functions ac_cv_libfwnt_LIBADD="-lfwnt" ]) ]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_DEFINE( [HAVE_LIBFWNT], [1], [Define to 1 if you have the `fwnt' library (-lfwnt).]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_SUBST( [HAVE_LIBFWNT], [1]) ], [AC_SUBST( [HAVE_LIBFWNT], [0]) ]) ]) dnl Function to detect how to enable libfwnt AC_DEFUN([AX_LIBFWNT_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfwnt], [libfwnt], [search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFWNT_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfwnt" != xyes], [ac_cv_libfwnt_CPPFLAGS="-I../libfwnt"; ac_cv_libfwnt_LIBADD="../libfwnt/libfwnt.la"; ac_cv_libfwnt=local AC_DEFINE( [HAVE_LOCAL_LIBFWNT], [1], [Define to 1 if the local version of libfwnt is used.]) AC_SUBST( [HAVE_LOCAL_LIBFWNT], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFWNT], [test "x$ac_cv_libfwnt" = xlocal]) AS_IF( [test "x$ac_cv_libfwnt_CPPFLAGS" != "x"], [AC_SUBST( [LIBFWNT_CPPFLAGS], [$ac_cv_libfwnt_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfwnt_LIBADD" != "x"], [AC_SUBST( [LIBFWNT_LIBADD], [$ac_cv_libfwnt_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_SUBST( [ax_libfwnt_pc_libs_private], [-lfwnt]) ]) AS_IF( [test "x$ac_cv_libfwnt" = xyes], [AC_SUBST( [ax_libfwnt_spec_requires], [libfwnt]) AC_SUBST( [ax_libfwnt_spec_build_requires], [libfwnt-devel]) ]) ]) libpff-20120802/m4/libcpath.m40000644000175000017500000001557112005152546012516 00000000000000dnl Functions for libcpath dnl dnl Version: 20120701 dnl Function to detect if libcpath is available dnl ac_libcpath_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCPATH_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcpath" != x && test "x$ac_cv_with_libcpath" != xno && test "x$ac_cv_with_libcpath" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcpath"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcpath}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcpath}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcpath]) ]) ]) AS_IF( [test "x$ac_cv_with_libcpath" = xno], [ac_cv_libcpath=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcpath], [libcpath >= 20120701], [ac_cv_libcpath=yes], [ac_cv_libcpath=no]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [ac_cv_libcpath_CPPFLAGS="$pkg_cv_libcpath_CFLAGS" ac_cv_libcpath_LIBADD="$pkg_cv_libcpath_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcpath.h]) AS_IF( [test "x$ac_cv_header_libcpath_h" = xno], [ac_cv_libcpath=no], [dnl Check for the individual functions ac_cv_libcpath=yes AC_CHECK_LIB( cpath, libcpath_get_version, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) dnl Path functions AC_CHECK_LIB( cpath, libcpath_path_change_directory, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_current_working_directory, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_full_path, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_join, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_make_directory, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize_filename, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cpath, libcpath_path_change_directory_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_current_working_directory_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_get_full_path_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_join_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_make_directory_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) AC_CHECK_LIB( cpath, libcpath_path_sanitize_filename_wide, [ac_cv_libcpath_dummy=yes], [ac_cv_libcpath=no]) ]) ac_cv_libcpath_LIBADD="-lcpath" ]) ]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_DEFINE( [HAVE_LIBCPATH], [1], [Define to 1 if you have the `cpath' library (-lcpath).]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_SUBST( [HAVE_LIBCPATH], [1]) ], [AC_SUBST( [HAVE_LIBCPATH], [0]) ]) ]) dnl Function to detect if mkdir is available dnl Also checks how to use mkdir AC_DEFUN([AX_LIBCPATH_CHECK_FUNC_MKDIR], [AC_CHECK_FUNCS([mkdir]) AS_IF( [test "x$ac_cv_func_mkdir" = xyes], [AC_MSG_CHECKING( [how to use mkdir]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[mkdir( "", 0 )]] )], [AC_MSG_RESULT( [with additional mode argument]) ac_cv_cv_mkdir_mode=yes], [ac_cv_cv_mkdir_mode=no]) AS_IF( [test "x$ac_cv_cv_mkdir_mode" = xno], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[mkdir( "" )]] )], [AC_MSG_RESULT( [with single argument]) ac_cv_cv_mkdir=yes], [ac_cv_cv_mkdir=no]) ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_cv_mkdir_mode" = xno && test "x$ac_cv_cv_mkdir" = xno], [AC_MSG_WARN( [unknown]) ac_cv_func_mkdir=no]) AS_IF( [test "x$ac_cv_func_mkdir" = xyes], [AC_DEFINE( [HAVE_MKDIR], [1], [Define to 1 if you have the mkdir function.]) ]) AS_IF( [test "x$ac_cv_cv_mkdir_mode" = xyes], [AC_DEFINE( [HAVE_MKDIR_MODE], [1], [Define to 1 if you have the mkdir function with a second mode argument.]) ]) ]) AS_IF( [test "x$ac_cv_func_mkdir" = xno], [AC_MSG_FAILURE( [Missing function: mkdir], [1]) ]) ]) dnl Function to detect if libcpath dependencies are available AC_DEFUN([AX_LIBCPATH_CHECK_LOCAL], [dnl Headers included in libcpath/libcpath_path.h AC_CHECK_HEADERS([errno.h sys/stat.h sys/syslimits.h]) dnl Path functions used in libcpath/libcpath_path.h AC_CHECK_FUNCS([chdir getcwd]) AS_IF( [test "x$ac_cv_func_chdir" != xyes], [AC_MSG_FAILURE( [Missing functions: chdir], [1]) ]) AS_IF( [test "x$ac_cv_func_getcwd" != xyes], [AC_MSG_FAILURE( [Missing functions: getcwd], [1]) ]) AX_LIBCPATH_CHECK_FUNC_MKDIR ac_cv_libcpath_CPPFLAGS="-I../libcpath"; ac_cv_libcpath_LIBADD="../libcpath/libcpath.la"; ac_cv_libcpath=local ]) dnl Function to detect how to enable libcpath AC_DEFUN([AX_LIBCPATH_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcpath], [libcpath], [search for libcpath in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCPATH_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcpath" != xyes], [AX_LIBCPATH_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCPATH], [1], [Define to 1 if the local version of libcpath is used.]) AC_SUBST( [HAVE_LOCAL_LIBCPATH], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCPATH], [test "x$ac_cv_libcpath" = xlocal]) AS_IF( [test "x$ac_cv_libcpath_CPPFLAGS" != "x"], [AC_SUBST( [LIBCPATH_CPPFLAGS], [$ac_cv_libcpath_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcpath_LIBADD" != "x"], [AC_SUBST( [LIBCPATH_LIBADD], [$ac_cv_libcpath_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_SUBST( [ax_libcpath_pc_libs_private], [-lcpath]) ]) AS_IF( [test "x$ac_cv_libcpath" = xyes], [AC_SUBST( [ax_libcpath_spec_requires], [libcpath]) AC_SUBST( [ax_libcpath_spec_build_requires], [libcpath-devel]) ]) ]) libpff-20120802/m4/lib-ld.m40000644000175000017500000000653111502470476012075 00000000000000# lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) libpff-20120802/m4/lib-link.m40000644000175000017500000007205511502470476012437 00000000000000# lib-link.m4 serial 13 (gettext-0.17) dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.54) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Autoconf >= 2.61 supports dots in --with options. define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIB[]NAME[]_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) libpff-20120802/m4/libcsystem.m40000644000175000017500000001774611753433515013123 00000000000000dnl Functions for libcsystem dnl dnl Version: 20120501 dnl Function to detect if libcsystem is available dnl ac_libcsystem_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCSYSTEM_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcsystem" != x && test "x$ac_cv_with_libcsystem" != xno && test "x$ac_cv_with_libcsystem" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcsystem"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcsystem}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsystem}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcsystem]) ]) ]) AS_IF( [test "x$ac_cv_with_libcsystem" = xno], [ac_cv_libcsystem=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcsystem], [libcsystem >= 20120425], [ac_cv_libcsystem=yes], [ac_cv_libcsystem=no]) ]) AS_IF( [test "x$ac_cv_libcsystem" = xyes], [ac_cv_libcsystem_CPPFLAGS="$pkg_cv_libcsystem_CFLAGS" ac_cv_libcsystem_LIBADD="$pkg_cv_libcsystem_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcsystem.h]) AS_IF( [test "x$ac_cv_header_libcsystem_h" = xno], [ac_cv_libcsystem=no], [dnl Check for the individual functions ac_cv_libcsystem=yes AC_CHECK_LIB( csystem, libcsystem_get_version, [ac_cv_libcsystem_dummy=yes], [ac_cv_libcsystem=no]) dnl TODO add functions ac_cv_libcsystem_LIBADD="-lcsystem" ]) ]) ]) AS_IF( [test "x$ac_cv_libcsystem" = xyes], [AC_DEFINE( [HAVE_LIBCSYSTEM], [1], [Define to 1 if you have the `csystem' library (-lcsystem).]) ]) AS_IF( [test "x$ac_cv_libcsystem" = xyes], [AC_SUBST( [HAVE_LIBCSYSTEM], [1]) ], [AC_SUBST( [HAVE_LIBCSYSTEM], [0]) ]) ]) dnl Function to detect if ctime_r or ctime is available dnl Also checks how to use ctime_r AC_DEFUN([AX_LIBCSYSTEM_CHECK_FUNC_CTIME], [AC_CHECK_FUNCS([ctime_r]) AS_IF( [test "x$ac_cv_func_ctime_r" = xyes], [AC_MSG_CHECKING( [how to use ctime_r]) AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ctime_r( NULL, NULL, 0 )]] )], [AC_MSG_RESULT( [with additional size argument]) ac_cv_cv_ctime_r_size=yes], [ac_cv_cv_ctime_r_size=no]) AS_IF( [test "x$ac_cv_cv_ctime_r_size" = xno], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ctime_r( NULL, NULL )]] )], [AC_MSG_RESULT( [with two arguments]) ac_cv_cv_ctime_r_posix=yes], [ac_cv_cv_ctime_r_posix=no]) ]) AS_IF( [test "x$ac_cv_cv_ctime_r_posix" = xno], [CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[ctime_r( NULL, NULL )]] )], [AC_MSG_RESULT( [with two arguments and definition _POSIX_PTHREAD_SEMANTICS]) ac_cv_cv_ctime_r_posix=yes], [ac_cv_cv_ctime_r_posix=no]) ]) AC_LANG_POP(C) AS_IF( [test "x$ac_cv_cv_ctime_r_size" = xno && test "x$ac_cv_cv_ctime_r_posix" = xno], [AC_MSG_WARN( [unknown]) ac_cv_func_ctime_r=no]) AS_IF( [test "x$ac_cv_func_ctime_r" = xyes], [AC_DEFINE( [HAVE_CTIME_R], [1], [Define to 1 if you have the ctime_r function.]) ]) AS_IF( [test "x$ac_cv_cv_ctime_r_size" = xyes], [AC_DEFINE( [HAVE_CTIME_R_SIZE], [1], [Define to 1 if you have the ctime_r function with a third size argument.]) ]) ]) AS_IF( [test "x$ac_cv_func_ctime_r" = xno], [AC_CHECK_FUNCS([ctime]) AS_IF( [test "x$ac_cv_func_ctime" = xno], [AC_MSG_FAILURE( [Missing function: ctime_r and ctime], [1]) ]) ]) ]) dnl Function to detect if libcsystem dependencies are available AC_DEFUN([AX_LIBCSYSTEM_CHECK_LOCAL], [dnl Types used in libcsystem/libcsystem_date_time.c AC_STRUCT_TM dnl Headers included in libcsystem/libcsystem_file.h, libcsystem/libcsystem_glob.h, dnl and libcsystem/libcsystem_notify.h AC_CHECK_HEADERS([errno.h]) dnl Headers included in libcsystem/libcsystem_file_io.h AC_CHECK_HEADERS([fcntl.h unistd.h sys/stat.h]) dnl Headers included in libcsystem/libcsystem_date_time.h AC_HEADER_TIME dnl Headers included in libcsystem/libcsystem_glob.h AC_CHECK_HEADERS([glob.h]) AS_IF( [test "x$ac_cv_header_glob_h" = xno], [AC_CHECK_HEADERS([io.h]) ]) dnl Headers included in libcsystem/libcsystem_signal.h AC_CHECK_HEADERS([signal.h sys/signal.h]) dnl File input/output functions used in libcsystem/libcsystem_file_io.h AC_CHECK_FUNCS([close fstat ftruncate lseek open read stat write]) AS_IF( [test "x$ac_cv_func_close" != xyes], [AC_MSG_FAILURE( [Missing function: close], [1]) ]) AS_IF( [test "x$ac_cv_func_fstat" != xyes], [AC_MSG_FAILURE( [Missing function: fstat], [1]) ]) AS_IF( [test "x$ac_cv_func_ftruncate" != xyes], [AC_MSG_FAILURE( [Missing function: ftruncate], [1]) ]) AS_IF( [test "x$ac_cv_func_lseek" != xyes], [AC_MSG_FAILURE( [Missing function: lseek], [1]) ]) AS_IF( [test "x$ac_cv_func_open" != xyes], [AC_MSG_FAILURE( [Missing function: open], [1]) ]) AS_IF( [test "x$ac_cv_func_read" != xyes], [AC_MSG_FAILURE( [Missing function: read], [1]) ]) AS_IF( [test "x$ac_cv_func_stat" != xyes], [AC_MSG_FAILURE( [Missing function: stat], [1]) ]) AS_IF( [test "x$ac_cv_func_write" != xyes], [AC_MSG_FAILURE( [Missing function: write], [1]) ]) dnl Date and time functions used in libcsystem/libcsystem_date_time.c AC_CHECK_FUNCS([localtime localtime_r mktime]) AS_IF( [test "x$ac_cv_func_localtime" != xyes && test "x$ac_cv_func_localtime_r" != xyes], [AC_MSG_FAILURE( [Missing functions: localtime and localtime_r], [1]) ]) AS_IF( [test "x$ac_cv_func_mktime" != xyes], [AC_MSG_FAILURE( [Missing function: mktime], [1]) ]) dnl Date and time functions used in libcsystem/libcsystem_date_time.h AX_LIBCSYSTEM_CHECK_FUNC_CTIME AC_CHECK_FUNCS([gmtime gmtime_r time]) AS_IF( [test "x$ac_cv_func_gmtime" != xyes && test "x$ac_cv_func_gmtime_r" != xyes], [AC_MSG_FAILURE( [Missing functions: gmtime_r and gmtime], [1]) ]) AS_IF( [test "x$ac_cv_func_time" != xyes], [AC_MSG_FAILURE( [Missing function: time], [1]) ]) dnl Commandline argument/option parsing functions in libcsystem/libcsystem_getopt.h AC_CHECK_FUNCS([getopt]) dnl Check for IO buffering functions in libcsystem/libcsystem_support.c AC_CHECK_FUNCS([setvbuf]) dnl Check for internationalization functions in libcsystem/libcsystem_support.c AC_CHECK_FUNCS([bindtextdomain textdomain]) ac_cv_libcsystem_CPPFLAGS="-I../libcsystem"; ac_cv_libcsystem_LIBADD="../libcsystem/libcsystem.la"; ac_cv_libcsystem=local ]) dnl Function to detect how to enable libcsystem AC_DEFUN([AX_LIBCSYSTEM_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcsystem], [libcsystem], [search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCSYSTEM_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcsystem" != xyes], [AX_LIBCSYSTEM_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCSYSTEM], [1], [Define to 1 if the local version of libcsystem is used.]) AC_SUBST( [HAVE_LOCAL_LIBCSYSTEM], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCSYSTEM], [test "x$ac_cv_libcsystem" = xlocal]) AS_IF( [test "x$ac_cv_libcsystem_CPPFLAGS" != "x"], [AC_SUBST( [LIBCSYSTEM_CPPFLAGS], [$ac_cv_libcsystem_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcsystem_LIBADD" != "x"], [AC_SUBST( [LIBCSYSTEM_LIBADD], [$ac_cv_libcsystem_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcsystem" = xyes], [AC_SUBST( [ax_libcsystem_pc_libs_private], [-lstring]) ]) AS_IF( [test "x$ac_cv_libcsystem" = xyes], [AC_SUBST( [ax_libcsystem_spec_requires], [libcsystem]) AC_SUBST( [ax_libcsystem_spec_build_requires], [libcsystem-devel]) ]) ]) libpff-20120802/m4/python.m40000644000175000017500000000346211647207225012253 00000000000000dnl Functions for Python bindings dnl dnl Version: 20111006 dnl Function to detect if Python build environment is available AC_DEFUN([AX_PYTHON_CHECK], [AC_REQUIRE([AM_PATH_PYTHON]) dnl Check for Python include path AC_MSG_CHECKING( [for Python include path]) PYTHON_INCLUDE_DIR=`$PYTHON -c "import distutils.sysconfig;print distutils.sysconfig.get_python_inc() "`; AC_MSG_RESULT( [$PYTHON_INCLUDE_DIR]) AC_SUBST( [PYTHON_CPPFLAGS], [-I$PYTHON_INCLUDE_DIR]) AS_IF( [test ! -r $PYTHON_INCLUDE_DIR/Python.h], [AC_MSG_ERROR( [Missing Python include file]) ]) dnl Check for Python library path AC_MSG_CHECKING( [for Python library path]) python_path=`$PYTHON -c "import distutils.sysconfig;print distutils.sysconfig.get_python_lib() "`; AC_MSG_RESULT( [$python_path]) AC_SUBST( [PYTHON_LDFLAGS], ["-L$python_path -lpython$PYTHON_VERSION"]) python_site=`echo $python_path | sed "s/config/site-packages/"`; AC_SUBST( [PYTHON_SITE_PKG], [$python_site]) dnl Determine the Python libraries which must be linked in when embedding AC_MSG_CHECKING( [for Python extra libraries]) PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig;conf = distutils.sysconfig.get_config_var;print conf('LOCALMODLIBS')+' '+conf('LIBS')"`; AC_MSG_RESULT( [$PYTHON_EXTRA_LIBS]) AC_SUBST( [PYTHON_EXTRA_LIBS]) ]) dnl Function to detect if to enable Python AC_DEFUN([AX_PYTHON_CHECK_ENABLE], [AX_COMMON_ARG_ENABLE( [python], [python], [build Python bindings], [no]) AS_IF( [test "x$ac_cv_enable_python" != xno], [AM_PATH_PYTHON([2.5]) AX_PYTHON_CHECK ac_cv_enable_python=yes]) AS_IF( [test "x$ac_cv_enable_python" = xyes], [AC_DEFINE( [HAVE_PYTHON], [1], [Define to 1 if you have Python]) ]) AM_CONDITIONAL( HAVE_PYTHON, [test "x$ac_cv_enable_python" = xyes]) ]) libpff-20120802/m4/libtool.m40000644000175000017500000104515512006536007012375 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS libpff-20120802/m4/nls.m40000644000175000017500000000226611502470476011527 00000000000000# nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) libpff-20120802/m4/libclocale.m40000644000175000017500000001372711753433503013026 00000000000000dnl Functions for libclocale dnl dnl Version: 20120509 dnl Function to detect if libclocale is available dnl ac_libclocale_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCLOCALE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libclocale" != x && test "x$ac_cv_with_libclocale" != xno && test "x$ac_cv_with_libclocale" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libclocale"], [CFLAGS="$CFLAGS -I${ac_cv_with_libclocale}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libclocale}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libclocale]) ]) ]) AS_IF( [test "x$ac_cv_with_libclocale" = xno], [ac_cv_libclocale=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libclocale], [libclocale >= 20120425], [ac_cv_libclocale=yes], [ac_cv_libclocale=no]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [ac_cv_libclocale_CPPFLAGS="$pkg_cv_libclocale_CFLAGS" ac_cv_libclocale_LIBADD="$pkg_cv_libclocale_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libclocale.h]) AS_IF( [test "x$ac_cv_header_libclocale_h" = xno], [ac_cv_libclocale=no], [dnl Check for the individual functions ac_cv_libclocale=yes AC_CHECK_LIB( clocale, libclocale_get_version, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) dnl Codepage functions AC_CHECK_LIB( clocale, libclocale_codepage, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_codepage_get, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_codepage_set, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_codepage_copy_from_string, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( clocale, libclocale_codepage_copy_from_string_wide, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) ]) dnl Locale functions AC_CHECK_LIB( clocale, libclocale_locale_get_codepage, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) AC_CHECK_LIB( clocale, libclocale_locale_get_decimal_point, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) dnl Support functions AC_CHECK_LIB( clocale, libclocale_initialize, [ac_cv_libclocale_dummy=yes], [ac_cv_libclocale=no]) ac_cv_libclocale_LIBADD="-lclocale" ]) ]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_DEFINE( [HAVE_LIBCLOCALE], [1], [Define to 1 if you have the `clocale' library (-lclocale).]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_SUBST( [HAVE_LIBCLOCALE], [1]) ], [AC_SUBST( [HAVE_LIBCLOCALE], [0]) ]) ]) dnl Function to detect whether nl_langinfo supports CODESET AC_DEFUN([AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET], [AC_CHECK_FUNCS([nl_langinfo]) AS_IF( [test "x$ac_cv_func_nl_langinfo" = xyes], [AC_CACHE_CHECK( [for nl_langinfo CODESET support], [ac_cv_cv_langinfo_codeset], [AC_LANG_PUSH(C) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[char* charset = nl_langinfo( CODESET );]] )], [ac_cv_cv_langinfo_codeset=yes], [ac_cv_cv_langinfo_codeset=no]) AC_LANG_POP(C) ]) ], [ac_cv_cv_langinfo_codeset=no]) AS_IF( [test "x$ac_cv_cv_langinfo_codeset" = xyes], [AC_DEFINE( [HAVE_LANGINFO_CODESET], [1], [Define if nl_langinfo has CODESET support.]) ]) ]) dnl Function to detect if libclocale dependencies are available AC_DEFUN([AX_LIBCLOCALE_CHECK_LOCAL], [dnl Headers included in libclocale/libclocale_locale.c AC_CHECK_HEADERS([langinfo.h locale.h]) dnl Check for environment functions in libclocale/libclocale_locale.c AC_CHECK_FUNCS([getenv]) AS_IF( [test "x$ac_cv_func_getenv" != xyes], [AC_MSG_FAILURE( [Missing function: getenv], [1]) ]) dnl Check for localization functions in libclocale/libclocale_locale.c AS_IF( [test "x$ac_cv_enable_winapi" = xno], [AC_CHECK_FUNCS([localeconv]) AS_IF( [test "x$ac_cv_func_localeconv" != xyes], [AC_MSG_FAILURE( [Missing function: localeconv], [1]) ]) ]) AC_CHECK_FUNCS([setlocale]) AS_IF( [test "x$ac_cv_func_setlocale" != xyes], [AC_MSG_FAILURE( [Missing function: setlocale], [1]) ]) AX_LIBCLOCALE_CHECK_FUNC_LANGINFO_CODESET ac_cv_libclocale_CPPFLAGS="-I../libclocale"; ac_cv_libclocale_LIBADD="../libclocale/libclocale.la"; ac_cv_libclocale=local ]) dnl Function to detect how to enable libclocale AC_DEFUN([AX_LIBCLOCALE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libclocale], [libclocale], [search for libclocale in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCLOCALE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libclocale" != xyes], [AX_LIBCLOCALE_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCLOCALE], [1], [Define to 1 if the local version of libclocale is used.]) AC_SUBST( [HAVE_LOCAL_LIBCLOCALE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCLOCALE], [test "x$ac_cv_libclocale" = xlocal]) AS_IF( [test "x$ac_cv_libclocale_CPPFLAGS" != "x"], [AC_SUBST( [LIBCLOCALE_CPPFLAGS], [$ac_cv_libclocale_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libclocale_LIBADD" != "x"], [AC_SUBST( [LIBCLOCALE_LIBADD], [$ac_cv_libclocale_LIBADD]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_SUBST( [ax_libclocale_pc_libs_private], [-lclocale]) ]) AS_IF( [test "x$ac_cv_libclocale" = xyes], [AC_SUBST( [ax_libclocale_spec_requires], [libclocale]) AC_SUBST( [ax_libclocale_spec_build_requires], [libclocale-devel]) ]) ]) libpff-20120802/m4/libfdata.m40000644000175000017500000000607711753433655012513 00000000000000dnl Functions for libfdata dnl dnl Version: 20120501 dnl Function to detect if libfdata is available dnl ac_libfdata_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFDATA_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfdata" != x && test "x$ac_cv_with_libfdata" != xno && test "x$ac_cv_with_libfdata" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfdata"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfdata}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdata}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfdata]) ]) ]) AS_IF( [test "x$ac_cv_with_libfdata" = xno], [ac_cv_libfdata=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdata], [libfdata >= 20120405], [ac_cv_libfdata=yes], [ac_cv_libfdata=no]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [ac_cv_libfdata_CPPFLAGS="$pkg_cv_libfdata_CFLAGS" ac_cv_libfdata_LIBADD="$pkg_cv_libfdata_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfdata.h]) AS_IF( [test "x$ac_cv_header_libfdata_h" = xno], [ac_cv_libfdata=no], [dnl Check for the individual functions ac_cv_libfdata=yes AC_CHECK_LIB( fdata, libfdata_get_version, [ac_cv_libfdata_dummy=yes], [ac_cv_libfdata=no]) dnl TODO add functions ac_cv_libfdata_LIBADD="-lfdata" ]) ]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_DEFINE( [HAVE_LIBFDATA], [1], [Define to 1 if you have the `fdata' library (-lfdata).]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_SUBST( [HAVE_LIBFDATA], [1]) ], [AC_SUBST( [HAVE_LIBFDATA], [0]) ]) ]) dnl Function to detect how to enable libfdata AC_DEFUN([AX_LIBFDATA_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfdata], [libfdata], [search for libfdata in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFDATA_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfdata" != xyes], [ac_cv_libfdata_CPPFLAGS="-I../libfdata"; ac_cv_libfdata_LIBADD="../libfdata/libfdata.la"; ac_cv_libfdata=local AC_DEFINE( [HAVE_LOCAL_LIBFDATA], [1], [Define to 1 if the local version of libfdata is used.]) AC_SUBST( [HAVE_LOCAL_LIBFDATA], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFDATA], [test "x$ac_cv_libfdata" = xlocal]) AS_IF( [test "x$ac_cv_libfdata_CPPFLAGS" != "x"], [AC_SUBST( [LIBFDATA_CPPFLAGS], [$ac_cv_libfdata_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfdata_LIBADD" != "x"], [AC_SUBST( [LIBFDATA_LIBADD], [$ac_cv_libfdata_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_SUBST( [ax_libfdata_pc_libs_private], [-lfdata]) ]) AS_IF( [test "x$ac_cv_libfdata" = xyes], [AC_SUBST( [ax_libfdata_spec_requires], [libfdata]) AC_SUBST( [ax_libfdata_spec_build_requires], [libfdata-devel]) ]) ]) libpff-20120802/m4/libfdatetime.m40000644000175000017500000003132511765041673013366 00000000000000dnl Functions for libfdatetime dnl dnl Version: 20120522 dnl Function to detect if libfdatetime is available dnl ac_libfdatetime_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFDATETIME_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfdatetime" != x && test "x$ac_cv_with_libfdatetime" != xno && test "x$ac_cv_with_libfdatetime" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfdatetime"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfdatetime}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfdatetime}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfdatetime]) ]) ]) AS_IF( [test "x$ac_cv_with_libfdatetime" = xno], [ac_cv_libfdatetime=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfdatetime], [libfdatetime >= 20120522], [ac_cv_libfdatetime=yes], [ac_cv_libfdatetime=no]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [ac_cv_libfdatetime_CPPFLAGS="$pkg_cv_libfdatetime_CFLAGS" ac_cv_libfdatetime_LIBADD="$pkg_cv_libfdatetime_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfdatetime.h]) AS_IF( [test "x$ac_cv_header_libfdatetime_h" = xno], [ac_cv_libfdatetime=no], [dnl Check for the individual functions ac_cv_libfdatetime=yes AC_CHECK_LIB( fdatetime, libfdatetime_get_version, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl FAT date time functions AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_from_uint32, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_fat_date_time_copy_to_utf32_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl Filetime functions AC_CHECK_LIB( fdatetime, libfdatetime_filetime_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_from_uint64, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_copy_to_utf32_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_filetime_add, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl Floatingtime functions AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_from_uint64, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_floatingtime_copy_to_utf32_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl NSF timedate functions AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_from_uint64, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_nsf_timedate_copy_to_utf32_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl POSIX time functions AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_from_uint32, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_from_uint64, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_posix_time_copy_to_utf32_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) dnl Systemtime functions AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_initialize, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_free, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_from_byte_stream, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_from_uint64, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_to_utf8_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_to_utf8_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_to_utf16_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_to_utf16_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_to_utf32_string, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) AC_CHECK_LIB( fdatetime, libfdatetime_systemetime_copy_to_utf32_string_with_index, [ac_cv_libfdatetime_dummy=yes], [ac_cv_libfdatetime=no]) ac_cv_libfdatetime_LIBADD="-lfdatetime" ]) ]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_DEFINE( [HAVE_LIBFDATETIME], [1], [Define to 1 if you have the `fdatetime' library (-lfdatetime).]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_SUBST( [HAVE_LIBFDATETIME], [1]) ], [AC_SUBST( [HAVE_LIBFDATETIME], [0]) ]) ]) dnl Function to detect how to enable libfdatetime AC_DEFUN([AX_LIBFDATETIME_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfdatetime], [libfdatetime], [search for libfdatetime in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) AX_LIBFDATETIME_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfdatetime" != xyes], [ac_cv_libfdatetime_CPPFLAGS="-I../libfdatetime"; ac_cv_libfdatetime_LIBADD="../libfdatetime/libfdatetime.la"; ac_cv_libfdatetime=local AC_DEFINE( [HAVE_LOCAL_LIBFDATETIME], [1], [Define to 1 if the local version of libfdatetime is used.]) AC_SUBST( [HAVE_LOCAL_LIBFDATETIME], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFDATETIME], [test "x$ac_cv_libfdatetime" = xlocal]) AS_IF( [test "x$ac_cv_libfdatetime_CPPFLAGS" != "x"], [AC_SUBST( [LIBFDATETIME_CPPFLAGS], [$ac_cv_libfdatetime_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfdatetime_LIBADD" != "x"], [AC_SUBST( [LIBFDATETIME_LIBADD], [$ac_cv_libfdatetime_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_SUBST( [ax_libfdatetime_pc_libs_private], [-lfdatetime]) ]) AS_IF( [test "x$ac_cv_libfdatetime" = xyes], [AC_SUBST( [ax_libfdatetime_spec_requires], [libfdatetime]) AC_SUBST( [ax_libfdatetime_spec_build_requires], [libfdatetime-devel]) ]) ]) libpff-20120802/m4/libcnotify.m40000644000175000017500000001112511753433606013071 00000000000000dnl Functions for libcnotify dnl dnl Version: 20120501 dnl Function to detect if libcnotify is available dnl ac_libcnotify_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCNOTIFY_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcnotify" != x && test "x$ac_cv_with_libcnotify" != xno && test "x$ac_cv_with_libcnotify" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcnotify"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcnotify}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcnotify}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcnotify]) ]) ]) AS_IF( [test "x$ac_cv_with_libcnotify" = xno], [ac_cv_libcnotify=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcnotify], [libcnotify >= 20120425], [ac_cv_libcnotify=yes], [ac_cv_libcnotify=no]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [ac_cv_libcnotify_CPPFLAGS="$pkg_cv_libcnotify_CFLAGS" ac_cv_libcnotify_LIBADD="$pkg_cv_libcnotify_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcnotify.h]) AS_IF( [test "x$ac_cv_header_libcnotify_h" = xno], [ac_cv_libcnotify=no], [dnl Check for the individual functions ac_cv_libcnotify=yes AC_CHECK_LIB( cnotify, libcnotify_get_version, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) dnl Print functions AC_CHECK_LIB( cnotify, libcnotify_printf, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_print_data, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_print_error_backtrace, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) dnl Stream functions AC_CHECK_LIB( cnotify, libcnotify_stream_set, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_stream_open, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) AC_CHECK_LIB( cnotify, libcnotify_stream_close, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) dnl Verbose functions AC_CHECK_LIB( cnotify, libcnotify_verbose_set, [ac_cv_libcnotify_dummy=yes], [ac_cv_libcnotify=no]) ac_cv_libcnotify_LIBADD="-lcnotify" ]) ]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_DEFINE( [HAVE_LIBCNOTIFY], [1], [Define to 1 if you have the `cnotify' library (-lcnotify).]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_SUBST( [HAVE_LIBCNOTIFY], [1]) ], [AC_SUBST( [HAVE_LIBCNOTIFY], [0]) ]) ]) dnl Function to detect if libcnotify dependencies are available AC_DEFUN([AX_LIBCNOTIFY_CHECK_LOCAL], [dnl Headers included in libcnotify/libcnotify_print.c AC_CHECK_HEADERS([stdarg.h varargs.h]) AS_IF( [test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes], [AC_MSG_FAILURE( [Missing headers: stdarg.h and varargs.h], [1]) ]) dnl Headers included in libcnotify/libcnotify_stream.c AC_CHECK_HEADERS([errno.h]) ac_cv_libcnotify_CPPFLAGS="-I../libcnotify"; ac_cv_libcnotify_LIBADD="../libcnotify/libcnotify.la"; ac_cv_libcnotify=local ]) dnl Function to detect how to enable libcnotify AC_DEFUN([AX_LIBCNOTIFY_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcnotify], [libcnotify], [search for libcnotify in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCNOTIFY_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcnotify" != xyes], [AX_LIBCNOTIFY_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCNOTIFY], [1], [Define to 1 if the local version of libcnotify is used.]) AC_SUBST( [HAVE_LOCAL_LIBCNOTIFY], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCNOTIFY], [test "x$ac_cv_libcnotify" = xlocal]) AS_IF( [test "x$ac_cv_libcnotify_CPPFLAGS" != "x"], [AC_SUBST( [LIBCNOTIFY_CPPFLAGS], [$ac_cv_libcnotify_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcnotify_LIBADD" != "x"], [AC_SUBST( [LIBCNOTIFY_LIBADD], [$ac_cv_libcnotify_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_SUBST( [ax_libcnotify_pc_libs_private], [-lcnotify]) ]) AS_IF( [test "x$ac_cv_libcnotify" = xyes], [AC_SUBST( [ax_libcnotify_spec_requires], [libcnotify]) AC_SUBST( [ax_libcnotify_spec_build_requires], [libcnotify-devel]) ]) ]) libpff-20120802/m4/ltversion.m40000644000175000017500000000125612006536007012747 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) libpff-20120802/m4/progtest.m40000644000175000017500000000555011502470476012601 00000000000000# progtest.m4 serial 4 (gettext-0.14.2) dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1996. AC_PREREQ(2.50) # Search path for a program which passes the given test. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN([AM_PATH_PROG_WITH_TEST], [ # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Find out how to test for executable files. Don't use a zero-byte file, # as systems may use methods other than mode bits to determine executability. cat >conf$$.file <<_ASEOF #! /bin/sh exit 0 _ASEOF chmod +x conf$$.file if test -x conf$$.file >/dev/null 2>&1; then ac_executable_p="test -x" else ac_executable_p="test -f" fi rm -f conf$$.file # Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in ifelse([$5], , $PATH, [$5]); do IFS="$ac_save_IFS" test -z "$ac_dir" && ac_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" break 2 fi fi done done IFS="$ac_save_IFS" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) libpff-20120802/m4/lt~obsolete.m40000644000175000017500000001375612006536007013304 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) libpff-20120802/m4/libcfile.m40000644000175000017500000002130111765041176012475 00000000000000dnl Functions for libcfile dnl dnl Version: 20120526 dnl Function to detect if libcfile is available dnl ac_libcfile_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCFILE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcfile" != x && test "x$ac_cv_with_libcfile" != xno && test "x$ac_cv_with_libcfile" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcfile"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcfile}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcfile}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcfile]) ]) ]) AS_IF( [test "x$ac_cv_with_libcfile" = xno], [ac_cv_libcfile=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcfile], [libcfile >= 20120526], [ac_cv_libcfile=yes], [ac_cv_libcfile=no]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes], [ac_cv_libcfile_CPPFLAGS="$pkg_cv_libcfile_CFLAGS" ac_cv_libcfile_LIBADD="$pkg_cv_libcfile_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcfile.h]) AS_IF( [test "x$ac_cv_header_libcfile_h" = xno], [ac_cv_libcfile=no], [dnl Check for the individual functions ac_cv_libcfile=yes AC_CHECK_LIB( cfile, libcfile_get_version, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) dnl File functions AC_CHECK_LIB( cfile, libcfile_file_initialize, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_free, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_open, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_close, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_read_buffer, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_write_buffer, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_seek_offset, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_resize, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_is_open, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_get_offset, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_file_get_size, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cfile, libcfile_file_open_wide, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) ]) dnl File stream functions AC_CHECK_LIB( cfile, libcfile_stream_initialize, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_free, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_open, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_close, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_read_buffer, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_write_buffer, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_seek_offset, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_get_offset, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AC_CHECK_LIB( cfile, libcfile_stream_get_size, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cfile, libcfile_stream_open_wide, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) ]) dnl Support functions AC_CHECK_LIB( cfile, libcfile_file_exists, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( cfile, libcfile_file_exists_wide, [ac_cv_libcfile_dummy=yes], [ac_cv_libcfile=no]) ]) ac_cv_libcfile_LIBADD="-lcfile" ]) ]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes], [AC_DEFINE( [HAVE_LIBCFILE], [1], [Define to 1 if you have the `cfile' library (-lcfile).]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes], [AC_SUBST( [HAVE_LIBCFILE], [1]) ], [AC_SUBST( [HAVE_LIBCFILE], [0]) ]) ]) dnl Function to detect if libcfile dependencies are available AC_DEFUN([AX_LIBCFILE_CHECK_LOCAL], [dnl Headers included in libcfile/libcfile_file.h and libcfile/libcfile_support.h AC_CHECK_HEADERS([errno.h sys/stat.h]) dnl Headers included in libcfile/libcfile_file.h AC_CHECK_HEADERS([fcntl.h unistd.h]) dnl File input/output functions used in libcfile/libcfile_file.h AC_CHECK_FUNCS([close fstat ftruncate lseek open read write]) AS_IF( [test "x$ac_cv_func_close" != xyes], [AC_MSG_FAILURE( [Missing function: close], [1]) ]) AS_IF( [test "x$ac_cv_func_fstat" != xyes], [AC_MSG_FAILURE( [Missing function: fstat], [1]) ]) AS_IF( [test "x$ac_cv_func_ftruncate" != xyes], [AC_MSG_FAILURE( [Missing function: ftruncate], [1]) ]) AS_IF( [test "x$ac_cv_func_lseek" != xyes], [AC_MSG_FAILURE( [Missing function: lseek], [1]) ]) AS_IF( [test "x$ac_cv_func_open" != xyes], [AC_MSG_FAILURE( [Missing function: open], [1]) ]) AS_IF( [test "x$ac_cv_func_read" != xyes], [AC_MSG_FAILURE( [Missing function: read], [1]) ]) AS_IF( [test "x$ac_cv_func_write" != xyes], [AC_MSG_FAILURE( [Missing function: write], [1]) ]) dnl File stream functions used in libcfile/libcfile_stream.h AC_CHECK_FUNCS([fclose feof fopen fread fseeko fseeko64 ftello ftello64 fwrite]) AS_IF( [test "x$ac_cv_func_fclose" != xyes], [AC_MSG_FAILURE( [Missing function: fclose], [1]) ]) AS_IF( [test "x$ac_cv_func_feof" != xyes], [AC_MSG_FAILURE( [Missing function: feof], [1]) ]) AS_IF( [test "x$ac_cv_func_fgets" != xyes], [AC_MSG_FAILURE( [Missing function: fgets], [1]) ]) AS_IF( [test "x$ac_cv_func_fopen" != xyes], [AC_MSG_FAILURE( [Missing function: fopen], [1]) ]) AS_IF( [test "x$ac_cv_func_fread" != xyes], [AC_MSG_FAILURE( [Missing function: fread], [1]) ]) AS_IF( [test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes], [AC_MSG_FAILURE( [Missing function: fseeko and fseeko64], [1]) ]) AS_IF( [test "x$ac_cv_func_ftello" != xyes && test "x$ac_cv_func_ftello64" != xyes], [AC_MSG_FAILURE( [Missing function: ftello and ftello64], [1]) ]) AS_IF( [test "x$ac_cv_func_fwrite" != xyes], [AC_MSG_FAILURE( [Missing function: fwrite], [1]) ]) dnl File input/output functions used in libcfile/libcfile_support.h AC_CHECK_FUNCS([stat]) AS_IF( [test "x$ac_cv_func_stat" != xyes], [AC_MSG_FAILURE( [Missing function: stat], [1]) ]) ac_cv_libcfile_CPPFLAGS="-I../libcfile"; ac_cv_libcfile_LIBADD="../libcfile/libcfile.la"; ac_cv_libcfile=local ]) dnl Function to detect how to enable libcfile AC_DEFUN([AX_LIBCFILE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcfile], [libcfile], [search for libcfile in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCFILE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcfile" != xyes], [AX_LIBCFILE_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCFILE], [1], [Define to 1 if the local version of libcfile is used.]) AC_SUBST( [HAVE_LOCAL_LIBCFILE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCFILE], [test "x$ac_cv_libcfile" = xlocal]) AS_IF( [test "x$ac_cv_libcfile_CPPFLAGS" != "x"], [AC_SUBST( [LIBCFILE_CPPFLAGS], [$ac_cv_libcfile_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcfile_LIBADD" != "x"], [AC_SUBST( [LIBCFILE_LIBADD], [$ac_cv_libcfile_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes], [AC_SUBST( [ax_libcfile_pc_libs_private], [-lcfile]) ]) AS_IF( [test "x$ac_cv_libcfile" = xyes], [AC_SUBST( [ax_libcfile_spec_requires], [libcfile]) AC_SUBST( [ax_libcfile_spec_build_requires], [libcfile-devel]) ]) ]) libpff-20120802/m4/libcstring.m40000644000175000017500000001603611753433475013101 00000000000000dnl Functions for libcstring dnl dnl Version: 20120501 dnl Function to detect if libcstring is available dnl ac_libcstring_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCSTRING_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcstring" != x && test "x$ac_cv_with_libcstring" != xno && test "x$ac_cv_with_libcstring" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcstring"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcstring}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcstring}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcstring]) ]) ]) AS_IF( [test "x$ac_cv_with_libcstring" = xno], [ac_cv_libcstring=no], [AS_IF( [test "x$ac_cv_header_libcstring_h" = xno], [ac_cv_libcstring=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcstring], [libcstring >= 20120425], [ac_cv_libcstring=yes], [ac_cv_libcstring=no]) ]) ]) AS_IF( [test "x$ac_cv_libcstring" = xyes], [ac_cv_libcstring_CPPFLAGS="$pkg_cv_libcstring_CFLAGS" ac_cv_libcstring_LIBADD="$pkg_cv_libcstring_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcstring.h]) AS_IF( [test "x$ac_cv_with_libcstring" = xno], [ac_cv_libcstring=no], [dnl Check for the individual functions ac_cv_libcstring=yes AC_CHECK_LIB( cstring, libcstring_get_version, [ac_cv_libcstring_dummy=yes], [ac_cv_libcstring=no]) dnl TODO add functions ac_cv_libcstring_LIBADD="-lcstring" ]) ]) ]) AS_IF( [test "x$ac_cv_libcstring" = xyes], [AC_DEFINE( [HAVE_LIBCSTRING], [1], [Define to 1 if you have the `cstring' library (-lcstring).]) ]) AS_IF( [test "x$ac_cv_libcstring" = xyes], [AC_SUBST( [HAVE_LIBCSTRING], [1]) ], [AC_SUBST( [HAVE_LIBCSTRING], [0]) ]) ]) dnl Function to detect if libcstring dependencies are available AC_DEFUN([AX_LIBCSTRING_CHECK_LOCAL], [dnl Headers included in libcstring/libcstring_narrow_string.h AC_CHECK_HEADERS([stdlib.h string.h]) dnl Headers included in libcstring/libcstring_wide.h AC_CHECK_HEADERS([wchar.h wctype.h]) dnl Narrow character string functions used in libcstring/libcstring_narrow_string.h AC_CHECK_FUNCS([fgets memchr memcmp memcpy memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strrchr strstr vsnprintf]) AS_IF( [test "x$ac_cv_func_fgets" != xyes], [AC_MSG_FAILURE( [Missing function: fgets], [1]) ]) AS_IF( [test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes], [AC_MSG_FAILURE( [Missing functions: memchr and strchr], [1]) ]) AS_IF( [test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes], [AC_MSG_FAILURE( [Missing functions: memcmp and strncmp], [1]) ]) AS_IF( [test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes], [AC_MSG_FAILURE( [Missing functions: memcpy and strncpy], [1]) ]) AS_IF( [test "x$ac_cv_func_memrchr" = xyes], [AC_CHECK_DECLS([memrchr]) AS_IF( [test "x$ac_cv_decl_memrchr" != xyes], [ac_cv_func_memrchr=no]) ]) AS_IF( [test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes], [AC_MSG_FAILURE( [Missing functions: strrchr and memrchr], [1]) ]) AS_IF( [test "x$ac_cv_func_snprintf" != xyes], [AC_MSG_FAILURE( [Missing function: snprintf], [1]) ]) AS_IF( [test "x$ac_cv_func_sscanf" != xyes], [AC_MSG_FAILURE( [Missing function: sscanf], [1]) ]) AS_IF( [test "x$ac_cv_func_strlen" != xyes], [AC_MSG_FAILURE( [Missing function: strlen], [1]) ]) AS_IF( [test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes], [AC_MSG_FAILURE( [Missing functions: strncasecmp and strcasecmp], [1]) ]) AS_IF( [test "x$ac_cv_func_strstr" != xyes], [AC_MSG_FAILURE( [Missing function: strstr], [1]) ]) AS_IF( [test "x$ac_cv_func_strstr" != xyes], [AC_MSG_FAILURE( [Missing function: vsnprintf], [1]) ]) dnl Wide character string functions used in libcstring/libcstring_wide_string.h AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_FUNCS([swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr]) AS_IF( [test "x$ac_cv_func_swprintf" != xyes], [AC_MSG_FAILURE( [Missing function: swprintf], [1]) ]) AS_IF( [test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemchr and wcschr], [1]) ]) AS_IF( [test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemcmp and wcsncmp], [1]) ]) AS_IF( [test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemcpy and wcsncpy], [1]) ]) AS_IF( [test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes], [AC_MSG_FAILURE( [Missing functions: wmemrchr and wcsrchr], [1]) ]) AS_IF( [test "x$ac_cv_func_wcslen" != xyes], [AC_MSG_FAILURE( [Missing function: wcslen], [1]) ]) AS_IF( [test "x$ac_cv_func_wcsncasecmp" != xyes && test "x$ac_cv_func_wcscasecmp" != xyes && test "x$ac_cv_func_towlower" != xyes], [AC_MSG_FAILURE( [Missing functions: wcsncasecmp, wcscasecmp and towlower], [1]) ]) AS_IF( [test "x$ac_cv_func_wcsstr" != xyes], [AC_MSG_FAILURE( [Missing function: wcsstr], [1]) ]) ]) ac_cv_libcstring_CPPFLAGS="-I../libcstring"; ac_cv_libcstring_LIBADD="../libcstring/libcstring.la"; ac_cv_libcstring=local ]) dnl Function to detect how to enable libcstring AC_DEFUN([AX_LIBCSTRING_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcstring], [libcstring], [search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCSTRING_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcstring" != xyes], [AX_LIBCSTRING_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCSTRING], [1], [Define to 1 if the local version of libcstring is used.]) AC_SUBST( [HAVE_LOCAL_LIBCSTRING], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCSTRING], [test "x$ac_cv_libcstring" = xlocal]) AS_IF( [test "x$ac_cv_libcstring_CPPFLAGS" != "x"], [AC_SUBST( [LIBCSTRING_CPPFLAGS], [$ac_cv_libcstring_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcstring_LIBADD" != "x"], [AC_SUBST( [LIBCSTRING_LIBADD], [$ac_cv_libcstring_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcstring" = xyes], [AC_SUBST( [ax_libcstring_pc_libs_private], [-lcstring]) ]) AS_IF( [test "x$ac_cv_libcstring" = xyes], [AC_SUBST( [ax_libcstring_spec_requires], [libcstring]) AC_SUBST( [ax_libcstring_spec_build_requires], [libcstring-devel]) ]) ]) libpff-20120802/m4/po.m40000644000175000017500000004460611502470476011355 00000000000000# po.m4 serial 15 (gettext-0.17) dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. AC_PREREQ(2.50) dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake AC_REQUIRE([AM_NLS])dnl dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. dnl Search for GNU msgfmt in the PATH. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. dnl The second test excludes FreeBSD msgfmt. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; *) MSGFMT_015=$MSGFMT ;; esac changequote([,])dnl AC_SUBST([MSGFMT_015]) changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac changequote([,])dnl AC_SUBST([GMSGFMT_015]) dnl Search for GNU xgettext 0.12 or newer in the PATH. dnl The first test excludes Solaris xgettext and early GNU xgettext versions. dnl The second test excludes FreeBSD xgettext. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) dnl Remove leftover from FreeBSD xgettext call. rm -f messages.po dnl Test whether it is GNU xgettext >= 0.15. changequote(,)dnl case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; *) XGETTEXT_015=$XGETTEXT ;; esac changequote([,])dnl AC_SUBST([XGETTEXT_015]) dnl Search for GNU msgmerge 0.11 or newer in the PATH. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) dnl Installation directories. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we dnl have to define it here, so that it can be used in po/Makefile. test -n "$localedir" || localedir='${datadir}/locale' AC_SUBST([localedir]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) AC_CONFIG_COMMANDS([po-directories], [[ for ac_file in $CONFIG_FILES; do # Support "outfile[:infile[:infile...]]" case "$ac_file" in *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; esac # PO directories have a Makefile.in generated from Makefile.in.in. case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Treat a directory as a PO directory if and only if it has a # POTFILES.in file. This allows packages to have multiple PO # directories under different names or in different locations. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration # parameters. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. # Hide the ALL_LINGUAS assigment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) # Compute DUMMYPOFILES # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) case "$ac_given_srcdir" in .) srcdirpre= ;; *) srcdirpre='$(srcdir)/' ;; esac POFILES= UPDATEPOFILES= DUMMYPOFILES= GMOFILES= for lang in $ALL_LINGUAS; do POFILES="$POFILES $srcdirpre$lang.po" UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" done # CATALOGS depends on both $ac_dir and the user's LINGUAS # environment variable. INST_LINGUAS= if test -n "$ALL_LINGUAS"; then for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "$LINGUAS"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then INST_LINGUAS="$INST_LINGUAS $presentlang" fi done fi CATALOGS= if test -n "$INST_LINGUAS"; then for lang in $INST_LINGUAS; do CATALOGS="$CATALOGS $lang.gmo" done fi test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do if test -f "$f"; then case "$f" in *.orig | *.bak | *~) ;; *) cat "$f" >> "$ac_dir/Makefile" ;; esac fi done fi ;; esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it # from automake < 1.5. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) ]) dnl Postprocesses a Makefile in a directory containing PO files. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [ # When this code is run, in config.status, two variables have already been # set: # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, # - LINGUAS is the value of the environment variable LINGUAS at configure # time. changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" case "$ac_given_srcdir" in .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; /*) top_srcdir="$ac_given_srcdir" ;; *) top_srcdir="$ac_dots$ac_given_srcdir" ;; esac # Find a way to echo strings without interpreting backslash. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then gt_echo='echo' else if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then gt_echo='printf %s\n' else echo_func () { cat < "$ac_file.tmp" if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" < /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <> "$ac_file.tmp" <]], [[printf( "%jd" ); ]] )], [ac_cv_cv_have_printf_jd=no], [ac_cv_cv_have_printf_jd=yes]) dnl Second try to see if compilation and linkage with a parameter succeeds AS_IF( [test "x$ac_cv_cv_have_printf_jd" = xyes], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[printf( "%jd", (off_t) 10 ); ]] )], [ac_cv_cv_have_printf_jd=yes], [ac_cv_cv_have_printf_jd=no]) ]) dnl Third try to see if the program runs correctly AS_IF( [test "x$ac_cv_cv_have_printf_jd" = xyes], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[char string[ 3 ]; if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [ac_cv_cv_have_printf_jd=yes], [ac_cv_cv_have_printf_jd=no], [ac_cv_cv_have_printf_jd=undetermined]) ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_cv_have_printf_jd" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( [HAVE_PRINTF_JD], [1], [Define to 1 whether printf supports the conversion specifier "%jd".]) ], [AC_MSG_RESULT( [$ac_cv_cv_have_printf_jd]) ]) ]) dnl Function to detect whether printf conversion specifier "%zd" is available AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_ZD], [AC_MSG_CHECKING( [whether printf supports the conversion specifier "%zd"]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall -Werror" AC_LANG_PUSH(C) dnl First try to see if compilation and linkage without a parameter succeeds AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[printf( "%zd" ); ]] )], [ac_cv_cv_have_printf_zd=no], [ac_cv_cv_have_printf_zd=yes]) dnl Second try to see if compilation and linkage with a parameter succeeds AS_IF( [test "x$ac_cv_cv_have_printf_zd" = xyes], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[printf( "%zd", (size_t) 10 ); ]] )], [ac_cv_cv_have_printf_zd=yes], [ac_cv_cv_have_printf_zd=no]) ]) dnl Third try to see if the program runs correctly AS_IF( [test "x$ac_cv_cv_have_printf_zd" = xyes], [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include #include ]], [[char string[ 3 ]; if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 ); if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )], [ac_cv_cv_have_printf_zd=yes], [ac_cv_cv_have_printf_zd=no], [ac_cv_cv_have_printf_zd=undetermined]) ]) AC_LANG_POP(C) CFLAGS="$SAVE_CFLAGS" AS_IF( [test "x$ac_cv_cv_have_printf_zd" = xyes], [AC_MSG_RESULT( [yes]) AC_DEFINE( [HAVE_PRINTF_ZD], [1], [Define to 1 whether printf supports the conversion specifier "%zd".]) ], [AC_MSG_RESULT( [$ac_cv_cv_have_printf_zd]) ]) ]) dnl Function to detect if common dependencies are available AC_DEFUN([AX_COMMON_CHECK_LOCAL], [dnl Headers included in common/common.h AS_IF( [test "x$ac_cv_enable_winapi" = xyes], [AC_CHECK_HEADERS([windows.h]) AS_IF( [test "x$ac_cv_header_windows_h" = xno], [AC_MSG_FAILURE( [Missing header: windows.h header is required to compile with winapi support], [1]) ]) ]) AS_IF( [test "x$ac_cv_enable_winapi" = xno], [AC_CHECK_HEADERS([libintl.h]) ]) dnl Headers included in common/types.h AC_CHECK_HEADERS([limits.h]) dnl Headers included in common/memory.h AC_CHECK_HEADERS([stdlib.h string.h]) dnl File stream functions used in common/file_stream.h AC_CHECK_FUNCS([fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf]) AS_IF( [test "x$ac_cv_func_fclose" != xyes], [AC_MSG_FAILURE( [Missing function: fclose], [1]) ]) AS_IF( [test "x$ac_cv_func_feof" != xyes], [AC_MSG_FAILURE( [Missing function: feof], [1]) ]) AS_IF( [test "x$ac_cv_func_fgets" != xyes], [AC_MSG_FAILURE( [Missing function: fgets], [1]) ]) AS_IF( [test "x$ac_cv_func_fopen" != xyes], [AC_MSG_FAILURE( [Missing function: fopen], [1]) ]) AS_IF( [test "x$ac_cv_func_fread" != xyes], [AC_MSG_FAILURE( [Missing function: fread], [1]) ]) AS_IF( [test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes], [AC_MSG_FAILURE( [Missing function: fseeko and fseeko64], [1]) ]) AS_IF( [test "x$ac_cv_func_fwrite" != xyes], [AC_MSG_FAILURE( [Missing function: fwrite], [1]) ]) AS_IF( [test "x$ac_cv_func_vfprintf" != xyes], [AC_MSG_FAILURE( [Missing function: vfprintf], [1]) ]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_FUNCS([fgetws]) AS_IF( [test "x$ac_cv_func_fgetws" != xyes], [AC_MSG_FAILURE( [Missing function: fgetws], [1]) ]) ]) dnl Memory functions used in common/memory.h AC_CHECK_FUNCS([free malloc memcmp memcpy memset realloc]) AS_IF( [test "x$ac_cv_func_free" != xyes], [AC_MSG_FAILURE( [Missing function: free], [1]) ]) AS_IF( [test "x$ac_cv_func_malloc" != xyes], [AC_MSG_FAILURE( [Missing function: malloc], [1]) ]) AS_IF( [test "x$ac_cv_func_memcmp" != xyes], [AC_MSG_FAILURE( [Missing function: memcmp], [1]) ]) AS_IF( [test "x$ac_cv_func_memcpy" != xyes], [AC_MSG_FAILURE( [Missing function: memcpy], [1]) ]) AS_IF( [test "x$ac_cv_func_memset" != xyes], [AC_MSG_FAILURE( [Missing function: memset], [1]) ]) AS_IF( [test "x$ac_cv_func_realloc" != xyes], [AC_MSG_FAILURE( [Missing function: realloc], [1]) ]) dnl Check for printf conversion specifier support AX_COMMON_CHECK_FUNC_PRINTF_JD AX_COMMON_CHECK_FUNC_PRINTF_ZD ]) libpff-20120802/m4/libcerror.m40000644000175000017500000001217512005152455012707 00000000000000dnl Functions for libcerror dnl dnl Version: 20120501 dnl Function to detect if libcerror is available dnl ac_libcerror_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCERROR_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcerror" != x && test "x$ac_cv_with_libcerror" != xno && test "x$ac_cv_with_libcerror" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcerror"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcerror}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcerror}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcerror]) ]) ]) AS_IF( [test "x$ac_cv_with_libcerror" = xno], [ac_cv_libcerror=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcerror], [libcerror >= 20120425], [ac_cv_libcerror=yes], [ac_cv_libcerror=no]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [ac_cv_libcerror_CPPFLAGS="$pkg_cv_libcerror_CFLAGS" ac_cv_libcerror_LIBADD="$pkg_cv_libcerror_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcerror.h]) AS_IF( [test "x$ac_cv_header_libcerror_h" = xno], [ac_cv_libcerror=no], [dnl Check for the individual functions ac_cv_libcerror=yes AC_CHECK_LIB( cerror, libcerror_get_version, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) dnl Error functions AC_CHECK_LIB( cerror, libcerror_error_free, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_set, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_matches, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_fprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_sprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_backtrace_fprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) AC_CHECK_LIB( cerror, libcerror_error_backtrace_sprint, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) dnl System rrror functions AC_CHECK_LIB( cerror, libcerror_system_set_error, [ac_cv_libcerror_dummy=yes], [ac_cv_libcerror=no]) ac_cv_libcerror_LIBADD="-lcerror" ]) ]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_DEFINE( [HAVE_LIBCERROR], [1], [Define to 1 if you have the `cerror' library (-lcerror).]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_SUBST( [HAVE_LIBCERROR], [1]) ], [AC_SUBST( [HAVE_LIBCERROR], [0]) ]) ]) dnl Function to detect if libcerror dependencies are available AC_DEFUN([AX_LIBCERROR_CHECK_LOCAL], [dnl Headers included in libcerror/libcerror_error.c AC_CHECK_HEADERS([stdarg.h varargs.h]) AS_IF( [test "x$ac_cv_header_stdarg_h" != xyes && test "x$ac_cv_header_varargs_h" != xyes], [AC_MSG_FAILURE( [Missing headers: stdarg.h and varargs.h], [1]) ]) dnl Wide character string functions used in libcerror/libcerror_error.c AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_FUNCS([wcstombs]) AS_IF( [test "x$ac_cv_func_wcstombs" != xyes], [AC_MSG_FAILURE( [Missing function: wcstombs], [1]) ]) ]) dnl Check for error string functions used in libcerror/libcerror_system.c AC_FUNC_STRERROR_R() AS_IF( [test "x$ac_cv_have_decl_strerror_r" != xyes], [AC_CHECK_FUNCS([strerror]) AS_IF( [test "x$ac_cv_func_strerror" != xyes], [AC_MSG_FAILURE( [Missing functions: strerror_r and strerror], [1]) ]) ]) ac_cv_libcerror_CPPFLAGS="-I../libcerror"; ac_cv_libcerror_LIBADD="../libcerror/libcerror.la"; ac_cv_libcerror=local ]) dnl Function to detect how to enable libcerror AC_DEFUN([AX_LIBCERROR_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcerror], [libcerror], [search for libcerror in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCERROR_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcerror" != xyes], [AX_LIBCERROR_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBCERROR], [1], [Define to 1 if the local version of libcerror is used.]) AC_SUBST( [HAVE_LOCAL_LIBCERROR], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCERROR], [test "x$ac_cv_libcerror" = xlocal]) AS_IF( [test "x$ac_cv_libcerror_CPPFLAGS" != "x"], [AC_SUBST( [LIBCERROR_CPPFLAGS], [$ac_cv_libcerror_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcerror_LIBADD" != "x"], [AC_SUBST( [LIBCERROR_LIBADD], [$ac_cv_libcerror_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_SUBST( [ax_libcerror_pc_libs_private], [-lcerror]) ]) AS_IF( [test "x$ac_cv_libcerror" = xyes], [AC_SUBST( [ax_libcerror_spec_requires], [libcerror]) AC_SUBST( [ax_libcerror_spec_build_requires], [libcerror-devel]) ]) ]) libpff-20120802/m4/libfguid.m40000644000175000017500000001062211753433660012515 00000000000000dnl Functions for libfguid dnl dnl Version: 20120501 dnl Function to detect if libfguid is available dnl ac_libfguid_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFGUID_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfguid" != x && test "x$ac_cv_with_libfguid" != xno && test "x$ac_cv_with_libfguid" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfguid"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfguid}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfguid}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfguid]) ]) ]) AS_IF( [test "x$ac_cv_with_libfguid" = xno], [ac_cv_libfguid=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfguid], [libfguid >= 20120426], [ac_cv_libfguid=yes], [ac_cv_libfguid=no]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [ac_cv_libfguid_CPPFLAGS="$pkg_cv_libfguid_CFLAGS" ac_cv_libfguid_LIBADD="$pkg_cv_libfguid_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfguid.h]) AS_IF( [test "x$ac_cv_header_libfguid_h" = xno], [ac_cv_libfguid=no], [dnl Check for the individual functions ac_cv_libfguid=yes AC_CHECK_LIB( fguid, libfguid_get_version, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) dnl identifier functions AC_CHECK_LIB( fguid, libfguid_identifier_initialize, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_free, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_from_byte_stream, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_get_string_size, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf8_string, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf8_string_with_index, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf16_string, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf16_string_with_index, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf32_string, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) AC_CHECK_LIB( fguid, libfguid_identifier_copy_to_utf32_string_with_index, [ac_cv_libfguid_dummy=yes], [ac_cv_libfguid=no]) ac_cv_libfguid_LIBADD="-lfguid" ]) ]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_DEFINE( [HAVE_LIBFGUID], [1], [Define to 1 if you have the `fguid' library (-lfguid).]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_SUBST( [HAVE_LIBFGUID], [1]) ], [AC_SUBST( [HAVE_LIBFGUID], [0]) ]) ]) dnl Function to detect how to enable libfguid AC_DEFUN([AX_LIBFGUID_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfguid], [libfguid], [search for libfguid in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFGUID_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfguid" != xyes], [ac_cv_libfguid_CPPFLAGS="-I../libfguid"; ac_cv_libfguid_LIBADD="../libfguid/libfguid.la"; ac_cv_libfguid=local AC_DEFINE( [HAVE_LOCAL_LIBFGUID], [1], [Define to 1 if the local version of libfguid is used.]) AC_SUBST( [HAVE_LOCAL_LIBFGUID], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFGUID], [test "x$ac_cv_libfguid" = xlocal]) AS_IF( [test "x$ac_cv_libfguid_CPPFLAGS" != "x"], [AC_SUBST( [LIBFGUID_CPPFLAGS], [$ac_cv_libfguid_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfguid_LIBADD" != "x"], [AC_SUBST( [LIBFGUID_LIBADD], [$ac_cv_libfguid_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_SUBST( [ax_libfguid_pc_libs_private], [-lfguid]) ]) AS_IF( [test "x$ac_cv_libfguid" = xyes], [AC_SUBST( [ax_libfguid_spec_requires], [libfguid]) AC_SUBST( [ax_libfguid_spec_build_requires], [libfguid-devel]) ]) ]) libpff-20120802/m4/iconv.m40000644000175000017500000001375311502470476012054 00000000000000# iconv.m4 serial AM6 (gettext-0.17) dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) libpff-20120802/m4/libfmapi.m40000644000175000017500000000576411745431522012522 00000000000000dnl Functions for libfmapi dnl dnl Version: 20120414 dnl Function to detect if libfmapi is available dnl ac_libfmapi_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFMAPI_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfmapi" != x && test "x$ac_cv_with_libfmapi" != xno && test "x$ac_cv_with_libfmapi" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfmapi"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfmapi}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfmapi}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfmapi]) ]) ]) AS_IF( [test "x$ac_cv_with_libfmapi" = xno], [ac_cv_libfmapi=no], [dnl Check for headers AC_CHECK_HEADERS([libfmapi.h]) AS_IF( [test "x$ac_cv_header_libfmapi_h" = xno], [ac_cv_libfmapi=no], [ac_cv_libfmapi=yes AC_CHECK_LIB( fdatetime, libfmapi_get_version, [ac_cv_libfmapi_dummy=yes], [ac_cv_libfmapi=no]) dnl TODO add functions ]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [AC_DEFINE( [HAVE_LIBFMAPI], [1], [Define to 1 if you have the `fmapi' library (-lfmapi).]) ac_cv_libfmapi_LIBADD="-lfmapi" ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [AC_SUBST( [HAVE_LIBFMAPI], [1]) ], [AC_SUBST( [HAVE_LIBFMAPI], [0]) ]) ]) dnl Function to detect how to enable libfmapi AC_DEFUN([AX_LIBFMAPI_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfmapi], [libfmapi], [search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfmapi], [libfmapi >= 20120405], [ac_cv_libfmapi=yes], [ac_cv_libfmapi=no]) ac_cv_libfmapi_CPPFLAGS="$pkg_cv_libfmapi_CFLAGS" ac_cv_libfmapi_LIBADD="$pkg_cv_libfmapi_LIBS" ]) dnl Check for a shared library version AS_IF( [test "x$ac_cv_libfmapi" != xyes], [AX_LIBFMAPI_CHECK_LIB]) dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfmapi" != xyes], [ac_cv_libfmapi_CPPFLAGS="-I../libfmapi"; ac_cv_libfmapi_LIBADD="../libfmapi/libfmapi.la"; ac_cv_libfmapi=local AC_DEFINE( [HAVE_LOCAL_LIBFMAPI], [1], [Define to 1 if the local version of libfmapi is used.]) AC_SUBST( [HAVE_LOCAL_LIBFMAPI], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFMAPI], [test "x$ac_cv_libfmapi" = xlocal]) AS_IF( [test "x$ac_cv_libfmapi_CPPFLAGS" != "x"], [AC_SUBST( [LIBFMAPI_CPPFLAGS], [$ac_cv_libfmapi_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfmapi_LIBADD" != "x"], [AC_SUBST( [LIBFMAPI_LIBADD], [$ac_cv_libfmapi_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [AC_SUBST( [ax_libfmapi_pc_libs_private], [-lfmapi]) ]) AS_IF( [test "x$ac_cv_libfmapi" = xyes], [AC_SUBST( [ax_libfmapi_spec_requires], [libfmapi]) AC_SUBST( [ax_libfmapi_spec_build_requires], [libfmapi-devel]) ]) ]) libpff-20120802/m4/ltsugar.m40000644000175000017500000001042412006536007012400 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) libpff-20120802/m4/libfcache.m40000644000175000017500000000707111753433651012634 00000000000000dnl Functions for libfcache dnl dnl Version: 20120501 dnl Function to detect if libfcache is available dnl ac_libfcache_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFCACHE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfcache" != x && test "x$ac_cv_with_libfcache" != xno && test "x$ac_cv_with_libfcache" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfcache"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfcache}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfcache}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfcache]) ]) ]) AS_IF( [test "x$ac_cv_with_libfcache" = xno], [ac_cv_libfcache=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfcache], [libfcache >= 20120405], [ac_cv_libfcache=yes], [ac_cv_libfcache=no]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [ac_cv_libfcache_CPPFLAGS="$pkg_cv_libfcache_CFLAGS" ac_cv_libfcache_LIBADD="$pkg_cv_libfcache_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfcache.h]) AS_IF( [test "x$ac_cv_header_libfcache_h" = xno], [ac_cv_libfcache=no], [dnl Check for the individual functions ac_cv_libfcache=yes AC_CHECK_LIB( fcache, libfcache_get_version, [ac_cv_libfcache_dummy=yes], [ac_cv_libfcache=no]) dnl TODO add functions ac_cv_libfcache_LIBADD="-lfcache" ]) ]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_DEFINE( [HAVE_LIBFCACHE], [1], [Define to 1 if you have the `fcache' library (-lfcache).]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_SUBST( [HAVE_LIBFCACHE], [1]) ], [AC_SUBST( [HAVE_LIBFCACHE], [0]) ]) ]) dnl Function to detect if libfcache dependencies are available AC_DEFUN([AX_LIBFCACHE_CHECK_LOCAL], [dnl Types used in libfcache/libfcache_date_time.h AC_STRUCT_TM dnl Headers included in libfcache/libfcache_date_time.h AC_HEADER_TIME dnl Date and time functions used in libfcache/libfcache_date_time.h AC_CHECK_FUNCS( [time], [], [AC_MSG_FAILURE( [Missing function: time], [1]) ]) ac_cv_libfcache_CPPFLAGS="-I../libfcache"; ac_cv_libfcache_LIBADD="../libfcache/libfcache.la"; ac_cv_libfcache=local ]) dnl Function to detect how to enable libfcache AC_DEFUN([AX_LIBFCACHE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfcache], [libfcache], [search for libfcache in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFCACHE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfcache" != xyes], [AX_LIBFCACHE_CHECK_LOCAL AC_DEFINE( [HAVE_LOCAL_LIBFCACHE], [1], [Define to 1 if the local version of libfcache is used.]) AC_SUBST( [HAVE_LOCAL_LIBFCACHE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFCACHE], [test "x$ac_cv_libfcache" = xlocal]) AS_IF( [test "x$ac_cv_libfcache_CPPFLAGS" != "x"], [AC_SUBST( [LIBFCACHE_CPPFLAGS], [$ac_cv_libfcache_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfcache_LIBADD" != "x"], [AC_SUBST( [LIBFCACHE_LIBADD], [$ac_cv_libfcache_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_SUBST( [ax_libfcache_pc_libs_private], [-lfcache]) ]) AS_IF( [test "x$ac_cv_libfcache" = xyes], [AC_SUBST( [ax_libfcache_spec_requires], [libfcache]) AC_SUBST( [ax_libfcache_spec_build_requires], [libfcache-devel]) ]) ]) libpff-20120802/m4/libcsplit.m40000644000175000017500000001176612005152551012713 00000000000000dnl Functions for libcsplit dnl dnl Version: 20120701 dnl Function to detect if libcsplit is available dnl ac_libcsplit_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBCSPLIT_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libcsplit" != x && test "x$ac_cv_with_libcsplit" != xno && test "x$ac_cv_with_libcsplit" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libcsplit"], [CFLAGS="$CFLAGS -I${ac_cv_with_libcsplit}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsplit}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libcsplit]) ]) ]) AS_IF( [test "x$ac_cv_with_libcsplit" = xno], [ac_cv_libcsplit=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libcsplit], [libcsplit >= 20120701], [ac_cv_libcsplit=yes], [ac_cv_libcsplit=no]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [ac_cv_libcsplit_CPPFLAGS="$pkg_cv_libcsplit_CFLAGS" ac_cv_libcsplit_LIBADD="$pkg_cv_libcsplit_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libcsplit.h]) AS_IF( [test "x$ac_cv_header_libcsplit_h" = xno], [ac_cv_libcsplit=no], [dnl Check for the individual functions ac_cv_libcsplit=yes AC_CHECK_LIB( csplit, libcsplit_get_version, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Narrow string functions AC_CHECK_LIB( csplit, libcsplit_narrow_string_split, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Narrow split string functions AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_free, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_get_string, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_get_number_of_segments, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_get_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_narrow_split_string_set_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Wide string functions AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( csplit, libcsplit_wide_string_split, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) dnl Wide split string functions AC_CHECK_LIB( csplit, libcsplit_wide_split_string_free, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_get_string, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_get_number_of_segments, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_get_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) AC_CHECK_LIB( csplit, libcsplit_wide_split_string_set_segment_by_index, [ac_cv_libcsplit_dummy=yes], [ac_cv_libcsplit=no]) ]) ac_cv_libcsplit_LIBADD="-lcsplit" ]) ]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_DEFINE( [HAVE_LIBCSPLIT], [1], [Define to 1 if you have the `csplit' library (-lcsplit).]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_SUBST( [HAVE_LIBCSPLIT], [1]) ], [AC_SUBST( [HAVE_LIBCSPLIT], [0]) ]) ]) dnl Function to detect how to enable libcsplit AC_DEFUN([AX_LIBCSPLIT_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libcsplit], [libcsplit], [search for libcsplit in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBCSPLIT_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libcsplit" != xyes], [AC_DEFINE( [HAVE_LOCAL_LIBCSPLIT], [1], [Define to 1 if the local version of libcsplit is used.]) AC_SUBST( [HAVE_LOCAL_LIBCSPLIT], [1]) ac_cv_libcsplit_CPPFLAGS="-I../libcsplit"; ac_cv_libcsplit_LIBADD="../libcsplit/libcsplit.la"; ac_cv_libcsplit=local ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBCSPLIT], [test "x$ac_cv_libcsplit" = xlocal]) AS_IF( [test "x$ac_cv_libcsplit_CPPFLAGS" != "x"], [AC_SUBST( [LIBCSPLIT_CPPFLAGS], [$ac_cv_libcsplit_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libcsplit_LIBADD" != "x"], [AC_SUBST( [LIBCSPLIT_LIBADD], [$ac_cv_libcsplit_LIBADD]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_SUBST( [ax_libcsplit_pc_libs_private], [-lcsplit]) ]) AS_IF( [test "x$ac_cv_libcsplit" = xyes], [AC_SUBST( [ax_libcsplit_spec_requires], [libcsplit]) AC_SUBST( [ax_libcsplit_spec_build_requires], [libcsplit-devel]) ]) ]) libpff-20120802/m4/types.m40000644000175000017500000000417211647206376012103 00000000000000dnl Functions for type definitions dnl dnl Version: 20111004 dnl Function to detect if type definitions are available AC_DEFUN([AX_TYPES_CHECK_LOCAL], [AS_IF( [test "x$ac_cv_enable_winapi" = xyes], [ac_cv_enable_wide_character_type=yes]) AS_IF( [test "x$ac_cv_enable_wide_character_type" = xyes], [AC_DEFINE( [HAVE_WIDE_CHARACTER_TYPE], [1], [Define to 1 if wide character type should be used.]) AC_SUBST( [HAVE_WIDE_CHARACTER_TYPE], [1]) ], [AC_SUBST( [HAVE_WIDE_CHARACTER_TYPE], [0]) AC_SUBST( [HAVE_WCHAR_H], [0]) ]) AC_CHECK_HEADERS([sys/types.h inttypes.h stdint.h]) AS_IF( [test "x$ac_cv_header_sys_types_h" = xyes], [AC_SUBST( [HAVE_SYS_TYPES_H], [1])], [AC_SUBST( [HAVE_SYS_TYPES_H], [0]) ]) AS_IF( [test "x$ac_cv_header_inttypes_h" = xyes], [AC_SUBST( [HAVE_INTTYPES_H], [1])], [AC_SUBST( [HAVE_INTTYPES_H], [0]) ]) AS_IF( [test "x$ac_cv_header_stdint_h" = xyes], [AC_SUBST( [HAVE_STDINT_H], [1])], [AC_SUBST( [HAVE_STDINT_H], [0]) ]) AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_CHECK_TYPE( [size32_t], [AC_SUBST( [HAVE_SIZE32_T], [1])], [AC_SUBST( [HAVE_SIZE32_T], [0]) ]) AC_CHECK_TYPE( [ssize32_t], [AC_SUBST( [HAVE_SSIZE32_T], [1])], [AC_SUBST( [HAVE_SSIZE32_T], [0]) ]) AC_CHECK_TYPE( [size64_t], [AC_SUBST( [HAVE_SIZE64_T], [1])], [AC_SUBST( [HAVE_SIZE64_T], [0]) ]) AC_CHECK_TYPE( [ssize64_t], [AC_SUBST( [HAVE_SSIZE64_T], [1])], [AC_SUBST( [HAVE_SSIZE64_T], [0]) ]) AC_CHECK_TYPE( [off64_t], [AC_SUBST( [HAVE_OFF64_T], [1])], [AC_SUBST( [HAVE_OFF64_T], [0]) ]) AC_CHECK_TYPE([ssize_t]) AC_CHECK_TYPE([u64]) AC_CHECK_SIZEOF([off_t]) AC_CHECK_SIZEOF([size_t]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_HEADERS( [wchar.h], [AC_DEFINE( [HAVE_WCHAR_H], [1], [Define to 1 if you have the header file.]) AC_SUBST( [HAVE_WCHAR_H], [1]) ], [AC_MSG_FAILURE( [Missing header: wchar.h], [1]) ]) AC_CHECK_SIZEOF([wchar_t]) ]) ]) libpff-20120802/m4/java.m40000644000175000017500000001263211647277225011661 00000000000000dnl Functions for Java bindings dnl dnl Version: 20111018 dnl Function to check if java binary is available dnl kaffe$EXEEXT java$EXEEXT AC_DEFUN([AX_PROG_JAVA], [AC_REQUIRE([AC_EXEEXT]) AS_IF( [test x"$JAVA" = x], [AS_IF( [test x"$ac_cv_with_jdk" = x], [AC_PATH_PROGS( [JAVA], [java$EXEEXT])], [echo $ac_cv_with_jdk AC_PATH_PROGS( [JAVA], [java$EXEEXT], [], [$ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin]) ]) AS_IF( [test x"$JAVA" = x], [AC_MSG_ERROR( [Cannot find java$EXEEXT specify the location of the JDK with --with-jdk]) ]) AC_SUBST( [JAVA], [$JAVA]) ]) ]) dnl Function to check if javac binary is available dnl "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT AC_DEFUN([AX_PROG_JAVAC], [AC_REQUIRE([AC_EXEEXT]) AS_IF( [test x"$JAVAC" = x], [AS_IF( [test x"$ac_cv_with_jdk" = x], [AC_PATH_PROGS( [JAVAC], [javac$EXEEXT]) ], [AC_PATH_PROGS( [JAVAC], [javac$EXEEXT], [], [$ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin]) ]) AS_IF( [test x"$JAVA" = x], [AC_MSG_ERROR( [Cannot find javac$EXEEXT specify the location of the JDK with --with-jdk]) ]) AC_SUBST( [JAVAC], [$JAVAC]) ]) ]) dnl Function to check if javah binary is available AC_DEFUN([AX_PROG_JAVAH], [AC_REQUIRE([AC_EXEEXT]) AS_IF( [test x"$JAVAH" = x], [AS_IF( [test x"$ac_cv_with_jdk" = x], [AC_PATH_PROGS( [JAVAH], [javah$EXEEXT]) ], [AC_PATH_PROGS( [JAVAH], [javah$EXEEXT], [], [$ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin]) ]) AS_IF( [test x"$JAVA" = x], [AC_MSG_ERROR( [Cannot find javah$EXEEXT specify the location of the JDK with --with-jdk]) ]) AC_SUBST( [JAVAH], [$JAVAH]) ]) ]) dnl Function to check if jar binary is available AC_DEFUN([AX_PROG_JAR], [AC_REQUIRE([AC_EXEEXT]) AS_IF( [test x"$JAR" = x], [AS_IF( [test x"$ac_cv_with_jdk" = x], [AC_PATH_PROGS( [JAR], [jar$EXEEXT]) ], [AC_PATH_PROGS( [JAR], [jar$EXEEXT], [], [$ac_cv_with_jdk$PATH_SEPARATOR$ac_cv_with_jdk/bin$PATH_SEPARATOR$ac_cv_with_jdk/jre/bin]) ]) AS_IF( [test x"$JAVA" = x], [AC_MSG_ERROR( [Cannot find jar$EXEEXT specify the location of the JDK with --with-jdk]) ]) AC_SUBST( [JAR], [$JAR]) ]) ]) dnl Function to detect if Java (JNI) build environment is available AC_DEFUN([AX_CHECK_JAVA_DEVEL], [AX_COMMON_ARG_WITH( [jdk], [jdk], [search for JDK in includedir and libdir or in the specified DIR], [DIR]) AC_CHECK_PROG( [BASENAME], [basename], [basename], []) AC_CHECK_PROG( [READLINK], [readlink], [readlink], []) AX_PROG_JAVA AX_PROG_JAVAC AX_PROG_JAVAH AX_PROG_JAR AC_MSG_CHECKING( [for JNI include path]) dnl Follow java to its original location AS_IF( [test -n $READLINK], [JRE_ROOT_DIR=`$READLINK -f $JAVA`]) dnl Strip off bin/java JRE_ROOT_DIR=`AS_DIRNAME([$JRE_ROOT_DIR])`; JRE_ROOT_DIR=`AS_DIRNAME([$JRE_ROOT_DIR])`; JNI_INCLUDE_DIR=$JRE_ROOT_DIR; dnl Strip off jre if necessary AS_IF( [test -n $BASENAME && test `$BASENAME $JNI_INCLUDE_DIR` = "jre"], [JNI_INCLUDE_DIR=`AS_DIRNAME([$JNI_INCLUDE_DIR])`;]) dnl Add include JNI_INCLUDE_DIR="$JNI_INCLUDE_DIR/include"; AC_MSG_RESULT( [$JNI_INCLUDE_DIR]) dnl Detect the target platform ac_java_target_string="$target"; AS_IF( [test "x$ac_java_target_string" = x], [ac_java_target_string="$build"]) AS_CASE( [$ac_java_target_string], [*bsdi*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/bsdos";], [*linux*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/linux";], [*osf*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/alpha";], [*solaris*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/solaris";], [*cygwin*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/win32";], [*mingw*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/win32";], [*], [JNI_PLATFORM_INCLUDE_DIR="$JNI_INCLUDE_DIR/genunix";]) AC_SUBST( [JAVA_CPPFLAGS], ["-I$JNI_INCLUDE_DIR -I$JNI_PLATFORM_INCLUDE_DIR"]) AS_IF( [test ! -r $JNI_INCLUDE_DIR/jni.h], [AC_MSG_ERROR( [Missing JNI include file]) ]) AC_MSG_CHECKING( [for JAR package path]) JAR_PACKAGE_DIR="$JRE_ROOT_DIR/lib/ext"; AC_MSG_RESULT( [$JAR_PACKAGE_DIR]) AC_SUBST( [JAR_PACKAGE_DIR], [$JAR_PACKAGE_DIR]) AC_MSG_CHECKING( [for JNI library path]) dnl Detect the target cpu ac_java_target_cpu_string="$target_cpu"; AS_IF( [test "x$ac_java_target_cpu_string" = x], [ac_java_target_cpu_string="$build_cpu"]) AS_CASE( [$ac_java_target_cpu_string], [i[3-6]86*], [JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/i386";], [x86_64], [AS_IF( [test -d "$JRE_ROOT_DIR/lib/amd64"], [JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/amd64";], [JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/$ac_java_target_cpu_string";]) ], [*], [JNI_LIBRARY_DIR="$JRE_ROOT_DIR/lib/$ac_java_target_cpu_string";]) AC_MSG_RESULT( [$JNI_LIBRARY_DIR]) AC_SUBST( [JNI_LIBRARY_DIR], [$JNI_LIBRARY_DIR]) ]) dnl Function to detect if to enable Java AC_DEFUN([AX_JAVA_CHECK_ENABLE], [AX_COMMON_ARG_ENABLE( [java], [java], [build Java bindings], [no]) AS_IF( [test "x$ac_cv_enable_java" != xno], [AX_CHECK_JAVA_DEVEL() AC_DEFINE( [HAVE_JAVA], [1], [Define to 1 if Java bindings should be used.]) ac_cv_enable_java=yes]) AM_CONDITIONAL( HAVE_JAVA, [test "x$ac_cv_enable_java" != xno]) ]) libpff-20120802/m4/libbfio.m40000644000175000017500000001647011753433525012345 00000000000000dnl Functions for libbfio dnl dnl Version: 20120501 dnl Function to detect if libbfio is available AC_DEFUN([AX_LIBBFIO_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libbfio" != x && test "x$ac_cv_with_libbfio" != xno && test "x$ac_cv_with_libbfio" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libbfio"], [CFLAGS="$CFLAGS -I${ac_cv_with_libbfio}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libbfio}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libbfio]) ]) ]) AS_IF( [test "x$ac_cv_with_libbfio" = xno], [ac_cv_libbfio=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libbfio], [libbfio >= 20120426], [ac_cv_libbfio=yes], [ac_cv_libbfio=no]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [ac_cv_libbfio_CPPFLAGS="$pkg_cv_libbfio_CFLAGS" ac_cv_libbfio_LIBADD="$pkg_cv_libbfio_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libbfio.h]) AS_IF( [test "x$ac_cv_header_libbfio_h" = xno], [ac_cv_libbfio=no], [dnl Check for the individual functions ac_cv_libbfio=yes AC_CHECK_LIB( bfio, libbfio_get_version, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) dnl Handle functions AC_CHECK_LIB( bfio, libbfio_handle_free, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_open, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_close, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_exists, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_read_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_write_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_seek_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_is_open, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_size, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_set_track_offsets_read, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_number_of_offsets_read, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_handle_get_offset_read, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) dnl File functions AC_CHECK_LIB( bfio, libbfio_file_initialize, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_get_name_size, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_get_name, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_set_name, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AS_IF( [test "x$ac_cv_enable_wide_character_type" != xno], [AC_CHECK_LIB( bfio, libbfio_file_get_name_size_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_get_name_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_file_set_name_wide, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) ]) dnl Pool functions AC_CHECK_LIB( bfio, libbfio_pool_initialize, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_free, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_clone, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_open, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_reopen, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_close, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_close_all, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_read_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_write_buffer, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_seek_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_number_of_handles, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_handle, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_set_handle, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_append_handle, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_offset, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_get_size, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) AC_CHECK_LIB( bfio, libbfio_pool_set_maximum_number_of_open_handles, [ac_cv_libbfio_dummy=yes], [ac_cv_libbfio=no]) ac_cv_libbfio_LIBADD="-lbfio" ]) ]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_DEFINE( [HAVE_LIBBFIO], [1], [Define to 1 if you have the `bfio' library (-lbfio).]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_SUBST( [HAVE_LIBBFIO], [1]) ], [AC_SUBST( [HAVE_LIBBFIO], [0]) ]) ]) dnl Function to detect how to enable libbfio AC_DEFUN([AX_LIBBFIO_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libbfio], [libbfio], [search for libbfio in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBBFIO_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libbfio" != xyes], [AC_DEFINE( [HAVE_LOCAL_LIBBFIO], [1], [Define to 1 if the local version of libbfio is used.]) AC_SUBST( [HAVE_LOCAL_LIBBFIO], [1]) ac_cv_libbfio_CPPFLAGS="-I../libbfio"; ac_cv_libbfio_LIBADD="../libbfio/libbfio.la"; ac_cv_libbfio=local ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBBFIO], [test "x$ac_cv_libbfio" = xlocal]) AS_IF( [test "x$ac_cv_libbfio_CPPFLAGS" != "x"], [AC_SUBST( [LIBBFIO_CPPFLAGS], [$ac_cv_libbfio_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libbfio_LIBADD" != "x"], [AC_SUBST( [LIBBFIO_LIBADD], [$ac_cv_libbfio_LIBADD]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_SUBST( [ax_libbfio_pc_libs_private], [-lbfio]) ]) AS_IF( [test "x$ac_cv_libbfio" = xyes], [AC_SUBST( [ax_libbfio_spec_requires], [libbfio]) AC_SUBST( [ax_libbfio_spec_build_requires], [libbfio-devel]) ]) ]) libpff-20120802/m4/libfvalue.m40000644000175000017500000002523112005152613012666 00000000000000dnl Functions for libfvalue dnl dnl Version: 20120701 dnl Function to detect if libfvalue available dnl ac_libfvalue_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l arguments AC_DEFUN([AX_LIBFVALUE_CHECK_LIB], [dnl Check if parameters were provided AS_IF( [test "x$ac_cv_with_libfvalue" != x && test "x$ac_cv_with_libfvalue" != xno && test "x$ac_cv_with_libfvalue" != xauto-detect], [AS_IF( [test -d "$ac_cv_with_libfvalue"], [CFLAGS="$CFLAGS -I${ac_cv_with_libfvalue}/include" LDFLAGS="$LDFLAGS -L${ac_cv_with_libfvalue}/lib"], [AC_MSG_WARN([no such directory: $ac_cv_with_libfvalue]) ]) ]) AS_IF( [test "x$ac_cv_with_libfvalue" = xno], [ac_cv_libfvalue=no], [dnl Check for a pkg-config file AS_IF( [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"], [PKG_CHECK_MODULES( [libfvalue], [libfvalue >= 20120428], [ac_cv_libfvalue=yes], [ac_cv_libfvalue=no]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [ac_cv_libfvalue_CPPFLAGS="$pkg_cv_libfvalue_CFLAGS" ac_cv_libfvalue_LIBADD="$pkg_cv_libfvalue_LIBS"], [dnl Check for headers AC_CHECK_HEADERS([libfvalue.h]) AS_IF( [test "x$ac_cv_header_libfvalue_h" = xno], [ac_cv_libfvalue=no], [dnl Check for the individual functions ac_cv_libfvalue=yes AC_CHECK_LIB( fvalue, libfvalue_get_version, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl Integer functions AC_CHECK_LIB( fvalue, libfvalue_string_size_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf8_string_copy_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf8_string_with_index_copy_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf8_string_copy_to_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf8_string_with_index_copy_to_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf16_string_copy_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf16_string_with_index_copy_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf16_string_copy_to_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf16_string_with_index_copy_to_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf32_string_copy_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf32_string_with_index_copy_from_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf32_string_copy_to_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf32_string_with_index_copy_to_integer, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl String functions AC_CHECK_LIB( fvalue, libfvalue_utf8_string_split, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_utf16_string_split, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl Split string functions AC_CHECK_LIB( fvalue, libfvalue_split_utf8_string_free, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf8_string_get_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf8_string_get_number_of_segments, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf8_string_get_segment_by_index, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf16_string_free, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf16_string_get_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf16_string_get_number_of_segments, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_split_utf16_string_get_segment_by_index, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl Table functions AC_CHECK_LIB( fvalue, libfvalue_table_initialize, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_free, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_clone, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_get_number_of_values, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_get_value_by_identifier, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_get_value_by_index, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_set_value, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_set_value_by_index, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_table_copy_from_utf8_xml_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl Value functions AC_CHECK_LIB( fvalue, libfvalue_value_initialize, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_free, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_clone, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_identifier, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_set_identifier, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_data, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_set_data, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_has_data, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_number_of_value_entries, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_value_entry, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_set_value_entry, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_append_value_entry, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_64bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_64bit, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_utf8_string_size, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_utf8_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_utf8_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_get_utf16_string_size, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_from_utf16_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_copy_to_utf16_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_write_to_file_stream, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) dnl Value type functions AC_CHECK_LIB( fvalue, libfvalue_value_type_initialize, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_type_set_data_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) AC_CHECK_LIB( fvalue, libfvalue_value_type_append_data_string, [ac_cv_libfvalue_dummy=yes], [ac_cv_libfvalue=no]) ac_cv_libfvalue_LIBADD="-lfvalue" ]) ]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_DEFINE( [HAVE_LIBFVALUE], [1], [Define to 1 if you have the `fvalue' library (-lfvalue).]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_SUBST( [HAVE_LIBFVALUE], [1]) ], [AC_SUBST( [HAVE_LIBFVALUE], [0]) ]) ]) dnl Function to detect how to enable libfvalue AC_DEFUN([AX_LIBFVALUE_CHECK_ENABLE], [AX_COMMON_ARG_WITH( [libfvalue], [libfvalue], [search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version], [auto-detect], [DIR]) dnl Check for a shared library version AX_LIBFVALUE_CHECK_LIB dnl Check if the dependencies for the local library version AS_IF( [test "x$ac_cv_libfvalue" != xyes], [ac_cv_libfvalue_CPPFLAGS="-I../libfvalue"; ac_cv_libfvalue_LIBADD="../libfvalue/libfvalue.la"; ac_cv_libfvalue=local AC_DEFINE( [HAVE_LOCAL_LIBFVALUE], [1], [Define to 1 if the local version of libfvalue is used.]) AC_SUBST( [HAVE_LOCAL_LIBFVALUE], [1]) ]) AM_CONDITIONAL( [HAVE_LOCAL_LIBFVALUE], [test "x$ac_cv_libfvalue" = xlocal]) AS_IF( [test "x$ac_cv_libfvalue_CPPFLAGS" != "x"], [AC_SUBST( [LIBFVALUE_CPPFLAGS], [$ac_cv_libfvalue_CPPFLAGS]) ]) AS_IF( [test "x$ac_cv_libfvalue_LIBADD" != "x"], [AC_SUBST( [LIBFVALUE_LIBADD], [$ac_cv_libfvalue_LIBADD]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_SUBST( [ax_libfvalue_pc_libs_private], [-lfvalue]) ]) AS_IF( [test "x$ac_cv_libfvalue" = xyes], [AC_SUBST( [ax_libfvalue_spec_requires], [libfvalue]) AC_SUBST( [ax_libfvalue_spec_build_requires], [libfvalue-devel]) ]) ]) libpff-20120802/libcerror/0000775000175000017500000000000012006536212012177 500000000000000libpff-20120802/libcerror/libcerror_system.c0000644000175000017500000004412012005152705015651 00000000000000/* * System functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STRING_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "libcerror_error.h" #include "libcerror_libcstring.h" #include "libcerror_system.h" #include "libcerror_types.h" /* The make language identifier macro for the WINAPI FormatMessage function */ #if !defined( MAKELANGID ) #define MAKELANGID( primary_language_identifier, sub_language_identifier ) \ ( ( ( (WORD) ( sub_language_identifier ) ) << 10 ) | (WORD) ( primary_language_identifier ) ) #endif #if !defined( LANG_NEUTRAL ) #define LANG_NEUTRAL 0 #endif #if !defined( SUBLANG_DEFAULT ) #define SUBLANG_DEFAULT 1 #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) /* Cross Windows safe version of FormatMessageA * Returns TRUE if successful or FALSE on error */ DWORD libcerror_FormatMessageA( DWORD flags, LPCVOID source, DWORD message_identifier, DWORD language_identifier, LPCSTR string, DWORD string_size, va_list *argument_list ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; if( string == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "FormatMessageA" ); if( function != NULL ) { result = function( flags, source, message_identifier, language_identifier, string, string_size, argument_list ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } /* Cross Windows safe version of FormatMessageW * Returns TRUE if successful or FALSE on error */ DWORD libcerror_FormatMessageW( DWORD flags, LPCVOID source, DWORD message_identifier, DWORD language_identifier, LPWSTR string, DWORD string_size, va_list *argument_list ) { FARPROC function = NULL; HMODULE library_handle = NULL; DWORD result = 0; if( string == NULL ) { return( FALSE ); } library_handle = LoadLibrary( _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) ); if( library_handle == NULL ) { return( FALSE ); } function = GetProcAddress( library_handle, (LPCSTR) "FormatMessageA" ); if( function != NULL ) { result = function( flags, source, message_identifier, language_identifier, string, string_size, argument_list ); } /* This call should be after using the function * in most cases kernel32.dll will still be available after free */ if( FreeLibrary( library_handle ) != TRUE ) { result = FALSE; } return( result ); } #endif #if defined( WINAPI ) && ( WINVER >= 0x0501 ) && !defined( USE_CRT_FUNCTIONS ) /* Retrieves a descriptive string of the error number * This function uses the WINAPI functions for Windows XP or later * Returns the string_length if successful or -1 on error */ ssize_t libcerror_system_copy_string_from_error_number( libcstring_system_character_t *string, size_t string_size, uint32_t error_number ) { DWORD print_count = 0; if( string == NULL ) { return( -1 ); } #if UINT32_MAX < SSIZE_MAX if( string_size > (size_t) UINT32_MAX ) #else if( string_size > (size_t) SSIZE_MAX ) #endif { return( -1 ); } #if ( WINVER <= 0x0500 ) #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) print_count = libcerror_FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #else print_count = libcerror_FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #endif #else #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) print_count = FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #else print_count = FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM, NULL, (DWORD) error_number, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), string, (DWORD) string_size, NULL ); #endif #endif /* ( WINVER <= 0x0500 ) */ if( print_count == 0 ) { return( -1 ); } return( (ssize_t) print_count ); } #elif defined( WINAPI ) && defined( USE_CRT_FUNCTIONS ) && defined( _MSC_VER ) /* Retrieves a descriptive string of the error number * This function uses the Visual Studio C runtime library functions * Returns the string_length if successful or -1 on error */ ssize_t libcerror_system_copy_string_from_error_number( libcstring_system_character_t *string, size_t string_size, uint32_t error_number ) { size_t string_length = 0; if( string == NULL ) { return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( _wcserror_s( string, string_size, (int) error_number ) != 0 ) #else if( strerror_s( string, string_size, (int) error_number ) != 0 ) #endif { return( -1 ); } string[ string_size - 1 ] = 0; string_length = libcstring_system_string_length( string ); return( (ssize_t) string_length ); } #elif defined( HAVE_STRERROR_R ) /* Retrieves a descriptive string of the error number * This function uses the POSIX strerror_r function or equivalent * Returns the string_length if successful or -1 on error */ ssize_t libcerror_system_copy_string_from_error_number( libcstring_system_character_t *string, size_t string_size, uint32_t error_number ) { size_t string_length = 0; if( string == NULL ) { return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { return( -1 ); } /* Sanity check */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #error Missing wide character strerror_r function #endif #if defined( STRERROR_R_CHAR_P ) if( strerror_r( (int) error_number, string, string_size ) == NULL ) #else if( strerror_r( (int) error_number, string, string_size ) != 0 ) #endif { return( -1 ); } string[ string_size - 1 ] = 0; string_length = libcstring_system_string_length( string ); return( (ssize_t) string_length ); } #elif defined( HAVE_STRERROR ) || defined( WINAPI ) /* Retrieves a descriptive string of the error number * This function uses the POSIX strerror function or equivalent * Returns the string_length if successful or -1 on error */ ssize_t libcerror_system_copy_string_from_error_number( libcstring_system_character_t *string, size_t string_size, uint32_t error_number ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) const wchar_t *static_error_string = NULL; #else const char *static_error_string = NULL; #endif size_t static_error_string_length = 0; if( string == NULL ) { return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { return( -1 ); } /* Sanity check */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) && !defined( WINAPI ) #error Missing wide character strerror function #endif #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) static_error_string = _wcserror( (int) error_number ); #else static_error_string = strerror( (int) error_number ); #endif if( static_error_string == NULL ) { return( -1 ); } static_error_string_length = libcstring_system_string_length( static_error_string ); if( libcstring_system_string_copy( string, static_error_string, static_error_string_length ) == NULL ) { return( -1 ); } string[ static_error_string_length ] = 0; return( (ssize_t) static_error_string_length ); } #else #error Missing error to string system function #endif #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, error, error_domain, error_code, system_error_code, type, argument ) \ function( error, error_domain, error_code, system_error_code, type argument, ... ) #define VASTART( argument_list, type, name ) \ va_start( argument_list, name ) #define VAEND( argument_list ) \ va_end( argument_list ) #elif defined( HAVE_VARARGS_H ) #define VARARGS( function, error, error_domain, error_code, system_error_code, type, argument ) \ function( error, error_domain, error_code, system_error_code, va_alist ) va_dcl #define VASTART( argument_list, type, name ) \ { type name; va_start( argument_list ); name = va_arg( argument_list, type ) #define VAEND( argument_list ) \ va_end( argument_list ); } #endif /* Sets an error and adds a system specific error string if possible * Initializes the error if necessary * The error domain and code are set only the first time and the error message is appended for back tracing */ void VARARGS( libcerror_system_set_error, libcerror_error_t **error, int error_domain, int error_code, uint32_t system_error_code, const char *, format_string ) { va_list argument_list; libcerror_internal_error_t *internal_error = NULL; libcstring_system_character_t *system_format_string = NULL; void *reallocation = NULL; size_t format_string_length = 0; size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE; size_t string_index = 0; int message_index = 0; int print_count = 0; if( error == NULL ) { return; } if( format_string == NULL ) { return; } format_string_length = libcstring_narrow_string_length( format_string ); if( format_string_length > message_size ) { message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 ) * LIBCERROR_MESSAGE_INCREMENT_SIZE; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) do { reallocation = libcstring_system_string_reallocate( system_format_string, format_string_length + 1 ); if( reallocation == NULL ) { goto on_error; } system_format_string = (libcstring_system_character_t *) reallocation; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) print_count = libcstring_wide_string_snwprintf( system_format_string, format_string_length + 1, L"%S", format_string ); #else print_count = libcstring_wide_string_snwprintf( system_format_string, format_string_length + 1, L"%s", format_string ); #endif if( print_count <= -1 ) { format_string_length += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > format_string_length ) || ( system_format_string[ print_count ] != 0 ) ) { format_string_length = (size_t) print_count; print_count = -1; } if( format_string_length >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { goto on_error; } } while( print_count <= -1 ); #else system_format_string = (libcstring_system_character_t *) format_string; #endif #if defined( __BORLANDC__ ) || defined( _MSC_VER ) /* Rewrite %s to %S */ string_index = 0; while( string_index < format_string_length ) { if( system_format_string[ string_index ] == 0 ) { break; } else if( system_format_string[ string_index ] == (libcstring_system_character_t) '%' ) { string_index++; if( system_format_string[ string_index ] == (libcstring_system_character_t) 's' ) { system_format_string[ string_index ] = (libcstring_system_character_t) 'S'; } } string_index++; } #endif if( *error == NULL ) { internal_error = memory_allocate_structure( libcerror_internal_error_t ); if( internal_error == NULL ) { goto on_error; } internal_error->domain = error_domain; internal_error->code = error_code; internal_error->number_of_messages = 0; internal_error->messages = NULL; internal_error->sizes = NULL; *error = (libcerror_error_t *) internal_error; } else { internal_error = (libcerror_internal_error_t *) *error; } reallocation = memory_reallocate( internal_error->messages, sizeof( libcstring_system_character_t * ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->messages = (libcstring_system_character_t **) reallocation; reallocation = memory_reallocate( internal_error->sizes, sizeof( size_t ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->sizes = (size_t *) reallocation; message_index = internal_error->number_of_messages; internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; internal_error->number_of_messages += 1; do { reallocation = libcstring_system_string_reallocate( internal_error->messages[ message_index ], message_size ); if( reallocation == NULL ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; break; } internal_error->messages[ message_index ] = (libcstring_system_character_t *) reallocation; VASTART( argument_list, const char *, format_string ); print_count = libcstring_system_string_vsprintf( internal_error->messages[ message_index ], message_size, system_format_string, argument_list ); VAEND( argument_list ); if( print_count <= -1 ) { message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > message_size ) || ( ( internal_error->messages[ message_index ] )[ print_count ] != 0 ) ) { message_size = (size_t) ( print_count + 1 ); print_count = -1; } if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; break; } internal_error->sizes[ message_index ] = (size_t) print_count + 1; } while( print_count <= -1 ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( system_format_string ); system_format_string = NULL; #endif string_index = internal_error->sizes[ message_index ] - 1; if( ( internal_error->messages[ message_index ] )[ string_index - 1 ] == (libcstring_system_character_t) '.' ) { string_index -= 1; } reallocation = libcstring_system_string_reallocate( internal_error->messages[ message_index ], message_size + 13 + 512 ); if( reallocation == NULL ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; goto on_error; } internal_error->messages[ message_index ] = (libcstring_system_character_t *) reallocation; if( libcstring_system_string_copy( &( ( internal_error->messages[ message_index ] )[ string_index ] ), _LIBCSTRING_SYSTEM_STRING( " with error: " ), 13 ) == NULL ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; goto on_error; } internal_error->sizes[ message_index ] += 13; string_index += 13; print_count = libcerror_system_copy_string_from_error_number( &( ( internal_error->messages[ message_index ] )[ string_index ] ), 512, system_error_code ); if( print_count == -1 ) { goto on_error; } message_size += (size_t) print_count; if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; goto on_error; } internal_error->sizes[ message_index ] += print_count; return; on_error: #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( system_format_string != NULL ) { memory_free( system_format_string ); } #endif if( ( *error == NULL ) && ( internal_error != NULL ) ) { memory_free( internal_error ); } return; } #undef VARARGS #undef VASTART #undef VAEND libpff-20120802/libcerror/libcerror_error.c0000644000175000017500000003666612005152705015476 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "libcerror_definitions.h" #include "libcerror_error.h" #include "libcerror_libcstring.h" #include "libcerror_types.h" /* Free an error and its elements */ void libcerror_error_free( libcerror_error_t **error ) { libcerror_internal_error_t *internal_error = NULL; int message_index = 0; if( error == NULL ) { return; } if( *error != NULL ) { internal_error = (libcerror_internal_error_t *) *error; if( internal_error->messages != NULL ) { for( message_index = 0; message_index < internal_error->number_of_messages; message_index++ ) { if( internal_error->messages[ message_index ] != NULL ) { memory_free( internal_error->messages[ message_index ] ); } } memory_free( internal_error->messages ); } if( internal_error->sizes != NULL ) { memory_free( internal_error->sizes ); } memory_free( *error ); *error = NULL; } } #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, error, error_domain, error_code, type, argument ) \ function( error, error_domain, error_code, type argument, ... ) #define VASTART( argument_list, type, name ) \ va_start( argument_list, name ) #define VAEND( argument_list ) \ va_end( argument_list ) #elif defined( HAVE_VARARGS_H ) #define VARARGS( function, error, error_domain, error_code, type, argument ) \ function( error, error_domain, error_code, va_alist ) va_dcl #define VASTART( argument_list, type, name ) \ { type name; va_start( argument_list ); name = va_arg( argument_list, type ) #define VAEND( argument_list ) \ va_end( argument_list ); } #endif /* Sets an error * Initializes the error if necessary * The error domain and code are set only the first time and the error message is appended for back tracing */ void VARARGS( libcerror_error_set, libcerror_error_t **error, int error_domain, int error_code, const char *, format_string ) { va_list argument_list; libcerror_internal_error_t *internal_error = NULL; libcstring_system_character_t *system_format_string = NULL; void *reallocation = NULL; size_t format_string_length = 0; size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE; int message_index = 0; int print_count = 0; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) size_t string_index = 0; #endif if( error == NULL ) { return; } if( format_string == NULL ) { return; } format_string_length = libcstring_narrow_string_length( format_string ); if( format_string_length > message_size ) { message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 ) * LIBCERROR_MESSAGE_INCREMENT_SIZE; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) do { reallocation = libcstring_system_string_reallocate( system_format_string, format_string_length + 1 ); if( reallocation == NULL ) { goto on_error; } system_format_string = (libcstring_system_character_t *) reallocation; #if defined( __BORLANDC__ ) || defined( _MSC_VER ) print_count = libcstring_wide_string_snwprintf( system_format_string, format_string_length + 1, L"%S", format_string ); #else print_count = libcstring_wide_string_snwprintf( system_format_string, format_string_length + 1, L"%s", format_string ); #endif if( print_count <= -1 ) { format_string_length += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > format_string_length ) || ( system_format_string[ print_count ] != 0 ) ) { format_string_length = (size_t) print_count; print_count = -1; } if( format_string_length >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { goto on_error; } } while( print_count <= -1 ); #else system_format_string = (libcstring_system_character_t *) format_string; #endif #if defined( __BORLANDC__ ) || defined( _MSC_VER ) /* Rewrite %s to %S */ string_index = 0; while( string_index < format_string_length ) { if( system_format_string[ string_index ] == 0 ) { break; } else if( system_format_string[ string_index ] == (libcstring_system_character_t) '%' ) { string_index++; if( system_format_string[ string_index ] == (libcstring_system_character_t) 's' ) { system_format_string[ string_index ] = (libcstring_system_character_t) 'S'; } } string_index++; } #endif if( *error == NULL ) { internal_error = memory_allocate_structure( libcerror_internal_error_t ); if( internal_error == NULL ) { goto on_error; } internal_error->domain = error_domain; internal_error->code = error_code; internal_error->number_of_messages = 0; internal_error->messages = NULL; internal_error->sizes = NULL; *error = (libcerror_error_t *) internal_error; } else { internal_error = (libcerror_internal_error_t *) *error; } reallocation = memory_reallocate( internal_error->messages, sizeof( libcstring_system_character_t * ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->messages = (libcstring_system_character_t **) reallocation; reallocation = memory_reallocate( internal_error->sizes, sizeof( size_t ) * ( internal_error->number_of_messages + 1 ) ); if( reallocation == NULL ) { goto on_error; } internal_error->sizes = (size_t *) reallocation; message_index = internal_error->number_of_messages; internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; internal_error->number_of_messages += 1; do { reallocation = libcstring_system_string_reallocate( internal_error->messages[ message_index ], message_size ); if( reallocation == NULL ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; break; } internal_error->messages[ message_index ] = (libcstring_system_character_t *) reallocation; VASTART( argument_list, const char *, format_string ); print_count = libcstring_system_string_vsprintf( internal_error->messages[ message_index ], message_size, system_format_string, argument_list ); VAEND( argument_list ); if( print_count <= -1 ) { message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE; } else if( ( (size_t) print_count > message_size ) || ( ( internal_error->messages[ message_index ] )[ print_count ] != 0 ) ) { message_size = (size_t) ( print_count + 1 ); print_count = -1; } if( message_size >= LIBCERROR_MESSAGE_MAXIMUM_SIZE ) { memory_free( internal_error->messages[ message_index ] ); internal_error->messages[ message_index ] = NULL; internal_error->sizes[ message_index ] = 0; break; } internal_error->sizes[ message_index ] = (size_t) print_count + 1; } while( print_count <= -1 ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) memory_free( system_format_string ); system_format_string = NULL; #endif return; on_error: #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( system_format_string != NULL ) { memory_free( system_format_string ); } #endif if( ( *error == NULL ) && ( internal_error != NULL ) ) { memory_free( internal_error ); } return; } #undef VARARGS #undef VASTART #undef VAEND /* Determines if an error equals a certain error code of a domain * Returns 1 if error matches or 0 if not */ int libcerror_error_matches( libcerror_error_t *error, int error_domain, int error_code ) { if( error == NULL ) { return( 0 ); } if( ( ( (libcerror_internal_error_t *) error )->domain == error_domain ) && ( ( (libcerror_internal_error_t *) error )->code == error_code ) ) { return( 1 ); } return( 0 ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_fprint( libcerror_error_t *error, FILE *stream ) { libcerror_internal_error_t *internal_error = NULL; int message_index = 0; int print_count = 0; if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( stream == NULL ) { return( -1 ); } message_index = internal_error->number_of_messages - 1; if( internal_error->messages[ message_index ] != NULL ) { print_count = fprintf( stream, "%" PRIs_LIBCSTRING_SYSTEM "\n", internal_error->messages[ message_index ] ); if( print_count <= -1 ) { return( -1 ); } } return( print_count ); } /* Prints a descriptive string of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_sprint( libcerror_error_t *error, char *string, size_t size ) { libcerror_internal_error_t *internal_error = NULL; size_t string_index = 0; int message_index = 0; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) size_t print_count = 0; #endif if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( string == NULL ) { return( -1 ); } message_index = internal_error->number_of_messages - 1; if( internal_error->messages[ message_index ] != NULL ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( _MSC_VER ) if( wcstombs_s( &print_count, &( string[ string_index ] ), size - string_index, internal_error->messages[ message_index ], _TRUNCATE ) != 0 ) { return( -1 ); } #else print_count = wcstombs( &( string[ string_index ] ), internal_error->messages[ message_index ], size - string_index ); if( print_count == (size_t) -1 ) { return( -1 ); } #endif string_index += print_count; if( string_index >= size ) { return( -1 ); } #else if( ( string_index + internal_error->sizes[ message_index ] ) > size ) { return( -1 ); } if( libcstring_narrow_string_copy( &( string[ string_index ] ), internal_error->messages[ message_index ], internal_error->sizes[ message_index ] ) == NULL ) { string[ string_index ] = 0; return( -1 ); } string_index += internal_error->sizes[ message_index ]; string[ string_index ] = 0; #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ } if( string_index > (size_t) INT_MAX ) { return( -1 ); } return( (int) string_index ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_backtrace_fprint( libcerror_error_t *error, FILE *stream ) { libcerror_internal_error_t *internal_error = NULL; int message_index = 0; int print_count = 0; int total_print_count = 0; if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( stream == NULL ) { return( -1 ); } for( message_index = 0; message_index < internal_error->number_of_messages; message_index++ ) { if( internal_error->messages[ message_index ] != NULL ) { print_count = fprintf( stream, "%" PRIs_LIBCSTRING_SYSTEM "\n", internal_error->messages[ message_index ] ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } return( total_print_count ); } /* Prints a backtrace of the error to the string * The end-of-string character is not included in the return value * Returns the number of printed characters if successful or -1 on error */ int libcerror_error_backtrace_sprint( libcerror_error_t *error, char *string, size_t size ) { libcerror_internal_error_t *internal_error = NULL; size_t string_index = 0; int message_index = 0; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) size_t print_count = 0; #endif if( error == NULL ) { return( -1 ); } internal_error = (libcerror_internal_error_t *) error; if( internal_error->messages == NULL ) { return( -1 ); } if( internal_error->sizes == NULL ) { return( -1 ); } if( string == NULL ) { return( -1 ); } for( message_index = 0; message_index < internal_error->number_of_messages; message_index++ ) { if( internal_error->messages[ message_index ] != NULL ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( _MSC_VER ) if( wcstombs_s( &print_count, &( string[ string_index ] ), size - string_index, internal_error->messages[ message_index ], _TRUNCATE ) != 0 ) { return( -1 ); } #else print_count = wcstombs( &( string[ string_index ] ), internal_error->messages[ message_index ], size - string_index ); if( print_count == (size_t) -1 ) { return( -1 ); } #endif string_index += print_count; if( string_index >= size ) { return( -1 ); } #else if( ( string_index + internal_error->sizes[ message_index ] ) > size ) { return( -1 ); } if( libcstring_narrow_string_copy( &( string[ string_index ] ), internal_error->messages[ message_index ], internal_error->sizes[ message_index ] ) == NULL ) { string[ string_index ] = 0; return( -1 ); } string_index += internal_error->sizes[ message_index ]; string[ string_index ] = 0; #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ } } if( string_index > (size_t) INT_MAX ) { return( -1 ); } return( (int) string_index ); } libpff-20120802/libcerror/libcerror_extern.h0000644000175000017500000000242612005152705015642 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_EXTERN_H ) #define _LIBCERROR_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if !defined( HAVE_LOCAL_LIBCERROR ) /* If libtool DLL support is enabled set LIBCERROR_DLL_EXPORT * before including libcerror/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCERROR_DLL_EXPORT #endif #include #else #define LIBCERROR_EXTERN extern #endif #endif libpff-20120802/libcerror/Makefile.am0000644000175000017500000000125012005152706014150 00000000000000if HAVE_LOCAL_LIBCERROR AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcerror.la libcerror_la_SOURCES = \ libcerror_definitions.h \ libcerror_extern.h \ libcerror_error.c libcerror_error.h \ libcerror_libcstring.h \ libcerror_support.c libcerror_support.h \ libcerror_system.c libcerror_system.h \ libcerror_types.h \ libcerror_unused.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) libpff-20120802/libcerror/libcerror_error.h0000644000175000017500000000472612005152706015474 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_ERROR_H ) #define _LIBCERROR_INTERNAL_ERROR_H #include #include #include #include "libcerror_extern.h" #include "libcerror_libcstring.h" #include "libcerror_types.h" #if defined( __cplusplus ) extern "C" { #endif #define LIBCERROR_MESSAGE_INCREMENT_SIZE 64 #define LIBCERROR_MESSAGE_MAXIMUM_SIZE 4096 typedef struct libcerror_internal_error libcerror_internal_error_t; struct libcerror_internal_error { /* The error domain */ int domain; /* The error code */ int code; /* The number of messages */ int number_of_messages; /* A dynamic array containing the message strings */ libcstring_system_character_t **messages; /* A dynamic array containing the message string sizes * without the end-of-string character */ size_t *sizes; }; LIBCERROR_EXTERN \ void libcerror_error_free( libcerror_error_t **error ); LIBCERROR_EXTERN \ void libcerror_error_set( libcerror_error_t **error, int error_domain, int error_code, const char *format_string, ... ); LIBCERROR_EXTERN \ int libcerror_error_matches( libcerror_error_t *error, int error_domain, int error_code ); LIBCERROR_EXTERN \ int libcerror_error_fprint( libcerror_error_t *error, FILE *stream ); LIBCERROR_EXTERN \ int libcerror_error_sprint( libcerror_error_t *error, char *string, size_t size ); LIBCERROR_EXTERN \ int libcerror_error_backtrace_fprint( libcerror_error_t *error, FILE *stream ); LIBCERROR_EXTERN \ int libcerror_error_backtrace_sprint( libcerror_error_t *error, char *string, size_t size ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcerror/libcerror_support.h0000644000175000017500000000230512005152706016046 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_SUPPORT_H ) #define _LIBCERROR_SUPPORT_H #include #include #include #include "libcerror_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCERROR ) LIBCERROR_EXTERN \ const char *libcerror_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcerror/libcerror_types.h0000644000175000017500000000262312005152706015501 00000000000000/* * The internal type definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_TYPES_H ) #define _LIBCERROR_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring * The definitions in are copied here * for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) /* The following type definitions hide internal data structures */ typedef intptr_t libcerror_error_t; /* Currently not supported #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libcerror_error {} libcerror_error_t; #else typedef intptr_t libcerror_error_t; #endif */ #endif #endif libpff-20120802/libcerror/libcerror_definitions.h0000644000175000017500000001650112005152706016650 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCERROR_INTERNAL_DEFINITIONS_H ) #define LIBCERROR_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if !defined( HAVE_LOCAL_LIBCERROR ) #include /* The definitions in are copied here * for local use of libcerror */ #else #define LIBCERROR_VERSION 20120630 /* The libcstring version string */ #define LIBCERROR_VERSION_STRING "20120630" /* The error domains */ enum LIBCERROR_ERROR_DOMAINS { LIBCERROR_ERROR_DOMAIN_ARGUMENTS = (int) 'a', LIBCERROR_ERROR_DOMAIN_CONVERSION = (int) 'c', LIBCERROR_ERROR_DOMAIN_COMPRESSION = (int) 'C', LIBCERROR_ERROR_DOMAIN_ENCRYPTION = (int) 'E', LIBCERROR_ERROR_DOMAIN_IO = (int) 'I', LIBCERROR_ERROR_DOMAIN_INPUT = (int) 'i', LIBCERROR_ERROR_DOMAIN_MEMORY = (int) 'm', LIBCERROR_ERROR_DOMAIN_OUTPUT = (int) 'o', LIBCERROR_ERROR_DOMAIN_RUNTIME = (int) 'r', }; /* The argument error codes * to signify errors regarding arguments passed to a function */ enum LIBCERROR_ARGUMENT_ERROR { LIBCERROR_ARGUMENT_ERROR_GENERIC = 0, /* The argument contains an invalid value */ LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE = 1, /* The argument contains a value less than zero */ LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO = 2, /* The argument contains a value zero or less */ LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS = 3, /* The argument contains a value that exceeds the maximum * for the specific type */ LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM = 4, /* The argument contains a value that is too small */ LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL = 5, /* The argument contains a value that is too large */ LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE = 6, /* The argument contains a value that is out of bound */ LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS = 7, /* The argument contains a value that is not supported */ LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE = 8, /* The argument contains a value that conficts with another argument */ LIBCERROR_ARGUMENT_ERROR_CONFLICTING_VALUE = 9 }; /* The conversion error codes * to signify errors regarding conversions */ enum LIBCERROR_CONVERSION_ERROR { LIBCERROR_CONVERSION_ERROR_GENERIC = 0, /* The conversion failed on the input */ LIBCERROR_CONVERSION_ERROR_INPUT_FAILED = 1, /* The conversion failed on the output */ LIBCERROR_CONVERSION_ERROR_OUTPUT_FAILED = 2 }; /* The compression error codes * to signify errors regarding compression */ enum LIBCERROR_COMPRESSION_ERROR { LIBCERROR_COMPRESSION_ERROR_GENERIC = 0, /* The compression failed */ LIBCERROR_COMPRESSION_ERROR_COMPRESS_FAILED = 1, /* The decompression failed */ LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED = 2 }; /* The encryption error codes * to signify errors regarding encryption */ enum LIBCERROR_ENCRYPTION_ERROR { LIBCERROR_ENCRYPTION_ERROR_GENERIC = 0, /* The encryption failed */ LIBCERROR_ENCRYPTION_ERROR_ENCRYPT_FAILED = 1, /* The decryption failed */ LIBCERROR_ENCRYPTION_ERROR_DECRYPT_FAILED = 2 }; /* The input/output error codes * to signify errors regarding input/output */ enum LIBCERROR_IO_ERROR { LIBCERROR_IO_ERROR_GENERIC = 0, /* The open failed */ LIBCERROR_IO_ERROR_OPEN_FAILED = 1, /* The close failed */ LIBCERROR_IO_ERROR_CLOSE_FAILED = 2, /* The seek failed */ LIBCERROR_IO_ERROR_SEEK_FAILED = 3, /* The read failed */ LIBCERROR_IO_ERROR_READ_FAILED = 4, /* The write failed */ LIBCERROR_IO_ERROR_WRITE_FAILED = 5, /* Access denied */ LIBCERROR_IO_ERROR_ACCESS_DENIED = 6, /* The resource is invalid i.e. a missing file */ LIBCERROR_IO_ERROR_INVALID_RESOURCE = 7, /* The ioctl failed */ LIBCERROR_IO_ERROR_IOCTL_FAILED = 8, /* The unlink failed */ LIBCERROR_IO_ERROR_UNLINK_FAILED = 9 }; /* The input error codes * to signify errors regarding handing input data */ enum LIBCERROR_INPUT_ERROR { LIBCERROR_INPUT_ERROR_GENERIC = 0, /* The input contains invalid data */ LIBCERROR_INPUT_ERROR_INVALID_DATA = 1, /* The input contains an unsupported signature */ LIBCERROR_INPUT_ERROR_SIGNATURE_MISMATCH = 2, /* A checksum in the input did not match */ LIBCERROR_INPUT_ERROR_CHECKSUM_MISMATCH = 3, /* A value in the input did not match a previously * read value or calculated value */ LIBCERROR_INPUT_ERROR_VALUE_MISMATCH = 4 }; /* The memory error codes * to signify errors regarding memory */ enum LIBCERROR_MEMORY_ERROR { LIBCERROR_MEMORY_ERROR_GENERIC = 0, /* There is insufficient memory available */ LIBCERROR_MEMORY_ERROR_INSUFFICIENT = 1, /* The memory failed to be copied */ LIBCERROR_MEMORY_ERROR_COPY_FAILED = 2, /* The memory failed to be set */ LIBCERROR_MEMORY_ERROR_SET_FAILED = 3 }; /* The runtime error codes * to signify errors regarding runtime processing */ enum LIBCERROR_RUNTIME_ERROR { LIBCERROR_RUNTIME_ERROR_GENERIC = 0, /* The value is missing */ LIBCERROR_RUNTIME_ERROR_VALUE_MISSING = 1, /* The value was already set */ LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET = 2, /* The creation and/or initialization of an internal structure failed */ LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED = 3, /* The resize of an internal structure failed */ LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED = 4, /* The free and/or finalization of an internal structure failed */ LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED = 5, /* The value could not be determined */ LIBCERROR_RUNTIME_ERROR_GET_FAILED = 6, /* The value could not be set */ LIBCERROR_RUNTIME_ERROR_SET_FAILED = 7, /* The value could not be appended/prepended */ LIBCERROR_RUNTIME_ERROR_APPEND_FAILED = 8, /* The value could not be copied */ LIBCERROR_RUNTIME_ERROR_COPY_FAILED = 9, /* The value could not be removed */ LIBCERROR_RUNTIME_ERROR_REMOVE_FAILED = 10, /* The value could not be printed */ LIBCERROR_RUNTIME_ERROR_PRINT_FAILED = 11, /* The value was out of bounds */ LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS = 12, /* The value exceeds the maximum for its specific type */ LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM = 13, /* The value is unsupported */ LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE = 14, /* An aborted was requested */ LIBCERROR_RUNTIME_ERROR_ABORT_REQUESTED = 15 }; /* The output error codes */ enum LIBCERROR_OUTPUT_ERROR { LIBCERROR_OUTPUT_ERROR_GENERIC = 0, /* There is insuficient space to write the output */ LIBCERROR_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1 }; #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ #endif libpff-20120802/libcerror/libcerror_unused.h0000644000175000017500000000247712005152706015647 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_INTERNAL_UNUSED_H ) #define _LIBCERROR_INTERNAL_UNUSED_H #include #if !defined( LIBCERROR_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCERROR_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCERROR_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCERROR_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCERROR_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libcerror/Makefile.in0000664000175000017500000006207012006536015014172 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcerror DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcerror_la_LIBADD = am__libcerror_la_SOURCES_DIST = libcerror_definitions.h \ libcerror_extern.h libcerror_error.c libcerror_error.h \ libcerror_libcstring.h libcerror_support.c libcerror_support.h \ libcerror_system.c libcerror_system.h libcerror_types.h \ libcerror_unused.h @HAVE_LOCAL_LIBCERROR_TRUE@am_libcerror_la_OBJECTS = \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_error.lo \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_support.lo \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_system.lo libcerror_la_OBJECTS = $(am_libcerror_la_OBJECTS) @HAVE_LOCAL_LIBCERROR_TRUE@am_libcerror_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcerror_la_SOURCES) DIST_SOURCES = $(am__libcerror_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCERROR_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCERROR_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBCERROR_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCERROR_TRUE@noinst_LTLIBRARIES = libcerror.la @HAVE_LOCAL_LIBCERROR_TRUE@libcerror_la_SOURCES = \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_definitions.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_extern.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_error.c libcerror_error.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_libcstring.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_support.c libcerror_support.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_system.c libcerror_system.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_types.h \ @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_unused.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcerror/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcerror/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcerror.la: $(libcerror_la_OBJECTS) $(libcerror_la_DEPENDENCIES) $(LINK) $(am_libcerror_la_rpath) $(libcerror_la_OBJECTS) $(libcerror_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcerror_system.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcerror ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcerror_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcerror/libcerror_support.c0000644000175000017500000000221012005152706016034 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcerror_definitions.h" #include "libcerror_support.h" #if !defined( HAVE_LOCAL_LIBCERROR ) /* Returns the library version as a string */ const char *libcerror_get_version( void ) { return( (const char *) LIBCERROR_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */ libpff-20120802/libcerror/libcerror_libcstring.h0000644000175000017500000000262612005152706016500 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_LIBCSTRING_H ) #define _LIBCERROR_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcerror/libcerror_system.h0000644000175000017500000000376212005152706015666 00000000000000/* * System functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCERROR_SYSTEM_H ) #define _LIBCERROR_SYSTEM_H #include #include #include #include "libcerror_extern.h" #include "libcerror_libcstring.h" #include "libcerror_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && ( WINVER <= 0x0500 ) && !defined( USE_CRT_FUNCTIONS ) DWORD libcerror_FormatMessageA( DWORD flags, LPCVOID source, DWORD message_identifier, DWORD language_identifier, LPCSTR string, DWORD string_size, va_list *argument_list ); DWORD libcerror_FormatMessageW( DWORD flags, LPCVOID source, DWORD message_identifier, DWORD language_identifier, LPWSTR string, DWORD string_size, va_list *argument_list ); #endif ssize_t libcerror_system_copy_string_from_error_number( libcstring_system_character_t *string, size_t string_size, uint32_t error_number ); LIBCERROR_EXTERN \ void libcerror_system_set_error( libcerror_error_t **error, int error_domain, int error_code, uint32_t system_error_code, const char *format_string, ... ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcnotify/0000775000175000017500000000000012006536212012356 500000000000000libpff-20120802/libcnotify/libcnotify_libcerror.h0000644000175000017500000000252712005152760016661 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_LIBCERROR_H ) #define _LIBCNOTIFY_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcnotify/libcnotify_unused.h0000644000175000017500000000250612005152760016176 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_INTERNAL_UNUSED_H ) #define _LIBCNOTIFY_INTERNAL_UNUSED_H #include #if !defined( LIBCNOTIFY_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCNOTIFY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCNOTIFY_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCNOTIFY_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCNOTIFY_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libcnotify/Makefile.am0000644000175000017500000000126512005152760014335 00000000000000AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcnotify.la libcnotify_la_SOURCES = \ libcnotify_definitions.h \ libcnotify_extern.h \ libcnotify_libcerror.h \ libcnotify_libcstring.h \ libcnotify_print.c libcnotify_print.h \ libcnotify_stream.c libcnotify_stream.h \ libcnotify_unused.h \ libcnotify_verbose.c libcnotify_verbose.h MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) libpff-20120802/libcnotify/libcnotify_print.c0000644000175000017500000001474512005152760016032 00000000000000/* * Notification print functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "libcnotify_definitions.h" #include "libcnotify_libcerror.h" #include "libcnotify_print.h" #include "libcnotify_stream.h" extern FILE *libcnotify_stream; #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, type, argument ) \ function( type argument, ... ) #define VASTART( argument_list, type, name ) \ va_start( argument_list, name ) #define VAEND( argument_list ) \ va_end( argument_list ) #elif defined( HAVE_VARARGS_H ) #define VARARGS( function, type, argument ) \ function( va_alist ) va_dcl #define VASTART( argument_list, type, name ) \ { type name; va_start( argument_list ); name = va_arg( argument_list, type ) #define VAEND( argument_list ) \ va_end( argument_list ); } #endif /* Print a formatted string on the notify stream * Returns the number of printed characters if successful or -1 on error */ int VARARGS( libcnotify_printf, const char *, format ) { va_list argument_list; int print_count = 0; if( libcnotify_stream == NULL ) { return( 0 ); } VASTART( argument_list, char *, format ); #if defined( HAVE_GLIB_H ) g_logv( G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, argument_list ); #else /* TODO handle narrow and wide streams * for multi platform support */ print_count = file_stream_vfprintf( libcnotify_stream, format, argument_list ); #endif VAEND( argument_list ); if( print_count <= -1 ) { return( -1 ); } return( print_count ); } #undef VARARGS #undef VASTART #undef VAEND /* Prints the data on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_data( const uint8_t *data, size_t data_size, uint8_t print_data_flags ) { size_t byte_iterator = 0; size_t data_iterator = 0; int in_group = 0; int print_count = 0; int total_print_count = 0; if( libcnotify_stream == NULL ) { return( -1 ); } if( data == NULL ) { return( -1 ); } while( data_iterator < data_size ) { if( ( ( print_data_flags & LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) != 0 ) && ( data_iterator >= 16 ) && ( ( data_iterator + 32 ) <= data_size ) ) { if( ( memory_compare( &( data[ data_iterator - 16 ] ), &( data[ data_iterator ] ), 16 ) == 0 ) && ( memory_compare( &( data[ data_iterator + 16 ] ), &( data[ data_iterator ] ), 16 ) == 0 ) ) { if( in_group == 0 ) { print_count = libcnotify_printf( "...\n" ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; in_group = 1; } byte_iterator += 16; data_iterator += 16; continue; } in_group = 0; } while( byte_iterator < data_size ) { if( byte_iterator % 16 == 0 ) { print_count = libcnotify_printf( "%.8" PRIzx ": ", byte_iterator ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } print_count = libcnotify_printf( "%.2" PRIx8 " ", data[ byte_iterator++ ] ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( byte_iterator % 16 == 0 ) { break; } else if( byte_iterator % 8 == 0 ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } while( byte_iterator % 16 != 0 ) { byte_iterator++; print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; if( ( byte_iterator % 8 == 0 ) && ( byte_iterator % 16 != 0 ) ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; byte_iterator = data_iterator; while( byte_iterator < data_size ) { if( ( data[ byte_iterator ] >= 0x20 ) && ( data[ byte_iterator ] <= 0x7e ) ) { print_count = libcnotify_printf( "%c", (char) data[ byte_iterator ] ); } else { print_count = libcnotify_printf( "." ); } if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; byte_iterator++; if( byte_iterator % 16 == 0 ) { break; } else if( byte_iterator % 8 == 0 ) { print_count = libcnotify_printf( " " ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; } } print_count = libcnotify_printf( "\n" ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; data_iterator = byte_iterator; } print_count = libcnotify_printf( "\n" ); if( print_count <= -1 ) { return( -1 ); } total_print_count += print_count; return( total_print_count ); } /* Prints the backtrace of the error on the notify stream * Returns the number of printed characters if successful or -1 on error */ int libcnotify_print_error_backtrace( libcerror_error_t *error ) { if( libcnotify_stream == NULL ) { return( -1 ); } if( libcerror_error_backtrace_fprint( error, libcnotify_stream ) != 1 ) { return( -1 ); } return( 1 ); } libpff-20120802/libcnotify/libcnotify_verbose.c0000644000175000017500000000211012005152760016322 00000000000000/* * Verbose functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcnotify_verbose.h" /* Value to indicate if the verbose notification is active */ int libcnotify_verbose = 0; /* Sets the verbose notification */ void libcnotify_verbose_set( int verbose ) { libcnotify_verbose = verbose; } libpff-20120802/libcnotify/libcnotify_stream.h0000644000175000017500000000257212005152760016171 00000000000000/* * Notification stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_STREAM_H ) #define _LIBCNOTIFY_STREAM_H #include #include #include #include "libcnotify_extern.h" #include "libcnotify_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif LIBCNOTIFY_EXTERN \ int libcnotify_stream_set( FILE *stream, libcerror_error_t **error ); LIBCNOTIFY_EXTERN \ int libcnotify_stream_open( const char *filename, libcerror_error_t **error ); LIBCNOTIFY_EXTERN \ int libcnotify_stream_close( libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcnotify/libcnotify_libcstring.h0000644000175000017500000000263012005152760017031 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_LIBCSTRING_H ) #define _LIBCNOTIFY_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcnotify/libcnotify_extern.h0000644000175000017500000000243712005152760016203 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_INTERNAL_EXTERN_H ) #define _LIBCNOTIFY_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if !defined( HAVE_LOCAL_LIBCNOTIFY ) /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_EXPORT * before including libcnotify/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCNOTIFY_DLL_EXPORT #endif #include #else #define LIBCNOTIFY_EXTERN extern #endif #endif libpff-20120802/libcnotify/libcnotify_stream.c0000644000175000017500000000766412005152760016173 00000000000000/* * Notification stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #include "libcnotify_libcerror.h" #include "libcnotify_stream.h" /* The notification stream */ FILE *libcnotify_stream = NULL; /* Value to indicate if the notification stream * was opened by the library */ int libcnotify_stream_opened_in_library = 0; /* Set the stream * Returns 1 if successful or -1 on error */ int libcnotify_stream_set( FILE *stream, libcerror_error_t **error ) { static char *function = "libcnotify_stream_set"; if( libcnotify_stream_opened_in_library != 0 ) { if( libcnotify_stream_close( error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close notify stream.", function ); return( -1 ); } } libcnotify_stream = stream; return( 1 ); } /* Opens the notification stream using a filename * The stream is opened in append mode * Returns 1 if successful or -1 on error */ int libcnotify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libcnotify_stream_open"; if( filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid filename.", function ); return( -1 ); } if( libcnotify_stream_opened_in_library != 0 ) { if( libcnotify_stream_close( error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close notify stream.", function ); return( -1 ); } } libcnotify_stream = file_stream_open( filename, FILE_STREAM_OPEN_APPEND ); if( libcnotify_stream == NULL ) { switch( errno ) { case EACCES: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_ACCESS_DENIED, "%s: access denied to file: %s.", function, filename ); break; case ENOENT: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_INVALID_RESOURCE, "%s: no such file: %s.", function, filename ); break; default: libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file: %s.", function, filename ); break; } return( -1 ); } libcnotify_stream_opened_in_library = 1; return( 1 ); } /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ int libcnotify_stream_close( libcerror_error_t **error ) { static char *function = "libcnotify_stream_close"; if( libcnotify_stream_opened_in_library != 0 ) { if( file_stream_close( libcnotify_stream ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to close stream.", function ); return( -1 ); } libcnotify_stream = NULL; libcnotify_stream_opened_in_library = 0; } return( 0 ); } libpff-20120802/libcnotify/Makefile.in0000664000175000017500000006042612006536015014354 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcnotify DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcnotify_la_LIBADD = am_libcnotify_la_OBJECTS = libcnotify_print.lo libcnotify_stream.lo \ libcnotify_verbose.lo libcnotify_la_OBJECTS = $(am_libcnotify_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcnotify_la_SOURCES) DIST_SOURCES = $(libcnotify_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcnotify.la libcnotify_la_SOURCES = \ libcnotify_definitions.h \ libcnotify_extern.h \ libcnotify_libcerror.h \ libcnotify_libcstring.h \ libcnotify_print.c libcnotify_print.h \ libcnotify_stream.c libcnotify_stream.h \ libcnotify_unused.h \ libcnotify_verbose.c libcnotify_verbose.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcnotify/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcnotify/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcnotify.la: $(libcnotify_la_OBJECTS) $(libcnotify_la_DEPENDENCIES) $(LINK) $(libcnotify_la_OBJECTS) $(libcnotify_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_print.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcnotify_verbose.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcnotify ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcnotify_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcnotify/libcnotify_print.h0000644000175000017500000000255312005152760016031 00000000000000/* * Notification print functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_PRINT_H ) #define _LIBCNOTIFY_PRINT_H #include #include #include "libcnotify_extern.h" #include "libcnotify_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif LIBCNOTIFY_EXTERN \ int libcnotify_printf( const char *format, ... ); LIBCNOTIFY_EXTERN \ int libcnotify_print_data( const uint8_t *data, size_t data_size, uint8_t print_data_flags ); LIBCNOTIFY_EXTERN \ int libcnotify_print_error_backtrace( libcerror_error_t *error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcnotify/libcnotify_verbose.h0000644000175000017500000000220712005152760016336 00000000000000/* * Verbose functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCNOTIFY_VERBOSE_H ) #define _LIBCNOTIFY_VERBOSE_H #include #include #include "libcnotify_extern.h" #if defined( __cplusplus ) extern "C" { #endif LIBCNOTIFY_EXTERN \ int libcnotify_verbose; LIBCNOTIFY_EXTERN \ void libcnotify_verbose_set( int verbose ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcnotify/libcnotify_definitions.h0000644000175000017500000000273212005152760017207 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCNOTIFY_INTERNAL_DEFINITIONS_H ) #define LIBCNOTIFY_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if !defined( HAVE_LOCAL_LIBCNOTIFY ) #include /* The definitions in are copied here * for local use of libcnotify */ #else #define LIBCNOTIFY_VERSION 20120630 /* The libcstring version string */ #define LIBCNOTIFY_VERSION_STRING "20120630" /* The print data flags */ enum LIBCNOTIFY_NOTIFY_PRINT_DATA_FLAGS { LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA = 0x01, }; #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */ #endif libpff-20120802/libpff.spec0000664000175000017500000000545112006536127012264 00000000000000Name: libpff Version: 20120802 Release: 1 Summary: Library to to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. Group: System Environment/Libraries License: LGPL Source: %{name}-%{version}.tar.gz URL: http://code.google.com/p/libpff/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description libpff is a library to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. PFF is used in PAB (Personal Address Book), PST (Personal Storage Table) and OST (Offline Storage Table) files. %package devel Summary: Header files and libraries for developing applications for libpff Group: Development/Libraries Requires: libpff = %{version}-%{release} %description devel Header files and libraries for developing applications for libpff. %package tools Summary: Several tools for reading Personal Folder Files (OST, PAB and PST) Group: Applications/System Requires: libpff = %{version}-%{release} @libevt_tools_spec_build_requires@ %description tools Several tools for reading Personal Folder Files (OST, PAB and PST) %package python Summary: Python binding for libpff Group: System Environment/Libraries Requires: libpff = %{version}-%{release} python BuildRequires: python-devel %description python Python binding for libpff %prep %setup -q %build %configure --prefix=/usr --libdir=%{_libdir} --mandir=%{_mandir} make %{?_smp_mflags} %install rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install %clean rm -rf ${RPM_BUILD_ROOT} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_libdir}/*.so.* %files devel %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README README.dll README.macosx README.mingw README.static ChangeLog %{_libdir}/*.a %{_libdir}/*.la %{_libdir}/*.so %{_libdir}/pkgconfig/libpff.pc %{_includedir}/* %{_mandir}/man3/* %files tools %defattr(644,root,root,755) %doc AUTHORS COPYING NEWS README %attr(755,root,root) %{_bindir}/pffexport %attr(755,root,root) %{_bindir}/pffinfo %{_mandir}/man1/* %files python %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/python*/site-packages/*.so.* %{_libdir}/python*/site-packages/*.a %{_libdir}/python*/site-packages/*.la %{_libdir}/python*/site-packages/*.so %changelog * Tue Apr 24 2012 Joachim Metz 20120424-1 - Changes due to dependency changes * Tue Oct 18 2011 Joachim Metz 20111018-1 - Update for configure changes and README files - Added support for Python bindings * Tue Jun 29 2010 Joachim Metz 20100629-1 - Clean up of previous version of spec file libpff-20120802/ltmain.sh0000755000175000017500000105021612006536007011764 00000000000000 # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 libpff-20120802/config.rpath0000754000175000017500000004364711502470475012467 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2007 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; rdos*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3*) wl='-Wl,' ;; sysv4*MP*) ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) wl='-Wl,' ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. # Unlike libtool.m4, here we don't care about _all_ names of the library, but # only about the one the linker finds when passed -lNAME. This is the last # element of library_names_spec in libtool.m4, or possibly two of them if the # linker has special search rules. library_names_spec= # the last element of library_names_spec in libtool.m4 libname_spec='lib$name' case "$host_os" in aix3*) library_names_spec='$libname.a' ;; aix4* | aix5*) library_names_spec='$libname$shrext' ;; amigaos*) library_names_spec='$libname.a' ;; beos*) library_names_spec='$libname$shrext' ;; bsdi[45]*) library_names_spec='$libname$shrext' ;; cygwin* | mingw* | pw32*) shrext=.dll library_names_spec='$libname.dll.a $libname.lib' ;; darwin* | rhapsody*) shrext=.dylib library_names_spec='$libname$shrext' ;; dgux*) library_names_spec='$libname$shrext' ;; freebsd1*) ;; freebsd* | dragonfly*) case "$host_os" in freebsd[123]*) library_names_spec='$libname$shrext$versuffix' ;; *) library_names_spec='$libname$shrext' ;; esac ;; gnu*) library_names_spec='$libname$shrext' ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac library_names_spec='$libname$shrext' ;; interix[3-9]*) library_names_spec='$libname$shrext' ;; irix5* | irix6* | nonstopux*) library_names_spec='$libname$shrext' case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux* | k*bsd*-gnu) library_names_spec='$libname$shrext' ;; knetbsd*-gnu) library_names_spec='$libname$shrext' ;; netbsd*) library_names_spec='$libname$shrext' ;; newsos6) library_names_spec='$libname$shrext' ;; nto-qnx*) library_names_spec='$libname$shrext' ;; openbsd*) library_names_spec='$libname$shrext$versuffix' ;; os2*) libname_spec='$name' shrext=.dll library_names_spec='$libname.a' ;; osf3* | osf4* | osf5*) library_names_spec='$libname$shrext' ;; rdos*) ;; solaris*) library_names_spec='$libname$shrext' ;; sunos4*) library_names_spec='$libname$shrext$versuffix' ;; sysv4 | sysv4.3*) library_names_spec='$libname$shrext' ;; sysv4*MP*) library_names_spec='$libname$shrext' ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) library_names_spec='$libname$shrext' ;; uts4*) library_names_spec='$libname$shrext' ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCERROR_H ) #define _PFFTOOLS_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/info_handle.c0000644000175000017500000004402612005155310014401 00000000000000/* * Info handle * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "info_handle.h" #include "pffinput.h" #include "pfftools_libcerror.h" #include "pfftools_libclocale.h" #include "pfftools_libcstring.h" #include "pfftools_libcsystem.h" #include "pfftools_libpff.h" #define INFO_HANDLE_NOTIFY_STREAM stdout /* Initializes the info handle * Returns 1 if successful or -1 on error */ int info_handle_initialize( info_handle_t **info_handle, libcerror_error_t **error ) { static char *function = "info_handle_initialize"; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( *info_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid info handle value already set.", function ); return( -1 ); } *info_handle = memory_allocate_structure( info_handle_t ); if( *info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create info handle.", function ); goto on_error; } if( memory_set( *info_handle, 0, sizeof( info_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear info handle.", function ); goto on_error; } if( libpff_file_initialize( &( ( *info_handle )->input_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to initialize input file.", function ); goto on_error; } ( *info_handle )->notify_stream = INFO_HANDLE_NOTIFY_STREAM; return( 1 ); on_error: if( *info_handle != NULL ) { memory_free( *info_handle ); *info_handle = NULL; } return( -1 ); } /* Frees the info handle and its elements * Returns 1 if successful or -1 on error */ int info_handle_free( info_handle_t **info_handle, libcerror_error_t **error ) { static char *function = "info_handle_free"; int result = 1; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( *info_handle != NULL ) { if( ( *info_handle )->input_file != NULL ) { if( libpff_file_free( &( ( *info_handle )->input_file ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free input file.", function ); result = -1; } } memory_free( *info_handle ); *info_handle = NULL; } return( result ); } /* Signals the info handle to abort * Returns 1 if successful or -1 on error */ int info_handle_signal_abort( info_handle_t *info_handle, libcerror_error_t **error ) { static char *function = "info_handle_signal_abort"; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( info_handle->input_file != NULL ) { if( libpff_file_signal_abort( info_handle->input_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to signal input file to abort.", function ); return( -1 ); } } return( 1 ); } /* Sets the ascii codepage * Returns 1 if successful or -1 on error */ int info_handle_set_ascii_codepage( info_handle_t *info_handle, const libcstring_system_character_t *string, libcerror_error_t **error ) { static char *function = "info_handle_set_ascii_codepage"; size_t string_length = 0; uint32_t feature_flags = 0; int result = 0; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } feature_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS; string_length = libcstring_system_string_length( string ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libclocale_codepage_copy_from_string_wide( &( info_handle->ascii_codepage ), string, string_length, feature_flags, error ); #else result = libclocale_codepage_copy_from_string( &( info_handle->ascii_codepage ), string, string_length, feature_flags, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine ASCII codepage.", function ); return( -1 ); } return( result ); } /* Opens the input of the info handle * Returns 1 if successful or -1 on error */ int info_handle_open_input( info_handle_t *info_handle, const libcstring_system_character_t *filename, libcerror_error_t **error ) { static char *function = "info_handle_open_input"; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libpff_file_open_wide( info_handle->input_file, filename, LIBPFF_OPEN_READ, error ) != 1 ) #else if( libpff_file_open( info_handle->input_file, filename, LIBPFF_OPEN_READ, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open input file.", function ); return( -1 ); } return( 1 ); } /* Closes the info handle * Returns the 0 if succesful or -1 on error */ int info_handle_close( info_handle_t *info_handle, libcerror_error_t **error ) { static char *function = "info_handle_close"; int result = 0; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( info_handle->root_item != NULL ) { if( libpff_item_free( &( info_handle->root_item ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root item.", function ); result = -1; } } if( libpff_file_close( info_handle->input_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close input file.", function ); result = -1; } return( result ); } /* Prints the file information to a stream * Returns 1 if successful or -1 on error */ int info_handle_file_fprint( info_handle_t *info_handle, libcerror_error_t **error ) { static char *function = "info_handle_file_fprint"; size64_t file_size = 0; uint8_t file_content_type = 0; uint8_t file_type = 0; uint8_t encryption_type = 0; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( libpff_file_get_size( info_handle->input_file, &file_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size.", function ); return( -1 ); } if( libpff_file_get_content_type( info_handle->input_file, &file_content_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file content type.", function ); return( -1 ); } if( libpff_file_get_type( info_handle->input_file, &file_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve file type.", function ); return( -1 ); } if( libpff_file_get_encryption_type( info_handle->input_file, &encryption_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve encryption type.", function ); return( -1 ); } fprintf( info_handle->notify_stream, "Personal Folder File information:\n" ); fprintf( info_handle->notify_stream, "\tFile size:\t\t%" PRIu64 " bytes\n", file_size ); fprintf( info_handle->notify_stream, "\tFile content type:\t" ); if( file_content_type == LIBPFF_FILE_CONTENT_TYPE_PAB ) { fprintf( info_handle->notify_stream, "Personal Address Book (PAB)\n" ); } else if( file_content_type == LIBPFF_FILE_CONTENT_TYPE_PST ) { fprintf( info_handle->notify_stream, "Personal Storage Tables (PST)\n" ); } else if( file_content_type == LIBPFF_FILE_CONTENT_TYPE_OST ) { fprintf( info_handle->notify_stream, "Offline Storage Tables (OST)\n" ); } else { fprintf( info_handle->notify_stream, "unknown: 0x02%" PRIx8 "\n", file_content_type ); } fprintf( info_handle->notify_stream, "\tFile type:\t\t" ); if( file_type == LIBPFF_FILE_TYPE_32BIT ) { fprintf( info_handle->notify_stream, "32-bit\n" ); } else if( file_type == LIBPFF_FILE_TYPE_64BIT ) { fprintf( info_handle->notify_stream, "64-bit\n" ); } else { fprintf( info_handle->notify_stream, "unknown: 0x02%" PRIx8 "\n", file_type ); } fprintf( info_handle->notify_stream, "\tEncryption type:\t" ); if( encryption_type == LIBPFF_ENCRYPTION_TYPE_NONE ) { fprintf( info_handle->notify_stream, "none\n" ); } else if( encryption_type == LIBPFF_ENCRYPTION_TYPE_COMPRESSIBLE ) { fprintf( info_handle->notify_stream, "compressible\n" ); } else if( encryption_type == LIBPFF_ENCRYPTION_TYPE_HIGH ) { fprintf( info_handle->notify_stream, "high\n" ); } else { fprintf( info_handle->notify_stream, "unknown: 0x02%" PRIx8 "\n", encryption_type ); } fprintf( info_handle->notify_stream, "\n" ); return( 1 ); } /* Prints the message store to a stream * Returns 1 if successful or -1 on error */ int info_handle_message_store_fprint( info_handle_t *info_handle, libcerror_error_t **error ) { libpff_item_t *message_store = NULL; static char *function = "info_handle_message_store_fprint"; uint32_t password_checksum = 0; uint32_t valid_folder_mask = 0; int result = 0; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } result = libpff_file_get_message_store( info_handle->input_file, &message_store, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message store.", function ); return( -1 ); } fprintf( info_handle->notify_stream, "Message store:\n" ); if( libpff_message_store_get_valid_folder_mask( message_store, &valid_folder_mask, NULL ) == 1 ) { fprintf( info_handle->notify_stream, "\tFolders:\t\t" ); if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_SUBTREE ) == LIBPFF_VALID_FOLDER_MASK_SUBTREE ) { fprintf( info_handle->notify_stream, "Subtree, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_INBOX ) == LIBPFF_VALID_FOLDER_MASK_INBOX ) { fprintf( info_handle->notify_stream, "Inbox, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_OUTBOX ) == LIBPFF_VALID_FOLDER_MASK_OUTBOX ) { fprintf( info_handle->notify_stream, "Outbox, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_WASTEBOX ) == LIBPFF_VALID_FOLDER_MASK_WASTEBOX ) { fprintf( info_handle->notify_stream, "Wastbox, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_SENTMAIL ) == LIBPFF_VALID_FOLDER_MASK_SENTMAIL ) { fprintf( info_handle->notify_stream, "Sentmail, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_VIEWS ) == LIBPFF_VALID_FOLDER_MASK_VIEWS ) { fprintf( info_handle->notify_stream, "Views, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_COMMON_VIEWS ) == LIBPFF_VALID_FOLDER_MASK_COMMON_VIEWS ) { fprintf( info_handle->notify_stream, "Common views, " ); } if( ( valid_folder_mask & LIBPFF_VALID_FOLDER_MASK_FINDER ) == LIBPFF_VALID_FOLDER_MASK_FINDER ) { fprintf( info_handle->notify_stream, "Finder" ); } fprintf( info_handle->notify_stream, "\n" ); } if( libpff_message_store_get_password_checksum( message_store, &password_checksum, NULL ) == 1 ) { fprintf( info_handle->notify_stream, "\tPassword checksum:\t" ); if( password_checksum == 0 ) { fprintf( info_handle->notify_stream, "N/A" ); } else { fprintf( info_handle->notify_stream, "0x%08" PRIx32 "", password_checksum ); } fprintf( info_handle->notify_stream, "\n" ); } fprintf( info_handle->notify_stream, "\n" ); if( libpff_item_free( &message_store, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free message store item.", function ); return( -1 ); } return( 1 ); } /* Prints the unallocaated blocks to a stream * Returns 1 if successful or -1 on error */ int info_handle_unallocated_blocks_fprint( info_handle_t *info_handle, libcerror_error_t **error ) { static char *function = "info_handle_unallocated_blocks_fprint"; off64_t offset = 0; size64_t size = 0; int block_iterator = 0; int number_of_unallocated_blocks = 0; if( info_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid info handle.", function ); return( -1 ); } if( libpff_file_get_number_of_unallocated_blocks( info_handle->input_file, LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE, &number_of_unallocated_blocks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of unallocated blocks.", function ); return( -1 ); } fprintf( info_handle->notify_stream, "Unallocated page blocks:\n" ); if( number_of_unallocated_blocks > 0 ) { for( block_iterator = 0; block_iterator < number_of_unallocated_blocks; block_iterator++ ) { if( libpff_file_get_unallocated_block( info_handle->input_file, LIBPFF_UNALLOCATED_BLOCK_TYPE_PAGE, block_iterator, &offset, &size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve unallocated block: %d.", function, block_iterator + 1 ); return( -1 ); } fprintf( info_handle->notify_stream, "\t%08" PRIu64 " (0x%08" PRIx64 ") - %08" PRIu64 " (0x%08" PRIx64 ") size: %" PRIu64 "\n", offset, offset, offset + size, offset + size, size ); } } else { fprintf( info_handle->notify_stream, "\tN/A\n" ); } fprintf( info_handle->notify_stream, "\n" ); if( libpff_file_get_number_of_unallocated_blocks( info_handle->input_file, LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA, &number_of_unallocated_blocks, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of unallocated blocks.", function ); return( -1 ); } fprintf( info_handle->notify_stream, "Unallocated data blocks:\n" ); if( number_of_unallocated_blocks > 0 ) { for( block_iterator = 0; block_iterator < number_of_unallocated_blocks; block_iterator++ ) { if( libpff_file_get_unallocated_block( info_handle->input_file, LIBPFF_UNALLOCATED_BLOCK_TYPE_DATA, block_iterator, &offset, &size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve unallocated block: %d.", function, ( block_iterator + 1 ) ); return( -1 ); } fprintf( info_handle->notify_stream, "\t%08" PRIu64 " (0x%08" PRIx64 ") - %08" PRIu64 " (0x%08" PRIx64 ") size: %" PRIu64 "\n", offset, offset, offset + size, offset + size, size ); } } else { fprintf( info_handle->notify_stream, "\tN/A\n" ); } fprintf( info_handle->notify_stream, "\n" ); return( 1 ); } libpff-20120802/pfftools/pfftools_libcfile.h0000644000175000017500000000250512005155310015621 00000000000000/* * The internal libcfile header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCFILE_H ) #define _PFFTOOLS_LIBCFILE_H #include /* Define HAVE_LOCAL_LIBCFILE for local use of libcfile */ #if defined( HAVE_LOCAL_LIBCFILE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCFILE_DLL_IMPORT * before including libcfile.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCFILE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/pfftools_libpff.h0000644000175000017500000000212712005155310015312 00000000000000/* * The internal libpff header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBPFF_H ) #define _PFFTOOLS_LIBPFF_H #include /* If Cygwin libtool DLL support is enabled set LIBPFF_DLL_IMPORT * before including libpff.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBPFF_DLL_IMPORT #endif #include #endif libpff-20120802/pfftools/pffinfo.c0000644000175000017500000001754012005155310013563 00000000000000/* * Shows information obtained from a Personal Folder File (OST, PAB and PST) * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "info_handle.h" #include "pffinput.h" #include "pffoutput.h" #include "pfftools_libcerror.h" #include "pfftools_libclocale.h" #include "pfftools_libcnotify.h" #include "pfftools_libcstring.h" #include "pfftools_libcsystem.h" #include "pfftools_libpff.h" info_handle_t *pffinfo_info_handle = NULL; int pffinfo_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use pffinfo to determine information about a Personal Folder File (OST, PAB\n" "and PST).\n\n" ); fprintf( stream, "Usage: pffinfo [ -c codepage ] [ -ahvV ] source\n\n" ); fprintf( stream, "\tsource: the source file\n\n" ); fprintf( stream, "\t-a: shows allocation information\n" ); fprintf( stream, "\t-c: codepage of ASCII strings, options: ascii, windows-1250,\n" "\t windows-1251, windows-1252 (default), windows-1253,\n" "\t windows-1254, windows-1255, windows-1256, windows-1257\n" "\t or windows-1258\n" ); fprintf( stream, "\t-h: shows this help\n" ); fprintf( stream, "\t-v: verbose output to stderr\n" ); fprintf( stream, "\t-V: print version\n" ); } /* Signal handler for pffinfo */ void pffinfo_signal_handler( libcsystem_signal_t signal LIBCSYSTEM_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pffinfo_signal_handler"; LIBCSYSTEM_UNREFERENCED_PARAMETER( signal ) pffinfo_abort = 1; if( pffinfo_info_handle != NULL ) { if( info_handle_signal_abort( pffinfo_info_handle, &error ) != 1 ) { libcnotify_printf( "%s: unable to signal info handle to abort.\n", function ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } } /* Force stdin to close otherwise any function reading it will remain blocked */ if( libcsystem_file_io_close( 0 ) != 0 ) { libcnotify_printf( "%s: unable to close stdin.\n", function ); } } /* The main program */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { libcerror_error_t *error = NULL; libcstring_system_character_t *option_ascii_codepage = NULL; libcstring_system_character_t *source = NULL; char *program = "pffinfo"; libcstring_system_integer_t option = 0; uint8_t show_allocation_information = 0; int result = 0; int verbose = 0; libcnotify_stream_set( stderr, NULL ); libcnotify_verbose_set( 1 ); if( libclocale_initialize( "pfftools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( libcsystem_initialize( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize system values.\n" ); goto on_error; } pffoutput_version_fprint( stdout, program ); while( ( option = libcsystem_getopt( argc, argv, _LIBCSTRING_SYSTEM_STRING( "ac:hvV" ) ) ) != (libcstring_system_integer_t) -1 ) { switch( option ) { case (libcstring_system_integer_t) '?': default: fprintf( stderr, "Invalid argument: %" PRIs_LIBCSTRING_SYSTEM "\n", argv[ optind - 1 ] ); usage_fprint( stdout ); return( EXIT_FAILURE ); case (libcstring_system_integer_t) 'a': show_allocation_information = 1; break; case (libcstring_system_integer_t) 'c': option_ascii_codepage = optarg; break; case (libcstring_system_integer_t) 'h': usage_fprint( stdout ); return( EXIT_SUCCESS ); case (libcstring_system_integer_t) 'v': verbose = 1; break; case (libcstring_system_integer_t) 'V': pffoutput_copyright_fprint( stdout ); return( EXIT_SUCCESS ); } } if( optind == argc ) { fprintf( stderr, "Missing source file.\n" ); usage_fprint( stdout ); return( EXIT_FAILURE ); } source = argv[ optind ]; libcnotify_verbose_set( verbose ); libpff_notify_set_stream( stderr, NULL ); libpff_notify_set_verbose( verbose ); if( info_handle_initialize( &pffinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to initialize info handle.\n" ); goto on_error; } if( option_ascii_codepage != NULL ) { result = info_handle_set_ascii_codepage( pffinfo_info_handle, option_ascii_codepage, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set ASCII codepage in info handle.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "Unsupported ASCII codepage defaulting to: windows-1252.\n" ); } } /* TODO if( libcsystem_signal_attach( pffinfo_signal_handler, &error ) != 1 ) { fprintf( stderr, "Unable to attach signal handler.\n" ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } */ if( info_handle_open_input( pffinfo_info_handle, source, &error ) != 1 ) { fprintf( stderr, "Unable to open: %" PRIs_LIBCSTRING_SYSTEM ".\n", source ); goto on_error; } if( info_handle_file_fprint( pffinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to print file information.\n" ); goto on_error; } if( info_handle_message_store_fprint( pffinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to print file stream and storage items.\n" ); goto on_error; } if( show_allocation_information != 0 ) { if( info_handle_unallocated_blocks_fprint( pffinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to print file unallocated blocks.\n" ); goto on_error; } } /* TODO if( libcsystem_signal_detach( &error ) != 1 ) { fprintf( stderr, "Unable to detach signal handler.\n" ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } */ if( info_handle_close( pffinfo_info_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close info handle.\n" ); goto on_error; } if( info_handle_free( &pffinfo_info_handle, &error ) != 1 ) { fprintf( stderr, "Unable to free info handle.\n" ); goto on_error; } return( EXIT_SUCCESS ); on_error: if( error != NULL ) { libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } if( pffinfo_info_handle != NULL ) { info_handle_close( pffinfo_info_handle, NULL ); info_handle_free( &pffinfo_info_handle, NULL ); } return( EXIT_FAILURE ); } libpff-20120802/pfftools/pffoutput.h0000644000175000017500000000236112005155310014170 00000000000000/* * Common output functions for the pfftools * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFOUTPUT_H ) #define _PFFOUTPUT_H #include #include #include #if defined( __cplusplus ) extern "C" { #endif void pffoutput_copyright_fprint( FILE *stream ); void pffoutput_version_fprint( FILE *stream, const char *program ); void pffoutput_version_detailed_fprint( FILE *stream, const char *program ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pfftools/Makefile.am0000644000175000017500000000444412005156655014040 00000000000000AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBFMAPI_CPPFLAGS@ \ @LIBCSYSTEM_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ \ @LIBPFF_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ bin_PROGRAMS = \ pffexport \ pffinfo pffexport_SOURCES = \ export_handle.c export_handle.h \ item_file.c item_file.h \ log_handle.c log_handle.h \ pffexport.c \ pffinput.c pffinput.h \ pfftools_libcerror.h \ pfftools_libclocale.h \ pfftools_libcnotify.h \ pfftools_libcfile.h \ pfftools_libcpath.h \ pfftools_libcsplit.h \ pfftools_libcstring.h \ pfftools_libcsystem.h \ pfftools_libfdatetime.h \ pfftools_libfguid.h \ pfftools_libfvalue.h \ pfftools_libpff.h \ pffoutput.c pffoutput.h pffexport_LDADD = \ @LIBCSYSTEM_LIBADD@ \ @LIBFMAPI_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ ../libpff/libpff.la \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCSTRING_LIBADD@ \ @LIBINTL@ \ @MEMWATCH_LIBADD@ pffinfo_SOURCES = \ info_handle.c info_handle.h \ pffinfo.c \ pffinput.c pffinput.h \ pfftools_libcerror.h \ pfftools_libclocale.h \ pfftools_libcnotify.h \ pfftools_libcstring.h \ pfftools_libcsystem.h \ pfftools_libpff.h \ pffoutput.c pffoutput.h pffinfo_LDADD = \ @LIBCSYSTEM_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ ../libpff/libpff.la \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCSTRING_LIBADD@ \ @LIBINTL@ \ @MEMWATCH_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on pffexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(pffexport_SOURCES) @echo "Running splint on pffinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(pffinfo_SOURCES) libpff-20120802/pfftools/pfftools_libfvalue.h0000644000175000017500000000303212005155310016015 00000000000000/* * The libfvalue header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBFVALUE_H ) #define _PFFTOOLS_LIBFVALUE_H #include /* Define HAVE_LOCAL_LIBFVALUE for local use of libfvalue */ #if defined( HAVE_LOCAL_LIBFVALUE ) #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFVALUE_DLL_IMPORT * before including libfvalue.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFVALUE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/log_handle.h0000644000175000017500000000323112005155310014225 00000000000000/* * Log handle * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LOG_HANDLE_H ) #define _LOG_HANDLE_H #include #include #include #include "pfftools_libcerror.h" #include "pfftools_libcstring.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct log_handle log_handle_t; struct log_handle { /* The log stream */ FILE *log_stream; }; int log_handle_initialize( log_handle_t **log_handle, libcerror_error_t **error ); int log_handle_free( log_handle_t **log_handle, libcerror_error_t **error ); int log_handle_open( log_handle_t *log_handle, const libcstring_system_character_t *filename, libcerror_error_t **error ); int log_handle_close( log_handle_t *log_handle, libcerror_error_t **error ); void log_handle_printf( log_handle_t *log_handle, char *format, ... ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pfftools/pfftools_libcpath.h0000644000175000017500000000241312005156562015646 00000000000000/* * The internal libcpath header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCPATH_H ) #define _PFFTOOLS_LIBCPATH_H #include /* Define HAVE_LOCAL_LIBCPATH for local use of libcpath */ #if defined( HAVE_LOCAL_LIBCPATH ) #include #include #else /* If libtool DLL support is enabled set LIBCPATH_DLL_IMPORT * before including libcpath.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCPATH_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/pfftools_libcstring.h0000644000175000017500000000262412005155310016212 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCSTRING_H ) #define _PFFTOOLS_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/pffoutput.c0000644000175000017500000000710212005155310014161 00000000000000/* * Common output functions for the pfftools * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error No variable argument support available #endif #if defined( HAVE_LOCAL_LIBUNA ) #include #elif defined( HAVE_LIBUNA_H ) #include #endif #if defined( HAVE_LOCAL_LIBBFIO ) #include #elif defined( HAVE_LIBBFIO_H ) #include #endif #if defined( HAVE_LOCAL_LIBFDATA ) #include #elif defined( HAVE_LIBFDATA_H ) #include #endif #if defined( HAVE_LOCAL_LIBFDATETIME ) #include #elif defined( HAVE_LIBFDATETIME_H ) #include #endif #if defined( HAVE_LOCAL_LIBFGUID ) #include #elif defined( HAVE_LIBFGUID_H ) #include #endif #if defined( HAVE_LOCAL_LIBFWNT ) #include #elif defined( HAVE_LIBFWNT_H ) #include #endif #if defined( HAVE_LOCAL_LIBFMAPI ) #include #elif defined( HAVE_LIBFMAPI_H ) #include #endif #include "pffoutput.h" #include "pfftools_libpff.h" /* Prints the copyright information */ void pffoutput_copyright_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Copyright (c) 2008-2012, Joachim Metz <%s> and contributors.\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n", PACKAGE_BUGREPORT ); } /* Prints the version information */ void pffoutput_version_fprint( FILE *stream, const char *program ) { if( stream == NULL ) { return; } if( program == NULL ) { return; } fprintf( stream, "%s %s\n\n", program, LIBPFF_VERSION_STRING ); } /* Prints the detailed version information */ void pffoutput_version_detailed_fprint( FILE *stream, const char *program ) { if( stream == NULL ) { return; } if( program == NULL ) { return; } fprintf( stream, "%s %s (libpff %s", program, LIBPFF_VERSION_STRING, LIBPFF_VERSION_STRING ); fprintf( stream, ", libuna %s", LIBUNA_VERSION_STRING ); fprintf( stream, ", libbfio %s", LIBBFIO_VERSION_STRING ); fprintf( stream, ", libfdata %s", LIBFDATA_VERSION_STRING ); fprintf( stream, ", libfdatetime %s", LIBFDATETIME_VERSION_STRING ); fprintf( stream, ", libfguid %s", LIBFGUID_VERSION_STRING ); fprintf( stream, ", libfwnt %s", LIBFWNT_VERSION_STRING ); fprintf( stream, ", libfmapi %s", LIBFMAPI_VERSION_STRING ); fprintf( stream, ")\n\n" ); } libpff-20120802/pfftools/export_handle.h0000644000175000017500000004304012005200224014762 00000000000000/* * Export handle * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _EXPORT_HANDLE_H ) #define _EXPORT_HANDLE_H #include #include #include "item_file.h" #include "log_handle.h" #include "pfftools_libcerror.h" #include "pfftools_libcstring.h" #include "pfftools_libfdatetime.h" #include "pfftools_libfguid.h" #include "pfftools_libpff.h" #if defined( __cplusplus ) extern "C" { #endif enum EXPORT_MODES { EXPORT_MODE_ALL = (int) 'a', EXPORT_MODE_DEBUG = (int) 'd', EXPORT_MODE_ITEMS = (int) 'i', EXPORT_MODE_ITEMS_NO_ATTACHMENTS = (int) 'n', EXPORT_MODE_RECOVERED = (int) 'r' }; enum EXPORT_FORMATS { EXPORT_FORMAT_ALL = (int) 'a', EXPORT_FORMAT_FTK = (int) 'f', EXPORT_FORMAT_HTML = (int) 'h', EXPORT_FORMAT_RTF = (int) 'r', EXPORT_FORMAT_TEXT = (int) 't' }; typedef struct export_handle export_handle_t; struct export_handle { /* The export mode */ uint8_t export_mode; /* Value to indicate item values should be dumped */ uint8_t dump_item_values; /* The preferred export format */ int preferred_export_format; /* The ascii codepage */ int ascii_codepage; /* The target path */ libcstring_system_character_t *target_path; /* The target path size */ size_t target_path_size; /* The items export path */ libcstring_system_character_t *items_export_path; /* The items export path size */ size_t items_export_path_size; /* The orphans export path */ libcstring_system_character_t *orphans_export_path; /* The orphans export path size */ size_t orphans_export_path_size; /* The recovered export path */ libcstring_system_character_t *recovered_export_path; /* The recovered export path size */ size_t recovered_export_path_size; /* The number of items */ int number_of_items; /* The number of orphan items */ int number_of_orphan_items; /* The number of recovered items */ int number_of_recovered_items; /* The number of exported items */ int number_of_exported_items; /* The number of exported orphan items */ int number_of_exported_orphan_items; /* The number of exported recovered items */ int number_of_exported_recovered_items; /* Value to indicate if status information * should be printed to the notify stream */ uint8_t print_status_information; /* The nofication output stream */ FILE *notify_stream; /* Value to indicate if abort was signalled */ int abort; }; int export_handle_initialize( export_handle_t **export_handle, libcerror_error_t **error ); int export_handle_free( export_handle_t **export_handle, libcerror_error_t **error ); int export_handle_signal_abort( export_handle_t *export_handle, libcerror_error_t **error ); int export_handle_set_export_mode( export_handle_t *export_handle, const libcstring_system_character_t *string, libcerror_error_t **error ); int export_handle_set_preferred_export_format( export_handle_t *export_handle, const libcstring_system_character_t *string, libcerror_error_t **error ); int export_handle_set_ascii_codepage( export_handle_t *export_handle, const libcstring_system_character_t *string, libcerror_error_t **error ); int export_handle_set_target_path( export_handle_t *export_handle, const libcstring_system_character_t *target_path, libcerror_error_t **error ); int export_handle_set_export_path( export_handle_t *export_handle, const libcstring_system_character_t *base_path, size_t base_path_length, const libcstring_system_character_t *suffix, size_t suffix_length, libcstring_system_character_t **export_path, size_t *export_path_size, libcerror_error_t **error ); int export_handle_create_items_export_path( export_handle_t *export_handle, libcerror_error_t **error ); int export_handle_create_orphans_export_path( export_handle_t *export_handle, libcerror_error_t **error ); int export_handle_create_recovered_export_path( export_handle_t *export_handle, libcerror_error_t **error ); /* Item generic export functions */ int export_handle_create_default_item_directory( export_handle_t *export_handle, int item_index, const libcstring_system_character_t *item_prefix, size_t item_prefix_length, const libcstring_system_character_t *export_path, size_t export_path_length, libcstring_system_character_t **item_directory_path, size_t *item_directory_path_size, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_create_item_file( export_handle_t *export_handle, const libcstring_system_character_t *path, size_t path_length, const libcstring_system_character_t *filename, size_t filename_length, item_file_t **item_file, libcerror_error_t **error ); int export_handle_export_item( export_handle_t *export_handle, libpff_item_t *item, int item_index, int number_of_items, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_item_value_to_item_file( export_handle_t *export_handle, libpff_item_t *item, uint32_t set_index, uint32_t entry_index, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_item_values( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *item_values_filename, size_t item_values_filename_length, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_sub_items( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); /* Message item export functions */ int export_handle_export_message_header( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_flags_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_importance_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_priority_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_sensitivity_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_subject_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_header_to_item_file( export_handle_t *export_handle, libpff_item_t *message, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_body( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_body_html( export_handle_t *export_handle, libpff_item_t *message, size_t message_html_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_body_html_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t message_html_body_size, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_body_rtf( export_handle_t *export_handle, libpff_item_t *message, size_t message_rtf_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_body_rtf_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t message_rtf_body_size, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_body_plain_text( export_handle_t *export_handle, libpff_item_t *message, size_t plain_text_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_body_plain_text_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t plain_text_body_size, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_conversation_index( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_conversation_index_to_item_file( export_handle_t *export_handle, libpff_item_t *message, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_message_transport_headers( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_message_transport_headers_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t message_transport_headers_size, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_attachments( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_attachment( export_handle_t *export_handle, libpff_item_t *attachment, int attachment_index, int number_of_attachments, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_attachment_data( export_handle_t *export_handle, libpff_item_t *attachment, int attachment_index, int number_of_attachments, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_attachment_item( export_handle_t *export_handle, libpff_item_t *attachment, int attachment_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_recipients( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_recipient_type_to_item_file( export_handle_t *export_handle, libpff_item_t *recipients, int recipient_index, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ); int export_handle_export_recipients_to_item_file( export_handle_t *export_handle, libpff_item_t *recipients, int number_of_recipients, item_file_t *item_file, log_handle_t *log_handle, libcerror_error_t **error ); /* Item specific export functions */ int export_handle_export_activity( export_handle_t *export_handle, libpff_item_t *activity, int activity_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_appointment( export_handle_t *export_handle, libpff_item_t *appointment, int appointment_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_contact( export_handle_t *export_handle, libpff_item_t *contact, int contact_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_document( export_handle_t *export_handle, libpff_item_t *document, int document_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_email( export_handle_t *export_handle, libpff_item_t *email, int email_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_email_ftk( export_handle_t *export_handle, libpff_item_t *email, size_t email_html_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_meeting( export_handle_t *export_handle, libpff_item_t *meeting, int meeting_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_note( export_handle_t *export_handle, libpff_item_t *note, int note_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_rss_feed( export_handle_t *export_handle, libpff_item_t *rss_feed, int rss_feed_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_task( export_handle_t *export_handle, libpff_item_t *task, int task_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); /* Folder export functions */ int export_handle_export_folder( export_handle_t *export_handle, libpff_item_t *folder, int folder_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_sub_folders( export_handle_t *export_handle, libpff_item_t *folder, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_sub_messages( export_handle_t *export_handle, libpff_item_t *folder, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_unknowns( export_handle_t *export_handle, libpff_item_t *folder, libcerror_error_t **error ); /* File export functions */ int export_handle_export_items( export_handle_t *export_handle, libpff_file_t *file, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_orphan_items( export_handle_t *export_handle, libpff_file_t *file, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_recovered_items( export_handle_t *export_handle, libpff_file_t *file, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ); int export_handle_export_file( export_handle_t *export_handle, libpff_file_t *file, log_handle_t *log_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pfftools/pffinput.c0000644000175000017500000000633312005155310013765 00000000000000/* * Common input functions for the pfftools * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "export_handle.h" #include "pffinput.h" #include "pfftools_libcerror.h" #include "pfftools_libcstring.h" #include "pfftools_libpff.h" /* Determines the export format from a string * Returns 1 if successful, 0 if unsupported value or -1 on error */ int pffinput_determine_export_format( const libcstring_system_character_t *string, int *export_format, libcerror_error_t **error ) { static char *function = "pffinput_determine_export_format"; size_t string_length = 0; int result = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string string.", function ); return( -1 ); } if( export_format == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export format.", function ); return( -1 ); } string_length = libcstring_system_string_length( string ); if( string_length == 3 ) { if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "all" ), 3 ) == 0 ) { *export_format = EXPORT_FORMAT_ALL; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "ftk" ), 3 ) == 0 ) { *export_format = EXPORT_FORMAT_FTK; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "htm" ), 3 ) == 0 ) { *export_format = EXPORT_FORMAT_HTML; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "rtf" ), 3 ) == 0 ) { *export_format = EXPORT_FORMAT_RTF; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "txt" ), 3 ) == 0 ) { *export_format = EXPORT_FORMAT_TEXT; result = 1; } } else if( string_length == 4 ) { if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "html" ), 4 ) == 0 ) { *export_format = EXPORT_FORMAT_HTML; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "text" ), 4 ) == 0 ) { *export_format = EXPORT_FORMAT_TEXT; result = 1; } } return( result ); } libpff-20120802/pfftools/pfftools_libfguid.h0000644000175000017500000000245412005155310015640 00000000000000/* * The libfguid header wrapper * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBFGUID_H ) #define _PFFTOOLS_LIBFGUID_H #include /* Define HAVE_LOCAL_LIBFGUID for local use of libfguid */ #if defined( HAVE_LOCAL_LIBFGUID ) #include #include #include #else /* If libtool DLL support is enabled set LIBFGUID_DLL_IMPORT * before including libfguid.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFGUID_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/log_handle.c0000644000175000017500000001323312005155310014223 00000000000000/* * Log handle * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #include #elif defined( HAVE_VARARGS_H ) #include #else #error Missing headers stdarg.h and varargs.h #endif #include "log_handle.h" #include "pfftools_libcerror.h" #include "pfftools_libcstring.h" #include "pfftools_libcsystem.h" /* Initializes the log handle * Returns 1 if successful or -1 on error */ int log_handle_initialize( log_handle_t **log_handle, libcerror_error_t **error ) { static char *function = "log_handle_initialize"; if( log_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid log handle.", function ); return( -1 ); } if( *log_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid log handle value already set.", function ); return( -1 ); } *log_handle = memory_allocate_structure( log_handle_t ); if( *log_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create log handle.", function ); goto on_error; } if( memory_set( *log_handle, 0, sizeof( log_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear log handle.", function ); goto on_error; } return( 1 ); on_error: if( *log_handle != NULL ) { memory_free( *log_handle ); *log_handle = NULL; } return( -1 ); } /* Frees the log handle and its elements * Returns 1 if successful or -1 on error */ int log_handle_free( log_handle_t **log_handle, libcerror_error_t **error ) { static char *function = "log_handle_free"; if( log_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid log handle.", function ); return( -1 ); } if( *log_handle != NULL ) { memory_free( *log_handle ); *log_handle = NULL; } return( 1 ); } /* Opens the log handle * Returns 1 if successful or -1 on error */ int log_handle_open( log_handle_t *log_handle, const libcstring_system_character_t *filename, libcerror_error_t **error ) { static char *function = "log_handle_open"; if( log_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid log handle.", function ); return( -1 ); } if( filename != NULL ) { log_handle->log_stream = libcsystem_file_stream_open( filename, _LIBCSTRING_SYSTEM_STRING( FILE_STREAM_OPEN_APPEND ) ); if( log_handle->log_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file.", function ); return( -1 ); } } return( 1 ); } /* Closes the log handle * Returns the 0 if succesful or -1 on error */ int log_handle_close( log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "log_handle_close"; if( log_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid log handle.", function ); return( -1 ); } if( log_handle->log_stream != NULL ) { if( libcsystem_file_stream_close( log_handle->log_stream ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close log stream.", function ); return( -1 ); } log_handle->log_stream = NULL; } return( 0 ); } #if defined( HAVE_STDARG_H ) || defined( WINAPI ) #define VARARGS( function, type, argument ) \ function( log_handle_t *log_handle, type argument, ... ) #define VASTART( argument_list, type, name ) \ va_start( argument_list, name ) #define VAEND( argument_list ) \ va_end( argument_list ) #elif defined( HAVE_VARARGS_H ) #define VARARGS( function, type, argument ) \ function( log_handle_t *log_handle, va_alist ) va_dcl #define VASTART( argument_list, type, name ) \ { type name; va_start( argument_list ); name = va_arg( argument_list, type ) #define VAEND( argument_list ) \ va_end( argument_list ); } #endif /* Print a formatted string on the notify stream */ void VARARGS( log_handle_printf, char *, format ) { va_list argument_list; if( ( log_handle != NULL ) && ( log_handle->log_stream != NULL ) ) { VASTART( argument_list, char *, format ); vfprintf( log_handle->log_stream, format, argument_list ); VAEND( argument_list ); } } #undef VARARGS #undef VASTART #undef VAEND libpff-20120802/pfftools/item_file.c0000644000175000017500000012242412005155310014067 00000000000000/* * Item file * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include "item_file.h" #include "pfftools_libcerror.h" #include "pfftools_libcfile.h" #include "pfftools_libcstring.h" #include "pfftools_libfdatetime.h" #include "pfftools_libfguid.h" #include "pfftools_libfvalue.h" #include "pfftools_libpff.h" /* Initializes the item file * Returns 1 if successful or -1 on error */ int item_file_initialize( item_file_t **item_file, libcerror_error_t **error ) { static char *function = "item_file_initialize"; if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } if( *item_file != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid item file value already set.", function ); return( -1 ); } *item_file = memory_allocate_structure( item_file_t ); if( *item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create item file.", function ); goto on_error; } if( memory_set( *item_file, 0, sizeof( item_file_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear item file.", function ); goto on_error; } if( libcfile_file_initialize( &( ( *item_file )->file_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create file handle.", function ); goto on_error; } return( 1 ); on_error: if( *item_file != NULL ) { memory_free( *item_file ); *item_file = NULL; } return( -1 ); } /* Frees the item file and its elements * Returns 1 if successful or -1 on error */ int item_file_free( item_file_t **item_file, libcerror_error_t **error ) { static char *function = "item_file_free"; int result = 1; if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } if( *item_file != NULL ) { if( libcfile_file_free( &( ( *item_file )->file_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free file handle.", function ); result = -1; } memory_free( *item_file ); *item_file = NULL; } return( result ); } /* Opens the item file * Returns 1 if successful or -1 on error */ int item_file_open( item_file_t *item_file, const libcstring_system_character_t *filename, libcerror_error_t **error ) { static char *function = "item_file_open"; if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcfile_file_open_wide( item_file->file_handle, filename, LIBCFILE_OPEN_WRITE, error ) != 1 ) #else if( libcfile_file_open( item_file->file_handle, filename, LIBCFILE_OPEN_WRITE, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open file handle.", function ); return( -1 ); } return( 1 ); } /* Closes the item file * Returns the 0 if succesful or -1 on error */ int item_file_close( item_file_t *item_file, libcerror_error_t **error ) { static char *function = "item_file_close"; if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } if( libcfile_file_close( item_file->file_handle, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close file handle.", function ); return( -1 ); } return( 0 ); } /* Writes a buffer to the item file * Returns 1 if successful or -1 on error */ int item_file_write_buffer( item_file_t *item_file, const uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { static char *function = "item_file_write_buffer"; ssize_t write_count = 0; if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( buffer_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid buffer size value exceeds maximum.", function ); return( -1 ); } write_count = libcfile_file_write_buffer( item_file->file_handle, buffer, buffer_size, error ); if( write_count != (ssize_t) buffer_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write buffer to file handle.", function ); return( -1 ); } return( 1 ); } /* Writes a buffer as a dump of hexadecimal values to the item file * Returns 1 if successful or -1 on error */ int item_file_write_buffer_as_hexdump( item_file_t *item_file, const uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { libcstring_system_character_t value_string[ 3 ]; static char *function = "item_file_write_buffer_as_hexdump"; size_t buffer_index = 0; size_t byte_index = 0; uint8_t byte_value = 0; if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } if( buffer != NULL ) { if( buffer_size > (size_t) UINT32_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid buffer size value exceeds maximum.", function ); return( -1 ); } while( buffer_index < buffer_size ) { while( byte_index < buffer_size ) { if( byte_index % 16 == 0 ) { if( item_file_write_integer_32bit_as_hexadecimal( item_file, (uint32_t) byte_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit value to item file.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ": " ), 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } } byte_value = ( buffer[ byte_index ] >> 4 ) & 0x0f; if( byte_value < 10 ) { value_string[ 0 ] = (libcstring_system_character_t) '0' + byte_value; } else { value_string[ 0 ] = (libcstring_system_character_t) 'a' + byte_value; } byte_value = buffer[ byte_index ] & 0x0f; if( byte_value < 10 ) { value_string[ 1 ] = (libcstring_system_character_t) '0' + byte_value; } else { value_string[ 1 ] = (libcstring_system_character_t) 'a' + byte_value - 10; } value_string[ 2 ] = 0; if( item_file_write_string( item_file, value_string, 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } byte_index++; if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " " ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } if( byte_index % 16 == 0 ) { break; } else if( byte_index % 8 == 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " " ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } } } while( byte_index % 16 != 0 ) { byte_index++; if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " " ), 3, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } if( ( byte_index % 8 == 0 ) && ( byte_index % 16 != 0 ) ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " " ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } } } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " " ), 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } byte_index = buffer_index; while( byte_index < buffer_size ) { if( ( buffer[ byte_index ] >= 0x20 ) && ( buffer[ byte_index ] <= 0x7e ) ) { value_string[ 0 ] = (libcstring_system_character_t) buffer[ byte_index ]; } else { value_string[ 0 ] = (libcstring_system_character_t) '.'; } value_string[ 1 ] = 0; if( item_file_write_string( item_file, value_string, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } byte_index++; if( byte_index % 16 == 0 ) { break; } else if( byte_index % 8 == 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " " ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string to item file.", function ); return( -1 ); } } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line to item file.", function ); return( -1 ); } buffer_index = byte_index; } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line to item file.", function ); return( -1 ); } } return( 1 ); } /* Writes a 32-bit integer as a decimal to the item file * Returns 1 if successful or -1 on error */ int item_file_write_integer_32bit_as_decimal( item_file_t *item_file, uint32_t value_32bit, libcerror_error_t **error ) { libcstring_system_character_t integer_string[ 32 ]; libfvalue_value_t *value = NULL; static char *function = "item_file_write_integer_as_decimal"; size_t integer_string_length = 0; if( libfvalue_value_type_initialize( &value, LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value.", function ); goto on_error; } if( libfvalue_value_set_data( value, (uint8_t *) &value_32bit, sizeof( uint32_t ), LIBFVALUE_ENDIAN_NATIVE, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data.", function ); goto on_error; } if( libfvalue_value_set_format_flags( value, LIBFVALUE_INTEGER_FORMAT_TYPE_DECIMAL_SIGNED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set format flags.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libfvalue_value_copy_to_utf16_string( value, 0, (uint16_t *) integer_string, 32, error ) != 1 ) #else if( libfvalue_value_copy_to_utf8_string( value, 0, (uint8_t *) integer_string, 32, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy integer value to string.", function ); goto on_error; } integer_string_length = libcstring_system_string_length( integer_string ); if( item_file_write_string( item_file, integer_string, integer_string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( libfvalue_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } return( 1 ); on_error: if( value != NULL ) { libfvalue_value_free( &value, NULL ); } return( -1 ); } /* Writes a 32-bit integer as a hexadecimal to the item file * Returns 1 if successful or -1 on error */ int item_file_write_integer_32bit_as_hexadecimal( item_file_t *item_file, uint32_t value_32bit, libcerror_error_t **error ) { libcstring_system_character_t integer_string[ 32 ]; libfvalue_value_t *value = NULL; static char *function = "item_file_write_integer_as_hexadecimal"; size_t integer_string_length = 0; if( libfvalue_value_type_initialize( &value, LIBFVALUE_VALUE_TYPE_UNSIGNED_INTEGER_32BIT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value.", function ); goto on_error; } if( libfvalue_value_set_data( value, (uint8_t *) &value_32bit, sizeof( uint32_t ), LIBFVALUE_ENDIAN_NATIVE, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data.", function ); goto on_error; } if( libfvalue_value_set_format_flags( value, LIBFVALUE_INTEGER_FORMAT_TYPE_HEXADECIMAL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set format flags.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libfvalue_value_copy_to_utf16_string( value, 0, (uint16_t *) integer_string, 32, error ) != 1 ) #else if( libfvalue_value_copy_to_utf8_string( value, 0, (uint8_t *) integer_string, 32, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy integer value to string.", function ); goto on_error; } integer_string_length = libcstring_system_string_length( integer_string ); if( item_file_write_string( item_file, integer_string, integer_string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( libfvalue_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } return( 1 ); on_error: if( value != NULL ) { libfvalue_value_free( &value, NULL ); } return( -1 ); } /* Writes a floating point to the item file * Returns 1 if successful or -1 on error */ int item_file_write_floating_point( item_file_t *item_file, double floating_point, libcerror_error_t **error ) { libcstring_system_character_t floating_point_string[ 32 ]; libfvalue_value_t *value = NULL; static char *function = "item_file_write_floating_point"; size_t floating_point_string_length = 0; if( libfvalue_value_type_initialize( &value, LIBFVALUE_VALUE_TYPE_FLOATING_POINT_64BIT, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create value.", function ); goto on_error; } if( libfvalue_value_copy_from_double( value, 0, floating_point, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy floating point value.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libfvalue_value_copy_to_utf16_string( value, 0, (uint16_t *) floating_point_string, 32, error ) != 1 ) #else if( libfvalue_value_copy_to_utf8_string( value, 0, (uint8_t *) floating_point_string, 32, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to copy integer value to string.", function ); goto on_error; } floating_point_string_length = libcstring_system_string_length( floating_point_string ); if( item_file_write_string( item_file, floating_point_string, floating_point_string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( libfvalue_value_free( &value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free value.", function ); goto on_error; } return( 1 ); on_error: if( value != NULL ) { libfvalue_value_free( &value, NULL ); } return( -1 ); } /* Writes a string to the item file * Returns 1 if successful or -1 on error */ int item_file_write_string( item_file_t *item_file, const libcstring_system_character_t *string, size_t string_length, libcerror_error_t **error ) { static char *function = "item_file_write_string"; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( string_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string length value exceeds maximum.", function ); return( -1 ); } string_length *= sizeof( libcstring_system_character_t ); #endif if( item_file_write_buffer( item_file, (uint8_t *) string, string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write buffer.", function ); return( -1 ); } return( 1 ); } /* Writes a new line to the item file * Returns 1 if successful or -1 on error */ int item_file_write_new_line( item_file_t *item_file, libcerror_error_t **error ) { static char *function = "item_file_write_new_line"; #if defined( WINAPI ) if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "\r\n" ), 2, error ) != 1 ) #else if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "\n" ), 1, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } return( 1 ); } /* Writes a filetime to the item file * Returns 1 if successful or -1 on error */ int item_file_write_filetime( item_file_t *item_file, libfdatetime_filetime_t *filetime, libcerror_error_t **error ) { libcstring_system_character_t filetime_string[ 32 ]; static char *function = "item_file_write_filetime"; size_t filetime_string_length = 0; int result = 0; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfdatetime_filetime_copy_to_utf16_string( filetime, (uint16_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #else result = libfdatetime_filetime_copy_to_utf8_string( filetime, (uint8_t *) filetime_string, 32, LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME_NANO_SECONDS, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy filetime to string.", function ); return( -1 ); } filetime_string_length = libcstring_system_string_length( filetime_string ); if( item_file_write_string( item_file, filetime_string, filetime_string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " UTC" ), 4, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } return( 1 ); } /* Writes a GUID to the item file * Returns 1 if successful or -1 on error */ int item_file_write_guid( item_file_t *item_file, libfguid_identifier_t *guid, libcerror_error_t **error ) { libcstring_system_character_t guid_string[ 48 ]; static char *function = "item_file_write_guid"; size_t guid_string_length = 0; int result = 0; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libfguid_identifier_copy_to_utf16_string( guid, (uint16_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #else result = libfguid_identifier_copy_to_utf8_string( guid, (uint8_t *) guid_string, 48, LIBFGUID_STRING_FORMAT_USE_LOWER_CASE, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy GUID to string.", function ); return( -1 ); } guid_string_length = libcstring_system_string_length( guid_string ); if( item_file_write_string( item_file, guid_string, guid_string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } return( 1 ); } /* Writes a value description to the item file * Returns 1 if successful or -1 on error */ int item_file_write_value_description( item_file_t *item_file, const libcstring_system_character_t *description, libcerror_error_t **error ) { static char *function = "item_file_write_value_description"; size_t description_length = 0; description_length = libcstring_system_string_length( description ); if( item_file_write_string( item_file, description, description_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } return( 1 ); } /* Writes a 32-bit integer value as a decimal to the item file * Returns 1 if successful or -1 on error */ int item_file_write_value_integer_32bit_as_decimal( item_file_t *item_file, const libcstring_system_character_t *description, uint32_t value_32bit, libcerror_error_t **error ) { static char *function = "item_file_write_value_integer_32bit_as_decimal"; size_t description_length = 0; description_length = libcstring_system_string_length( description ); if( item_file_write_string( item_file, description, description_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_decimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit value.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } return( 1 ); } /* Writes a 32-bit integer value as a hexadecimal to the item file * Returns 1 if successful or -1 on error */ int item_file_write_value_integer_32bit_as_hexadecimal( item_file_t *item_file, const libcstring_system_character_t *description, uint32_t value_32bit, libcerror_error_t **error ) { static char *function = "item_file_write_value_integer_32bit_as_hexadecimal"; size_t description_length = 0; description_length = libcstring_system_string_length( description ); if( item_file_write_string( item_file, description, description_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit value.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } return( 1 ); } /* Writes a value string to the item file * Returns 1 if successful or -1 on error */ int item_file_write_value_string( item_file_t *item_file, const libcstring_system_character_t *description, const libcstring_system_character_t *string, size_t string_length, libcerror_error_t **error ) { static char *function = "item_file_write_value_description"; size_t description_length = 0; description_length = libcstring_system_string_length( description ); if( item_file_write_string( item_file, description, description_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_string( item_file, string, string_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } return( 1 ); } /* Writes a filetime value to the item file * Returns 1 if successful or -1 on error */ int item_file_write_value_filetime( item_file_t *item_file, const libcstring_system_character_t *description, libfdatetime_filetime_t *filetime, libcerror_error_t **error ) { static char *function = "item_file_write_value_filetime"; size_t description_length = 0; description_length = libcstring_system_string_length( description ); if( item_file_write_string( item_file, description, description_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_filetime( item_file, filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write filetime.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } return( 1 ); } /* Writes a specific item value to the item file * Returns 1 if successful or -1 on error */ int item_file_write_item_value( item_file_t *item_file, libpff_item_t *item, int set_index, uint32_t entry_type, const libcstring_system_character_t *description, uint32_t format_flags, libcerror_error_t **error ) { libcstring_system_character_t *value_string = NULL; libfdatetime_filetime_t *filetime = NULL; static char *function = "item_file_write_item_value"; size_t description_length = 0; size_t value_string_size = 0; double value_double = 0.0; uint64_t value_64bit = 0; uint32_t value_32bit = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_UNSPECIFIED; uint8_t value_boolean = 0; int result = 0; result = libpff_item_get_value_type( item, set_index, entry_type, &value_type, 0, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry type of set: %d entry type: 0x%08" PRIx32 ".", function, set_index, entry_type ); goto on_error; } else if( result != 0 ) { description_length = libcstring_system_string_length( description ); if( item_file_write_string( item_file, description, description_length, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write description string.", function ); goto on_error; } switch( value_type ) { case LIBPFF_VALUE_TYPE_BOOLEAN: if( libpff_item_get_entry_value_boolean( item, set_index, entry_type, &value_boolean, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve boolean.", function ); goto on_error; } if( value_boolean == 0 ) { value_string = _LIBCSTRING_SYSTEM_STRING( "no" ); value_string_size = 3; } else { value_string = _LIBCSTRING_SYSTEM_STRING( "yes" ); value_string_size = 4; } if( item_file_write_string( item_file, value_string, value_string_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); value_string = NULL; goto on_error; } break; case LIBPFF_VALUE_TYPE_INTEGER_32BIT_SIGNED: if( libpff_item_get_entry_value_32bit( item, set_index, entry_type, &value_32bit, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve 32-bit integer.", function ); goto on_error; } if( ( format_flags & ITEM_FILE_FORMAT_FLAG_HEXADECIMAL ) != 0 ) { if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); goto on_error; } } else { if( item_file_write_integer_32bit_as_decimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); goto on_error; } } if( ( format_flags & ITEM_FILE_FORMAT_FLAG_DURATION_IN_MINUTES ) != 0 ) { if( value_32bit >= 1 ) { if( value_32bit == 1 ) { value_string = _LIBCSTRING_SYSTEM_STRING( " minute" ); value_string_size = 8; } else if( value_32bit > 1 ) { value_string = _LIBCSTRING_SYSTEM_STRING( " minutes" ); value_string_size = 9; } if( item_file_write_string( item_file, value_string, value_string_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); value_string = NULL; goto on_error; } } } break; case LIBPFF_VALUE_TYPE_FLOAT_32BIT: case LIBPFF_VALUE_TYPE_DOUBLE_64BIT: if( libpff_item_get_entry_value_floating_point( item, set_index, entry_type, &value_double, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve boolean.", function ); goto on_error; } if( item_file_write_floating_point( item_file, value_double, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write floating point.", function ); goto on_error; } break; case LIBPFF_VALUE_TYPE_FILETIME: if( libpff_item_get_entry_value_filetime( item, set_index, entry_type, &value_64bit, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve filetime.", function ); goto on_error; } if( libfdatetime_filetime_initialize( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create filetime.", function ); goto on_error; } if( libfdatetime_filetime_copy_from_64bit( filetime, value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy filetime from 64-bit value.", function ); goto on_error; } if( item_file_write_filetime( item_file, filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write filetime.", function ); goto on_error; } if( libfdatetime_filetime_free( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free filetime.", function ); goto on_error; } break; case LIBPFF_VALUE_TYPE_STRING_ASCII: case LIBPFF_VALUE_TYPE_STRING_UNICODE: #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_item_get_entry_value_utf16_string_size( item, set_index, entry_type, &value_string_size, 0, error ); #else result = libpff_item_get_entry_value_utf8_string_size( item, set_index, entry_type, &value_string_size, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string size.", function ); goto on_error; } else if( value_string_size > 0 ) { value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create value string.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_item_get_entry_value_utf16_string( item, set_index, entry_type, (uint16_t *) value_string, value_string_size, 0, error ); #else result = libpff_item_get_entry_value_utf8_string( item, set_index, entry_type, (uint8_t *) value_string, value_string_size, 0, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve string.", function ); goto on_error; } if( item_file_write_string( item_file, value_string, value_string_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } memory_free( value_string ); value_string = NULL; } break; } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); goto on_error; } } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } return( -1 ); } libpff-20120802/pfftools/export_handle.c0000644000175000017500000113347612006534711015007 00000000000000/* * Export handle * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include #include /* Define HAVE_LOCAL_LIBFMAPI for local use of libfmapi */ #if defined( HAVE_LOCAL_LIBFMAPI ) #include #include #elif defined( HAVE_LIBFMAPI_H ) /* If libtool DLL support is enabled set LIBFMAPI_DLL_IMPORT * before including libfmapi.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFMAPI_DLL_IMPORT #endif #include #else #error Missing libfmapi.h #endif #include "export_handle.h" #include "item_file.h" #include "pffinput.h" #include "pfftools_libcerror.h" #include "pfftools_libclocale.h" #include "pfftools_libcnotify.h" #include "pfftools_libcfile.h" #include "pfftools_libcpath.h" #include "pfftools_libcstring.h" #include "pfftools_libcsystem.h" #include "pfftools_libfdatetime.h" #include "pfftools_libfguid.h" #include "pfftools_libpff.h" #define EXPORT_HANDLE_BUFFER_SIZE 8192 #define EXPORT_HANDLE_NOTIFY_STREAM stdout /* Initializes the export handle * Returns 1 if successful or -1 on error */ int export_handle_initialize( export_handle_t **export_handle, libcerror_error_t **error ) { static char *function = "export_handle_initialize"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( *export_handle != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid export handle value already set.", function ); return( -1 ); } *export_handle = memory_allocate_structure( export_handle_t ); if( *export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create export handle.", function ); goto on_error; } if( memory_set( *export_handle, 0, sizeof( export_handle_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear export handle.", function ); goto on_error; } ( *export_handle )->export_mode = EXPORT_MODE_ITEMS; ( *export_handle )->preferred_export_format = EXPORT_FORMAT_TEXT; ( *export_handle )->ascii_codepage = LIBPFF_CODEPAGE_WINDOWS_1252; ( *export_handle )->print_status_information = 1; ( *export_handle )->notify_stream = EXPORT_HANDLE_NOTIFY_STREAM; return( 1 ); on_error: if( *export_handle != NULL ) { memory_free( *export_handle ); *export_handle = NULL; } return( -1 ); } /* Frees the export handle and its elements * Returns 1 if successful or -1 on error */ int export_handle_free( export_handle_t **export_handle, libcerror_error_t **error ) { static char *function = "export_handle_free"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( *export_handle != NULL ) { if( ( *export_handle )->target_path != NULL ) { memory_free( ( *export_handle )->target_path ); } if( ( *export_handle )->items_export_path != NULL ) { memory_free( ( *export_handle )->items_export_path ); } if( ( *export_handle )->orphans_export_path != NULL ) { memory_free( ( *export_handle )->orphans_export_path ); } if( ( *export_handle )->recovered_export_path != NULL ) { memory_free( ( *export_handle )->recovered_export_path ); } memory_free( *export_handle ); *export_handle = NULL; } return( 1 ); } /* Signals the export handle to abort its current activity * Returns 1 if successful or -1 on error */ int export_handle_signal_abort( export_handle_t *export_handle, libcerror_error_t **error ) { static char *function = "export_handle_signal_abort"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } export_handle->abort = 1; return( 1 ); } /* Sets the export mode * Returns 1 if successful, 0 if unsupported values or -1 on error */ int export_handle_set_export_mode( export_handle_t *export_handle, const libcstring_system_character_t *string, libcerror_error_t **error ) { static char *function = "export_handle_set_export_mode"; size_t string_length = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } string_length = libcstring_system_string_length( string ); if( string_length == 3 ) { if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "all" ), 3 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_ALL; result = 1; } } else if( string_length == 5 ) { if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "debug" ), 5 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_DEBUG; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "items" ), 5 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_ITEMS; result = 1; } else if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "noatt" ), 5 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_ITEMS_NO_ATTACHMENTS; result = 1; } } else if( string_length == 9 ) { if( libcstring_system_string_compare( string, _LIBCSTRING_SYSTEM_STRING( "recovered" ), 9 ) == 0 ) { export_handle->export_mode = EXPORT_MODE_RECOVERED; result = 1; } } return( result ); } /* Sets the preferred export format * Returns 1 if successful, 0 if unsupported values or -1 on error */ int export_handle_set_preferred_export_format( export_handle_t *export_handle, const libcstring_system_character_t *string, libcerror_error_t **error ) { static char *function = "export_handle_preferred_export_format"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } result = pffinput_determine_export_format( string, &( export_handle->preferred_export_format ), error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine preferred export format.", function ); return( -1 ); } return( result ); } /* Sets the ascii codepage * Returns 1 if successful or -1 on error */ int export_handle_set_ascii_codepage( export_handle_t *export_handle, const libcstring_system_character_t *string, libcerror_error_t **error ) { static char *function = "export_handle_set_ascii_codepage"; size_t string_length = 0; uint32_t feature_flags = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } feature_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS; string_length = libcstring_system_string_length( string ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libclocale_codepage_copy_from_string_wide( &( export_handle->ascii_codepage ), string, string_length, feature_flags, error ); #else result = libclocale_codepage_copy_from_string( &( export_handle->ascii_codepage ), string, string_length, feature_flags, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine ASCII codepage.", function ); return( -1 ); } return( result ); } /* Sets the target path * Returns 1 if successful or -1 on error */ int export_handle_set_target_path( export_handle_t *export_handle, const libcstring_system_character_t *target_path, libcerror_error_t **error ) { static char *function = "export_handle_set_target_path"; size_t target_path_length = 0; #if defined( WINAPI ) libcstring_system_character_t *full_target_path = NULL; size_t full_target_path_size = 0; int result = 0; #endif if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( target_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid target path.", function ); return( -1 ); } if( export_handle->target_path != NULL ) { memory_free( export_handle->target_path ); export_handle->target_path = NULL; export_handle->target_path_size = 0; } target_path_length = libcstring_system_string_length( target_path ); #if defined( WINAPI ) #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_get_full_path_wide( target_path, target_path_length, &full_target_path, &full_target_path_size, error ); #else result = libcpath_path_get_full_path( target_path, target_path_length, &full_target_path, &full_target_path_size, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create extended-length target path.", function ); goto on_error; } else if( result != 0 ) { target_path = full_target_path; target_path_length = full_target_path_size - 1; } #endif if( target_path_length > 0 ) { export_handle->target_path = libcstring_system_string_allocate( target_path_length + 1 ); if( export_handle->target_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create target path.", function ); goto on_error; } if( libcstring_system_string_copy( export_handle->target_path, target_path, target_path_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy target path.", function ); goto on_error; } ( export_handle->target_path )[ target_path_length ] = 0; export_handle->target_path_size = target_path_length + 1; } #if defined( WINAPI ) memory_free( full_target_path ); #endif return( 1 ); on_error: if( export_handle->target_path != NULL ) { memory_free( export_handle->target_path ); export_handle->target_path = NULL; export_handle->target_path_size = 0; } #if defined( WINAPI ) if( full_target_path != NULL ) { memory_free( full_target_path ); } #endif return( -1 ); } /* Sets an export path consisting of a base path and a suffix * Returns 1 if successful or -1 on error */ int export_handle_set_export_path( export_handle_t *export_handle, const libcstring_system_character_t *base_path, size_t base_path_length, const libcstring_system_character_t *suffix, size_t suffix_length, libcstring_system_character_t **export_path, size_t *export_path_size, libcerror_error_t **error ) { static char *function = "export_handle_set_export_path"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( base_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid base path.", function ); return( -1 ); } if( base_path_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid base path length value exceeds maximum.", function ); return( -1 ); } if( suffix == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid suffix.", function ); return( -1 ); } if( suffix_length > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid suffix length value exceeds maximum.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } if( export_path_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path size.", function ); return( -1 ); } if( *export_path != NULL ) { memory_free( *export_path ); *export_path = NULL; *export_path_size = 0; } *export_path_size = base_path_length + suffix_length + 1; *export_path = libcstring_system_string_allocate( *export_path_size ); if( *export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create export path.", function ); goto on_error; } if( libcstring_system_string_copy( *export_path, base_path, base_path_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy base path to item export path.", function ); goto on_error; } if( libcstring_system_string_copy( &( ( *export_path )[ base_path_length ] ), suffix, suffix_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy suffix to item export path.", function ); goto on_error; } ( *export_path )[ *export_path_size - 1 ] = 0; return( 1 ); on_error: if( *export_path != NULL ) { memory_free( *export_path ); *export_path = NULL; *export_path_size = 0; } return( -1 ); } /* Creates the items export path * Returns 1 if successful, 0 if already exists or -1 on error */ int export_handle_create_items_export_path( export_handle_t *export_handle, libcerror_error_t **error ) { static char *function = "export_handle_create_items_export_path"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( ( export_handle->export_mode == EXPORT_MODE_ALL ) || ( export_handle->export_mode == EXPORT_MODE_DEBUG ) || ( export_handle->export_mode == EXPORT_MODE_ITEMS ) || ( export_handle->export_mode == EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) ) { if( export_handle_set_export_path( export_handle, export_handle->target_path, export_handle->target_path_size - 1, _LIBCSTRING_SYSTEM_STRING( ".export" ), 7, &( export_handle->items_export_path ), &( export_handle->items_export_path_size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set items export path.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( export_handle->items_export_path, error ); #else result = libcfile_file_exists( export_handle->items_export_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, export_handle->items_export_path ); return( -1 ); } else if( result == 1 ) { return( 0 ); } } return( 1 ); } /* Creates the orphans export path * Returns 1 if successful, 0 if already exists or -1 on error */ int export_handle_create_orphans_export_path( export_handle_t *export_handle, libcerror_error_t **error ) { static char *function = "export_handle_create_orphans_export_path"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( ( export_handle->export_mode == EXPORT_MODE_ALL ) || ( export_handle->export_mode == EXPORT_MODE_RECOVERED ) ) { if( export_handle_set_export_path( export_handle, export_handle->target_path, export_handle->target_path_size - 1, _LIBCSTRING_SYSTEM_STRING( ".orphans" ), 8, &( export_handle->orphans_export_path ), &( export_handle->orphans_export_path_size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set orphans export path.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( export_handle->orphans_export_path, error ); #else result = libcfile_file_exists( export_handle->orphans_export_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, export_handle->orphans_export_path ); return( -1 ); } else if( result == 1 ) { return( 0 ); } } return( 1 ); } /* Creates the recovered export path * Returns 1 if successful, 0 if already exists or -1 on error */ int export_handle_create_recovered_export_path( export_handle_t *export_handle, libcerror_error_t **error ) { static char *function = "export_handle_create_recovered_export_path"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( ( export_handle->export_mode == EXPORT_MODE_ALL ) || ( export_handle->export_mode == EXPORT_MODE_RECOVERED ) ) { if( export_handle_set_export_path( export_handle, export_handle->target_path, export_handle->target_path_size - 1, _LIBCSTRING_SYSTEM_STRING( ".recovered" ), 10, &( export_handle->recovered_export_path ), &( export_handle->recovered_export_path_size ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set recovered export path.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( export_handle->recovered_export_path, error ); #else result = libcfile_file_exists( export_handle->recovered_export_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, export_handle->recovered_export_path ); return( -1 ); } else if( result == 1 ) { return( 0 ); } } return( 1 ); } /* Creates the default item directory path * Returns 1 if successful or -1 on error */ int export_handle_create_default_item_directory( export_handle_t *export_handle, int item_index, const libcstring_system_character_t *item_prefix, size_t item_prefix_length, const libcstring_system_character_t *export_path, size_t export_path_length, libcstring_system_character_t **item_directory_path, size_t *item_directory_path_size, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t item_directory_name[ 64 ]; static char *function = "export_handle_create_default_item_directory"; size_t item_directory_name_length = 0; int print_count = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid item index value less than zero.", function ); return( -1 ); } if( item_prefix == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item prefix.", function ); return( -1 ); } if( item_prefix_length > (size_t) 63 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid item prefix length value exceeds maximum.", function ); return( -1 ); } if( item_directory_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item directory path.", function ); return( -1 ); } /* Create the item directory */ print_count = libcstring_system_string_sprintf( item_directory_name, 64, _LIBCSTRING_SYSTEM_STRING( "%s%05d" ), item_prefix, item_index + 1 ); if( ( print_count < 0 ) || ( (size_t) print_count > ( item_prefix_length + 5 ) ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set item directory name.", function ); goto on_error; } item_directory_name[ item_prefix_length + 5 ] = 0; item_directory_name_length = item_prefix_length + 5; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( item_directory_path, item_directory_path_size, export_path, export_path_length, item_directory_name, item_directory_name_length, error ); #else result = libcpath_path_join( item_directory_path, item_directory_path_size, export_path, export_path_length, item_directory_name, item_directory_name_length, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create item directory path.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( *item_directory_path, error ); #else result = libcfile_file_exists( *item_directory_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, *item_directory_path ); goto on_error; } else if( result != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: %" PRIs_LIBCSTRING_SYSTEM " already exists.", function, *item_directory_path ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( *item_directory_path, error ) != 1 ) #else if( libcpath_path_make_directory( *item_directory_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, *item_directory_path ); goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", *item_directory_path ); return( 1 ); on_error: if( *item_directory_path != NULL ) { memory_free( *item_directory_path ); *item_directory_path = NULL; *item_directory_path_size = 0; } return( -1 ); } /* Creates an item file * Returns 1 if successful, 0 if the file already exists or -1 on error */ int export_handle_create_item_file( export_handle_t *export_handle, const libcstring_system_character_t *path, size_t path_length, const libcstring_system_character_t *filename, size_t filename_length, item_file_t **item_file, libcerror_error_t **error ) { libcstring_system_character_t *item_file_path = NULL; static char *function = "export_handle_create_item_file"; size_t item_file_path_size = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item_file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item file.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &item_file_path, &item_file_path_size, path, path_length, filename, filename_length, error ); #else result = libcpath_path_join( &item_file_path, &item_file_path_size, path, path_length, filename, filename_length, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file path.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( item_file_path, error ); #else result = libcfile_file_exists( item_file_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, item_file_path ); goto on_error; } else if( result != 0 ) { memory_free( item_file_path ); return( 0 ); } if( item_file_initialize( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } if( item_file_open( *item_file, item_file_path, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open: %" PRIs_LIBCSTRING_SYSTEM ".", function, item_file_path ); goto on_error; } memory_free( item_file_path ); item_file_path = NULL; return( 1 ); on_error: if( *item_file != NULL ) { item_file_free( item_file, NULL ); } if( item_file_path != NULL ) { memory_free( item_file_path ); } return( -1 ); } /* Exports the item * Returns 1 if successful or -1 on error */ int export_handle_export_item( export_handle_t *export_handle, libpff_item_t *item, int item_index, int number_of_items, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t *entry_value_string = NULL; libcstring_system_character_t *item_path = NULL; char *item_type_string = NULL; static char *function = "export_handle_export_item"; size_t entry_value_string_size = 0; size_t item_path_size = 0; uint8_t item_type = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libpff_item_get_type( item, &item_type, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to retrieve type of item %d out of %d.\n", item_index + 1, number_of_items ); libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve item type.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to retrieve type of item %d out of %d.\n", item_index + 1, number_of_items ); return( 1 ); } switch( item_type ) { case LIBPFF_ITEM_TYPE_ACTIVITY: item_type_string = "activity"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_activity( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_APPOINTMENT: item_type_string = "appointment"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_appointment( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_CONTACT: item_type_string = "contact"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_contact( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_DOCUMENT: item_type_string = "document"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_document( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_CONFLICT_MESSAGE: case LIBPFF_ITEM_TYPE_EMAIL: case LIBPFF_ITEM_TYPE_EMAIL_SMIME: item_type_string = "email"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_email( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_FOLDER: item_type_string = "folder"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_folder( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_MEETING: item_type_string = "meeting"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_meeting( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_NOTE: item_type_string = "note"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_note( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_RSS_FEED: item_type_string = "RSS feed"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_rss_feed( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; case LIBPFF_ITEM_TYPE_TASK: item_type_string = "task"; if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting %s item %d out of %d.\n", item_type_string, item_index + 1, number_of_items ); } result = export_handle_export_task( export_handle, item, item_index, export_path, export_path_length, log_handle, error ); break; default: result = 0; break; } if( result == -1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export %s item: %d out of: %d.\n", function, item_type_string, item_index + 1, number_of_items ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export %s item: %d out of: %d.\n", item_type_string, item_index + 1, number_of_items ); } else if( result == 0 ) { if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( export_handle_create_default_item_directory( export_handle, item_index, _LIBCSTRING_SYSTEM_STRING( "Item" ), 4, export_path, export_path_length, &item_path, &item_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create item directory.", function ); goto on_error; } if( export_handle_export_item_values( export_handle, item, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, item_path, item_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export values of item: %d out of: %d.\n", function, item_index + 1, number_of_items ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export values of item: %d out of: %d.\n", item_index + 1, number_of_items ); } memory_free( item_path ); } else { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_message_get_utf16_class_size( item, &entry_value_string_size, error ); #else result = libpff_message_get_utf8_class_size( item, &entry_value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message class size.", function ); goto on_error; } if( ( entry_value_string_size == 0 ) || ( entry_value_string_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry value string size.", function ); goto on_error; } entry_value_string = libcstring_system_string_allocate( entry_value_string_size ); if( entry_value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create entry value string.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_message_get_utf16_class( item, (uint16_t *) entry_value_string, entry_value_string_size, error ); #else result = libpff_message_get_utf8_class( item, (uint8_t *) entry_value_string, entry_value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve message class.", function ); goto on_error; } fprintf( export_handle->notify_stream, "Skipped item %d out of %d of type: %" PRIs_LIBCSTRING_SYSTEM ".\n", item_index + 1, number_of_items, entry_value_string ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: skipped export of item: %d out of: %d of type: %" PRIs_LIBCSTRING_SYSTEM " (0x%02" PRIx8 ").\n", function, item_index + 1, number_of_items, entry_value_string, item_type ); } log_handle_printf( log_handle, "Skipped export of item: %d out of: %d of type: %" PRIs_LIBCSTRING_SYSTEM " (0x%02" PRIx8 ").\n", item_index + 1, number_of_items, entry_value_string, item_type ); memory_free( entry_value_string ); entry_value_string = NULL; } } return( 1 ); on_error: if( entry_value_string != NULL ) { memory_free( entry_value_string ); } return( -1 ); } /* Exports a specific item value to the item file * Returns 1 if successful or -1 on error */ int export_handle_export_item_value_to_item_file( export_handle_t *export_handle, libpff_item_t *item, uint32_t set_index, uint32_t entry_index, item_file_t *item_file, libcerror_error_t **error ) { libcstring_system_character_t *name_to_id_map_entry_string = NULL; libpff_name_to_id_map_entry_t *name_to_id_map_entry = NULL; uint8_t *value_data = NULL; static char *function = "export_handle_export_item_value_to_item_file"; size_t name_to_id_map_entry_string_size = 0; size_t value_data_size = 0; uint32_t entry_type = 0; uint32_t matched_value_type = LIBPFF_VALUE_TYPE_UNSPECIFIED; uint32_t name_to_id_map_entry_number = 0; uint32_t value_type = LIBPFF_VALUE_TYPE_UNSPECIFIED; uint8_t name_to_id_map_entry_type = 0; int result = 0; #if defined( HAVE_DEBUG_OUTPUT ) libpff_multi_value_t *multi_value = NULL; #endif if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Set:\t\t\t\t" ), set_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Entry:\t\t\t\t" ), entry_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } if( libpff_item_get_entry_type( item, set_index, entry_index, &entry_type, &value_type, &name_to_id_map_entry, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry type of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } if( item_file_write_value_integer_32bit_as_hexadecimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Entry type:\t\t\t" ), entry_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } if( item_file_write_value_integer_32bit_as_hexadecimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Value type:\t\t\t" ), value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } if( name_to_id_map_entry != NULL ) { if( libpff_name_to_id_map_entry_get_type( name_to_id_map_entry, &name_to_id_map_entry_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to identifier map entry type of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } if( name_to_id_map_entry_type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_NUMERIC ) { if( libpff_name_to_id_map_entry_get_number( name_to_id_map_entry, &name_to_id_map_entry_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to identifier map entry number of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } if( item_file_write_value_integer_32bit_as_hexadecimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Maps to entry type:\t\t" ), name_to_id_map_entry_number, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } } else if( name_to_id_map_entry_type == LIBPFF_NAME_TO_ID_MAP_ENTRY_TYPE_STRING ) { #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_name_to_id_map_entry_get_utf16_string_size( name_to_id_map_entry, &name_to_id_map_entry_string_size, error ); #else result = libpff_name_to_id_map_entry_get_utf8_string_size( name_to_id_map_entry, &name_to_id_map_entry_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to identifier map entry string size of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } name_to_id_map_entry_string = libcstring_system_string_allocate( name_to_id_map_entry_string_size ); if( name_to_id_map_entry_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create name to identifier map entry string.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_name_to_id_map_entry_get_utf16_string( name_to_id_map_entry, (uint16_t *) name_to_id_map_entry_string, name_to_id_map_entry_string_size, error ); #else result = libpff_name_to_id_map_entry_get_utf8_string( name_to_id_map_entry, (uint8_t *) name_to_id_map_entry_string, name_to_id_map_entry_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve name to identifier map entry string of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } if( item_file_write_value_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Maps to entry:\t\t\t" ), name_to_id_map_entry_string, name_to_id_map_entry_string_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } memory_free( name_to_id_map_entry_string ); name_to_id_map_entry_string = NULL; } } matched_value_type = LIBPFF_VALUE_TYPE_UNSPECIFIED; result = libpff_item_get_entry_value( item, set_index, entry_type, &matched_value_type, &value_data, &value_data_size, LIBPFF_ENTRY_VALUE_FLAG_MATCH_ANY_VALUE_TYPE | LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry value of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Matched value type:\t\t" ), 21, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( item_file_write_integer_32bit_as_hexadecimal( item_file, matched_value_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); goto on_error; } if( value_type != matched_value_type ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " (mismatch)" ), 11, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Value:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( item_file_write_buffer_as_hexdump( item_file, value_data, value_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write buffer.", function ); goto on_error; } #if defined( HAVE_DEBUG_OUTPUT ) if( ( value_type & 0x1000 ) != 0 ) { if( libpff_item_get_entry_multi_value( item, set_index, entry_type, &multi_value, LIBPFF_ENTRY_VALUE_FLAG_IGNORE_NAME_TO_ID_MAP, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry multi value of set: %" PRIu32 " entry: %" PRIu32 ".", function, set_index, entry_index ); goto on_error; } if( libpff_multi_value_free( &multi_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free multi value.\n", function ); goto on_error; } } #endif return( 1 ); on_error: if( name_to_id_map_entry_string != NULL ) { memory_free( name_to_id_map_entry_string ); } return( -1 ); } /* Exports the item values * Returns 1 if successful or -1 on error */ int export_handle_export_item_values( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *item_values_filename, size_t item_values_filename_length, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; static char *function = "export_handle_export_item_values"; uint32_t entry_index = 0; uint32_t number_of_entries = 0; uint32_t number_of_sets = 0; uint32_t set_index = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item_values_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item value filename.", function ); return( -1 ); } result = export_handle_create_item_file( export_handle, export_path, export_path_length, item_values_filename, item_values_filename_length, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); return( -1 ); } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping item values file: %" PRIs_LIBCSTRING_SYSTEM " it already exists.\n", item_values_filename ); return( 1 ); } if( libpff_item_get_number_of_sets( item, &number_of_sets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sets.", function ); goto on_error; } if( libpff_item_get_number_of_entries( item, &number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries.", function ); goto on_error; } if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Number of sets:\t\t\t" ), number_of_sets, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Number of entries per set:\t" ), number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } for( set_index = 0; set_index < number_of_sets; set_index++ ) { for( entry_index = 0; entry_index < number_of_entries; entry_index++ ) { if( export_handle_export_item_value_to_item_file( export_handle, item, set_index, entry_index, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export item value.", function ); goto on_error; } } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the sub items * Returns 1 if successful or -1 on error */ int export_handle_export_sub_items( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *sub_item = NULL; static char *function = "export_handle_export_sub_items"; int number_of_sub_items = 0; int sub_item_iterator = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libpff_item_get_number_of_sub_items( item, &number_of_sub_items, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub items.", function ); return( -1 ); } for( sub_item_iterator = 0; sub_item_iterator < number_of_sub_items; sub_item_iterator++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libpff_item_get_sub_item( item, sub_item_iterator, &sub_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub item: %d.", function, sub_item_iterator + 1 ); return( -1 ); } if( export_handle_export_item( export_handle, sub_item, sub_item_iterator, number_of_sub_items, export_path, export_path_length, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export sub item %d out of %d.\n", sub_item_iterator + 1, number_of_sub_items ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export sub item: %d.\n", function, sub_item_iterator + 1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export sub item: %d.\n", sub_item_iterator + 1 ); } if( libpff_item_free( &sub_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub item: %d.", function, sub_item_iterator + 1 ); return( -1 ); } } return( 1 ); } /* Exports the Outlook message header * Returns 1 if successful or -1 on error */ int export_handle_export_message_header( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; static char *function = "export_handle_export_message_header"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } result = export_handle_create_item_file( export_handle, export_path, export_path_length, _LIBCSTRING_SYSTEM_STRING( "OutlookHeaders.txt" ), 18, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); return( -1 ); } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping message header file it already exists.\n" ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, message, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the message flags to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_flags_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ) { static char *function = "export_handle_export_message_flags_to_item_file"; uint32_t value_32bit = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( description == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid description.", function ); return( -1 ); } result = libpff_message_get_flags( message, &value_32bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve flags.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_string( item_file, description, libcstring_system_string_length( description ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write description.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( " (" ), 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_READ ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Read" ), 4, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Unread" ), 6, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_UNMODIFIED ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", Unmodified" ), 12, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_SUBMIT ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", Submit" ), 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_UNSENT ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", Unsent" ), 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_HAS_ATTACHMENTS ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", Has attachments" ), 17, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_FROM_ME ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", From me" ), 9, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_ASSOCIATED ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", Associated" ), 12, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_RESEND ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", Resend" ), 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_RN_PENDING ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", RN pending" ), 12, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( ( value_32bit & LIBPFF_MESSAGE_FLAG_NRN_PENDING ) != 0 ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ", NRN pending" ), 13, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ")" ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } } return( 1 ); } /* Exports the message importance to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_importance_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ) { static char *function = "export_handle_export_message_importance_to_item_file"; uint32_t value_32bit = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( description == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid description.", function ); return( -1 ); } result = libpff_message_get_importance( message, &value_32bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve importance.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_string( item_file, description, libcstring_system_string_length( description ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write description.", function ); return( -1 ); } if( value_32bit == (uint32_t) LIBPFF_MESSAGE_IMPORTANCE_TYPE_LOW ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Low" ), 3, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_IMPORTANCE_TYPE_NORMAL ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Normal" ), 6, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_IMPORTANCE_TYPE_HIGH ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "High" ), 4, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Unknown (" ), 9, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ")" ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } } return( 1 ); } /* Exports the message priority to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_priority_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ) { static char *function = "export_handle_export_message_priority_to_item_file"; uint32_t value_32bit = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( description == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid description.", function ); return( -1 ); } result = libpff_message_get_priority( message, &value_32bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve priority.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_string( item_file, description, libcstring_system_string_length( description ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write description.", function ); return( -1 ); } if( value_32bit == (uint32_t) LIBPFF_MESSAGE_PRIORITY_TYPE_NON_URGENT ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Non Urgent" ), 10, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_PRIORITY_TYPE_NORMAL ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Normal" ), 6, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_PRIORITY_TYPE_URGENT ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Urgent" ), 6, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Unknown (" ), 9, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ")" ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } } return( 1 ); } /* Exports the message sensitivity to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_sensitivity_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ) { static char *function = "export_handle_export_message_sensitivity_to_item_file"; uint32_t value_32bit = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( description == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid description.", function ); return( -1 ); } result = libpff_message_get_sensitivity( message, &value_32bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sensitivity.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_string( item_file, description, libcstring_system_string_length( description ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write description.", function ); return( -1 ); } if( value_32bit == (uint32_t) LIBPFF_MESSAGE_SENSITIVITY_TYPE_NONE ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "None" ), 4, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_SENSITIVITY_TYPE_PERSONAL ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Personal" ), 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_SENSITIVITY_TYPE_PRIVATE ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Private" ), 7, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_MESSAGE_SENSITIVITY_TYPE_CONFIDENTIAL ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Confidential" ), 12, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Unknown (" ), 9, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ")" ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } } return( 1 ); } /* Exports the message subject to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_subject_to_item_file( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ) { libcstring_system_character_t *value_string = NULL; static char *function = "export_handle_export_message_subject_to_item_file"; size_t value_string_size = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_message_get_utf16_subject_size( message, &value_string_size, error ); #else result = libpff_message_get_utf8_subject_size( message, &value_string_size, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve subject size.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else if( ( result != 0 ) && ( value_string_size > 0 ) ) { value_string = libcstring_system_string_allocate( value_string_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create subject.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_message_get_utf16_subject( message, (uint16_t *) value_string, value_string_size, error ); #else result = libpff_message_get_utf8_subject( message, (uint8_t *) value_string, value_string_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve subject.", function ); goto on_error; } /* Ignore the subject control codes for now */ if( value_string[ 0 ] < 0x20 ) { if( item_file_write_value_string( item_file, description, &( value_string[ 2 ] ), value_string_size - 3, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write subject.", function ); goto on_error; } } else { if( item_file_write_value_string( item_file, description, value_string, value_string_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write subject.", function ); goto on_error; } } memory_free( value_string ); value_string = NULL; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Exports the Outlook message header to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_header_to_item_file( export_handle_t *export_handle, libpff_item_t *message, item_file_t *item_file, libcerror_error_t **error ) { static char *function = "export_handle_export_message_header_to_item_file"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Message:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CLIENT_SUBMIT_TIME, _LIBCSTRING_SYSTEM_STRING( "Client submit time:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write client submit time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_DELIVERY_TIME, _LIBCSTRING_SYSTEM_STRING( "Delivery time:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write delivery time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CREATION_TIME, _LIBCSTRING_SYSTEM_STRING( "Creation time:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write creation time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_MODIFICATION_TIME, _LIBCSTRING_SYSTEM_STRING( "Modification time:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write modification time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SIZE, _LIBCSTRING_SYSTEM_STRING( "Size:\t\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write size.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( export_handle_export_message_flags_to_item_file( export_handle, message, _LIBCSTRING_SYSTEM_STRING( "Flags:\t\t\t\t\t" ), item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write flags.", function ); return( -1 ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, _LIBCSTRING_SYSTEM_STRING( "Display name:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write display name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_CONVERSATION_TOPIC, _LIBCSTRING_SYSTEM_STRING( "Conversation topic:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write conversation topic.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( export_handle_export_message_subject_to_item_file( export_handle, message, _LIBCSTRING_SYSTEM_STRING( "Subject:\t\t\t\t" ), item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write subject.", function ); return( -1 ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_NAME, _LIBCSTRING_SYSTEM_STRING( "Sender name:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write sender name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENDER_EMAIL_ADDRESS, _LIBCSTRING_SYSTEM_STRING( "Sender email address:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write sender email address.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_NAME, _LIBCSTRING_SYSTEM_STRING( "Sent representing name:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write sent representing name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_SENT_REPRESENTING_EMAIL_ADDRESS, _LIBCSTRING_SYSTEM_STRING( "Sent representing email address:\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write sent representing email address.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( export_handle_export_message_importance_to_item_file( export_handle, message, _LIBCSTRING_SYSTEM_STRING( "Importance:\t\t\t\t" ), item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write importance.", function ); return( -1 ); } if( export_handle_export_message_priority_to_item_file( export_handle, message, _LIBCSTRING_SYSTEM_STRING( "Priority:\t\t\t\t" ), item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write priority.", function ); return( -1 ); } if( export_handle_export_message_sensitivity_to_item_file( export_handle, message, _LIBCSTRING_SYSTEM_STRING( "Sensitivity:\t\t\t\t" ), item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write sensitivity.", function ); return( -1 ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_REMINDER, _LIBCSTRING_SYSTEM_STRING( "Is a reminder:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write is reminder.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_TIME, _LIBCSTRING_SYSTEM_STRING( "Reminder time:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write reminder time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_REMINDER_SIGNAL_TIME, _LIBCSTRING_SYSTEM_STRING( "Reminder signal time:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write reminder signal time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, message, 0, LIBPFF_ENTRY_TYPE_MESSAGE_IS_PRIVATE, _LIBCSTRING_SYSTEM_STRING( "Is private:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write is private.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } return( 1 ); } /* Exports the message body * Returns 1 if successful or -1 on error */ int export_handle_export_message_body( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "export_handle_export_message_body"; size_t message_html_body_size = 0; size_t message_rtf_body_size = 0; size_t message_text_body_size = 0; int export_format = 0; int has_html_body = 0; int has_rtf_body = 0; int has_text_body = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } /* Determine the available message body types */ has_html_body = libpff_message_get_html_body_size( message, &message_html_body_size, error ); if( has_html_body == -1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } has_rtf_body = libpff_message_get_rtf_body_size( message, &message_rtf_body_size, error ); if( has_rtf_body == -1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } has_text_body = libpff_message_get_plain_text_body_size( message, &message_text_body_size, error ); if( has_text_body == -1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } /* Determine the message body export format */ if( export_handle->preferred_export_format == EXPORT_FORMAT_ALL ) { export_format = EXPORT_FORMAT_ALL; } if( export_format == 0 ) { if( ( has_text_body == 1 ) && ( message_text_body_size > 0 ) ) { export_format = EXPORT_FORMAT_TEXT; } if( ( has_html_body == 1 ) && ( message_html_body_size > 0 ) && ( export_handle->preferred_export_format == EXPORT_FORMAT_HTML ) ) { export_format = EXPORT_FORMAT_HTML; } if( ( has_rtf_body == 1 ) && ( message_rtf_body_size > 0 ) && ( export_handle->preferred_export_format == EXPORT_FORMAT_RTF ) ) { export_format = EXPORT_FORMAT_RTF; } } if( export_format == 0 ) { if( ( has_text_body == 1 ) && ( message_text_body_size > 0 ) ) { export_format = EXPORT_FORMAT_TEXT; } else if( ( has_html_body == 1 ) && ( message_html_body_size > 0 ) ) { export_format = EXPORT_FORMAT_HTML; } else if( ( has_rtf_body == 1 ) && ( message_rtf_body_size > 0 ) ) { export_format = EXPORT_FORMAT_RTF; } } if( export_format == 0 ) { if( has_text_body == 1 ) { export_format = EXPORT_FORMAT_TEXT; } else if( has_html_body == 1 ) { export_format = EXPORT_FORMAT_HTML; } else if( has_rtf_body == 1 ) { export_format = EXPORT_FORMAT_RTF; } } if( export_format == EXPORT_FORMAT_ALL ) { if( has_html_body == 1 ) { if( export_handle_export_message_body_html( export_handle, message, message_html_body_size, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export HTML message body.", function ); return( -1 ); } } if( has_rtf_body == 1 ) { if( export_handle_export_message_body_rtf( export_handle, message, message_rtf_body_size, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export RTF message body.", function ); return( -1 ); } } if( has_text_body == 1 ) { if( export_handle_export_message_body_plain_text( export_handle, message, message_text_body_size, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export plain text message body.", function ); return( -1 ); } } } else if( export_format == EXPORT_FORMAT_HTML ) { if( export_handle_export_message_body_html( export_handle, message, message_html_body_size, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export HTML message body.", function ); return( -1 ); } } else if( export_format == EXPORT_FORMAT_RTF ) { if( export_handle_export_message_body_rtf( export_handle, message, message_rtf_body_size, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export RTF message body.", function ); return( -1 ); } } else if( export_format == EXPORT_FORMAT_TEXT ) { if( export_handle_export_message_body_plain_text( export_handle, message, message_text_body_size, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export plain text message body.", function ); return( -1 ); } } return( 1 ); } /* Exports the HTML message body * Returns 1 if successful or -1 on error */ int export_handle_export_message_body_html( export_handle_t *export_handle, libpff_item_t *message, size_t message_html_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t filename[ 13 ]; item_file_t *item_file = NULL; static char *function = "export_handle_export_message_body_html"; size_t filename_size = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libcstring_system_string_copy( filename, _LIBCSTRING_SYSTEM_STRING( "Message.html" ), 12 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set filename.", function ); goto on_error; } filename[ 12 ] = 0; filename_size = 13; log_handle_printf( log_handle, "Saving HTML message body as: %" PRIs_LIBCSTRING_SYSTEM "\n", filename ); result = export_handle_create_item_file( export_handle, export_path, export_path_length, filename, filename_size - 1, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping message body file: %" PRIs_LIBCSTRING_SYSTEM " it already exists.", filename ); return( 1 ); } if( export_handle_export_message_body_html_to_item_file( export_handle, message, message_html_body_size, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export HTML message body.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the HTML message body to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_body_html_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t message_html_body_size, item_file_t *item_file, libcerror_error_t **error ) { uint8_t *value_string = NULL; static char *function = "export_handle_export_message_body_html_to_item_file"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_html_body_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid message HTML body size value exceeds maximum.", function ); return( -1 ); } if( message_html_body_size > 0 ) { value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * message_html_body_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create HTML body.", function ); goto on_error; } if( libpff_message_get_html_body( message, value_string, message_html_body_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve HTML body.", function ); goto on_error; } /* Do not write the end-of-string byte */ if( item_file_write_buffer( item_file, value_string, message_html_body_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write HTML body.", function ); goto on_error; } memory_free( value_string ); value_string = NULL; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Exports the RTF message body * Returns 1 if successful or -1 on error */ int export_handle_export_message_body_rtf( export_handle_t *export_handle, libpff_item_t *message, size_t message_rtf_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t filename[ 12 ]; item_file_t *item_file = NULL; static char *function = "export_handle_export_message_body_rtf"; size_t filename_size = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libcstring_system_string_copy( filename, _LIBCSTRING_SYSTEM_STRING( "Message.rtf" ), 11 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set RTF message body filename.", function ); goto on_error; } filename[ 11 ] = 0; filename_size = 12; log_handle_printf( log_handle, "Saving RTF message body as: %" PRIs_LIBCSTRING_SYSTEM "\n", filename ); result = export_handle_create_item_file( export_handle, export_path, export_path_length, filename, filename_size - 1, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping message body file: %" PRIs_LIBCSTRING_SYSTEM " it already exists.", filename ); return( 1 ); } if( export_handle_export_message_body_rtf_to_item_file( export_handle, message, message_rtf_body_size, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export RTF message body.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the RTF message body to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_body_rtf_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t message_rtf_body_size, item_file_t *item_file, libcerror_error_t **error ) { uint8_t *value_string = NULL; static char *function = "export_handle_export_message_body_rtf_to_item_file"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_rtf_body_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid message RTF body size value exceeds maximum.", function ); return( -1 ); } if( message_rtf_body_size > 0 ) { value_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * message_rtf_body_size ); if( value_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create RTF body.", function ); goto on_error; } if( libpff_message_get_rtf_body( message, value_string, message_rtf_body_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve RTF body.", function ); goto on_error; } /* Do not write the end of string byte */ if( item_file_write_buffer( item_file, value_string, message_rtf_body_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write RTF body.", function ); goto on_error; } memory_free( value_string ); value_string = NULL; } return( 1 ); on_error: if( value_string != NULL ) { memory_free( value_string ); } return( -1 ); } /* Exports the plain text message body * Returns 1 if successful or -1 on error */ int export_handle_export_message_body_plain_text( export_handle_t *export_handle, libpff_item_t *message, size_t plain_text_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t filename[ 12 ]; item_file_t *item_file = NULL; static char *function = "export_handle_export_message_body_plain_text"; size_t filename_size = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libcstring_system_string_copy( filename, _LIBCSTRING_SYSTEM_STRING( "Message.txt" ), 11 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set plain text message body filename.", function ); goto on_error; } filename[ 11 ] = 0; filename_size = 12; log_handle_printf( log_handle, "Saving plain text message body as: %" PRIs_LIBCSTRING_SYSTEM "\n", filename ); result = export_handle_create_item_file( export_handle, export_path, export_path_length, filename, filename_size - 1, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create message body file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping message body file: %" PRIs_LIBCSTRING_SYSTEM " it already exists.", filename ); return( 1 ); } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, message, plain_text_body_size, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export plain text message body.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the plain text message body to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_body_plain_text_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t plain_text_body_size, item_file_t *item_file, libcerror_error_t **error ) { uint8_t *plain_text_body = NULL; static char *function = "export_handle_export_message_body_plain_text_to_item_file"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( plain_text_body_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid plain text body size value exceeds maximum.", function ); return( -1 ); } if( plain_text_body_size > 0 ) { plain_text_body = (uint8_t *) memory_allocate( sizeof( uint8_t ) * plain_text_body_size ); if( plain_text_body == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create plain text body.", function ); goto on_error; } if( libpff_message_get_plain_text_body( message, plain_text_body, plain_text_body_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body.", function ); goto on_error; } /* Do not write the end of string byte */ if( item_file_write_buffer( item_file, plain_text_body, plain_text_body_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write plain text body.", function ); goto on_error; } memory_free( plain_text_body ); plain_text_body = NULL; } return( 1 ); on_error: if( plain_text_body != NULL ) { memory_free( plain_text_body ); } return( -1 ); } /* Exports the Outlook message conversation index * Returns 1 if successful or -1 on error */ int export_handle_export_message_conversation_index( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; static char *function = "export_handle_export_message_conversation_index"; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } result = export_handle_create_item_file( export_handle, export_path, export_path_length, _LIBCSTRING_SYSTEM_STRING( "ConversationIndex.txt" ), 21, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping conversation index file it already exists.\n" ); return( 1 ); } if( export_handle_export_message_conversation_index_to_item_file( export_handle, message, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message conversation index.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the Outlook message conversation index to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_conversation_index_to_item_file( export_handle_t *export_handle, libpff_item_t *message, item_file_t *item_file, libcerror_error_t **error ) { uint8_t filetime_buffer[ 8 ]; libfdatetime_filetime_t *delta_filetime = NULL; libfdatetime_filetime_t *filetime = NULL; libfguid_identifier_t *guid = NULL; uint8_t *entry_value = NULL; uint8_t *entry_value_pointer = NULL; static char *function = "export_handle_export_message_conversation_index_to_item_file"; size_t entry_value_size = 0; uint64_t entry_value_64bit = 0; uint32_t entry_value_index = 0; int list_iterator = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } result = libpff_message_get_conversation_index_size( message, &entry_value_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve conversation index size.", function ); goto on_error; } if( ( result == 0 ) || ( entry_value_size == 0 ) ) { return( 1 ); } entry_value = (uint8_t *) memory_allocate( sizeof( uint8_t ) * entry_value_size ); if( entry_value == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create entry value.", function ); goto on_error; } result = libpff_message_get_conversation_index( message, entry_value, entry_value_size, error ); if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve conversation index.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Conversation index:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write value description.", function ); goto on_error; } if( entry_value_size >= 22 ) { /* According to MSDN the first byte is reserved * and should always be 0x01 however it makes * more sense that it's the most significant * part of the current system filetime data */ if( entry_value[ 0 ] == 0x01 ) { if( libfdatetime_filetime_initialize( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create filetime.", function ); goto on_error; } if( libfdatetime_filetime_initialize( &delta_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create delta filetime.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Header block:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write value description.", function ); goto on_error; } /* The current system file data is in big-endian */ filetime_buffer[ 0 ] = 0; filetime_buffer[ 1 ] = 0; filetime_buffer[ 2 ] = entry_value[ 5 ]; filetime_buffer[ 3 ] = entry_value[ 4 ]; filetime_buffer[ 4 ] = entry_value[ 3 ]; filetime_buffer[ 5 ] = entry_value[ 2 ]; filetime_buffer[ 6 ] = entry_value[ 1 ]; filetime_buffer[ 7 ] = entry_value[ 0 ]; if( libfdatetime_filetime_copy_from_byte_stream( filetime, filetime_buffer, 8, LIBFDATETIME_ENDIAN_LITTLE, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to create filetime.", function ); goto on_error; } if( item_file_write_value_filetime( item_file, _LIBCSTRING_SYSTEM_STRING( "\tFiletime:\t" ), filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write value filetime.", function ); goto on_error; } if( libfguid_identifier_initialize( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create GUID.", function ); goto on_error; } /* Currently it is assumed that the GUID is in big-endian */ if( libfguid_identifier_copy_from_byte_stream( guid, &( entry_value[ 6 ] ), 16, LIBFGUID_ENDIAN_BIG, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy byte stream to GUID.", function ); goto on_error; } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "\tGUID:\t\t" ), 8, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( item_file_write_guid( item_file, guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write GUID.", function ); goto on_error; } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); goto on_error; } if( libfguid_identifier_free( &guid, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free GUID.", function ); goto on_error; } list_iterator = 1; for( entry_value_index = 22; entry_value_index < entry_value_size; entry_value_index += 5 ) { if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "Child block: " ), (uint32_t) list_iterator, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } entry_value_pointer = &( entry_value[ entry_value_index ] ); /* Use a 64-bit value to be able to shift the bits in the right position * current system time delta is in big-endian */ byte_stream_copy_to_uint32_little_endian( entry_value_pointer, entry_value_64bit ); /* Make sure only 31-bits are set and the rest is cleared */ entry_value_64bit &= 0x07fffffffUL; /* Check if the highest bit is set */ if( ( entry_value[ entry_value_index ] & 0x80 ) == 0 ) { /* Discard the highest 15-bits and the lowest 18-bits */ entry_value_64bit <<= 18; } else { /* Discard the highest 10-bits and the lowest 23-bits */ entry_value_64bit <<= 23; } if( libfdatetime_filetime_copy_from_64bit( delta_filetime, entry_value_64bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to create delta filetime.", function ); goto on_error; } /* The next child block uses the previous filetime as its base * not the filetime in the header block as MSDN states * so the filetime is updated */ if( libfdatetime_filetime_add( filetime, delta_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to create filetime.", function ); goto on_error; } if( item_file_write_value_filetime( item_file, _LIBCSTRING_SYSTEM_STRING( "\tFiletime:\t" ), filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write value filetime.", function ); goto on_error; } if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "\tRandom number:\t" ), (uint32_t) ( ( entry_value[ entry_value_index + 4 ] & 0xf0 ) >> 4 ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } if( item_file_write_value_integer_32bit_as_decimal( item_file, _LIBCSTRING_SYSTEM_STRING( "\tSequence count:\t" ), (uint32_t) ( entry_value[ entry_value_index + 4 ] & 0x0f ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer value.", function ); goto on_error; } list_iterator++; } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); goto on_error; } if( libfdatetime_filetime_free( &delta_filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free delta filetime.", function ); goto on_error; } if( libfdatetime_filetime_free( &filetime, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free filetime.", function ); goto on_error; } } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); goto on_error; } memory_free( entry_value ); entry_value = NULL; return( 1 ); on_error: if( guid != NULL ) { libfguid_identifier_free( &guid, NULL ); } if( delta_filetime != NULL ) { libfdatetime_filetime_free( &delta_filetime, NULL ); } if( filetime != NULL ) { libfdatetime_filetime_free( &filetime, NULL ); } if( entry_value != NULL ) { memory_free( entry_value ); } return( -1 ); } /* Exports the transport message headers to a separate file * Returns 1 if successful or -1 on error */ int export_handle_export_message_transport_headers( export_handle_t *export_handle, libpff_item_t *message, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t transport_headers_filename[ 20 ]; item_file_t *item_file = NULL; static char *function = "export_handle_export_message_transport_headers"; size_t transport_headers_filename_size = 20; size_t message_transport_headers_size = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } /* Determine the message transport headers size */ result = libpff_message_get_utf8_transport_headers_size( message, &message_transport_headers_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable determine message transport headers size.", function ); goto on_error; } if( ( result == 0 ) || ( message_transport_headers_size == 0 ) ) { return( 1 ); } if( libcstring_system_string_copy( transport_headers_filename, _LIBCSTRING_SYSTEM_STRING( "InternetHeaders.txt" ), 19 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set message transport headers filename.", function ); goto on_error; } transport_headers_filename[ 19 ] = 0; log_handle_printf( log_handle, "Saving message transport headers as: %" PRIs_LIBCSTRING_SYSTEM "\n", transport_headers_filename ); result = export_handle_create_item_file( export_handle, export_path, export_path_length, transport_headers_filename, transport_headers_filename_size - 1, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping message transport headers file: %" PRIs_LIBCSTRING_SYSTEM " it already exists.", transport_headers_filename ); return( 1 ); } if( export_handle_export_message_transport_headers_to_item_file( export_handle, message, message_transport_headers_size, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export message transport headers.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the transport message headers to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_message_transport_headers_to_item_file( export_handle_t *export_handle, libpff_item_t *message, size_t message_transport_headers_size, item_file_t *item_file, libcerror_error_t **error ) { uint8_t *entry_string = NULL; static char *function = "export_handle_export_message_transport_headers_to_item_file"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( message_transport_headers_size > 0 ) { entry_string = (uint8_t *) memory_allocate( sizeof( uint8_t ) * message_transport_headers_size ); if( entry_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create transport headers.", function ); goto on_error; } if( libpff_message_get_utf8_transport_headers( message, entry_string, message_transport_headers_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve transport headers.", function ); goto on_error; } /* Do not write the end of string */ if( item_file_write_buffer( item_file, entry_string, message_transport_headers_size - 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write transport headers.", function ); goto on_error; } memory_free( entry_string ); entry_string = NULL; } return( 1 ); on_error: if( entry_string != NULL ) { memory_free( entry_string ); } return( -1 ); } /* Exports the attachments * Returns 1 if successful or -1 on error */ int export_handle_export_attachments( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *attachment = NULL; libpff_item_t *attachments = NULL; libcstring_system_character_t *attachments_path = NULL; static char *function = "export_handle_export_attachments"; size_t attachments_path_size = 0; int attachment_index = 0; int number_of_attachments = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } if( libpff_message_get_number_of_attachments( item, &number_of_attachments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of attachments.", function ); goto on_error; } if( number_of_attachments > 0 ) { /* Create the attachments directory */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &attachments_path, &attachments_path_size, export_path, export_path_length, _LIBCSTRING_SYSTEM_STRING( "Attachments" ), 11, error ); #else result = libcpath_path_join( &attachments_path, &attachments_path_size, export_path, export_path_length, _LIBCSTRING_SYSTEM_STRING( "Attachments" ), 11, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create attachments path.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( attachments_path, error ); #else result = libcfile_file_exists( attachments_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, attachments_path ); goto on_error; } else if( result != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: %" PRIs_LIBCSTRING_SYSTEM " already exists.", function, attachments_path ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( attachments_path, error ) != 1 ) #else if( libcpath_path_make_directory( attachments_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, attachments_path ); goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", attachments_path ); if( export_handle->dump_item_values != 0 ) { result = libpff_message_get_attachments( item, &attachments, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachments.", function ); goto on_error; } else if( result == 1 ) { if( export_handle_export_item_values( export_handle, attachments, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, attachments_path, attachments_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments item values.\n" ); } if( libpff_item_free( &attachments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free attachments.", function ); goto on_error; } } } /* Create the attachments files */ for( attachment_index = 0; attachment_index < number_of_attachments; attachment_index++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( export_handle->print_status_information != 0 ) { fprintf( export_handle->notify_stream, "Exporting attachment %d out of %d.\n", attachment_index + 1, number_of_attachments ); } if( libpff_message_get_attachment( item, attachment_index, &attachment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachment.", function ); goto on_error; } if( export_handle_export_attachment( export_handle, attachment, attachment_index, number_of_attachments, attachments_path, attachments_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachment: %d.\n", function, attachment_index + 1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachment: %d.\n", attachment_index + 1 ); } if( libpff_item_free( &attachment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free attachment.", function ); goto on_error; } } memory_free( attachments_path ); } return( 1 ); on_error: if( attachments_path != NULL ) { memory_free( attachments_path ); } return( -1 ); } /* Exports the attachment * Returns 1 if successful or -1 on error */ int export_handle_export_attachment( export_handle_t *export_handle, libpff_item_t *attachment, int attachment_index, int number_of_attachments, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "export_handle_export_attachment"; int attachment_type = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( libpff_attachment_get_type( attachment, &attachment_type, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachment type.", function ); return( -1 ); } if( ( attachment_type != LIBPFF_ATTACHMENT_TYPE_DATA ) && ( attachment_type != LIBPFF_ATTACHMENT_TYPE_ITEM ) && ( attachment_type != LIBPFF_ATTACHMENT_TYPE_REFERENCE ) ) { fprintf( export_handle->notify_stream, "Unsupported attachment type.\n" ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unsupported attachment type.\n", function ); } log_handle_printf( log_handle, "Unsupported attachment type.\n" ); return( 1 ); } if( attachment_type == LIBPFF_ATTACHMENT_TYPE_REFERENCE ) { fprintf( export_handle->notify_stream, "Attachment is stored externally.\n" ); log_handle_printf( log_handle, "Attachment is stored externally.\n" ); return( 1 ); } if( attachment_type == LIBPFF_ATTACHMENT_TYPE_DATA ) { if( export_handle_export_attachment_data( export_handle, attachment, attachment_index, number_of_attachments, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export attachment data.", function ); return( -1 ); } } else if( attachment_type == LIBPFF_ATTACHMENT_TYPE_ITEM ) { if( export_handle_export_attachment_item( export_handle, attachment, attachment_index, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export attachment item.", function ); return( -1 ); } } return( 1 ); } /* Exports the attachment data * Returns 1 if successful or -1 on error */ int export_handle_export_attachment_data( export_handle_t *export_handle, libpff_item_t *attachment, int attachment_index, int number_of_attachments, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t *attachment_filename = NULL; libcstring_system_character_t *target_path = NULL; uint8_t *attachment_data = NULL; FILE *attachment_file_stream = NULL; static char *function = "export_handle_export_attachment_data"; size64_t attachment_data_size = 0; size_t attachment_filename_index = 0; size_t attachment_filename_size = 0; size_t read_size = 0; size_t string_index = 0; size_t target_path_size = 0; size_t write_count = 0; ssize_t read_count = 0; int print_count = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } /* Determine the attachment filename size */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_attachment_get_utf16_long_filename_size( attachment, &attachment_filename_size, NULL ); #else result = libpff_attachment_get_utf8_long_filename_size( attachment, &attachment_filename_size, NULL ); #endif if( result == 1 ) { if( attachment_filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: attachment filename size value exceeds maximum.", function ); goto on_error; } } /* Reserve space for a leading decimal and a _ */ while( number_of_attachments >= 10 ) { number_of_attachments /= 10; attachment_filename_index++; } attachment_filename_size += 2 + attachment_filename_index; if( attachment_filename_size < ( attachment_filename_index + 15 ) ) { attachment_filename_size = attachment_filename_index + 15; } attachment_filename = libcstring_system_string_allocate( attachment_filename_size ); if( attachment_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create attachment filename.", function ); goto on_error; } string_index = attachment_filename_index; /* Start with 1_ */ attachment_index += 1; while( string_index > 0 ) { attachment_filename[ string_index-- ] = (libcstring_system_character_t) ( '0' + ( attachment_index % 10 ) ); attachment_index /= 10; } attachment_filename[ 0 ] = (libcstring_system_character_t) ( '0' + ( attachment_index % 10 ) ); attachment_filename_index++; attachment_filename[ attachment_filename_index++ ] = (libcstring_system_character_t) '_'; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_attachment_get_utf16_long_filename( attachment, (uint16_t *) &( attachment_filename[ attachment_filename_index ] ), attachment_filename_size - attachment_filename_index, NULL ); #else result = libpff_attachment_get_utf8_long_filename( attachment, (uint8_t *) &( attachment_filename[ attachment_filename_index ] ), attachment_filename_size - attachment_filename_index, NULL ); #endif if( result == 1 ) { attachment_filename_size = 1 + libcstring_system_string_length( attachment_filename ); if( attachment_filename_size > 1 ) { log_handle_printf( log_handle, "Saving attachment with filename: %" PRIs_LIBCSTRING_SYSTEM "", &( attachment_filename[ attachment_filename_index ] ) ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_sanitize_filename_wide( attachment_filename, &attachment_filename_size, error ); #else result = libcpath_path_sanitize_filename( attachment_filename, &attachment_filename_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable sanitize attachment filename.", function ); goto on_error; } log_handle_printf( log_handle, " as: %" PRIs_LIBCSTRING_SYSTEM "\n", &( attachment_filename[ attachment_filename_index ] ) ); } else { result = 0; } } if( result != 1 ) { if( libcstring_system_string_copy( &( attachment_filename[ attachment_filename_index ] ), _LIBCSTRING_SYSTEM_STRING( "Attachment.txt" ), 14 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set attachment filename.", function ); goto on_error; } attachment_filename[ attachment_filename_index + 14 ] = 0; attachment_filename_size = attachment_filename_index + 15; log_handle_printf( log_handle, "Missing attachment filename defaulting to: %" PRIs_LIBCSTRING_SYSTEM "\n", attachment_filename ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &target_path, &target_path_size, export_path, export_path_length, attachment_filename, attachment_filename_size - 1, error ); #else result = libcpath_path_join( &target_path, &target_path_size, export_path, export_path_length, attachment_filename, attachment_filename_size - 1, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create target path.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( target_path, error ); #else result = libcfile_file_exists( target_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, target_path ); goto on_error; } else if( result != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: %" PRIs_LIBCSTRING_SYSTEM " already exists.", function, target_path ); goto on_error; } memory_free( attachment_filename ); attachment_filename = NULL; if( target_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing target path.", function ); goto on_error; } /* Create the attachment file */ attachment_file_stream = libcsystem_file_stream_open( target_path, _LIBCSTRING_SYSTEM_STRING( FILE_STREAM_BINARY_OPEN_WRITE ) ); if( attachment_file_stream == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open: %" PRIs_LIBCSTRING_SYSTEM ".", function, target_path ); goto on_error; } memory_free( target_path ); target_path = NULL; result = libpff_attachment_get_data_size( attachment, &attachment_data_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve attachment data size.", function ); goto on_error; } /* If there is no attachment data an empty file is written */ if( ( result != 0 ) && ( attachment_data_size > 0 ) ) { /* This function in not necessary for normal use * but it was added for testing */ if( libpff_attachment_data_seek_offset( attachment, 0, SEEK_SET, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to seek the start of the attachment data.", function ); goto on_error; } attachment_data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * EXPORT_HANDLE_BUFFER_SIZE ); if( attachment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create attachment data.", function ); goto on_error; } while( attachment_data_size > 0 ) { if( attachment_data_size >= EXPORT_HANDLE_BUFFER_SIZE ) { read_size = EXPORT_HANDLE_BUFFER_SIZE; } else { read_size = (size_t) attachment_data_size; } attachment_data_size -= read_size; read_count = libpff_attachment_data_read_buffer( attachment, attachment_data, read_size, error ); if( read_count != (ssize_t) read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read attachment data.", function ); goto on_error; } write_count = libcsystem_file_stream_write( attachment_file_stream, attachment_data, read_size ); if( write_count != read_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write attachment data.", function ); goto on_error; } } memory_free( attachment_data ); attachment_data = NULL; } if( libcsystem_file_stream_close( attachment_file_stream ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close attachment file.", function ); attachment_file_stream = NULL; goto on_error; } attachment_file_stream = NULL; return( 1 ); on_error: if( attachment_data != NULL ) { memory_free( attachment_data ); } if( attachment_file_stream != NULL ) { libcsystem_file_stream_close( attachment_file_stream ); } if( target_path != NULL ) { memory_free( target_path ); } if( attachment_filename != NULL ) { memory_free( attachment_filename ); } return( -1 ); } /* Exports the attachment item * Returns 1 if successful or -1 on error */ int export_handle_export_attachment_item( export_handle_t *export_handle, libpff_item_t *attachment, int attachment_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *attached_item = NULL; libcstring_system_character_t *attachment_filename = NULL; libcstring_system_character_t *target_path = NULL; static char *function = "export_handle_export_attachment_item"; size_t attachment_filename_size = 0; size_t target_path_size = 0; int print_count = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } attachment_filename = libcstring_system_string_allocate( 16 ); if( attachment_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create attachment filename.", function ); goto on_error; } print_count = libcstring_system_string_sprintf( attachment_filename, 16, _LIBCSTRING_SYSTEM_STRING( "Attachment%05d" ), attachment_index + 1 ); if( ( print_count < 0 ) || ( print_count > 16 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set attachment filename.", function ); goto on_error; } attachment_filename[ 15 ] = 0; attachment_filename_size = 16; log_handle_printf( log_handle, "Missing attachment filename saving as: %" PRIs_LIBCSTRING_SYSTEM "\n", attachment_filename ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &target_path, &target_path_size, export_path, export_path_length, attachment_filename, attachment_filename_size - 1, error ); #else result = libcpath_path_join( &target_path, &target_path_size, export_path, export_path_length, attachment_filename, attachment_filename_size - 1, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create target path.", function ); goto on_error; } memory_free( attachment_filename ); attachment_filename = NULL; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( target_path, error ); #else result = libcfile_file_exists( target_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, target_path ); goto on_error; } else if( result != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: %" PRIs_LIBCSTRING_SYSTEM " already exists.", function, target_path ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( target_path, error ) != 1 ) #else if( libcpath_path_make_directory( target_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, target_path ); goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", target_path ); if( libpff_attachment_get_item( attachment, &attached_item, error ) != 1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Missing attached item.\n" ); } else { if( export_handle_export_item( export_handle, attached_item, 0, 1, target_path, target_path_size - 1, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export attached item.\n" ); libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_OUTPUT, LIBCERROR_OUTPUT_ERROR_GENERIC, "%s: unable to export attached item.", function ); log_handle_printf( log_handle, "Unable to export attached item.\n" ); } } memory_free( target_path ); target_path = NULL; if( libpff_item_free( &attached_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free attached item.", function ); goto on_error; } return( 1 ); on_error: if( target_path != NULL ) { memory_free( target_path ); } if( attachment_filename != NULL ) { memory_free( attachment_filename ); } return( -1 ); } /* Exports the recipients to a separate file * Returns 1 if successful or -1 on error */ int export_handle_export_recipients( export_handle_t *export_handle, libpff_item_t *item, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libpff_item_t *recipients = NULL; static char *function = "export_handle_export_recipients"; int number_of_recipients = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid item.", function ); return( -1 ); } result = libpff_message_get_recipients( item, &recipients, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recipients.", function ); goto on_error; } else if( result != 0 ) { if( libpff_item_get_number_of_sets( recipients, (uint32_t *) &number_of_recipients, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to get number of recipients.", function ); goto on_error; } if( number_of_recipients > 0 ) { if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, recipients, _LIBCSTRING_SYSTEM_STRING( "RecipientsItemValues.txt" ), 24, export_path, export_path_length, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients item values.\n" ); } } log_handle_printf( log_handle, "Saving %" PRIu32 "recipient(s) as: Recipients.txt\n", number_of_recipients ); result = export_handle_create_item_file( export_handle, export_path, export_path_length, _LIBCSTRING_SYSTEM_STRING( "Recipients.txt" ), 14, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create recipients file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping recipients file it already exists.\n" ); } else { if( export_handle_export_recipients_to_item_file( export_handle, recipients, number_of_recipients, item_file, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export recipients.", function ); goto on_error; } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } } if( libpff_item_free( &recipients, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free recipients.", function ); goto on_error; } } return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( recipients != NULL ) { libpff_item_free( &recipients, NULL ); } return( 1 ); } /* Exports the recipient type of a specific recipient to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_recipient_type_to_item_file( export_handle_t *export_handle, libpff_item_t *recipients, int recipient_index, const libcstring_system_character_t *description, item_file_t *item_file, libcerror_error_t **error ) { static char *function = "export_handle_export_recipient_type_to_item_file"; uint32_t value_32bit = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( description == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid description.", function ); return( -1 ); } result = libpff_recipients_get_type( recipients, recipient_index, &value_32bit, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recipient type.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_string( item_file, description, libcstring_system_string_length( description ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write description.", function ); return( -1 ); } if( value_32bit == (uint32_t) LIBPFF_RECIPIENT_TYPE_ORIGINATOR ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Originator" ), 10, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_RECIPIENT_TYPE_TO ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "To" ), 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_RECIPIENT_TYPE_CC ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "CC" ), 2, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else if( value_32bit == (uint32_t) LIBPFF_RECIPIENT_TYPE_BCC ) { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "BCC" ), 3, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } else { if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( "Unknown (" ), 9, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } if( item_file_write_integer_32bit_as_hexadecimal( item_file, value_32bit, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write 32-bit integer.", function ); return( -1 ); } if( item_file_write_string( item_file, _LIBCSTRING_SYSTEM_STRING( ")" ), 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); return( -1 ); } } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } } return( 1 ); } /* Exports the recipients to an item file * Returns 1 if successful or -1 on error */ int export_handle_export_recipients_to_item_file( export_handle_t *export_handle, libpff_item_t *recipients, int number_of_recipients, item_file_t *item_file, log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "export_handle_export_recipients_to_item_file"; int recipient_index = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( recipients == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid recipients.", function ); return( -1 ); } if( export_handle->print_status_information != 0 ) { if( number_of_recipients == 1 ) { fprintf( export_handle->notify_stream, "Exporting recipient.\n" ); } else { fprintf( export_handle->notify_stream, "Exporting %d recipients.\n", number_of_recipients ); } } for( recipient_index = 0; recipient_index < number_of_recipients; recipient_index++ ) { if( item_file_write_item_value( item_file, recipients, recipient_index, LIBPFF_ENTRY_TYPE_DISPLAY_NAME, _LIBCSTRING_SYSTEM_STRING( "Display name:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write display name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, recipients, recipient_index, LIBPFF_ENTRY_TYPE_RECIPIENT_DISPLAY_NAME, _LIBCSTRING_SYSTEM_STRING( "Recipient display name:\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write recipient display name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, recipients, recipient_index, LIBPFF_ENTRY_TYPE_EMAIL_ADDRESS, _LIBCSTRING_SYSTEM_STRING( "Email address:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write address type.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, recipients, recipient_index, LIBPFF_ENTRY_TYPE_ADDRESS_TYPE, _LIBCSTRING_SYSTEM_STRING( "Address type:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write email address.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( export_handle_export_recipient_type_to_item_file( export_handle, recipients, recipient_index, _LIBCSTRING_SYSTEM_STRING( "Recipient type:\t\t" ), item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write recipient type.", function ); return( -1 ); } if( item_file_write_new_line( item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write new line.", function ); return( -1 ); } } return( 1 ); } /* Exports the activity * Returns 1 if successful or -1 on error */ int export_handle_export_activity( export_handle_t *export_handle, libpff_item_t *activity, int activity_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *activity_path = NULL; static char *function = "export_handle_export_activity"; size_t plain_text_body_size = 0; size_t activity_path_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( activity == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid activity.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing activity: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", activity_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( activity, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing activity: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, activity_index, _LIBCSTRING_SYSTEM_STRING( "Activity" ), 8, export_path, export_path_length, &activity_path, &activity_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create activity directory.", function ); goto on_error; } if( activity_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid activity directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, activity, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, activity_path, activity_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export activity item values.\n" ); } } result = export_handle_create_item_file( export_handle, activity_path, activity_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Activity.txt" ), 12, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create activity file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping activity file it already exists.\n" ); memory_free( activity_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, activity, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Activity:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } /* TODO determine the activity properties */ result = libpff_message_get_plain_text_body_size( activity, &plain_text_body_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body size.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "\nBody:\n" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, activity, plain_text_body_size, item_file, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export plain text message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export plain text message body.\n" ); } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } /* TODO what about other types of message bodies */ if( export_handle_export_recipients( export_handle, activity, activity_path, activity_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { if( export_handle_export_attachments( export_handle, activity, activity_path, activity_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( activity_path ); return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( activity_path != NULL ) { memory_free( activity_path ); } return( -1 ); } /* Exports the appointment * Returns 1 if successful or -1 on error */ int export_handle_export_appointment( export_handle_t *export_handle, libpff_item_t *appointment, int appointment_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *appointment_path = NULL; static char *function = "export_handle_export_appointment"; size_t appointment_path_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( appointment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid appointment.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing appointment: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", appointment_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( appointment, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing appointment: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, appointment_index, _LIBCSTRING_SYSTEM_STRING( "Appointment" ), 11, export_path, export_path_length, &appointment_path, &appointment_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create appointment directory.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, appointment, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, appointment_path, appointment_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export appointment item values.\n" ); } } result = export_handle_create_item_file( export_handle, appointment_path, appointment_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Appointment.txt" ), 15, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping appointment file it already exists.\n" ); memory_free( appointment_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, appointment, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Appointment:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_START_TIME, _LIBCSTRING_SYSTEM_STRING( "Start time:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write start time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_END_TIME, _LIBCSTRING_SYSTEM_STRING( "End time:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write end time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_DURATION, _LIBCSTRING_SYSTEM_STRING( "Duration:\t\t\t\t" ), ITEM_FILE_FORMAT_FLAG_DURATION_IN_MINUTES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write duration.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_LOCATION, _LIBCSTRING_SYSTEM_STRING( "Location:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write location.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_RECURRENCE_PATTERN, _LIBCSTRING_SYSTEM_STRING( "Recurrence pattern:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write recurrence pattern.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_FIRST_EFFECTIVE_TIME, _LIBCSTRING_SYSTEM_STRING( "First effective time:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write first effective time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_LAST_EFFECTIVE_TIME, _LIBCSTRING_SYSTEM_STRING( "Last effective time:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write last effective time.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } /* TODO print human readable string */ if( item_file_write_item_value( item_file, appointment, 0, LIBPFF_ENTRY_TYPE_APPOINTMENT_BUSY_STATUS, _LIBCSTRING_SYSTEM_STRING( "Busy status:\t\t\t\t" ), ITEM_FILE_FORMAT_FLAG_HEXADECIMAL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write busy status.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } if( export_handle_export_recipients( export_handle, appointment, appointment_path, appointment_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { if( export_handle_export_attachments( export_handle, appointment, appointment_path, appointment_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( appointment_path ); appointment_path = NULL; return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( appointment_path != NULL ) { memory_free( appointment_path ); } return( -1 ); } /* Exports the contact * Returns 1 if successful or -1 on error */ int export_handle_export_contact( export_handle_t *export_handle, libpff_item_t *contact, int contact_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *contact_path = NULL; static char *function = "export_handle_export_contact"; size_t contact_path_size = 0; size_t plain_text_body_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( contact == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid contact.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing contact: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", contact_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( contact, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing contact: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, contact_index, _LIBCSTRING_SYSTEM_STRING( "Contact" ), 7, export_path, export_path_length, &contact_path, &contact_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create contact directory.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, contact, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, contact_path, contact_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export contact item values.\n" ); } } result = export_handle_create_item_file( export_handle, contact_path, contact_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Contact.txt" ), 11, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping contact file it already exists.\n" ); memory_free( contact_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, contact, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Contact:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_ADDRESS_FILE_UNDER, _LIBCSTRING_SYSTEM_STRING( "File under:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write file under.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_GIVEN_NAME, _LIBCSTRING_SYSTEM_STRING( "Given name:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write given name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_INITIALS, _LIBCSTRING_SYSTEM_STRING( "Initials:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write initials.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_SURNAME, _LIBCSTRING_SYSTEM_STRING( "Surname:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write surname.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_GENERATIONAL_ABBREVIATION, _LIBCSTRING_SYSTEM_STRING( "Generational abbreviation:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write generational abbreviation.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_TITLE, _LIBCSTRING_SYSTEM_STRING( "Title:\t\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write title.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_CALLBACK_PHONE_NUMBER, _LIBCSTRING_SYSTEM_STRING( "Callback phone number:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write callback phone number.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_PRIMARY_PHONE_NUMBER, _LIBCSTRING_SYSTEM_STRING( "Primary phone number:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write primary phone number.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_HOME_PHONE_NUMBER, _LIBCSTRING_SYSTEM_STRING( "Home phone number:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write home phone number.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_MOBILE_PHONE_NUMBER, _LIBCSTRING_SYSTEM_STRING( "Mobile phone number:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write mobile phone number.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_COMPANY_NAME, _LIBCSTRING_SYSTEM_STRING( "Company name:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write company name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_JOB_TITLE, _LIBCSTRING_SYSTEM_STRING( "Job title:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write job title.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_OFFICE_LOCATION, _LIBCSTRING_SYSTEM_STRING( "Office location:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write office location.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_DEPARTMENT_NAME, _LIBCSTRING_SYSTEM_STRING( "Department name:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write department name.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_POSTAL_ADDRESS, _LIBCSTRING_SYSTEM_STRING( "Postal address:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write postal address.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_COUNTRY, _LIBCSTRING_SYSTEM_STRING( "Country:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write country.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_LOCALITY, _LIBCSTRING_SYSTEM_STRING( "Locality:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write locality.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_1, _LIBCSTRING_SYSTEM_STRING( "Business phone number 1:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write business phone number 1.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_PHONE_NUMBER_2, _LIBCSTRING_SYSTEM_STRING( "Business phone number 2:\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write business phone number 2.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_BUSINESS_FAX_NUMBER, _LIBCSTRING_SYSTEM_STRING( "Business fax number:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write business fax number.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_1, _LIBCSTRING_SYSTEM_STRING( "Email address 1:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write email address 1.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_2, _LIBCSTRING_SYSTEM_STRING( "Email address 2:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write email address 2.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, contact, 0, LIBPFF_ENTRY_TYPE_CONTACT_EMAIL_ADDRESS_3, _LIBCSTRING_SYSTEM_STRING( "Email address 3:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write email address 3.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } result = libpff_message_get_plain_text_body_size( contact, &plain_text_body_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body size.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "\nBody:\n" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, contact, plain_text_body_size, item_file, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export plain text message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export plain text message body.\n" ); } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } /* TODO what about other types of message bodies */ if( export_handle_export_recipients( export_handle, contact, contact_path, contact_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { if( export_handle_export_attachments( export_handle, contact, contact_path, contact_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( contact_path ); contact_path = NULL; return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( contact_path != NULL ) { memory_free( contact_path ); } return( -1 ); } /* Exports the document * Returns 1 if successful or -1 on error */ int export_handle_export_document( export_handle_t *export_handle, libpff_item_t *document, int document_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *document_path = NULL; static char *function = "export_handle_export_document"; size_t document_path_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( document == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid document.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing document: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", document_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( document, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing document: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, document_index, _LIBCSTRING_SYSTEM_STRING( "Document" ), 8, export_path, export_path_length, &document_path, &document_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create document directory.", function ); goto on_error; } if( document_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid document directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, document, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, document_path, document_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export document item values.\n" ); } } result = export_handle_create_item_file( export_handle, document_path, document_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Document.txt" ), 12, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping document file it already exists.\n" ); memory_free( document_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, document, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } /* TODO export document MAPI properties */ if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } if( export_handle_export_recipients( export_handle, document, document_path, document_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { if( export_handle_export_attachments( export_handle, document, document_path, document_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( document_path ); return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( document_path != NULL ) { memory_free( document_path ); } return( -1 ); } /* Exports the email * Returns 1 if successful or -1 on error */ int export_handle_export_email( export_handle_t *export_handle, libpff_item_t *email, int email_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t *email_path = NULL; static char *function = "export_handle_export_email"; uint8_t *email_filename = NULL; size_t email_filename_size = 0; size_t email_html_body_size = 0; size_t email_path_size = 0; size_t email_rtf_body_size = 0; size_t email_plain_text_body_size = 0; uint32_t identifier = 0; int export_format = 0; int has_html_body = 0; int has_rtf_body = 0; int has_text_body = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing email: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", email_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( email, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing email: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, email_index, _LIBCSTRING_SYSTEM_STRING( "Message" ), 7, export_path, export_path_length, &email_path, &email_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create email directory.", function ); goto on_error; } if( email_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid email directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, email, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, email_path, email_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export email item values.\n" ); } } /* Determine the available message body types */ has_html_body = libpff_message_get_html_body_size( email, &email_html_body_size, error ); if( has_html_body == -1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } has_rtf_body = libpff_message_get_rtf_body_size( email, &email_rtf_body_size, error ); if( has_rtf_body == -1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } has_text_body = libpff_message_get_plain_text_body_size( email, &email_plain_text_body_size, error ); if( has_text_body == -1 ) { if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } /* Determine the message body export format */ if( export_handle->preferred_export_format == EXPORT_FORMAT_ALL ) { export_format = EXPORT_FORMAT_ALL; } if( export_format == 0 ) { if( ( has_text_body == 1 ) && ( email_plain_text_body_size > 0 ) ) { if( export_handle->preferred_export_format == EXPORT_FORMAT_FTK ) { export_format = EXPORT_FORMAT_FTK; } else if( export_handle->preferred_export_format == EXPORT_FORMAT_TEXT ) { export_format = EXPORT_FORMAT_TEXT; } } if( ( has_html_body == 1 ) && ( email_html_body_size > 0 ) && ( export_handle->preferred_export_format == EXPORT_FORMAT_HTML ) ) { export_format = EXPORT_FORMAT_HTML; } if( ( has_rtf_body == 1 ) && ( email_rtf_body_size > 0 ) && ( export_handle->preferred_export_format == EXPORT_FORMAT_RTF ) ) { export_format = EXPORT_FORMAT_RTF; } } if( export_format == 0 ) { if( ( has_text_body == 1 ) && ( email_plain_text_body_size > 0 ) ) { export_format = EXPORT_FORMAT_TEXT; } else if( ( has_html_body == 1 ) && ( email_html_body_size > 0 ) ) { export_format = EXPORT_FORMAT_HTML; } else if( ( has_rtf_body == 1 ) && ( email_rtf_body_size > 0 ) ) { export_format = EXPORT_FORMAT_RTF; } } if( export_format == 0 ) { if( has_text_body == 1 ) { export_format = EXPORT_FORMAT_TEXT; } else if( has_html_body == 1 ) { export_format = EXPORT_FORMAT_HTML; } else if( has_rtf_body == 1 ) { export_format = EXPORT_FORMAT_RTF; } } if( export_format != EXPORT_FORMAT_FTK ) { if( export_handle_export_message_header( export_handle, email, email_path, email_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export message header.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export message header.\n" ); } if( export_handle_export_message_conversation_index( export_handle, email, email_path, email_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export message conversation index.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export message conversation index.\n" ); } } if( export_format == EXPORT_FORMAT_FTK ) { if( libpff_email_get_utf8_filename_size( email, &email_filename_size, NULL ) == 1 ) { if( email_filename_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: email filename size value exceeds maximum.", function ); goto on_error; } } if( email_filename_size < 13 ) { email_filename_size = 13; } email_filename = (uint8_t *) memory_allocate( sizeof( uint8_t ) * email_filename_size ); if( email_filename == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create email filename.", function ); goto on_error; } if( libpff_email_get_utf8_filename( email, email_filename, email_filename_size, NULL ) == 1 ) { log_handle_printf( log_handle, "Email filename: %s\n", (char *) email_filename ); } if( export_handle_export_email_ftk( export_handle, email, email_plain_text_body_size, email_path, email_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export ftk email.", function ); goto on_error; } memory_free( email_filename ); email_filename = NULL; } else { if( export_handle_export_recipients( export_handle, email, email_path, email_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle_export_message_transport_headers( export_handle, email, email_path, email_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export transport headers.", function ); goto on_error; } if( export_handle_export_message_body( export_handle, email, email_path, email_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export message body.", function ); memory_free( email_path ); return( -1 ); } } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { /* Export the attachments */ if( export_handle_export_attachments( export_handle, email, email_path, email_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( email_path ); return( 1 ); on_error: if( email_filename != NULL ) { memory_free( email_filename ); } if( email_path != NULL ) { memory_free( email_path ); } return( -1 ); } /* Exports the email for ftk * Returns 1 if successful or -1 on error */ int export_handle_export_email_ftk( export_handle_t *export_handle, libpff_item_t *email, size_t plain_text_body_size, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t email_filename[ 12 ]; item_file_t *item_file = NULL; libpff_item_t *recipients = NULL; static char *function = "export_handle_export_email_ftk"; size_t email_filename_size = 0; size_t message_transport_headers_size = 0; int number_of_recipients = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( plain_text_body_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid email plain text body size value exceeds maximum.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } if( libcstring_system_string_copy( email_filename, _LIBCSTRING_SYSTEM_STRING( "Message.txt" ), 11 ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set email filename.", function ); goto on_error; } email_filename[ 11 ] = 0; email_filename_size = 12; log_handle_printf( log_handle, "Saving email as: %" PRIs_LIBCSTRING_SYSTEM "\n", email_filename ); result = export_handle_create_item_file( export_handle, export_path, export_path_length, email_filename, email_filename_size - 1, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping email file: %" PRIs_LIBCSTRING_SYSTEM " it already exists.", email_filename ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, email, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( export_handle_export_message_conversation_index_to_item_file( export_handle, email, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message conversation index.", function ); goto on_error; } /* Export the recipients */ result = libpff_message_get_recipients( email, &recipients, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recipients.", function ); goto on_error; } else if( result == 1 ) { if( libpff_item_get_number_of_sets( recipients, (uint32_t *) &number_of_recipients, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to get number of recipients.", function ); goto on_error; } if( number_of_recipients > 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Recipients:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_recipients_to_item_file( export_handle, recipients, number_of_recipients, item_file, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } } if( libpff_item_free( &recipients, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free recipients.", function ); goto on_error; } } /* Determine the message transport headers size */ result = libpff_message_get_utf8_transport_headers_size( email, &message_transport_headers_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable determine transport headers size.", function ); goto on_error; } if( message_transport_headers_size > 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Internet headers:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_transport_headers_to_item_file( export_handle, email, message_transport_headers_size, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export message transport headers.", function ); goto on_error; } } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, email, plain_text_body_size, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to export plain text message body.", function ); goto on_error; } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } return( 1 ); on_error: if( recipients != NULL ) { libpff_item_free( &recipients, NULL ); } if( item_file != NULL ) { item_file_free( &item_file, NULL ); } return( -1 ); } /* Exports the meeting * Returns 1 if successful or -1 on error */ int export_handle_export_meeting( export_handle_t *export_handle, libpff_item_t *meeting, int meeting_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *meeting_path = NULL; static char *function = "export_handle_export_meeting"; size_t meeting_path_size = 0; size_t plain_text_body_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( meeting == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid meeting.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing meeting: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", meeting_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( meeting, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing meeting: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, meeting_index, _LIBCSTRING_SYSTEM_STRING( "Meeting" ), 7, export_path, export_path_length, &meeting_path, &meeting_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create meeting directory.", function ); goto on_error; } if( meeting_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid meeting directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, meeting, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, meeting_path, meeting_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export meeting item values.\n" ); } } result = export_handle_create_item_file( export_handle, meeting_path, meeting_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Meeting.txt" ), 11, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping meeting file it already exists.\n" ); memory_free( meeting_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, meeting, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Meeting:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } /* TODO determine the meeting properties */ result = libpff_message_get_plain_text_body_size( meeting, &plain_text_body_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body size.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "\nBody:\n" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, meeting, plain_text_body_size, item_file, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export plain text message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export plain text message body.\n" ); } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } /* TODO what about other types of message bodies */ memory_free( meeting_path ); meeting_path = NULL; return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( meeting_path != NULL ) { memory_free( meeting_path ); } return( -1 ); } /* Exports the note * Returns 1 if successful or -1 on error */ int export_handle_export_note( export_handle_t *export_handle, libpff_item_t *note, int note_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *note_path = NULL; static char *function = "export_handle_export_note"; size_t note_path_size = 0; size_t plain_text_body_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( note == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid note.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing note: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", note_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( note, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing note: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, note_index, _LIBCSTRING_SYSTEM_STRING( "Note" ), 4, export_path, export_path_length, ¬e_path, ¬e_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create note directory.", function ); goto on_error; } if( note_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid note directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, note, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, note_path, note_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export note item values.\n" ); } } result = export_handle_create_item_file( export_handle, note_path, note_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Note.txt" ), 8, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create note file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping note file it already exists.\n" ); memory_free( note_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, note, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Note:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } /* TODO determine the note properties */ result = libpff_message_get_plain_text_body_size( note, &plain_text_body_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body size.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "\nBody:\n" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, note, plain_text_body_size, item_file, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export plain text message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export plain text message body.\n" ); } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } /* TODO what about other types of message bodies */ if( export_handle_export_recipients( export_handle, note, note_path, note_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { /* Export the attachments */ if( export_handle_export_attachments( export_handle, note, note_path, note_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( note_path ); return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( note_path != NULL ) { memory_free( note_path ); } return( -1 ); } /* Exports the RSS feed * Returns 1 if successful or -1 on error */ int export_handle_export_rss_feed( export_handle_t *export_handle, libpff_item_t *rss_feed, int rss_feed_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *rss_feed_path = NULL; static char *function = "export_handle_export_rss_feed"; size_t plain_text_body_size = 0; size_t rss_feed_path_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( rss_feed == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid RSS feed.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing RSS feed: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", rss_feed_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( rss_feed, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing RSS feed: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, rss_feed_index, _LIBCSTRING_SYSTEM_STRING( "Feed" ), 4, export_path, export_path_length, &rss_feed_path, &rss_feed_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create RSS feed directory.", function ); goto on_error; } if( rss_feed_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid RSS feed directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, rss_feed, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, rss_feed_path, rss_feed_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export RSS feed item values.\n" ); } } result = export_handle_create_item_file( export_handle, rss_feed_path, rss_feed_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Feed.txt" ), 8, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create RSS feed file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping RSS feed file it already exists.\n" ); memory_free( rss_feed_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, rss_feed, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "RSS feed:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } /* TODO determine the RSS feed properties */ result = libpff_message_get_plain_text_body_size( rss_feed, &plain_text_body_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body size.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "\nBody:\n" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, rss_feed, plain_text_body_size, item_file, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export plain text message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export plain text message body.\n" ); } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } /* TODO what about other types of message bodies */ if( export_handle_export_message_body( export_handle, rss_feed, rss_feed_path, rss_feed_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export message body.\n" ); } if( export_handle_export_recipients( export_handle, rss_feed, rss_feed_path, rss_feed_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { if( export_handle_export_attachments( export_handle, rss_feed, rss_feed_path, rss_feed_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( rss_feed_path ); return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( rss_feed_path != NULL ) { memory_free( rss_feed_path ); } return( -1 ); } /* Exports the task * Returns 1 if successful or -1 on error */ int export_handle_export_task( export_handle_t *export_handle, libpff_item_t *task, int task_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { item_file_t *item_file = NULL; libcstring_system_character_t *task_path = NULL; static char *function = "export_handle_export_task"; size_t plain_text_body_size = 0; size_t task_path_size = 0; uint32_t identifier = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( task == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid task.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing task: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", task_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( task, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing task: %" PRIu32 "\n", function, identifier ); } } if( export_handle_create_default_item_directory( export_handle, task_index, _LIBCSTRING_SYSTEM_STRING( "Task" ), 4, export_path, export_path_length, &task_path, &task_path_size, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable create task directory.", function ); goto on_error; } if( task_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid task directory path.", function ); goto on_error; } if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, task, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, task_path, task_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export task item values.\n" ); } } result = export_handle_create_item_file( export_handle, task_path, task_path_size - 1, _LIBCSTRING_SYSTEM_STRING( "Task.txt" ), 8, &item_file, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create item file.", function ); goto on_error; } else if( result == 0 ) { log_handle_printf( log_handle, "Skipping task file it already exists.\n" ); memory_free( task_path ); return( 1 ); } if( export_handle_export_message_header_to_item_file( export_handle, task, item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to export message header.", function ); goto on_error; } if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "Task:" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_START_DATE, _LIBCSTRING_SYSTEM_STRING( "Start date:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write start date.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_DUE_DATE, _LIBCSTRING_SYSTEM_STRING( "Due date:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write due date.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } /* TODO print human readable string */ if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_STATUS, _LIBCSTRING_SYSTEM_STRING( "Status:\t\t\t\t" ), ITEM_FILE_FORMAT_FLAG_HEXADECIMAL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write status.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_PERCENTAGE_COMPLETE, _LIBCSTRING_SYSTEM_STRING( "Percentage complete:\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write percentage complete.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_ACTUAL_EFFORT, _LIBCSTRING_SYSTEM_STRING( "Actual effort:\t\t\t\t" ), ITEM_FILE_FORMAT_FLAG_DURATION_IN_MINUTES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write actual effort.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_TOTAL_EFFORT, _LIBCSTRING_SYSTEM_STRING( "Total effort:\t\t\t\t" ), ITEM_FILE_FORMAT_FLAG_DURATION_IN_MINUTES, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write total effort.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_IS_COMPLETE, _LIBCSTRING_SYSTEM_STRING( "Is complete:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write is complete.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } if( item_file_write_item_value( item_file, task, 0, LIBPFF_ENTRY_TYPE_TASK_VERSION, _LIBCSTRING_SYSTEM_STRING( "Version:\t\t\t\t" ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write version.", function ); #if defined( HAVE_DEBUG_OUTPUT ) if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } #endif libcerror_error_free( error ); } result = libpff_message_get_plain_text_body_size( task, &plain_text_body_size, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve plain text body size.", function ); if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); } else if( result != 0 ) { if( item_file_write_value_description( item_file, _LIBCSTRING_SYSTEM_STRING( "\nBody:\n" ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to write string.", function ); goto on_error; } if( export_handle_export_message_body_plain_text_to_item_file( export_handle, task, plain_text_body_size, item_file, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export plain text message body.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export plain text message body.\n" ); } } if( item_file_close( item_file, error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_CLOSE_FAILED, "%s: unable to close item file.", function ); goto on_error; } if( item_file_free( &item_file, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free item file.", function ); goto on_error; } /* TODO what about other types of message bodies */ if( export_handle_export_recipients( export_handle, task, task_path, task_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recipients.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recipients.\n" ); } if( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) { if( export_handle_export_attachments( export_handle, task, task_path, task_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export attachments.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export attachments.\n" ); } } memory_free( task_path ); task_path = NULL; return( 1 ); on_error: if( item_file != NULL ) { item_file_free( &item_file, NULL ); } if( task_path != NULL ) { memory_free( task_path ); } return( -1 ); } /* Exports the folder * Returns 1 if successful or -1 on error */ int export_handle_export_folder( export_handle_t *export_handle, libpff_item_t *folder, int folder_index, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libcstring_system_character_t *folder_name = NULL; libcstring_system_character_t *target_path = NULL; static char *function = "export_handle_export_folder"; size_t folder_name_size = 0; size_t target_path_size = 0; uint32_t identifier = 0; int print_count = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } log_handle_printf( log_handle, "Processing folder: %05d in path: %" PRIs_LIBCSTRING_SYSTEM "%c\n", folder_index, export_path, LIBCPATH_SEPARATOR ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_item_get_identifier( folder, &identifier, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve identifier.", function ); goto on_error; } if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: processing folder: %" PRIu32 "\n", function, identifier ); } } /* Create the folder directory */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_folder_get_utf16_name_size( folder, &folder_name_size, NULL ); #else result = libpff_folder_get_utf8_name_size( folder, &folder_name_size, NULL ); #endif if( result == 1 ) { if( folder_name_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: folder name size value exceeds maximum.", function ); goto on_error; } } if( folder_name_size < 12 ) { folder_name_size = 12; } folder_name = libcstring_system_string_allocate( folder_name_size ); if( folder_name == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create folder name.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libpff_folder_get_utf16_name( folder, (uint16_t *) folder_name, folder_name_size, NULL ); #else result = libpff_folder_get_utf8_name( folder, (uint8_t *) folder_name, folder_name_size, NULL ); #endif if( result == 1 ) { folder_name_size = 1 + libcstring_system_string_length( folder_name ); if( folder_name_size > 1 ) { log_handle_printf( log_handle, "Folder name: %" PRIs_LIBCSTRING_SYSTEM "\n", folder_name ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_sanitize_filename_wide( folder_name, &folder_name_size, error ); #else result = libcpath_path_sanitize_filename( folder_name, &folder_name_size, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable sanitize folder name.", function ); goto on_error; } } else { result = 0; } } if( result != 1 ) { print_count = libcstring_system_string_sprintf( folder_name, 12, _LIBCSTRING_SYSTEM_STRING( "Folder%05d" ), folder_index + 1 ); if( ( print_count < 0 ) || ( print_count > 12 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set folder name.", function ); goto on_error; } folder_name[ 11 ] = 0; folder_name_size = 12; log_handle_printf( log_handle, "Missing folder name defaulting to: %" PRIs_LIBCSTRING_SYSTEM "\n", folder_name ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &target_path, &target_path_size, export_path, export_path_length, folder_name, folder_name_size - 1, error ); #else result = libcpath_path_join( &target_path, &target_path_size, export_path, export_path_length, folder_name, folder_name_size - 1, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create target path.", function ); goto on_error; } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcfile_file_exists_wide( target_path, error ); #else result = libcfile_file_exists( target_path, error ); #endif if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_GENERIC, "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.", function, target_path ); goto on_error; } else if( result != 0 ) { memory_free( target_path ); target_path = NULL; print_count = libcstring_system_string_sprintf( folder_name, 12, _LIBCSTRING_SYSTEM_STRING( "Folder%05d" ), folder_index + 1 ); if( ( print_count < 0 ) || ( print_count > 12 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set folder name.", function ); goto on_error; } folder_name[ 11 ] = 0; folder_name_size = 12; log_handle_printf( log_handle, "Folder already exists defaulting to: %" PRIs_LIBCSTRING_SYSTEM "\n", folder_name ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) result = libcpath_path_join_wide( &target_path, &target_path_size, export_path, export_path_length, folder_name, folder_name_size - 1, error ); #else result = libcpath_path_join( &target_path, &target_path_size, export_path, export_path_length, folder_name, folder_name_size - 1, error ); #endif if( result != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create target path.", function ); goto on_error; } } memory_free( folder_name ); folder_name = NULL; #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( target_path, error ) != 1 ) #else if( libcpath_path_make_directory( target_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, target_path ); goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", target_path ); if( export_handle->dump_item_values != 0 ) { if( export_handle_export_item_values( export_handle, folder, _LIBCSTRING_SYSTEM_STRING( "ItemValues.txt" ), 14, target_path, target_path_size - 1, log_handle, error ) != 1 ) { if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export item values.\n", function ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export folder item values.\n" ); } #if defined( HAVE_DEBUG_OUTPUT ) /* Export the folder unknowns */ if( export_handle_export_unknowns( export_handle, folder, error ) != 1 ) { libcerror_error_free( error ); } #endif /* Export the folder sub items */ if( export_handle_export_sub_items( export_handle, folder, target_path, target_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_OUTPUT, LIBCERROR_OUTPUT_ERROR_GENERIC, "%s: unable to export sub items.", function ); goto on_error; } } else { /* Export the folder sub folders */ if( export_handle_export_sub_folders( export_handle, folder, target_path, target_path_size - 1, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export sub folders.\n" ); libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_OUTPUT, LIBCERROR_OUTPUT_ERROR_GENERIC, "%s: unable to export sub folders.", function ); log_handle_printf( log_handle, "Unable to export sub folders.\n" ); goto on_error; } /* Export the folder sub messages */ if( export_handle_export_sub_messages( export_handle, folder, target_path, target_path_size - 1, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export sub messages.\n" ); libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_OUTPUT, LIBCERROR_OUTPUT_ERROR_GENERIC, "%s: unable to export sub messages.", function ); log_handle_printf( log_handle, "Unable to export sub messages.\n" ); goto on_error; } /* TODO add support for sub associated contents, ignore them for now */ } memory_free( target_path ); target_path = NULL; return( 1 ); on_error: if( target_path != NULL ) { memory_free( target_path ); } if( folder_name != NULL ) { memory_free( folder_name ); } return( -1 ); } /* Exports the sub folders * Returns 1 if successful or -1 on error */ int export_handle_export_sub_folders( export_handle_t *export_handle, libpff_item_t *folder, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *sub_folder = NULL; static char *function = "export_handle_export_sub_folders"; int number_of_sub_folders = 0; int sub_folder_iterator = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } if( libpff_folder_get_number_of_sub_folders( folder, &number_of_sub_folders, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub folders.", function ); return( -1 ); } for( sub_folder_iterator = 0; sub_folder_iterator < number_of_sub_folders; sub_folder_iterator++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libpff_folder_get_sub_folder( folder, sub_folder_iterator, &sub_folder, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub folder: %d.", function, sub_folder_iterator + 1 ); return( -1 ); } if( export_handle_export_folder( export_handle, sub_folder, sub_folder_iterator, export_path, export_path_length, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export sub folder %d out of %d.\n", sub_folder_iterator + 1, number_of_sub_folders ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export sub folder: %d.\n", function, sub_folder_iterator + 1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export sub folder: %d.\n", sub_folder_iterator + 1 ); } if( libpff_item_free( &sub_folder, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub folder: %d.", function, sub_folder_iterator + 1 ); return( -1 ); } } return( 1 ); } /* Exports the sub messages * Returns 1 if successful or -1 on error */ int export_handle_export_sub_messages( export_handle_t *export_handle, libpff_item_t *folder, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *sub_message = NULL; static char *function = "export_handle_export_sub_messages"; int number_of_sub_messages = 0; int sub_message_iterator = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } if( libpff_folder_get_number_of_sub_messages( folder, &number_of_sub_messages, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub messages.", function ); return( -1 ); } for( sub_message_iterator = 0; sub_message_iterator < number_of_sub_messages; sub_message_iterator++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libpff_folder_get_sub_message( folder, sub_message_iterator, &sub_message, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub message: %d out of %d.", function, sub_message_iterator + 1, number_of_sub_messages ); return( -1 ); } if( export_handle_export_item( export_handle, sub_message, sub_message_iterator, number_of_sub_messages, export_path, export_path_length, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export sub message %d out of %d.\n", sub_message_iterator + 1, number_of_sub_messages ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export sub message: %d.\n", function, sub_message_iterator + 1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export sub message: %d.\n", sub_message_iterator + 1 ); } if( libpff_item_free( &sub_message, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free sub message: %d.", function, sub_message_iterator + 1 ); return( -1 ); } } return( 1 ); } /* Exports the unknowns to a separate file * Returns 1 if successful or -1 on error */ int export_handle_export_unknowns( export_handle_t *export_handle, libpff_item_t *folder, libcerror_error_t **error ) { libpff_item_t *unknowns = NULL; static char *function = "export_handle_export_unknowns"; int number_of_unknowns = 0; int unknown_iterator = 0; int result = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( folder == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid folder.", function ); return( -1 ); } /* Export the unknowns */ result = libpff_folder_get_unknowns( folder, &unknowns, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve unknowns.", function ); return( -1 ); } else if( result == 1 ) { if( libpff_item_get_number_of_sets( unknowns, (uint32_t *) &number_of_unknowns, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to get number of unknowns.", function ); libpff_item_free( &unknowns, NULL ); return( -1 ); } if( number_of_unknowns > 0 ) { for( unknown_iterator = 0; unknown_iterator < number_of_unknowns; unknown_iterator++ ) { } } if( libpff_item_free( &unknowns, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free unknowns.", function ); return( -1 ); } } return( 1 ); } /* Exports the items * Returns 1 if successful or -1 on error */ int export_handle_export_items( export_handle_t *export_handle, libpff_file_t *file, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *pff_root_item = NULL; static char *function = "export_handle_export_items"; int number_of_sub_items = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } fprintf( export_handle->notify_stream, "Exporting items.\n" ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( export_path, error ) != 1 ) #else if( libcpath_path_make_directory( export_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, export_path ); goto on_error; } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", export_path ); if( export_handle->export_mode == EXPORT_MODE_DEBUG ) { if( libpff_file_get_root_item( file, &pff_root_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root item.", function ); goto on_error; } } else { if( libpff_file_get_root_folder( file, &pff_root_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve root folder.", function ); goto on_error; } } if( libpff_item_get_number_of_sub_items( pff_root_item, &number_of_sub_items, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of sub items.", function ); goto on_error; } if( number_of_sub_items > 0 ) { if( export_handle_export_sub_items( export_handle, pff_root_item, export_path, export_path_length, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_OUTPUT, LIBCERROR_OUTPUT_ERROR_GENERIC, "%s: unable to export root item.", function ); goto on_error; } if( libpff_item_free( &pff_root_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root item.", function ); goto on_error; } fprintf( export_handle->notify_stream, "\n" ); } return( 1 ); on_error: if( pff_root_item != NULL ) { libpff_item_free( &pff_root_item, NULL ); } return( -1 ); } /* Exports the orphan items * Returns 1 if successful or -1 on error */ int export_handle_export_orphan_items( export_handle_t *export_handle, libpff_file_t *file, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *pff_orphan_item = NULL; static char *function = "export_handle_export_orphan_items"; int orphan_item_iterator = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } if( libpff_file_get_number_of_orphan_items( file, &( export_handle->number_of_orphan_items ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of orphan items.", function ); return( -1 ); } if( export_handle->number_of_orphan_items > 0 ) { fprintf( export_handle->notify_stream, "Exporting orphan items.\n" ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( export_path, error ) != 1 ) #else if( libcpath_path_make_directory( export_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, export_path ); return( -1 ); } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", export_path ); for( orphan_item_iterator = 0; orphan_item_iterator < export_handle->number_of_orphan_items; orphan_item_iterator++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libpff_file_get_orphan_item( file, orphan_item_iterator, &pff_orphan_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve orphan item: %d.", function, orphan_item_iterator + 1 ); return( -1 ); } if( pff_orphan_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid orphan item: %d.", function, orphan_item_iterator + 1 ); return( -1 ); } if( export_handle_export_item( export_handle, pff_orphan_item, orphan_item_iterator, export_handle->number_of_orphan_items, export_path, export_path_length, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export orphan item %d out of %d.\n", orphan_item_iterator + 1, export_handle->number_of_orphan_items ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export orphan item: %d.\n", function, orphan_item_iterator + 1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export orphan item: %d.\n", orphan_item_iterator + 1 ); } else { export_handle->number_of_exported_orphan_items++; } if( libpff_item_free( &pff_orphan_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: nable to free orphan item: %d.", function, orphan_item_iterator + 1 ); return( -1 ); } } fprintf( export_handle->notify_stream, "\n" ); } return( 1 ); } /* Exports the recovered items * Returns 1 if successful or -1 on error */ int export_handle_export_recovered_items( export_handle_t *export_handle, libpff_file_t *file, const libcstring_system_character_t *export_path, size_t export_path_length, log_handle_t *log_handle, libcerror_error_t **error ) { libpff_item_t *pff_recovered_item = NULL; static char *function = "export_handle_export_recovered_items"; int recovered_item_iterator = 0; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( export_path == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export path.", function ); return( -1 ); } if( libpff_file_get_number_of_recovered_items( file, &( export_handle->number_of_recovered_items ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of recovered items.", function ); return( -1 ); } if( export_handle->number_of_recovered_items > 0 ) { fprintf( export_handle->notify_stream, "Exporting recovered items.\n" ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libcpath_path_make_directory_wide( export_path, error ) != 1 ) #else if( libcpath_path_make_directory( export_path, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_WRITE_FAILED, "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".", function, export_path ); return( -1 ); } log_handle_printf( log_handle, "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n", export_path ); for( recovered_item_iterator = 0; recovered_item_iterator < export_handle->number_of_recovered_items; recovered_item_iterator++ ) { if( export_handle->abort != 0 ) { return( -1 ); } if( libpff_file_get_recovered_item( file, recovered_item_iterator, &pff_recovered_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve recovered item: %d.", function, recovered_item_iterator + 1 ); return( -1 ); } if( pff_recovered_item == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid recovered item: %d.", function, recovered_item_iterator + 1 ); return( -1 ); } if( export_handle_export_item( export_handle, pff_recovered_item, recovered_item_iterator, export_handle->number_of_recovered_items, export_path, export_path_length, log_handle, error ) != 1 ) { fprintf( export_handle->notify_stream, "Unable to export recovered item %d out of %d.\n", recovered_item_iterator + 1, export_handle->number_of_recovered_items ); if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: unable to export recovered item: %d.\n", function, recovered_item_iterator + 1 ); } if( ( error != NULL ) && ( *error != NULL ) ) { libcnotify_print_error_backtrace( *error ); } libcerror_error_free( error ); log_handle_printf( log_handle, "Unable to export recovered item: %d.\n", recovered_item_iterator + 1 ); } else { export_handle->number_of_exported_recovered_items++; } if( libpff_item_free( &pff_recovered_item, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: nable to free recovered item: %d.", function, recovered_item_iterator + 1 ); return( -1 ); } } fprintf( export_handle->notify_stream, "\n" ); } return( 1 ); } /* Exports the items in the file according to the export mode * Returns 1 if successful or -1 on error */ int export_handle_export_file( export_handle_t *export_handle, libpff_file_t *file, log_handle_t *log_handle, libcerror_error_t **error ) { static char *function = "export_handle_export_file"; if( export_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid export handle.", function ); return( -1 ); } if( file == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid file.", function ); return( -1 ); } if( ( export_handle->export_mode != EXPORT_MODE_DEBUG ) && ( export_handle->export_mode != EXPORT_MODE_ITEMS ) && ( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) ) { fprintf( export_handle->notify_stream, "Recovering items.\n" ); /* TODO set recovery flags somewhere */ if( libpff_file_recover_items( file, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to recover items.", function ); return( -1 ); } } if( export_handle->export_mode != EXPORT_MODE_RECOVERED ) { if( export_handle->abort != 0 ) { export_handle->abort = 0; return( -1 ); } if( export_handle_export_items( export_handle, file, export_handle->items_export_path, export_handle->items_export_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export items.", function ); return( -1 ); } } if( ( export_handle->export_mode != EXPORT_MODE_DEBUG ) && ( export_handle->export_mode != EXPORT_MODE_ITEMS ) && ( export_handle->export_mode != EXPORT_MODE_ITEMS_NO_ATTACHMENTS ) ) { if( export_handle->abort != 0 ) { export_handle->abort = 0; return( -1 ); } if( export_handle_export_orphan_items( export_handle, file, export_handle->orphans_export_path, export_handle->orphans_export_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export orphan items.", function ); return( -1 ); } if( export_handle->abort != 0 ) { export_handle->abort = 0; return( -1 ); } if( export_handle_export_recovered_items( export_handle, file, export_handle->recovered_export_path, export_handle->recovered_export_path_size - 1, log_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GENERIC, "%s: unable to export recovered items.", function ); return( -1 ); } } if( export_handle->abort != 0 ) { export_handle->abort = 0; } return( 1 ); } libpff-20120802/pfftools/info_handle.h0000644000175000017500000000477012005155310014410 00000000000000/* * Info handle * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _INFO_HANDLE_H ) #define _INFO_HANDLE_H #include #include #include #include "pfftools_libcerror.h" #include "pfftools_libcstring.h" #include "pfftools_libpff.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct info_handle info_handle_t; struct info_handle { /* The libpff input file */ libpff_file_t *input_file; /* The libpff root item */ libpff_item_t *root_item; /* The ascii codepage */ int ascii_codepage; /* The nofication output stream */ FILE *notify_stream; }; int info_handle_initialize( info_handle_t **info_handle, libcerror_error_t **error ); int info_handle_free( info_handle_t **info_handle, libcerror_error_t **error ); int info_handle_signal_abort( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_set_ascii_codepage( info_handle_t *info_handle, const libcstring_system_character_t *string, libcerror_error_t **error ); int info_handle_open_input( info_handle_t *info_handle, const libcstring_system_character_t *filename, libcerror_error_t **error ); int info_handle_close( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_file_fprint( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_message_store_fprint( info_handle_t *info_handle, libcerror_error_t **error ); int info_handle_item_fprint( info_handle_t *info_handle, libpff_item_t *item, int indentation_level, libcerror_error_t **error ); int info_handle_unallocated_blocks_fprint( info_handle_t *info_handle, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pfftools/item_file.h0000644000175000017500000001034712005155310014074 00000000000000/* * Item file * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _ITEM_FILE_H ) #define _ITEM_FILE_H #include #include #include #include "pfftools_libcerror.h" #include "pfftools_libcfile.h" #include "pfftools_libcstring.h" #include "pfftools_libfdatetime.h" #include "pfftools_libfguid.h" #include "pfftools_libpff.h" #if defined( __cplusplus ) extern "C" { #endif enum ITEM_FILE_FORMAT_FLAGS { ITEM_FILE_FORMAT_FLAG_HEXADECIMAL = 0x00000001UL, ITEM_FILE_FORMAT_FLAG_DURATION_IN_MINUTES = 0x00000002UL, }; typedef struct item_file item_file_t; struct item_file { /* The file handle */ libcfile_file_t *file_handle; }; int item_file_initialize( item_file_t **item_file, libcerror_error_t **error ); int item_file_free( item_file_t **item_file, libcerror_error_t **error ); int item_file_open( item_file_t *item_file, const libcstring_system_character_t *filename, libcerror_error_t **error ); int item_file_close( item_file_t *item_file, libcerror_error_t **error ); int item_file_write_buffer( item_file_t *item_file, const uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); int item_file_write_buffer_as_hexdump( item_file_t *item_file, const uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); int item_file_write_integer_32bit_as_decimal( item_file_t *item_file, uint32_t value_32bit, libcerror_error_t **error ); int item_file_write_integer_32bit_as_hexadecimal( item_file_t *item_file, uint32_t value_32bit, libcerror_error_t **error ); int item_file_write_floating_point( item_file_t *item_file, double floating_point, libcerror_error_t **error ); int item_file_write_string( item_file_t *item_file, const libcstring_system_character_t *string, size_t string_length, libcerror_error_t **error ); int item_file_write_new_line( item_file_t *item_file, libcerror_error_t **error ); int item_file_write_filetime( item_file_t *item_file, libfdatetime_filetime_t *filetime, libcerror_error_t **error ); int item_file_write_guid( item_file_t *item_file, libfguid_identifier_t *guid, libcerror_error_t **error ); int item_file_write_value_description( item_file_t *item_file, const libcstring_system_character_t *description, libcerror_error_t **error ); int item_file_write_value_integer_32bit_as_decimal( item_file_t *item_file, const libcstring_system_character_t *description, uint32_t value_32bit, libcerror_error_t **error ); int item_file_write_value_integer_32bit_as_hexadecimal( item_file_t *item_file, const libcstring_system_character_t *description, uint32_t value_32bit, libcerror_error_t **error ); int item_file_write_value_string( item_file_t *item_file, const libcstring_system_character_t *description, const libcstring_system_character_t *string, size_t string_length, libcerror_error_t **error ); int item_file_write_value_filetime( item_file_t *item_file, const libcstring_system_character_t *description, libfdatetime_filetime_t *filetime, libcerror_error_t **error ); int item_file_write_item_value( item_file_t *item_file, libpff_item_t *item, int set_index, uint32_t entry_type, const libcstring_system_character_t *description, uint32_t format_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pfftools/pfftools_libcnotify.h0000644000175000017500000000254312005155310016214 00000000000000/* * The internal libcnotify header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCNOTIFY_H ) #define _PFFTOOLS_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/Makefile.in0000664000175000017500000007054612006536016014053 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = pffexport$(EXEEXT) pffinfo$(EXEEXT) subdir = pfftools DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_pffexport_OBJECTS = export_handle.$(OBJEXT) item_file.$(OBJEXT) \ log_handle.$(OBJEXT) pffexport.$(OBJEXT) pffinput.$(OBJEXT) \ pffoutput.$(OBJEXT) pffexport_OBJECTS = $(am_pffexport_OBJECTS) pffexport_DEPENDENCIES = ../libpff/libpff.la am_pffinfo_OBJECTS = info_handle.$(OBJEXT) pffinfo.$(OBJEXT) \ pffinput.$(OBJEXT) pffoutput.$(OBJEXT) pffinfo_OBJECTS = $(am_pffinfo_OBJECTS) pffinfo_DEPENDENCIES = ../libpff/libpff.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(pffexport_SOURCES) $(pffinfo_SOURCES) DIST_SOURCES = $(pffexport_SOURCES) $(pffinfo_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBCSPLIT_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @LIBFDATA_CPPFLAGS@ \ @LIBFDATETIME_CPPFLAGS@ \ @LIBFGUID_CPPFLAGS@ \ @LIBFVALUE_CPPFLAGS@ \ @LIBFWNT_CPPFLAGS@ \ @LIBFMAPI_CPPFLAGS@ \ @LIBCSYSTEM_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ \ @LIBPFF_DLL_IMPORT@ AM_LDFLAGS = @STATIC_LDFLAGS@ pffexport_SOURCES = \ export_handle.c export_handle.h \ item_file.c item_file.h \ log_handle.c log_handle.h \ pffexport.c \ pffinput.c pffinput.h \ pfftools_libcerror.h \ pfftools_libclocale.h \ pfftools_libcnotify.h \ pfftools_libcfile.h \ pfftools_libcpath.h \ pfftools_libcsplit.h \ pfftools_libcstring.h \ pfftools_libcsystem.h \ pfftools_libfdatetime.h \ pfftools_libfguid.h \ pfftools_libfvalue.h \ pfftools_libpff.h \ pffoutput.c pffoutput.h pffexport_LDADD = \ @LIBCSYSTEM_LIBADD@ \ @LIBFMAPI_LIBADD@ \ @LIBFVALUE_LIBADD@ \ @LIBFWNT_LIBADD@ \ @LIBFGUID_LIBADD@ \ @LIBFDATETIME_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ ../libpff/libpff.la \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCSTRING_LIBADD@ \ @LIBINTL@ \ @MEMWATCH_LIBADD@ pffinfo_SOURCES = \ info_handle.c info_handle.h \ pffinfo.c \ pffinput.c pffinput.h \ pfftools_libcerror.h \ pfftools_libclocale.h \ pfftools_libcnotify.h \ pfftools_libcstring.h \ pfftools_libcsystem.h \ pfftools_libpff.h \ pffoutput.c pffoutput.h pffinfo_LDADD = \ @LIBCSYSTEM_LIBADD@ \ @LIBCPATH_LIBADD@ \ @LIBCFILE_LIBADD@ \ @LIBUNA_LIBADD@ \ ../libpff/libpff.la \ @LIBCSPLIT_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCSTRING_LIBADD@ \ @LIBINTL@ \ @MEMWATCH_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pfftools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pfftools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list pffexport$(EXEEXT): $(pffexport_OBJECTS) $(pffexport_DEPENDENCIES) @rm -f pffexport$(EXEEXT) $(LINK) $(pffexport_OBJECTS) $(pffexport_LDADD) $(LIBS) pffinfo$(EXEEXT): $(pffinfo_OBJECTS) $(pffinfo_DEPENDENCIES) @rm -f pffinfo$(EXEEXT) $(LINK) $(pffinfo_OBJECTS) $(pffinfo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/item_file.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_handle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pffexport.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pffinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pffinput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pffoutput.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on pffexport ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(pffexport_SOURCES) @echo "Running splint on pffinfo ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(pffinfo_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/pfftools/pffinput.h0000644000175000017500000000231512005155310013766 00000000000000/* * Common input functions for the pfftools * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFINPUT_H ) #define _PFFINPUT_H #include #include #include "pfftools_libcerror.h" #include "pfftools_libcstring.h" #if defined( __cplusplus ) extern "C" { #endif int pffinput_determine_export_format( const libcstring_system_character_t *string, int *export_format, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/pfftools/pffexport.c0000644000175000017500000003462612005155310014155 00000000000000/* * Extracts items from a Personal Folder File (OST, PAB and PST) * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_UNISTD_H ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "export_handle.h" #include "log_handle.h" #include "pffinput.h" #include "pffoutput.h" #include "pfftools_libcerror.h" #include "pfftools_libclocale.h" #include "pfftools_libcnotify.h" #include "pfftools_libcpath.h" #include "pfftools_libcstring.h" #include "pfftools_libcsystem.h" #include "pfftools_libpff.h" export_handle_t *pffexport_export_handle = NULL; libpff_file_t *pffexport_file = NULL; int pffexport_abort = 0; /* Prints the executable usage information */ void usage_fprint( FILE *stream ) { if( stream == NULL ) { return; } fprintf( stream, "Use pffexport to export items stored in a Personal Folder File (OST, PAB\n" "and PST).\n\n" ); fprintf( stream, "Usage: pffexport [ -c codepage ] [ -f format ] [ -l logfile ] [ -m mode ]\n" " [ -t target ] [ -dhqvV ] source\n\n" ); fprintf( stream, "\tsource: the source file\n\n" ); fprintf( stream, "\t-c: codepage of ASCII strings, options: ascii, windows-1250,\n" "\t windows-1251, windows-1252 (default), windows-1253,\n" "\t windows-1254, windows-1255, windows-1256, windows-1257\n" "\t or windows-1258\n" ); fprintf( stream, "\t-d: dumps the item values in a separate file: ItemValues.txt\n" ); fprintf( stream, "\t-f: preferred output format, options: all, html, rtf,\n" "\t text (default)\n" ); fprintf( stream, "\t-h: shows this help\n" ); fprintf( stream, "\t-l: logs information about the exported items\n" ); fprintf( stream, "\t-m: export mode, option: all, debug, items (default), recovered.\n" "\t 'all' exports the (allocated) items, orphan and recovered\n" "\t items. 'debug' exports all the (allocated) items, also those\n" "\t outside the the root folder. 'items' exports the (allocated)\n" "\t items. 'recovered' exports the orphan and recovered items.\n" ); fprintf( stream, "\t-q: quiet shows minimal status information\n" ); fprintf( stream, "\t-t: specify the basename of the target directory to export to\n" "\t (default is the source filename) pffexport will add the\n" "\t following suffixes to the basename: .export, .orphans,\n" "\t .recovered\n" ); fprintf( stream, "\t-v: verbose output to stderr\n" ); fprintf( stream, "\t-V: print version\n" ); } /* Signal handler for pffexport */ void pffexport_signal_handler( libcsystem_signal_t signal LIBCSYSTEM_ATTRIBUTE_UNUSED ) { libcerror_error_t *error = NULL; static char *function = "pffexport_signal_handler"; LIBCSYSTEM_UNREFERENCED_PARAMETER( signal ) pffexport_abort = 1; if( pffexport_export_handle != NULL ) { if( export_handle_signal_abort( pffexport_export_handle, &error ) != 1 ) { libcnotify_printf( "%s: unable to signal export handle to abort.\n", function ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } } if( pffexport_file != NULL ) { if( libpff_file_signal_abort( pffexport_file, &error ) != 1 ) { libcnotify_printf( "%s: unable to signal file to abort.\n", function ); libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } } /* Force stdin to close otherwise any function reading it will remain blocked */ if( libcsystem_file_io_close( 0 ) != 0 ) { libcnotify_printf( "%s: unable to close stdin.\n", function ); } } /* The main program */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) int wmain( int argc, wchar_t * const argv[] ) #else int main( int argc, char * const argv[] ) #endif { libcerror_error_t *error = NULL; log_handle_t *log_handle = NULL; libcstring_system_character_t *log_filename = NULL; libcstring_system_character_t *option_ascii_codepage = NULL; libcstring_system_character_t *option_export_mode = NULL; libcstring_system_character_t *option_preferred_export_format = NULL; libcstring_system_character_t *option_target_path = NULL; libcstring_system_character_t *path_separator = NULL; libcstring_system_character_t *source = NULL; char *program = "pffexport"; size_t source_length = 0; libcstring_system_integer_t option = 0; uint8_t dump_item_values = 0; uint8_t print_status_information = 1; int result = 0; int verbose = 0; libcnotify_stream_set( stderr, NULL ); libcnotify_verbose_set( 1 ); if( libclocale_initialize( "pfftools", &error ) != 1 ) { fprintf( stderr, "Unable to initialize locale values.\n" ); goto on_error; } if( libcsystem_initialize( _IONBF, &error ) != 1 ) { fprintf( stderr, "Unable to initialize system values.\n" ); goto on_error; } pffoutput_version_fprint( stdout, program ); while( ( option = libcsystem_getopt( argc, argv, _LIBCSTRING_SYSTEM_STRING( "c:df:hl:m:qt:vV" ) ) ) != (libcstring_system_integer_t) -1 ) { switch( option ) { case (libcstring_system_integer_t) '?': default: fprintf( stderr, "Invalid argument: %" PRIs_LIBCSTRING_SYSTEM "\n", argv[ optind - 1 ] ); usage_fprint( stdout ); return( EXIT_FAILURE ); case (libcstring_system_integer_t) 'c': option_ascii_codepage = optarg; break; case (libcstring_system_integer_t) 'd': dump_item_values = 1; break; case (libcstring_system_integer_t) 'f': option_preferred_export_format = optarg; break; case (libcstring_system_integer_t) 'h': usage_fprint( stdout ); return( EXIT_SUCCESS ); case (libcstring_system_integer_t) 'l': log_filename = optarg; break; case (libcstring_system_integer_t) 'm': option_export_mode = optarg; break; case (libcstring_system_integer_t) 'q': print_status_information = 0; break; case (libcstring_system_integer_t) 't': option_target_path = optarg; break; case (libcstring_system_integer_t) 'v': verbose = 1; break; case (libcstring_system_integer_t) 'V': pffoutput_copyright_fprint( stdout ); return( EXIT_SUCCESS ); } } if( optind == argc ) { fprintf( stderr, "Missing source file.\n" ); usage_fprint( stdout ); return( EXIT_FAILURE ); } source = argv[ optind ]; if( option_target_path == NULL ) { source_length = libcstring_system_string_length( source ); path_separator = libcstring_system_string_search_character_reverse( source, (libcstring_system_character_t) LIBCPATH_SEPARATOR, source_length ); if( path_separator == NULL ) { path_separator = source; } else { path_separator++; } option_target_path = path_separator; } libcnotify_verbose_set( verbose ); libpff_notify_set_stream( stderr, NULL ); libpff_notify_set_verbose( verbose ); if( export_handle_initialize( &pffexport_export_handle, &error ) != 1 ) { fprintf( stderr, "Unable to create export handle.\n" ); goto on_error; } pffexport_export_handle->print_status_information = print_status_information; if( option_export_mode != NULL ) { result = export_handle_set_export_mode( pffexport_export_handle, option_export_mode, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set export mode.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "Unsupported export mode defaulting to: items.\n" ); } } pffexport_export_handle->dump_item_values = dump_item_values; if( option_preferred_export_format != NULL ) { result = export_handle_set_preferred_export_format( pffexport_export_handle, option_preferred_export_format, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set preferred export format.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "Unsupported preferred export format defaulting to: text.\n" ); } } if( option_ascii_codepage != NULL ) { result = export_handle_set_ascii_codepage( pffexport_export_handle, option_ascii_codepage, &error ); if( result == -1 ) { fprintf( stderr, "Unable to set ASCII codepage in export handle.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "Unsupported ASCII codepage defaulting to: windows-1252.\n" ); } } if( export_handle_set_target_path( pffexport_export_handle, option_target_path, &error ) != 1 ) { fprintf( stderr, "Unable to set target path.\n" ); goto on_error; } result = export_handle_create_items_export_path( pffexport_export_handle, &error ); if( result == -1 ) { fprintf( stderr, "Unable to create items export path.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "%" PRIs_LIBCSTRING_SYSTEM " already exists.\n", pffexport_export_handle->items_export_path ); goto on_error; } result = export_handle_create_orphans_export_path( pffexport_export_handle, &error ); if( result == -1 ) { fprintf( stderr, "Unable to create orphans export path.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "%" PRIs_LIBCSTRING_SYSTEM " already exists.\n", pffexport_export_handle->orphans_export_path ); goto on_error; } result = export_handle_create_recovered_export_path( pffexport_export_handle, &error ); if( result == -1 ) { fprintf( stderr, "Unable to create recovered export path.\n" ); goto on_error; } else if( result == 0 ) { fprintf( stderr, "%" PRIs_LIBCSTRING_SYSTEM " already exists.\n", pffexport_export_handle->recovered_export_path ); goto on_error; } if( log_handle_initialize( &log_handle, &error ) != 1 ) { fprintf( stderr, "Unable to create log handle.\n" ); goto on_error; } if( log_handle_open( log_handle, log_filename, &error ) != 1 ) { fprintf( stderr, "Unable to open log file: %" PRIs_LIBCSTRING_SYSTEM ".\n", log_filename ); goto on_error; } if( libpff_file_initialize( &pffexport_file, &error ) != 1 ) { fprintf( stderr, "Unable to create file.\n" ); goto on_error; } if( libpff_file_set_ascii_codepage( pffexport_file, pffexport_export_handle->ascii_codepage, &error ) != 1 ) { fprintf( stderr, "Unable to set ASCII codepage.\n" ); goto on_error; } if( libcsystem_signal_attach( pffexport_signal_handler, &error ) != 1 ) { fprintf( stderr, "Unable to attach signal handler.\n" ); goto on_error; } fprintf( stdout, "Opening file.\n" ); #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( libpff_file_open_wide( pffexport_file, source, LIBPFF_OPEN_READ, &error ) != 1 ) #else if( libpff_file_open( pffexport_file, source, LIBPFF_OPEN_READ, &error ) != 1 ) #endif { fprintf( stderr, "Error opening file: %" PRIs_LIBCSTRING_SYSTEM ".\n", source ); goto on_error; } if( export_handle_export_file( pffexport_export_handle, pffexport_file, log_handle, &error ) != 1 ) { fprintf( stderr, "Unable to export file.\n" ); goto on_error; } if( libpff_file_close( pffexport_file, &error ) != 0 ) { fprintf( stderr, "Unable to close file.\n" ); goto on_error; } if( libcsystem_signal_detach( &error ) != 1 ) { fprintf( stderr, "Unable to detach signal handler.\n" ); goto on_error; } if( libpff_file_free( &pffexport_file, &error ) != 1 ) { fprintf( stderr, "Unable to free file.\n" ); goto on_error; } if( log_handle_close( log_handle, &error ) != 0 ) { fprintf( stderr, "Unable to close log file.\n" ); goto on_error; } if( log_handle_free( &log_handle, &error ) != 1 ) { fprintf( stderr, "Unable to free log handle.\n" ); goto on_error; } if( export_handle_free( &pffexport_export_handle, &error ) != 1 ) { fprintf( stderr, "Unable to free export handle.\n" ); goto on_error; } if( pffexport_abort != 0 ) { fprintf( stdout, "Export aborted.\n" ); return( EXIT_FAILURE ); } fprintf( stdout, "Export completed.\n" ); return( EXIT_SUCCESS ); on_error: if( error != NULL ) { libcnotify_print_error_backtrace( error ); libcerror_error_free( &error ); } if( pffexport_file != NULL ) { libpff_file_close( pffexport_file, NULL ); libpff_file_free( &pffexport_file, NULL ); } if( log_handle != NULL ) { log_handle_close( log_handle, NULL ); log_handle_free( &log_handle, NULL ); } if( pffexport_export_handle != NULL ) { export_handle_free( &pffexport_export_handle, NULL ); } return( EXIT_FAILURE ); } libpff-20120802/pfftools/pfftools_libfdatetime.h0000644000175000017500000000310512005155310016476 00000000000000/* * The internal libfdatetime header * * Copyright (C) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBFDATETIME_H ) #define _PFFTOOLS_LIBFDATETIME_H #include /* Define HAVE_LOCAL_LIBFDATETIME for local use of libfdatetime */ #if defined( HAVE_LOCAL_LIBFDATETIME ) #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBFDATETIME_DLL_IMPORT * before including libfdatetime.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFDATETIME_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/pfftools_libcsystem.h0000644000175000017500000000313512005155310016226 00000000000000/* * Library for system independent implementation of functionality * for programs * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCSYSTEM_H ) #define _PFFTOOLS_LIBCSYSTEM_H /* Define HAVE_LOCAL_LIBCSYSTEM for local use of libcsystem */ #if defined( HAVE_LOCAL_LIBCSYSTEM ) #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSYSTEM_DLL_IMPORT * before including libcsystem.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSYSTEM_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/pfftools_libcsplit.h0000644000175000017500000000266412005156640016052 00000000000000/* * The internal libcsplit header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCSPLIT_H ) #define _PFFTOOLS_LIBCSPLIT_H #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if defined( HAVE_LOCAL_LIBCSPLIT ) #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSPLIT_DLL_IMPORT * before including libcsplit.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSPLIT_DLL_IMPORT #endif #include #endif #endif libpff-20120802/pfftools/pfftools_libclocale.h0000644000175000017500000000254612005155310016146 00000000000000/* * The internal libclocale header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _PFFTOOLS_LIBCLOCALE_H ) #define _PFFTOOLS_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/depcomp0000755000175000017500000004426712006536016011526 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: libpff-20120802/po/0000775000175000017500000000000012006536214010634 500000000000000libpff-20120802/po/en@quot.header0000644000175000017500000000226311502470475013350 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # libpff-20120802/po/Rules-quot0000644000175000017500000000337611502470476012575 00000000000000# Special Makefile rules for English message catalogs with quotation marks. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot .SUFFIXES: .insert-header .po-update-en en@quot.po-create: $(MAKE) en@quot.po-update en@boldquot.po-create: $(MAKE) en@boldquot.po-update en@quot.po-update: en@quot.po-update-en en@boldquot.po-update: en@boldquot.po-update-en .insert-header.po-update-en: @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ ll=`echo $$lang | sed -e 's/@.*//'`; \ LC_ALL=C; export LC_ALL; \ cd $(srcdir); \ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "creation of $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi en@quot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header en@boldquot.insert-header: insert-header.sin sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header mostlyclean: mostlyclean-quot mostlyclean-quot: rm -f *.insert-header libpff-20120802/po/POTFILES.in0000644000175000017500000000007311502470476012336 00000000000000# List of source files which contain translatable strings. libpff-20120802/po/remove-potcdate.sin0000644000175000017500000000066011502470476014374 00000000000000# Sed script that remove the POT-Creation-Date line in the header entry # from a POT file. # # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ x # Test if the hold space is empty. s/P/P/ ta # Yes it was empty. First occurrence. Remove the line. g d bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } libpff-20120802/po/Makevars.in0000644000175000017500000000342011502470633012654 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = @PACKAGE@ # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Joachim Metz # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = @PACKAGE_BUGREPORT@ # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = libpff-20120802/po/ChangeLog0000644000175000017500000000071611502470476012337 000000000000002010-12-16 gettextize * Makefile.in.in: New file, from gettext-0.17. * boldquot.sed: New file, from gettext-0.17. * en@boldquot.header: New file, from gettext-0.17. * en@quot.header: New file, from gettext-0.17. * insert-header.sin: New file, from gettext-0.17. * quot.sed: New file, from gettext-0.17. * remove-potcdate.sin: New file, from gettext-0.17. * Rules-quot: New file, from gettext-0.17. * POTFILES.in: New file. libpff-20120802/po/en@boldquot.header0000644000175000017500000000247111502470475014212 00000000000000# All this catalog "translates" are quotation characters. # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). # It also translates pairs of apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019) # and pairs of quotation mark (0x22) to # left double quotation mark (U+201C) and right double quotation mark (U+201D). # # When output to an UTF-8 terminal, the quotation characters appear perfectly. # When output to an ISO-8859-1 terminal, the single quotation marks are # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to # grave/acute accent (by libiconv), and the double quotation marks are # transliterated to 0x22. # When output to an ASCII terminal, the single quotation marks are # transliterated to apostrophes, and the double quotation marks are # transliterated to 0x22. # # This catalog furthermore displays the text between the quotation marks in # bold face, assuming the VT100/XTerm escape sequences. # libpff-20120802/po/quot.sed0000644000175000017500000000023111502470475012241 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g libpff-20120802/po/Makevars0000664000175000017500000000342012006536126012251 00000000000000# Makefile variables for PO directory in any package using GNU gettext. # Usually the message domain is the same as the package name. DOMAIN = libpff # These two variables depend on the location of this directory. subdir = po top_builddir = .. # These options get passed to xgettext. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding # package. (Note that the msgstr strings, extracted from the package's # sources, belong to the copyright holder of the package.) Translators are # expected to transfer the copyright for their translations to this person # or entity, or to disclaim their copyright. The empty string stands for # the public domain; in this case the translators are expected to disclaim # their copyright. COPYRIGHT_HOLDER = Joachim Metz # This is the email address or URL to which the translators shall report # bugs in the untranslated strings: # - Strings which are not entire sentences, see the maintainer guidelines # in the GNU gettext documentation, section 'Preparing Strings'. # - Strings which use unclear terms or require additional context to be # understood. # - Strings which make invalid assumptions about notation of date, time or # money. # - Pluralisation problems. # - Incorrect English spelling. # - Incorrect formatting. # It can be your email address, or a mailing list address where translators # can write to without being subscribed, or the URL of a web page through # which the translators can contact you. MSGID_BUGS_ADDRESS = joachim.metz@gmail.com # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = libpff-20120802/po/insert-header.sin0000644000175000017500000000124011502470475014022 00000000000000# Sed script that inserts the file called HEADER before the header entry. # # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following # occurrences is achieved by looking at the hold space. /^msgid /{ x # Test if the hold space is empty. s/m/m/ ta # Yes it was empty. First occurrence. Read the file. r HEADER # Output the file's contents by reading the next line. But don't lose the # current line while doing this. g N bb :a # The hold space was nonempty. Following occurrences. Do nothing. x :b } libpff-20120802/po/Makefile.in.in0000644000175000017500000003552411502470475013243 00000000000000# Makefile for PO directory in any package using GNU gettext. # Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public # License but which still want to provide support for the GNU gettext # functionality. # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # # Origin: gettext-0.17 GETTEXT_MACRO_VERSION = 0.17 PACKAGE = @PACKAGE@ VERSION = @VERSION@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ localedir = @localedir@ gettextsrcdir = $(datadir)/gettext/po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ # We use $(mkdir_p). # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions, # @install_sh@ does not start with $(SHELL), so we add it. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake # versions, $(mkinstalldirs) and $(install_sh) are unused. mkinstalldirs = $(SHELL) @install_sh@ -d install_sh = $(SHELL) @install_sh@ MKDIR_P = @MKDIR_P@ mkdir_p = @mkdir_p@ GMSGFMT_ = @GMSGFMT@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) MSGFMT_ = @MSGFMT@ MSGFMT_no = @MSGFMT@ MSGFMT_yes = @MSGFMT_015@ MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) MSGMERGE = msgmerge MSGMERGE_UPDATE = @MSGMERGE@ --update MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter POFILES = @POFILES@ GMOFILES = @GMOFILES@ UPDATEPOFILES = @UPDATEPOFILES@ DUMMYPOFILES = @DUMMYPOFILES@ DISTFILES.common = Makefile.in.in remove-potcdate.sin \ $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \ $(POFILES) $(GMOFILES) \ $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) POTFILES = \ CATALOGS = @CATALOGS@ # Makevars gets inserted here. (Don't remove this line!) .SUFFIXES: .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po.mo: @echo "$(MSGFMT) -c -o $@ $<"; \ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ all: check-macro-version all-@USE_NLS@ all-yes: stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. check-macro-version: @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. # In this case, stamp-po is a nop (i.e. a phony target). # stamp-po is a timestamp denoting the last time at which the CATALOGS have # been loosely updated. Its purpose is that when a developer or translator # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent # invocations of "make" will do nothing. This timestamp would not be necessary # if updating the $(CATALOGS) would always touch them; however, the rule for # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ echo "touch stamp-po" && \ echo timestamp > stamp-poT && \ mv stamp-poT stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', # otherwise packages like GCC can not be built if only parts of the source # have been downloaded. # This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ fi; \ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \ else \ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \ fi; \ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_gnu}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ else \ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ else \ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ fi; \ } # This rule has no dependencies: we don't need to update $(DOMAIN).pot at # every "make" invocation, only create it when it is missing. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update. $(srcdir)/$(DOMAIN).pot: $(MAKE) $(DOMAIN).pot-update # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ else \ $(MAKE) $${lang}.po-create; \ fi install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ for file in $(DISTFILES.common) Makevars.template; do \ $(INSTALL_DATA) $(srcdir)/$$file \ $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ for file in Makevars; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ fi; \ done; \ done install-strip: install installdirs: installdirs-exec installdirs-data installdirs-exec: installdirs-data: installdirs-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \ else \ : ; \ fi installdirs-data-no: installdirs-data-yes: $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ dir=$(localedir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $(DESTDIR)$$dir; \ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ if test -n "$$lc"; then \ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ for file in *; do \ if test -f $$file; then \ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ fi; \ done); \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ else \ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ :; \ else \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ fi; \ fi; \ fi; \ done; \ done # Define this as empty until I found a useful application. installcheck: uninstall: uninstall-exec uninstall-data uninstall-exec: uninstall-data: uninstall-data-@USE_NLS@ if test "$(PACKAGE)" = "gettext-tools"; then \ for file in $(DISTFILES.common) Makevars.template; do \ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ done; \ else \ : ; \ fi uninstall-data-no: uninstall-data-yes: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ done; \ done check: all info dvi ps pdf html tags TAGS ctags CTAGS ID: mostlyclean: rm -f remove-potcdate.sed rm -f stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(MAKE) update-po @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. dist2: stamp-po $(DISTFILES) dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ fi; \ for i in 0 1 2 3 4 5 6 7 8 9; do \ if test -f $(srcdir)/ChangeLog.$$i; then \ dists="$$dists ChangeLog.$$i"; \ fi; \ done; \ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ for file in $$dists; do \ if test -f $$file; then \ cp -p $$file $(distdir) || exit 1; \ else \ cp -p $(srcdir)/$$file $(distdir) || exit 1; \ fi; \ done update-po: Makefile $(MAKE) $(DOMAIN).pot-update test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) $(MAKE) update-gmo # General rule for creating PO files. .nop.po-create: @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \ exit 1 # General rule for updating PO files. .nop.po-update: @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$lang.po failed!" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ fi $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @: Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ && $(SHELL) ./config.status $(subdir)/$@.in po-directories force: # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/po/boldquot.sed0000644000175000017500000000033111502470475013103 00000000000000s/"\([^"]*\)"/“\1”/g s/`\([^`']*\)'/‘\1’/g s/ '\([^`']*\)' / ‘\1’ /g s/ '\([^`']*\)'$/ ‘\1’/g s/^'\([^`']*\)' /‘\1’ /g s/“”/""/g s/“/“/g s/”/”/g s/‘/‘/g s/’/’/g libpff-20120802/libcsystem/0000775000175000017500000000000012006536213012373 500000000000000libpff-20120802/libcsystem/libcsystem_i18n.h0000644000175000017500000000210211753473742015511 00000000000000/* * Internationalization (i18n) functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_I18N_H ) #define _LIBCSYSTEM_I18N_H #include #if defined( HAVE_LIBINTL_H ) #include #endif #include #define _( string ) \ gettext( string ) #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_libcnotify.h0000644000175000017500000000255511753473742017110 00000000000000/* * The internal libcnotify header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_LIBCNOTIFY_H ) #define _LIBCSYSTEM_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsystem/libcsystem_libcerror.h0000644000175000017500000000253511753473742016727 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_LIBCERROR_H ) #define _LIBCSYSTEM_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsystem/libcsystem_string.c0000644000175000017500000003726011753473742016250 00000000000000/* * Character string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcsystem_libcerror.h" #include "libcsystem_libclocale.h" #include "libcsystem_libcstring.h" #include "libcsystem_libuna.h" #include "libcsystem_string.h" /* Copies a string of a decimal value from a 64-bit value * Returns 1 if successful or -1 on error */ int libcsystem_string_decimal_copy_from_64_bit( libcstring_system_character_t *string, size_t string_size, size_t *string_index, uint64_t value_64bit, libcerror_error_t **error ) { static char *function = "libcsystem_string_decimal_copy_from_64_bit"; uint64_t divider = 0; uint8_t number_of_characters = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( string_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string index.", function ); return( -1 ); } if( *string_index >= string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string index value out of bounds.", function ); return( -1 ); } divider = 1; number_of_characters = 1; while( ( value_64bit / divider ) >= 10 ) { divider *= 10; number_of_characters += 1; } if( ( *string_index + number_of_characters ) >= string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: string size too small.", function ); return( -1 ); } while( divider > 1 ) { string[ *string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit / divider ); *string_index += 1; value_64bit %= divider; divider /= 10; } string[ *string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit / divider ); *string_index += 1; return( 1 ); } /* Copies a string of a decimal value to a 16-bit value * Returns 1 if successful or -1 on error */ int libcsystem_string_decimal_copy_to_64_bit( const libcstring_system_character_t *string, size_t string_size, uint64_t *value_64bit, libcerror_error_t **error ) { static char *function = "libcsystem_string_decimal_copy_to_64_bit"; size_t string_index = 0; libcstring_system_character_t character_value = 0; uint8_t maximum_string_index = 20; int8_t sign = 1; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( value_64bit == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value 64-bit.", function ); return( -1 ); } *value_64bit = 0; if( string[ string_index ] == (libcstring_system_character_t) '-' ) { string_index++; maximum_string_index++; sign = -1; } else if( string[ string_index ] == (libcstring_system_character_t) '+' ) { string_index++; maximum_string_index++; } while( string_index < string_size ) { if( string[ string_index ] == 0 ) { break; } if( string_index > (size_t) maximum_string_index ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE, "%s: string too large.", function ); return( -1 ); } *value_64bit *= 10; if( ( string[ string_index ] >= (libcstring_system_character_t) '0' ) && ( string[ string_index ] <= (libcstring_system_character_t) '9' ) ) { character_value = (libcstring_system_character_t) ( string[ string_index ] - (libcstring_system_character_t) '0' ); } else { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: unsupported character value: %" PRIc_LIBCSTRING_SYSTEM " at index: %d.", function, string[ string_index ], string_index ); return( -1 ); } *value_64bit += character_value; string_index++; } if( sign == -1 ) { *value_64bit *= (uint64_t) -1; } return( 1 ); } /* Determines the system string size from the UTF-8 string * Returns 1 if successful or -1 on error */ int libcsystem_string_size_from_utf8_string( const uint8_t *utf8_string, size_t utf8_string_size, size_t *string_size, libcerror_error_t **error ) { static char *function = "libcsystem_string_size_from_utf8_string"; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if SIZEOF_WCHAR_T == 4 if( libuna_utf32_string_size_from_utf8( (libuna_utf8_character_t *) utf8_string, utf8_string_size, string_size, error ) != 1 ) #elif SIZEOF_WCHAR_T == 2 if( libuna_utf16_string_size_from_utf8( (libuna_utf8_character_t *) utf8_string, utf8_string_size, string_size, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine string size.", function ); return( -1 ); } #else if( libclocale_codepage == 0 ) { *string_size = 1 + libcstring_narrow_string_length( (char *) utf8_string ); } else if( libuna_byte_stream_size_from_utf8( (libuna_utf8_character_t *) utf8_string, utf8_string_size, libclocale_codepage, string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine string size.", function ); return( -1 ); } #endif return( 1 ); } /* Copies the system string size from the UTF-8 string * Returns 1 if successful or -1 on error */ int libcsystem_string_copy_from_utf8_string( libcstring_system_character_t *string, size_t string_size, const uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libcsystem_string_copy_from_utf8_string"; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if SIZEOF_WCHAR_T == 4 if( libuna_utf32_string_copy_from_utf8( (libuna_utf32_character_t *) string, string_size, (libuna_utf8_character_t *) utf8_string, utf8_string_size, error ) != 1 ) #elif SIZEOF_WCHAR_T == 2 if( libuna_utf16_string_copy_from_utf8( (libuna_utf16_character_t *) string, string_size, (libuna_utf8_character_t *) utf8_string, utf8_string_size, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set string.", function ); return( -1 ); } #else if( libclocale_codepage == 0 ) { if( string_size < utf8_string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: string too small.", function ); return( -1 ); } if( memory_copy( string, utf8_string, utf8_string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set string.", function ); return( -1 ); } } else if( libuna_byte_stream_copy_from_utf8( (uint8_t *) string, string_size, libclocale_codepage, (libuna_utf8_character_t *) utf8_string, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set string.", function ); return( -1 ); } #endif return( 1 ); } /* Determines the UTF-8 string size from the system string * Returns 1 if successful or -1 on error */ int libcsystem_string_size_to_utf8_string( const libcstring_system_character_t *string, size_t string_size, size_t *utf8_string_size, libcerror_error_t **error ) { static char *function = "libcsystem_string_size_to_utf8_string"; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( utf8_string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string size.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if SIZEOF_WCHAR_T == 4 if( libuna_utf8_string_size_from_utf32( (libuna_utf32_character_t *) string, string_size, utf8_string_size, error ) != 1 ) #elif SIZEOF_WCHAR_T == 2 if( libuna_utf8_string_size_from_utf16( (libuna_utf16_character_t *) string, string_size, utf8_string_size, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine UTF-8 string size.", function ); return( -1 ); } #else if( libclocale_codepage == 0 ) { *utf8_string_size = 1 + libcstring_system_string_length( string ); } else if( libuna_utf8_string_size_from_byte_stream( (uint8_t *) string, string_size, libclocale_codepage, utf8_string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to determine UTF-8 string size.", function ); return( -1 ); } #endif return( 1 ); } /* Copies the UTF-8 string size from the system string * Returns 1 if successful or -1 on error */ int libcsystem_string_copy_to_utf8_string( const libcstring_system_character_t *string, size_t string_size, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ) { static char *function = "libcsystem_string_copy_to_utf8_string"; if( utf8_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid UTF-8 string.", function ); return( -1 ); } if( utf8_string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid UTF-8 string size value exceeds maximum.", function ); return( -1 ); } if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if SIZEOF_WCHAR_T == 4 if( libuna_utf8_string_copy_from_utf32( (libuna_utf8_character_t *) utf8_string, utf8_string_size, (libuna_utf32_character_t *) string, string_size, error ) != 1 ) #elif SIZEOF_WCHAR_T == 2 if( libuna_utf8_string_copy_from_utf16( (libuna_utf8_character_t *) utf8_string, utf8_string_size, (libuna_utf16_character_t *) string, string_size, error ) != 1 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); return( -1 ); } #else if( libclocale_codepage == 0 ) { if( utf8_string_size < string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: UTF-8 string too small.", function ); return( -1 ); } if( memory_copy( utf8_string, string, string_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set string.", function ); return( -1 ); } } else if( libuna_utf8_string_copy_from_byte_stream( (libuna_utf8_character_t *) utf8_string, utf8_string_size, (uint8_t *) string, string_size, libclocale_codepage, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_CONVERSION, LIBCERROR_CONVERSION_ERROR_GENERIC, "%s: unable to set UTF-8 string.", function ); return( -1 ); } #endif return( 1 ); } libpff-20120802/libcsystem/libcsystem_support.c0000644000175000017500000000402411753473742016446 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsystem_libcerror.h" #include "libcsystem_libcstring.h" #include "libcsystem_support.h" /* Initializes the system values * Returns 1 if successful or -1 on error */ int libcsystem_initialize( int stdio_mode, libcerror_error_t **error ) { static char *function = "libcsystem_initialize"; if( ( stdio_mode != _IOFBF ) && ( stdio_mode != _IOLBF ) && ( stdio_mode != _IONBF ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported standard IO mode.", function ); return( -1 ); } #if !defined( __BORLANDC__ ) if( setvbuf( stdout, NULL, stdio_mode, 0 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set IO mode of stdout.", function ); return( -1 ); } if( setvbuf( stderr, NULL, stdio_mode, 0 ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set IO mode of stderr.", function ); return( -1 ); } #endif /* !defined( __BORLANDC__ ) */ return( 1 ); } libpff-20120802/libcsystem/libcsystem_support.h0000644000175000017500000000215711753473742016460 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_SUPPORT_H ) #define _LIBCSYSTEM_SUPPORT_H #include #include #include "libcsystem_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif int libcsystem_initialize( int stdio_mode, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/Makefile.am0000644000175000017500000000233711753473742014371 00000000000000if HAVE_LOCAL_LIBCSYSTEM AM_CPPFLAGS = \ -DLOCALEDIR=\"$(datadir)/locale\" \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcsystem.la libcsystem_la_SOURCES = \ libcsystem_date_time.c libcsystem_date_time.h \ libcsystem_definitions.h \ libcsystem_find.h \ libcsystem_file_io.h \ libcsystem_file_stream.h \ libcsystem_getopt.c libcsystem_getopt.h \ libcsystem_glob.c libcsystem_glob.h \ libcsystem_i18n.h \ libcsystem_libcstring.h \ libcsystem_libcerror.h \ libcsystem_libclocale.h \ libcsystem_libcnotify.h \ libcsystem_libuna.h \ libcsystem_signal.c libcsystem_signal.h \ libcsystem_string.c libcsystem_string.h \ libcsystem_support.c libcsystem_support.h \ libcsystem_unused.h libcsystem_la_LIBADD = \ @LIBCSTRING_LIBADD@ \ @LIBCERROR_LIBADD@ \ @LIBCLOCALE_LIBADD@ \ @LIBCNOTIFY_LIBADD@ \ @LIBUNA_LIBADD@ endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcsystem ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsystem_la_SOURCES) libpff-20120802/libcsystem/libcsystem_glob.c0000644000175000017500000003037211753473742015662 00000000000000/* * Globbing functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_ERRNO_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_IO_H ) || defined( WINAPI ) #include #endif #include "libcsystem_find.h" #include "libcsystem_glob.h" #include "libcsystem_libcerror.h" #include "libcsystem_libcstring.h" /* TODO rename */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( _MSC_VER ) #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \ _wmakepath_s( path, path_size, drive, directory, filename, extension ) #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \ _wsplitpath_s( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) #else #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \ _wmakepath( path, drive, directory, filename, extension ) #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \ _wsplitpath( path, drive, directory, filename, extension ) #endif #else #if defined( _MSC_VER ) #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \ _makepath_s( path, path_size, drive, directory, filename, extension ) #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \ _splitpath_s( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) #else #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \ _makepath( path, drive, directory, filename, extension ) #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \ _splitpath( path, drive, directory, filename, extension ) #endif #endif #if !defined( LIBCSYSTEM_HAVE_GLOB ) /* Initializes a new glob * Returns 1 if successful or -1 on error */ int libcsystem_glob_initialize( libcsystem_glob_t **glob, libcerror_error_t **error ) { static char *function = "libcsystem_glob_initialize"; if( glob == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid glob.", function ); return( -1 ); } if( *glob != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid glob value already set.", function ); return( -1 ); } *glob = memory_allocate_structure( libcsystem_glob_t ); if( *glob == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create glob.", function ); goto on_error; } if( memory_set( *glob, 0, sizeof( libcsystem_glob_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear glob.", function ); goto on_error; } return( 1 ); on_error: if( *glob != NULL ) { memory_free( *glob ); *glob = NULL; } return( -1 ); } /* Frees memory of a glob * Returns 1 if successful or -1 on error */ int libcsystem_glob_free( libcsystem_glob_t **glob, libcerror_error_t **error ) { static char *function = "libcsystem_glob_free"; int result_iterator = 0; if( glob == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid glob.", function ); return( -1 ); } if( *glob != NULL ) { if( ( *glob )->result != NULL ) { for( result_iterator = 0; result_iterator < ( *glob )->number_of_results; result_iterator++ ) { if( ( *glob )->result[ result_iterator ] != NULL ) { memory_free( ( *glob )->result[ result_iterator ] ); } } memory_free( ( *glob )->result ); } memory_free( *glob ); *glob = NULL; } return( 1 ); } /* Resizes the glob * Returns 1 if successful or -1 on error */ int libcsystem_glob_resize( libcsystem_glob_t *glob, int new_number_of_results, libcerror_error_t **error ) { void *reallocation = NULL; static char *function = "libcsystem_glob_resize"; size_t previous_size = 0; size_t new_size = 0; if( glob == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid glob.", function ); return( -1 ); } if( glob->number_of_results >= new_number_of_results ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: new number of results less equal than current.", function ); return( -1 ); } previous_size = sizeof( libcstring_system_character_t * ) * glob->number_of_results; new_size = sizeof( libcstring_system_character_t * ) * new_number_of_results; if( ( previous_size > (size_t) SSIZE_MAX ) || ( new_size > (size_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( glob->result, new_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to reallocate glob results.", function ); return( -1 ); } glob->result = (libcstring_system_character_t **) reallocation; if( memory_set( &( glob->result[ glob->number_of_results ] ), 0, new_size - previous_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear glob.", function ); return( -1 ); } glob->number_of_results = new_number_of_results; return( 1 ); } /* Resolves filenames with wildcards (globs) * Returns the number of results if successful or -1 on error */ int libcsystem_glob_resolve( libcsystem_glob_t *glob, libcstring_system_character_t * const patterns[], int number_of_patterns, libcerror_error_t **error ) { #if defined( HAVE_IO_H ) || defined( WINAPI ) libcsystem_find_data_t find_data; libcstring_system_character_t find_path[ _MAX_PATH ]; libcstring_system_character_t find_drive[ _MAX_DRIVE ]; libcstring_system_character_t find_directory[ _MAX_DIR ]; libcstring_system_character_t find_name[ _MAX_FNAME ]; libcstring_system_character_t find_extension[ _MAX_EXT ]; intptr_t find_handle = 0; #endif static char *function = "libcsystem_glob_resolve"; size_t find_path_length = 0; int globs_found = 0; int iterator = 0; if( glob == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid glob.", function ); return( -1 ); } for( iterator = 0; iterator < number_of_patterns; iterator++ ) { if( patterns[ iterator ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing pattern value.", function ); return( -1 ); } #if defined( _MSC_VER ) if( libcsystem_path_split( patterns[ iterator ], find_drive, _MAX_DRIVE, find_directory, _MAX_DIR, find_name, _MAX_FNAME, find_extension, _MAX_EXT ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to split path.", function ); return( -1 ); } #else libcsystem_path_split( patterns[ iterator ], find_drive, _MAX_DRIVE, find_directory, _MAX_DIR, find_name, _MAX_FNAME, find_extension, _MAX_EXT ); #endif find_handle = libcsystem_find_first( patterns[ iterator ], &find_data ); if( find_handle != -1 ) { do { if( libcsystem_glob_resize( glob, glob->number_of_results + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize glob.", function ); return( -1 ); } #if defined( _MSC_VER ) if( libcsystem_path_make( find_path, _MAX_PATH, find_drive, find_directory, find_data.name, _LIBCSTRING_SYSTEM_STRING( "" ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to make path.", function ); return( -1 ); } #elif defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 libcsystem_path_make( find_path, _MAX_PATH, find_drive, find_directory, find_data.ff_name, _LIBCSTRING_SYSTEM_STRING( "" ) ); #else libcsystem_path_make( find_path, _MAX_PATH, find_drive, find_directory, find_data.name, _LIBCSTRING_SYSTEM_STRING( "" ) ); #endif find_path_length = libcstring_system_string_length( find_path ); glob->result[ glob->number_of_results - 1 ] = libcstring_system_string_allocate( find_path_length + 1 ); if( glob->result[ glob->number_of_results - 1 ] == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create glob result.", function ); return( -1 ); } if( libcstring_system_string_copy( glob->result[ glob->number_of_results - 1 ], find_path, find_path_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set glob result.", function ); memory_free( glob->result[ glob->number_of_results - 1 ] ); glob->result[ glob->number_of_results - 1 ] = NULL; return( -1 ); } ( glob->result[ glob->number_of_results - 1 ] )[ find_path_length ] = 0; globs_found++; if( globs_found > (int32_t) UINT16_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: too many globs found.", function ); return( -1 ); } } while( libcsystem_find_next( find_handle, &find_data ) == 0 ); if( errno != ENOENT ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: error finding next file entry.", function ); return( -1 ); } if( libcsystem_find_close( find_handle ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: error closing find handle.", function ); return( -1 ); } } else if( errno != ENOENT ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: error finding file entry.", function ); return( -1 ); } } return( 1 ); } #endif libpff-20120802/libcsystem/libcsystem_file_io.h0000644000175000017500000000716311753473742016354 00000000000000/* * File IO functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_FILE_IO_H ) #define _LIBCSYSTEM_FILE_IO_H #include #include #if defined( HAVE_SYS_STAT_H ) || defined( WINAPI ) #include #endif #if defined( HAVE_FCNTL_H ) || defined( WINAPI ) #include #endif #if defined( WINAPI ) #include #elif defined( HAVE_UNISTD_H ) #include #endif #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define LIBCSYSTEM_FILE_IO_O_CREAT _O_CREAT #define LIBCSYSTEM_FILE_IO_O_RDONLY _O_RDONLY #define LIBCSYSTEM_FILE_IO_O_RDWR _O_RDWR #define LIBCSYSTEM_FILE_IO_O_WRONLY _O_WRONLY #define LIBCSYSTEM_FILE_IO_O_TRUNC _O_TRUNC #else #define LIBCSYSTEM_FILE_IO_O_CREAT O_CREAT #define LIBCSYSTEM_FILE_IO_O_RDONLY O_RDONLY #define LIBCSYSTEM_FILE_IO_O_RDWR O_RDWR #define LIBCSYSTEM_FILE_IO_O_WRONLY O_WRONLY #define LIBCSYSTEM_FILE_IO_O_TRUNC O_TRUNC #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_open( filename, flags ) \ _open( filename, flags ) #elif defined( HAVE_OPEN ) #define libcsystem_file_io_open( filename, flags ) \ open( filename, flags, 0644 ) #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_wopen( filename, flags ) \ _wopen( filename, flags ) #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_close( file_descriptor ) \ _close( file_descriptor ) #elif defined( HAVE_CLOSE ) #define libcsystem_file_io_close( file_descriptor ) \ close( file_descriptor ) #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_read( file_descriptor, buffer, size ) \ _read( file_descriptor, (void *) buffer, (unsigned int) size ) #elif defined( HAVE_READ ) #define libcsystem_file_io_read( file_descriptor, buffer, size ) \ read( file_descriptor, (void *) buffer, size ) #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_lseek( file_descriptor, offset, whence ) \ _lseeki64( file_descriptor, offset, whence ) #elif defined( HAVE_LSEEK ) #define libcsystem_file_io_lseek( file_descriptor, offset, whence ) \ lseek( file_descriptor, offset, whence ) #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_resize( file_descriptor, size ) \ _chsize( file_descriptor, (long) size ) #elif defined( HAVE_FTRUNCATE ) #define libcsystem_file_io_resize( file_descriptor, size ) \ ftruncate( file_descriptor, (off_t) size ) #endif #if defined( WINAPI ) && !defined( __CYGWIN__ ) #define libcsystem_file_io_write( file_descriptor, buffer, size ) \ _write( file_descriptor, (const void *) buffer, (unsigned int) size ) #elif defined( HAVE_WRITE ) #define libcsystem_file_io_write( file_descriptor, buffer, size ) \ write( file_descriptor, (const void *) buffer, size ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_string.h0000644000175000017500000000433211753473742016247 00000000000000/* * System character string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_STRING_H ) #define _LIBCSYSTEM_STRING_H #include #include #include "libcsystem_libcerror.h" #include "libcsystem_libcstring.h" #if defined( __cplusplus ) extern "C" { #endif int libcsystem_string_decimal_copy_from_64_bit( libcstring_system_character_t *string, size_t string_size, size_t *string_index, uint64_t value_64bit, libcerror_error_t **error ); int libcsystem_string_decimal_copy_to_64_bit( const libcstring_system_character_t *string, size_t string_size, uint64_t *value_64bit, libcerror_error_t **error ); int libcsystem_string_size_from_utf8_string( const uint8_t *utf8_string, size_t utf8_string_size, size_t *string_size, libcerror_error_t **error ); int libcsystem_string_copy_from_utf8_string( libcstring_system_character_t *string, size_t string_size, const uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); int libcsystem_string_size_to_utf8_string( const libcstring_system_character_t *string, size_t string_size, size_t *utf8_string_size, libcerror_error_t **error ); int libcsystem_string_copy_to_utf8_string( const libcstring_system_character_t *string, size_t string_size, uint8_t *utf8_string, size_t utf8_string_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_libuna.h0000644000175000017500000000315511753473742016215 00000000000000/* * The internal libuna header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_LIBUNA_H ) #define _LIBCSYSTEM_LIBUNA_H #include /* Define HAVE_LOCAL_LIBUNA for local use of libuna */ #if defined( HAVE_LOCAL_LIBUNA ) #include #include #include #include #include #include #include #include #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT * before including libuna.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBUNA_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsystem/libcsystem_libclocale.h0000644000175000017500000000256011753473742017033 00000000000000/* * The internal libclocale header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_LIBCLOCALE_H ) #define _LIBCSYSTEM_LIBCLOCALE_H #include /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale */ #if defined( HAVE_LOCAL_LIBCLOCALE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT * before including libclocale.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCLOCALE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsystem/libcsystem_find.h0000644000175000017500000000636411753473742015670 00000000000000/* * Find functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_FIND_H ) #define _LIBCSYSTEM_FIND_H #include #include #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #include #elif defined( HAVE_IO_H ) || defined( WINAPI ) #include #endif #include "libcsystem_string.h" #if defined( __cplusplus ) extern "C" { #endif /* The find data structure type */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #define libcsystem_find_data_t struct _wffblk #else #define libcsystem_find_data_t struct _wfinddata_t #endif #else #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #define libcsystem_find_data_t struct ffblk #else #define libcsystem_find_data_t struct _finddata_t #endif #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ /* The find first function */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( __BORLANDC__ ) #if __BORLANDC__ <= 0x0520 #define libcsystem_find_first( filter, fileinfo ) \ _wfindfirst( filter, fileinfo, 0 ) #else #define libcsystem_find_first( filter, fileinfo ) \ __wfindfirst( filter, fileinfo ) #endif #else #define libcsystem_find_first( filter, fileinfo ) \ _wfindfirst( filter, fileinfo ) #endif #else #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #define libcsystem_find_first( filter, fileinfo ) \ findfirst( filter, fileinfo, 0 ) #else #define libcsystem_find_first( filter, fileinfo ) \ _findfirst( filter, fileinfo ) #endif #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ /* The find next function */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #if defined( __BORLANDC__ ) #if __BORLANDC__ <= 0x0520 #define libcsystem_find_next( handle, fileinfo ) \ _wfindnext( fileinfo ) #else #define libcsystem_find_next( handle, fileinfo ) \ __wfindnext( handle, fileinfo ) #endif #else #define libcsystem_find_next( handle, fileinfo ) \ _wfindnext( handle, fileinfo ) #endif #else #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #define libcsystem_find_next( handle, fileinfo ) \ findnext( fileinfo ) #else #define libcsystem_find_next( handle, fileinfo ) \ _findnext( handle, fileinfo ) #endif #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */ /* The find close function */ #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520 #define libcsystem_find_close( handle ) \ 0 #else #define libcsystem_find_close( handle ) \ _findclose( handle ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_getopt.h0000644000175000017500000000346611753473742016252 00000000000000/* * GetOpt functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_GETOPT_H ) #define _LIBCSYSTEM_GETOPT_H #include #include #include "libcsystem_libcstring.h" /* unistd.h is included here to export getopt, optarg, optind and optopt */ #if defined( HAVE_UNISTD_H ) #include #endif #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_GETOPT ) #define libcsystem_getopt( argument_count, argument_values, options_string ) \ getopt( argument_count, argument_values, options_string ) #else /* The current option argument */ extern libcstring_system_character_t *optarg; /* The option index */ extern int optind; /* Value to indicate the current option */ extern libcstring_system_integer_t optopt; libcstring_system_integer_t libcsystem_getopt( int argument_count, libcstring_system_character_t * const argument_values[], const libcstring_system_character_t *options_string ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_signal.c0000644000175000017500000001304611753473742016213 00000000000000/* * Signal handling functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_SIGNAL_H ) #include #endif #if defined( _MSC_VER ) #include #endif #include "libcsystem_libcerror.h" #include "libcsystem_signal.h" #if defined( WINAPI ) void (*libcsystem_signal_signal_handler)( libcsystem_signal_t ) = NULL; /* Signal handler for Ctrl+C or Ctrl+Break signals */ BOOL WINAPI libcsystem_signal_handler( unsigned long signal ) { static char *function = "libcsystem_signal_handler"; switch( signal ) { /* use Ctrl+C or Ctrl+Break to simulate SERVICE_CONTROL_STOP in debug mode */ case CTRL_BREAK_EVENT: case CTRL_C_EVENT: if( libcsystem_signal_signal_handler != NULL ) { libcsystem_signal_signal_handler( signal ); } return( TRUE ); default: break; } return( FALSE ); } #if defined( _MSC_VER ) /* Initialize memory usage and leakage debugging */ void libcsystem_signal_initialize_memory_debug( void ) { int flag = 0; /* Get the current state of the flag and store it in a temporary variable */ flag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ); /* Turn on client block identifiers and automatic leak detection */ flag |= ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); /* Set the new state for the flag */ _CrtSetDbgFlag( flag ); } #endif /* Attaches a signal handler for Ctrl+C or Ctrl+Break signals * Returns 1 if successful or -1 on error */ int libcsystem_signal_attach( void (*signal_handler)( libcsystem_signal_t ), libcerror_error_t **error ) { static char *function = "libcsystem_signal_attach"; if( signal_handler == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid signal handler.", function ); return( -1 ); } libcsystem_signal_signal_handler = signal_handler; if( SetConsoleCtrlHandler( libcsystem_signal_handler, TRUE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to attach signal handler.", function ); return( -1 ); } if( SetConsoleCtrlHandler( NULL, FALSE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to attach break signal.", function ); return( -1 ); } #if defined( _MSC_VER ) libcsystem_signal_initialize_memory_debug(); #endif SetErrorMode( SEM_FAILCRITICALERRORS ); #if defined( LOCALE_SUPPORT ) /* Allow subsequent threads to have their own locale. * The current application is single threaded so this * call has no practical effect here. */ _configthreadlocale( _ENABLE_PER_THREAD_LOCALE ); /* Set the current thread locale to the user default * ANSI code page. */ setlocale( LC_ALL, "" ); /* Set the the code page used by multibyte functions * to use the same code page as the previous call to setlocale. */ _setmbcp( _MB_CP_LOCALE ); #endif return( 1 ); } /* Detaches a signal handler for Ctrl+C or Ctrl+Break signals * Returns 1 if successful or -1 on error */ int libcsystem_signal_detach( libcerror_error_t **error ) { static char *function = "libcsystem_signal_detach"; if( SetConsoleCtrlHandler( libcsystem_signal_handler, FALSE ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to detach signal handler.", function ); return( -1 ); } libcsystem_signal_signal_handler = NULL; return( 1 ); } #elif defined( HAVE_SIGNAL_H ) /* Attaches a signal handler for SIGINT * Returns 1 if successful or -1 on error */ int libcsystem_signal_attach( void (*signal_handler)( libcsystem_signal_t ), libcerror_error_t **error ) { static char *function = "libcsystem_signal_attach"; if( signal_handler == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid signal handler.", function ); return( -1 ); } if( signal( SIGINT, signal_handler ) == SIG_ERR ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to attach signal handler.", function ); return( -1 ); } return( 1 ); } /* Detaches a signal handler for SIGINT * Returns 1 if successful or -1 on error */ int libcsystem_signal_detach( libcerror_error_t **error ) { static char *function = "libcsystem_signal_detach"; if( signal( SIGINT, SIG_DFL ) == SIG_ERR ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to detach signal handler.", function ); return( -1 ); } return( 1 ); } #endif libpff-20120802/libcsystem/libcsystem_definitions.h0000644000175000017500000000207611753473742017257 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCSYSTEM_INTERNAL_DEFINITIONS_H ) #define LIBCSYSTEM_INTERNAL_DEFINITIONS_H #include #include #define LIBCSYSTEM_VERSION 20120425 /* The libcsystem version string */ #define LIBCSYSTEM_VERSION_STRING "20120425" #endif libpff-20120802/libcsystem/libcsystem_glob.h0000644000175000017500000000355311753473742015670 00000000000000/* * Globbing functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_GLOB_H ) #define _LIBCSYSTEM_GLOB_H #include #include #include "libcsystem_libcerror.h" #include "libcsystem_libcstring.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_GLOB_H ) #define LIBCSYSTEM_HAVE_GLOB 1 #endif #if !defined( LIBCSYSTEM_HAVE_GLOB ) typedef struct libcsystem_glob libcsystem_glob_t; struct libcsystem_glob { /* The number of globs resolved */ int number_of_results; /* The resolved globs */ libcstring_system_character_t **result; }; int libcsystem_glob_initialize( libcsystem_glob_t **glob, libcerror_error_t **error ); int libcsystem_glob_free( libcsystem_glob_t **glob, libcerror_error_t **error ); int libcsystem_glob_resize( libcsystem_glob_t *glob, int new_number_of_results, libcerror_error_t **error ); int libcsystem_glob_resolve( libcsystem_glob_t *glob, libcstring_system_character_t * const patterns[], int number_of_patterns, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_date_time.h0000644000175000017500000000430611753473742016675 00000000000000/* * Date and time functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_DATE_TIME_H ) #define _LIBCSYSTEM_DATE_TIME_H #include #include #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #include "libcsystem_libcerror.h" #include "libcsystem_libcstring.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_TIME ) || defined( WINAPI ) #define libcsystem_date_time_time( timestamp ) \ time( timestamp ) #endif #if defined( HAVE_MKTIME ) || defined( WINAPI ) #define libcsystem_date_time_mktime( time_elements ) \ mktime( time_elements ) #endif #if defined( HAVE_CTIME ) || defined( HAVE_CTIME_R ) || defined( WINAPI ) int libcsystem_date_time_get_ctime_string( const time_t *timestamp, libcstring_system_character_t *string, size_t string_size, libcerror_error_t **error ); #endif #if defined( HAVE_LOCALTIME ) || defined( HAVE_LOCALTIME_R ) || defined( WINAPI ) int libcsystem_date_time_get_time_elements_in_localtime( const time_t *timestamp, struct tm *time_elements, libcerror_error_t **error ); #endif #if defined( HAVE_GMTIME ) || defined( HAVE_GMTIME_R ) || defined( WINAPI ) int libcsystem_date_time_get_time_elements_in_utc( const time_t *timestamp, struct tm *time_elements, libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_file_stream.h0000644000175000017500000000361711753473742017240 00000000000000/* * File stream functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_FILE_STREAM_H ) #define _LIBCSYSTEM_FILE_STREAM_H #include #include #include #include "libcsystem_string.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #define libcsystem_file_stream_open( filename, mode ) \ file_stream_open_wide( filename, mode ) #else #define libcsystem_file_stream_open( filename, mode ) \ file_stream_open( filename, mode ) #endif #define libcsystem_file_stream_close( stream ) \ file_stream_close( stream ) #define libcsystem_file_stream_read( stream, data, size ) \ file_stream_read( stream, data, size ) #define libcsystem_file_stream_write( stream, data, size ) \ file_stream_write( stream, data, size ) #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #define libcsystem_file_stream_get_string( stream, string, size ) \ file_stream_get_string_wide( stream, string, size ) #else #define libcsystem_file_stream_get_string( stream, string, size ) \ file_stream_get_string( stream, string, size ) #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_date_time.c0000644000175000017500000002160011753473742016664 00000000000000/* * Date and time functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #if defined( HAVE_STRING_H ) || defined( WINAPI ) #include #endif #if defined( TIME_WITH_SYS_TIME ) #include #include #elif defined( HAVE_SYS_TIME_H ) #include #else #include #endif #include "libcsystem_date_time.h" #include "libcsystem_libcerror.h" #include "libcsystem_libcstring.h" #if defined( HAVE_CTIME ) || defined( HAVE_CTIME_R ) || defined( WINAPI ) /* Retrieves a ctime formatted string * The string must be at least 32 characters of size including the end of string character * Returns 1 if successful or -1 on error */ int libcsystem_date_time_get_ctime_string( const time_t *timestamp, libcstring_system_character_t *string, size_t string_size, libcerror_error_t **error ) { static char *function = "libcsystem_date_time_get_ctime_string"; #if ( defined( HAVE_CTIME ) && !defined( HAVE_CTIME_R ) ) || ( defined( WINAPI ) && !defined( _MSC_VER ) ) const libcstring_system_character_t *static_ctime_string = NULL; size_t static_ctime_string_length = 0; #endif if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid timestamp.", function ); return( -1 ); } if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( string_size < 32 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL, "%s: string too small.", function ); return( -1 ); } #if defined( _MSC_VER ) #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) if( _wctime_s( string, string_size, timestamp ) != 0 ) #else if( ctime_s( string, string_size, timestamp ) != 0 ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } #elif defined( HAVE_CTIME_R ) /* Sanity check */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) #error Missing wide character ctime_r function #endif #if defined( HAVE_CTIME_R_SIZE ) if( ctime_r( timestamp, string, string_size ) == NULL ) #else if( ctime_r( timestamp, string ) == NULL ) #endif { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } #else /* Sanity check */ #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) && !defined( WINAPI ) #error Missing wide character ctime function #endif #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) static_ctime_string = _wctime( timestamp ); #else static_ctime_string = ctime( timestamp ); #endif if( static_ctime_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to create static ctime string.", function ); return( -1 ); } static_ctime_string_length = libcstring_system_string_length( static_ctime_string ); if( libcstring_system_string_copy( string, static_ctime_string, static_ctime_string_length ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set string.", function ); return( -1 ); } string[ static_ctime_string_length ] = 0; #endif return( 1 ); } #endif #if defined( HAVE_LOCALTIME ) || defined( HAVE_LOCALTIME_R ) || defined( WINAPI ) /* Retrieves time elements in the local time * Returns 1 if successful or -1 on error */ int libcsystem_date_time_get_time_elements_in_localtime( const time_t *timestamp, struct tm *time_elements, libcerror_error_t **error ) { static char *function = "libcsystem_date_time_get_time_elements_in_localtime"; #if !defined( HAVE_LOCALTIME_R ) && !defined( _MSC_VER ) struct tm *static_time_elements = NULL; #endif if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid timestamp.", function ); return( -1 ); } if( time_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid time elements.", function ); return( -1 ); } #if defined( _MSC_VER ) if( localtime_s( time_elements, timestamp ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set time elements.", function ); return( -1 ); } #elif defined( HAVE_LOCALTIME_R ) if( localtime_r( timestamp, time_elements ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set time elements.", function ); return( -1 ); } #else static_time_elements = localtime( timestamp ); if( static_time_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to create static time elements.", function ); return( -1 ); } if( memory_copy( time_elements, static_time_elements, sizeof( struct tm ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set time elements.", function ); return( -1 ); } #endif return( 1 ); } #endif #if defined( HAVE_GMTIME ) || defined( HAVE_GMTIME_R ) || defined( WINAPI ) /* Retrieves time elements in UTC (GMT) * Returns 1 if successful or -1 on error */ int libcsystem_date_time_get_time_elements_in_utc( const time_t *timestamp, struct tm *time_elements, libcerror_error_t **error ) { static char *function = "libcsystem_date_time_get_time_elements_in_utc"; #if !defined( HAVE_GMTIME_R ) && !defined( _MSC_VER ) struct tm *static_time_elements = NULL; #endif if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid timestamp.", function ); return( -1 ); } if( time_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid time elements.", function ); return( -1 ); } #if defined( _MSC_VER ) if( gmtime_s( time_elements, timestamp ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set time elements.", function ); return( -1 ); } #elif defined( HAVE_GMTIME_R ) if( gmtime_r( timestamp, time_elements ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set time elements.", function ); return( -1 ); } #else static_time_elements = gmtime( timestamp ); if( static_time_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to create static time elements.", function ); return( -1 ); } if( memory_copy( time_elements, static_time_elements, sizeof( struct tm ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to set time elements.", function ); return( -1 ); } #endif return( 1 ); } #endif libpff-20120802/libcsystem/libcsystem_libcstring.h0000644000175000017500000000263611753473742017106 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_LIBCSTRING_H ) #define _LIBCSYSTEM_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsystem/Makefile.in0000664000175000017500000006560412006536015014373 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcsystem DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcsystem_la_DEPENDENCIES = am__libcsystem_la_SOURCES_DIST = libcsystem_date_time.c \ libcsystem_date_time.h libcsystem_definitions.h \ libcsystem_find.h libcsystem_file_io.h \ libcsystem_file_stream.h libcsystem_getopt.c \ libcsystem_getopt.h libcsystem_glob.c libcsystem_glob.h \ libcsystem_i18n.h libcsystem_libcstring.h \ libcsystem_libcerror.h libcsystem_libclocale.h \ libcsystem_libcnotify.h libcsystem_libuna.h \ libcsystem_signal.c libcsystem_signal.h libcsystem_string.c \ libcsystem_string.h libcsystem_support.c libcsystem_support.h \ libcsystem_unused.h @HAVE_LOCAL_LIBCSYSTEM_TRUE@am_libcsystem_la_OBJECTS = \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_date_time.lo \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_getopt.lo \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_glob.lo \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_signal.lo \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_string.lo \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_support.lo libcsystem_la_OBJECTS = $(am_libcsystem_la_OBJECTS) @HAVE_LOCAL_LIBCSYSTEM_TRUE@am_libcsystem_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcsystem_la_SOURCES) DIST_SOURCES = $(am__libcsystem_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCSYSTEM_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ -DLOCALEDIR=\"$(datadir)/locale\" \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCSYSTEM_TRUE@noinst_LTLIBRARIES = libcsystem.la @HAVE_LOCAL_LIBCSYSTEM_TRUE@libcsystem_la_SOURCES = \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_date_time.c libcsystem_date_time.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_definitions.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_find.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_file_io.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_file_stream.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_getopt.c libcsystem_getopt.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_glob.c libcsystem_glob.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_i18n.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcstring.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcerror.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libclocale.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcnotify.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libuna.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_signal.c libcsystem_signal.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_string.c libcsystem_string.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_support.c libcsystem_support.h \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_unused.h @HAVE_LOCAL_LIBCSYSTEM_TRUE@libcsystem_la_LIBADD = \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCSTRING_LIBADD@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCERROR_LIBADD@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCLOCALE_LIBADD@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCNOTIFY_LIBADD@ \ @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBUNA_LIBADD@ MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcsystem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcsystem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcsystem.la: $(libcsystem_la_OBJECTS) $(libcsystem_la_DEPENDENCIES) $(LINK) $(am_libcsystem_la_rpath) $(libcsystem_la_OBJECTS) $(libcsystem_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_date_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_glob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_signal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_support.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcsystem ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsystem_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcsystem/libcsystem_getopt.c0000644000175000017500000001063011753473742016234 00000000000000/* * GetOpt functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include "libcsystem_getopt.h" #include "libcsystem_libcnotify.h" #include "libcsystem_libcstring.h" #if !defined( HAVE_GETOPT ) /* The current option argument */ libcstring_system_character_t *optarg = NULL; /* The option index * Start with argument 1 (argument 0 is the program name) */ int optind = 1; /* Value to indicate the current option */ libcstring_system_integer_t optopt = 0; /* Get the program options * Function for platforms that do not have the getopt function * Returns the option character processed, or -1 on error, * ? if the option was not in the options string, : if the option argument was missing */ libcstring_system_integer_t libcsystem_getopt( int argument_count, libcstring_system_character_t * const argument_values[], const libcstring_system_character_t *options_string ) { libcstring_system_character_t *option_value = NULL; libcstring_system_character_t *argument_value = NULL; static char *function = "libcsystem_getopt"; size_t options_string_length = 0; if( optind >= argument_count ) { return( (libcstring_system_integer_t) -1 ); } argument_value = argument_values[ optind ]; /* Check if the argument value is not an empty string */ if( *argument_value == 0 ) { return( (libcstring_system_integer_t) -1 ); } /* Check if the first character is a option marker '-' */ if( *argument_value != (libcstring_system_character_t) '-' ) { return( (libcstring_system_integer_t) -1 ); } argument_value++; /* Check if long options are provided '--' */ if( *argument_value == (libcstring_system_character_t) '-' ) { optind++; return( (libcstring_system_integer_t) -1 ); } options_string_length = libcstring_system_string_length( options_string ); optopt = *argument_value; option_value = libcstring_system_string_search_character( options_string, optopt, options_string_length ); argument_value++; /* Check if an argument was specified or that the option was not found * in the option string */ if( ( optopt == (libcstring_system_integer_t) ':' ) || ( option_value == NULL ) ) { if( *argument_value == (libcstring_system_character_t) '\0' ) { optind++; } if( ( *options_string != (libcstring_system_character_t) ':' ) && ( optopt != (libcstring_system_integer_t) '?' ) ) { libcnotify_printf( "%s: no such option: %" PRIc_LIBCSTRING_SYSTEM ".\n", function, optopt ); } return( (libcstring_system_integer_t) '?' ); } option_value++; /* Check if no option argument is required */ if( *option_value != (libcstring_system_character_t) ':' ) { optarg = NULL; if( *argument_value == (libcstring_system_character_t) '\0' ) { optind++; } } /* Check if the argument is right after the option flag with no space in between */ else if( *argument_value != (libcstring_system_character_t) '\0' ) { optarg = argument_value; optind++; } else { optind++; /* Check if the argument was provided as the next argument value */ if( argument_count <= optind ) { if( *option_value == ':' ) { return( (libcstring_system_integer_t) ':' ); } libcnotify_printf( "%s: option: %" PRIc_LIBCSTRING_SYSTEM " requires an argument.\n", function, optopt ); return( (libcstring_system_integer_t) '?' ); } optarg = argument_values[ optind ]; optind++; } return( optopt ); } #endif libpff-20120802/libcsystem/libcsystem_signal.h0000644000175000017500000000345111753473742016217 00000000000000/* * Signal handling functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_SIGNAL_H ) #define _LIBCSYSTEM_SIGNAL_H #include #include #if defined( HAVE_SIGNAL_H ) #include #endif #include "libcsystem_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( WINAPI ) typedef unsigned long libcsystem_signal_t; BOOL WINAPI libcsystem_signal_handler( libcsystem_signal_t signal ); #if defined( _MSC_VER ) void libcsystem_signal_initialize_memory_debug( void ); #endif int libcsystem_signal_attach( void (*signal_handler)( libcsystem_signal_t ), libcerror_error_t **error ); int libcsystem_signal_detach( libcerror_error_t **error ); #elif defined( HAVE_SIGNAL_H ) typedef int libcsystem_signal_t; int libcsystem_signal_attach( void (*signal_handler)( libcsystem_signal_t ), libcerror_error_t **error ); int libcsystem_signal_detach( libcerror_error_t **error ); #else #error missing signal functions #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsystem/libcsystem_unused.h0000644000175000017500000000251411753473742016244 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSYSTEM_INTERNAL_UNUSED_H ) #define _LIBCSYSTEM_INTERNAL_UNUSED_H #include #if !defined( LIBCSYSTEM_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCSYSTEM_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCSYSTEM_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCSYSTEM_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCSYSTEM_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/README.mingw0000644000175000017500000000277011647210314012142 00000000000000Creating a DLL using MinGW To compile a libpff DLL using MinGW you'll need: * MinGW To build a DLL using MinGW use: mingw32-configure --prefix=/opt/local/i386-mingw32 --enable-winapi=yes mingw32-make It is recommended that you use WINAPI support but it is possible to compile libpff without it (--enable-winapi=no). The default behaviour is that libpff will try to auto-detect MinGW and enable WINAPI support. If mingw32-configure and mingw32-make are not available you can build it with: ./configure --host=i386-mingw32 --prefix=/opt/local/i386-mingw32 --enable-winapi=yes make If this does not work try a script similar to the following: #!/bin/sh CC=/opt/local/bin/i386-mingw32-gcc CXX=/opt/local/bin/i386-mingw32-g++ AR=/opt/local/bin/i386-mingw32-ar OBJDUMP=/opt/local/bin/i386-mingw32-objdump RANLIB=/opt/local/bin/i386-mingw32-ranlib STRIP=/opt/local/bin/i386-mingw32-strip MINGWFLAGS="-mwin32 -mconsole -march=i586 " CFLAGS="$MINGWFLAGS" CXXFLAGS="$MINGWFLAGS" CC=$CC CXX=$CXX AR=$AR OBJDUMP=$OBJDUMP RANLIB=$RANLIB STRIP=$STRIP ./configure --host=i586-mingw32msvc --prefix=/opt/local/i386-mingw32 --enable-winapi=yes CC=$CC CXX=$CXX AR=$AR OBJDUMP=$OBJDUMP RANLIB=$RANLIB STRIP=$STRIP CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" make You should end up with the following DLL: libpff-/libpff/.libs/libpff-1.dll And the following executables: libpff-/pfftools/.libs/pffinfo.exe libpff-/pfftools/.libs/pffexport.exe To install the libpff DLL in the MinGW build tree use: sudo make install libpff-20120802/libfdata/0000775000175000017500000000000012006536213011763 500000000000000libpff-20120802/libfdata/libfdata_support.c0000644000175000017500000000222611765042507015422 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_support.h" #if !defined( HAVE_LOCAL_LIBFDATA ) /* Returns the library version as a string */ const char *libfdata_get_version( void ) { return( (const char *) LIBFDATA_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ libpff-20120802/libfdata/libfdata_list_element.c0000644000175000017500000004575211765042507016405 00000000000000/* * The list element functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_list.h" #include "libfdata_list_element.h" #include "libfdata_range.h" #include "libfdata_types.h" /* Initializes the element * Returns 1 if successful or -1 on error */ int libfdata_list_element_initialize( libfdata_list_element_t **element, libfdata_list_t *list, int element_index, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_initialize"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } if( *element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid element value already set.", function ); return( -1 ); } if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid element index value less than zero.", function ); return( -1 ); } internal_element = memory_allocate_structure( libfdata_internal_list_element_t ); if( internal_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create element.", function ); goto on_error; } if( memory_set( internal_element, 0, sizeof( libfdata_internal_list_element_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear element.", function ); goto on_error; } if( libfdata_range_initialize( &( internal_element->data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data range.", function ); goto on_error; } internal_element->list = list; internal_element->element_index = element_index; internal_element->timestamp = libfcache_date_time_get_timestamp(); *element = (libfdata_list_element_t *) internal_element; return( 1 ); on_error: if( internal_element != NULL ) { memory_free( internal_element ); } return( -1 ); } /* Frees the element * Returns 1 if successful or -1 on error */ int libfdata_list_element_free( libfdata_list_element_t **element, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_free"; int result = 1; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } if( *element != NULL ) { internal_element = (libfdata_internal_list_element_t *) *element; *element = NULL; if( internal_element->data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid element - missing data range.", function ); return( -1 ); } if( internal_element->data_range != NULL ) { if( libfdata_range_free( &( internal_element->data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data range.", function ); result = -1; } } memory_free( internal_element ); } return( result ); } /* Clones (duplicates) the element * Returns 1 if successful or -1 on error */ int libfdata_list_element_clone( libfdata_list_element_t **destination_element, libfdata_list_element_t *source_element, libfdata_list_t *list, int element_index, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_destination_element = NULL; libfdata_internal_list_element_t *internal_source_element = NULL; static char *function = "libfdata_list_element_clone"; if( destination_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination element.", function ); return( -1 ); } if( *destination_element != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination element already set.", function ); return( -1 ); } if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid element index value less than zero.", function ); return( -1 ); } if( source_element == NULL ) { *destination_element = NULL; return( 1 ); } internal_source_element = (libfdata_internal_list_element_t *) source_element; internal_destination_element = memory_allocate_structure( libfdata_internal_list_element_t ); if( internal_destination_element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination element.", function ); goto on_error; } if( memory_set( internal_destination_element, 0, sizeof( libfdata_internal_list_element_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destination element.", function ); memory_free( internal_destination_element ); return( -1 ); } if( libfdata_range_clone( &( internal_destination_element->data_range ), internal_source_element->data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination data range.", function ); goto on_error; } internal_destination_element->list = list; internal_destination_element->element_index = element_index; internal_destination_element->value_offset = internal_source_element->value_offset; internal_destination_element->timestamp = libfcache_date_time_get_timestamp(); *destination_element = (libfdata_list_element_t *) internal_destination_element; return( 1 ); on_error: if( internal_destination_element != NULL ) { if( internal_destination_element->data_range != NULL ) { libfdata_range_free( &( internal_destination_element->data_range ), NULL ); } memory_free( internal_destination_element ); } return( -1 ); } /* Retrieves the element index * Returns 1 if successful or -1 on error */ int libfdata_list_element_get_element_index( libfdata_list_element_t *element, int *element_index, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_element_index"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } *element_index = internal_element->element_index; return( 1 ); } /* Sets the element index * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_element_index( libfdata_list_element_t *element, int element_index, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_set_element_index"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid element index value less than zero.", function ); return( -1 ); } internal_element->element_index = element_index; return( 1 ); } /* Retrieves the time stamp * Returns 1 if successful or -1 on error */ int libfdata_list_element_get_timestamp( libfdata_list_element_t *element, time_t *timestamp, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_timestamp"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid time stamp.", function ); return( -1 ); } *timestamp = internal_element->timestamp; return( 1 ); } /* Retrieves the value offset * Returns 1 if successful or -1 on error */ int libfdata_list_element_get_value_offset( libfdata_list_element_t *element, off64_t *value_offset, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_value_offset"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( value_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value offset.", function ); return( -1 ); } *value_offset = internal_element->value_offset; return( 1 ); } /* Sets the value offset * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_value_offset( libfdata_list_element_t *element, off64_t value_offset, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_set_value_offset"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( value_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid value offset value less than zero.", function ); return( -1 ); } internal_element->value_offset = value_offset; return( 1 ); } /* Retrieves the value size * Returns 1 if successful or -1 on error */ int libfdata_list_element_get_value_size( libfdata_list_element_t *element, size64_t *value_size, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_value_size"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value size.", function ); return( -1 ); } *value_size = internal_element->value_size; return( 1 ); } /* Sets the value size * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_value_size( libfdata_list_element_t *element, size64_t value_size, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_set_value_size"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( value_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value size value exceeds maximum.", function ); return( -1 ); } internal_element->value_size = value_size; return( 1 ); } /* Data range functions */ /* Retrieves the data range * Returns 1 if successful or -1 on error */ int libfdata_list_element_get_data_range( libfdata_list_element_t *element, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_data_range"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( libfdata_range_get_values( internal_element->data_range, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range.", function ); return( -1 ); } return( 1 ); } /* Sets the data range * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_data_range( libfdata_list_element_t *element, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_set_data_range"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( libfdata_range_set_values( internal_element->data_range, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range.", function ); return( -1 ); } internal_element->timestamp = libfcache_date_time_get_timestamp(); return( 1 ); } /* Element value functions */ /* Retrieves the element value * Returns 1 if successful or -1 on error */ int libfdata_list_element_get_element_value( libfdata_list_element_t *element, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_get_element_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( libfdata_list_get_element_value( internal_element->list, file_io_handle, cache, element, element_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value.", function ); return( -1 ); } return( 1 ); } /* Sets the element value * * If the flag LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED is set the list element * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_list_element_set_element_value( libfdata_list_element_t *element, libfcache_cache_t *cache, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_list_element_t *internal_element = NULL; static char *function = "libfdata_list_element_set_element_value"; if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } internal_element = (libfdata_internal_list_element_t *) element; if( libfdata_list_set_element_value( internal_element->list, cache, element, element_value, free_element_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set element value.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libfdata/libfdata_extern.h0000644000175000017500000000241411765042507015217 00000000000000/* * The internal extern definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_EXTERN_H ) #define _LIBFDATA_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if !defined( HAVE_LOCAL_LIBFDATA ) /* If libtool DLL support is enabled set LIBFDATA_DLL_EXPORT * before including libfdata/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBFDATA_DLL_EXPORT #endif #include #else #define LIBFDATA_EXTERN extern #endif #endif libpff-20120802/libfdata/libfdata_list.c0000644000175000017500000016223011765042507014663 00000000000000/* * The list functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_list.h" #include "libfdata_list_element.h" #include "libfdata_types.h" #define libfdata_list_calculate_cache_entry_index( element_index, number_of_cache_entries ) \ element_index % number_of_cache_entries /* Initializes the list * * If the flag LIBFDATA_FLAG_IO_HANDLE_MANAGED is set the list * takes over management of the IO handle and the IO handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_list_initialize( libfdata_list_t **list, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*read_element_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_initialize"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid list value already set.", function ); return( -1 ); } if( read_element_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read element data function.", function ); return( -1 ); } internal_list = memory_allocate_structure( libfdata_internal_list_t ); if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create list.", function ); goto on_error; } if( memory_set( internal_list, 0, sizeof( libfdata_internal_list_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear list.", function ); goto on_error; } if( libfdata_array_initialize( &( internal_list->elements ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create elements array.", function ); goto on_error; } internal_list->flags |= flags; internal_list->io_handle = io_handle; internal_list->free_io_handle = free_io_handle; internal_list->clone_io_handle = clone_io_handle; internal_list->read_element_data = read_element_data; *list = (libfdata_list_t *) internal_list; return( 1 ); on_error: if( internal_list != NULL ) { memory_free( internal_list ); } return( -1 ); } /* Frees the list * Returns 1 if successful or -1 on error */ int libfdata_list_free( libfdata_list_t **list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_free"; int result = 1; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( *list != NULL ) { internal_list = (libfdata_internal_list_t *) *list; *list = NULL; if( libfdata_array_free( &( internal_list->elements ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_element_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the elements array.", function ); result = -1; } if( ( internal_list->flags & LIBFDATA_FLAG_IO_HANDLE_MANAGED ) != 0 ) { if( internal_list->io_handle != NULL ) { if( internal_list->free_io_handle != NULL ) { if( internal_list->free_io_handle( &( internal_list->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } } } } memory_free( internal_list ); } return( result ); } /* Clones (duplicates) the list * Returns 1 if successful or -1 on error */ int libfdata_list_clone( libfdata_list_t **destination_list, libfdata_list_t *source_list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_source_list = NULL; intptr_t *destination_io_handle = NULL; static char *function = "libfdata_list_clone"; if( destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination list.", function ); return( -1 ); } if( *destination_list != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination list already set.", function ); return( -1 ); } if( source_list == NULL ) { *destination_list = NULL; return( 1 ); } internal_source_list = (libfdata_internal_list_t *) source_list; if( internal_source_list->io_handle != NULL ) { if( internal_source_list->free_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source list - missing free IO handle function.", function ); goto on_error; } if( internal_source_list->clone_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source list - missing clone IO handle function.", function ); goto on_error; } if( internal_source_list->clone_io_handle( &destination_io_handle, internal_source_list->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone IO handle.", function ); goto on_error; } } if( libfdata_list_initialize( destination_list, destination_io_handle, internal_source_list->free_io_handle, internal_source_list->clone_io_handle, internal_source_list->read_element_data, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list.", function ); goto on_error; } if( *destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination list.", function ); return( -1 ); } destination_io_handle = NULL; if( libfdata_list_clone_elements( *destination_list, source_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy list elements.", function ); goto on_error; } return( 1 ); on_error: if( *destination_list != NULL ) { libfdata_list_free( destination_list, NULL ); } if( destination_io_handle != NULL ) { internal_source_list->free_io_handle( &destination_io_handle, NULL ); } return( -1 ); } /* Clones (duplicates) the elements of the list * Returns 1 if successful or -1 on error */ int libfdata_list_clone_elements( libfdata_list_t *destination_list, libfdata_list_t *source_list, libcerror_error_t **error ) { libfdata_internal_list_t *internal_destination_list = NULL; libfdata_internal_list_t *internal_source_list = NULL; libfdata_list_element_t *destination_list_element = NULL; libfdata_list_element_t *source_list_element = NULL; static char *function = "libfdata_list_clone_elements"; int element_index = 0; int number_of_elements = 0; if( destination_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination list.", function ); return( -1 ); } internal_destination_list = (libfdata_internal_list_t *) destination_list; if( source_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid source list.", function ); return( -1 ); } internal_source_list = (libfdata_internal_list_t *) source_list; if( libfdata_array_get_number_of_entries( internal_source_list->elements, &number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from source elements array.", function ); goto on_error; } if( libfdata_array_empty( internal_destination_list->elements, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_element_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to empty destination elements array.", function ); goto on_error; } if( libfdata_array_resize( internal_destination_list->elements, number_of_elements, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_element_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize destination elements array.", function ); goto on_error; } for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libfdata_array_get_entry_by_index( internal_source_list->elements, element_index, (intptr_t **) &source_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from source elements array.", function, element_index ); goto on_error; } if( source_list_element == NULL ) { continue; } if( libfdata_list_element_clone( &destination_list_element, source_list_element, destination_list, element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination list element: %d.", function, element_index ); goto on_error; } if( libfdata_array_set_entry_by_index( internal_destination_list->elements, element_index, (intptr_t *) destination_list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set list element: %d in destination elements array.", function, element_index ); goto on_error; } destination_list_element = NULL; } internal_destination_list->value_size = internal_source_list->value_size; return( 1 ); on_error: if( destination_list_element != NULL ) { libfdata_list_element_free( &destination_list_element, NULL ); } return( -1 ); } /* Resizes the elements * Returns 1 if successful or -1 on error */ int libfdata_list_resize( libfdata_list_t *list, int number_of_elements, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_resize"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_resize( internal_list->elements, number_of_elements, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_list_element_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize elements array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of elements of the list * Returns 1 if successful or -1 on error */ int libfdata_list_get_number_of_elements( libfdata_list_t *list, int *number_of_elements, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_number_of_elements"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_number_of_entries( internal_list->elements, number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from elements array.", function ); return( -1 ); } return( 1 ); } /* Calculates the value offsets * Returns 1 if successful or -1 on error */ int libfdata_list_calculate_value_offsets( libfdata_internal_list_t *internal_list, libcerror_error_t **error ) { libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_calculate_value_offsets"; off64_t calculated_value_offset = 0; off64_t range_offset = 0; size64_t range_size = 0; uint32_t range_flags = 0; int element_index = 0; int number_of_elements = 0; if( internal_list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid internal list.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_list->elements, &number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from elements array.", function ); return( -1 ); } for( element_index = 0; element_index < number_of_elements; element_index++ ) { if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, element_index ); return( -1 ); } if( libfdata_list_element_set_value_offset( list_element, calculated_value_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data offset of list element: %d.", function, element_index ); return( -1 ); } calculated_value_offset += (off64_t) range_size; } internal_list->flags &= ~( LIBFDATA_LIST_FLAG_CALCULATE_VALUE_OFFSETS ); return( 1 ); } /* Retrieves a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_by_index( libfdata_list_t *list, int element_index, libfdata_list_element_t **element, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_element_by_index"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } return( 1 ); } /* Retrieves an element for the specified offset * Returns 1 if successful, 0 if no matching element was found or -1 on error */ int libfdata_list_get_element_by_offset( libfdata_list_t *list, off64_t value_offset, int *element_index, libfdata_list_element_t **element, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_element_by_offset"; off64_t range_offset = 0; size64_t range_size = 0; uint32_t range_flags = 0; int number_of_elements = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } if( element == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_list->elements, &number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from elements array.", function ); return( -1 ); } for( *element_index = 0; *element_index < number_of_elements; *element_index += 1 ) { if( libfdata_array_get_entry_by_index( internal_list->elements, *element_index, (intptr_t **) element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, *element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( *element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, *element_index ); return( -1 ); } if( ( value_offset >= range_offset ) && ( value_offset < (off64_t) ( range_offset + range_size ) ) ) { return( 1 ); } } *element = NULL; return( 0 ); } /* Sets the data offset and size of a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_set_element_by_index( libfdata_list_t *list, int element_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_set_element_by_index"; off64_t previous_offset = 0; size64_t previous_size = 0; uint32_t previous_flags = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( list_element == NULL ) { if( libfdata_list_element_initialize( &list_element, list, element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); return( -1 ); } if( libfdata_array_set_entry_by_index( internal_list->elements, element_index, (intptr_t *) list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set list element: %d in elements array.", function, element_index ); libfdata_list_element_free( &list_element, NULL ); return( -1 ); } } else { if( libfdata_list_element_get_data_range( list_element, &previous_offset, &previous_size, &previous_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, element_index ); return( -1 ); } internal_list->value_size -= previous_size; } if( libfdata_list_element_set_data_range( list_element, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range of list element: %d.", function, element_index ); return( -1 ); } internal_list->value_size += size; internal_list->flags |= LIBFDATA_LIST_FLAG_CALCULATE_VALUE_OFFSETS; return( 1 ); } /* Appends an element data offset and size * Returns 1 if successful or -1 on error */ int libfdata_list_append_element( libfdata_list_t *list, int *element_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_append_element"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_list_element_initialize( &list_element, list, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create list element.", function ); goto on_error; } if( libfdata_list_element_set_data_range( list_element, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range of list element.", function ); goto on_error; } if( libfdata_list_element_set_value_offset( list_element, internal_list->value_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set list element data offset.", function ); goto on_error; } if( libfdata_array_append_entry( internal_list->elements, element_index, (intptr_t *) list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append list element to elements array.", function ); goto on_error; } if( libfdata_list_element_set_element_index( list_element, *element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set list element index.", function ); list_element = NULL; goto on_error; } internal_list->value_size += size; return( 1 ); on_error: if( list_element != NULL ) { libfdata_list_element_free( &list_element, NULL ); } return( -1 ); } /* Determines if a specific element is set * Returns 1 if element is set, 0 if not or -1 on error */ int libfdata_list_is_element_set( libfdata_list_t *list, int element_index, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *element = NULL; static char *function = "libfdata_list_is_element_set"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( element == NULL ) { return( 0 ); } return( 1 ); } /* Retrieves the element index for a specific value offset * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_index_at_value_offset( libfdata_list_t *list, off64_t value_offset, int *element_index, size_t *element_offset, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_element_index_at_value_offset"; off64_t calculated_value_offset = 0; off64_t range_offset = 0; size64_t range_size = 0; uint32_t range_flags = 0; int calculated_element_index = 0; int initial_element_index = 0; int number_of_elements = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( internal_list->value_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid list - value size value out of bounds.", function ); return( -1 ); } if( value_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid value offset value less than zero.", function ); return( -1 ); } if( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } if( element_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element offset.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_list->elements, &number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from elements array.", function ); return( -1 ); } if( ( internal_list->flags & LIBFDATA_LIST_FLAG_CALCULATE_VALUE_OFFSETS ) != 0 ) { if( libfdata_list_calculate_value_offsets( internal_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate value offsets.", function ); return( -1 ); } } /* This assumes a fairly even distribution of the sizes of the list elements */ initial_element_index = (int) ( ( number_of_elements * value_offset ) / internal_list->value_size ); /* Look for the corresponding list element upwards in the list */ for( calculated_element_index = initial_element_index; calculated_element_index < number_of_elements; calculated_element_index++ ) { if( libfdata_array_get_entry_by_index( internal_list->elements, calculated_element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, calculated_element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, calculated_element_index ); return( -1 ); } if( libfdata_list_element_get_value_offset( list_element, &calculated_value_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve data offset of list element: %d.", function, calculated_element_index ); return( -1 ); } /* Check if the data offset is in the list element */ if( ( value_offset >= calculated_value_offset ) && ( value_offset < ( calculated_value_offset + (off64_t) range_size ) ) ) { value_offset -= calculated_value_offset; break; } /* Check if the data offset is out of bounds */ if( value_offset < calculated_value_offset ) { calculated_element_index = number_of_elements; break; } } if( calculated_element_index >= number_of_elements ) { /* Look for the corresponding list element downwards in the list */ for( calculated_element_index = initial_element_index; calculated_element_index >= 0; calculated_element_index-- ) { if( libfdata_array_get_entry_by_index( internal_list->elements, calculated_element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, calculated_element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, calculated_element_index ); return( -1 ); } if( libfdata_list_element_get_value_offset( list_element, &calculated_value_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to retrieve data offset of list element: %d.", function, calculated_element_index ); return( -1 ); } /* Check if the data offset is in the list element */ if( ( value_offset >= calculated_value_offset ) && ( value_offset < ( calculated_value_offset + (off64_t) range_size ) ) ) { value_offset -= calculated_value_offset; break; } /* Check if the data offset is out of bounds */ if( value_offset > calculated_value_offset ) { calculated_element_index = -1; break; } } } if( calculated_element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( ( value_offset < 0 ) || ( value_offset > (off64_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element offset value out of bounds.", function ); return( -1 ); } *element_index = calculated_element_index; *element_offset = (size_t) value_offset; return( 1 ); } /* Retrieves the element index for a specific value index * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_index_at_value_index( libfdata_list_t *list, int value_index, size_t value_size, int *element_index, size_t *element_offset, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_element_index_at_value_index"; off64_t range_offset = 0; size64_t range_size = 0; uint64_t number_of_values = 0; uint32_t range_flags = 0; int calculated_element_index = 0; int number_of_elements = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( value_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid value index value less than zero.", function ); return( -1 ); } if( value_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value size value exceeds maximum.", function ); return( -1 ); } if( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } if( element_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element offset.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_list->elements, &number_of_elements, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from elements array.", function ); return( -1 ); } for( calculated_element_index = 0; calculated_element_index < number_of_elements; calculated_element_index++ ) { if( libfdata_array_get_entry_by_index( internal_list->elements, *element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from elements array.", function, calculated_element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, calculated_element_index ); return( -1 ); } number_of_values = range_size / value_size; if( number_of_values > (uint64_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid number of values value exceeds maximum.", function ); return( -1 ); } if( value_index < (int) number_of_values ) { break; } value_index -= (int) number_of_values; } if( calculated_element_index >= number_of_elements ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( value_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value index value out of bounds.", function ); return( -1 ); } *element_index = calculated_element_index; *element_offset = value_size * value_index; return( 1 ); } /* Data range functions */ /* Retrieves the data range of a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_get_data_range_by_index( libfdata_list_t *list, int element_index, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_data_range_by_index"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from list element: %d.", function, element_index ); return( -1 ); } return( 1 ); } /* Sets the data range of a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_set_data_range_by_index( libfdata_list_t *list, int element_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_set_data_range_by_index"; off64_t previous_offset = 0; size64_t previous_size = 0; uint32_t previous_flags = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_element_get_data_range( list_element, &previous_offset, &previous_size, &previous_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range of list element: %d.", function, element_index ); return( -1 ); } internal_list->value_size -= previous_size; if( libfdata_list_element_set_data_range( list_element, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range of list element: %d.", function, element_index ); return( -1 ); } internal_list->value_size += size; internal_list->flags |= LIBFDATA_LIST_FLAG_CALCULATE_VALUE_OFFSETS; return( 1 ); } /* List element value functions */ /* Retrieves the value the element * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_value( libfdata_list_t *list, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_element_value"; off64_t cache_value_offset = (off64_t) -1; off64_t range_offset = 0; size64_t range_size = 0; time_t cache_value_timestamp = 0; time_t element_timestamp = 0; uint32_t range_flags = 0; int cache_entry_index = -1; int element_index = -1; int number_of_cache_entries = 0; int result = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_list_element_get_data_range( element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from list element.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( libfdata_list_element_get_element_index( element, &element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index from list element.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { cache_entry_index = libfdata_list_calculate_cache_entry_index( element_index, number_of_cache_entries ); if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_list_element_get_timestamp( element, &element_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from list element.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_offset, &cache_value_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value identifier.", function ); return( -1 ); } } if( ( range_offset == cache_value_offset ) && ( element_timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading element data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, range_offset, range_offset, range_size ); } #endif /* Read the element data from the file IO handle */ if( internal_list->read_element_data( internal_list->io_handle, file_io_handle, element, cache, range_offset, range_size, range_flags, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element data at offset: %" PRIi64 ".", function, range_offset ); return( -1 ); } cache_entry_index = libfdata_list_calculate_cache_entry_index( element_index, number_of_cache_entries ); if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_list_element_get_timestamp( element, &element_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from list element.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_offset, &cache_value_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value identifier.", function ); return( -1 ); } } if( ( range_offset != cache_value_offset ) || ( element_timestamp != cache_value_timestamp ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing cache value.", function ); return( -1 ); } } if( libfcache_cache_value_get_value( cache_value, element_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value of a specific element * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_value_by_index( libfdata_list_t *list, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_get_element_value_by_index"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_get_element_value( list, file_io_handle, cache, list_element, element_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value an element at a specific offset * Returns 1 if successful or -1 on error */ int libfdata_list_get_element_value_at_offset( libfdata_list_t *list, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t value_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { static char *function = "libfdata_list_get_element_value_at_offset"; size_t element_offset = 0; int element_index = 0; if( libfdata_list_get_element_index_at_value_offset( list, value_offset, &element_index, &element_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at offset: %" PRIi64 ".", function, value_offset ); return( -1 ); } if( libfdata_list_get_element_value_by_index( list, file_io_handle, cache, element_index, element_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d value.", function, element_index ); return( -1 ); } return( 1 ); } /* Sets the value of a specific element * * If the flag LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED is set the list * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_list_set_element_value( libfdata_list_t *list, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { static char *function = "libfdata_list_set_element_value"; off64_t range_offset = 0; size64_t range_size = 0; time_t element_timestamp = 0; uint32_t range_flags = 0; int cache_entry_index = -1; int element_index = -1; int number_of_cache_entries = 0; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } if( libfdata_list_element_get_data_range( element, &range_offset, &range_size, &range_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from list element.", function ); return( -1 ); } if( libfdata_list_element_get_timestamp( element, &element_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from list element.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( libfdata_list_element_get_element_index( element, &element_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index from list element.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } cache_entry_index = libfdata_list_calculate_cache_entry_index( element_index, number_of_cache_entries ); if( libfcache_cache_set_value_by_index( cache, cache_entry_index, (int64_t) range_offset, element_timestamp, element_value, free_element_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache entry: %d.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Sets the value of a specific element * * If the flag LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED is set the list * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_list_set_element_value_by_index( libfdata_list_t *list, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; libfdata_list_element_t *list_element = NULL; static char *function = "libfdata_list_set_element_value_by_index"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( libfdata_array_get_entry_by_index( internal_list->elements, element_index, (intptr_t **) &list_element, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve list element: %d from elements array.", function, element_index ); return( -1 ); } if( libfdata_list_set_element_value( list, cache, list_element, element_value, free_element_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set element value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value size of the list * Returns 1 if successful or -1 on error */ int libfdata_list_get_value_size( libfdata_list_t *list, size64_t *value_size, libcerror_error_t **error ) { libfdata_internal_list_t *internal_list = NULL; static char *function = "libfdata_list_get_value_size"; if( list == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid list.", function ); return( -1 ); } internal_list = (libfdata_internal_list_t *) list; if( value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value size.", function ); return( -1 ); } *value_size = internal_list->value_size; return( 1 ); } libpff-20120802/libfdata/libfdata_notify.h0000644000175000017500000000275211765042507015227 00000000000000/* * Notification function * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_NOTIFY_H ) #define _LIBFDATA_NOTIFY_H #include #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ void libfdata_notify_set_verbose( int verbose ); LIBFDATA_EXTERN \ int libfdata_notify_set_stream( FILE *stream, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_notify_stream_open( const char *filename, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_notify_stream_close( libcerror_error_t **error ); #endif #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/Makefile.am0000644000175000017500000000267411765042507013757 00000000000000if HAVE_LOCAL_LIBFDATA AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @LIBCLOCALE_CPPFLAGS@ \ @LIBCNOTIFY_CPPFLAGS@ \ @LIBUNA_CPPFLAGS@ \ @LIBCFILE_CPPFLAGS@ \ @LIBCPATH_CPPFLAGS@ \ @LIBBFIO_CPPFLAGS@ \ @LIBFCACHE_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libfdata.la libfdata_la_SOURCES = \ libfdata_array_type.c libfdata_array_type.h \ libfdata_block.c libfdata_block.h \ libfdata_block_reference.c libfdata_block_reference.h \ libfdata_buffer.c libfdata_buffer.h \ libfdata_buffer_reference.c libfdata_buffer_reference.h \ libfdata_definitions.h \ libfdata_error.c libfdata_error.h \ libfdata_extern.h \ libfdata_inline.h \ libfdata_libbfio.h \ libfdata_libcerror.h \ libfdata_libcnotify.h \ libfdata_libfcache.h \ libfdata_list.c libfdata_list.h \ libfdata_list_element.c libfdata_list_element.h \ libfdata_notify.c libfdata_notify.h \ libfdata_range.c libfdata_range.h \ libfdata_reference.c libfdata_reference.h \ libfdata_support.c libfdata_support.h \ libfdata_tree.c libfdata_tree.h \ libfdata_tree_node.c libfdata_tree_node.h \ libfdata_types.h \ libfdata_unused.h \ libfdata_vector.c libfdata_vector.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) libpff-20120802/libfdata/libfdata_error.c0000644000175000017500000000471111765042507015040 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_error.h" #include "libfdata_libcerror.h" #if !defined( HAVE_LOCAL_LIBFDATA ) /* Free an error and its elements */ void libfdata_error_free( libfdata_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfdata_error_fprint( libfdata_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfdata_error_sprint( libfdata_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libfdata_error_backtrace_fprint( libfdata_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libfdata_error_backtrace_sprint( libfdata_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ libpff-20120802/libfdata/libfdata_array_type.c0000644000175000017500000005336311765042507016075 00000000000000/* * Array type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_array_type.h" #include "libfdata_libcerror.h" /* Creates an array * Make sure the value array is pointing to is set to NULL * Returns 1 if successful or -1 on error */ int libfdata_array_initialize( libfdata_array_t **array, int number_of_entries, libcerror_error_t **error ) { static char *function = "libfdata_array_initialize"; size_t entries_size = 0; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid array value already set.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *array = memory_allocate_structure( libfdata_array_t ); if( *array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array.", function ); goto on_error; } if( memory_set( *array, 0, sizeof( libfdata_array_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array.", function ); goto on_error; } if( number_of_entries > 0 ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); goto on_error; } ( *array )->entries = (intptr_t **) memory_allocate( entries_size ); if( ( *array )->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create array entries.", function ); goto on_error; } if( memory_set( ( *array )->entries, 0, entries_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); goto on_error; } ( *array )->number_of_allocated_entries = number_of_entries; ( *array )->number_of_entries = number_of_entries; } return( 1 ); on_error: if( *array != NULL ) { if( ( *array )->entries != NULL ) { memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( -1 ); } /* Frees an array * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfdata_array_free( libfdata_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfdata_array_free"; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( *array != NULL ) { if( ( *array )->entries != NULL ) { if( libfdata_array_clear( *array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); result = -1; } memory_free( ( *array )->entries ); } memory_free( *array ); *array = NULL; } return( result ); } /* Empties an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfdata_array_empty( libfdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfdata_array_empty"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( libfdata_array_clear( array, entry_free_function, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear array.", function ); return( -1 ); } array->number_of_entries = 0; return( 1 ); } /* Clears an array and frees its entries * The entries are freed using the entry_free_function * Returns 1 if successful or -1 on error */ int libfdata_array_clear( libfdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfdata_array_clear"; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } } return( result ); } /* Clones the array and its entries * * The entries are cloned using the entry_clone_function * On error the entries are freed using the entry_free_function * * Returns 1 if successful or -1 on error */ int libfdata_array_clone( libfdata_array_t **destination_array, libfdata_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ) { static char *function = "libfdata_array_clone"; int entry_iterator = 0; if( destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination array.", function ); return( -1 ); } if( *destination_array != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination array already set.", function ); return( -1 ); } if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } if( entry_clone_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry clone function.", function ); return( -1 ); } if( source_array == NULL ) { *destination_array = NULL; return( 1 ); } if( libfdata_array_initialize( destination_array, source_array->number_of_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination array.", function ); goto on_error; } if( *destination_array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination array.", function ); goto on_error; } if( source_array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < source_array->number_of_entries; entry_iterator++ ) { if( source_array->entries[ entry_iterator ] != NULL ) { if( entry_clone_function( &( ( *destination_array )->entries[ entry_iterator ] ), source_array->entries[ entry_iterator ], error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone array entry: %d.", function, entry_iterator ); goto on_error; } } } } return( 1 ); on_error: if( *destination_array != NULL ) { libfdata_array_free( destination_array, entry_free_function, NULL ); } return( -1 ); } /* Resizes an array * Returns 1 if successful or -1 on error */ int libfdata_array_resize( libfdata_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ) { void *reallocation = NULL; static char *function = "libfdata_array_resize"; size_t entries_size = 0; int entry_iterator = 0; int result = 1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } if( number_of_entries > array->number_of_allocated_entries ) { entries_size = sizeof( intptr_t * ) * number_of_entries; if( entries_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid entries size value exceeds maximum.", function ); return( -1 ); } reallocation = memory_reallocate( array->entries, entries_size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize array entries.", function ); return( -1 ); } array->entries = (intptr_t **) reallocation; if( memory_set( &( array->entries[ array->number_of_allocated_entries ] ), 0, sizeof( intptr_t * ) * ( number_of_entries - array->number_of_allocated_entries ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear array entries.", function ); result = -1; } array->number_of_allocated_entries = number_of_entries; array->number_of_entries = number_of_entries; } else if( number_of_entries > array->number_of_entries ) { array->number_of_entries = number_of_entries; } else if( array->entries != NULL ) { if( entry_free_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry free function.", function ); return( -1 ); } for( entry_iterator = number_of_entries; entry_iterator < array->number_of_entries; entry_iterator++ ) { if( array->entries[ entry_iterator ] != NULL ) { if( entry_free_function != NULL ) { if( entry_free_function( &( array->entries[ entry_iterator ] ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free array entry: %d.", function, entry_iterator ); result = -1; } } array->entries[ entry_iterator ] = NULL; } } array->number_of_entries = number_of_entries; } return( result ); } /* Retrieves the number of entries in the array * Returns 1 if successful or -1 on error */ int libfdata_array_get_number_of_entries( libfdata_array_t *array, int *number_of_entries, libcerror_error_t **error ) { static char *function = "libfdata_array_get_number_of_entries"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( number_of_entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of entries.", function ); return( -1 ); } *number_of_entries = array->number_of_entries; return( 1 ); } /* Retrieves a specific entry from the array * Returns 1 if successful or -1 on error */ int libfdata_array_get_entry_by_index( libfdata_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ) { static char *function = "libfdata_array_get_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } if( entry == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry.", function ); return( -1 ); } *entry = array->entries[ entry_index ]; return( 1 ); } /* Sets a specific entry in the array * Returns 1 if successful or -1 on error */ int libfdata_array_set_entry_by_index( libfdata_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libfdata_array_set_entry_by_index"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } if( ( entry_index < 0 ) || ( entry_index >= array->number_of_entries ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid entry index value out of bounds.", function ); return( -1 ); } array->entries[ entry_index ] = entry; return( 1 ); } /* Appends an entry * Sets the entry index to the newly appended entry * Returns 1 if successful or -1 on error */ int libfdata_array_append_entry( libfdata_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ) { static char *function = "libfdata_array_append_entry"; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } *entry_index = array->number_of_entries; if( libfdata_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; return( 1 ); } /* Inserts an entry in the array * * Uses the entry_compare_function to determine the order of the entries * The entry_compare_function should return LIBFDATA_ARRAY_COMPARE_LESS, * LIBFDATA_ARRAY_COMPARE_EQUAL, LIBFDATA_ARRAY_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBFDATA_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libfdata_array_insert_entry( libfdata_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ) { static char *function = "libfdata_tree_node_insert_node"; int entry_iterator = 0; int result = -1; if( array == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid array.", function ); return( -1 ); } if( entry_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry index.", function ); return( -1 ); } if( entry_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid entry compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBFDATA_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( array->entries != NULL ) { for( entry_iterator = 0; entry_iterator < array->number_of_entries; entry_iterator++ ) { result = entry_compare_function( entry, array->entries[ entry_iterator ], error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare entry: %d.", function, entry_iterator ); return( -1 ); } else if( result == LIBFDATA_ARRAY_COMPARE_EQUAL ) { if( ( insert_flags & LIBFDATA_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES ) != 0 ) { return( 0 ); } } else if( result == LIBFDATA_ARRAY_COMPARE_LESS ) { break; } else if( result != LIBFDATA_ARRAY_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported entry compare function return value: %d.", function, result ); return( -1 ); } } } if( ( array->entries != NULL ) && ( result == LIBFDATA_ARRAY_COMPARE_LESS ) ) { *entry_index = entry_iterator; if( libfdata_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } for( entry_iterator = array->number_of_entries - 1; entry_iterator > *entry_index; entry_iterator-- ) { array->entries[ entry_iterator ] = array->entries[ entry_iterator - 1 ]; } array->entries[ *entry_index ] = entry; } else { *entry_index = array->number_of_entries; if( libfdata_array_resize( array, array->number_of_entries + 1, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize array.", function ); return( -1 ); } if( array->entries == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid array - missing entries.", function ); return( -1 ); } array->entries[ *entry_index ] = entry; } return( 1 ); } libpff-20120802/libfdata/libfdata_list.h0000644000175000017500000001631511765042507014672 00000000000000/* * The list functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_LIST_H ) #define _LIBFDATA_INTERNAL_LIST_H #include #include #include "libfdata_array_type.h" #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_list libfdata_internal_list_t; struct libfdata_internal_list { /* The value size */ size64_t value_size; /* The (list) elements (array) */ libfdata_array_t *elements; /* The flags */ uint8_t flags; /* The io handle */ intptr_t *io_handle; /* The free io handle function */ int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ); /* The clone (duplicate) io handle function */ int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ); /* The read element data function */ int (*read_element_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_list_initialize( libfdata_list_t **list, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*read_element_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_free( libfdata_list_t **list, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_clone( libfdata_list_t **destination_list, libfdata_list_t *source_list, libcerror_error_t **error ); int libfdata_list_clone_elements( libfdata_list_t *destination_list, libfdata_list_t *source_list, libcerror_error_t **error ); /* List element functions */ LIBFDATA_EXTERN \ int libfdata_list_resize( libfdata_list_t *list, int number_of_elements, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_number_of_elements( libfdata_list_t *list, int *number_of_elements, libcerror_error_t **error ); int libfdata_list_calculate_value_offsets( libfdata_internal_list_t *internal_list, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_by_index( libfdata_list_t *list, int element_index, libfdata_list_element_t **element, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_by_offset( libfdata_list_t *list, off64_t element_data_offset, int *element_index, libfdata_list_element_t **element, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_element_by_index( libfdata_list_t *list, int element_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_append_element( libfdata_list_t *list, int *element_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_is_element_set( libfdata_list_t *list, int element_index, libcerror_error_t **error ); /* Data range functions */ LIBFDATA_EXTERN \ int libfdata_list_get_data_range_by_index( libfdata_list_t *list, int element_index, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_data_range_by_index( libfdata_list_t *list, int element_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); /* List element value functions */ int libfdata_list_get_element_index_at_value_offset( libfdata_list_t *list, off64_t value_offset, int *element_index, size_t *element_offset, libcerror_error_t **error ); int libfdata_list_get_element_index_at_value_index( libfdata_list_t *list, int value_index, size_t value_size, int *element_index, size_t *element_offset, libcerror_error_t **error ); int libfdata_list_get_element_value( libfdata_list_t *list, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_value_by_index( libfdata_list_t *list, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_element_value_at_offset( libfdata_list_t *list, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t value_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); int libfdata_list_set_element_value( libfdata_list_t *list, libfcache_cache_t *cache, libfdata_list_element_t *element, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_set_element_value_by_index( libfdata_list_t *list, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_get_value_size( libfdata_list_t *list, size64_t *value_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_block.c0000644000175000017500000016557411765042507015020 00000000000000/* * The block functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_block.h" #include "libfdata_buffer.h" #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_list.h" #include "libfdata_list_element.h" #include "libfdata_types.h" #include "libfdata_unused.h" /* Initializes the block * * If the flag LIBFDATA_FLAG_IO_HANDLE_MANAGED is set the block * takes over management of the IO handle and the IO handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_block_initialize( libfdata_block_t **block, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), ssize_t (*read_segment_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int segment_index, uint8_t *data, size_t data_size, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_initialize"; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } if( *block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid block value already set.", function ); return( -1 ); } if( read_segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read segment data function.", function ); return( -1 ); } internal_block = memory_allocate_structure( libfdata_internal_block_t ); if( internal_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create block.", function ); goto on_error; } if( memory_set( internal_block, 0, sizeof( libfdata_internal_block_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear block.", function ); goto on_error; } if( libfdata_list_initialize( &( internal_block->segments_list ), (intptr_t *) internal_block, NULL, NULL, &libfdata_block_read_element_data, LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create segments list.", function ); goto on_error; } internal_block->flags |= flags; internal_block->io_handle = io_handle; internal_block->free_io_handle = free_io_handle; internal_block->clone_io_handle = clone_io_handle; internal_block->read_segment_data = read_segment_data; *block = (libfdata_block_t *) internal_block; return( 1 ); on_error: if( internal_block != NULL ) { memory_free( internal_block ); } return( -1 ); } /* Frees the block * Returns 1 if successful or -1 on error */ int libfdata_block_free( libfdata_block_t **block, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_free"; int result = 1; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } if( *block != NULL ) { internal_block = (libfdata_internal_block_t *) *block; *block = NULL; if( libfdata_list_free( &( internal_block->segments_list ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the segments list.", function ); result = -1; } if( ( internal_block->flags & LIBFDATA_FLAG_IO_HANDLE_MANAGED ) != 0 ) { if( internal_block->io_handle != NULL ) { if( internal_block->free_io_handle == NULL ) { if( internal_block->free_io_handle( &( internal_block->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } } } } memory_free( internal_block ); } return( result ); } /* Clones (duplicates) the block * Returns 1 if successful or -1 on error */ int libfdata_block_clone( libfdata_block_t **destination_block, libfdata_block_t *source_block, libcerror_error_t **error ) { libfdata_internal_block_t *internal_source_block = NULL; intptr_t *destination_io_handle = NULL; static char *function = "libfdata_block_clone"; if( destination_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination block.", function ); return( -1 ); } if( *destination_block != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination block already set.", function ); return( -1 ); } if( source_block == NULL ) { *destination_block = NULL; return( 1 ); } internal_source_block = (libfdata_internal_block_t *) source_block; if( internal_source_block->io_handle != NULL ) { if( internal_source_block->free_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source block - missing free IO handle function.", function ); goto on_error; } if( internal_source_block->clone_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source block - missing clone IO handle function.", function ); goto on_error; } if( internal_source_block->clone_io_handle( &destination_io_handle, internal_source_block->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination IO handle.", function ); goto on_error; } } if( libfdata_block_initialize( destination_block, destination_io_handle, internal_source_block->free_io_handle, internal_source_block->clone_io_handle, internal_source_block->read_segment_data, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination block.", function ); goto on_error; } if( *destination_block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing destination block.", function ); goto on_error; } destination_io_handle = NULL; if( libfdata_list_clone_elements( ( (libfdata_internal_block_t *) *destination_block )->segments_list, internal_source_block->segments_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_COPY_FAILED, "%s: unable to copy block segment list elements.", function ); goto on_error; } return( 1 ); on_error: if( *destination_block != NULL ) { libfdata_block_free( destination_block, NULL ); } if( destination_io_handle != NULL ) { internal_source_block->free_io_handle( &destination_io_handle, NULL ); } return( -1 ); } /* Resizes the segments * Returns 1 if successful or -1 on error */ int libfdata_block_resize_segments( libfdata_block_t *block, int number_of_segments, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_resize_segments"; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_resize( internal_block->segments_list, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize segments list.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of segments of the block * Returns 1 if successful or -1 on error */ int libfdata_block_get_number_of_segments( libfdata_block_t *block, int *number_of_segments, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_get_number_of_segments"; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_get_number_of_elements( internal_block->segments_list, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from segments list.", function ); return( -1 ); } return( 1 ); } /* Retrieves the offset and size of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_block_get_segment_by_index( libfdata_block_t *block, int segment_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; libfdata_list_element_t *segment = NULL; static char *function = "libfdata_block_get_segment_by_index"; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_get_element_by_index( internal_block->segments_list, segment_index, &segment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_list_element_get_data_range( segment, segment_offset, segment_size, segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d.", function, segment_index ); return( -1 ); } return( 1 ); } /* Sets the offset and size of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_block_set_segment_by_index( libfdata_block_t *block, int segment_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_set_segment_by_index"; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_set_element_by_index( internal_block->segments_list, segment_index, segment_offset, segment_size, segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set element: %d in segments list.", function, segment_index ); return( -1 ); } return( 1 ); } /* Appends a segment offset and size * Returns 1 if successful or -1 on error */ int libfdata_block_append_segment( libfdata_block_t *block, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_append_segment"; int segment_index = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_append_element( internal_block->segments_list, &segment_index, segment_offset, segment_size, segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append element to segments list.", function ); return( -1 ); } return( 1 ); } /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfdata_block_get_size( libfdata_block_t *block, size64_t *size, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_get_size"; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_get_value_size( internal_block->segments_list, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the data of the block * The function caches all the data segments of the block into a single buffer * This function cannot handle data of a size > SSIZE_MAX * Returns 1 if successful or -1 on error */ int libfdata_block_get_data( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { libfdata_buffer_t *data_buffer = NULL; libfcache_cache_value_t *cache_value = NULL; libfdata_internal_block_t *internal_block = NULL; libfdata_list_element_t *segment = NULL; uint8_t *data_buffer_data = NULL; static char *function = "libfdata_block_get_data"; off64_t segment_offset = 0; size64_t data_block_size = 0; size64_t segment_size = 0; size_t data_buffer_size = 0; size_t data_offset = 0; ssize_t read_count = 0; uint32_t segment_flags = 0; int number_of_cache_values = 0; int number_of_segments = 0; int segment_index = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( internal_block->read_segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid block - missing read segment data function.", function ); return( -1 ); } /* Check if all data has been cached in a single cache value */ if( libfcache_cache_get_number_of_cache_values( cache, &number_of_cache_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache values.", function ); return( -1 ); } if( number_of_cache_values == 1 ) { if( libfcache_cache_get_value_by_index( cache, 0, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: 0.", function ); return( -1 ); } } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) &data_buffer, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer from cache value: 0.", function ); return( -1 ); } } if( data_buffer != NULL ) { if( libfdata_buffer_get_data_size( data_buffer, &data_buffer_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer size.", function ); return( -1 ); } } if( libfdata_list_get_value_size( internal_block->segments_list, &data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } /* Read all the data in a single cache value */ if( ( number_of_cache_values != 1 ) || ( cache_value == NULL ) || ( data_buffer == NULL ) || ( data_block_size != (size64_t) data_buffer_size ) ) { if( data_block_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data block size value exceeds maximum.", function ); return( -1 ); } if( libfcache_cache_clear( cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to clear cache.", function ); return( -1 ); } data_buffer = NULL; if( libfdata_buffer_initialize( &data_buffer, (size_t) data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data buffer.", function ); return( -1 ); } if( libfdata_buffer_get_data( data_buffer, &data_buffer_data, &data_buffer_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer.", function ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } if( data_buffer_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing data buffer data.", function ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } if( libfdata_list_get_number_of_elements( internal_block->segments_list, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of elements from segments list.", function ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } /* Read all the segment data into the data buffer */ for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { if( libfdata_list_get_element_by_index( internal_block->segments_list, segment_index, &segment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from segments list.", function, segment_index ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } if( libfdata_list_element_get_data_range( segment, &segment_offset, &segment_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d.", function, segment_index ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } if( libbfio_handle_seek_offset( file_io_handle, segment_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek segment offset: %" PRIi64 ".", function, segment_offset ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } read_count = internal_block->read_segment_data( internal_block->io_handle, file_io_handle, segment_index, &( data_buffer_data[ data_offset ] ), (size_t) segment_size, 0, error ); if( read_count != (ssize_t) segment_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read segment data: %d.", function, segment_index ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } data_offset += (size_t) read_count; } if( libfcache_cache_set_value_by_index( cache, 0, 0, libfcache_date_time_get_timestamp(), (intptr_t *) data_buffer, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_buffer_free, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache entry: 0.", function ); libfdata_buffer_free( &data_buffer, NULL ); return( -1 ); } } if( libfdata_buffer_get_data( data_buffer, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer.", function ); return( -1 ); } return( 1 ); } /* Retrieves the segment data and size of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_block_get_segment_data( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_buffer_t *data_buffer = NULL; libfcache_cache_value_t *cache_value = NULL; libfdata_internal_block_t *internal_block = NULL; libfdata_list_element_t *segment = NULL; static char *function = "libfdata_block_get_segment_data"; off64_t segment_offset = 0; off64_t segment_value_offset = 0; size64_t data_block_size = 0; size64_t segment_size = 0; size_t data_buffer_size = 0; uint32_t segment_flags = 0; int number_of_cache_values = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; /* Check if all data has been cached in a single cache value */ if( libfcache_cache_get_number_of_cache_values( cache, &number_of_cache_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache values.", function ); return( -1 ); } if( number_of_cache_values == 1 ) { if( libfcache_cache_get_value_by_index( cache, 0, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: 0.", function ); return( -1 ); } } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) &data_buffer, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer from cache value: 0.", function ); return( -1 ); } } if( data_buffer != NULL ) { if( libfdata_buffer_get_data_size( data_buffer, &data_buffer_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer size.", function ); return( -1 ); } } if( libfdata_list_get_value_size( internal_block->segments_list, &data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } if( ( ( (libfdata_internal_list_t *) internal_block->segments_list )->flags & LIBFDATA_LIST_FLAG_CALCULATE_VALUE_OFFSETS ) != 0 ) { if( libfdata_list_calculate_value_offsets( (libfdata_internal_list_t *) internal_block->segments_list, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to calculate value offsets.", function ); return( -1 ); } } /* All the data has been cached in a single cache value */ if( data_block_size == (size64_t) data_buffer_size ) { if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( libfdata_list_get_element_by_index( internal_block->segments_list, segment_index, &segment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_list_element_get_data_range( segment, &segment_offset, &segment_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d.", function, segment_index ); return( -1 ); } if( libfdata_list_element_get_value_offset( segment, &segment_value_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d data offset.", function, segment_index ); return( -1 ); } if( segment_value_offset > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid segment value offset value exceeds maximum.", function ); return( -1 ); } if( libfdata_buffer_get_data_at_offset( data_buffer, (size_t) segment_value_offset, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer at offset: %" PRIi64 ".", function, segment_value_offset ); return( -1 ); } if( segment_size > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid segment size value exceeds maximum.", function ); return( -1 ); } *data_size = (size_t) segment_size; } else { if( libfdata_list_get_element_value_by_index( internal_block->segments_list, file_io_handle, cache, segment_index, (intptr_t **) &data_buffer, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_buffer_get_data( data_buffer, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer.", function ); return( -1 ); } } return( 1 ); } /* Retrieves the segment data and size at a certain offset * Returns 1 if successful or -1 on error */ int libfdata_block_get_segment_data_at_offset( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_buffer_t *data_buffer = NULL; libfcache_cache_value_t *cache_value = NULL; libfdata_internal_block_t *internal_block = NULL; libfdata_list_element_t *segment = NULL; static char *function = "libfdata_block_get_segment_data_at_offset"; off64_t segment_offset = 0; size64_t data_block_size = 0; size64_t segment_size = 0; size_t data_buffer_size = 0; size_t segment_data_offset = 0; uint32_t segment_flags = 0; int number_of_cache_values = 0; int segment_index = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_get_element_index_at_value_offset( internal_block->segments_list, data_offset, &segment_index, &segment_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at offset: %" PRIi64 ".", function, data_offset ); return( -1 ); } /* Check if all data has been cached in a single cache value */ if( libfcache_cache_get_number_of_cache_values( cache, &number_of_cache_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache values.", function ); return( -1 ); } if( number_of_cache_values == 1 ) { if( libfcache_cache_get_value_by_index( cache, 0, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: 0.", function ); return( -1 ); } } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) &data_buffer, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer from cache value: 0.", function ); return( -1 ); } } if( data_buffer != NULL ) { if( libfdata_buffer_get_data_size( data_buffer, &data_buffer_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer size.", function ); return( -1 ); } } if( libfdata_list_get_value_size( internal_block->segments_list, &data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } /* All the data has been cached in a single cache value */ if( data_block_size == (size64_t) data_buffer_size ) { if( data_offset > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data offset value exceeds maximum.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( libfdata_list_get_element_by_index( internal_block->segments_list, segment_index, &segment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_list_element_get_data_range( segment, &segment_offset, &segment_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d.", function, segment_index ); return( -1 ); } if( libfdata_buffer_get_data_at_offset( data_buffer, (size_t) data_offset, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer at offset: %" PRIi64 ".", function, data_offset ); return( -1 ); } if( segment_data_offset > segment_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: segment data offset value exceeds segment size.", function ); return( -1 ); } if( ( segment_size - segment_data_offset ) > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } *data_size = (size_t) ( segment_size - segment_data_offset ); } else { if( libfdata_list_get_element_value_by_index( internal_block->segments_list, file_io_handle, cache, segment_index, (intptr_t **) &data_buffer, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_buffer_get_data_at_offset( data_buffer, segment_data_offset, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer at offset: %" PRIzd ".", function, segment_data_offset ); return( -1 ); } } return( 1 ); } /* Retrieves the segment data and size at a specific value index * Returns 1 if successful or -1 on error */ int libfdata_block_get_segment_data_at_value_index( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_buffer_t *data_buffer = NULL; libfcache_cache_value_t *cache_value = NULL; libfdata_internal_block_t *internal_block = NULL; libfdata_list_element_t *segment = NULL; static char *function = "libfdata_block_get_segment_data_at_value_index"; off64_t segment_offset = 0; off64_t segment_value_offset = 0; size64_t data_block_size = 0; size64_t segment_size = 0; size_t data_buffer_size = 0; size_t segment_data_offset = 0; uint32_t segment_flags = 0; int number_of_cache_values = 0; int segment_index = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( libfdata_list_get_element_index_at_value_index( internal_block->segments_list, value_index, value_size, &segment_index, &segment_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at value index: %d for value size: %" PRIzd ".", function, value_index, value_size ); return( -1 ); } /* Check if all data has been cached in a single cache value */ if( libfcache_cache_get_number_of_cache_values( cache, &number_of_cache_values, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache values.", function ); return( -1 ); } if( number_of_cache_values == 1 ) { if( libfcache_cache_get_value_by_index( cache, 0, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value: 0.", function ); return( -1 ); } } if( cache_value != NULL ) { if( libfcache_cache_value_get_value( cache_value, (intptr_t **) &data_buffer, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer from cache value: 0.", function ); return( -1 ); } } if( data_buffer != NULL ) { if( libfdata_buffer_get_data_size( data_buffer, &data_buffer_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data buffer size.", function ); return( -1 ); } } if( libfdata_list_get_value_size( internal_block->segments_list, &data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } /* All the data has been cached in a single cache value */ if( data_block_size == (size64_t) data_buffer_size ) { if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( libfdata_list_get_element_by_index( internal_block->segments_list, segment_index, &segment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_list_element_get_data_range( segment, &segment_offset, &segment_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d.", function, segment_index ); return( -1 ); } if( libfdata_list_element_get_value_offset( segment, &segment_value_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d data offset.", function, segment_index ); return( -1 ); } if( segment_value_offset > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid segment value offset value exceeds maximum.", function ); return( -1 ); } if( libfdata_buffer_get_data_at_offset( data_buffer, (size_t) segment_value_offset + segment_data_offset, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer at offset: %" PRIi64 ".", function, segment_value_offset + segment_data_offset ); return( -1 ); } if( segment_data_offset > segment_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: segment data offset value exceeds segment size.", function ); return( -1 ); } if( ( segment_size - segment_data_offset ) > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } *data_size = (size_t) ( segment_size - segment_data_offset ); } else { if( libfdata_list_get_element_value_by_index( internal_block->segments_list, file_io_handle, cache, segment_index, (intptr_t **) &data_buffer, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value: %d from segments list.", function, segment_index ); return( -1 ); } if( libfdata_buffer_get_data_at_offset( data_buffer, segment_data_offset, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer at offset: %" PRIzd ".", function, segment_data_offset ); return( -1 ); } } return( 1 ); } /* Sets the reference and size of the data of a specific segment * * If the flag LIBFDATA_SEGMENT_DATA_FLAG_MANAGED is set the block * takes over management of the data and the data is freed when * no longer needed. If the flag is not set the block makes a copy of the data. * * Returns 1 if successful or -1 on error */ int libfdata_block_set_segment_data( libfdata_block_t *block, libfcache_cache_t *cache, int segment_index, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ) { libfdata_buffer_t *data_buffer = NULL; libfdata_internal_block_t *internal_block = NULL; libfdata_list_element_t *segment = NULL; static char *function = "libfdata_block_set_segment_data"; off64_t segment_offset = 0; size64_t segment_size = 0; uint32_t segment_flags = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( data_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data size value exceeds maximum.", function ); return( -1 ); } if( libfdata_list_get_element_by_index( internal_block->segments_list, segment_index, &segment, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d from segments list.", function, segment_index ); goto on_error; } if( libfdata_list_element_get_data_range( segment, &segment_offset, &segment_size, &segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment: %d.", function, segment_index ); goto on_error; } if( data_size != (size_t) segment_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: mismatch between data size and segment size.", function ); goto on_error; } if( libfdata_buffer_initialize( &data_buffer, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data buffer.", function ); goto on_error; } if( libfdata_buffer_set_data( data_buffer, data, data_size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data buffer data.", function ); goto on_error; } if( libfdata_list_set_element_value_by_index( internal_block->segments_list, cache, segment_index, (intptr_t *) data_buffer, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_buffer_free, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set element value: %d in segments list.", function, segment_index ); goto on_error; } return( 1 ); on_error: if( data_buffer != NULL ) { libfdata_buffer_free( &data_buffer, NULL ); } return( -1 ); } /* Reads the element data into a data buffer * Returns 1 if successful or -1 on error */ int libfdata_block_read_element_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_flags LIBFDATA_ATTRIBUTE_UNUSED, uint8_t read_flags, libcerror_error_t **error ) { libfdata_buffer_t *data_buffer = NULL; libfdata_internal_block_t *internal_block = NULL; uint8_t *data_buffer_data = NULL; static char *function = "libfdata_block_read_element_data"; size_t data_buffer_size = 0; ssize_t read_count = 0; int segment_index = 0; LIBFDATA_UNREFERENCED_PARAMETER( element_data_flags ) if( io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data block IO handle.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) io_handle; if( internal_block->read_segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid block - missing read segment data function.", function ); return( -1 ); } if( element_data_size > (size64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid element data size value exceeds maximum.", function ); return( -1 ); } if( libfdata_list_element_get_element_index( list_element, &segment_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index from list element.", function ); goto on_error; } if( libfdata_buffer_initialize( &data_buffer, (size_t) element_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data buffer.", function ); goto on_error; } if( libfdata_buffer_get_data( data_buffer, &data_buffer_data, &data_buffer_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data from data buffer.", function ); goto on_error; } if( libbfio_handle_seek_offset( file_io_handle, element_data_offset, SEEK_SET, error ) == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek element data offset: %" PRIi64 ".", function, element_data_offset ); goto on_error; } read_count = internal_block->read_segment_data( internal_block->io_handle, file_io_handle, segment_index, data_buffer_data, (size_t) element_data_size, read_flags, error ); if( read_count != (ssize_t) element_data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element data: %d.", function, segment_index ); goto on_error; } if( libfdata_list_element_set_element_value( list_element, cache, (intptr_t *) data_buffer, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_buffer_free, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set element value in list element.", function ); goto on_error; } return( 1 ); on_error: if( data_buffer != NULL ) { libfdata_buffer_free( &data_buffer, NULL ); } return( -1 ); } /* Reads the segment data into the buffer * Returns the number of bytes read or -1 on error */ ssize_t libfdata_block_read_segment_data( intptr_t *io_handle LIBFDATA_ATTRIBUTE_UNUSED, libbfio_handle_t *file_io_handle, int segment_index LIBFDATA_ATTRIBUTE_UNUSED, uint8_t *data, size_t data_size, uint8_t read_flags LIBFDATA_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libfdata_block_read_segment_data"; ssize_t read_count = 0; LIBFDATA_UNREFERENCED_PARAMETER( io_handle ) LIBFDATA_UNREFERENCED_PARAMETER( segment_index ) LIBFDATA_UNREFERENCED_PARAMETER( read_flags ) read_count = libbfio_handle_read_buffer( file_io_handle, data, data_size, error ); if( read_count != (ssize_t) data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read segment data.", function ); return( -1 ); } return( read_count ); } /* Reads data from the current offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libfdata_block_read_buffer( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; uint8_t *segment_data = NULL; static char *function = "libfdata_block_read_buffer"; size64_t data_block_size = 0; size_t buffer_offset = 0; size_t read_size = 0; size_t segment_data_size = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( buffer_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid buffer size value exceeds maximum.", function ); return( -1 ); } if( libfdata_list_get_value_size( internal_block->segments_list, &data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } if( ( internal_block->data_offset < 0 ) || ( internal_block->data_offset >= (off64_t) data_block_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid block - data offset: %" PRIi64 " value out of bounds: 0 - %" PRIu64 ".", function, internal_block->data_offset, data_block_size ); return( -1 ); } if( (off64_t) ( internal_block->data_offset + buffer_size ) > (off64_t) data_block_size ) { buffer_size = (size_t) ( data_block_size - internal_block->data_offset ); } while( buffer_size > 0 ) { if( libfdata_block_get_segment_data( block, file_io_handle, cache, internal_block->segment_index, &segment_data, &segment_data_size, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment data at offset: %" PRIi64 ".", function, internal_block->data_offset ); return( -1 ); } if( segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment data.", function ); return( -1 ); } read_size = segment_data_size - internal_block->segment_data_offset; if( read_size > buffer_size ) { read_size = buffer_size; } if( memory_copy( &( buffer[ buffer_offset ] ), &( segment_data[ internal_block->segment_data_offset ] ), read_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy segment data to buffer.", function ); return( -1 ); } internal_block->data_offset += read_size; if( ( internal_block->segment_data_offset + read_size ) == segment_data_size ) { internal_block->segment_index += 1; internal_block->segment_data_offset = 0; } else { internal_block->segment_data_offset += read_size; } buffer_size -= read_size; buffer_offset += read_size; } return( (size_t) buffer_offset ); } /* Seeks a certain offset of the data * Returns the offset if seek is successful or -1 on error */ off64_t libfdata_block_seek_offset( libfdata_block_t *block, off64_t offset, int whence, libcerror_error_t **error ) { libfdata_internal_block_t *internal_block = NULL; static char *function = "libfdata_block_seek_offset"; size64_t data_block_size = 0; size_t segment_data_offset = 0; int segment_index = 0; if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } internal_block = (libfdata_internal_block_t *) block; if( internal_block->data_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid block - data offset value out of bounds.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( libfdata_list_get_value_size( internal_block->segments_list, &data_block_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segments list value size.", function ); return( -1 ); } if( whence == SEEK_CUR ) { offset += internal_block->data_offset; } else if( whence == SEEK_END ) { offset += (off64_t) data_block_size; } #if defined( HAVE_VERBOSE_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: seeking offset: %" PRIi64 ".\n", function, offset ); } #endif if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: offset value out of bounds.", function ); return( -1 ); } if( offset < (off64_t) data_block_size ) { if( libfdata_list_get_element_index_at_value_offset( internal_block->segments_list, offset, &segment_index, &segment_data_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at offset %" PRIi64 ".", function, offset ); return( -1 ); } internal_block->segment_index = segment_index; internal_block->segment_data_offset = segment_data_offset; } internal_block->data_offset = offset; return( offset ); } libpff-20120802/libfdata/libfdata_tree_node.h0000644000175000017500000002221411765042507015656 00000000000000/* * The tree node functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_TREE_NODE_H ) #define _LIBFDATA_INTERNAL_TREE_NODE_H #include #include #include "libfdata_array_type.h" #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_range.h" #include "libfdata_tree.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif #define libfdata_tree_node_calculate_branch_node_cache_entry_index( node_data_offset, number_of_cache_entries ) \ ( number_of_cache_entries > 4 ) ? ( node_data_offset % ( number_of_cache_entries / 4 ) ) : ( node_data_offset % number_of_cache_entries ) #define libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_data_offset, number_of_cache_entries ) \ ( number_of_cache_entries > 4 ) ? ( number_of_cache_entries / 4 ) + ( node_data_offset % ( ( number_of_cache_entries * 3 ) / 4 ) ) : ( node_data_offset % number_of_cache_entries ) typedef struct libfdata_internal_tree_node libfdata_internal_tree_node_t; struct libfdata_internal_tree_node { /* The tree reference */ libfdata_tree_t *tree; /* The parent (tree) node reference */ libfdata_tree_node_t *parent_node; /* The (element) data range */ libfdata_range_t *data_range; /* The sub nodes (data) offset */ off64_t sub_nodes_offset; /* The sub nodes (data) size */ size64_t sub_nodes_size; /* The time stamp */ time_t timestamp; /* The flags */ uint8_t flags; /* The sub nodes (array) */ libfdata_array_t *sub_nodes; /* The number of leaf nodes */ int number_of_leaf_nodes; /* The number of deleted leaf nodes */ int number_of_deleted_leaf_nodes; /* The relative first leaf node index */ int first_leaf_node_index; /* The relative first deleted leaf node index */ int first_deleted_leaf_node_index; }; int libfdata_tree_node_initialize( libfdata_tree_node_t **node, libfdata_tree_t *tree, libfdata_tree_node_t *parent_node, libcerror_error_t **error ); int libfdata_tree_node_free( libfdata_tree_node_t **node, libcerror_error_t **error ); int libfdata_tree_node_free_single( libfdata_tree_node_t **node, libcerror_error_t **error ); int libfdata_tree_node_set_parent_node( libfdata_tree_node_t *node, libfdata_tree_node_t *parent_node, libcerror_error_t **error ); int libfdata_tree_node_is_root( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_data_range( libfdata_tree_node_t *node, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_data_range( libfdata_tree_node_t *node, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_sub_nodes_range( libfdata_tree_node_t *node, off64_t *sub_nodes_offset, size64_t *sub_nodes_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_sub_nodes_range( libfdata_tree_node_t *node, off64_t sub_nodes_offset, size64_t sub_nodes_size, libcerror_error_t **error ); int libfdata_tree_node_get_timestamp( libfdata_tree_node_t *node, time_t *timestamp, libcerror_error_t **error ); int libfdata_tree_node_get_first_leaf_node_index( libfdata_tree_node_t *node, int *first_leaf_node_index, int *deleted_first_leaf_node_index, libcerror_error_t **error ); int libfdata_tree_node_set_first_leaf_node_index( libfdata_tree_node_t *node, int first_leaf_node_index, int deleted_first_leaf_node_index, libcerror_error_t **error ); /* Node value functions */ LIBFDATA_EXTERN \ int libfdata_tree_node_get_node_value( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_node_value( libfdata_tree_node_t *node, libfcache_cache_t *cache, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); /* Sub node functions */ LIBFDATA_EXTERN \ int libfdata_tree_node_resize_sub_nodes( libfdata_tree_node_t *node, int number_of_sub_nodes, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_number_of_sub_nodes( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_sub_nodes, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_get_sub_node_by_index( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int sub_node_index, libfdata_tree_node_t **sub_node, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_sub_node_by_index( libfdata_tree_node_t *node, int sub_node_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_append_sub_node( libfdata_tree_node_t *node, int *sub_node_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_insert_sub_node( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *sub_node_index, off64_t offset, size64_t size, uint32_t flags, int (*node_value_compare_function)( intptr_t *first_node_value, intptr_t *second_node_value, libcerror_error_t **error ), uint8_t insert_flags, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_split_sub_nodes( libfdata_tree_node_t *node, int number_of_splits, libcerror_error_t **error ); /* Deleted node functions */ LIBFDATA_EXTERN \ int libfdata_tree_node_is_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_deleted_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ); /* Leaf node functions */ int libfdata_tree_node_set_calculate_leaf_node_values( libfdata_tree_node_t *node, libcerror_error_t **error ); int libfdata_tree_node_read_leaf_node_values( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_is_leaf( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_leaf( libfdata_tree_node_t *node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_node_set_leaf_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ); int libfdata_tree_node_get_number_of_leaf_nodes( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_node_get_leaf_node_by_index( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_node_get_number_of_deleted_leaf_nodes( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_node_get_deleted_leaf_node_by_index( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_types.h0000644000175000017500000000400111765042507015050 00000000000000/* * The internal type definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_TYPES_H ) #define _LIBFDATA_INTERNAL_TYPES_H #include #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata * The definitions in are copied here * for local use of libfdata */ #if defined( HAVE_LOCAL_LIBFDATA ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libfdata_block {} libfdata_block_t; typedef struct libfdata_buffer {} libfdata_buffer_t; typedef struct libfdata_list {} libfdata_list_t; typedef struct libfdata_list_element {} libfdata_list_element_t; typedef struct libfdata_reference {} libfdata_reference_t; typedef struct libfdata_tree {} libfdata_tree_t; typedef struct libfdata_tree_node {} libfdata_tree_node_t; typedef struct libfdata_vector {} libfdata_vector_t; #else typedef intptr_t libfdata_block_t; typedef intptr_t libfdata_buffer_t; typedef intptr_t libfdata_list_t; typedef intptr_t libfdata_list_element_t; typedef intptr_t libfdata_reference_t; typedef intptr_t libfdata_tree_t; typedef intptr_t libfdata_tree_node_t; typedef intptr_t libfdata_vector_t; #endif #endif /* defined( HAVE_LOCAL_LIBFDATA ) */ #endif libpff-20120802/libfdata/libfdata_range.h0000644000175000017500000000352511765042507015012 00000000000000/* * The data range functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_RANGE_H ) #define _LIBFDATA_RANGE_H #include #include #include "libfdata_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_range libfdata_range_t; struct libfdata_range { /* The offset */ off64_t offset; /* The size */ size64_t size; /* The flags */ uint32_t flags; }; int libfdata_range_initialize( libfdata_range_t **range, libcerror_error_t **error ); int libfdata_range_free( libfdata_range_t **range, libcerror_error_t **error ); int libfdata_range_clone( libfdata_range_t **destination_range, libfdata_range_t *source_range, libcerror_error_t **error ); int libfdata_range_get_values( libfdata_range_t *range, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ); int libfdata_range_set_values( libfdata_range_t *range, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_vector.c0000644000175000017500000010245011765042507015210 00000000000000/* * The vector functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_array_type.h" #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_range.h" #include "libfdata_types.h" #include "libfdata_vector.h" #define libfdata_vector_calculate_cache_entry_index( element_index, number_of_cache_entries ) \ element_index % number_of_cache_entries /* Initializes the vector * * If the flag LIBFDATA_FLAG_IO_HANDLE_MANAGED is set the vector * takes over management of the IO handle and the IO handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_vector_initialize( libfdata_vector_t **vector, size64_t element_size, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*read_element_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, off64_t element_data_offset, size64_t element_data_size, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_initialize"; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } if( *vector != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid vector value already set.", function ); return( -1 ); } if( element_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS, "%s: invalid element size value zero or less.", function ); return( -1 ); } if( read_element_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read element data function.", function ); return( -1 ); } internal_vector = memory_allocate_structure( libfdata_internal_vector_t ); if( internal_vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create vector.", function ); goto on_error; } if( memory_set( internal_vector, 0, sizeof( libfdata_internal_vector_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear vector.", function ); goto on_error; } if( libfdata_array_initialize( &( internal_vector->segments ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create segments array.", function ); goto on_error; } internal_vector->element_size = element_size; internal_vector->timestamp = libfcache_date_time_get_timestamp(); internal_vector->flags |= flags; internal_vector->io_handle = io_handle; internal_vector->free_io_handle = free_io_handle; internal_vector->clone_io_handle = clone_io_handle; internal_vector->read_element_data = read_element_data; *vector = (libfdata_vector_t *) internal_vector; return( 1 ); on_error: if( internal_vector != NULL ) { memory_free( internal_vector ); } return( -1 ); } /* Frees the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_free( libfdata_vector_t **vector, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_free"; int result = 1; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } if( *vector != NULL ) { internal_vector = (libfdata_internal_vector_t *) *vector; *vector = NULL; if( libfdata_array_free( &( internal_vector->segments ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_range_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the segments array.", function ); result = -1; } if( ( internal_vector->flags & LIBFDATA_FLAG_IO_HANDLE_MANAGED ) != 0 ) { if( internal_vector->io_handle != NULL ) { if( internal_vector->free_io_handle != NULL ) { if( internal_vector->free_io_handle( &( internal_vector->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } } } } memory_free( internal_vector ); } return( result ); } /* Clones (duplicates) the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_clone( libfdata_vector_t **destination_vector, libfdata_vector_t *source_vector, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_source_vector = NULL; intptr_t *destination_io_handle = NULL; static char *function = "libfdata_vector_clone"; if( destination_vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination vector.", function ); return( -1 ); } if( *destination_vector != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination vector already set.", function ); return( -1 ); } if( source_vector == NULL ) { *destination_vector = source_vector; return( 1 ); } internal_source_vector = (libfdata_internal_vector_t *) source_vector; if( internal_source_vector->io_handle != NULL ) { if( internal_source_vector->free_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source vector - missing free IO handle function.", function ); goto on_error; } if( internal_source_vector->clone_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source vector - missing clone IO handle function.", function ); goto on_error; } if( internal_source_vector->clone_io_handle( &destination_io_handle, internal_source_vector->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone IO handle.", function ); goto on_error; } } if( libfdata_vector_initialize( destination_vector, internal_source_vector->element_size, destination_io_handle, internal_source_vector->free_io_handle, internal_source_vector->clone_io_handle, internal_source_vector->read_element_data, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination vector.", function ); goto on_error; } /* TODO clone data ranges */ return( 1 ); on_error: if( destination_io_handle != NULL ) { internal_source_vector->free_io_handle( &destination_io_handle, NULL ); } return( -1 ); } /* Retrieves the number of elements of the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_get_number_of_elements( libfdata_vector_t *vector, int *number_of_elements, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_number_of_elements"; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( internal_vector->element_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element size value out of bounds.", function ); return( -1 ); } if( number_of_elements == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of elements.", function ); return( -1 ); } *number_of_elements = (int) ( internal_vector->value_size / internal_vector->element_size ); return( 1 ); } /* Retrieves the element index for a specific offset * Returns 1 if successful or -1 on error */ int libfdata_vector_get_element_index_at_offset( libfdata_vector_t *vector, off64_t value_offset, int *element_index, size_t *element_offset, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_vector_get_element_index_at_offset"; off64_t segment_data_offset = 0; uint64_t calculated_element_index = 0; int number_of_segments = 0; int segment_index = 0; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( internal_vector->element_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element size value out of bounds.", function ); return( -1 ); } if( value_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid value offset value less than zero.", function ); return( -1 ); } if( element_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element index.", function ); return( -1 ); } if( element_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element offset.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_vector->segments, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of segments.", function ); return( -1 ); } if( number_of_segments <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of segments value out of bounds.", function ); return( -1 ); } for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { if( libfdata_array_get_entry_by_index( internal_vector->segments, segment_index, (intptr_t **) &segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment data range: %d from array.", function, segment_index ); return( -1 ); } if( segment_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment data range: %d.", function, segment_index ); return( -1 ); } /* TODO what about compressed data ranges */ if( value_offset < (off64_t)( segment_data_offset + segment_data_range->size ) ) { break; } segment_data_offset += (off64_t) segment_data_range->size; } if( segment_index >= number_of_segments ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } calculated_element_index = segment_data_offset + value_offset; calculated_element_index /= internal_vector->element_size; if( calculated_element_index > (uint64_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid element index value exceeds maximum.", function ); return( -1 ); } value_offset -= (off64_t) ( calculated_element_index * internal_vector->element_size ); if( ( value_offset < 0 ) || ( value_offset > (off64_t) SSIZE_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element offset value out of bounds.", function ); return( -1 ); } *element_index = (int) calculated_element_index; *element_offset = (size_t) value_offset; return( 1 ); } /* Appends a segment offset and size * Returns 1 if successful or -1 on error */ int libfdata_vector_append_segment( libfdata_vector_t *vector, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_vector_append_segment"; int segment_index = 0; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( libfdata_range_initialize( &segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create segment data range.", function ); goto on_error; } if( libfdata_range_set_values( segment_data_range, segment_offset, segment_size, segment_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set segment data range.", function ); goto on_error; } if( libfdata_array_append_entry( internal_vector->segments, &segment_index, (intptr_t *) segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append data range to segments array.", function ); goto on_error; } internal_vector->value_size += segment_size; return( 1 ); on_error: if( segment_data_range != NULL ) { libfdata_range_free( &segment_data_range, NULL ); } return( -1 ); } /* Retrieves the value of a specific element * Returns 1 if successful or -1 on error */ int libfdata_vector_get_element_value_by_index( libfdata_vector_t *vector, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_vector_t *internal_vector = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_vector_get_element_value_by_index"; off64_t cache_value_offset = (off64_t) -1; off64_t element_data_offset = 0; time_t cache_value_timestamp = 0; int cache_entry_index = -1; int number_of_cache_entries = 0; int number_of_segments = 0; int result = 0; int segment_index = 0; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( internal_vector->element_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element size value out of bounds.", function ); return( -1 ); } if( ( internal_vector->value_size == 0 ) || ( internal_vector->value_size > (off64_t) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - value size value out of bounds.", function ); return( -1 ); } if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } element_data_offset = (off64_t) ( element_index * internal_vector->element_size ); if( element_data_offset > (off64_t) internal_vector->value_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_vector->segments, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of segments.", function ); return( -1 ); } if( number_of_segments <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of segments value out of bounds.", function ); return( -1 ); } for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { if( libfdata_array_get_entry_by_index( internal_vector->segments, segment_index, (intptr_t **) &segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment data range: %d from array.", function, segment_index ); return( -1 ); } if( segment_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment data range: %d.", function, segment_index ); return( -1 ); } /* TODO what about compressed data ranges */ if( element_data_offset < (off64_t) segment_data_range->size ) { element_data_offset += segment_data_range->offset; break; } element_data_offset -= segment_data_range->size; } if( segment_index >= number_of_segments ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { cache_entry_index = libfdata_vector_calculate_cache_entry_index( element_index, number_of_cache_entries ); if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_identifier( cache_value, &cache_value_offset, &cache_value_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value identifier.", function ); return( -1 ); } } if( ( element_data_offset == cache_value_offset ) && ( internal_vector->timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (%d out of %d)\n", function, (intptr_t) cache, cache_entry_index, number_of_cache_entries ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading element data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, element_data_offset, element_data_offset, internal_vector->element_size ); } #endif /* Read the element data from the file IO handle */ if( internal_vector->read_element_data( internal_vector->io_handle, file_io_handle, vector, cache, element_index, element_data_offset, internal_vector->element_size, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read element data at offset: %" PRIi64 ".", function, element_data_offset ); return( -1 ); } cache_entry_index = libfdata_vector_calculate_cache_entry_index( element_index, number_of_cache_entries ); if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfcache_cache_value_get_identifier( cache_value, &cache_value_offset, &cache_value_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value identifier.", function ); return( -1 ); } } if( ( element_data_offset != cache_value_offset ) || ( internal_vector->timestamp != cache_value_timestamp ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing cache value.", function ); return( -1 ); } } if( libfcache_cache_value_get_value( cache_value, element_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element value.", function ); return( -1 ); } return( 1 ); } /* Retrieves the value an element at a specific offset * Returns 1 if successful or -1 on error */ int libfdata_vector_get_element_value_at_offset( libfdata_vector_t *vector, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t value_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ) { static char *function = "libfdata_vector_get_element_value_at_offset"; size_t element_offset = 0; int element_index = 0; if( libfdata_vector_get_element_index_at_offset( vector, value_offset, &element_index, &element_offset, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element index at offset: %" PRIi64 ".", function, value_offset ); return( -1 ); } if( libfdata_vector_get_element_value_by_index( vector, file_io_handle, cache, element_index, element_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve element: %d value.", function, element_index ); return( -1 ); } return( 1 ); } /* Sets the value of a specific element * * If the flag LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED is set the vector * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_vector_set_element_value_by_index( libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; libfdata_range_t *segment_data_range = NULL; static char *function = "libfdata_vector_set_element_value_by_index"; off64_t element_data_offset = 0; int cache_entry_index = -1; int number_of_cache_entries = 0; int number_of_segments = 0; int segment_index = 0; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( internal_vector->element_size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - element size value out of bounds.", function ); return( -1 ); } if( ( internal_vector->value_size == 0 ) || ( internal_vector->value_size > (off64_t) INT64_MAX ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid vector - value size value out of bounds.", function ); return( -1 ); } if( element_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } element_data_offset = (off64_t) ( element_index * internal_vector->element_size ); if( element_data_offset > (off64_t) internal_vector->value_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid element index value out of bounds.", function ); return( -1 ); } if( libfdata_array_get_number_of_entries( internal_vector->segments, &number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of segments.", function ); return( -1 ); } if( number_of_segments <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of segments value out of bounds.", function ); return( -1 ); } for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { if( libfdata_array_get_entry_by_index( internal_vector->segments, segment_index, (intptr_t **) &segment_data_range, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment data range: %d from array.", function, segment_index ); return( -1 ); } if( segment_data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment data range: %d.", function, segment_index ); return( -1 ); } /* TODO what about compressed data ranges */ if( element_data_offset < (off64_t) segment_data_range->size ) { element_data_offset += segment_data_range->offset; break; } element_data_offset -= segment_data_range->size; } if( segment_index >= number_of_segments ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } cache_entry_index = libfdata_vector_calculate_cache_entry_index( element_index, number_of_cache_entries ); if( libfcache_cache_set_value_by_index( cache, cache_entry_index, (int64_t) element_data_offset, internal_vector->timestamp, element_value, free_element_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache entry: %d.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Retrieves the element size of the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_get_element_size( libfdata_vector_t *vector, size64_t *element_size, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_element_size"; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( element_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid element size.", function ); return( -1 ); } *element_size = internal_vector->element_size; return( 1 ); } /* Retrieves the value size of the vector * Returns 1 if successful or -1 on error */ int libfdata_vector_get_value_size( libfdata_vector_t *vector, size64_t *value_size, libcerror_error_t **error ) { libfdata_internal_vector_t *internal_vector = NULL; static char *function = "libfdata_vector_get_value_size"; if( vector == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid vector.", function ); return( -1 ); } internal_vector = (libfdata_internal_vector_t *) vector; if( value_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid value size.", function ); return( -1 ); } *value_size = internal_vector->value_size; return( 1 ); } libpff-20120802/libfdata/libfdata_vector.h0000644000175000017500000001222511765042507015215 00000000000000/* * The vector functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_VECTOR_H ) #define _LIBFDATA_INTERNAL_VECTOR_H #include #include #include "libfdata_array_type.h" #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_vector libfdata_internal_vector_t; struct libfdata_internal_vector { /* The element size */ size64_t element_size; /* The value size */ size64_t value_size; /* The segments array */ libfdata_array_t *segments; /* The time stamp */ time_t timestamp; /* The flags */ uint8_t flags; /* The io handle */ intptr_t *io_handle; /* The free io handle function */ int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ); /* The clone (duplicate) io handle function */ int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ); /* The read element data function */ int (*read_element_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, off64_t element_data_offset, size64_t element_data_size, uint8_t read_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_vector_initialize( libfdata_vector_t **vector, size64_t element_size, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*read_element_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, off64_t element_data_offset, size64_t element_data_size, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_free( libfdata_vector_t **vector, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_clone( libfdata_vector_t **destination_vector, libfdata_vector_t *source_vector, libcerror_error_t **error ); /* Segment functions */ LIBFDATA_EXTERN \ int libfdata_vector_append_segment( libfdata_vector_t *vector, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); /* Vector element functions */ LIBFDATA_EXTERN \ int libfdata_vector_get_number_of_elements( libfdata_vector_t *vector, int *number_of_elements, libcerror_error_t **error ); int libfdata_vector_get_element_index_at_offset( libfdata_vector_t *vector, off64_t value_offset, int *element_index, size_t *element_offset, libcerror_error_t **error ); /* Vector element value functions */ LIBFDATA_EXTERN \ int libfdata_vector_get_element_value_by_index( libfdata_vector_t *vector, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int element_index, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_get_element_value_at_offset( libfdata_vector_t *vector, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t value_offset, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_set_element_value_by_index( libfdata_vector_t *vector, libfcache_cache_t *cache, int element_index, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_get_element_size( libfdata_vector_t *vector, size64_t *element_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_vector_get_value_size( libfdata_vector_t *vector, size64_t *value_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_buffer_reference.h0000644000175000017500000000767411765042507017216 00000000000000/* * Buffer data reference functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_BUFFER_REFERENCE_H ) #define _LIBFDATA_BUFFER_REFERENCE_H #include #include #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_buffer_reference libfdata_buffer_reference_t; struct libfdata_buffer_reference { /* The data offset */ off64_t data_offset; /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The flags */ uint8_t flags; }; LIBFDATA_EXTERN \ int libfdata_buffer_reference_initialize( libfdata_reference_t **reference, const uint8_t *buffer, size_t buffer_size, uint8_t flags, libcerror_error_t **error ); int libfdata_buffer_reference_free( libfdata_buffer_reference_t **buffer_reference, libcerror_error_t **error ); int libfdata_buffer_reference_clone( libfdata_buffer_reference_t **destination_buffer_reference, libfdata_buffer_reference_t *source_buffer_reference, libcerror_error_t **error ); /* Segment functions */ int libfdata_buffer_reference_get_number_of_segments( libfdata_buffer_reference_t *buffer_reference, int *number_of_segments, libcerror_error_t **error ); /* Data functions */ int libfdata_buffer_reference_get_size( libfdata_buffer_reference_t *buffer_reference, size64_t *size, libcerror_error_t **error ); int libfdata_buffer_reference_get_data( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ); int libfdata_buffer_reference_get_segment_data( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); int libfdata_buffer_reference_get_segment_data_at_offset( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); int libfdata_buffer_reference_get_segment_data_at_value_index( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); /* IO functions */ ssize_t libfdata_buffer_reference_read_buffer( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); off64_t libfdata_buffer_reference_seek_offset( libfdata_buffer_reference_t *buffer_reference, off64_t offset, int whence, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_tree.h0000644000175000017500000001376111765042507014660 00000000000000/* * The tree functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_TREE_H ) #define _LIBFDATA_INTERNAL_TREE_H #include #include #include "libfdata_array_type.h" #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_tree libfdata_internal_tree_t; struct libfdata_internal_tree { /* The root node */ libfdata_tree_node_t *root_node; /* The flags */ uint8_t flags; /* The io handle */ intptr_t *io_handle; /* The free io handle function */ int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ); /* The clone (duplicate) io handle function */ int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ); /* The read node data function */ int (*read_node_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags, libcerror_error_t **error ); /* The read sub nodes function */ int (*read_sub_nodes)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint8_t read_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_tree_initialize( libfdata_tree_t **tree, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*read_node_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags, libcerror_error_t **error ), int (*read_sub_nodes)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_free( libfdata_tree_t **tree, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_clone( libfdata_tree_t **destination_tree, libfdata_tree_t *source_tree, libcerror_error_t **error ); /* Node value functions */ int libfdata_tree_get_node_value( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ); int libfdata_tree_set_node_value( libfdata_tree_t *tree, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); /* Sub node functions */ int libfdata_tree_read_sub_nodes( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, uint8_t read_flags, libcerror_error_t **error ); /* Root node functions */ LIBFDATA_EXTERN \ int libfdata_tree_get_root_node( libfdata_tree_t *tree, libfdata_tree_node_t **root_node, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_set_root_node( libfdata_tree_t *tree, off64_t node_data_offset, size64_t node_data_size, libcerror_error_t **error ); /* Leaf node functions */ LIBFDATA_EXTERN \ int libfdata_tree_get_number_of_leaf_nodes( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_get_leaf_node_by_index( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_get_number_of_deleted_leaf_nodes( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_tree_get_deleted_leaf_node_by_index( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_support.h0000644000175000017500000000225211765042507015426 00000000000000/* * Support functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_SUPPORT_H ) #define _LIBFDATA_SUPPORT_H #include #include #include "libfdata_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ const char *libfdata_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_buffer.h0000644000175000017500000000500011765042507015155 00000000000000/* * Buffer functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_BUFFER_H ) #define _LIBFDATA_INTERNAL_BUFFER_H #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_buffer libfdata_internal_buffer_t; struct libfdata_internal_buffer { /* The data */ uint8_t *data; /* The data size */ size_t data_size; /* The flags */ uint8_t flags; }; LIBFDATA_EXTERN \ int libfdata_buffer_initialize( libfdata_buffer_t **buffer, size_t size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_free( libfdata_buffer_t **buffer, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_clone( libfdata_buffer_t **destination_buffer, libfdata_buffer_t *source_buffer, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_resize( libfdata_buffer_t *buffer, size_t size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_get_data_size( libfdata_buffer_t *buffer, size_t *data_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_get_data( libfdata_buffer_t *buffer, uint8_t **data, size_t *data_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_get_data_at_offset( libfdata_buffer_t *buffer, size_t data_offset, uint8_t **data, size_t *data_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_buffer_set_data( libfdata_buffer_t *buffer, const uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_libfcache.h0000644000175000017500000000252611765042507015616 00000000000000/* * The internal libfcache header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBFCACHE_H ) #define _LIBFDATA_LIBFCACHE_H #include /* Define HAVE_LOCAL_LIBFCACHE for local use of libfcache */ #if defined( HAVE_LOCAL_LIBFCACHE ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBFCACHE_DLL_IMPORT * before including libfcache.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBFCACHE_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfdata/libfdata_block_reference.h0000644000175000017500000000243711765042507017027 00000000000000/* * Block data reference functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_BLOCK_REFERENCE_H ) #define _LIBFDATA_BLOCK_REFERENCE_H #include #include #include "libfdata_extern.h" #include "libfdata_libcerror.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBFDATA_EXTERN \ int libfdata_block_reference_initialize( libfdata_reference_t **reference, libfdata_block_t *block, uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_libcerror.h0000644000175000017500000000252311765042507015676 00000000000000/* * The internal libcerror header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBCERROR_H ) #define _LIBFDATA_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfdata/libfdata_libbfio.h0000644000175000017500000000251711765042507015324 00000000000000/* * The libbfio header wrapper * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBBFIO_H ) #define _LIBFDATA_LIBBFIO_H #include /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio */ #if defined( HAVE_LOCAL_LIBBFIO ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT * before including libbfio.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBBFIO_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfdata/libfdata_block.h0000644000175000017500000001524411765042507015011 00000000000000/* * The block functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_BLOCK_H ) #define _LIBFDATA_INTERNAL_BLOCK_H #include #include #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_block libfdata_internal_block_t; struct libfdata_internal_block { /* The data offset */ off64_t data_offset; /* The segment index */ int segment_index; /* The segment data offset */ size_t segment_data_offset; /* The segments list */ libfdata_list_t *segments_list; /* The flags */ uint8_t flags; /* The io handle */ intptr_t *io_handle; /* The free io handle function */ int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ); /* The clone (duplicate) io handle function */ int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ); /* The read segment data function */ ssize_t (*read_segment_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int segment_index, uint8_t *data, size_t data_size, uint8_t read_flags, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_block_initialize( libfdata_block_t **block, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), ssize_t (*read_segment_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int segment_index, uint8_t *data, size_t data_size, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_free( libfdata_block_t **block, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_clone( libfdata_block_t **destination_block, libfdata_block_t *source_block, libcerror_error_t **error ); /* Segment functions */ LIBFDATA_EXTERN \ int libfdata_block_resize_segments( libfdata_block_t *block, int number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_get_number_of_segments( libfdata_block_t *block, int *number_of_segments, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_get_segment_by_index( libfdata_block_t *block, int segment_index, off64_t *segment_offset, size64_t *segment_size, uint32_t *segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_set_segment_by_index( libfdata_block_t *block, int segment_index, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_append_segment( libfdata_block_t *block, off64_t segment_offset, size64_t segment_size, uint32_t segment_flags, libcerror_error_t **error ); /* Data functions */ LIBFDATA_EXTERN \ int libfdata_block_get_size( libfdata_block_t *block, size64_t *size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_get_data( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_get_segment_data( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_get_segment_data_at_offset( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_get_segment_data_at_value_index( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_block_set_segment_data( libfdata_block_t *block, libfcache_cache_t *cache, int segment_index, uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ); /* IO functions */ int libfdata_block_read_element_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_list_element_t *list_element, libfcache_cache_t *cache, off64_t element_data_offset, size64_t element_data_size, uint32_t element_data_range_flags, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ ssize_t libfdata_block_read_segment_data( intptr_t *io_handle, libbfio_handle_t *file_io_handle, int segment_index, uint8_t *data, size_t data_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ ssize_t libfdata_block_read_buffer( libfdata_block_t *block, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ off64_t libfdata_block_seek_offset( libfdata_block_t *block, off64_t offset, int whence, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_array_type.h0000644000175000017500000001006511765042507016072 00000000000000/* * Array type functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_ARRAY_TYPE_H ) #define _LIBFDATA_ARRAY_TYPE_H #include #include #include "libfdata_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif /* The array comparison definitions */ enum LIBFDATA_ARRAY_COMPARE_DEFINITIONS { /* The first value is less than the second value */ LIBFDATA_ARRAY_COMPARE_LESS, /* The first and second values are equal */ LIBFDATA_ARRAY_COMPARE_EQUAL, /* The first value is greater than the second value */ LIBFDATA_ARRAY_COMPARE_GREATER }; /* The array insert flag definitions */ enum LIBFDATA_ARRAY_INSERT_FLAGS { /* Allow duplicate entries */ LIBFDATA_ARRAY_INSERT_FLAG_NON_UNIQUE_ENTRIES = 0x00, /* Only allow unique entries, no duplicates */ LIBFDATA_ARRAY_INSERT_FLAG_UNIQUE_ENTRIES = 0x01, }; typedef struct libfdata_array libfdata_array_t; struct libfdata_array { /* The number of allocated entries */ int number_of_allocated_entries; /* The number of entries */ int number_of_entries; /* The entries */ intptr_t **entries; }; int libfdata_array_initialize( libfdata_array_t **array, int number_of_entries, libcerror_error_t **error ); int libfdata_array_free( libfdata_array_t **array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfdata_array_empty( libfdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfdata_array_clear( libfdata_array_t *array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfdata_array_clone( libfdata_array_t **destination_array, libfdata_array_t *source_array, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), int (*entry_clone_function)( intptr_t **destination, intptr_t *source, libcerror_error_t **error ), libcerror_error_t **error ); int libfdata_array_resize( libfdata_array_t *array, int number_of_entries, int (*entry_free_function)( intptr_t **entry, libcerror_error_t **error ), libcerror_error_t **error ); int libfdata_array_get_number_of_entries( libfdata_array_t *array, int *number_of_entries, libcerror_error_t **error ); int libfdata_array_get_entry_by_index( libfdata_array_t *array, int entry_index, intptr_t **entry, libcerror_error_t **error ); int libfdata_array_set_entry_by_index( libfdata_array_t *array, int entry_index, intptr_t *entry, libcerror_error_t **error ); int libfdata_array_append_entry( libfdata_array_t *array, int *entry_index, intptr_t *entry, libcerror_error_t **error ); int libfdata_array_insert_entry( libfdata_array_t *array, int *entry_index, intptr_t *entry, int (*entry_compare_function)( intptr_t *first_entry, intptr_t *second_entry, libcerror_error_t **error ), uint8_t insert_flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_tree.c0000644000175000017500000007202311765042507014647 00000000000000/* * The tree functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_tree.h" #include "libfdata_tree_node.h" #include "libfdata_types.h" /* Initializes the tree * * If the flag LIBFDATA_FLAG_IO_HANDLE_MANAGED is set the tree * takes over management of the IO handle and the IO handle is freed when * no longer needed * * Returns 1 if successful or -1 on error */ int libfdata_tree_initialize( libfdata_tree_t **tree, intptr_t *io_handle, int (*free_io_handle)( intptr_t **io_handle, libcerror_error_t **error ), int (*clone_io_handle)( intptr_t **destination_io_handle, intptr_t *source_io_handle, libcerror_error_t **error ), int (*read_node_data)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t node_data_offset, size64_t node_data_size, uint8_t read_flags, libcerror_error_t **error ), int (*read_sub_nodes)( intptr_t *io_handle, libbfio_handle_t *file_io_handle, libfdata_tree_node_t *node, libfcache_cache_t *cache, off64_t sub_nodes_offset, size64_t sub_nodes_size, uint8_t read_flags, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_initialize"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( *tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid tree value already set.", function ); return( -1 ); } if( read_node_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read node data function.", function ); return( -1 ); } if( read_sub_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid read sub nodes function.", function ); return( -1 ); } internal_tree = memory_allocate_structure( libfdata_internal_tree_t ); if( internal_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create tree.", function ); goto on_error; } if( memory_set( internal_tree, 0, sizeof( libfdata_internal_tree_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear tree.", function ); goto on_error; } internal_tree->flags |= flags; internal_tree->io_handle = io_handle; internal_tree->free_io_handle = free_io_handle; internal_tree->clone_io_handle = clone_io_handle; internal_tree->read_node_data = read_node_data; internal_tree->read_sub_nodes = read_sub_nodes; *tree = (libfdata_tree_t *) internal_tree; return( 1 ); on_error: if( internal_tree != NULL ) { memory_free( internal_tree ); } return( -1 ); } /* Frees the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_free( libfdata_tree_t **tree, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_free"; int result = 1; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( *tree != NULL ) { internal_tree = (libfdata_internal_tree_t *) *tree; *tree = NULL; if( internal_tree->root_node != NULL ) { if( libfdata_tree_node_free( &( internal_tree->root_node ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free root node.", function ); result = -1; } } if( ( internal_tree->flags & LIBFDATA_FLAG_IO_HANDLE_MANAGED ) != 0 ) { if( internal_tree->io_handle != NULL ) { if( internal_tree->free_io_handle != NULL ) { if( internal_tree->free_io_handle( &( internal_tree->io_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free IO handle.", function ); result = -1; } } } } memory_free( internal_tree ); } return( result ); } /* Clones (duplicates) the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_clone( libfdata_tree_t **destination_tree, libfdata_tree_t *source_tree, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_source_tree = NULL; libfdata_tree_node_t *source_tree_root_node = NULL; intptr_t *destination_io_handle = NULL; static char *function = "libfdata_tree_clone"; off64_t node_data_offset = 0; size64_t node_data_size = 0; uint32_t node_data_flags = 0; if( destination_tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination tree.", function ); return( -1 ); } if( *destination_tree != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination tree already set.", function ); return( -1 ); } if( source_tree == NULL ) { *destination_tree = NULL; return( 1 ); } internal_source_tree = (libfdata_internal_tree_t *) source_tree; if( internal_source_tree->io_handle != NULL ) { if( internal_source_tree->free_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing free IO handle function.", function ); goto on_error; } if( internal_source_tree->clone_io_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source tree - missing clone IO handle function.", function ); goto on_error; } if( internal_source_tree->clone_io_handle( &destination_io_handle, internal_source_tree->io_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to clone IO handle.", function ); goto on_error; } } if( libfdata_tree_initialize( destination_tree, destination_io_handle, internal_source_tree->free_io_handle, internal_source_tree->clone_io_handle, internal_source_tree->read_node_data, internal_source_tree->read_sub_nodes, LIBFDATA_FLAG_IO_HANDLE_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination tree.", function ); goto on_error; } destination_io_handle = NULL; if( libfdata_tree_get_root_node( source_tree, &source_tree_root_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve source tree root node.", function ); goto on_error; } if( libfdata_tree_node_get_data_range( source_tree_root_node, &node_data_offset, &node_data_size, &node_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve source tree root node data range.", function ); goto on_error; } if( libfdata_tree_set_root_node( *destination_tree, node_data_offset, node_data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set destination tree root node.", function ); goto on_error; } /* TODO or clone all the tree nodes ? */ return( 1 ); on_error: if( *destination_tree != NULL ) { libfdata_tree_free( destination_tree, NULL ); } if( destination_io_handle != NULL ) { internal_source_tree->free_io_handle( &destination_io_handle, NULL ); } return( -1 ); } /* Retrieves the node value of the node * Returns 1 if successful or -1 on error */ int libfdata_tree_get_node_value( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_value_t *cache_value = NULL; libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_node_value"; off64_t cache_value_offset = (off64_t) -1; off64_t node_data_offset = 0; size64_t node_data_size = 0; time_t cache_value_timestamp = 0; time_t node_timestamp = 0; uint32_t node_data_flags = 0; int cache_entry_index = -1; int number_of_cache_entries = 0; int result = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( internal_tree->read_node_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing read node data function.", function ); return( -1 ); } if( libfdata_tree_node_get_data_range( node, &node_data_offset, &node_data_size, &node_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from tree node.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( read_flags & LIBFDATA_READ_FLAG_IGNORE_CACHE ) == 0 ) { if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_data_offset, number_of_cache_entries ); } else { cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( node_data_offset, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_tree_node_get_timestamp( node, &node_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from tree node.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_offset, &cache_value_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value identifier.", function ); return( -1 ); } } if( ( node_data_offset == cache_value_offset ) && ( node_timestamp == cache_value_timestamp ) ) { result = 1; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { if( result == 0 ) { libcnotify_printf( "%s: cache: 0x%08" PRIjx " miss (entry: %d, want: %" PRIi64 ", got: %" PRIi64 ")\n", function, (intptr_t) cache, cache_entry_index, node_data_offset, cache_value_offset ); } else { libcnotify_printf( "%s: cache: 0x%08" PRIjx " hit (entry: %d)\n", function, (intptr_t) cache, cache_entry_index ); } } #endif } if( result == 0 ) { #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: reading node data at offset: %" PRIi64 " (0x%08" PRIx64 ") of size: %" PRIu64 "\n", function, node_data_offset, node_data_offset, node_data_size ); } #endif /* Read the node data from the file IO handle */ if( internal_tree->read_node_data( internal_tree->io_handle, file_io_handle, node, cache, node_data_offset, node_data_size, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read node data at offset: %" PRIi64 ".", function, node_data_offset ); return( -1 ); } if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_data_offset, number_of_cache_entries ); } else { cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( node_data_offset, number_of_cache_entries ); } if( libfcache_cache_get_value_by_index( cache, cache_entry_index, &cache_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache entry: %d from cache.", function, cache_entry_index ); return( -1 ); } if( cache_value != NULL ) { if( libfdata_tree_node_get_timestamp( node, &node_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve time stamp from tree node.", function ); return( -1 ); } if( libfcache_cache_value_get_identifier( cache_value, &cache_value_offset, &cache_value_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve cache value identifier.", function ); return( -1 ); } } if( ( node_data_offset != cache_value_offset ) || ( node_timestamp != cache_value_timestamp ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing cache value.", function ); return( -1 ); } } if( libfcache_cache_value_get_value( cache_value, node_value, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } return( 1 ); } /* Sets the node value of the node * * If the flag LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED is set the tree * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_tree_set_node_value( libfdata_tree_t *tree, libfcache_cache_t *cache, libfdata_tree_node_t *node, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { static char *function = "libfdata_tree_set_node_value"; off64_t node_data_offset = 0; size64_t node_data_size = 0; time_t node_timestamp = 0; uint32_t node_data_flags = 0; int cache_entry_index = -1; int number_of_cache_entries = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } if( libfdata_tree_node_get_data_range( node, &node_data_offset, &node_data_size, &node_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range from tree node.", function ); return( -1 ); } if( libfdata_tree_node_get_timestamp( node, &node_timestamp, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve timestamp from tree node.", function ); return( -1 ); } if( libfcache_cache_get_number_of_entries( cache, &number_of_cache_entries, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of cache entries.", function ); return( -1 ); } if( number_of_cache_entries <= 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid number of cache entries value out of bounds.", function ); return( -1 ); } if( ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( ( (libfdata_internal_tree_node_t *) node )->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { cache_entry_index = libfdata_tree_node_calculate_leaf_node_cache_entry_index( node_data_offset, number_of_cache_entries ); } else { cache_entry_index = libfdata_tree_node_calculate_branch_node_cache_entry_index( node_data_offset, number_of_cache_entries ); } if( libfcache_cache_set_value_by_index( cache, cache_entry_index, (int64_t) node_data_offset, node_timestamp, node_value, free_node_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set value in cache entry: %d.", function, cache_entry_index ); return( -1 ); } return( 1 ); } /* Reads the sub nodes of the node * Returns 1 if successful or -1 on error */ int libfdata_tree_read_sub_nodes( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, libfdata_tree_node_t *node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_read_sub_nodes"; off64_t sub_nodes_offset = 0; size64_t sub_nodes_size = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( internal_tree->read_sub_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree - missing read sub nodes function.", function ); return( -1 ); } if( libfdata_tree_node_get_sub_nodes_range( node, &sub_nodes_offset, &sub_nodes_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub nodes range.", function ); return( -1 ); } /* Read the sub nodes from the file IO handle */ if( internal_tree->read_sub_nodes( internal_tree->io_handle, file_io_handle, node, cache, sub_nodes_offset, sub_nodes_size, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes at offset: %" PRIi64 ".", function, sub_nodes_offset ); return( -1 ); } return( 1 ); } /* Retrieves the offset and size of the root node * Returns 1 if successful or -1 on error */ int libfdata_tree_get_root_node( libfdata_tree_t *tree, libfdata_tree_node_t **root_node, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_root_node"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( root_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid root node.", function ); return( -1 ); } *root_node = internal_tree->root_node; return( 1 ); } /* Sets the data offset and size of the root node * Returns 1 if successful or -1 on error */ int libfdata_tree_set_root_node( libfdata_tree_t *tree, off64_t node_data_offset, size64_t node_data_size, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_set_root_node"; uint32_t node_data_flags = 0; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( internal_tree->root_node == NULL ) { if( libfdata_tree_node_initialize( &( internal_tree->root_node ), tree, NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create root node.", function ); return( -1 ); } } if( libfdata_tree_node_set_data_range( internal_tree->root_node, node_data_offset, node_data_size, node_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set root node data range.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of leaf nodes in the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_get_number_of_leaf_nodes( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_number_of_leaf_nodes"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_number_of_leaf_nodes( internal_tree->root_node, file_io_handle, cache, number_of_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from root node.", function ); return( -1 ); } return( 1 ); } /* Retrieves a leaf nodes at a specific index * Returns 1 if successful or -1 on error */ int libfdata_tree_get_leaf_node_by_index( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_leaf_node_by_index"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_leaf_node_by_index( internal_tree->root_node, file_io_handle, cache, leaf_node_index, leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node: %d from root node.", function, leaf_node_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of deleted leaf nodes in the tree * Returns 1 if successful or -1 on error */ int libfdata_tree_get_number_of_deleted_leaf_nodes( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_number_of_deleted_leaf_nodes"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( internal_tree->root_node, file_io_handle, cache, number_of_deleted_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted leaf nodes from root node.", function ); return( -1 ); } return( 1 ); } /* Retrieves a deleted leaf nodes at a specific index * Returns 1 if successful or -1 on error */ int libfdata_tree_get_deleted_leaf_node_by_index( libfdata_tree_t *tree, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_t *internal_tree = NULL; static char *function = "libfdata_tree_get_deleted_leaf_node_by_index"; if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree = (libfdata_internal_tree_t *) tree; if( libfdata_tree_node_get_deleted_leaf_node_by_index( internal_tree->root_node, file_io_handle, cache, deleted_leaf_node_index, deleted_leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted leaf node: %d from root node.", function, deleted_leaf_node_index ); return( -1 ); } return( 1 ); } libpff-20120802/libfdata/libfdata_tree_node.c0000644000175000017500000024355011765042507015661 00000000000000/* * The node functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_range.h" #include "libfdata_tree_node.h" #include "libfdata_types.h" /* Initializes the node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_initialize( libfdata_tree_node_t **node, libfdata_tree_t *tree, libfdata_tree_node_t *parent_node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_initialize"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid node value already set.", function ); return( -1 ); } if( tree == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid tree.", function ); return( -1 ); } internal_tree_node = memory_allocate_structure( libfdata_internal_tree_node_t ); if( internal_tree_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create node.", function ); goto on_error; } if( memory_set( internal_tree_node, 0, sizeof( libfdata_internal_tree_node_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear node.", function ); memory_free( internal_tree_node ); return( -1 ); } if( libfdata_range_initialize( &( internal_tree_node->data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create data range.", function ); goto on_error; } if( libfdata_array_initialize( &( internal_tree_node->sub_nodes ), 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub nodes array.", function ); goto on_error; } internal_tree_node->tree = tree; internal_tree_node->parent_node = parent_node; internal_tree_node->timestamp = libfcache_date_time_get_timestamp(); internal_tree_node->flags = LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES; *node = (libfdata_tree_node_t *) internal_tree_node; return( 1 ); on_error: if( internal_tree_node != NULL ) { if( internal_tree_node->data_range != NULL ) { libfdata_range_free( &( internal_tree_node->data_range ), NULL ); } memory_free( internal_tree_node ); } return( -1 ); } /* Frees the node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_free( libfdata_tree_node_t **node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_free"; int result = 1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { internal_tree_node = (libfdata_internal_tree_node_t *) *node; *node = NULL; if( internal_tree_node->data_range != NULL ) { if( libfdata_range_free( &( internal_tree_node->data_range ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data range.", function ); result = -1; } } if( libfdata_array_free( &( internal_tree_node->sub_nodes ), (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub nodes array.", function ); result = -1; } memory_free( internal_tree_node ); } return( result ); } /* Frees the node, but does not free its sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_free_single( libfdata_tree_node_t **node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_free_single"; int result = 1; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } if( *node != NULL ) { internal_tree_node = (libfdata_internal_tree_node_t *) node; *node = NULL; if( libfdata_array_free( &( internal_tree_node->sub_nodes ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub nodes array.", function ); result = -1; } memory_free( internal_tree_node ); } return( result ); } /* Sets the parent node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_parent_node( libfdata_tree_node_t *node, libfdata_tree_node_t *parent_node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_parent_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; internal_tree_node->parent_node = parent_node; return( 1 ); } /* Determines if the node is a root node * Returns 1 if a root node, 0 if not or -1 on error */ int libfdata_tree_node_is_root( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_is_root"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( internal_tree_node->parent_node == NULL ) { return( 1 ); } return( 0 ); } /* Retrieves the data offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_data_range( libfdata_tree_node_t *node, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_data_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_range_get_values( internal_tree_node->data_range, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data range.", function ); return( -1 ); } return( 1 ); } /* Sets the data offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_data_range( libfdata_tree_node_t *node, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_data_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is virtual.", function ); return( -1 ); } if( libfdata_range_set_values( internal_tree_node->data_range, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range.", function ); return( -1 ); } internal_tree_node->timestamp = libfcache_date_time_get_timestamp(); return( 1 ); } /* Retrieves the sub nodes offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_sub_nodes_range( libfdata_tree_node_t *node, off64_t *sub_nodes_offset, size64_t *sub_nodes_size, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_sub_nodes_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - sub nodes range has not been set.", function ); return( -1 ); } if( sub_nodes_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub nodes offset.", function ); return( -1 ); } if( sub_nodes_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub nodes size.", function ); return( -1 ); } *sub_nodes_offset = internal_tree_node->sub_nodes_offset; *sub_nodes_size = internal_tree_node->sub_nodes_size; return( 1 ); } /* Sets the sub nodes offset and size * The sub nodes range cannot be set after the sub nodes have been read, * unless the range has not changed * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_sub_nodes_range( libfdata_tree_node_t *node, off64_t sub_nodes_offset, size64_t sub_nodes_size, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_sub_nodes_range"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is virtual.", function ); return( -1 ); } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( sub_nodes_offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid sub nodes offset value less than zero.", function ); return( -1 ); } if( sub_nodes_size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid sub nodes size value exceeds maximum.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) != 0 ) { if( ( internal_tree_node->sub_nodes_offset != sub_nodes_offset ) || ( internal_tree_node->sub_nodes_size != sub_nodes_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - sub nodes range has already been read.", function ); return( -1 ); } } else { internal_tree_node->sub_nodes_offset = sub_nodes_offset; internal_tree_node->sub_nodes_size = sub_nodes_size; internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET; } return( 1 ); } /* Retrieves the time stamp * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_timestamp( libfdata_tree_node_t *node, time_t *timestamp, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_timestamp"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( timestamp == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node time stamp.", function ); return( -1 ); } *timestamp = internal_tree_node->timestamp; return( 1 ); } /* Retrieves the first leaf node index * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_first_leaf_node_index( libfdata_tree_node_t *node, int *first_leaf_node_index, int *deleted_first_leaf_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_first_leaf_node_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( first_leaf_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first leaf node index.", function ); return( -1 ); } if( deleted_first_leaf_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid first deleted leaf node index.", function ); return( -1 ); } *first_leaf_node_index = internal_tree_node->first_leaf_node_index; *deleted_first_leaf_node_index = internal_tree_node->first_deleted_leaf_node_index; return( 1 ); } /* Sets the first leaf node index * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_first_leaf_node_index( libfdata_tree_node_t *node, int first_leaf_node_index, int first_deleted_leaf_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_first_leaf_node_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( first_leaf_node_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid first leaf node index value less than zero.", function ); return( -1 ); } if( first_deleted_leaf_node_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid first deleted leaf node index value less than zero.", function ); return( -1 ); } internal_tree_node->first_leaf_node_index = first_leaf_node_index; internal_tree_node->first_deleted_leaf_node_index = first_deleted_leaf_node_index; return( 1 ); } /* Retrieves the node value * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_node_value( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, intptr_t **node_value, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_node_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; return( 1 ); } /* Sets the node value * * If the flag LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED is set the tree node * takes over management of the value and the value is freed when * no longer needed. * * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_node_value( libfdata_tree_node_t *node, libfcache_cache_t *cache, intptr_t *node_value, int (*free_node_value)( intptr_t **node_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_node_value"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_tree_set_node_value( internal_tree_node->tree, cache, node, node_value, free_node_value, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set node value.", function ); return( -1 ); } return( 1 ); } /* Resizes the sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_resize_sub_nodes( libfdata_tree_node_t *node, int number_of_sub_nodes, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_resize_sub_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( libfdata_array_resize( internal_tree_node->sub_nodes, number_of_sub_nodes, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_number_of_sub_nodes( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_sub_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_get_number_of_sub_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } if( libfdata_array_get_number_of_entries( internal_tree_node->sub_nodes, number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } return( 1 ); } /* Retrieves a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_sub_node_by_index( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int sub_node_index, libfdata_tree_node_t **sub_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_get_sub_node_by_index"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Sets the offset and size of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_sub_node_by_index( libfdata_tree_node_t *node, int sub_node_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_set_sub_node_by_index"; off64_t node_data_offset = 0; size64_t node_data_size = 0; uint32_t node_data_flags = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( sub_node == NULL ) { if( libfdata_tree_node_initialize( &sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub node.", function ); return( -1 ); } if( libfdata_array_set_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %d in sub nodes array.", function, sub_node_index ); libfdata_tree_node_free( &sub_node, NULL ); return( -1 ); } } else { if( libfdata_tree_node_get_data_range( sub_node, &node_data_offset, &node_data_size, &node_data_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d data range.", function, sub_node_index ); return( -1 ); } } if( libfdata_tree_node_set_data_range( sub_node, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range of sub node: %d.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Appends a sub node offset and size * Returns 1 if successful or -1 on error */ int libfdata_tree_node_append_sub_node( libfdata_tree_node_t *node, int *sub_node_index, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_append_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( libfdata_tree_node_initialize( &sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create sub node.", function ); goto on_error; } if( libfdata_tree_node_set_data_range( sub_node, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range of sub node.", function ); goto on_error; } if( libfdata_array_append_entry( internal_tree_node->sub_nodes, sub_node_index, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, "%s: unable to append sub node to sub nodes array.", function ); goto on_error; } return( 1 ); on_error: if( sub_node != NULL ) { libfdata_tree_node_free( &sub_node, NULL ); } return( -1 ); } /* Inserts a sub node offset and size * * Uses the node_value_compare_function to determine the order of the sub nodes * The node_value_compare_function should return LIBFDATA_TREE_NODE_COMPARE_LESS, * LIBFDATA_TREE_NODE_COMPARE_EQUAL, LIBFDATA_TREE_NODE_COMPARE_GREATER if successful or -1 on error * * Duplicate entries are allowed by default and inserted after the last duplicate entry. * Only allowing unique entries can be enforced by setting the flag LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_ENTRIES * * Returns 1 if successful, 0 if the node already exists or -1 on error */ int libfdata_tree_node_insert_sub_node( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *sub_node_index, off64_t offset, size64_t size, uint32_t flags, int (*node_value_compare_function)( intptr_t *first_node_value, intptr_t *second_node_value, libcerror_error_t **error ), uint8_t insert_flags, uint8_t read_flags, libcerror_error_t **error ) { libfcache_cache_t *insert_cache = NULL; libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *insert_sub_node = NULL; libfdata_tree_node_t *sub_node = NULL; intptr_t *insert_sub_node_value = NULL; intptr_t *sub_node_value = NULL; static char *function = "libfdata_tree_node_insert_sub_node"; int number_of_sub_nodes = 0; int result = 0; int sub_node_iterator = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( sub_node_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid sub node index.", function ); return( -1 ); } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( node_value_compare_function == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node value compare function.", function ); return( -1 ); } if( ( insert_flags & ~( LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported insert flags: 0x%02" PRIx8 ".", function, insert_flags ); return( -1 ); } if( libfdata_tree_node_initialize( &insert_sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create insert sub node.", function ); goto on_error; } if( libfdata_tree_node_set_data_range( insert_sub_node, offset, size, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range of insert_sub node.", function ); goto on_error; } if( libfdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); goto on_error; } if( libfcache_cache_initialize( &insert_cache, 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create insert cache.", function ); goto on_error; } if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, insert_cache, insert_sub_node, &insert_sub_node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve insert sub node value.", function ); goto on_error; } for( sub_node_iterator = 0; sub_node_iterator < number_of_sub_nodes; sub_node_iterator++ ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_iterator, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_iterator ); goto on_error; } if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, sub_node, &sub_node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node value: %d.", function, sub_node_iterator ); goto on_error; } result = node_value_compare_function( insert_sub_node_value, sub_node_value, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to compare sub node value: %d.", function, sub_node_iterator ); goto on_error; } else if( result == LIBFDATA_TREE_NODE_COMPARE_EQUAL ) { if( ( insert_flags & LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES ) != 0 ) { if( libfcache_cache_free( &insert_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the insert cache.", function ); goto on_error; } if( libfdata_tree_node_free( &insert_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the insert sub node.", function ); goto on_error; } return( 0 ); } } else if( result == LIBFDATA_TREE_NODE_COMPARE_LESS ) { break; } else if( result != LIBFDATA_TREE_NODE_COMPARE_GREATER ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported node value compare function return value: %d.", function, result ); goto on_error; } } if( libfcache_cache_free( &insert_cache, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the insert cache.", function ); goto on_error; } if( ( number_of_sub_nodes > 0 ) && ( result == LIBFDATA_ARRAY_COMPARE_LESS ) ) { *sub_node_index = sub_node_iterator; if( libfdata_array_resize( internal_tree_node->sub_nodes, number_of_sub_nodes + 1, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array.", function ); goto on_error; } for( sub_node_iterator = number_of_sub_nodes; sub_node_iterator > *sub_node_index; sub_node_iterator-- ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_iterator - 1, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve sub node: %d from sub nodes array.", function, sub_node_iterator - 1 ); goto on_error; } if( libfdata_array_set_entry_by_index( internal_tree_node->sub_nodes, sub_node_iterator, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set sub node: %d in sub nodes array.", function, sub_node_iterator ); goto on_error; } } if( libfdata_array_set_entry_by_index( internal_tree_node->sub_nodes, *sub_node_index, (intptr_t *) insert_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set insert sub node: %d in sub nodes array.", function, *sub_node_index ); goto on_error; } } else { *sub_node_index = number_of_sub_nodes; if( libfdata_array_resize( internal_tree_node->sub_nodes, number_of_sub_nodes + 1, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array.", function ); goto on_error; } if( libfdata_array_set_entry_by_index( internal_tree_node->sub_nodes, *sub_node_index, (intptr_t *) insert_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set insert sub node: %d in sub nodes array.", function, *sub_node_index ); goto on_error; } } return( 1 ); on_error: if( insert_cache != NULL ) { libfcache_cache_free( &insert_cache, NULL ); } if( insert_sub_node != NULL ) { libfdata_tree_node_free( &insert_sub_node, NULL ); } return( -1 ); } /* Splits the sub nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_split_sub_nodes( libfdata_tree_node_t *node, int number_of_splits, libcerror_error_t **error ) { libfdata_array_t *virtual_sub_nodes_array = NULL; libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; libfdata_tree_node_t *virtual_sub_node = NULL; static char *function = "libfdata_tree_node_split_sub_nodes"; int number_of_split_sub_nodes = 0; int number_of_sub_nodes = 0; int result = 1; int last_sub_node_index = 0; int split_sub_node_index = 0; int sub_node_index = 0; int virtual_sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - node is a leaf.", function ); return( -1 ); } if( number_of_splits < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of splits value less than zero.", function ); return( -1 ); } if( number_of_splits == 0 ) { return( 1 ); } if( libfdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } number_of_split_sub_nodes = number_of_sub_nodes / number_of_splits; if( number_of_split_sub_nodes < 2 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: number of sub nodes too small to split in: %d.", function, number_of_splits ); return( -1 ); } if( libfdata_array_initialize( &virtual_sub_nodes_array, number_of_splits, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create virtual sub nodes array.", function ); return( -1 ); } for( virtual_sub_node_index = 0; virtual_sub_node_index < number_of_splits; virtual_sub_node_index++ ) { if( libfdata_tree_node_initialize( &virtual_sub_node, internal_tree_node->tree, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create virtual sub node: %d.", function, virtual_sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } ( (libfdata_internal_tree_node_t *) virtual_sub_node )->flags |= LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL; if( libfdata_array_set_entry_by_index( virtual_sub_nodes_array, virtual_sub_node_index, (intptr_t *) virtual_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set virtual sub node: %d in virtual sub nodes array.", function, virtual_sub_node_index ); libfdata_tree_node_free( &virtual_sub_node, NULL ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } last_sub_node_index = ( number_of_split_sub_nodes * ( virtual_sub_node_index + 1 ) ) - 1; if( virtual_sub_node_index == ( number_of_splits - 1 ) ) { last_sub_node_index += number_of_sub_nodes % number_of_splits; } if( last_sub_node_index > number_of_sub_nodes ) { last_sub_node_index = number_of_sub_nodes - 1; } if( libfdata_array_resize( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->sub_nodes, last_sub_node_index + 1 - sub_node_index, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED, "%s: unable to resize sub nodes array of virtual sub node: %d.", function, virtual_sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } split_sub_node_index = 0; while( sub_node_index <= last_sub_node_index ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } if( split_sub_node_index == 0 ) { if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d.", function, sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } if( ( (libfdata_internal_tree_node_t *) sub_node )->data_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid sub node: %d - missing data range.", function, sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } /* The data range of a virtual node cannot be set by the set_data_range function */ if( libfdata_tree_node_get_data_range( sub_node, &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->data_range->offset ), &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->data_range->size ), &( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->data_range->flags ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data range in virtual sub node.", function ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } } if( libfdata_array_set_entry_by_index( ( (libfdata_internal_tree_node_t *) virtual_sub_node )->sub_nodes, split_sub_node_index, (intptr_t *) sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set entry: %d in sub nodes array of virtual sub node: %d.", function, split_sub_node_index, virtual_sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } if( libfdata_tree_node_set_parent_node( sub_node, virtual_sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node in sub node: %d.", function, split_sub_node_index ); libfdata_array_free( &virtual_sub_nodes_array, (int (*)(intptr_t **, libcerror_error_t **)) &libfdata_tree_node_free_single, NULL ); result = -1; break; } sub_node_index++; split_sub_node_index++; } virtual_sub_node = NULL; } if( result != 1 ) { /* Set the parent values in the sub nodes back to their orginal value */ for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); continue; } if( libfdata_tree_node_set_parent_node( sub_node, node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set parent node in sub node: %d.", function, sub_node_index ); continue; } } return( -1 ); } if( libfdata_array_free( &( internal_tree_node->sub_nodes ), NULL, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free the sub nodes array.", function ); result = -1; } internal_tree_node->sub_nodes = virtual_sub_nodes_array; return( result ); } /* Determines if the node is deleted * Returns 1 if deleted, 0 if not or -1 on error */ int libfdata_tree_node_is_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_is_deleted"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_DELETED ) != 0 ) ) { return( 1 ); } return( 0 ); } /* Marks a node as deleted * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_deleted( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_deleted"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; /* TODO add deleted branch node support */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE, "%s: invalid tree node - currently only deleted leaf nodes are supported.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_IS_DELETED; if( libfdata_tree_node_set_calculate_leaf_node_values( node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set calculate leaf node values.", function ); return( -1 ); } return( 1 ); } /* Makes a deleted node of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_deleted_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_set_deleted_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_set_deleted( sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set deleted in sub node: %d.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Sets the flag to calculate the leaf node values and propagates this up to its parent node * Returns 1 if the successful or -1 on error */ int libfdata_tree_node_set_calculate_leaf_node_values( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_calculate_leaf_node_values"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( internal_tree_node->parent_node != NULL ) { if( libfdata_tree_node_set_calculate_leaf_node_values( internal_tree_node->parent_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set calculate leaf node values in parent node.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES; return( 1 ); } /* Reads the leaf node values * Returns 1 if the successful or -1 on error */ int libfdata_tree_node_read_leaf_node_values( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_read_leaf_node_values"; int number_of_deleted_leaf_nodes = 0; int number_of_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } internal_tree_node->number_of_leaf_nodes = 0; internal_tree_node->number_of_deleted_leaf_nodes = 0; if( libfdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_leaf_nodes( sub_node, file_io_handle, cache, &number_of_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( sub_node, file_io_handle, cache, &number_of_deleted_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of deleted leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_set_first_leaf_node_index( sub_node, internal_tree_node->number_of_leaf_nodes, internal_tree_node->number_of_deleted_leaf_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set first leaf node index in sub node: %d.", function, sub_node_index ); return( -1 ); } if( ( number_of_leaf_nodes == 0 ) && ( number_of_deleted_leaf_nodes == 0 ) ) { /* It is possible to have branch nodes without leaf nodes */ result = libfdata_tree_node_is_leaf( sub_node, file_io_handle, cache, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is a leaf.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { internal_tree_node->number_of_leaf_nodes++; } else { internal_tree_node->number_of_deleted_leaf_nodes++; } } } else { internal_tree_node->number_of_leaf_nodes += number_of_leaf_nodes; internal_tree_node->number_of_deleted_leaf_nodes += number_of_deleted_leaf_nodes; } } return( 1 ); } /* Determines if the node is a leaf node * Returns 1 if a leaf node, 0 if not or -1 on error */ int libfdata_tree_node_is_leaf( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; intptr_t *node_value = NULL; static char *function = "libfdata_tree_node_is_leaf"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ ) == 0 ) ) { /* Make sure the node data is read before the sub nodes */ if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ ) == 0 ) { if( libfdata_tree_get_node_value( internal_tree_node->tree, file_io_handle, cache, node, &node_value, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ; } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) != 0 ) { if( libfdata_tree_read_sub_nodes( internal_tree_node->tree, file_io_handle, cache, node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read sub nodes.", function ); return( -1 ); } } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ; } if( ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL ) == 0 ) && ( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_IS_LEAF ) != 0 ) ) { return( 1 ); } return( 0 ); } /* Makes a leaf node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_leaf( libfdata_tree_node_t *node, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_set_leaf"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid tree node - sub nodes range was set.", function ); return( -1 ); } internal_tree_node->flags |= LIBFDATA_TREE_NODE_FLAG_IS_LEAF; if( libfdata_tree_node_set_calculate_leaf_node_values( node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set calculate leaf node values.", function ); return( -1 ); } return( 1 ); } /* Makes a leaf node of a specific sub node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_set_leaf_sub_node( libfdata_tree_node_t *node, int sub_node_index, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_set_leaf_sub_node"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( sub_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_set_leaf( sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to set leaf in sub node: %d.", function, sub_node_index ); return( -1 ); } return( 1 ); } /* Retrieves the number of leaf nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_number_of_leaf_nodes( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_number_of_leaf_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( number_of_leaf_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of leaf nodes.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ); } *number_of_leaf_nodes = internal_tree_node->number_of_leaf_nodes; return( 1 ); } /* Retrieves a specific leaf node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_leaf_node_by_index( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int leaf_node_index, libfdata_tree_node_t **leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_get_leaf_node_by_index"; int first_deleted_leaf_node_index = 0; int first_leaf_node_index = 0; int number_of_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( leaf_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid leaf node.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ); } if( libfdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_leaf_nodes( sub_node, file_io_handle, cache, &number_of_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_first_leaf_node_index( sub_node, &first_leaf_node_index, &first_deleted_leaf_node_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf node index from sub node: %d.", function, sub_node_index ); return( -1 ); } if( number_of_leaf_nodes == 0 ) { /* It is possible to have branch nodes without leaf nodes */ result = libfdata_tree_node_is_leaf( sub_node, file_io_handle, cache, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is a leaf.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result == 0 ) { if( leaf_node_index == first_leaf_node_index ) { *leaf_node = sub_node; break; } } } } else if( ( leaf_node_index >= first_leaf_node_index ) && ( leaf_node_index < ( first_leaf_node_index + number_of_leaf_nodes ) ) ) { /* Note that the first_leaf_node_index is relative for a branch */ if( libfdata_tree_node_get_leaf_node_by_index( sub_node, file_io_handle, cache, leaf_node_index - first_leaf_node_index, leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve leaf node: %d from sub node: %d.", function, leaf_node_index - first_leaf_node_index, sub_node_index ); return( -1 ); } break; } } if( sub_node_index >= number_of_sub_nodes ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sub node index value out of bounds.", function ); return( -1 ); } return( 1 ); } /* Retrieves the number of deleted leaf nodes * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_number_of_deleted_leaf_nodes( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int *number_of_deleted_leaf_nodes, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; static char *function = "libfdata_tree_node_get_number_of_deleted_leaf_nodes"; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( number_of_deleted_leaf_nodes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of deleted leaf nodes.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ); } *number_of_deleted_leaf_nodes = internal_tree_node->number_of_deleted_leaf_nodes; return( 1 ); } /* Retrieves a specific deleted leaf node * Returns 1 if successful or -1 on error */ int libfdata_tree_node_get_deleted_leaf_node_by_index( libfdata_tree_node_t *node, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int deleted_leaf_node_index, libfdata_tree_node_t **deleted_leaf_node, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_tree_node_t *internal_tree_node = NULL; libfdata_tree_node_t *sub_node = NULL; static char *function = "libfdata_tree_node_get_deleted_leaf_node_by_index"; int first_deleted_leaf_node_index = 0; int first_leaf_node_index = 0; int number_of_deleted_leaf_nodes = 0; int number_of_sub_nodes = 0; int result = 0; int sub_node_index = 0; if( node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid node.", function ); return( -1 ); } internal_tree_node = (libfdata_internal_tree_node_t *) node; if( deleted_leaf_node == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid deleted leaf node.", function ); return( -1 ); } if( ( internal_tree_node->flags & LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ) != 0 ) { if( libfdata_tree_node_read_leaf_node_values( node, file_io_handle, cache, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve node value.", function ); return( -1 ); } internal_tree_node->flags &= ~( LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES ); } if( libfdata_array_get_number_of_entries( internal_tree_node->sub_nodes, &number_of_sub_nodes, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of entries from sub nodes array.", function ); return( -1 ); } for( sub_node_index = 0; sub_node_index < number_of_sub_nodes; sub_node_index++ ) { if( libfdata_array_get_entry_by_index( internal_tree_node->sub_nodes, sub_node_index, (intptr_t **) &sub_node, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve entry: %d from sub nodes array.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_number_of_deleted_leaf_nodes( sub_node, file_io_handle, cache, &number_of_deleted_leaf_nodes, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of leaf nodes from sub node: %d.", function, sub_node_index ); return( -1 ); } if( libfdata_tree_node_get_first_leaf_node_index( sub_node, &first_leaf_node_index, &first_deleted_leaf_node_index, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve first leaf node index from sub node: %d.", function, sub_node_index ); return( -1 ); } if( number_of_deleted_leaf_nodes == 0 ) { /* It is possible to have branch nodes without leaf nodes */ result = libfdata_tree_node_is_leaf( sub_node, file_io_handle, cache, read_flags, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is a leaf.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { result = libfdata_tree_node_is_deleted( sub_node, error ); if( result == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to determine if sub node: %d is deleted.", function, sub_node_index ); return( -1 ); } else if( result != 0 ) { if( deleted_leaf_node_index == first_deleted_leaf_node_index ) { *deleted_leaf_node = sub_node; break; } } } } else if( ( deleted_leaf_node_index >= first_deleted_leaf_node_index ) && ( deleted_leaf_node_index < ( first_deleted_leaf_node_index + number_of_deleted_leaf_nodes ) ) ) { /* Note that the first_deleted_leaf_node_index is relative for a branch */ if( libfdata_tree_node_get_deleted_leaf_node_by_index( sub_node, file_io_handle, cache, deleted_leaf_node_index - first_deleted_leaf_node_index, deleted_leaf_node, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve deleted leaf node: %d from sub node: %d.", function, deleted_leaf_node_index - first_deleted_leaf_node_index, sub_node_index ); return( -1 ); } break; } } if( sub_node_index >= number_of_sub_nodes ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid sub node index value out of bounds.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libfdata/libfdata_buffer.c0000644000175000017500000003236511765042507015166 00000000000000/* * Buffer functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_buffer.h" #include "libfdata_definitions.h" #include "libfdata_libcerror.h" /* Creates a buffer * Returns 1 if successful or -1 on error */ int libfdata_buffer_initialize( libfdata_buffer_t **buffer, size_t size, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; static char *function = "libfdata_buffer_initialize"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( *buffer != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid buffer value already set.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } internal_buffer = memory_allocate_structure( libfdata_internal_buffer_t ); if( internal_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create buffer.", function ); goto on_error; } if( memory_set( internal_buffer, 0, sizeof( libfdata_internal_buffer_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear buffer.", function ); goto on_error; } if( size > 0 ) { internal_buffer->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * size ); if( internal_buffer->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create buffer data.", function ); goto on_error; } internal_buffer->data_size = size; internal_buffer->flags = LIBFDATA_BUFFER_DATA_FLAG_MANAGED; } *buffer = (libfdata_buffer_t *) internal_buffer; return( 1 ); on_error: if( internal_buffer != NULL ) { memory_free( internal_buffer ); } return( -1 ); } /* Frees the buffer * Returns 1 if successful or -1 on error */ int libfdata_buffer_free( libfdata_buffer_t **buffer, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; static char *function = "libfdata_buffer_free"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } if( *buffer != NULL ) { internal_buffer = (libfdata_internal_buffer_t *) *buffer; *buffer = NULL; if( ( internal_buffer->flags & LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) != 0 ) { if( internal_buffer->data != NULL ) { memory_free( internal_buffer->data ); } } memory_free( internal_buffer ); } return( 1 ); } /* Clones the source buffer to the destination * Returns 1 if successful or -1 on error */ int libfdata_buffer_clone( libfdata_buffer_t **destination_buffer, libfdata_buffer_t *source_buffer, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_source_buffer = NULL; static char *function = "libfdata_buffer_clone"; if( destination_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination buffer.", function ); return( -1 ); } if( *destination_buffer != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination buffer value already set.", function ); return( -1 ); } if( source_buffer == NULL ) { *destination_buffer = NULL; return( 1 ); } internal_source_buffer = (libfdata_internal_buffer_t *) source_buffer; if( libfdata_buffer_initialize( destination_buffer, 0, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination buffer.", function ); return( -1 ); } if( libfdata_buffer_set_data( *destination_buffer, internal_source_buffer->data, internal_source_buffer->data_size, LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set data.", function ); libfdata_buffer_free( destination_buffer, NULL ); return( -1 ); } return( 1 ); } /* Resizes a buffer * Returns 1 if successful or -1 on error */ int libfdata_buffer_resize( libfdata_buffer_t *buffer, size_t size, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; void *reallocation = NULL; static char *function = "libfdata_buffer_resize"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } internal_buffer = (libfdata_internal_buffer_t *) buffer; if( size == 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } if( size > internal_buffer->data_size ) { reallocation = memory_reallocate( internal_buffer->data, size ); if( reallocation == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to resize buffer data.", function ); return( -1 ); } if( internal_buffer->data == NULL ) { internal_buffer->flags = LIBFDATA_BUFFER_DATA_FLAG_MANAGED; } internal_buffer->data = (uint8_t *) reallocation; internal_buffer->data_size = size; } return( 1 ); } /* Retrieves the buffer data size * Returns 1 if successful or -1 on error */ int libfdata_buffer_get_data_size( libfdata_buffer_t *buffer, size_t *data_size, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; static char *function = "libfdata_buffer_get_data_size"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } internal_buffer = (libfdata_internal_buffer_t *) buffer; if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } *data_size = internal_buffer->data_size; return( 1 ); } /* Retrieves the buffer data * Returns 1 if successful or -1 on error */ int libfdata_buffer_get_data( libfdata_buffer_t *buffer, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; static char *function = "libfdata_buffer_get_data"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } internal_buffer = (libfdata_internal_buffer_t *) buffer; if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } *data = internal_buffer->data; *data_size = internal_buffer->data_size; return( 1 ); } /* Retrieves the buffer data at a specific offset * Returns 1 if successful or -1 on error */ int libfdata_buffer_get_data_at_offset( libfdata_buffer_t *buffer, size_t data_offset, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; static char *function = "libfdata_buffer_get_data_at_offset"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } internal_buffer = (libfdata_internal_buffer_t *) buffer; if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( internal_buffer->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid buffer - missing data.", function ); return( -1 ); } if( data_offset > internal_buffer->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value exceeds data size.", function ); return( -1 ); } *data = &( internal_buffer->data[ data_offset ] ); *data_size = internal_buffer->data_size - data_offset; return( 1 ); } /* Sets the buffer data * * If the flag LIBFDATA_BUFFER_DATA_FLAG_MANAGED is set the buffer * takes over management of the data and the data is freed when * no longer needed. If the flag is not set the buffer makes a copy of the data. * * Returns 1 if successful or -1 on error */ int libfdata_buffer_set_data( libfdata_buffer_t *buffer, const uint8_t *data, size_t data_size, uint8_t flags, libcerror_error_t **error ) { libfdata_internal_buffer_t *internal_buffer = NULL; static char *function = "libfdata_buffer_set_data"; if( buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer.", function ); return( -1 ); } internal_buffer = (libfdata_internal_buffer_t *) buffer; if( ( flags & ~( LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported flags: 0x%02" PRIx8 ".", function, flags ); return( -1 ); } if( internal_buffer->data != data ) { if( ( internal_buffer->flags & LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) != 0 ) { if( internal_buffer->data != NULL ) { memory_free( internal_buffer->data ); } internal_buffer->flags &= ~( LIBFDATA_BUFFER_DATA_FLAG_MANAGED ); } if( ( flags & LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) != 0 ) { internal_buffer->data = (uint8_t *) data; } else if( data == NULL ) { internal_buffer->data = NULL; } else if( data_size > 0 ) { internal_buffer->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * data_size ); if( internal_buffer->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data.", function ); goto on_error; } if( memory_copy( internal_buffer->data, data, data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); goto on_error; } internal_buffer->flags |= LIBFDATA_BUFFER_DATA_FLAG_MANAGED; } } internal_buffer->data_size = data_size; internal_buffer->flags |= flags; return( 1 ); on_error: if( internal_buffer->data != NULL ) { memory_free( internal_buffer->data ); internal_buffer->data = NULL; } return( -1 ); } libpff-20120802/libfdata/libfdata_libcnotify.h0000644000175000017500000000254311765042507016057 00000000000000/* * The internal libcnotify header * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_LIBCNOTIFY_H ) #define _LIBFDATA_LIBCNOTIFY_H #include /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify */ #if defined( HAVE_LOCAL_LIBCNOTIFY ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT * before including libcnotify.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCNOTIFY_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libfdata/libfdata_notify.c0000644000175000017500000000523111765042507015215 00000000000000/* * Notification functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include #endif #include #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_notify.h" #if !defined( HAVE_LOCAL_LIBFDATA ) /* Sets the verbose notification */ void libfdata_notify_set_verbose( int verbose ) { libcnotify_set_verbose( verbose ); } /* Sets the notification stream * Returns 1 if successful or -1 on error */ int libfdata_notify_set_stream( FILE *stream, libcerror_error_t **error ) { static char *function = "libfdata_notify_set_stream"; if( libcnotify_set_stream( stream, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set stream.", function ); return( -1 ); } return( 1 ); } /* Opens the notification stream using a filename * The stream is opened in append mode * Returns 1 if successful or -1 on error */ int libfdata_notify_stream_open( const char *filename, libcerror_error_t **error ) { static char *function = "libfdata_notify_stream_open"; if( libcnotify_stream_open( filename, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open stream.", function ); return( -1 ); } return( 1 ); } /* Closes the notification stream if opened using a filename * Returns 0 if successful or -1 on error */ int libfdata_notify_stream_close( libcerror_error_t **error ) { static char *function = "libfdata_notify_stream_close"; if( libcnotify_stream_close( error ) != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_OPEN_FAILED, "%s: unable to open stream.", function ); return( -1 ); } return( 0 ); } #endif libpff-20120802/libfdata/libfdata_list_element.h0000644000175000017500000001017511765042507016401 00000000000000/* * The list element functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_LIST_ELEMENT_H ) #define _LIBFDATA_INTERNAL_LIST_ELEMENT_H #include #include #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_range.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_list_element libfdata_internal_list_element_t; struct libfdata_internal_list_element { /* The list reference */ libfdata_list_t *list; /* The (list) element index */ int element_index; /* The (element) data range */ libfdata_range_t *data_range; /* The time stamp */ time_t timestamp; /* The (element) value offset */ off64_t value_offset; /* The (element) value size */ size64_t value_size; /* The flags */ uint8_t flags; }; int libfdata_list_element_initialize( libfdata_list_element_t **element, libfdata_list_t *list, int element_index, libcerror_error_t **error ); int libfdata_list_element_free( libfdata_list_element_t **element, libcerror_error_t **error ); int libfdata_list_element_clone( libfdata_list_element_t **destination_element, libfdata_list_element_t *source_element, libfdata_list_t *list, int element_index, libcerror_error_t **error ); int libfdata_list_element_get_element_index( libfdata_list_element_t *element, int *element_index, libcerror_error_t **error ); int libfdata_list_element_set_element_index( libfdata_list_element_t *element, int element_index, libcerror_error_t **error ); int libfdata_list_element_get_timestamp( libfdata_list_element_t *element, time_t *timestamp, libcerror_error_t **error ); int libfdata_list_element_get_value_offset( libfdata_list_element_t *element, off64_t *value_offset, libcerror_error_t **error ); int libfdata_list_element_set_value_offset( libfdata_list_element_t *element, off64_t value_offset, libcerror_error_t **error ); int libfdata_list_element_get_value_size( libfdata_list_element_t *element, size64_t *value_size, libcerror_error_t **error ); int libfdata_list_element_set_value_size( libfdata_list_element_t *element, size64_t value_size, libcerror_error_t **error ); /* Data range functions */ int libfdata_list_element_get_data_range( libfdata_list_element_t *element, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ); int libfdata_list_element_set_data_range( libfdata_list_element_t *element, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ); /* Element value functions */ LIBFDATA_EXTERN \ int libfdata_list_element_get_element_value( libfdata_list_element_t *element, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, intptr_t **element_value, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_list_element_set_element_value( libfdata_list_element_t *element, libfcache_cache_t *cache, intptr_t *element_value, int (*free_element_value)( intptr_t **element_value, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/libfdata_inline.h0000644000175000017500000000211711765042507015170 00000000000000/* * The internal inline definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_INLINE_H ) #define _LIBFDATA_INTERNAL_INLINE_H #include #if defined( _MSC_VER ) #define LIBFDATA_INLINE _inline #elif defined( __BORLANDC__ ) #define LIBFDATA_INLINE /* inline */ #else #define LIBFDATA_INLINE inline #endif #endif libpff-20120802/libfdata/libfdata_block_reference.c0000644000175000017500000000672411765042507017025 00000000000000/* * Block data reference functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_block.h" #include "libfdata_block_reference.h" #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_reference.h" #include "libfdata_types.h" /* Initializes the block reference and its values * Returns 1 if successful or -1 on error */ int libfdata_block_reference_initialize( libfdata_reference_t **reference, libfdata_block_t *block, uint8_t flags, libcerror_error_t **error ) { static char *function = "libfdata_block_reference_initialize"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } if( block == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid block.", function ); return( -1 ); } if( libfdata_reference_initialize( reference, (intptr_t *) block, (int (*)(intptr_t **, libcerror_error_t **)) libfdata_block_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libfdata_block_clone, (int (*)(intptr_t *, int *, libcerror_error_t **)) libfdata_block_get_number_of_segments, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libfdata_block_get_size, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, uint8_t **, size_t *, libcerror_error_t **)) libfdata_block_get_data, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, int, uint8_t **, size_t *, uint8_t, libcerror_error_t **)) libfdata_block_get_segment_data, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, off64_t, uint8_t **, size_t *, uint8_t, libcerror_error_t **)) libfdata_block_get_segment_data_at_offset, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, int, size_t, uint8_t **, size_t *, uint8_t, libcerror_error_t **)) libfdata_block_get_segment_data_at_value_index, (ssize_t (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, uint8_t *, size_t, libcerror_error_t **)) libfdata_block_read_buffer, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libfdata_block_seek_offset, flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create reference.", function ); return( -1 ); } return( 1 ); } libpff-20120802/libfdata/libfdata_unused.h0000644000175000017500000000247011765042507015217 00000000000000/* * The internal unused definition * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_UNUSED_H ) #define _LIBFDATA_INTERNAL_UNUSED_H #include #if !defined( LIBFDATA_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBFDATA_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBFDATA_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBFDATA_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBFDATA_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libfdata/libfdata_error.h0000644000175000017500000000332311765042507015043 00000000000000/* * Error functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_ERROR_H ) #define _LIBFDATA_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBFDATA ) #include #endif #include "libfdata_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBFDATA ) LIBFDATA_EXTERN \ void libfdata_error_free( libfdata_error_t **error ); LIBFDATA_EXTERN \ int libfdata_error_fprint( libfdata_error_t *error, FILE *stream ); LIBFDATA_EXTERN \ int libfdata_error_sprint( libfdata_error_t *error, char *string, size_t size ); LIBFDATA_EXTERN \ int libfdata_error_backtrace_fprint( libfdata_error_t *error, FILE *stream ); LIBFDATA_EXTERN \ int libfdata_error_backtrace_sprint( libfdata_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libfdata/Makefile.in0000664000175000017500000007070412006536016013761 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfdata DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfdata_la_LIBADD = am__libfdata_la_SOURCES_DIST = libfdata_array_type.c \ libfdata_array_type.h libfdata_block.c libfdata_block.h \ libfdata_block_reference.c libfdata_block_reference.h \ libfdata_buffer.c libfdata_buffer.h \ libfdata_buffer_reference.c libfdata_buffer_reference.h \ libfdata_definitions.h libfdata_error.c libfdata_error.h \ libfdata_extern.h libfdata_inline.h libfdata_libbfio.h \ libfdata_libcerror.h libfdata_libcnotify.h \ libfdata_libfcache.h libfdata_list.c libfdata_list.h \ libfdata_list_element.c libfdata_list_element.h \ libfdata_notify.c libfdata_notify.h libfdata_range.c \ libfdata_range.h libfdata_reference.c libfdata_reference.h \ libfdata_support.c libfdata_support.h libfdata_tree.c \ libfdata_tree.h libfdata_tree_node.c libfdata_tree_node.h \ libfdata_types.h libfdata_unused.h libfdata_vector.c \ libfdata_vector.h @HAVE_LOCAL_LIBFDATA_TRUE@am_libfdata_la_OBJECTS = \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_array_type.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_block.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_block_reference.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_buffer.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_buffer_reference.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_error.lo libfdata_list.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_list_element.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_notify.lo libfdata_range.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_reference.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.lo libfdata_tree.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree_node.lo \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.lo libfdata_la_OBJECTS = $(am_libfdata_la_OBJECTS) @HAVE_LOCAL_LIBFDATA_TRUE@am_libfdata_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libfdata_la_SOURCES) DIST_SOURCES = $(am__libfdata_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBFDATA_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBFDATA_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBFDATA_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCLOCALE_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBUNA_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCFILE_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCPATH_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBBFIO_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBFCACHE_CPPFLAGS@ \ @HAVE_LOCAL_LIBFDATA_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBFDATA_TRUE@noinst_LTLIBRARIES = libfdata.la @HAVE_LOCAL_LIBFDATA_TRUE@libfdata_la_SOURCES = \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_array_type.c libfdata_array_type.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_block.c libfdata_block.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_block_reference.c libfdata_block_reference.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_buffer.c libfdata_buffer.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_buffer_reference.c libfdata_buffer_reference.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_definitions.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_error.c libfdata_error.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_extern.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_inline.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_libbfio.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_libcerror.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_libcnotify.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_libfcache.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_list.c libfdata_list.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_list_element.c libfdata_list_element.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_notify.c libfdata_notify.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_range.c libfdata_range.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_reference.c libfdata_reference.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_support.c libfdata_support.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree.c libfdata_tree.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_tree_node.c libfdata_tree_node.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_types.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_unused.h \ @HAVE_LOCAL_LIBFDATA_TRUE@ libfdata_vector.c libfdata_vector.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfdata/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfdata/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfdata.la: $(libfdata_la_OBJECTS) $(libfdata_la_DEPENDENCIES) $(LINK) $(am_libfdata_la_rpath) $(libfdata_la_OBJECTS) $(libfdata_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_array_type.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_block.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_block_reference.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_buffer_reference.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_list_element.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_notify.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_range.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_reference.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_tree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_tree_node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfdata_vector.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libfdata ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libfdata_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libfdata/libfdata_buffer_reference.c0000644000175000017500000005430211765042507017177 00000000000000/* * Buffer data reference functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_buffer.h" #include "libfdata_buffer_reference.h" #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libcnotify.h" #include "libfdata_libfcache.h" #include "libfdata_reference.h" #include "libfdata_types.h" #include "libfdata_unused.h" /* Initializes the buffer reference and its values * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_initialize( libfdata_reference_t **reference, const uint8_t *buffer, size_t buffer_size, uint8_t flags, libcerror_error_t **error ) { libfdata_buffer_reference_t *buffer_reference = NULL; static char *function = "libfdata_buffer_reference_initialize"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } if( *reference == NULL ) { buffer_reference = memory_allocate_structure( libfdata_buffer_reference_t ); if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create buffer reference.", function ); goto on_error; } if( memory_set( buffer_reference, 0, sizeof( libfdata_buffer_reference_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear buffer reference.", function ); memory_free( buffer_reference ); return( -1 ); } if( ( flags & LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) != 0 ) { buffer_reference->data = (uint8_t *) buffer; } else if( buffer == NULL ) { buffer_reference->data = NULL; } else if( buffer_size > 0 ) { buffer_reference->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * buffer_size ); if( buffer_reference->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data.", function ); goto on_error; } if( memory_copy( buffer_reference->data, buffer, buffer_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); goto on_error; } buffer_reference->flags |= LIBFDATA_BUFFER_DATA_FLAG_MANAGED; } buffer_reference->data_size = buffer_size; buffer_reference->flags |= flags; if( libfdata_reference_initialize( reference, (intptr_t *) buffer_reference, (int (*)(intptr_t **, libcerror_error_t **)) libfdata_buffer_reference_free, (int (*)(intptr_t **, intptr_t *, libcerror_error_t **)) libfdata_buffer_reference_clone, (int (*)(intptr_t *, int *, libcerror_error_t **)) libfdata_buffer_reference_get_number_of_segments, (int (*)(intptr_t *, size64_t *, libcerror_error_t **)) libfdata_buffer_reference_get_size, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, uint8_t **, size_t *, libcerror_error_t **)) libfdata_buffer_reference_get_data, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, int, uint8_t **, size_t *, uint8_t, libcerror_error_t **)) libfdata_buffer_reference_get_segment_data, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, off64_t, uint8_t **, size_t *, uint8_t, libcerror_error_t **)) libfdata_buffer_reference_get_segment_data_at_offset, (int (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, int, size_t, uint8_t **, size_t *, uint8_t, libcerror_error_t **)) libfdata_buffer_reference_get_segment_data_at_value_index, (ssize_t (*)(intptr_t *, libbfio_handle_t *, libfcache_cache_t *, uint8_t *, size_t, libcerror_error_t **)) libfdata_buffer_reference_read_buffer, (off64_t (*)(intptr_t *, off64_t, int, libcerror_error_t **)) libfdata_buffer_reference_seek_offset, LIBFDATA_REFERENCE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create reference.", function ); goto on_error; } } return( 1 ); on_error: if( buffer_reference != NULL ) { if( ( flags & LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) == 0 ) { if( buffer_reference->data != NULL ) { memory_free( buffer_reference->data ); } } memory_free( buffer_reference ); } return( -1 ); } /* Frees the buffer reference and its values * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_free( libfdata_buffer_reference_t **buffer_reference, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_free"; if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( *buffer_reference != NULL ) { if( ( ( *buffer_reference )->flags & LIBFDATA_BUFFER_DATA_FLAG_MANAGED ) != 0 ) { if( ( *buffer_reference )->data != NULL ) { memory_free( ( *buffer_reference )->data ); } } memory_free( *buffer_reference ); *buffer_reference = NULL; } return( 1 ); } /* Clones the source buffer_reference to the destination * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_clone( libfdata_buffer_reference_t **destination_buffer_reference, libfdata_buffer_reference_t *source_buffer_reference, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_clone"; if( destination_buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination buffer reference.", function ); return( -1 ); } if( *destination_buffer_reference != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination buffer reference value already set.", function ); return( -1 ); } if( source_buffer_reference == NULL ) { *destination_buffer_reference = NULL; return( 1 ); } *destination_buffer_reference = memory_allocate_structure( libfdata_buffer_reference_t ); if( *destination_buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination buffer reference.", function ); goto on_error; } if( memory_set( *destination_buffer_reference, 0, sizeof( libfdata_buffer_reference_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear destinatino buffer reference.", function ); memory_free( *destination_buffer_reference ); *destination_buffer_reference = NULL; return( -1 ); } if( source_buffer_reference->data_size > 0 ) { ( *destination_buffer_reference )->data = (uint8_t *) memory_allocate( sizeof( uint8_t ) * source_buffer_reference->data_size ); if( ( *destination_buffer_reference )->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create data.", function ); goto on_error; } if( memory_copy( ( *destination_buffer_reference )->data, source_buffer_reference->data, source_buffer_reference->data_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data.", function ); goto on_error; } ( *destination_buffer_reference )->flags |= LIBFDATA_BUFFER_DATA_FLAG_MANAGED; } ( *destination_buffer_reference )->data_size = source_buffer_reference->data_size; ( *destination_buffer_reference )->flags |= source_buffer_reference->flags; return( 1 ); on_error: if( *destination_buffer_reference != NULL ) { if( ( *destination_buffer_reference )->data != NULL ) { memory_free( ( *destination_buffer_reference )->data ); } memory_free( *destination_buffer_reference ); *destination_buffer_reference = NULL; } return( -1 ); } /* Segment functions */ /* Retrieves the number of segments * The number of segments is 0 when there is no data * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_get_number_of_segments( libfdata_buffer_reference_t *buffer_reference, int *number_of_segments, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_get_number_of_segments"; if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of segments.", function ); return( -1 ); } if( buffer_reference->data != NULL ) { *number_of_segments = 1; } else { *number_of_segments = 0; } return( 1 ); } /* Data functions */ /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_get_size( libfdata_buffer_reference_t *buffer_reference, size64_t *size, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_get_size"; if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } *size = (size64_t) buffer_reference->data_size; return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_get_data( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfcache_cache_t *cache LIBFDATA_ATTRIBUTE_UNUSED, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_get_data"; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) LIBFDATA_UNREFERENCED_PARAMETER( cache ) if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } *data = buffer_reference->data; *data_size = buffer_reference->data_size; return( 1 ); } /* Retrieves the segment data of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_get_segment_data( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfcache_cache_t *cache LIBFDATA_ATTRIBUTE_UNUSED, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags LIBFDATA_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_get_segment_data"; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) LIBFDATA_UNREFERENCED_PARAMETER( cache ) LIBFDATA_UNREFERENCED_PARAMETER( read_flags ) if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( segment_index != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment value out of bounds.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } *data = buffer_reference->data; *data_size = buffer_reference->data_size; return( 1 ); } /* Retrieves the segment data at a certain offset * The data size set to the remaining size in the corresponding segment * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_get_segment_data_at_offset( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfcache_cache_t *cache LIBFDATA_ATTRIBUTE_UNUSED, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags LIBFDATA_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_get_segment_data_at_offset"; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) LIBFDATA_UNREFERENCED_PARAMETER( cache ) LIBFDATA_UNREFERENCED_PARAMETER( read_flags ) if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( buffer_reference->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid buffer reference - missing data.", function ); return( -1 ); } if( data_offset > (off64_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid data offset value exceeds maximum.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } if( data_offset >= (off64_t) buffer_reference->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value exceeds segment data size.", function ); return( -1 ); } *data = &( ( buffer_reference->data )[ data_offset ] ); *data_size = buffer_reference->data_size - (size_t) data_offset; return( 1 ); } /* Retrieves the segment data at a value index * The data size set to the remaining size in the corresponding segment * Returns 1 if successful or -1 on error */ int libfdata_buffer_reference_get_segment_data_at_value_index( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfcache_cache_t *cache LIBFDATA_ATTRIBUTE_UNUSED, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags LIBFDATA_ATTRIBUTE_UNUSED, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_get_segment_data_at_value_index"; size_t segment_data_offset = 0; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) LIBFDATA_UNREFERENCED_PARAMETER( cache ) LIBFDATA_UNREFERENCED_PARAMETER( read_flags ) if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( buffer_reference->data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid buffer reference - missing data.", function ); return( -1 ); } if( value_index < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid value index value out of bounds.", function ); return( -1 ); } if( value_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid value size value exceeds maximum.", function ); return( -1 ); } if( data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data.", function ); return( -1 ); } if( data_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data size.", function ); return( -1 ); } segment_data_offset = value_size * (size_t) value_index; if( segment_data_offset >= buffer_reference->data_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment data offset value exceeds segment data size.", function ); return( -1 ); } *data = &( ( buffer_reference->data )[ segment_data_offset ] ); *data_size = buffer_reference->data_size - segment_data_offset; return( 1 ); } /* IO functions */ /* Reads data from the current offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libfdata_buffer_reference_read_buffer( libfdata_buffer_reference_t *buffer_reference, libbfio_handle_t *file_io_handle LIBFDATA_ATTRIBUTE_UNUSED, libfcache_cache_t *cache LIBFDATA_ATTRIBUTE_UNUSED, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_read_buffer"; LIBFDATA_UNREFERENCED_PARAMETER( file_io_handle ) LIBFDATA_UNREFERENCED_PARAMETER( cache ) if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( ( buffer_reference->data_offset < 0 ) || ( buffer_reference->data_offset >= (off64_t) buffer_reference->data_size ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid data offset value out of bounds.", function ); return( -1 ); } if( (off64_t) ( buffer_reference->data_offset + buffer_size ) > (off64_t) buffer_reference->data_size ) { buffer_size = buffer_reference->data_size - (size_t) buffer_reference->data_offset; } if( buffer_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid buffer size value exceeds maximum.", function ); return( -1 ); } if( memory_copy( buffer, buffer_reference->data, buffer_size ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy data to buffer.", function ); return( -1 ); } buffer_reference->data_offset += buffer_size; return( (ssize_t) buffer_size ); } /* Seeks a certain offset of the data * Returns the offset if seek is successful or -1 on error */ off64_t libfdata_buffer_reference_seek_offset( libfdata_buffer_reference_t *buffer_reference, off64_t offset, int whence, libcerror_error_t **error ) { static char *function = "libfdata_buffer_reference_seek_offset"; if( buffer_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid buffer reference.", function ); return( -1 ); } if( ( whence != SEEK_CUR ) && ( whence != SEEK_END ) && ( whence != SEEK_SET ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE, "%s: unsupported whence.", function ); return( -1 ); } if( whence == SEEK_CUR ) { offset += buffer_reference->data_offset; } else if( whence == SEEK_END ) { offset += (off64_t) buffer_reference->data_size; } #if defined( HAVE_DEBUG_OUTPUT ) if( libcnotify_verbose != 0 ) { libcnotify_printf( "%s: seeking offset: %" PRIi64 ".\n", function, offset ); } #endif if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid offset value out of bounds.", function ); return( -1 ); } buffer_reference->data_offset = offset; return( offset ); } libpff-20120802/libfdata/libfdata_reference.c0000644000175000017500000005547211765042507015657 00000000000000/* * Data reference functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_block.h" #include "libfdata_buffer.h" #include "libfdata_definitions.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_reference.h" #include "libfdata_types.h" /* Initializes the reference and its values * Returns 1 if successful or -1 on error */ int libfdata_reference_initialize( libfdata_reference_t **reference, intptr_t *data_handle, int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ), int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ), int (*get_number_of_segments)( intptr_t *data_handle, int *number_of_segments, libcerror_error_t **error ), int (*get_size)( intptr_t *data_handle, size64_t *size, libcerror_error_t **error ), int (*get_data)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ), int (*get_segment_data)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ), int (*get_segment_data_at_offset)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ), int (*get_segment_data_at_value_index)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ), ssize_t (*read_buffer)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ), off64_t (*seek_offset)( intptr_t *data_handle, off64_t offset, int whence, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_initialize"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } if( *reference != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid reference value already set.", function ); return( -1 ); } if( free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid free data handle function.", function ); return( -1 ); } internal_reference = memory_allocate_structure( libfdata_internal_reference_t ); if( internal_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create reference.", function ); goto on_error; } if( memory_set( internal_reference, 0, sizeof( libfdata_internal_reference_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear reference.", function ); goto on_error; } internal_reference->data_handle = data_handle; internal_reference->free_data_handle = free_data_handle; internal_reference->clone_data_handle = clone_data_handle; internal_reference->get_number_of_segments = get_number_of_segments; internal_reference->get_size = get_size; internal_reference->get_data = get_data; internal_reference->get_segment_data = get_segment_data; internal_reference->get_segment_data_at_offset = get_segment_data_at_offset; internal_reference->get_segment_data_at_value_index = get_segment_data_at_value_index; internal_reference->read_buffer = read_buffer; internal_reference->seek_offset = seek_offset; internal_reference->flags = flags; *reference = (libfdata_reference_t *) internal_reference; return( 1 ); on_error: if( internal_reference != NULL ) { memory_free( internal_reference ); } return( -1 ); } /* Frees the reference and its values * Returns 1 if successful or -1 on error */ int libfdata_reference_free( libfdata_reference_t **reference, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_free"; int result = 1; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } if( *reference != NULL ) { internal_reference = (libfdata_internal_reference_t *) *reference; *reference = NULL; if( internal_reference->data_handle != NULL ) { if( internal_reference->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing free data handle function.", function ); result = -1; } else if( internal_reference->free_data_handle( &( internal_reference->data_handle ), error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED, "%s: unable to free data handle.", function ); result = -1; } } memory_free( internal_reference ); } return( result ); } /* Clones the source reference to the destination * Returns 1 if successful or -1 on error */ int libfdata_reference_clone( libfdata_reference_t **destination_reference, libfdata_reference_t *source_reference, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_source_reference = NULL; intptr_t *destination_data_handle = NULL; static char *function = "libfdata_reference_clone"; if( destination_reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination reference.", function ); return( -1 ); } if( *destination_reference != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid destination reference value already set.", function ); return( -1 ); } if( source_reference == NULL ) { *destination_reference = NULL; return( 1 ); } internal_source_reference = (libfdata_internal_reference_t *) source_reference; if( internal_source_reference->free_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source reference - missing free data handle function.", function ); goto on_error; } if( internal_source_reference->clone_data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid source reference - missing clone data handle function.", function ); goto on_error; } if( internal_source_reference->clone_data_handle( &destination_data_handle, internal_source_reference->data_handle, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination data handle.", function ); goto on_error; } if( libfdata_reference_initialize( destination_reference, destination_data_handle, internal_source_reference->free_data_handle, internal_source_reference->clone_data_handle, internal_source_reference->get_number_of_segments, internal_source_reference->get_size, internal_source_reference->get_data, internal_source_reference->get_segment_data, internal_source_reference->get_segment_data_at_offset, internal_source_reference->get_segment_data_at_value_index, internal_source_reference->read_buffer, internal_source_reference->seek_offset, LIBFDATA_REFERENCE_FLAG_MANAGED, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to create destination reference.", function ); goto on_error; } return( 1 ); on_error: if( destination_data_handle != NULL ) { internal_source_reference->free_data_handle( &destination_data_handle, NULL ); } return( -1 ); } /* Retrieves the data handle * Returns 1 if successful or -1 on error */ int libfdata_reference_get_data_handle( libfdata_reference_t *reference, intptr_t **data_handle, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_data_handle"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( data_handle == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid data handle.", function ); return( -1 ); } *data_handle = internal_reference->data_handle; return( 1 ); } /* Segment functions */ /* Retrieves the number of segments * The number of segments is 0 when there is no data * Returns 1 if successful or -1 on error */ int libfdata_reference_get_number_of_segments( libfdata_reference_t *reference, int *number_of_segments, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_number_of_segments"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->data_handle == NULL ) { if( number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of segments.", function ); return( -1 ); } *number_of_segments = 0; } else { if( internal_reference->get_number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing get number of segments function.", function ); return( -1 ); } if( internal_reference->get_number_of_segments( internal_reference->data_handle, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve number of segments.", function ); return( -1 ); } } return( 1 ); } /* Data functions */ /* Retrieves the size * Returns 1 if successful or -1 on error */ int libfdata_reference_get_size( libfdata_reference_t *reference, size64_t *size, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_size"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->get_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing get size function.", function ); return( -1 ); } if( internal_reference->get_size( internal_reference->data_handle, size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve size.", function ); return( -1 ); } return( 1 ); } /* Retrieves the data * Returns 1 if successful or -1 on error */ int libfdata_reference_get_data( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_data"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->get_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing get data function.", function ); return( -1 ); } if( internal_reference->get_data( internal_reference->data_handle, file_io_handle, cache, data, data_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data.", function ); return( -1 ); } return( 1 ); } /* Retrieves the segment data of a specific segment * Returns 1 if successful or -1 on error */ int libfdata_reference_get_segment_data( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_segment_data"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->get_segment_data == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing get segment data function.", function ); return( -1 ); } if( internal_reference->get_segment_data( internal_reference->data_handle, file_io_handle, cache, segment_index, data, data_size, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve data of segment: %d.", function, segment_index ); return( -1 ); } return( 1 ); } /* Retrieves the segment data at a certain offset * The data size set to the remaining size in the corresponding segment * Returns 1 if successful or -1 on error */ int libfdata_reference_get_segment_data_at_offset( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_segment_data_at_offset"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->get_segment_data_at_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing get segment data at offset function.", function ); return( -1 ); } if( internal_reference->get_segment_data_at_offset( internal_reference->data_handle, file_io_handle, cache, data_offset, data, data_size, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment data at offset %" PRIi64 ".", function, data_offset ); return( -1 ); } return( 1 ); } /* Retrieves the segment data at a value index * The data size set to the remaining size in the corresponding segment * Returns 1 if successful or -1 on error */ int libfdata_reference_get_segment_data_at_value_index( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_get_segment_data_at_value_index"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->get_segment_data_at_value_index == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing get segment data at value index function.", function ); return( -1 ); } if( internal_reference->get_segment_data_at_value_index( internal_reference->data_handle, file_io_handle, cache, value_index, value_size, data, data_size, read_flags, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve segment data at value index.", function ); return( -1 ); } return( 1 ); } /* IO functions */ /* Reads data from the current offset into a buffer * Returns the number of bytes read or -1 on error */ ssize_t libfdata_reference_read_buffer( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_read_buffer"; ssize_t read_count = 0; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->read_buffer == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing read buffer function.", function ); return( -1 ); } read_count = internal_reference->read_buffer( internal_reference->data_handle, file_io_handle, cache, buffer, buffer_size, error ); if( read_count != (ssize_t) buffer_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_READ_FAILED, "%s: unable to read buffer.", function ); return( -1 ); } return( read_count ); } /* Seeks a certain offset of the data * Returns the offset if seek is successful or -1 on error */ off64_t libfdata_reference_seek_offset( libfdata_reference_t *reference, off64_t offset, int whence, libcerror_error_t **error ) { libfdata_internal_reference_t *internal_reference = NULL; static char *function = "libfdata_reference_seek_offset"; if( reference == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid reference.", function ); return( -1 ); } internal_reference = (libfdata_internal_reference_t *) reference; if( internal_reference->seek_offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: invalid reference - missing seek offset function.", function ); return( -1 ); } offset = internal_reference->seek_offset( internal_reference->data_handle, offset, whence, error ); if( offset == -1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_IO, LIBCERROR_IO_ERROR_SEEK_FAILED, "%s: unable to seek offset.", function ); return( -1 ); } return( offset ); } libpff-20120802/libfdata/libfdata_definitions.h0000644000175000017500000001320111765042507016221 00000000000000/* * The internal definitions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_DEFINITIONS_H ) #define _LIBFDATA_INTERNAL_DEFINITIONS_H #include /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata */ #if !defined( HAVE_LOCAL_LIBFDATA ) #include /* The definitions in are copied here * for local use of libfdata */ #else #define LIBFDATA_VERSION 20120519 /* The libfdata version string */ #define LIBFDATA_VERSION_STRING "20120519" /* The library flags definitions */ enum LIBFDATA_FLAGS { /* The IO handle is not managed by the library */ LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED = 0x00, /* The IO handle is managed by the library */ LIBFDATA_FLAG_IO_HANDLE_MANAGED = 0x01, }; /* The buffer data flags definitions */ enum LIBFDATA_BUFFER_DATA_FLAGS { LIBFDATA_BUFFER_DATA_FLAG_NON_MANAGED = LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, LIBFDATA_BUFFER_DATA_FLAG_MANAGED = LIBFDATA_FLAG_IO_HANDLE_MANAGED }; /* The list flags definitions */ enum LIBFDATA_LIST_FLAGS { /* The value offsets need to be calculated */ LIBFDATA_LIST_FLAG_CALCULATE_VALUE_OFFSETS = 0x10, }; /* The list element value flags definitions */ enum LIBFDATA_LIST_ELEMENT_VALUE_FLAGS { LIBFDATA_LIST_ELEMENT_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, LIBFDATA_LIST_ELEMENT_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_IO_HANDLE_MANAGED }; /* The range flags definitions */ enum LIBFDATA_RANGE_FLAGS { /* The range is sparse */ LIBFDATA_RANGE_FLAG_IS_SPARSE = 0x00000001UL, /* The range is compressed */ LIBFDATA_RANGE_FLAG_IS_COMPRESSED = 0x00000002UL, /* The range is tainted (possibly corrupted) */ LIBFDATA_RANGE_FLAG_IS_TAINTED = 0x00000010UL, /* The range is corrupted */ LIBFDATA_RANGE_FLAG_IS_CORRUPTED = 0x00000020UL, /* User defined flags */ LIBFDATA_RANGE_FLAG_USER_DEFINED_1 = 0x00000100UL, LIBFDATA_RANGE_FLAG_USER_DEFINED_2 = 0x00000200UL, LIBFDATA_RANGE_FLAG_USER_DEFINED_3 = 0x00000400UL, LIBFDATA_RANGE_FLAG_USER_DEFINED_4 = 0x00000800UL, }; #define LIBFDATA_RANGE_FLAG_MAXIMUM \ LIBFDATA_RANGE_FLAG_USER_DEFINED_4 /* The read flags definitions */ enum LIBFDATA_READ_FLAGS { /* Ignore data cached by the library */ LIBFDATA_READ_FLAG_IGNORE_CACHE = 0x01 }; /* The reference type definitions */ enum LIBFDATA_REFERENCE_TYPES { LIBFDATA_REFERENCE_TYPE_BUFFER = 1, LIBFDATA_REFERENCE_TYPE_BLOCK = 2 }; /* The reference flags definitions */ enum LIBFDATA_REFERENCE_FLAGS { LIBFDATA_REFERENCE_FLAG_NON_MANAGED = LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, LIBFDATA_REFERENCE_FLAG_MANAGED = LIBFDATA_FLAG_IO_HANDLE_MANAGED }; /* The segment data flags definitions */ enum LIBFDATA_SEGMENT_DATA_FLAGS { LIBFDATA_SEGMENT_DATA_FLAG_NON_MANAGED = LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, LIBFDATA_SEGMENT_DATA_FLAG_MANAGED = LIBFDATA_FLAG_IO_HANDLE_MANAGED }; /* The tree node comparison definitions */ enum LIBFDATA_TREE_NODE_COMPARE_DEFINITIONS { /* The first node value is less than the second node value */ LIBFDATA_TREE_NODE_COMPARE_LESS, /* The first and second node values are equal */ LIBFDATA_TREE_NODE_COMPARE_EQUAL, /* The first node value is greater than the second node value */ LIBFDATA_TREE_NODE_COMPARE_GREATER }; /* The tree node flags definitions */ enum LIBFDATA_TREE_NODE_FLAGS { /* The node is virtual */ LIBFDATA_TREE_NODE_FLAG_IS_VIRTUAL = 0x02, /* The node is deleted */ LIBFDATA_TREE_NODE_FLAG_IS_DELETED = 0x04, /* The node is a leaf */ LIBFDATA_TREE_NODE_FLAG_IS_LEAF = 0x08, /* The sub nodes range was set */ LIBFDATA_TREE_NODE_FLAG_SUB_NODES_RANGE_SET = 0x10, /* The sub nodes have been read */ LIBFDATA_TREE_NODE_FLAG_SUB_NODES_READ = 0x20, /* The node data has been read (at least once) */ LIBFDATA_TREE_NODE_FLAG_NOTE_DATA_READ = 0x40, /* The leaf nodes values need to be calculated */ LIBFDATA_TREE_NODE_FLAG_CALCULATE_LEAF_NODE_VALUES = 0x80 }; /* The tree node insert flag definitions */ enum LIBFDATA_TREE_NODE_INSERT_FLAGS { /* Allow duplicate sub node values */ LIBFDATA_TREE_NODE_INSERT_FLAG_NON_UNIQUE_SUB_NODE_VALUES = 0x00, /* Only allow unique sub node values, no duplicates */ LIBFDATA_TREE_NODE_INSERT_FLAG_UNIQUE_SUB_NODE_VALUES = 0x01, }; /* The tree node value flags definitions */ enum LIBFDATA_TREE_NODE_VALUE_FLAGS { LIBFDATA_TREE_NODE_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, LIBFDATA_TREE_NODE_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_IO_HANDLE_MANAGED }; /* The vector element value flags definitions */ enum LIBFDATA_VECTOR_ELEMENT_VALUE_FLAGS { LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_NON_MANAGED = LIBFDATA_FLAG_IO_HANDLE_NON_MANAGED, LIBFDATA_VECTOR_ELEMENT_VALUE_FLAG_MANAGED = LIBFDATA_FLAG_IO_HANDLE_MANAGED }; #endif #endif libpff-20120802/libfdata/libfdata_range.c0000644000175000017500000001454511765042507015011 00000000000000/* * The data range functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libfdata_libcerror.h" #include "libfdata_range.h" /* Initializes the range * Returns 1 if successful or -1 on error */ int libfdata_range_initialize( libfdata_range_t **range, libcerror_error_t **error ) { static char *function = "libfdata_range_initialize"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", function ); return( -1 ); } if( *range != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid range value already set.", function ); return( -1 ); } *range = memory_allocate_structure( libfdata_range_t ); if( *range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create range.", function ); goto on_error; } if( memory_set( *range, 0, sizeof( libfdata_range_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear range.", function ); goto on_error; } return( 1 ); on_error: if( *range != NULL ) { memory_free( *range ); *range = NULL; } return( -1 ); } /* Frees the range * Returns 1 if successful or -1 on error */ int libfdata_range_free( libfdata_range_t **range, libcerror_error_t **error ) { static char *function = "libfdata_range_free"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", function ); return( -1 ); } if( *range != NULL ) { memory_free( *range ); *range = NULL; } return( 1 ); } /* Clones (duplicates) the range * Returns 1 if successful or -1 on error */ int libfdata_range_clone( libfdata_range_t **destination_range, libfdata_range_t *source_range, libcerror_error_t **error ) { static char *function = "libfdata_range_clone"; if( destination_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid destination range.", function ); return( -1 ); } if( *destination_range != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: destination range already set.", function ); return( -1 ); } if( source_range == NULL ) { *destination_range = NULL; return( 1 ); } *destination_range = memory_allocate_structure( libfdata_range_t ); if( *destination_range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create destination range.", function ); goto on_error; } if( memory_copy( *destination_range, source_range, sizeof( libfdata_range_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_COPY_FAILED, "%s: unable to copy source to destination range.", function ); goto on_error; } return( 1 ); on_error: if( *destination_range != NULL ) { memory_free( *destination_range ); *destination_range = NULL; } return( -1 ); } /* Retrieves the range values * Returns 1 if successful or -1 on error */ int libfdata_range_get_values( libfdata_range_t *range, off64_t *offset, size64_t *size, uint32_t *flags, libcerror_error_t **error ) { static char *function = "libfdata_range_get_values"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", function ); return( -1 ); } if( offset == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid offset.", function ); return( -1 ); } if( size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid size.", function ); return( -1 ); } if( flags == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: nt data flags.", function ); return( -1 ); } *offset = range->offset; *size = range->size; *flags = range->flags; return( 1 ); } /* Sets the range values * Returns 1 if successful or -1 on error */ int libfdata_range_set_values( libfdata_range_t *range, off64_t offset, size64_t size, uint32_t flags, libcerror_error_t **error ) { static char *function = "libfdata_range_set_values"; if( range == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid range.", function ); return( -1 ); } if( offset < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid offset value less than zero.", function ); return( -1 ); } if( size > (size64_t) INT64_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid size value exceeds maximum.", function ); return( -1 ); } range->offset = offset; range->size = size; range->flags = flags; return( 1 ); } libpff-20120802/libfdata/libfdata_reference.h0000644000175000017500000002101211765042507015643 00000000000000/* * Data reference functions * * Copyright (c) 2010-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBFDATA_INTERNAL_REFERENCE_H ) #define _LIBFDATA_INTERNAL_REFERENCE_H #include #include #include "libfdata_extern.h" #include "libfdata_libbfio.h" #include "libfdata_libcerror.h" #include "libfdata_libfcache.h" #include "libfdata_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libfdata_internal_reference libfdata_internal_reference_t; struct libfdata_internal_reference { /* The data handle */ intptr_t *data_handle; /* The flags */ uint8_t flags; /* Function to free the data handle */ int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ); /* Function to clone the data handle */ int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ); /* Function to retrieve the number of segments */ int (*get_number_of_segments)( intptr_t *data_handle, int *number_of_segments, libcerror_error_t **error ); /* Function to retrieve the size */ int (*get_size)( intptr_t *data_handle, size64_t *size, libcerror_error_t **error ); /* Function to retrieve the data */ int (*get_data)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ); /* Function to retrieve the segment data */ int (*get_segment_data)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); /* Function to retrieve the segment data at a specific offset */ int (*get_segment_data_at_offset)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); /* Function to retrieve the segment data at a specific value index */ int (*get_segment_data_at_value_index)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); /* Function to read a buffer */ ssize_t (*read_buffer)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); /* Function to seek an offset */ off64_t (*seek_offset)( intptr_t *data_handle, off64_t offset, int whence, libcerror_error_t **error ); }; LIBFDATA_EXTERN \ int libfdata_reference_initialize( libfdata_reference_t **reference, intptr_t *data_handle, int (*free_data_handle)( intptr_t **data_handle, libcerror_error_t **error ), int (*clone_data_handle)( intptr_t **destination_data_handle, intptr_t *source_data_handle, libcerror_error_t **error ), int (*get_number_of_segments)( intptr_t *data_handle, int *number_of_segments, libcerror_error_t **error ), int (*get_size)( intptr_t *data_handle, size64_t *size, libcerror_error_t **error ), int (*get_data)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ), int (*get_segment_data)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ), int (*get_segment_data_at_offset)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ), int (*get_segment_data_at_value_index)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ), ssize_t (*read_buffer)( intptr_t *data_handle, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ), off64_t (*seek_offset)( intptr_t *data_handle, off64_t offset, int whence, libcerror_error_t **error ), uint8_t flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_free( libfdata_reference_t **reference, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_clone( libfdata_reference_t **destination_reference, libfdata_reference_t *source_reference, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_get_data_handle( libfdata_reference_t *reference, intptr_t **data_handle, libcerror_error_t **error ); /* Segment functions */ LIBFDATA_EXTERN \ int libfdata_reference_get_number_of_segments( libfdata_reference_t *reference, int *number_of_segments, libcerror_error_t **error ); /* Data functions */ LIBFDATA_EXTERN \ int libfdata_reference_get_size( libfdata_reference_t *reference, size64_t *size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_get_data( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t **data, size_t *data_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_get_segment_data( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int segment_index, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_get_segment_data_at_offset( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, off64_t data_offset, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); LIBFDATA_EXTERN \ int libfdata_reference_get_segment_data_at_value_index( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, int value_index, size_t value_size, uint8_t **data, size_t *data_size, uint8_t read_flags, libcerror_error_t **error ); /* IO functions */ LIBFDATA_EXTERN \ ssize_t libfdata_reference_read_buffer( libfdata_reference_t *reference, libbfio_handle_t *file_io_handle, libfcache_cache_t *cache, uint8_t *buffer, size_t buffer_size, libcerror_error_t **error ); LIBFDATA_EXTERN \ off64_t libfdata_reference_seek_offset( libfdata_reference_t *reference, off64_t offset, int whence, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/0000775000175000017500000000000012006536212012201 500000000000000libpff-20120802/libcsplit/libcsplit_types.h0000644000175000017500000000276212005152771015513 00000000000000/* * The internal type definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_TYPES_H ) #define _LIBCSPLIT_TYPES_H #include #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit * The definitions in are copied here * for local use of libcsplit */ #if defined( HAVE_LOCAL_LIBCSPLIT ) /* The following type definitions hide internal data structures */ #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) typedef struct libcsplit_narrow_split_string {} libcsplit_narrow_split_string_t; typedef struct libcsplit_wide_split_string {} libcsplit_wide_split_string_t; #else typedef intptr_t libcsplit_narrow_split_string_t; typedef intptr_t libcsplit_wide_split_string_t; #endif #endif #endif libpff-20120802/libcsplit/libcsplit_wide_string.h0000644000175000017500000000262612005152771016664 00000000000000/* * Wide character string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_WIDE_STRING_H ) #define _LIBCSPLIT_WIDE_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) LIBCSPLIT_EXTERN \ int libcsplit_wide_string_split( const wchar_t *string, size_t string_size, wchar_t delimiter, libcsplit_wide_split_string_t **split_string, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/libcsplit_error.h0000644000175000017500000000335112005152771015473 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_ERROR_H ) #define _LIBCSPLIT_INTERNAL_ERROR_H #include #include #include #if !defined( HAVE_LOCAL_LIBCSPLIT ) #include #endif #include "libcsplit_extern.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCSPLIT ) LIBCSPLIT_EXTERN \ void libcsplit_error_free( libcsplit_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_error_fprint( libcsplit_error_t *error, FILE *stream ); LIBCSPLIT_EXTERN \ int libcsplit_error_sprint( libcsplit_error_t *error, char *string, size_t size ); LIBCSPLIT_EXTERN \ int libcsplit_error_backtrace_fprint( libcsplit_error_t *error, FILE *stream ); LIBCSPLIT_EXTERN \ int libcsplit_error_backtrace_sprint( libcsplit_error_t *error, char *string, size_t size ); #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/libcsplit_support.h0000644000175000017500000000232212005152771016053 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_SUPPORT_H ) #define _LIBCSPLIT_SUPPORT_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #if defined( __cplusplus ) extern "C" { #endif #if !defined( HAVE_LOCAL_LIBCSPLIT ) LIBCSPLIT_EXTERN \ const char *libcsplit_get_version( void ); #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/libcsplit_narrow_split_string.c0000644000175000017500000003305512005152771020452 00000000000000/* * Split narrow string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcsplit_libcerror.h" #include "libcsplit_libcstring.h" #include "libcsplit_narrow_split_string.h" #include "libcsplit_types.h" /* Initializes the split string * Returns 1 if successful or -1 on error */ int libcsplit_narrow_split_string_initialize( libcsplit_narrow_split_string_t **split_string, const char *string, size_t string_size, int number_of_segments, libcerror_error_t **error ) { libcsplit_internal_narrow_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_narrow_split_string_initialize"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string value already set.", function ); return( -1 ); } if( number_of_segments < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of segments less than zero.", function ); return( -1 ); } internal_split_string = memory_allocate_structure( libcsplit_internal_narrow_split_string_t ); if( internal_split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create split string.", function ); goto on_error; } if( memory_set( internal_split_string, 0, sizeof( libcsplit_internal_narrow_split_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear split string.", function ); memory_free( internal_split_string ); return( -1 ); } if( ( string != NULL ) && ( string_size > 0 ) ) { internal_split_string->string = libcstring_narrow_string_allocate( string_size ); if( internal_split_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_copy( internal_split_string->string, string, sizeof( char ) * ( string_size - 1 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to copy string.", function ); goto on_error; } internal_split_string->string[ string_size - 1 ] = 0; internal_split_string->string_size = string_size; } if( number_of_segments > 0 ) { internal_split_string->segments = (char **) memory_allocate( sizeof( char * ) * number_of_segments ); if( internal_split_string->segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segments.", function ); goto on_error; } if( memory_set( internal_split_string->segments, 0, sizeof( char * ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segments.", function ); goto on_error; } internal_split_string->segment_sizes = (size_t *) memory_allocate( sizeof( size_t ) * number_of_segments ); if( internal_split_string->segment_sizes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segment sizes.", function ); goto on_error; } if( memory_set( internal_split_string->segment_sizes, 0, sizeof( size_t ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segment sizes.", function ); goto on_error; } } internal_split_string->number_of_segments = number_of_segments; *split_string = (libcsplit_narrow_split_string_t *) internal_split_string; return( 1 ); on_error: if( internal_split_string != NULL ) { if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } memory_free( internal_split_string ); } return( -1 ); } /* Frees the split string including elements * Returns 1 if successful or -1 on error */ int libcsplit_narrow_split_string_free( libcsplit_narrow_split_string_t **split_string, libcerror_error_t **error ) { libcsplit_internal_narrow_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_narrow_split_string_free"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } if( *split_string != NULL ) { internal_split_string = (libcsplit_internal_narrow_split_string_t *) *split_string; *split_string = NULL; if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } memory_free( internal_split_string ); } return( 1 ); } /* Retrieves the string * Returns 1 if successful or -1 on error */ int libcsplit_narrow_split_string_get_string( libcsplit_narrow_split_string_t *split_string, char **string, size_t *string_size, libcerror_error_t **error ) { libcsplit_internal_narrow_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_narrow_split_string_get_string"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_narrow_split_string_t *) split_string; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( 1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( 1 ); } *string = internal_split_string->string; *string_size = internal_split_string->string_size; return( 1 ); } /* Retrieves the number of segments * Returns 1 if successful or -1 on error */ int libcsplit_narrow_split_string_get_number_of_segments( libcsplit_narrow_split_string_t *split_string, int *number_of_segments, libcerror_error_t **error ) { libcsplit_internal_narrow_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_narrow_split_string_get_number_of_segments"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_narrow_split_string_t *) split_string; if( number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of segments.", function ); return( 1 ); } *number_of_segments = internal_split_string->number_of_segments; return( 1 ); } /* Retrieves a specific segment * Returns 1 if successful or -1 on error */ int libcsplit_narrow_split_string_get_segment_by_index( libcsplit_narrow_split_string_t *split_string, int segment_index, char **string_segment, size_t *string_segment_size, libcerror_error_t **error ) { libcsplit_internal_narrow_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_narrow_split_string_get_segment_by_index"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_narrow_split_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string segment.", function ); return( 1 ); } if( string_segment_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string segment size.", function ); return( 1 ); } *string_segment = internal_split_string->segments[ segment_index ]; *string_segment_size = internal_split_string->segment_sizes[ segment_index ]; return( 1 ); } /* Sets a specific segment * Returns 1 if successful or -1 on error */ int libcsplit_narrow_split_string_set_segment_by_index( libcsplit_narrow_split_string_t *split_string, int segment_index, char *string_segment, size_t string_segment_size, libcerror_error_t **error ) { libcsplit_internal_narrow_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_narrow_split_string_set_segment_by_index"; size_t string_segment_offset = 0; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_narrow_split_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( string_segment_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string segment size value exceeds maximum.", function ); return( -1 ); } if( string_segment == NULL ) { if( string_segment_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment size value out of bounds.", function ); return( -1 ); } } else { if( string_segment < internal_split_string->string ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment value out of bounds.", function ); return( -1 ); } string_segment_offset = (size_t) ( string_segment - internal_split_string->string ); if( string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment value out of bounds.", function ); return( -1 ); } string_segment_offset += string_segment_size; if( string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment value out of bounds.", function ); return( -1 ); } } internal_split_string->segments[ segment_index ] = string_segment; internal_split_string->segment_sizes[ segment_index ] = string_segment_size; return( 1 ); } libpff-20120802/libcsplit/libcsplit_narrow_split_string.h0000644000175000017500000000534712005152771020462 00000000000000/* * Split narrow string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H ) #define _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif typedef struct libcsplit_internal_narrow_split_string libcsplit_internal_narrow_split_string_t; struct libcsplit_internal_narrow_split_string { /* The number of string segments */ int number_of_segments; /* The string */ char *string; /* The string size */ size_t string_size; /* The segments */ char **segments; /* The segment sizes */ size_t *segment_sizes; }; int libcsplit_narrow_split_string_initialize( libcsplit_narrow_split_string_t **split_string, const char *string, size_t string_size, int number_of_segments, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_free( libcsplit_narrow_split_string_t **split_string, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_get_string( libcsplit_narrow_split_string_t *split_string, char **string, size_t *string_size, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_get_number_of_segments( libcsplit_narrow_split_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_get_segment_by_index( libcsplit_narrow_split_string_t *split_string, int segment_index, char **string_segment, size_t *string_segment_size, libcerror_error_t **error ); LIBCSPLIT_EXTERN \ int libcsplit_narrow_split_string_set_segment_by_index( libcsplit_narrow_split_string_t *split_string, int segment_index, char *string_segment, size_t string_segment_size, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/Makefile.am0000644000175000017500000000163412005152771014162 00000000000000if HAVE_LOCAL_LIBCSPLIT AM_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common \ @LIBCSTRING_CPPFLAGS@ \ @LIBCERROR_CPPFLAGS@ \ @MEMWATCH_CPPFLAGS@ noinst_LTLIBRARIES = libcsplit.la libcsplit_la_SOURCES = \ libcsplit_definitions.h \ libcsplit_extern.h \ libcsplit_error.c libcsplit_error.h \ libcsplit_narrow_split_string.c libcsplit_narrow_split_string.h \ libcsplit_narrow_string.c libcsplit_narrow_string.h \ libcsplit_libcerror.h \ libcsplit_libcstring.h \ libcsplit_support.c libcsplit_support.h \ libcsplit_types.h \ libcsplit_unused.h \ libcsplit_wide_split_string.c libcsplit_wide_split_string.h \ libcsplit_wide_string.c libcsplit_wide_string.h endif MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) libpff-20120802/libcsplit/libcsplit_wide_split_string.c0000644000175000017500000003312312005152771020066 00000000000000/* * Split wide string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcsplit_libcerror.h" #include "libcsplit_libcstring.h" #include "libcsplit_wide_split_string.h" #include "libcsplit_types.h" #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Initializes the split string * Returns 1 if successful or -1 on error */ int libcsplit_wide_split_string_initialize( libcsplit_wide_split_string_t **split_string, const wchar_t *string, size_t string_size, int number_of_segments, libcerror_error_t **error ) { libcsplit_internal_wide_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_wide_split_string_initialize"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string value already set.", function ); return( -1 ); } if( number_of_segments < 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_LESS_THAN_ZERO, "%s: invalid number of segments less than zero.", function ); return( -1 ); } internal_split_string = memory_allocate_structure( libcsplit_internal_wide_split_string_t ); if( internal_split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create split string.", function ); goto on_error; } if( memory_set( internal_split_string, 0, sizeof( libcsplit_internal_wide_split_string_t ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear split string.", function ); memory_free( internal_split_string ); return( -1 ); } if( ( string != NULL ) && ( string_size > 0 ) ) { internal_split_string->string = libcstring_wide_string_allocate( string_size ); if( internal_split_string->string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create string.", function ); goto on_error; } if( memory_copy( internal_split_string->string, string, sizeof( wchar_t ) * ( string_size - 1 ) ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to copy string.", function ); goto on_error; } internal_split_string->string[ string_size - 1 ] = 0; internal_split_string->string_size = string_size; } if( number_of_segments > 0 ) { internal_split_string->segments = (wchar_t **) memory_allocate( sizeof( wchar_t * ) * number_of_segments ); if( internal_split_string->segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segments.", function ); goto on_error; } if( memory_set( internal_split_string->segments, 0, sizeof( wchar_t * ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segments.", function ); goto on_error; } internal_split_string->segment_sizes = (size_t *) memory_allocate( sizeof( size_t ) * number_of_segments ); if( internal_split_string->segment_sizes == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_INSUFFICIENT, "%s: unable to create segment sizes.", function ); goto on_error; } if( memory_set( internal_split_string->segment_sizes, 0, sizeof( size_t ) * number_of_segments ) == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_MEMORY, LIBCERROR_MEMORY_ERROR_SET_FAILED, "%s: unable to clear segment sizes.", function ); goto on_error; } } internal_split_string->number_of_segments = number_of_segments; *split_string = (libcsplit_wide_split_string_t *) internal_split_string; return( 1 ); on_error: if( internal_split_string != NULL ) { if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } memory_free( internal_split_string ); } return( -1 ); } /* Frees the split string including elements * Returns 1 if successful or -1 on error */ int libcsplit_wide_split_string_free( libcsplit_wide_split_string_t **split_string, libcerror_error_t **error ) { libcsplit_internal_wide_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_wide_split_string_free"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } if( *split_string != NULL ) { internal_split_string = (libcsplit_internal_wide_split_string_t *) *split_string; *split_string = NULL; if( internal_split_string->string != NULL ) { memory_free( internal_split_string->string ); } if( internal_split_string->segments != NULL ) { memory_free( internal_split_string->segments ); } if( internal_split_string->segment_sizes != NULL ) { memory_free( internal_split_string->segment_sizes ); } memory_free( internal_split_string ); } return( 1 ); } /* Retrieves the string * Returns 1 if successful or -1 on error */ int libcsplit_wide_split_string_get_string( libcsplit_wide_split_string_t *split_string, wchar_t **string, size_t *string_size, libcerror_error_t **error ) { libcsplit_internal_wide_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_wide_split_string_get_string"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_wide_split_string_t *) split_string; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( 1 ); } if( string_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string size.", function ); return( 1 ); } *string = internal_split_string->string; *string_size = internal_split_string->string_size; return( 1 ); } /* Retrieves the number of segments * Returns 1 if successful or -1 on error */ int libcsplit_wide_split_string_get_number_of_segments( libcsplit_wide_split_string_t *split_string, int *number_of_segments, libcerror_error_t **error ) { libcsplit_internal_wide_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_wide_split_string_get_number_of_segments"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_wide_split_string_t *) split_string; if( number_of_segments == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid number of segments.", function ); return( 1 ); } *number_of_segments = internal_split_string->number_of_segments; return( 1 ); } /* Retrieves a specific segment * Returns 1 if successful or -1 on error */ int libcsplit_wide_split_string_get_segment_by_index( libcsplit_wide_split_string_t *split_string, int segment_index, wchar_t **string_segment, size_t *string_segment_size, libcerror_error_t **error ) { libcsplit_internal_wide_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_wide_split_string_get_segment_by_index"; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_wide_split_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( string_segment == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string segment.", function ); return( 1 ); } if( string_segment_size == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string segment size.", function ); return( 1 ); } *string_segment = internal_split_string->segments[ segment_index ]; *string_segment_size = internal_split_string->segment_sizes[ segment_index ]; return( 1 ); } /* Sets a specific segment * Returns 1 if successful or -1 on error */ int libcsplit_wide_split_string_set_segment_by_index( libcsplit_wide_split_string_t *split_string, int segment_index, wchar_t *string_segment, size_t string_segment_size, libcerror_error_t **error ) { libcsplit_internal_wide_split_string_t *internal_split_string = NULL; static char *function = "libcsplit_wide_split_string_set_segment_by_index"; size_t string_segment_offset = 0; if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( 1 ); } internal_split_string = (libcsplit_internal_wide_split_string_t *) split_string; if( ( segment_index < 0 ) || ( segment_index >= internal_split_string->number_of_segments ) ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid segment index value out of bounds.", function ); return( -1 ); } if( string_segment_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string segment size value exceeds maximum.", function ); return( -1 ); } if( string_segment == NULL ) { if( string_segment_size != 0 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment size value out of bounds.", function ); return( -1 ); } } else { if( string_segment < internal_split_string->string ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment value out of bounds.", function ); return( -1 ); } string_segment_offset = (size_t) ( string_segment - internal_split_string->string ); if( string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment value out of bounds.", function ); return( -1 ); } string_segment_offset += string_segment_size; if( string_segment_offset > internal_split_string->string_size ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string segment value out of bounds.", function ); return( -1 ); } } internal_split_string->segments[ segment_index ] = string_segment; internal_split_string->segment_sizes[ segment_index ] = string_segment_size; return( 1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/libcsplit/libcsplit_narrow_string.h0000644000175000017500000000247712005152771017250 00000000000000/* * Narrow character string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_NARROW_STRING_H ) #define _LIBCSPLIT_NARROW_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif LIBCSPLIT_EXTERN \ int libcsplit_narrow_string_split( const char *string, size_t string_size, char delimiter, libcsplit_narrow_split_string_t **split_string, libcerror_error_t **error ); #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/libcsplit_unused.h0000644000175000017500000000247712005152771015655 00000000000000/* * The internal unused definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_UNUSED_H ) #define _LIBCSPLIT_INTERNAL_UNUSED_H #include #if !defined( LIBCSPLIT_ATTRIBUTE_UNUSED ) #if defined( __GNUC__ ) && __GNUC__ >= 3 #define LIBCSPLIT_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #else #define LIBCSPLIT_ATTRIBUTE_UNUSED #endif #endif #if defined( _MSC_VER ) #define LIBCSPLIT_UNREFERENCED_PARAMETER( parameter ) \ UNREFERENCED_PARAMETER( parameter ); #else #define LIBCSPLIT_UNREFERENCED_PARAMETER( parameter ) \ /* parameter */ #endif #endif libpff-20120802/libcsplit/libcsplit_wide_string.c0000644000175000017500000001445412005152771016661 00000000000000/* * Wide character string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsplit_libcerror.h" #include "libcsplit_wide_split_string.h" #include "libcsplit_wide_string.h" #include "libcsplit_types.h" #if defined( HAVE_WIDE_CHARACTER_TYPE ) /* Splits a wide character string * Returns 1 if successful or -1 on error */ int libcsplit_wide_string_split( const wchar_t *string, size_t string_size, wchar_t delimiter, libcsplit_wide_split_string_t **split_string, libcerror_error_t **error ) { wchar_t *segment_start = NULL; wchar_t *segment_end = NULL; wchar_t *string_end = NULL; static char *function = "libcsplit_wide_string_split"; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( string_size == 0 ) || ( string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (wchar_t *) string; string_end = (wchar_t *) &( string[ string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libcsplit_wide_split_string_initialize( split_string, string, string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libcsplit_wide_split_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } segment_end = segment_start; string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libcsplit_wide_split_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == ( (libcsplit_internal_wide_split_string_t *) *split_string )->string ) { segment_start++; } if( segment_end != ( (libcsplit_internal_wide_split_string_t *) *split_string )->string ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libcsplit_wide_split_string_free( split_string, NULL ); } return( -1 ); } #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ libpff-20120802/libcsplit/libcsplit_narrow_string.c0000644000175000017500000001433712005152771017241 00000000000000/* * Narrow character string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsplit_libcerror.h" #include "libcsplit_narrow_split_string.h" #include "libcsplit_narrow_string.h" #include "libcsplit_types.h" /* Splits a narrow character string * Returns 1 if successful or -1 on error */ int libcsplit_narrow_string_split( const char *string, size_t string_size, char delimiter, libcsplit_narrow_split_string_t **split_string, libcerror_error_t **error ) { char *segment_start = NULL; char *segment_end = NULL; char *string_end = NULL; static char *function = "libcsplit_narrow_string_split"; ssize_t segment_length = 0; int number_of_segments = 0; int segment_index = 0; if( string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid string.", function ); return( -1 ); } if( string_size > (size_t) SSIZE_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM, "%s: invalid string size value exceeds maximum.", function ); return( -1 ); } if( split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_ARGUMENTS, LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, "%s: invalid split string.", function ); return( -1 ); } if( *split_string != NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET, "%s: invalid split string already set.", function ); return( -1 ); } /* An empty string has no segments */ if( ( string_size == 0 ) || ( string[ 0 ] == 0 ) ) { return( 1 ); } /* Determine the number of segments */ segment_start = (char *) string; string_end = (char *) &( string[ string_size - 1 ] ); do { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end > string_end ) { break; } segment_index++; if( segment_end == NULL ) { break; } if( segment_end == segment_start ) { segment_start++; } else if( segment_end != string ) { segment_start = segment_end + 1; } } while( segment_end != NULL ); number_of_segments = segment_index; if( libcsplit_narrow_split_string_initialize( split_string, string, string_size, number_of_segments, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED, "%s: unable to intialize split string.", function ); goto on_error; } if( *split_string == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing split string.", function ); goto on_error; } /* Do not bother splitting empty strings */ if( number_of_segments == 0 ) { return( 1 ); } /* Determine the segments * empty segments are stored as strings only containing the end of character */ if( libcsplit_narrow_split_string_get_string( *split_string, &segment_start, &string_size, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, "%s: unable to retrieve split string.", function ); goto on_error; } if( segment_start == NULL ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_MISSING, "%s: missing segment start.", function ); goto on_error; } if( string_size < 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, "%s: invalid string size value out of bounds.", function ); goto on_error; } segment_end = segment_start; string_end = &( segment_start[ string_size - 1 ] ); for( segment_index = 0; segment_index < number_of_segments; segment_index++ ) { segment_end = segment_start; while( segment_end <= string_end ) { if( ( segment_end == string_end ) || ( *segment_end == 0 ) ) { segment_end = NULL; break; } else if( *segment_end == delimiter ) { break; } segment_end++; } if( segment_end == NULL ) { segment_length = (ssize_t) ( string_end - segment_start ); } else { segment_length = (ssize_t) ( segment_end - segment_start ); } if( segment_length >= 0 ) { segment_start[ segment_length ] = 0; if( libcsplit_narrow_split_string_set_segment_by_index( *split_string, segment_index, segment_start, segment_length + 1, error ) != 1 ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_SET_FAILED, "%s: unable to set split string segment: %d.", function, segment_index ); goto on_error; } } if( segment_end == NULL ) { break; } if( segment_end == ( (libcsplit_internal_narrow_split_string_t *) *split_string )->string ) { segment_start++; } if( segment_end != ( (libcsplit_internal_narrow_split_string_t *) *split_string )->string ) { segment_start = segment_end + 1; } } return( 1 ); on_error: if( *split_string != NULL ) { libcsplit_narrow_split_string_free( split_string, NULL ); } return( -1 ); } libpff-20120802/libcsplit/Makefile.in0000664000175000017500000006414012006536015014174 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libcsplit DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcsplit_la_LIBADD = am__libcsplit_la_SOURCES_DIST = libcsplit_definitions.h \ libcsplit_extern.h libcsplit_error.c libcsplit_error.h \ libcsplit_narrow_split_string.c \ libcsplit_narrow_split_string.h libcsplit_narrow_string.c \ libcsplit_narrow_string.h libcsplit_libcerror.h \ libcsplit_libcstring.h libcsplit_support.c libcsplit_support.h \ libcsplit_types.h libcsplit_unused.h \ libcsplit_wide_split_string.c libcsplit_wide_split_string.h \ libcsplit_wide_string.c libcsplit_wide_string.h @HAVE_LOCAL_LIBCSPLIT_TRUE@am_libcsplit_la_OBJECTS = \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_error.lo \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_split_string.lo \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_string.lo \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_support.lo \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_wide_split_string.lo \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_wide_string.lo libcsplit_la_OBJECTS = $(am_libcsplit_la_OBJECTS) @HAVE_LOCAL_LIBCSPLIT_TRUE@am_libcsplit_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libcsplit_la_SOURCES) DIST_SOURCES = $(am__libcsplit_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_LOCAL_LIBCSPLIT_TRUE@AM_CPPFLAGS = \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I$(top_srcdir)/include \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I$(top_srcdir)/common \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ @LIBCSTRING_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ @LIBCERROR_CPPFLAGS@ \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ @MEMWATCH_CPPFLAGS@ @HAVE_LOCAL_LIBCSPLIT_TRUE@noinst_LTLIBRARIES = libcsplit.la @HAVE_LOCAL_LIBCSPLIT_TRUE@libcsplit_la_SOURCES = \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_definitions.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_extern.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_error.c libcsplit_error.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_split_string.c libcsplit_narrow_split_string.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_string.c libcsplit_narrow_string.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_libcerror.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_libcstring.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_support.c libcsplit_support.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_types.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_unused.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_wide_split_string.c libcsplit_wide_split_string.h \ @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_wide_string.c libcsplit_wide_string.h MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcsplit/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libcsplit/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcsplit.la: $(libcsplit_la_OBJECTS) $(libcsplit_la_DEPENDENCIES) $(LINK) $(am_libcsplit_la_rpath) $(libcsplit_la_OBJECTS) $(libcsplit_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_narrow_split_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_narrow_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_support.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_wide_split_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsplit_wide_string.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am distclean: clean /bin/rm -f Makefile splint: @echo "Running splint on libcsplit ..." -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsplit_la_SOURCES) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/libcsplit/libcsplit_wide_split_string.h0000644000175000017500000000532112005152771020072 00000000000000/* * Split wide string functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_WIDE_SPLIT_STRING_H ) #define _LIBCSPLIT_INTERNAL_WIDE_SPLIT_STRING_H #include #include #include "libcsplit_extern.h" #include "libcsplit_libcerror.h" #include "libcsplit_types.h" #if defined( __cplusplus ) extern "C" { #endif #if defined( HAVE_WIDE_CHARACTER_TYPE ) typedef struct libcsplit_internal_wide_split_string libcsplit_internal_wide_split_string_t; struct libcsplit_internal_wide_split_string { /* The number of string segments */ int number_of_segments; /* The string */ wchar_t *string; /* The string size */ size_t string_size; /* The segments */ wchar_t **segments; /* The segment sizes */ size_t *segment_sizes; }; int libcsplit_wide_split_string_initialize( libcsplit_wide_split_string_t **split_string, const wchar_t *string, size_t string_size, int number_of_segments, libcerror_error_t **error ); int libcsplit_wide_split_string_free( libcsplit_wide_split_string_t **split_string, libcerror_error_t **error ); int libcsplit_wide_split_string_get_string( libcsplit_wide_split_string_t *split_string, wchar_t **string, size_t *string_size, libcerror_error_t **error ); int libcsplit_wide_split_string_get_number_of_segments( libcsplit_wide_split_string_t *split_string, int *number_of_segments, libcerror_error_t **error ); int libcsplit_wide_split_string_get_segment_by_index( libcsplit_wide_split_string_t *split_string, int segment_index, wchar_t **string_segment, size_t *string_segment_size, libcerror_error_t **error ); int libcsplit_wide_split_string_set_segment_by_index( libcsplit_wide_split_string_t *split_string, int segment_index, wchar_t *string_segment, size_t string_segment_size, libcerror_error_t **error ); #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */ #if defined( __cplusplus ) } #endif #endif libpff-20120802/libcsplit/libcsplit_definitions.h0000644000175000017500000000252312005152771016655 00000000000000/* * The internal definitions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( LIBCSPLIT_INTERNAL_DEFINITIONS_H ) #define LIBCSPLIT_INTERNAL_DEFINITIONS_H #include #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if !defined( HAVE_LOCAL_LIBCSPLIT ) #include /* The definitions in are copied here * for local use of libcsplit */ #else #define LIBCSPLIT_VERSION 20120701 /* The libcstring version string */ #define LIBCSPLIT_VERSION_STRING "20120701" #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ #endif libpff-20120802/libcsplit/libcsplit_error.c0000644000175000017500000000472712005152771015476 00000000000000/* * Error functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include #include "libcsplit_error.h" #include "libcsplit_libcerror.h" #if !defined( HAVE_LOCAL_LIBCSPLIT ) /* Free an error and its elements */ void libcsplit_error_free( libcsplit_error_t **error ) { libcerror_error_free( (libcerror_error_t **) error ); } /* Prints a descriptive string of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcsplit_error_fprint( libcsplit_error_t *error, FILE *stream ) { return( libcerror_error_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a descriptive string of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libcsplit_error_sprint( libcsplit_error_t *error, char *string, size_t size ) { return( libcerror_error_sprint( (libcerror_error_t *) error, string, size ) ); } /* Prints a backtrace of the error to the stream * Returns the number of printed characters if successful or -1 on error */ int libcsplit_error_backtrace_fprint( libcsplit_error_t *error, FILE *stream ) { return( libcerror_error_backtrace_fprint( (libcerror_error_t *) error, stream ) ); } /* Prints a backtrace of the error to the string * Returns the number of printed characters if successful or -1 on error */ int libcsplit_error_backtrace_sprint( libcsplit_error_t *error, char *string, size_t size ) { return( libcerror_error_backtrace_sprint( (libcerror_error_t *) error, string, size ) ); } #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ libpff-20120802/libcsplit/libcsplit_support.c0000644000175000017500000000231312005152771016046 00000000000000/* * Support functions * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #include #include #include "libcsplit_definitions.h" #include "libcsplit_libcerror.h" #include "libcsplit_libcstring.h" #include "libcsplit_support.h" #if !defined( HAVE_LOCAL_LIBCSPLIT ) /* Returns the library version as a string */ const char *libcsplit_get_version( void ) { return( (const char *) LIBCSPLIT_VERSION_STRING ); } #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */ libpff-20120802/libcsplit/libcsplit_libcerror.h0000644000175000017500000000252512005152771016327 00000000000000/* * The internal libcerror header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_LIBCERROR_H ) #define _LIBCSPLIT_LIBCERROR_H #include /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror */ #if defined( HAVE_LOCAL_LIBCERROR ) #include #include #include #include #else /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT * before including libcerror.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCERROR_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsplit/libcsplit_libcstring.h0000644000175000017500000000262612005152771016506 00000000000000/* * The internal libcstring header * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_LIBCSTRING_H ) #define _LIBCSPLIT_LIBCSTRING_H #include /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring */ #if defined( HAVE_LOCAL_LIBCSTRING ) #include #include #include #include #include #else /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT * before including libcstring.h */ #if defined( _WIN32 ) && defined( DLL_IMPORT ) #define LIBCSTRING_DLL_IMPORT #endif #include #endif #endif libpff-20120802/libcsplit/libcsplit_extern.h0000644000175000017500000000242612005152771015651 00000000000000/* * The internal extern definition * * Copyright (c) 2008-2012, Joachim Metz * * Refer to AUTHORS for acknowledgements. * * This software is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this software. If not, see . */ #if !defined( _LIBCSPLIT_INTERNAL_EXTERN_H ) #define _LIBCSPLIT_INTERNAL_EXTERN_H #include /* Define HAVE_LOCAL_LIBCSPLIT for local use of libcsplit */ #if !defined( HAVE_LOCAL_LIBCSPLIT ) /* If libtool DLL support is enabled set LIBCSPLIT_DLL_EXPORT * before including libcsplit/extern.h */ #if defined( _WIN32 ) && defined( DLL_EXPORT ) #define LIBCSPLIT_DLL_EXPORT #endif #include #else #define LIBCSPLIT_EXTERN extern #endif #endif libpff-20120802/README.dll0000644000175000017500000000372311753706651011607 00000000000000Creating and using a DLL * Creating a DLL * Using the DLL Creating a DLL There are multiple methods of creating a DLL: * using Cygwin * using Microsoft Visual Studio C++ * using MingW Creating a DLL using Cygwin To create a DLL using Cygwin you'll need: Cygwin with the following packages: * binutils * gcc-core * autoconf * automake * make * libtool * gettext * libiconv Building the library: ./configure make library You should end up with the following DLL: libpff-/libpff/.libs/cygpff-0.dll Older versions of Cygwin might require e2fsprogs for libuuid support Install the e2fsprogs package and run the commands as following: LDFLAGS=-L/usr/lib/e2fsprogs ./configure make library Creating a DLL using Microsoft Visual Studio C++ To create a DLL using Microsoft Visual Studio C++ you'll need: * Microsoft Visual Studio C++ The provided Visual Studio project files were created using the 2008 express version. The express verion is available on the Microsoft website Make sure to check if your build environment defines the correct WINVER for your build. The code uses WINAPI version specific functions based on WINVER. You can define a custom WINVER in the Microsoft Visual Studio C++ project files or in libpff-/common/config_msc.h You should be able to build the DLL using the provided project files. Note that the project files contain a Release and VSDebug configuration. If you want to create your own Microsoft Visual Studio project files note that libpff needs to be compiled with the parameter /MD, because stderr is passed from the executables. Creating a DLL using MingW To create a DLL using MingW see README.mingw You should end up with the following DLL: libpff/.libs/libpff-.dll Using the DLL Make sure you use define LIBPFF_DLL_IMPORT before including , When the DLL was build with Microsoft Visual Studio, you'll also need the Microsoft Visual Studio redistributable DLLs to run on other platforms than the build platform. libpff-20120802/macosx/0000775000175000017500000000000012006536214011510 500000000000000libpff-20120802/macosx/Makefile.am0000644000175000017500000000032211370323433013457 00000000000000EXTRA_DIST = \ Introduction.rtf \ Introduction.rtf.in \ libpff.pmproj \ License.rtf \ Readme.rtf MAINTAINERCLEANFILES = \ Makefile.in distclean: clean /bin/rm -f Introduction.rtf /bin/rm -f Makefile libpff-20120802/macosx/Introduction.rtf0000664000175000017500000000060412006536127014631 00000000000000{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf470 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9880\viewh13400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\fs24 \cf0 This will install a universal build of libpff 20120802 and the pfftools.} libpff-20120802/macosx/Introduction.rtf.in0000644000175000017500000000060511056055054015234 00000000000000{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf470 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9880\viewh13400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\fs24 \cf0 This will install a universal build of libpff @VERSION@ and the pfftools.} libpff-20120802/macosx/License.rtf0000644000175000017500000001771711011553566013546 00000000000000{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf470 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \paperw11900\paperh16840\margl1440\margr1440\vieww9000\viewh8400\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural \f0\fs24 \cf0 GNU LESSER GENERAL PUBLIC LICENSE\ Version 3, 29 June 2007\ \ Copyright (C) 2007 Free Software Foundation, Inc. \ Everyone is permitted to copy and distribute verbatim copies\ of this license document, but changing it is not allowed.\ \ \ This version of the GNU Lesser General Public License incorporates\ the terms and conditions of version 3 of the GNU General Public\ License, supplemented by the additional permissions listed below.\ \ 0. Additional Definitions. \ \ As used herein, "this License" refers to version 3 of the GNU Lesser\ General Public License, and the "GNU GPL" refers to version 3 of the GNU\ General Public License.\ \ "The Library" refers to a covered work governed by this License,\ other than an Application or a Combined Work as defined below.\ \ An "Application" is any work that makes use of an interface provided\ by the Library, but which is not otherwise based on the Library.\ Defining a subclass of a class defined by the Library is deemed a mode\ of using an interface provided by the Library.\ \ A "Combined Work" is a work produced by combining or linking an\ Application with the Library. The particular version of the Library\ with which the Combined Work was made is also called the "Linked\ Version".\ \ The "Minimal Corresponding Source" for a Combined Work means the\ Corresponding Source for the Combined Work, excluding any source code\ for portions of the Combined Work that, considered in isolation, are\ based on the Application, and not on the Linked Version.\ \ The "Corresponding Application Code" for a Combined Work means the\ object code and/or source code for the Application, including any data\ and utility programs needed for reproducing the Combined Work from the\ Application, but excluding the System Libraries of the Combined Work.\ \ 1. Exception to Section 3 of the GNU GPL.\ \ You may convey a covered work under sections 3 and 4 of this License\ without being bound by section 3 of the GNU GPL.\ \ 2. Conveying Modified Versions.\ \ If you modify a copy of the Library, and, in your modifications, a\ facility refers to a function or data to be supplied by an Application\ that uses the facility (other than as an argument passed when the\ facility is invoked), then you may convey a copy of the modified\ version:\ \ a) under this License, provided that you make a good faith effort to\ ensure that, in the event an Application does not supply the\ function or data, the facility still operates, and performs\ whatever part of its purpose remains meaningful, or\ \ b) under the GNU GPL, with none of the additional permissions of\ this License applicable to that copy.\ \ 3. Object Code Incorporating Material from Library Header Files.\ \ The object code form of an Application may incorporate material from\ a header file that is part of the Library. You may convey such object\ code under terms of your choice, provided that, if the incorporated\ material is not limited to numerical parameters, data structure\ layouts and accessors, or small macros, inline functions and templates\ (ten or fewer lines in length), you do both of the following:\ \ a) Give prominent notice with each copy of the object code that the\ Library is used in it and that the Library and its use are\ covered by this License.\ \ b) Accompany the object code with a copy of the GNU GPL and this license\ document.\ \ 4. Combined Works.\ \ You may convey a Combined Work under terms of your choice that,\ taken together, effectively do not restrict modification of the\ portions of the Library contained in the Combined Work and reverse\ engineering for debugging such modifications, if you also do each of\ the following:\ \ a) Give prominent notice with each copy of the Combined Work that\ the Library is used in it and that the Library and its use are\ covered by this License.\ \ b) Accompany the Combined Work with a copy of the GNU GPL and this license\ document.\ \ c) For a Combined Work that displays copyright notices during\ execution, include the copyright notice for the Library among\ these notices, as well as a reference directing the user to the\ copies of the GNU GPL and this license document.\ \ d) Do one of the following:\ \ 0) Convey the Minimal Corresponding Source under the terms of this\ License, and the Corresponding Application Code in a form\ suitable for, and under terms that permit, the user to\ recombine or relink the Application with a modified version of\ the Linked Version to produce a modified Combined Work, in the\ manner specified by section 6 of the GNU GPL for conveying\ Corresponding Source.\ \ 1) Use a suitable shared library mechanism for linking with the\ Library. A suitable mechanism is one that (a) uses at run time\ a copy of the Library already present on the user's computer\ system, and (b) will operate properly with a modified version\ of the Library that is interface-compatible with the Linked\ Version. \ \ e) Provide Installation Information, but only if you would otherwise\ be required to provide such information under section 6 of the\ GNU GPL, and only to the extent that such information is\ necessary to install and execute a modified version of the\ Combined Work produced by recombining or relinking the\ Application with a modified version of the Linked Version. (If\ you use option 4d0, the Installation Information must accompany\ the Minimal Corresponding Source and Corresponding Application\ Code. If you use option 4d1, you must provide the Installation\ Information in the manner specified by section 6 of the GNU GPL\ for conveying Corresponding Source.)\ \ 5. Combined Libraries.\ \ You may place library facilities that are a work based on the\ Library side by side in a single library together with other library\ facilities that are not Applications and are not covered by this\ License, and convey such a combined library under terms of your\ choice, if you do both of the following:\ \ a) Accompany the combined library with a copy of the same work based\ on the Library, uncombined with any other library facilities,\ conveyed under the terms of this License.\ \ b) Give prominent notice with the combined library that part of it\ is a work based on the Library, and explaining where to find the\ accompanying uncombined form of the same work.\ \ 6. Revised Versions of the GNU Lesser General Public License.\ \ The Free Software Foundation may publish revised and/or new versions\ of the GNU Lesser General Public License from time to time. Such new\ versions will be similar in spirit to the present version, but may\ differ in detail to address new problems or concerns.\ \ Each version is given a distinguishing version number. If the\ Library as you received it specifies that a certain numbered version\ of the GNU Lesser General Public License "or any later version"\ applies to it, you have the option of following the terms and\ conditions either of that published version or of any later version\ published by the Free Software Foundation. If the Library as you\ received it does not specify a version number of the GNU Lesser\ General Public License, you may choose any version of the GNU Lesser\ General Public License ever published by the Free Software Foundation.\ \ If the Library as you received it specifies that a proxy can decide\ whether future versions of the GNU Lesser General Public License shall\ apply, that proxy's public statement of acceptance of any version is\ permanent authorization for you to choose that version for the\ Library.\ \ }libpff-20120802/macosx/libpff.pmproj0000644000175000017500000000420011353703370014120 00000000000000bplist00 Y$archiverX$versionT$topX$objects_NSKeyedArchiver Troot@ %+158MTUX\]abgkosvCcU$null  !"$^documentFormatYbuildPathYresources_requirementsPlist_requirementsVolumeCheckScript\pathMappingsTinfoV$classTdesc_fileFilterPatterns_requirementsInstallCheckScript_locatorDefinitions ?49&'()*ZNS.objectsWNS.keys,-./X$classesZ$classname/0\NSDictionaryXNSObject&'234,-677/0_NSMutableDictionary9:;<=>?@ABCCDEF HIJKLYalignmentWscalingWlicenseZconclusion_localizedMimeResourcesUmodelZbackgroundVreadmeWwelcomeVextras  NO>PQ STtypeTpath _Introduction.rtf,-VWW0YLocalPathNO>PY S  ZReadme.rtfNO>P^ S  [License.rtfNO>c S NO>c S NO>P S &'pq4,-tuu0YResources&'w4xxx{|}{{{x{{{'''()+(((-/0'1(2((3 !"#$%&]preserveForks[followLinks]removeDSStore\allowBackRevXcontentsYtempBuildZinstallFat^rootVolumeOnly_updateInstalledLanguages_installLocationWgetInfo]authorizationXcompressZidentifier_overwritePermissionsZonFinished[relocatableXrequired\shortVersion NO>P S* StmpNO>c S, \/private/tmpNO>c S. U/usr/_O@VERSION@, Copyright (c) 2008-2010, Joachim Metz _net.sourceforge.libpffY@VERSION@&'4ʀ78̀56[descriptionUtitle_Qlibpff is a library to support the Personal Folder File (OST, PAB and PST) format_libpff @VERSION@&٤؀:;<=>U/CVS$W/\.svn$]/\.cvsignore$Z/\.cvspass,-0^NSMutableArrayWNSArray,-0WSPModelVPModel$)2DILQS %*?`uwy{}(08C\bmt| &(*,579;BCDFKNX_uwy{}!,;Vhp~n!&+-/135;CQ\aet|libpff-20120802/macosx/Makefile.in0000664000175000017500000004651612006536016013511 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = macosx DIST_COMMON = $(srcdir)/Introduction.rtf.in $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \ $(top_srcdir)/m4/java.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcerror.m4 \ $(top_srcdir)/m4/libcfile.m4 $(top_srcdir)/m4/libclocale.m4 \ $(top_srcdir)/m4/libcnotify.m4 $(top_srcdir)/m4/libcpath.m4 \ $(top_srcdir)/m4/libcsplit.m4 $(top_srcdir)/m4/libcstring.m4 \ $(top_srcdir)/m4/libcsystem.m4 $(top_srcdir)/m4/libfcache.m4 \ $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \ $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \ $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/libuna.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/m4/types.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/config.h CONFIG_CLEAN_FILES = Introduction.rtf CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASENAME = @BASENAME@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATE = @DATE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_LIBBFIO = @HAVE_LIBBFIO@ HAVE_LIBCERROR = @HAVE_LIBCERROR@ HAVE_LIBCFILE = @HAVE_LIBCFILE@ HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@ HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@ HAVE_LIBCPATH = @HAVE_LIBCPATH@ HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@ HAVE_LIBCSTRING = @HAVE_LIBCSTRING@ HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@ HAVE_LIBFCACHE = @HAVE_LIBFCACHE@ HAVE_LIBFDATA = @HAVE_LIBFDATA@ HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@ HAVE_LIBFGUID = @HAVE_LIBFGUID@ HAVE_LIBFMAPI = @HAVE_LIBFMAPI@ HAVE_LIBFVALUE = @HAVE_LIBFVALUE@ HAVE_LIBFWNT = @HAVE_LIBFWNT@ HAVE_LIBUNA = @HAVE_LIBUNA@ HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@ HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@ HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@ HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@ HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@ HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@ HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@ HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@ HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@ HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@ HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@ HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@ HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@ HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@ HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@ HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@ HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@ HAVE_OFF64_T = @HAVE_OFF64_T@ HAVE_SIZE32_T = @HAVE_SIZE32_T@ HAVE_SIZE64_T = @HAVE_SIZE64_T@ HAVE_SSIZE32_T = @HAVE_SSIZE32_T@ HAVE_SSIZE64_T = @HAVE_SSIZE64_T@ HAVE_STDINT_H = @HAVE_STDINT_H@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ HAVE_WCHAR_H = @HAVE_WCHAR_H@ HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ JAR = @JAR@ JAR_PACKAGE_DIR = @JAR_PACKAGE_DIR@ JAVA = @JAVA@ JAVAC = @JAVAC@ JAVAH = @JAVAH@ JAVA_CPPFLAGS = @JAVA_CPPFLAGS@ JNI_LIBRARY_DIR = @JNI_LIBRARY_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@ LIBBFIO_LIBADD = @LIBBFIO_LIBADD@ LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@ LIBCERROR_LIBADD = @LIBCERROR_LIBADD@ LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@ LIBCFILE_LIBADD = @LIBCFILE_LIBADD@ LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@ LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@ LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@ LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@ LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@ LIBCPATH_LIBADD = @LIBCPATH_LIBADD@ LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@ LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@ LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@ LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@ LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@ LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@ LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@ LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@ LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@ LIBFDATA_LIBADD = @LIBFDATA_LIBADD@ LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@ LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@ LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@ LIBFGUID_LIBADD = @LIBFGUID_LIBADD@ LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@ LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@ LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@ LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@ LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@ LIBFWNT_LIBADD = @LIBFWNT_LIBADD@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBPFF_DLL_IMPORT = @LIBPFF_DLL_IMPORT@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@ LIBUNA_LIBADD = @LIBUNA_LIBADD@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MEMWATCH_CPPFLAGS = @MEMWATCH_CPPFLAGS@ MEMWATCH_LIBADD = @MEMWATCH_LIBADD@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POSUB = @POSUB@ PYTHON = @PYTHON@ PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@ PYTHON_LDFLAGS = @PYTHON_LDFLAGS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_SITE_PKG = @PYTHON_SITE_PKG@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ READLINK = @READLINK@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@ ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@ ax_libbfio_spec_requires = @ax_libbfio_spec_requires@ ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@ ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@ ax_libcerror_spec_requires = @ax_libcerror_spec_requires@ ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@ ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@ ax_libcfile_spec_requires = @ax_libcfile_spec_requires@ ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@ ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@ ax_libclocale_spec_requires = @ax_libclocale_spec_requires@ ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@ ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@ ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@ ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@ ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@ ax_libcpath_spec_requires = @ax_libcpath_spec_requires@ ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@ ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@ ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@ ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@ ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@ ax_libcstring_spec_requires = @ax_libcstring_spec_requires@ ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@ ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@ ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@ ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@ ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@ ax_libfcache_spec_requires = @ax_libfcache_spec_requires@ ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@ ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@ ax_libfdata_spec_requires = @ax_libfdata_spec_requires@ ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@ ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@ ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@ ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@ ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@ ax_libfguid_spec_requires = @ax_libfguid_spec_requires@ ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@ ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@ ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@ ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@ ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@ ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@ ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@ ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@ ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@ ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@ ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@ ax_libuna_spec_requires = @ax_libuna_spec_requires@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libbfio_CFLAGS = @libbfio_CFLAGS@ libbfio_LIBS = @libbfio_LIBS@ libcerror_CFLAGS = @libcerror_CFLAGS@ libcerror_LIBS = @libcerror_LIBS@ libcfile_CFLAGS = @libcfile_CFLAGS@ libcfile_LIBS = @libcfile_LIBS@ libclocale_CFLAGS = @libclocale_CFLAGS@ libclocale_LIBS = @libclocale_LIBS@ libcnotify_CFLAGS = @libcnotify_CFLAGS@ libcnotify_LIBS = @libcnotify_LIBS@ libcpath_CFLAGS = @libcpath_CFLAGS@ libcpath_LIBS = @libcpath_LIBS@ libcsplit_CFLAGS = @libcsplit_CFLAGS@ libcsplit_LIBS = @libcsplit_LIBS@ libcstring_CFLAGS = @libcstring_CFLAGS@ libcstring_LIBS = @libcstring_LIBS@ libcsystem_CFLAGS = @libcsystem_CFLAGS@ libcsystem_LIBS = @libcsystem_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libfcache_CFLAGS = @libfcache_CFLAGS@ libfcache_LIBS = @libfcache_LIBS@ libfdata_CFLAGS = @libfdata_CFLAGS@ libfdata_LIBS = @libfdata_LIBS@ libfdatetime_CFLAGS = @libfdatetime_CFLAGS@ libfdatetime_LIBS = @libfdatetime_LIBS@ libfguid_CFLAGS = @libfguid_CFLAGS@ libfguid_LIBS = @libfguid_LIBS@ libfmapi_CFLAGS = @libfmapi_CFLAGS@ libfmapi_LIBS = @libfmapi_LIBS@ libfvalue_CFLAGS = @libfvalue_CFLAGS@ libfvalue_LIBS = @libfvalue_LIBS@ libfwnt_CFLAGS = @libfwnt_CFLAGS@ libfwnt_LIBS = @libfwnt_LIBS@ libpff_spec_build_requires = @libpff_spec_build_requires@ libpff_spec_requires = @libpff_spec_requires@ libpff_tools_spec_build_requires = @libpff_tools_spec_build_requires@ libuna_CFLAGS = @libuna_CFLAGS@ libuna_LIBS = @libuna_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ Introduction.rtf \ Introduction.rtf.in \ libpff.pmproj \ License.rtf \ Readme.rtf MAINTAINERCLEANFILES = \ Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu macosx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu macosx/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): Introduction.rtf: $(top_builddir)/config.status $(srcdir)/Introduction.rtf.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am distclean: clean /bin/rm -f Introduction.rtf /bin/rm -f Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libpff-20120802/macosx/Readme.rtf0000644000175000017500000000061711254412161013342 00000000000000{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf470 {\fonttbl\f0\fswiss\fcharset77 Helvetica;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9880\viewh13400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\fs24 \cf0 libpff is a library to support the Personal Folder File (OST, PAB and PST) format\ } libpff-20120802/configure.ac0000644000175000017500000001755112006533640012433 00000000000000AC_PREREQ( 2.59 ) AC_INIT( [libpff], [20120802], [joachim.metz@gmail.com]) AC_CONFIG_SRCDIR( [include/libpff.h.in]) AM_INIT_AUTOMAKE([gnu 1.6]) AC_CONFIG_MACRO_DIR([m4]) dnl Check for host type AC_CANONICAL_HOST dnl Check for large file support AC_SYS_LARGEFILE dnl Check for libtool DLL support AC_LIBTOOL_WIN32_DLL dnl Checks for programs AC_PROG_CC AC_PROG_GCC_TRADITIONAL AC_PROG_MAKE_SET AC_PROG_INSTALL dnl Check for libtool AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) dnl Check for pkg-config AC_PATH_PROG(PKGCONFIG,[pkg-config]) dnl Support of internationalization (i18n) AM_GNU_GETTEXT([external]) dnl Check for compiler language support AC_C_CONST AC_C_VOLATILE dnl Check if WINAPI support should be enabled AX_COMMON_CHECK_ENABLE_WINAPI dnl Check if wide character type should be enabled AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE dnl Check for type definitions AX_TYPES_CHECK_LOCAL dnl Checks for libraries and library functions AX_COMMON_CHECK_LOCAL dnl Check for enabling libcstring for cross-platform C string functions AX_LIBCSTRING_CHECK_ENABLE dnl Check for enabling libcerror for cross-platform C error functions AX_LIBCERROR_CHECK_ENABLE dnl Check for enabling libclocale for cross-platform C locale functions AX_LIBCLOCALE_CHECK_ENABLE dnl Check for enabling libcnotify for cross-platform C notification functions AX_LIBCNOTIFY_CHECK_ENABLE dnl Check for enabling libcsplit for cross-platform C split string functions AX_LIBCSPLIT_CHECK_ENABLE dnl Check for enabling libuna for Unicode string support AX_LIBUNA_CHECK_ENABLE dnl Check for enabling libcfile for cross-platform C file functions AX_LIBCFILE_CHECK_ENABLE dnl Check for enabling libcpath for cross-platform C path functions AX_LIBCPATH_CHECK_ENABLE dnl Check for enabling libbfio for basic file IO support AX_LIBBFIO_CHECK_ENABLE dnl Check for enabling libfcache for file value cache support AX_LIBFCACHE_CHECK_ENABLE dnl Check for enabling libfdata for file data types support AX_LIBFDATA_CHECK_ENABLE dnl Check for enabling libfdatetime for file date and time support AX_LIBFDATETIME_CHECK_ENABLE dnl Check for enabling libfguid for file GUID/UUID support AX_LIBFGUID_CHECK_ENABLE dnl Check for enabling libfvalue for file value support AX_LIBFVALUE_CHECK_ENABLE dnl Check for enabling libfwnt for file Windows NT type support AX_LIBFWNT_CHECK_ENABLE dnl Check for enabling libfmapi for file MAPI types support AX_LIBFMAPI_CHECK_ENABLE dnl Check for library function support AX_LIBPFF_CHECK_LOCAL dnl Check for enabling libcsystem for cross-platform C generic system functions AX_LIBCSYSTEM_CHECK_ENABLE dnl Check if pfftools should be build as static executables AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES dnl Check if libpff should be build with verbose output AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT dnl Check if libpff should be build with debug output AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT dnl Check if libpff java bindings (jpff) should be build AX_JAVA_CHECK_ENABLE dnl Check if libpff python bindings (pypff) should be build AX_PYTHON_CHECK_ENABLE dnl Check if DLL support is needed in pfftools AS_IF( [test x"$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno], [AS_CASE( [$host], [*cygwin* | *mingw*], [AC_SUBST( [LIBPFF_DLL_IMPORT], ["-DLIBPFF_DLL_IMPORT"]) ]) ]) dnl Set additional compiler flags CFLAGS="$CFLAGS -Wall"; dnl Set memwatch support ac_cv_enable_memwatch=no AS_IF( [test "x$ac_cv_enable_memwatch" != xno ], [AC_SUBST( [MEMWATCH_CPPFLAGS], ["-DMEMWATCH -DMEMWATCH_STDIO"]) AC_SUBST( [MEMWATCH_LIBADD], [../common/libmemwatch.la]) ]) AM_CONDITIONAL( [HAVE_MEMWATCH], [test "x$ac_cv_enable_memwatch" != xno]) dnl Check if requires and build requires should be set in spec file AS_IF( [test "x$ac_cv_libcstring" = xyes || test "x$ac_cv_libcerror" = xyes || test "x$ac_cv_libclocale" = xyes || test "x$ac_cv_libcnotify" = xyes || test "x$ac_cv_libcsplit" = xyes || test "x$ac_cv_libuna" = xyes || test "x$ac_cv_libcfile" = xyes || test "x$ac_cv_libcpath" = xyes || test "x$ac_cv_libbfio" = xyes || test "x$ac_cv_libfcache" = xyes || test "x$ac_cv_libfdata" = xyes || test "x$ac_cv_libfdatetime" = xyes || test "x$ac_cv_libfguid" = xyes || test "x$ac_cv_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes || test "x$ac_cv_libfmapi" = xyes], [AC_SUBST( [libpff_spec_requires], [Requires:]) AC_SUBST( [libpff_spec_build_requires], [BuildRequires:]) ]) AS_IF( [test "x$ac_cv_libcsystem" = xyes], [AC_SUBST( [libpff_tools_spec_build_requires], [BuildRequires:]) ]) dnl Set the date for dpkg files AC_SUBST( [DATE], [`date -R 2> /dev/null`]) dnl Have configure make the Makefiles AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([include/Makefile]) AC_CONFIG_FILES([common/Makefile]) AC_CONFIG_FILES([libcstring/Makefile]) AC_CONFIG_FILES([libcerror/Makefile]) AC_CONFIG_FILES([libclocale/Makefile]) AC_CONFIG_FILES([libcnotify/Makefile]) AC_CONFIG_FILES([libcsplit/Makefile]) AC_CONFIG_FILES([libuna/Makefile]) AC_CONFIG_FILES([libcfile/Makefile]) AC_CONFIG_FILES([libcpath/Makefile]) AC_CONFIG_FILES([libbfio/Makefile]) AC_CONFIG_FILES([libfcache/Makefile]) AC_CONFIG_FILES([libfdata/Makefile]) AC_CONFIG_FILES([libfdatetime/Makefile]) AC_CONFIG_FILES([libfguid/Makefile]) AC_CONFIG_FILES([libfvalue/Makefile]) AC_CONFIG_FILES([libfwnt/Makefile]) AC_CONFIG_FILES([libfmapi/Makefile]) AC_CONFIG_FILES([libpff/Makefile]) AC_CONFIG_FILES([libcsystem/Makefile]) AC_CONFIG_FILES([pfftools/Makefile]) AC_CONFIG_FILES([jpff/Makefile]) AC_CONFIG_FILES([pypff/Makefile]) AC_CONFIG_FILES([po/Makefile.in]) AC_CONFIG_FILES([po/Makevars]) AC_CONFIG_FILES([manuals/Makefile]) AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_FILES([examples/Makefile]) AC_CONFIG_FILES([macosx/Makefile]) AC_CONFIG_FILES([msvscpp/Makefile]) AC_CONFIG_FILES([contrib/Makefile]) dnl Have configure make the include files AC_CONFIG_FILES([include/libpff.h]) AC_CONFIG_FILES([include/libpff/definitions.h]) AC_CONFIG_FILES([include/libpff/features.h]) AC_CONFIG_FILES([include/libpff/types.h]) AC_CONFIG_FILES([libpff/libpff_definitions.h]) dnl Have configure make distribution specific files AC_CONFIG_FILES([common/types.h]) AC_CONFIG_FILES([dpkg/changelog]) AC_CONFIG_FILES([dpkg/copyright]) AC_CONFIG_FILES([libpff/libpff.rc]) AC_CONFIG_FILES([macosx/Introduction.rtf]) AC_CONFIG_FILES([libpff.pc]) AC_CONFIG_FILES([libpff.spec]) dnl Have configure write its configuration AC_CONFIG_HEADERS([common/config.h]) AC_OUTPUT dnl Print a summary AC_MSG_NOTICE([ Building: libcstring support: $ac_cv_libcstring libcerror support: $ac_cv_libcerror libclocale support: $ac_cv_libclocale libcnotify support: $ac_cv_libcnotify libcsplit support: $ac_cv_libcsplit libuna support: $ac_cv_libuna libcfile support: $ac_cv_libcfile libcpath support: $ac_cv_libcpath libbfio support: $ac_cv_libbfio libfcache support: $ac_cv_libfcache libfdata support: $ac_cv_libfdata libfdatetime support: $ac_cv_libfdatetime libfguid support: $ac_cv_libfguid libfvalue support: $ac_cv_libfvalue libfwnt support: $ac_cv_libfwnt libfmapi support: $ac_cv_libfmapi libcsystem support: $ac_cv_libcsystem Features: Wide character type support: $ac_cv_enable_wide_character_type pfftools are build as static executables: $ac_cv_enable_static_executables Java (jpff) support: $ac_cv_enable_java Python (pypff) support: $ac_cv_enable_python Verbose output: $ac_cv_enable_verbose_output Debug output: $ac_cv_enable_debug_output ]);